[dpdk-dev] [RFC 1/4] ethdev: support rss level on tunnel

Nelio Laranjeiro nelio.laranjeiro at 6wind.com
Thu Nov 30 11:14:55 CET 2017


On Thu, Nov 30, 2017 at 08:46:51AM +0000, Xueming(Steven) Li wrote:
> Thanks for feedback, comments inline:
> 
> > -----Original Message-----
> > From: Nelio Laranjeiro [mailto:nelio.laranjeiro at 6wind.com]
> > Sent: Thursday, November 30, 2017 4:16 PM
> > To: Xueming(Steven) Li <xuemingl at mellanox.com>
> > Cc: Adrien Mazarguil <adrien.mazarguil at 6wind.com>; Thomas Monjalon
> > <thomas at monjalon.net>; dev at dpdk.org
> > Subject: Re: [RFC 1/4] ethdev: support rss level on tunnel
> > 
> > Hi Xueming, please see the comments below,
> > 
> > On Thu, Nov 30, 2017 at 01:31:03AM +0800, Xueming Li wrote:
> > > There was no RSS hash fields level definition on tunnel,
> > > implementations default RSS on tunnel to outer or inner. Adding rss
> > > level enable users to specifiy the tunnel level of RSS hash fields.
> > >
> > > 0:  outer most,
> > > 1:  inner,
> > > -1: inner most(PMD auto detection if nested tunnel specified in
> > > fields)
> > 
> > This *inner most* is confusing, what does it mean for the following
> > pattern vxlan / end?
> > This pattern is valid for any level of the VXLAN according to the NIC
> > capability.  With an inner most, if the PMD support 4 levels of tunnels it
> > will need to create the 4 rules to match the user request.
> > Is this what you expect by this definition?
> Yes, auto detection according to tunnel spec. Users could always specify a 
> concrete value, 4 for this example.

Such value must be used with care to avoid colliding rules, you should
document it.

> > 
> > There is also another question, according to the possible values (0, 1, -
> > 1), it cannot handle more than 1 level explicitly, why such limitation?
> They are just typical values, any value between 0-255 is acceptable.

Not really, according to your answer 255 is reserved for a special
definition i.e. ìnner most.  It does not mean make RSS on the 254th
tunnel.

Please update the documentation of such value with the correct possible
values and create a define for the *special* case, people implementing
such API needs to have a clear explanation on what it does.

> > > Signed-off-by: Xueming Li <xuemingl at mellanox.com>
> > > ---
> > >  lib/librte_ether/rte_flow.h | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
> > > index 47c88ea..c35558c 100644
> > > --- a/lib/librte_ether/rte_flow.h
> > > +++ b/lib/librte_ether/rte_flow.h
> > > @@ -1078,6 +1078,7 @@ struct rte_flow_action_dup {
> > >   */
> > >  struct rte_flow_action_rss {
> > >  	const struct rte_eth_rss_conf *rss_conf; /**< RSS parameters. */
> > > +	uint8_t level; /**< RSS on tunnel level, 0:outer most, -1:inner most
> > > +*/
> > >  	uint16_t num; /**< Number of entries in queue[]. */
> > >  	uint16_t queue[]; /**< Queues indices to use. */  };
> > > --
> > > 1.8.3.1
> > >
> > 
> > Thanks,
> > 
> > --
> > Nélio Laranjeiro
> > 6WIND

-- 
Nélio Laranjeiro
6WIND


More information about the dev mailing list