ethdev: fix switching domain allocation
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Thu, 16 Jan 2020 16:19:54 +0000 (16:19 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:59:19 +0000 (19:59 +0100)
commit7e9165b1beb77554916686cb4ff4d16c4e995b74
tree90fc6a28007dffb912eefec7a181478734310199
parent102b6ec3d5c3f1b26aaf6a0fd8f8384a8554001e
ethdev: fix switching domain allocation

The maximum amount of unique swutching domain is supposed
to be equal RTE_MAX_ETHPORTS. Current implementation allows
to allocate only RTE_MAX_ETHPORTS-1 domains.

The definition of RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID is
changed from 0 to UINT16_MAX, the rte_eth_dev_info_get is
updated to initialize dev_ibfo structure accordingly.

Fixes: ce9250406323 ("ethdev: add switch domain allocator")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev.h