From patchwork Tue Mar 31 07:00:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Savolainen, Petri \(Nokia - FI/Espoo\)" X-Patchwork-Id: 46570 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E7BB0215A7 for ; Tue, 31 Mar 2015 07:00:18 +0000 (UTC) Received: by wibgr10 with SMTP id gr10sf2122482wib.2 for ; Tue, 31 Mar 2015 00:00:18 -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=2T5JeWBCStL0+EJ9bvRjNTEvTnQzsk8WGE6iRd+/6UA=; b=EDLqOovhTzGd6QZIdiFh7hC3cxRMdR5GX5qMSEuk95vp1snclhaAn7guErzgVpYuKN JxpWQ89/KNc/8rEccCPRIptY3vTUAmsioFmOnvQwV0q4UMG3RII9IsQZHhQgfZ7p3QFC LKodtLscafjALjvMRvIHW/7UzpCNdepNXI1VOWf7cFiTSdyXChnA1LQYFel8CvfDtZzz ulCRPt4Ru0gMHKEIhClegyfL3mWrHCJp0UmVV/dh9oR2FoubZH3mffc8p+dZHKT7Kj09 r9LFGElqf/iwqPsEI4a3teL/se1fWo+uDr17trY1vgOIR4rXLSCQm5Z7gniE5z3vBif+ s54w== X-Gm-Message-State: ALoCoQmYD1jSqFAni3eFrFE1a3Vk9EhYK/mZR3sPL69dqkwLAD2lsW8KzdTBMCxdP1RorutSktS0 X-Received: by 10.180.35.230 with SMTP id l6mr332008wij.0.1427785218203; Tue, 31 Mar 2015 00:00:18 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.198 with SMTP id ao6ls609158lac.103.gmail; Tue, 31 Mar 2015 00:00:18 -0700 (PDT) X-Received: by 10.152.170.199 with SMTP id ao7mr29164312lac.27.1427785218024; Tue, 31 Mar 2015 00:00:18 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id cr8si1575363lad.169.2015.03.31.00.00.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Mar 2015 00:00:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbcmq2 with SMTP id mq2so5596161lbc.0 for ; Tue, 31 Mar 2015 00:00:17 -0700 (PDT) X-Received: by 10.152.23.70 with SMTP id k6mr1138108laf.76.1427785217459; Tue, 31 Mar 2015 00:00:17 -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 k9csp1616125lbq; Tue, 31 Mar 2015 00:00:16 -0700 (PDT) X-Received: by 10.55.23.195 with SMTP id 64mr74596769qkx.76.1427785216039; Tue, 31 Mar 2015 00:00:16 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id z62si12937992qkg.44.2015.03.31.00.00.14; Tue, 31 Mar 2015 00:00:16 -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 4813064EE5; Tue, 31 Mar 2015 07:00:14 +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 3A89F64E85; Tue, 31 Mar 2015 07:00:12 +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 9E07864ED7; Tue, 31 Mar 2015 07:00:10 +0000 (UTC) Received: from demumfd001.nsn-inter.net (demumfd001.nsn-inter.net [93.183.12.32]) by lists.linaro.org (Postfix) with ESMTPS id 6576E64E85 for ; Tue, 31 Mar 2015 07:00:09 +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 t2V706Il022123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 31 Mar 2015 07:00:07 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 t2V7068o004218 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 31 Mar 2015 09:00:06 +0200 Received: from DEMUHTC008.nsn-intra.net (10.159.42.39) by DEMUHTC001.nsn-intra.net (10.159.42.32) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 31 Mar 2015 09:00:06 +0200 Received: from DEMUMBX012.nsn-intra.net ([169.254.12.25]) by DEMUHTC008.nsn-intra.net ([10.159.42.39]) with mapi id 14.03.0224.002; Tue, 31 Mar 2015 09:00:05 +0200 From: "Savolainen, Petri (Nokia - FI/Espoo)" To: ext Bill Fischofer Thread-Topic: [lng-odp] [RFC 5/8] api: packet_io: added packet input queue API definitions Thread-Index: AQHQayuzKqUVqc31WU289XUgWunuRZ02J4Sw Date: Tue, 31 Mar 2015 07:00:05 +0000 Message-ID: References: <1427736187-13113-1-git-send-email-petri.savolainen@nokia.com> <1427736187-13113-5-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: 12720 X-purgate-ID: 151667::1427785207-00005972-617047B8/0/0 Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [RFC 5/8] api: packet_io: added packet input queue API definitions 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.171 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:54 PM To: Savolainen, Petri (Nokia - FI/Espoo) Cc: LNG ODP Mailman List Subject: Re: [lng-odp] [RFC 5/8] api: packet_io: added packet input queue API definitions On Mon, Mar 30, 2015 at 12:23 PM, Petri Savolainen > wrote: API changes enable multiple packet input queues and control hashing of incoming packets into those. Packet IO start and stop were added to have more controlled packet IO setup phase. Signed-off-by: Petri Savolainen > --- include/odp/api/packet_io.h | 88 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index d34041c..99a5d5d 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -18,6 +18,9 @@ extern "C" { #endif +#include +#include + /** @defgroup odp_packet_io ODP PACKET IO * Operations on a packet. * @{ @@ -58,11 +61,36 @@ enum odp_pktio_input_mode { }; /** + * Packet input queue hashing + * + * Input queue hashing algorithm is implementation specific. This enumeration + * selects the packet fields used in input queue hashing. Queue selection is + * implementation specific for packets missing the fields. + */ +enum odp_pktio_input_hash { + /** No specific fields defined */ + ODP_PKTIN_HASH_NONE = 0, + /** IPv4/v6 addresses */ + ODP_PKTIN_HASH_IP, + /** UDP ports and IPv4/v6 addresses */ + ODP_PKTIN_HASH_UDP_IP, + /** TCP ports and IPv4/v6 addresses */ + ODP_PKTIN_HASH_TCP_IP Are these names intended to imply concatenation order for hashing? That is, UDP_IP means has on UDP port followed by IP address? If not then should these be ODP_PKTIN_IP_UDP, etc. to reflect the Layer 4 qualification to the Layer 3 hash? There’s no algorithm or order (?) defined for the hash. E.g. ODP_PKTIN_HASH_UDP_IP just defines that inputs for hash function are: IPv4/v6 addresses, IP type/next header == UDP and UDP port numbers. Output from the function is one of the input queues. -Petri