From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Matz Subject: Re: [dpdk-stable] [PATCH v2 2/2] net/mlx5: fix allocation when no memory on device NUMA node Date: Mon, 22 Jan 2018 09:20:21 +0100 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 Cc: "dev@dpdk.org" , Adrien Mazarguil , =?iso-8859-1?Q?N=E9lio?= Laranjeiro , Yongseok Koh , "stable@dpdk.org" To: Shahaf Shuler Return-path: Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.