net/bonding: fix port id validity check on parsing
authorGaetan Rivet <grive@u256.net>
Fri, 17 Apr 2020 16:42:06 +0000 (18:42 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:04 +0000 (16:03 +0100)
commit44cd624a4b8c626fb5444199c06b5e05675c3cc1
tree50126274119d84362c8f5cf75e7424b93aeece0a
parent4aae2397add77afefb7d91181e3ea0b1e7287949
net/bonding: fix port id validity check on parsing

If the port_id is equal to RTE_MAX_ETHPORTS, it should be considered
invalid. Additionally, UNUSED ports are also not valid port ids to be
used afterward.

To simplify following the ethdev API rules, use the exposed function
checking whether a port id is valid.

Fixes: 2efb58cbab6e ("bond: new link bonding library")
Cc: stable@dpdk.org
Signed-off-by: Gaetan Rivet <grive@u256.net>
Acked-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/bonding/rte_eth_bond_args.c