DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qinglai Xiao <jigsaw@gmail.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>,
	 Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] 答复:  [PATCH] Add user defined tag calculation callback tolibrte_distributor.
Date: Thu, 6 Nov 2014 14:36:09 +0200	[thread overview]
Message-ID: <545b6b74.a96db40a.26af.ffffe7fb@mx.google.com> (raw)
In-Reply-To: <9190772.1rnKUO3oNV@xps13>

Hi Bruce,

There is a subtle case in which tag values are 2 and 3, respectively. Then these two tags cannot be distinguished. There should be a better way so as to handle this situation.

thx &
rgds
-qinglai

-----原始邮件-----
发件人: "Thomas Monjalon" <thomas.monjalon@6wind.com>
发送时间: ‎2014/‎11/‎6 12:36
收件人: "Bruce Richardson" <bruce.richardson@intel.com>
抄送: "dev@dpdk.org" <dev@dpdk.org>; "jigsaw" <jigsaw@gmail.com>
主题: Re: [dpdk-dev] [PATCH] Add user defined tag calculation callback tolibrte_distributor.

2014-11-06 09:22, Bruce Richardson:
> On Wed, Nov 05, 2014 at 07:24:13PM +0200, jigsaw wrote:
> > http://dpdk.org/browse/dpdk/tree/lib/librte_distributor/rte_distributor.c#n285
> > 
> >         new_tag = (next_mb->hash.rss | 1);
> > 
> > Why the logical OR is needed?
> 
> That's needed to ensure that we never track a tag with an actual value of zero.
> We instead always force the low bit to be 1, so that we can use zero as an
> "empty" value.

Bruce, could you check how this code may be better commented please?
This discussion shows that the distributor library probably needs more
explanations in the code or doxygen.

Thanks
-- 
Thomas

  reply	other threads:[~2014-11-06 12:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 13:30 [dpdk-dev] [PATCH] Add user defined tag calculation callback to librte_distributor Qinglai Xiao
2014-11-05 14:27 ` Bruce Richardson
2014-11-05 15:11   ` jigsaw
2014-11-05 16:36     ` Bruce Richardson
2014-11-05 17:24       ` jigsaw
2014-11-06  9:22         ` Bruce Richardson
2014-11-06 10:14           ` jigsaw
2014-11-06 10:36           ` Thomas Monjalon
2014-11-06 12:36             ` Qinglai Xiao [this message]
2014-11-06 13:59               ` [dpdk-dev] 答复: [PATCH] Add user defined tag calculation callback tolibrte_distributor Bruce Richardson
2014-11-06 18:01                 ` jigsaw
2014-11-06 19:52                   ` jigsaw
2014-11-07  9:45                     ` Bruce Richardson
2014-11-07 12:38                       ` jigsaw
2014-11-07 13:53                         ` Bruce Richardson
2014-11-07 14:31                           ` jigsaw
     [not found]                             ` <20141107144410.GC12092@bricha3-MOBL3>
2014-11-07 14:52                               ` jigsaw
2014-11-07 15:04                                 ` Bruce Richardson
2014-11-07 15:18                                   ` jigsaw
2014-11-06 13:55             ` [dpdk-dev] [PATCH] distributor: add comments to make code more readable Bruce Richardson
2014-11-07 14:08               ` Thomas Monjalon
2014-11-07 14:31                 ` jigsaw
2014-11-06 13:57             ` [dpdk-dev] [PATCH] Add user defined tag calculation callback to librte_distributor Bruce Richardson
2014-11-05 15:13   ` Ananyev, Konstantin
2014-11-05 15:24     ` jigsaw

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=545b6b74.a96db40a.26af.ffffe7fb@mx.google.com \
    --to=jigsaw@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.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).