From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2017 07:35:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,286,1496127600"; d="scan'208";a="103188106" Received: from dwdohert-dpdk.ir.intel.com ([163.33.210.152]) by orsmga004.jf.intel.com with ESMTP; 30 Jun 2017 07:35:38 -0700 From: Declan Doherty To: dev@dpdk.org Cc: jblunck@infradead.org, Eric Kinzie , Eric Kinzie , Declan Doherty Date: Fri, 30 Jun 2017 15:34:48 +0100 Message-Id: <20170630143449.13990-1-declan.doherty@intel.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 1/2] bond: avoid allocating mempool on socket LCORE_ID_ANY X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 14:35:41 -0000 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