[dpdk-dev] [PATCH v2] app/testpmd: fix segment number check

Ferruh Yigit ferruh.yigit at intel.com
Tue Apr 27 13:42:18 CEST 2021


On 4/26/2021 12:23 PM, Li, Xiaoyun wrote:
> Hi
> 
>> -----Original Message-----
>> From: Yigit, Ferruh <ferruh.yigit at intel.com>
>> Sent: Saturday, April 24, 2021 00:10
>> To: Viacheslav Ovsiienko <viacheslavo at nvidia.com>; Li, Xiaoyun
>> <xiaoyun.li at intel.com>; Wei Hu (Xavier) <xavier.huwei at huawei.com>;
>> Chengchang Tang <tangchengchang at huawei.com>
>> Cc: Yigit, Ferruh <ferruh.yigit at intel.com>; dev at dpdk.org; stable at dpdk.org;
>> Andrew Boyer <aboyer at pensando.io>
>> Subject: [PATCH v2] app/testpmd: fix segment number check
>>
>> From: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
>>
>> The --txpkts command line parameter was silently ignored due to application
>> was unable to check the Tx queue ring sizes for non configured ports [1].
> 
> Remove this [1] or mark the following items as [1] [2] [3].
> 
>>
>> The "set txpkts <len0[,len1]*>" was also rejected if there was some stopped or
>> /unconfigured port.
>>
>> This provides the following:
>>
>>   - If fails to get ring size from the port, this can be because port is
>>     not initialized yet, ignore the check and just be sure segment size
>>     won't cause an out of bound access. The port descriptor check will
>>     be done during Tx setup.
>>
>>   - The capability to send single packet is supposed to be very basic
>>     and always supported, the setting segment number to 1 is always
>>     allowed, no check performed
>>
>>   - At the moment of Tx queue setup the descriptor number is checked
>>     against configured segment number
>>
>> Bugzilla ID: 584
>> Fixes: 8dae835d88b7 ("app/testpmd: remove restriction on Tx segments set")
>> Cc: stable at dpdk.org
>>
>> Signed-off-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
>> ---
>> Cc: Andrew Boyer <aboyer at pensando.io>
>>
>> v2:
>> * Become more flexible for the '--txpkts' command line, if not able to
>>   get the descriptor size from port, ignore the check.
>>
>>   ('nb_txd' check was proposed before, this will require '--txd'
>>   parameter, but also enforces a specific order on the parameters,
>>   instead going with the option to flex the checks for parameter.)
>> ---
>>  app/test-pmd/cmdline.c |  4 ++++
>>  app/test-pmd/config.c  | 32 ++++++++++++++++++++++++--------
>>  2 files changed, 28 insertions(+), 8 deletions(-)
> 
> Except the one comment above for commit log,
> Acked-by: Xiaoyun Li <xiaoyun.li at intel.com>
> 

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


Above missing reference in the commit log removed while merging.


More information about the dev mailing list