From 4462814d850fadcbdbbadb324d125aefbb83a2b8 Mon Sep 17 00:00:00 2001 From: Zhiyong Yang Date: Fri, 18 May 2018 18:41:10 +0800 Subject: [PATCH] ethdev: fix storage type of latest port id eth_dev_last_created_port is used to store port id type and should be extended to 16bits corresponding to ethdev port id range. Fixes: f8244c6399d9 ("ethdev: increase port id range") Cc: stable@dpdk.org Signed-off-by: Zhiyong Yang Acked-by: Ferruh Yigit --- lib/librte_ethdev/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index b3ed82105c..cd4bfd3c6a 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -49,7 +49,7 @@ static int ethdev_logtype; static const char *MZ_RTE_ETH_DEV_DATA = "rte_eth_dev_data"; struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS]; -static uint8_t eth_dev_last_created_port; +static uint16_t eth_dev_last_created_port; /* spinlock for eth device callbacks */ static rte_spinlock_t rte_eth_dev_cb_lock = RTE_SPINLOCK_INITIALIZER; -- 2.20.1