From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D8EB42BE1 for ; Wed, 28 Jun 2017 11:48:13 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 28 Jun 2017 02:48:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,274,1496127600"; d="scan'208";a="986102058" Received: from dwdohert-dpdk.ir.intel.com ([163.33.210.152]) by orsmga003.jf.intel.com with ESMTP; 28 Jun 2017 02:48:11 -0700 To: "dev@dpdk.org" References: <1493242208-19526-1-git-send-email-jblunck@infradead.org> From: Declan Doherty Cc: Jan Blunck , Eric Kinzie Message-ID: <44751a6e-4a2c-a53e-3fdc-89a95be3f5f3@intel.com> Date: Wed, 28 Jun 2017 10:47:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <1493242208-19526-1-git-send-email-jblunck@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 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: Wed, 28 Jun 2017 09:48:14 -0000 On 26/04/17 22:30, Jan Blunck wrote: > 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 is an integer so we shouldn't be casting LCORE_ID_ANY to an uint8_t as this condition would never match as LCORE_ID_ANY wouldn't be UINT32_MAX after casting > + socket_id = 0; Should this not be socket_id = rte_socket_id(); as we don't know we are running on > > element_size = sizeof(struct slow_protocol_frame) + > RTE_PKTMBUF_HEADROOM; >