From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Blunck Subject: [PATCH 1/2] bond: avoid allocating mempool on socket LCORE_ID_ANY Date: Wed, 26 Apr 2017 23:30:07 +0200 Message-ID: <1493242208-19526-1-git-send-email-jblunck@infradead.org> Cc: Eric Kinzie , Eric Kinzie To: dev@dpdk.org Return-path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id CC4582C50 for ; Wed, 26 Apr 2017 23:30:18 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id y10so408618wmh.0 for ; Wed, 26 Apr 2017 14:30:18 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/net/bonding/rte_eth_bond_8023ad.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c index 7b863d6..b8df536 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.c +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c @@ -887,6 +887,8 @@ 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 == (uint8_t)LCORE_ID_ANY) + socket_id = 0; element_size = sizeof(struct slow_protocol_frame) + RTE_PKTMBUF_HEADROOM; -- 2.7.4