[dpdk-dev] [PATCH] ethdev: fix data type for port id
wangyunjian
wangyunjian at huawei.com
Mon Oct 26 13:24:23 CET 2020
From: Yunjian Wang <wangyunjian at huawei.com>
The ethdev port id should be 16 bits now. This patch fixes the data
type of the variable for 'pid', changing from uint32_t to uint16_t.
Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
Cc: stable at dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
---
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 b12bb3854d..d52215b9a7 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -816,7 +816,7 @@ rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
int
rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id)
{
- uint32_t pid;
+ uint16_t pid;
if (name == NULL) {
RTE_ETHDEV_LOG(ERR, "Null pointer is specified\n");
--
2.23.0
More information about the dev
mailing list