app/testpmd: avoid process ID out of range
authorHaiyue Wang <haiyue.wang@intel.com>
Mon, 15 Nov 2021 06:05:09 +0000 (14:05 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 15 Nov 2021 15:26:17 +0000 (16:26 +0100)
commit5388be6eaea7ceaa5a922ea6a8b4dada846aaeea
treecdec9398663dd702ff37ced7cd0141abaa8d69a5
parentc75b9c3a927cd5d3ffb5e096ebd8daac3bac2fcf
app/testpmd: avoid process ID out of range

The 'proc_id' should be less than 'num_procs', if not, exit the testpmd
and show the error message.

Fixes: a550baf24af9 ("app/testpmd: support multi-process")

Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/parameters.c