app/testpmd: remove hardcoded descriptors limit
authorLijun Ou <oulijun@huawei.com>
Sat, 18 Apr 2020 03:44:38 +0000 (11:44 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 17:23:56 +0000 (19:23 +0200)
commit99e040d3adc9ee2284e315219f2a6baee680f4e3
tree66d579e35cdbda32b2e86fc1f7cebf1f14616665
parent4016d76b7c54db9b292e5a90db53029980e91f74
app/testpmd: remove hardcoded descriptors limit

When users configure rxds and txds by used port config cmd based
on testpmd application, it will not be able to configure rxd and
txd according to the max capability range supported by the actual
NIC hardware. Due testpmd defects, it can only configure a fixed
range to 0 to 2048.
The final result is that an incorrect printing prompt appears and
cannot be applied using rxd && txd according to the actual
capabilities supported by the device.
In order to solve the above problems, we modify the testpmd. First
by calling the rte_eth_dev_info_get api to obtain the max and min
rx/tx capability supported by the hns3, and then use this range
to compare with the actual value by users configured and make
reasonable limitation.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
app/test-pmd/cmdline.c
app/test-pmd/testpmd.c
app/test-pmd/testpmd.h