[dpdk-dev] [PATCH] app/testpmd:fix invalid port id parameters

Ferruh Yigit ferruh.yigit at intel.com
Mon Oct 9 06:16:23 CEST 2017

On 8/22/2017 6:03 AM, Li Han wrote:
> in parse_ringnuma_config/parse_portnuma_config functions,port_id
> should less than RTE_MAX_ETHPORTS,but port_id_is_invalid check
> assumes that port_id may be 255.

testpmd using RTE_PORT_ALL [1], which is in valid port_id range, as
special meaning [2] making things tricky.

Only above 255 is no more valid since port_id is not 16bits, it should
be 65535.

Except from above detail,
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>

And if you are familiar with this code, above a few lines there is a
"int_fld[i] > 255" check, is the intention to check port_id limit there?
If so this is no more valid check, and would you mind sending a patch to
fix if you have time?


#define RTE_PORT_ALL            (~(portid_t)0x0)

Meaning all enabled ethdev ports, like:

> Signed-off-by: Li Han <han.li1 at zte.com.cn>


More information about the dev mailing list