[PATCH] app/testpmd: fix set Tx offload command

lihuisong (C) lihuisong at huawei.com
Fri Nov 17 02:31:18 CET 2023


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

在 2023/11/17 9:05, fengchengwen 写道:
> Reviewed-by: Chengwen Feng <fengchengwen at 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 at amd.com>
>> ---
>> Cc: huangdengdui at huawei.com
>> Cc: lihuisong at huawei.com
>> Cc: Song Jiale <songx.jiale at intel.com>
>> Cc: Zhimin Huang <zhiminx.huang at 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);
>>   }
>>   
>>
> .


More information about the dev mailing list