From patchwork Tue Mar 31 07:08:08 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: 46571 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A51DB215A7 for ; Tue, 31 Mar 2015 07:08:23 +0000 (UTC) Received: by lbfb1 with SMTP id b1sf1617057lbf.2 for ; Tue, 31 Mar 2015 00:08:22 -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=24qaZWZshH0BIspewGuLKKtKy7SInMOCMU0evIQxQ3g=; b=caC3qDk2P8NM1Boq9rSsxVXs4Koc+FCQKA9Dn7pSSAf9zmmWKOF28+isIHImF0D4qC Tp7vaB0u6vo2BrHugZ9tl/cc8X9qEnuX09t+Cm4Eag1lCvmr3RtCD60bRsNllLgBO6o/ Y07y4GlZfmvh0+UW4Oa5qep2LXYh85k9Mh69HIGIKrQR7IQ5o4nf8ONv2dyGWT20PdOI H4hArtw8oHBKmi0FnroOvBMdWmz4Colf/ssYZTVp1cmPE4VXTwWK0meXUCulEhI9G8l2 VVI+PXk61tm2H/wfjjKAkqev1O1pSNEHPRot5Mh3PpnAKq43ZEs2mCkDACcBwhbLdlpJ RisA== X-Gm-Message-State: ALoCoQkHKtJTNJErhg6X2XToR4m5MwKlW4HhvIfhsrnvWBT0mdoW1iO0BQ0aLg//VZ5T3HvVMXL2 X-Received: by 10.180.126.37 with SMTP id mv5mr334293wib.3.1427785702606; Tue, 31 Mar 2015 00:08:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.236 with SMTP id uh12ls666680lac.54.gmail; Tue, 31 Mar 2015 00:08:22 -0700 (PDT) X-Received: by 10.152.45.37 with SMTP id j5mr30162699lam.31.1427785702160; Tue, 31 Mar 2015 00:08:22 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id f4si2364391lbc.56.2015.03.31.00.08.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Mar 2015 00:08:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by labe2 with SMTP id e2so5716551lab.3 for ; Tue, 31 Mar 2015 00:08:22 -0700 (PDT) X-Received: by 10.112.185.66 with SMTP id fa2mr29261635lbc.117.1427785701963; Tue, 31 Mar 2015 00:08:21 -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 k9csp1620256lbq; Tue, 31 Mar 2015 00:08:21 -0700 (PDT) X-Received: by 10.140.28.203 with SMTP id 69mr46501190qgz.5.1427785700541; Tue, 31 Mar 2015 00:08:20 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h13si12902650qhc.98.2015.03.31.00.08.19; Tue, 31 Mar 2015 00:08:20 -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 4505D64EEA; Tue, 31 Mar 2015 07:08:19 +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=unavailable 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 14D4464EBE; Tue, 31 Mar 2015 07:08:15 +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 C345164ED7; Tue, 31 Mar 2015 07:08:12 +0000 (UTC) Received: from demumfd001.nsn-inter.net (demumfd001.nsn-inter.net [93.183.12.32]) by lists.linaro.org (Postfix) with ESMTPS id 149C064EBE for ; Tue, 31 Mar 2015 07:08:11 +0000 (UTC) Received: from demuprx017.emea.nsn-intra.net ([10.150.129.56]) by demumfd001.nsn-inter.net (8.14.3/8.14.3) with ESMTP id t2V789IX015532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 31 Mar 2015 07:08:10 GMT Received: from DEMUHTC002.nsn-intra.net ([10.159.42.33]) by demuprx017.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id t2V789gE029657 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 31 Mar 2015 09:08:09 +0200 Received: from DEMUHTC011.nsn-intra.net (10.159.42.42) by DEMUHTC002.nsn-intra.net (10.159.42.33) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 31 Mar 2015 09:08:09 +0200 Received: from DEMUMBX012.nsn-intra.net ([169.254.12.25]) by DEMUHTC011.nsn-intra.net ([10.159.42.42]) with mapi id 14.03.0224.002; Tue, 31 Mar 2015 09:08:08 +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: AQHQayvmxKXNVt2TIkqtSSEbDvgFsZ02KnFg Date: Tue, 31 Mar 2015 07:08:08 +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.112] 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: 12444 X-purgate-ID: 151667::1427785690-00005972-AC7A404F/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.215.53 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: 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(+) +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. -Petri + * + * @param pktio Packet IO handle + * @param packet Packet handle + * + * @return Input queue handle + * @retval ODP_QUEUE_INVALID on failure + */