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

Message ID 20211115032958.2535862-1-jie1x.wang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [v3] app/testpmd: fix DCB in VT configuration |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot: build success github build: passed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Jie Wang Nov. 15, 2021, 3:29 a.m. UTC
  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")

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
---
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(+)
  

Comments

Singh, Aman Deep Nov. 15, 2021, 12:46 p.m. UTC | #1
On 11/15/2021 8:59 AM, Jie Wang wrote:
> 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")
>
> Signed-off-by: Jie Wang<jie1x.wang@intel.com>

Acked-by: Aman Deep Singh <aman.deep.singh@intel.com>

> ---
> 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(+)
>
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
> index a66dfb297c..c18942279a 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -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);
  
Ferruh Yigit Nov. 15, 2021, 4:23 p.m. UTC | #2
On 11/15/2021 12:46 PM, Singh, Aman Deep wrote:
> 
> On 11/15/2021 8:59 AM, Jie Wang wrote:
>> 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")
>>
>> Signed-off-by: Jie Wang<jie1x.wang@intel.com>
> 
> Acked-by: Aman Deep Singh <aman.deep.singh@intel.com>
> 

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

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index a66dfb297c..c18942279a 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -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);