From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 30CBB1B337 for ; Thu, 18 Jan 2018 17:19:39 +0100 (CET) Received: by mail-wr0-f196.google.com with SMTP id g21so23113094wrb.13 for ; Thu, 18 Jan 2018 08:19:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=zXVMGHtJbXcv/6qGE6rmnZz1QILiBMfhDFL7SMpdBjM=; b=JisGFPwk4DeW5wRqCGk8yRnfA9pyy2Mg4WRiizkG99x1RpEQMDFHnH+tK9RzvwRvWo vvreF93Yhuxjjq1NCXmMoTW2sHla4CHfwDZEXFjRFW96H3osJugUR2PSbOw9x+LLIvr3 Nq5UsjKS8Y4a2ZIvkWpPnQOQXbTeFpc6QIaCgVTI6pPohA7LMoO8JBQG984jO52aVDlX /PsewHc7jSvhaV6qYW0rDJ1IEFQRZPxCV3d8HccKL4vMfGW3/0Mfqt1Npjfa8eZq8Wna 5TEd4aKggm3cf4544xIMGVwh+SeQqr5hF+oh1ZPHJNPu0dHufTzh2oLCq84cR8mqA1o6 iv0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=zXVMGHtJbXcv/6qGE6rmnZz1QILiBMfhDFL7SMpdBjM=; b=bbxwJ5UJJ2AwPuMbJ8/+HE6zpUreliuCh5/I2IZMaFeTpzXbfvb39ptFu68p0DClXO wQc1jcQOJUPScHsDgPv+jFqek2He4nwot0ltlpDjwvnXb1DhsIVXZb+XDYjWSiKsnx1y FQHo8vGNybQ1Hem4x2IMJ6qLPxp+F4DNR/wNyzAeSYRl71x5XMrfE/iFsgWdRNGL8nYr zkbh85YUSunqezc2R8LT/jgXkr++3DKlB7oXRt6Zi6hbgjOrJlieRvvLhXoBRQcarm2K /QbYpjy84OuSFFzsGXYUOSXVGvsQU9HokotVjPBI7j+QrMV0Jc9MM+/KiHJgq7Ptrfru MfjA== X-Gm-Message-State: AKwxytdKBWpzbpWK2K4QwEOCwwRE8kxEnHOdPXWkUJKWNgdOaToV0SJu NzPgrXcSLRdYw3CxCEOlA6go X-Google-Smtp-Source: ACJfBos9/SDensVNzksaSb4CNOfGUfD8y8sAwxFo4Bg7HCTXy2HyQs83kDiTHIBoWRwDuYBuw7kdPg== X-Received: by 10.223.182.161 with SMTP id j33mr6911840wre.43.1516292379645; Thu, 18 Jan 2018 08:19:39 -0800 (PST) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 66sm6939913wmn.30.2018.01.18.08.19.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jan 2018 08:19:39 -0800 (PST) Date: Thu, 18 Jan 2018 17:19:26 +0100 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Olivier Matz Cc: dev@dpdk.org, Adrien Mazarguil , Yongseok Koh , stable@dpdk.org Message-ID: <20180118161926.e7dqlkr2w5wfhvi4@laranjeiro-vm.dev.6wind.com> References: <20180118130043.31773-1-olivier.matz@6wind.com> <20180118130043.31773-2-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180118130043.31773-2-olivier.matz@6wind.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-stable] [PATCH 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: Thu, 18 Jan 2018 16:19:40 -0000 On Thu, Jan 18, 2018 at 02:00:43PM +0100, Olivier Matz wrote: > If there is no memory available 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 > --- > drivers/net/mlx5/mlx5.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c > index 1c95f3520..312f3d5be 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -143,6 +143,10 @@ mlx5_alloc_verbs_buf(size_t size, void *data) > assert(data != NULL); > ret = rte_malloc_socket(__func__, size, alignment, > priv->dev->device->numa_node); > + if (ret == NULL) > + ret = rte_malloc_socket(__func__, size, alignment, > + SOCKET_ID_ANY); > + > DEBUG("Extern alloc size: %lu, align: %lu: %p", size, alignment, ret); > return ret; > } > -- > 2.11.0 > This function is the finalisation of the creation of the queues and contains the buffers to the CQ/WQ which must be on the correct socket otherwise the performances will be limited. Even if this function is only called on dev_start() it must reflect the configuration requested from the application on the rte_eth_{tx,rx}_queue_setup(). Regards, -- Nélio Laranjeiro 6WIND