DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] app/testpmd: fix set Tx offload command
@ 2023-11-16 17:21 Ferruh Yigit
  2023-11-17  1:05 ` fengchengwen
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2023-11-16 17:21 UTC (permalink / raw)
  To: Aman Singh, Yuying Zhang, Chengwen Feng, Dengdui Huang, Huisong Li
  Cc: dev, Song Jiale, Zhimin Huang

In command to set Tx offload:
"port config <port_id> tx_offload <offload> on|off",

there is a defect in "on|off" comparison, so command does opposite of
what is intended. Fixed comparison.

Fixes: 6280fe565b44 ("app/testpmd: allow offload config for all ports")

Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
Cc: huangdengdui@huawei.com
Cc: lihuisong@huawei.com
Cc: Song Jiale <songx.jiale@intel.com>
Cc: Zhimin Huang <zhiminx.huang@intel.com>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index c040de7a7991..9369d3b4c526 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -11737,7 +11737,7 @@ cmd_config_per_port_tx_offload_parsed(void *parsed_result,
 	struct cmd_config_per_port_tx_offload_result *res = parsed_result;
 	bool on;
 
-	on = strcmp(res->on_off, "on");
+	on = strcmp(res->on_off, "on") == 0;
 	config_port_tx_offload(res->port_id, res->offload, on);
 }
 
-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] app/testpmd: fix set Tx offload command
  2023-11-16 17:21 [PATCH] app/testpmd: fix set Tx offload command Ferruh Yigit
@ 2023-11-17  1:05 ` fengchengwen
  2023-11-17  1:31   ` lihuisong (C)
  0 siblings, 1 reply; 4+ messages in thread
From: fengchengwen @ 2023-11-17  1:05 UTC (permalink / raw)
  To: Ferruh Yigit, Aman Singh, Yuying Zhang, Dengdui Huang, Huisong Li
  Cc: dev, Song Jiale, Zhimin Huang

Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>

On 2023/11/17 1:21, Ferruh Yigit wrote:
> In command to set Tx offload:
> "port config <port_id> tx_offload <offload> on|off",
> 
> there is a defect in "on|off" comparison, so command does opposite of
> what is intended. Fixed comparison.
> 
> Fixes: 6280fe565b44 ("app/testpmd: allow offload config for all ports")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
> ---
> Cc: huangdengdui@huawei.com
> Cc: lihuisong@huawei.com
> Cc: Song Jiale <songx.jiale@intel.com>
> Cc: Zhimin Huang <zhiminx.huang@intel.com>
> ---
>  app/test-pmd/cmdline.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index c040de7a7991..9369d3b4c526 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -11737,7 +11737,7 @@ cmd_config_per_port_tx_offload_parsed(void *parsed_result,
>  	struct cmd_config_per_port_tx_offload_result *res = parsed_result;
>  	bool on;
>  
> -	on = strcmp(res->on_off, "on");
> +	on = strcmp(res->on_off, "on") == 0;
>  	config_port_tx_offload(res->port_id, res->offload, on);
>  }
>  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] app/testpmd: fix set Tx offload command
  2023-11-17  1:05 ` fengchengwen
@ 2023-11-17  1:31   ` lihuisong (C)
  2023-11-17 10:19     ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: lihuisong (C) @ 2023-11-17  1:31 UTC (permalink / raw)
  To: fengchengwen, Ferruh Yigit, Aman Singh, Yuying Zhang, Dengdui Huang
  Cc: dev, Song Jiale, Zhimin Huang

Acked-by: Huisong Li <lihuisong@huawei.com>

在 2023/11/17 9:05, fengchengwen 写道:
> Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
>
> On 2023/11/17 1:21, Ferruh Yigit wrote:
>> In command to set Tx offload:
>> "port config <port_id> tx_offload <offload> on|off",
>>
>> there is a defect in "on|off" comparison, so command does opposite of
>> what is intended. Fixed comparison.
>>
>> Fixes: 6280fe565b44 ("app/testpmd: allow offload config for all ports")
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
>> ---
>> Cc: huangdengdui@huawei.com
>> Cc: lihuisong@huawei.com
>> Cc: Song Jiale <songx.jiale@intel.com>
>> Cc: Zhimin Huang <zhiminx.huang@intel.com>
>> ---
>>   app/test-pmd/cmdline.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
>> index c040de7a7991..9369d3b4c526 100644
>> --- a/app/test-pmd/cmdline.c
>> +++ b/app/test-pmd/cmdline.c
>> @@ -11737,7 +11737,7 @@ cmd_config_per_port_tx_offload_parsed(void *parsed_result,
>>   	struct cmd_config_per_port_tx_offload_result *res = parsed_result;
>>   	bool on;
>>   
>> -	on = strcmp(res->on_off, "on");
>> +	on = strcmp(res->on_off, "on") == 0;
>>   	config_port_tx_offload(res->port_id, res->offload, on);
>>   }
>>   
>>
> .

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] app/testpmd: fix set Tx offload command
  2023-11-17  1:31   ` lihuisong (C)
@ 2023-11-17 10:19     ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2023-11-17 10:19 UTC (permalink / raw)
  To: lihuisong (C), fengchengwen, Aman Singh, Yuying Zhang, Dengdui Huang
  Cc: dev, Song Jiale, Zhimin Huang, Xu, HailinX

On 11/17/2023 1:31 AM, lihuisong (C) wrote:

>> On 2023/11/17 1:21, Ferruh Yigit wrote:
>>> In command to set Tx offload:
>>> "port config <port_id> tx_offload <offload> on|off",
>>>
>>> there is a defect in "on|off" comparison, so command does opposite of
>>> what is intended. Fixed comparison.
>>>
>>> Fixes: 6280fe565b44 ("app/testpmd: allow offload config for all ports")
>>>
>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@amd.com>
>> 
>> Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
>> 
>
> Acked-by: Huisong Li <lihuisong@huawei.com>
>

  Bugzilla ID: 1326

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-11-17 10:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-16 17:21 [PATCH] app/testpmd: fix set Tx offload command Ferruh Yigit
2023-11-17  1:05 ` fengchengwen
2023-11-17  1:31   ` lihuisong (C)
2023-11-17 10:19     ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).