From patchwork Tue Mar 31 14:00:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Savolainen, Petri \(Nokia - FI/Espoo\)" X-Patchwork-Id: 46585 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E43332159A for ; Tue, 31 Mar 2015 14:01:10 +0000 (UTC) Received: by labpk9 with SMTP id pk9sf4148827lab.1 for ; Tue, 31 Mar 2015 07:01:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:thread-topic :thread-index:date:message-id:references:in-reply-to:accept-language :content-language:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :content-type:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=W66rN4dwg0Ay5COoWxwH8AIAOyA/nNUk2TYxWktKqE0=; b=GvOEJ9TOYZhKGhisrZnTAK4zPRU8RajzmSXfIpLvBFBVPVaCCl3aDM3hTzrNPzEE77 h8sAXKcXrOuy8+x6wyswkelCmKYE9nQgR93SD9F3/UCjXLjohjTkGn4eEotuqm6jGtqz NSgV/0kxt7VHgZHVKepe5fcAWZGZBFGNauKcttO/dHTsR2d9FRmwYj2eEryYPBhkYnpB vRJU1k3fsNEEIfdsViiUHKFEj3q0+90iyyX1lNm3690r4zdpDCRHrwdgAepcpN+4tyjf CQ4Ylfhx8gRYHmj8vtrbursKvZj5fO4IPF9XPSQ2dQXwdre4QgZ7QILH+PXxVb+IimTK d7Ng== X-Gm-Message-State: ALoCoQkKJ0OudCrCg1JpGcWgrL5Hf2MesYF/2Y/vF2ZrdKT016MRWQkMxvNa/XB41lroPj4gNoWd X-Received: by 10.152.164.171 with SMTP id yr11mr8389455lab.4.1427810469993; Tue, 31 Mar 2015 07:01:09 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.130 with SMTP id v2ls566961lae.98.gmail; Tue, 31 Mar 2015 07:01:09 -0700 (PDT) X-Received: by 10.112.242.8 with SMTP id wm8mr30658147lbc.69.1427810469829; Tue, 31 Mar 2015 07:01:09 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id kx13si9251252lbb.152.2015.03.31.07.01.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Mar 2015 07:01:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbdc10 with SMTP id c10so13044445lbd.2 for ; Tue, 31 Mar 2015 07:01:09 -0700 (PDT) X-Received: by 10.152.19.199 with SMTP id h7mr32022654lae.32.1427810469620; Tue, 31 Mar 2015 07:01:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.57.201 with SMTP id k9csp329lbq; Tue, 31 Mar 2015 07:01:08 -0700 (PDT) X-Received: by 10.140.144.139 with SMTP id 133mr50638910qhq.1.1427810453440; Tue, 31 Mar 2015 07:00:53 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t97si13720610qgt.97.2015.03.31.07.00.33; Tue, 31 Mar 2015 07:00:53 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 195DA64EF9; Tue, 31 Mar 2015 14:00:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=HTML_MESSAGE, RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 56B2664EEC; Tue, 31 Mar 2015 14:00:30 +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 C733C64EF3; Tue, 31 Mar 2015 14:00:28 +0000 (UTC) Received: from demumfd001.nsn-inter.net (demumfd001.nsn-inter.net [93.183.12.32]) by lists.linaro.org (Postfix) with ESMTPS id D7E8A64EEC for ; Tue, 31 Mar 2015 14:00:27 +0000 (UTC) Received: from demuprx016.emea.nsn-intra.net ([10.150.129.55]) by demumfd001.nsn-inter.net (8.14.3/8.14.3) with ESMTP id t2VE0OI1006972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 31 Mar 2015 14:00:25 GMT Received: from DEMUHTC001.nsn-intra.net ([10.159.42.32]) by demuprx016.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id t2VE0NCH006942 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 31 Mar 2015 16:00:23 +0200 Received: from DEMUHTC007.nsn-intra.net (10.159.42.38) by DEMUHTC001.nsn-intra.net (10.159.42.32) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 31 Mar 2015 16:00:22 +0200 Received: from DEMUMBX012.nsn-intra.net ([169.254.12.25]) by DEMUHTC007.nsn-intra.net ([10.159.42.38]) with mapi id 14.03.0224.002; Tue, 31 Mar 2015 16:00:23 +0200 From: "Savolainen, Petri (Nokia - FI/Espoo)" To: ext Bill Fischofer Thread-Topic: [lng-odp] [RFC 6/8] api: packet_io: added odp_pktio_inq_hash_lookup Thread-Index: AQHQayvmxKXNVt2TIkqtSSEbDvgFsZ02KnFggAA9r4CAADbUEA== Date: Tue, 31 Mar 2015 14:00:22 +0000 Message-ID: References: <1427736187-13113-1-git-send-email-petri.savolainen@nokia.com> <1427736187-13113-6-git-send-email-petri.savolainen@nokia.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.159.42.115] MIME-Version: 1.0 X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 19336 X-purgate-ID: 151667::1427810425-00005972-0B9F657F/0/0 Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [RFC 6/8] api: packet_io: added odp_pktio_inq_hash_lookup X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: petri.savolainen@nokia.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: ext Bill Fischofer [mailto:bill.fischofer@linaro.org] Sent: Tuesday, March 31, 2015 3:41 PM To: Savolainen, Petri (Nokia - FI/Espoo) Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [RFC 6/8] api: packet_io: added odp_pktio_inq_hash_lookup On Tue, Mar 31, 2015 at 2:08 AM, Savolainen, Petri (Nokia - FI/Espoo) > wrote: From: ext Bill Fischofer [mailto:bill.fischofer@linaro.org] Sent: Monday, March 30, 2015 11:56 PM To: Savolainen, Petri (Nokia - FI/Espoo) Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [RFC 6/8] api: packet_io: added odp_pktio_inq_hash_lookup On Mon, Mar 30, 2015 at 12:23 PM, Petri Savolainen > wrote: Hash lookup is used to find the input queue for a packet. This information is needed e.g. to setup the queue context. Signed-off-by: Petri Savolainen > --- include/odp/api/packet_io.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -Petri + * + * @param pktio Packet IO handle + * @param packet Packet handle + * + * @return Input queue handle + * @retval ODP_QUEUE_INVALID on failure + */ +odp_queue_t odp_pktio_inq_hash_lookup(odp_pktio_t pktio, odp_packet_t packet); + +/** * Number of packet input queues * * @param pktio Packet IO handle -- 2.3.4 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index 99a5d5d..7e84fe1 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -20,6 +20,7 @@ extern "C" { #include #include +#include /** @defgroup odp_packet_io ODP PACKET IO * Operations on a packet. @@ -149,6 +150,19 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_pool_t pool, odp_queue_t odp_pktio_inq_create(odp_pktio_t pktio, const char *name); /** + * Packet input queue hash lookup + * + * Find the input queue for a packet. Shouldn't this be "for a pktio" not "for a packet"? The argument is odp_pktio_t, not odp_packet_t. Packet is the second argument. User can test with a packet (header fields set accordingly) which input queue it (packets of that flow) would land on. Then I'm not sure I understand the intended use of this API or why it has an odp_pktio_t as one of its input arguments or is named odp_pktio_inq_hash_lookup(). From what you described I'd expect it to be: odp_queue_t odp_packet_inq_hash_lookup(odp_packet_t pkt); Input queue hashing is configured per interface (parameter to odp_pktio_open()). -Petri