In testpmd, when using "rx_vlan add 1 77", it will be a segment fault
Because the port ID should be less than 32.
Fixes:
edab33b1c01d ("app/testpmd: support port hotplug")
Signed-off-by: Michael Qiu <michael.qiu@intel.com>
if (port_id == (portid_t)RTE_PORT_ALL)
return 0;
if (port_id == (portid_t)RTE_PORT_ALL)
return 0;
- if (ports[port_id].enabled)
+ if (port_id < RTE_MAX_ETHPORTS && ports[port_id].enabled)
return 0;
if (warning == ENABLED_WARN)
return 0;
if (warning == ENABLED_WARN)