From patchwork Sat Apr 16 17:55:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 65983 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp528333qge; Sat, 16 Apr 2016 10:57:34 -0700 (PDT) X-Received: by 10.55.79.17 with SMTP id d17mr33512985qkb.56.1460829454886; Sat, 16 Apr 2016 10:57:34 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m142si13485959qke.49.2016.04.16.10.57.34; Sat, 16 Apr 2016 10:57:34 -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 4FA1468784; Sat, 16 Apr 2016 17:57:34 +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, TVD_SPACE_RATIO, 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 C829068791; Sat, 16 Apr 2016 17:55:52 +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 E591C68784; Sat, 16 Apr 2016 17:55:44 +0000 (UTC) Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by lists.linaro.org (Postfix) with ESMTPS id 63D726877B for ; Sat, 16 Apr 2016 17:55:43 +0000 (UTC) Received: by mail-ob0-f169.google.com with SMTP id n10so18721522obb.2 for ; Sat, 16 Apr 2016 10:55:43 -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=lVLrbWQ8JPxrzYq48ZNWBgzxfGfuuqNWDREfjbLDeYU=; b=I/u161td2zxG9NSGFvWBk/dvXAQWHwmBAMzikH+csKQVOc2itlHAp7rl2EGtGTSPYs KvqXh0h5Ly1U00BYHjPLIr1XOie3bK0uyKetCUyVZsGPai26jMS0qBOmc6fFbAmaPeg1 3mGHuV3elLA3Mqot4hY16PwZg5OYnlOloUDCowA2Bvop4CK6HiT83KfI8VNAAFgzDAa9 7TmZHtTlxuPBCe54syFCfmOeYDSLU2BcRbaik22v7I/jHAVxy49+D8ShnnL6eLmIyqCD sOcrn7qzkDDTNilp8oGD9yYHkqc+TddZVEAlrm/Tr8XtEa7i5K5JQg0thHuWk/VYDl8q GpSw== X-Gm-Message-State: AOPr4FUJSiVtvwZczMnSHCN19kD7fjd+UTPQQFhZoMr6v7Po8M0WLU0InYD1JHN1dkRYbh+u6R0= X-Received: by 10.60.45.105 with SMTP id l9mr563921oem.23.1460829342959; Sat, 16 Apr 2016 10:55:42 -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 k125sm16528743oia.21.2016.04.16.10.55.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 16 Apr 2016 10:55:42 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sat, 16 Apr 2016 12:55:36 -0500 Message-Id: <1460829337-31120-5-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1460829337-31120-1-git-send-email-bill.fischofer@linaro.org> References: <1460829337-31120-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv3 5/6] linux-generic: packet: implement odp_packet_input_index() 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 Reviewed-by: Bogdan Pricope --- platform/linux-generic/odp_packet.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 2c44316..93c237f 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -330,6 +330,11 @@ odp_pktio_t odp_packet_input(odp_packet_t pkt) return odp_packet_hdr(pkt)->input; } +int odp_packet_input_index(odp_packet_t pkt) +{ + return odp_pktio_index(odp_packet_hdr(pkt)->input); +} + void *odp_packet_user_ptr(odp_packet_t pkt) { return odp_packet_hdr(pkt)->buf_hdr.buf_ctx;