[dpdk-dev] 答复: [PATCH] Add user defined tag calculation callback tolibrte_distributor.
jigsaw at gmail.com
Thu Nov 6 13:36:09 CET 2014
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.
发件人: "Thomas Monjalon" <thomas.monjalon at 6wind.com>
发送时间: 2014/11/6 12:36
收件人: "Bruce Richardson" <bruce.richardson at intel.com>
抄送: "dev at dpdk.org" <dev at dpdk.org>; "jigsaw" <jigsaw at 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.
More information about the dev