From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 84C802C13 for ; Wed, 28 Jun 2017 14:00:15 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id 131so11055706wmq.2 for ; Wed, 28 Jun 2017 05:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4qeHep01P0tpYc5hFejyi0zxTYSkTdWEY+vI/rFckZk=; b=F+Gn4rzuYV1R73rTZ/BQyVpEDGpPCjQhJqJ3WrwnbHZ8HQPPtVwa7O2VbqQD9N4UNA 1L4OIG2tQqFBnJ2Wov1fAanfNpU1MqbQSp6e95euTRVAsFUBjV0sWtxaI5D/zsLioSp3 6KHfBi+5R0v8rNxc7+MDNO1/hTl/SlDZbTyt2HRZB6B7SThCzS/Z0o9Bl1WcyFUg3mNG OYkMjso4FVMKU5VfmHYU2zKTcg+sd50SU0WvWGP0NYR9R7YT8kbSZEbL+fedLpW5ROrv VeaLgGEc8W3hIbJt1c1lqQvcXMQidwrp0fOQnirlvC5V1OFS3JebFwd+fmnHjhuuH3xt kclQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=4qeHep01P0tpYc5hFejyi0zxTYSkTdWEY+vI/rFckZk=; b=oi1Y0Dd0xEOBf0Qa18i4WFNlvN9aOshHDbC18B3aK78B8kpOzAkPnj5yVPYZpgqjOY GPo7oDQlFCaZQCtPO4ZZQeLsKwChlBQkP2/DfrlOEPJkLyUvJ+TxudiO5dz4kf0xTZlc Nwb3N7rEYaq7HVIuA4WQE62y3tv2To9a2C2xCH3CmcEJAootDCR/gm6xIMCC4wcUGSs7 g68J8q3BwnHP95KNuE1wVbgcPdFgXrmLgnqhj1LBlag79ZIC+8eNm4d+NKyvk696LowS Kd+d42by9CJlSHrLq+Ici1nu9UuYELDaZnXQG2ut8t5gArNYJv1nOw14IosRQXwGX4wj Cliw== X-Gm-Message-State: AKS2vOzXDZcaNYK+gTf8APtHXGf6WS7kj/5CocNBWnCBGLFmlHm+iw3D 4qNx3AZs2OAb1c97Qfr5OV5L89lYLQ== X-Received: by 10.28.150.136 with SMTP id y130mr5417809wmd.108.1498651215209; Wed, 28 Jun 2017 05:00:15 -0700 (PDT) MIME-Version: 1.0 Sender: jblunck@gmail.com Received: by 10.28.5.136 with HTTP; Wed, 28 Jun 2017 05:00:14 -0700 (PDT) In-Reply-To: <44751a6e-4a2c-a53e-3fdc-89a95be3f5f3@intel.com> References: <1493242208-19526-1-git-send-email-jblunck@infradead.org> <44751a6e-4a2c-a53e-3fdc-89a95be3f5f3@intel.com> From: Jan Blunck Date: Wed, 28 Jun 2017 14:00:14 +0200 X-Google-Sender-Auth: zW17Rq_zVqSyNcMvtEsaFZSIHro Message-ID: To: Declan Doherty Cc: "dev@dpdk.org" , Eric Kinzie Content-Type: text/plain; charset="UTF-8" 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 12:00:15 -0000 On Wed, Jun 28, 2017 at 11:47 AM, Declan Doherty wrote: > 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 > Ouch ... let me fix this. >> + 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; >> >