From 601cecccb6b48e38ffae9d5719d0431551321a46 Mon Sep 17 00:00:00 2001 From: "Arrobo, Gabriel" Date: Wed, 13 Mar 2024 08:16:02 -0700 Subject: [PATCH] Address issue about socke_id --- core/drivers/pmd.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/drivers/pmd.cc b/core/drivers/pmd.cc index 3f49fc71a5..5f71499441 100644 --- a/core/drivers/pmd.cc +++ b/core/drivers/pmd.cc @@ -114,9 +114,11 @@ static CommandResponse find_dpdk_port_by_id(dpdk_port_t port_id, if (!rte_eth_dev_is_valid_port(port_id)) { return CommandFailure(ENODEV, "Port id %d is not available", port_id); } - if (rte_eth_dev_socket_id(port_id) < 0) { - return CommandFailure(ENODEV, "Port id %d is not attached", port_id); - } + if (rte_eth_dev_socket_id(port_id) >= 0 && + rte_eth_dev_socket_id(port_id) != (int)rte_socket_id()) + LOG(WARNING) << "DPDK port_id " << port_id + << " is on remote NUMA node to polling thread.\n\t" + "Performance will not be optimal."; *ret_port_id = port_id; return CommandSuccess();