[v2] app/testpmd: fix DCB configuration
Checks
Commit Message
When set port DCB mode enabled, it should remove RSS HASH offload
before reconfiguring the device and queues.
Because port multi-queue mode is changed from RSS to DCB.
Fixes: 2a977b891f99 ("app/testpmd: fix DCB configuration")
Signed-off-by: Jie Wang <jie1x.wang@intel.com>
---
v2:
* update commit log.
* remove RSS HASH offload from port->rx_conf[i].offloads.
---
app/test-pmd/testpmd.c | 3 +++
1 file changed, 3 insertions(+)
Comments
On 11/10/2021 2:38 PM, Jie Wang wrote:
> When set port DCB mode enabled, it should remove RSS HASH offload
> before reconfiguring the device and queues.
>
> Because port multi-queue mode is changed from RSS to DCB.
>
> Fixes: 2a977b891f99 ("app/testpmd: fix DCB configuration")
>
> Signed-off-by: Jie Wang <jie1x.wang@intel.com>
> ---
> v2:
> * update commit log.
> * remove RSS HASH offload from port->rx_conf[i].offloads.
> ---
> app/test-pmd/testpmd.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index a66dfb297c..661be341a0 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -3948,6 +3948,9 @@ init_port_dcb_config(portid_t pid,
> if (retval < 0)
> return retval;
> port_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_VLAN_FILTER;
> + port_conf.rxmode.offloads &= ~RTE_ETH_RX_OFFLOAD_RSS_HASH;
> + for (i = 0; i < nb_rxq; i++)
> + rte_port->rx_conf[i].offloads &= ~RTE_ETH_RX_OFFLOAD_RSS_HASH;
I think this change will effect DCB_ENABLED case also ( without VT). In
that case RSS offload is allowed.
Please check with configuration "port config 0 dcb vt off 4 pfc off".
>
> /* re-configure the device . */
> retval = rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf);
@@ -3948,6 +3948,9 @@ init_port_dcb_config(portid_t pid,
if (retval < 0)
return retval;
port_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_VLAN_FILTER;
+ port_conf.rxmode.offloads &= ~RTE_ETH_RX_OFFLOAD_RSS_HASH;
+ for (i = 0; i < nb_rxq; i++)
+ rte_port->rx_conf[i].offloads &= ~RTE_ETH_RX_OFFLOAD_RSS_HASH;
/* re-configure the device . */
retval = rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf);