Skip to contentSkip to conversation

app/testpmd: fix DCB configuration

PATCH Superseded Jie Wang 3 participants 6 messages Nov 9, 2021 – Nov 15, 2021

lore
Share & tools
lore

Jie Wang

author
#0 lore raw

PATCH 1/1 app/testpmd: fix DCB configuration

When set port DCB mode enabled, it should remove RSS HASH offload before reconfiguring the device.

Because port multi-queue mode is changed from RSS to DCB.

Fixes 2a977b891f99 ("app/testpmd: fix DCB configuration")
---
 app/test-pmd/testpmd.c | 1 +
 1 file changed, 1 insertion(+)
app/test-pmd/testpmd.c +1 -0
index a66dfb297c..9e8cf45dea 100644
@@ -3948,6 +3948,7 @@ 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;
 
 	/* re-configure the device . */
 	retval = rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf);
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH v2 1/1 app/testpmd: fix DCB configuration

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")

---
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(+)
app/test-pmd/testpmd.c +3 -0
index a66dfb297c..661be341a0 100644
@@ -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);
Signature · 1 line
2.25.1
#2 lore raw
Quoted 21 lines · Jie Wang

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")

---
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(+)
app/test-pmd/testpmd.c +0 -0
index a66dfb297c..661be341a0 100644

app/test-pmd/testpmd.c init_port_dcb_config(portid_t pid, · line 3953

Quoted 6 lines
app/test-pmd/testpmd.c +3 -0
@@ -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".

Quoted 3 lines
app/test-pmd/testpmd.c +0 -0
  	/* re-configure the device . */
  	retval = rte_eth_dev_configure(pid, nb_rxq, nb_rxq, &port_conf);
author
#3 lore raw

PATCH v3 1/1 app/testpmd: fix DCB in VT configuration

In reply to Jie Wang

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")

---
v3:
* update commit log.
* remove RSS HASh offload from DCB in VT.
v2:
* update commit log.
* remove RSS HASH offload from port->rx_conf[i].offloads.

---
 app/test-pmd/testpmd.c | 7 +++++++
 1 file changed, 7 insertions(+)
app/test-pmd/testpmd.c +7 -0
index a66dfb297c..c18942279a 100644
@@ -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);
Signature · 1 line
2.25.1
Acked-by on v3 1/1
#4 lore raw

Re: [PATCH v3] app/testpmd: fix DCB in VT configuration

Quoted 8 lines · Jie Wang

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")
Quoted 29 lines

---
v3:
* update commit log.
* remove RSS HASh offload from DCB in VT.
v2:
* update commit log.
* remove RSS HASH offload from port->rx_conf[i].offloads.

---
  app/test-pmd/testpmd.c | 7 +++++++
  1 file changed, 7 insertions(+)
app/test-pmd/testpmd.c +7 -0
index a66dfb297c..c18942279a 100644
@@ -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);
Applied
#5 lore raw

Re: [PATCH v3] app/testpmd: fix DCB in VT configuration

Quoted 5 lines · Aman Deep
Quoted 3 lines · Jie Wang

When set port DCB in VT mode enabled, it should remove RSS HASH offload before reconfiguring the device and queues.

Quoted 8 lines
Quoted 5 lines

Because port multi-queue mode is changed from RSS to DCB in VT.

Fixes 2a977b891f99 ("app/testpmd: fix DCB configuration")

Applied to dpdk-next-net/main, thanks.