From patchwork Thu Apr 14 21:06:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 65853 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp825687qge; Thu, 14 Apr 2016 14:08:11 -0700 (PDT) X-Received: by 10.55.75.203 with SMTP id y194mr21377235qka.2.1460668090940; Thu, 14 Apr 2016 14:08:10 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v39si5262049qge.105.2016.04.14.14.08.10; Thu, 14 Apr 2016 14:08:10 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 37A47684D7; Thu, 14 Apr 2016 21:08:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 8737F68614; Thu, 14 Apr 2016 21:06:54 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id A9075685D1; Thu, 14 Apr 2016 21:06:48 +0000 (UTC) Received: from mail-oi0-f41.google.com (mail-oi0-f41.google.com [209.85.218.41]) by lists.linaro.org (Postfix) with ESMTPS id 80DD1684D7 for ; Thu, 14 Apr 2016 21:06:46 +0000 (UTC) Received: by mail-oi0-f41.google.com with SMTP id p188so105994873oih.2 for ; Thu, 14 Apr 2016 14:06:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R/AdatFQuqnrywItKUkpkWAnnYSGUXXCOTpfkdvV5XM=; b=R2cUMdg7CwOoKjUKtYNxaE4kInFj+ER4CRyj5IA63jval6VRKdxJMEklEfmz2U0aHD 5s7Y+0I3h5Vy3WnbBInokL1zdIC1FXw0TTKWE7pQ3aRf1DkcXKaCPd7Y2UHp6zOk6bYj cyQM1cxgOqljYRnl/TOD7wcrTUhTZNB+Ho5YpkmLzpzsIHGl4WAgaoUcd3kaN3iw1k6U y7ebJCS+bsJcnQiaTB9gko3LSfxYIY9nNfUZXHkRKytAw1BbPLSdJKbsiLMklYgwJpFy feR0T9UI+6ydvLkdViIEgPL15QnmQTFgaVPjxf9k7I1iYV91TSd/I2F1GEaIObOpVUYs VYZg== X-Gm-Message-State: AOPr4FWjCt0g3NAKCPDwCZDj2GMNTN1eJQIerRX6Rb6iED+Xml4cavXYGnZXWmvv3+UE3oBfToI= X-Received: by 10.157.54.54 with SMTP id w51mr8395097otb.186.1460668006024; Thu, 14 Apr 2016 14:06:46 -0700 (PDT) Received: from Ubuntu15.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id xm14sm13871138oeb.17.2016.04.14.14.06.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Apr 2016 14:06:45 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Thu, 14 Apr 2016 16:06:39 -0500 Message-Id: <1460668001-25533-4-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460668001-25533-1-git-send-email-bill.fischofer@linaro.org> References: <1460668001-25533-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv2 4/6] api: packet: add odp_packet_input_index() api X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Signed-off-by: Bill Fischofer --- include/odp/api/spec/packet.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index 7da353b..7606597 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -458,6 +458,19 @@ odp_pool_t odp_packet_pool(odp_packet_t pkt); odp_pktio_t odp_packet_input(odp_packet_t pkt); /** + * Packet input interface index + * + * Returns the index of the PktIO interface that received the packet, or + * <0 when the packet was allocated/reset by the application. + * + * @param pkt Packet handle + * + * @return Packet interface index (0..odp_config_pktio_entries()-1) + * @retval <0 Packet was not received on any interface + */ +int odp_packet_input_index(odp_packet_t pkt); + +/** * User context pointer * * Return previously stored user context pointer.