app/testpmd: fix check for invalid ports
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Tue, 13 Dec 2016 07:11:08 +0000 (15:11 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 17 Jan 2017 15:40:05 +0000 (16:40 +0100)
commitdc0537e6d6acbc27d79b7d247ca3bc7f8c20f269
treea024ce16c137624ab2556f5598f6336aad8282ab
parentf5472703c0bdfc29c46fc4b2ca445bce3dc08c9f
app/testpmd: fix check for invalid ports

Some CLIs don't check the input port ID, it
may cause segmentation fault (core dumped).

Fixes: 425781ff5afe ("app/testpmd: add ixgbe VF management")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
app/test-pmd/cmdline.c