]> git.droids-corp.org - dpdk.git/commitdiff
app/testpmd: fix DCB in VT configuration
authorJie Wang <jie1x.wang@intel.com>
Mon, 15 Nov 2021 03:29:58 +0000 (11:29 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 15 Nov 2021 16:22:01 +0000 (17:22 +0100)
When set port DCB in VT 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 in VT.

Fixes: 2a977b891f99 ("app/testpmd: fix DCB configuration")
Cc: stable@dpdk.org
Signed-off-by: Jie Wang <jie1x.wang@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
app/test-pmd/testpmd.c

index a66dfb297c6533dfbb022661e640fecc687aeaba..c18942279af374d39d5e50fdee58d509315dae9c 100644 (file)
@@ -3948,6 +3948,13 @@ init_port_dcb_config(portid_t pid,
        if (retval < 0)
                return retval;
        port_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_VLAN_FILTER;
+       /* remove RSS HASH offload for DCB in vt mode */
+       if (port_conf.rxmode.mq_mode == RTE_ETH_MQ_RX_VMDQ_DCB) {
+               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);