[dpdk-dev] [PATCH] net/fm10k: fix RSS hash config

Wang, Xiao W xiao.w.wang at intel.com
Thu Jul 21 11:35:39 CEST 2016


Hi Mark,

> -----Original Message-----
> From: Chen, Jing D
> Sent: Thursday, July 21, 2016 4:48 PM
> To: Wang, Xiao W <xiao.w.wang at intel.com>; dev at dpdk.org
> Cc: Lin, Xueqin <xueqin.lin at intel.com>
> Subject: RE: [PATCH] net/fm10k: fix RSS hash config
> 
> Hi,
> 
> > diff --git a/drivers/net/fm10k/fm10k_ethdev.c
> > b/drivers/net/fm10k/fm10k_ethdev.c
> > index 144b2de..01f4a72 100644
> > --- a/drivers/net/fm10k/fm10k_ethdev.c
> > +++ b/drivers/net/fm10k/fm10k_ethdev.c
> > @@ -2159,8 +2159,8 @@ fm10k_rss_hash_update(struct rte_eth_dev *dev,
> >
> >  	PMD_INIT_FUNC_TRACE();
> >
> > -	if (rss_conf->rss_key_len < FM10K_RSSRK_SIZE *
> > -		FM10K_RSSRK_ENTRIES_PER_REG)
> > +	if (key && (rss_conf->rss_key_len < FM10K_RSSRK_SIZE *
> > +				FM10K_RSSRK_ENTRIES_PER_REG))
> >  		return -EINVAL;
> >
> >  	if (hf == 0)
> 
> It's also possible that app wants to update rss key and not expect to update hash
> function.
> Is that indicate we shouldn't return error in case hf == 0?
> 

If the app just wants to update RSS key, it needs to read out the RSS config first, then
change only the key field. This is what testpmd does for this operation.

hf == 0 will disable RSS feature, I think we should return error to protect multi-queue.

Best Regards,
Xiao


More information about the dev mailing list