app/testpmd: fix set Rx offloads RSS hash off
PATCH 1/1 app/testpmd: fix set Rx offloads RSS hash off
When we set Rx offloads RSS hash off in cmdline, then we start port, if dev->data->dev_conf.rxmode.mq_mode RSS enable(multiple queues mode), it will load RSS hash in driver and sync to port.
After setting Rx offloads RSS hash off, this patch removes RTE_ETH_MQ_RX_RSS in port->dev_conf.rxmode.mq_mode to fix this issue.
--- app/test-pmd/cmdline.c | 3 +++ 1 file changed, 3 insertions(+)
app/test-pmd/cmdline.c +3 -0
@@ -16180,6 +16180,9 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result, port->dev_conf.rxmode.offloads &= ~single_offload;for (q =0 ; q < nb_rx_queues; q++) port->rx_conf[q].offloads &= ~single_offload; + +if (single_offload &0x80000 ) + port->dev_conf.rxmode.mq_mode &= ~RTE_ETH_MQ_RX_RSS ; }cmd_reconfig_device_queue (port_id,1 ,1 );
Signature · 1 line
2.25.1
PATCH v2 1/1 app/testpmd: fix set Rx offloads RSS hash off
When we set Rx offloads RSS hash off in cmdline, then we start port, if dev->data->dev_conf.rxmode.mq_mode RSS enable(multiple queues mode), it will load RSS hash in driver and sync to port.
After setting Rx offloads RSS hash off, this patch removes RTE_ETH_MQ_RX_RSS in port->dev_conf.rxmode.mq_mode to fix this issue.
And after setting Rx offloads RSS hash on, this patch also adds RTE_ETH_MQ_RX_RSS in port->dev_conf.rxmode.mq_mode.
--- app/test-pmd/cmdline.c | 6 ++++++ 1 file changed, 6 insertions(+)
app/test-pmd/cmdline.c +6 -0
@@ -16176,10 +16176,16 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result, port->dev_conf.rxmode.offloads |= single_offload;for (q =0 ; q < nb_rx_queues; q++) port->rx_conf[q].offloads |= single_offload; + +if (single_offload &0x80000 ) + port->dev_conf.rxmode.mq_mode |=RTE_ETH_MQ_RX_RSS ; }else { port->dev_conf.rxmode.offloads &= ~single_offload;for (q =0 ; q < nb_rx_queues; q++) port->rx_conf[q].offloads &= ~single_offload; + +if (single_offload &0x80000 ) + port->dev_conf.rxmode.mq_mode &= ~RTE_ETH_MQ_RX_RSS ; }cmd_reconfig_device_queue (port_id,1 ,1 );
Signature · 1 line
2.25.1
Quoted 22 lines · Jie Wang
When we set Rx offloads RSS hash off in cmdline, then we start port, if
dev->data->dev_conf.rxmode.mq_modeRSS enable(multiple queues mode), it will load RSS hash in driver and sync to port.After setting Rx offloads RSS hash off, this patch removes
RTE_ETH_MQ_RX_RSSinport->dev_conf.rxmode.mq_modeto fix this issue.And after setting Rx offloads RSS hash on, this patch also adds
RTE_ETH_MQ_RX_RSSinport->dev_conf.rxmode.mq_mode.Fixes c73a9071877a ("app/testpmd: add commands to test new offload API")Signed-off-by Jie Wang <[email protected]>--- app/test-pmd/cmdline.c | 6 ++++++ 1 file changed, 6 insertions(+)app/test-pmd/cmdline.c +0
-0
app/test-pmd/cmdline.c cmd_config_per_port_rx_offload_parsed(void *parsed_result, · line 16180
Quoted 5 lines
app/test-pmd/cmdline.c +2
-0@@ -16176,10 +16176,16 @@ cmd_config_per_port_rx_offload_parsed(void *parsed_result, port->dev_conf.rxmode.offloads |= single_offload;for (q =0 ; q < nb_rx_queues; q++) port->rx_conf[q].offloads |= single_offload; + +if (single_offload &0x80000 )
I don't why you used immediate value, but you mean 'RTE_ETH_RX_OFFLOAD_RSS_HASH' here.
app/test-pmd/cmdline.c cmd_config_per_port_rx_offload_parsed(void *parsed_result, · line 16181
Quoted 1 line
app/test-pmd/cmdline.c +1
-0+ port->dev_conf.rxmode.mq_mode |=RTE_ETH_MQ_RX_RSS ;
Why enabling RSS when 'RSS HASH' offload is enabled? In this case if RSS is disabled I think it should fail.
Can you please describe again what problem you are solving?
Quoted 11 lines
app/test-pmd/cmdline.c +3
-0}else { port->dev_conf.rxmode.offloads &= ~single_offload;for (q =0 ; q < nb_rx_queues; q++) port->rx_conf[q].offloads &= ~single_offload; + +if (single_offload &0x80000 ) + port->dev_conf.rxmode.mq_mode &= ~RTE_ETH_MQ_RX_RSS ; }cmd_reconfig_device_queue (port_id,1 ,1 );
Quoted 36 lines
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Saturday, November 6, 2021 12:24 AM
To: Wang, Jie1X <[email protected]>; [email protected]
Cc: Zhang, Yuying <[email protected]>; Li, Xiaoyun <[email protected]>; Yang, SteveX <[email protected]>; Guo, Junfeng <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix set Rx offloads RSS hash offapp/test-pmd/cmdline.c cmd_config_per_port_rx_offload_parsed(void
Quoted 23 lines · Jie Wang
When we set Rx offloads RSS hash off in cmdline, then we start port, if
dev->data->dev_conf.rxmode.mq_modeRSS enable(multiple queues mode), it will load RSS hash in driver and sync to port.After setting Rx offloads RSS hash off, this patch removes
RTE_ETH_MQ_RX_RSSinport->dev_conf.rxmode.mq_modeto fix this issue.And after setting Rx offloads RSS hash on, this patch also adds
RTE_ETH_MQ_RX_RSSinport->dev_conf.rxmode.mq_mode.Fixes c73a9071877a ("app/testpmd: add commands to test new offloadAPI")
Signed-off-by Jie Wang <[email protected]>--- app/test-pmd/cmdline.c | 6 ++++++ 1 file changed, 6 insertions(+)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
d08a1c9777..f8277e4443100644app/test-pmd/cmdline.c +0
-0@@ -16176,10 +16176,16 @@ cmd_config_per_port_rx_offload_parsed(void
*parsed_result,
Quoted 9 lines
app/test-pmd/cmdline.c cmd_config_per_port_rx_offload_parsed(void *parsed_result, · line 16180
Quoted 5 lines
app/test-pmd/cmdline.c +2
-0port->dev_conf.rxmode.offloads |= single_offload;for (q =0 ; q < nb_rx_queues; q++) port->rx_conf[q].offloads |= single_offload; + +if (single_offload &0x80000 )I don't why you used immediate value, but you mean '
RTE_ETH_RX_OFFLOAD_RSS_HASH' here.
I will update it in next version.
Quoted 8 lines
app/test-pmd/cmdline.c cmd_config_per_port_rx_offload_parsed(void · line 16181
Quoted 1 line
app/test-pmd/cmdline.c +1
-0+ port->dev_conf.rxmode.mq_mode |=
RTE_ETH_MQ_RX_RSS;Why enabling RSS when 'RSS HASH' offload is enabled? In this case if RSS is disabled I think it should fail.
Can you please describe again what problem you are solving?
If 'RSS HASH' offload is disabled in the first, the mq_mode RSS is disabled. Then 'RSS HASH' offload is enabled in the second, so that we should enable RSS here.
Quoted 8 lines
app/test-pmd/cmdline.c cmd_config_per_port_rx_offload_parsed(void *parsed_result,
Quoted 7 lines
app/test-pmd/cmdline.c +3
-0}else { port->dev_conf.rxmode.offloads &= ~single_offload;for (q =0 ; q < nb_rx_queues; q++) port->rx_conf[q].offloads &= ~single_offload; + +if (single_offload &0x80000 ) + port->dev_conf.rxmode.mq_mode &=~RTE_ETH_MQ_RX_RSS;
When 'RSS HASH' offload is disabled, that mq_mode RSS should be disabled too. So that it will not enable 'RSS HASH' offload in driver.
Quoted 4 lines
Quoted 4 lines
app/test-pmd/cmdline.c +0
-0}cmd_reconfig_device_queue (port_id,1 ,1 );
Quoted 69 lines · On 11/8/2021 7:24 AM, Wang, Jie1X wrote:
Quoted 36 lines
-----Original Message-----
From: Yigit, Ferruh <[email protected]>
Sent: Saturday, November 6, 2021 12:24 AM
To: Wang, Jie1X <[email protected]>; [email protected]
Cc: Zhang, Yuying <[email protected]>; Li, Xiaoyun <[email protected]>; Yang, SteveX <[email protected]>; Guo, Junfeng <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix set Rx offloads RSS hash offapp/test-pmd/cmdline.c cmd_config_per_port_rx_offload_parsed(void
Quoted 23 lines · Jie Wang
When we set Rx offloads RSS hash off in cmdline, then we start port, if
dev->data->dev_conf.rxmode.mq_modeRSS enable(multiple queues mode), it will load RSS hash in driver and sync to port.After setting Rx offloads RSS hash off, this patch removes
RTE_ETH_MQ_RX_RSSinport->dev_conf.rxmode.mq_modeto fix this issue.And after setting Rx offloads RSS hash on, this patch also adds
RTE_ETH_MQ_RX_RSSinport->dev_conf.rxmode.mq_mode.Fixes c73a9071877a ("app/testpmd: add commands to test new offloadAPI")
Signed-off-by Jie Wang <[email protected]>--- app/test-pmd/cmdline.c | 6 ++++++ 1 file changed, 6 insertions(+)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
d08a1c9777..f8277e4443100644app/test-pmd/cmdline.c +0
-0@@ -16176,10 +16176,16 @@ cmd_config_per_port_rx_offload_parsed(void
*parsed_result,Quoted 9 lines
app/test-pmd/cmdline.c cmd_config_per_port_rx_offload_parsed(void *parsed_result, · line 16180
Quoted 5 lines
app/test-pmd/cmdline.c +2
-0port->dev_conf.rxmode.offloads |= single_offload;for (q =0 ; q < nb_rx_queues; q++) port->rx_conf[q].offloads |= single_offload; + +if (single_offload &0x80000 )I don't why you used immediate value, but you mean '
RTE_ETH_RX_OFFLOAD_RSS_HASH' here.I will update it in next version.
Quoted 8 lines
app/test-pmd/cmdline.c cmd_config_per_port_rx_offload_parsed(void · line 16181
Quoted 1 line
app/test-pmd/cmdline.c +1
-0+ port->dev_conf.rxmode.mq_mode |=
RTE_ETH_MQ_RX_RSS;Why enabling RSS when 'RSS HASH' offload is enabled? In this case if RSS is disabled I think it should fail.
Can you please describe again what problem you are solving?
If 'RSS HASH' offload is disabled in the first, the
mq_modeRSS is disabled. Then 'RSS HASH' offload is enabled in the second, so that we should enable RSS here.Quoted 8 lines
app/test-pmd/cmdline.c cmd_config_per_port_rx_offload_parsed(void *parsed_result,
Quoted 7 lines
app/test-pmd/cmdline.c +3
-0}else { port->dev_conf.rxmode.offloads &= ~single_offload;for (q =0 ; q < nb_rx_queues; q++) port->rx_conf[q].offloads &= ~single_offload; + +if (single_offload &0x80000 ) + port->dev_conf.rxmode.mq_mode &=~RTE_ETH_MQ_RX_RSS;
Quoted 2 lines
When 'RSS HASH' offload is disabled, that
mq_modeRSS should be disabled too. So that it will not enable 'RSS HASH' offload in driver.
I am not clear with this statement.
"RSS HASH" can be disabled without disabling 'RSS', indeed that is the reason to have this offload.
And most of the Intel NICs don't support disabling "RSS HASH" anyway.
Again, can you please clarify the real problem you are solving?