DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Qi Zhang <qi.z.zhang@intel.com>,
	thomas@monjalon.net,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	Xueming Li <xuemingl@mellanox.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix testpmd failure due to RSS offload check
Date: Tue, 24 Apr 2018 17:13:46 +0100	[thread overview]
Message-ID: <7a30060c-ff3a-da0e-bbc2-11819dddec0a@intel.com> (raw)
In-Reply-To: <21872768-08ca-852d-7c13-0f596d92dc5e@intel.com>

On 4/24/2018 3:39 PM, Ferruh Yigit wrote:
> On 4/24/2018 3:18 PM, Qi Zhang wrote:
>> After add RSS hash offload check, default rss_hf will fail on
>> devices that not support all bits, the patch take rss_hf as
>> a suggest value and only set bits that device supported base on
>> rte_eth_dev_get_info.
>>
>> Fixes: 527624c663f8 ("ethdev: add supported hash function check")
>> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
>> ---
>>  app/test-pmd/testpmd.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
>> index d6da41927..af3fc5388 100644
>> --- a/app/test-pmd/testpmd.c
>> +++ b/app/test-pmd/testpmd.c
>> @@ -2265,13 +2265,16 @@ init_port_config(void)
>>  {
>>  	portid_t pid;
>>  	struct rte_port *port;
>> +	struct rte_eth_dev_info dev_info;
>>  
>>  	RTE_ETH_FOREACH_DEV(pid) {
>>  		port = &ports[pid];
>>  		port->dev_conf.fdir_conf = fdir_conf;
>>  		if (nb_rxq > 1) {
>> +			rte_eth_dev_info_get(pid, &dev_info);
>>  			port->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL;
>> -			port->dev_conf.rx_adv_conf.rss_conf.rss_hf = rss_hf;
>> +			port->dev_conf.rx_adv_conf.rss_conf.rss_hf =
>> +				rss_hf & dev_info.flow_type_rss_offloads;
> 
> "rss_hf" is a global variable, not per port. Adrien's patch [1] made that it has
> been updated by "port config all rss ..." command, so that value can change.
> 
> Also Xueming's patch did it will set "0" if "default" parameter used [2], like
> "port config all rss default"
> 
> So not sure if rss_hf is reliable at this point.
> 
> What do you think using dev_info.flow_type_rss_offloads directly?

Prevent updating rss_hf in "port config all rss default" and this patch together
lgtm.

> 
> 
> [1] 75d5493eb302 ("app/testpmd: fix RSS flow action configuration")
> 
> [2] 8c1f4aff92a6 ("app/testpmd: new parameter for port config all RSS command")
> 
>>  		} else {
>>  			port->dev_conf.rx_adv_conf.rss_conf.rss_key = NULL;
>>  			port->dev_conf.rx_adv_conf.rss_conf.rss_hf = 0;
>>
> 

  reply	other threads:[~2018-04-24 16:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24 14:18 Qi Zhang
2018-04-24 14:39 ` Ferruh Yigit
2018-04-24 16:13   ` Ferruh Yigit [this message]
2018-04-24 18:45     ` Adrien Mazarguil
2018-04-25  1:49 Qi Zhang

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=7a30060c-ff3a-da0e-bbc2-11819dddec0a@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=thomas@monjalon.net \
    --cc=xuemingl@mellanox.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).