From patchwork Thu Apr 14 21:06:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 65854 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp825838qge; Thu, 14 Apr 2016 14:08:33 -0700 (PDT) X-Received: by 10.140.89.178 with SMTP id v47mr20750252qgd.11.1460668112962; Thu, 14 Apr 2016 14:08:32 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f68si33972102qge.89.2016.04.14.14.08.32; Thu, 14 Apr 2016 14:08:32 -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 A000B685CB; Thu, 14 Apr 2016 21:08:32 +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 C9A40686A1; Thu, 14 Apr 2016 21:06:56 +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 8E99368625; Thu, 14 Apr 2016 21:06:49 +0000 (UTC) Received: from mail-oi0-f54.google.com (mail-oi0-f54.google.com [209.85.218.54]) by lists.linaro.org (Postfix) with ESMTPS id 3D7696846D for ; Thu, 14 Apr 2016 21:06:47 +0000 (UTC) Received: by mail-oi0-f54.google.com with SMTP id y204so106093463oie.3 for ; Thu, 14 Apr 2016 14:06:47 -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=2FxTg8ibU2TFgyv2uKeWMW2ewDBMuiVLs7Mkz1PgSkY=; b=DRZBlacxEK42FVOcANvFdT7h8aUqsp5WTAq0cNEkamQ0XOMumVwga/AYZX+cC4+rRO tNEZaZZrEkoWPMTw9Oi2Hv64QcKWHZGwFfbPdQGGHv5qFjX62igBmGwcP9DuEzHUla6n wBr9+yLLPWfvYVHDgeHayntXIlt7ksI3SL6oDuoUB4BgM1gWE9K77nK1YWHqcUFfpeFN T5t2hxr1LQQW2nH6+ip/BkWZNEuHYwfdBrFT6ZYTgrt5VV7Nx6Svfc16Je4z+OsCl+gQ BCz+bpIkGxx7AiHj0CheI9vHz3KeWlBdUq4tVxgtX5HZwXrKjRDCdycfeq8bD32aeVWf RLgw== X-Gm-Message-State: AOPr4FVmOaSXCY1EDO6+OLwio3GsCncrHhmccsBaA1/fhiojbmQa8nEAorwsAyKAAdiINVVIbnU= X-Received: by 10.157.14.182 with SMTP id 51mr9271434otj.158.1460668006744; 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.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Apr 2016 14:06:46 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Thu, 14 Apr 2016 16:06:40 -0500 Message-Id: <1460668001-25533-5-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 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 --- 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..49e52dd 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_to_index(odp_packet_hdr(pkt)->input); +} + void *odp_packet_user_ptr(odp_packet_t pkt) { return odp_packet_hdr(pkt)->buf_hdr.buf_ctx;