From mboxrd@z Thu Jan 1 00:00:00 1970 From: Declan Doherty Subject: [PATCH v2 1/2] bond: avoid allocating mempool on socket LCORE_ID_ANY Date: Fri, 30 Jun 2017 15:34:48 +0100 Message-ID: <20170630143449.13990-1-declan.doherty@intel.com> References: Cc: jblunck@infradead.org, Eric Kinzie , Eric Kinzie , Declan Doherty To: dev@dpdk.org Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 8B933532C for ; Fri, 30 Jun 2017 16:35:40 +0200 (CEST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Jan Blunck If the numa node is unknown, use the value from rte_socket_id() to avoid an allocation failure. Signed-off-by: Eric Kinzie CC: Eric Kinzie Signed-off-by: Declan Doherty --- drivers/net/bonding/rte_eth_bond_8023ad.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 57b9b32..7826296 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -886,7 +886,10 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id) RTE_ASSERT(port->rx_ring == NULL); RTE_ASSERT(port->tx_ring == NULL); + socket_id = rte_eth_devices[slave_id].data->numa_node; + if (socket_id == (int)LCORE_ID_ANY) + socket_id = rte_socket_id(); element_size = sizeof(struct slow_protocol_frame) + RTE_PKTMBUF_HEADROOM; -- 2.9.4