net/bonding: fix port id validity check on parsing
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 <5349a78fb7b717c3a3b30d04e535485ef35093c6@u256.net>
Acked-by: Min Hu (Connor) <f02e10cb0a484c51b0f8634f83fbb4ab9ded1c6a@huawei.com>

john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk,john-mcnamara-intel/dpdk