From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by dpdk.org (Postfix) with ESMTP id D51C7C88A for ; Fri, 19 Jun 2015 18:14:15 +0200 (CEST) Received: by labbc20 with SMTP id bc20so77157032lab.1 for ; Fri, 19 Jun 2015 09:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yIHuJBMNPl3Qo1p2OYrTB0XqrcGtQ6/Ow+RIMJIb5kc=; b=wzLTPo2a+JYMHGJB7+J2gT74umOB3pLG3RC9KnE7GSTMkbm6LjXHelVWHlekOEVkc5 1HpCar+pWnAgJC5K9/dUBbKiTPZ/VV3tY5U5k1V5W1lJ9ph922rYdCPna/85A6pqmzc2 9u/HvMf+54Iy6CkfB4nZ1aBvJBaXkmriNEMX494WB7huSGU3NIUhsNsfEIlU6N3C0Vg7 Z2hQ5Jz+NWU2qXIAJU6/2ZTxoK2n6UijdOM92PYzuIoiQGDDehH1ZDOg+nbAcLQFC3MZ gsJvIgU6qi8ctnLxH2X4cP7KPyASSYByITSlwlxMeXDTEOTpj/fAW4m7JAxx28pQJM1u eh/Q== MIME-Version: 1.0 X-Received: by 10.112.155.103 with SMTP id vv7mr13202915lbb.75.1434730455629; Fri, 19 Jun 2015 09:14:15 -0700 (PDT) Received: by 10.114.10.229 with HTTP; Fri, 19 Jun 2015 09:14:15 -0700 (PDT) In-Reply-To: <59AF69C657FD0841A61C55336867B5B03455A83A@IRSMSX103.ger.corp.intel.com> References: <1431097092-19790-1-git-send-email-medvedkinv@gmail.com> <1434725752-22847-1-git-send-email-medvedkinv@gmail.com> <59AF69C657FD0841A61C55336867B5B03455A83A@IRSMSX103.ger.corp.intel.com> Date: Fri, 19 Jun 2015 19:14:15 +0300 Message-ID: From: Vladimir Medvedkin To: "Richardson, Bruce" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v4] Add toeplitz hash algorithm used by RSS X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2015 16:14:16 -0000 Hi Bruce, 2015-06-19 18:59 GMT+03:00 Richardson, Bruce : > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Vladimir Medvedkin > > Sent: Friday, June 19, 2015 3:56 PM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH v4] Add toeplitz hash algorithm used by RSS > > > > v4 changes > > - Fix copyright > > - rename bswap_mask constant, add rte_ prefix > > - change rte_ipv[46]_tuple struct > > - change rte_thash_load_v6_addr prototype > > > > v3 changes > > - Rework API to be more generic > > - Add sctp_tag into tuple > > > > v2 changes > > - Add ipv6 support > > - Various style fixes > > > > Missing signoff line. > > > --- > > lib/librte_hash/Makefile | 1 + > > lib/librte_hash/rte_thash.h | 202 > > ++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 203 insertions(+) > > create mode 100644 lib/librte_hash/rte_thash.h > > > <...snip...> > > + > > +/* Byte swap mask used for converting IPv6 address 4-byte chunks to CPU > > byte order */ > > +static const __m128i rte_thash_ipv6_bswap_mask = {0x0405060700010203, > > 0x0C0D0E0F08090A0B}; > > + > > +#define RTE_THASH_V4_L3 2 /*calculate hash of ipv4 header > only*/ > > +#define RTE_THASH_V4_L4 3 /*calculate hash of ipv4 + > transport > > headers*/ > > +#define RTE_THASH_V6_L3 8 /*calculate hash of ipv6 header > only > > */ > > +#define RTE_THASH_V6_L4 9 /*calculate hash of ipv6 + > transport > > headers */ > > I'm still not seeing why these values need to be defined here, rather than > in a specific app. > Also, the choice of values for these defines seems strange to me? How were > they chosen? > This is a predefined values. They mean the length (in 4-bytes) of the input data in hashing. I think it's like defines in rte_ip.h, for example. > > /Bruce > >