From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 16380728E; Mon, 22 Jan 2018 09:20:24 +0100 (CET) Received: from lfbn-lil-1-110-231.w90-45.abo.wanadoo.fr ([90.45.197.231] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1edXLB-0006KF-2k; Mon, 22 Jan 2018 09:20:30 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Mon, 22 Jan 2018 09:20:21 +0100 Date: Mon, 22 Jan 2018 09:20:21 +0100 From: Olivier Matz To: Shahaf Shuler Cc: "dev@dpdk.org" , Adrien Mazarguil , =?iso-8859-1?Q?N=E9lio?= Laranjeiro , Yongseok Koh , "stable@dpdk.org" Message-ID: <20180122082021.bopujmsmwivpeqwy@platinum> References: <20180118130043.31773-1-olivier.matz@6wind.com> <20180119162517.4451-1-olivier.matz@6wind.com> <20180119162517.4451-2-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-stable] [PATCH v2 2/2] net/mlx5: fix allocation when no memory on device NUMA node X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2018 08:20:25 -0000 Hi Shahaf, On Sun, Jan 21, 2018 at 06:58:09AM +0000, Shahaf Shuler wrote: > Friday, January 19, 2018 6:25 PM, Olivier Matz: > on the same numa node than the device, it is > > preferable to fallback on another socket instead of failing. > > > > Fixes: 1e3a39f72d5d ("net/mlx5: allocate verbs object into shared memory") > > Cc: stable@dpdk.org > > > > Signed-off-by: Olivier Matz > > Signed-off-by: Nelio Laranjeiro > > --- > > > > This new version of the patch was provided by Nelio (thanks), I validated it > > on my platform. I just did minimal changes to fix the checkpatch issues in the > > comments of mlx5.h (/** instead of /*). > > Per my understanding the below patch is to select the socket on which to create the Verbs object based on the ethdev configuration rather than the PCI numa node. > While it introduce the infrastructure to do fallback to other socket id, it is not yet used. > I think the commit log should be modified to better explain this patch. That's right, the commit log should be updated, it's still the commit log of the v1, which does not match. > > > > drivers/net/mlx5/mlx5.c | 14 ++++++++++++-- > > drivers/net/mlx5/mlx5.h | 20 ++++++++++++++++++++ > > drivers/net/mlx5/mlx5_rxq.c | 4 ++++ > > drivers/net/mlx5/mlx5_txq.c | 4 ++++ > > 4 files changed, 40 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index > > 1c95f3520..7a04ccf98 100644 > > --- a/drivers/net/mlx5/mlx5.c > > +++ b/drivers/net/mlx5/mlx5.c > > @@ -139,10 +139,20 @@ mlx5_alloc_verbs_buf(size_t size, void *data) > > struct priv *priv = data; > > void *ret; > > size_t alignment = sysconf(_SC_PAGESIZE); > > + unsigned int socket = SOCKET_ID_ANY; > > > > + if (priv->verbs_alloc_ctx.type == > > MLX5_VERSB_ALLOC_TYPE_TX_QUEUE) { It looks we should also replace VERSB by VERBS :D I will send a v3.