DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Vladimir Medvedkin <medvedkinv@gmail.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v4] Add toeplitz hash algorithm used by RSS
Date: Mon, 29 Jun 2015 13:18:40 +0100	[thread overview]
Message-ID: <20150629121840.GC10380@bricha3-MOBL3> (raw)
In-Reply-To: <CANDrEHmPN07fX5pFZVhoXQbQE7+HNsbO+dQJP2umEe8vUO34fg@mail.gmail.com>

On Fri, Jun 19, 2015 at 07:14:15PM +0300, Vladimir Medvedkin wrote:
> Hi Bruce,
> 
> 2015-06-19 18:59 GMT+03:00 Richardson, Bruce <bruce.richardson@intel.com>:
> 
> >
> >
> > > -----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.
> 

I'm still not convined of the need for them in this file. If they are to be
kept though, they should instead have "LEN" in the name to indicate that they
are the lengths of the different keys. You could also make this clearer by
changing the L4 values to be computed using "sizeof()" given that the appropriate
tuple structures are present later in the header file to allow the sizes to be
correctly calculated.

/Bruce

  reply	other threads:[~2015-06-29 12:18 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 19:06 [dpdk-dev] [PATCH] Add toeplitz hash algorithm Vladimir Medvedkin
2015-04-08 22:24 ` Stephen Hemminger
2015-04-09 12:50   ` Vladimir Medvedkin
2015-04-09  6:37 ` Gleb Natapov
2015-04-09 12:57   ` Vladimir Medvedkin
2015-05-05 13:20 ` [dpdk-dev] [PATCH v2] Add toeplitz hash algorithm used by RSS Vladimir Medvedkin
2015-05-05 16:03   ` Chilikin, Andrey
2015-05-07 10:28     ` Vladimir Medvedkin
2015-05-07 11:38       ` Chilikin, Andrey
2015-05-08 14:58         ` Vladimir Medvedkin
2015-05-08 14:58   ` Vladimir Medvedkin
2015-06-03 14:07     ` Thomas Monjalon
2015-06-16  9:07       ` Thomas Monjalon
2015-06-16 10:36         ` Bruce Richardson
2015-06-16 12:29     ` Bruce Richardson
2015-06-16 19:26       ` Vladimir Medvedkin
2015-06-19 14:55     ` [dpdk-dev] [PATCH v4] " Vladimir Medvedkin
2015-06-19 15:59       ` Richardson, Bruce
2015-06-19 16:14         ` Vladimir Medvedkin
2015-06-29 12:18           ` Bruce Richardson [this message]
2015-06-19 16:33         ` Mcnamara, John
2015-06-19 17:31       ` [dpdk-dev] [PATCH v5] " Vladimir Medvedkin
2015-06-29 12:40         ` Bruce Richardson
2015-06-30 12:14           ` Vladimir Medvedkin
2015-06-30 12:48             ` Bruce Richardson
2015-06-30 23:40         ` [dpdk-dev] [PATCH v6] " Vladimir Medvedkin
2015-07-01 15:29           ` Bruce Richardson
2015-07-01 21:23             ` Thomas Monjalon
2015-07-22  7:55           ` Tony Lu
2015-07-27 11:57             ` Vladimir Medvedkin
2015-07-29  5:01               ` Qiu, Michael
2015-07-29 14:00                 ` Vladimir Medvedkin
2015-06-19 17:32       ` [dpdk-dev] [PATCH v3] Add unit test for thash library Vladimir Medvedkin
2015-06-29 12:42         ` Bruce Richardson
2015-06-30 23:41         ` [dpdk-dev] [PATCH v4] " Vladimir Medvedkin
2015-07-01 15:30           ` Bruce Richardson
2015-07-01 21:28             ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150629121840.GC10380@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=medvedkinv@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).