[dpdk-dev] [PATCH v12 2/2] app/testpmd: fix testpmd doesn't show RSS hash offload

Ferruh Yigit ferruh.yigit at intel.com
Wed Oct 13 12:14:34 CEST 2021


On 10/13/2021 9:50 AM, Ferruh Yigit wrote:
> On 10/13/2021 3:42 AM, Wang, Jie1X wrote:
>>
>>
>>> -----Original Message-----
>>> From: Yigit, Ferruh <ferruh.yigit at intel.com>
>>> Sent: Tuesday, October 12, 2021 10:38 PM
>>> To: Wang, Jie1X <jie1x.wang at intel.com>; dev at dpdk.org
>>> Cc: thomas at monjalon.net; andrew.rybchenko at oktetlabs.ru; Li, Xiaoyun
>>> <xiaoyun.li at intel.com>; Yang, SteveX <stevex.yang at intel.com>
>>> Subject: Re: [PATCH v12 2/2] app/testpmd: fix testpmd doesn't show RSS hash
>>> offload
>>>
>>> On 10/12/2021 3:54 AM, Jie Wang wrote:
>>>> The driver may change offloads info into dev->data->dev_conf in
>>>> dev_configure which may cause port->dev_conf and port->rx_conf contain
>>>> outdated values.
>>>>
>>>> This patch updates the offloads info if it changes to fix this issue.
>>>>
>>>> Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
>>>>
>>>> Signed-off-by: Jie Wang <jie1x.wang at intel.com>
>>>
>>> Hi Jie,
>>>
>>> ci/intel-Testing is still reporting some errors [1] with this patch, did you able to
>>> investigate the reason of it?
>>>
>>> This error seems not seen in other patches, so that shouldn't be an infrastructure
>>> problem.
>>>
>>>
>>> [1]
>>> http://mails.dpdk.org/archives/test-report/2021-October/226766.html
>>
>> Hi Ferruh,
>>
>> When the dpdk runs the test_pf_tx_rx_queue test case, the port will be configured with rxq/txq to 1. This will cause the test to fail.
>>
>> In rte_eth_dev_configure, if rxq/txq is 1, dev_conf->rxmode.mq_mode is ETH_MQ_RX_NONE, and  dev_conf->rxmode.offloads contains the DEV_RX_OFFLOAD_RSS_HASH value by default, which causes the program to report an error " Ethdev port_id=0 config invalid Rx mq_mode without RSS but RSS_HASH offload is requested".
>>
>> When the port needs to configure txq/txq to 1, first clear the RSS_HASH configuration of dev_conf->rxmode.offloads.
>>
>> And I have talked about this error with the tester a few days ago, and they will modify the test case. They will add a command (port config port_id rx_offload rss_hash off) before configuring txq/rxq to 1.
>>
> 
> I see, but shouldn't this fail for all patches, why it is only failing
> for this set?

Got it now, in first config some PMDs force enables RSS_HASH, when testpmd disables
the RSS later, the existing RSS_HASH request cause failure in ethdev layer.

What about disable the RSS_HASH in application level, when RSS is disables, something
like following:

  diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
  index a7841c557f99..5f6daac8a616 100644
  --- a/app/test-pmd/testpmd.c
  +++ b/app/test-pmd/testpmd.c
  @@ -3601,12 +3601,15 @@ init_port_config(void)
                  }
   
                  if (port->dcb_flag == 0) {
  -                       if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0)
  +                       if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) {
                                 port->dev_conf.rxmode.mq_mode =
                                          (enum rte_eth_rx_mq_mode)
                                                  (rx_mq_mode & ETH_MQ_RX_RSS);
  -                       else
  +                       } else {
                                  port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE;
  +                               port->dev_conf.rxmode.offloads &=
  +                                       ~DEV_RX_OFFLOAD_RSS_HASH;
  +                       }
                  }
   
                  rxtx_port_config(port);


More information about the dev mailing list