app/testpmd: limit port mask bits to configured maximum
authorBruce Richardson <bruce.richardson@intel.com>
Tue, 16 Dec 2014 14:39:44 +0000 (14:39 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 17 Dec 2014 00:04:06 +0000 (01:04 +0100)
commit5e4937a088131272a15af3bac174d9b7e8567f91
tree6ca8bb55874448781e240439eeadf1a0b29f9e4a
parentb5af5c7967150fc541dba541c1ad8dc8aa642bff
app/testpmd: limit port mask bits to configured maximum

The port mask parsing in testpmd allowed up to 64 bits to be processed,
even if RTE_MAX_ETHPORTS is set to a max of 32. Fix this by only
processing up to min(RTE_MAX_ETHPORTS,64) bits of the mask.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
app/test-pmd/config.c