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 F0DE11B337 for ; Thu, 18 Jan 2018 17:19:39 +0100 (CET) Received: by mail-wr0-f196.google.com with SMTP id f11so12664190wre.4 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=VNGgQZVHxkEWDWLTthA/C+mOYr94Q7WqQ9ykMPdd8NrOvCFZ57mUrQHBKZBAqJrWVS Hr4VcbuRG5RkmyRS4J4k3YIdvQUQXM7PhbpWernk4ZzP8vzR7v3Jg7Ymhr8M7HTwiz4U 7hyUZs6GT5sUiagSnynmMZ1RaBTjK4PcvYLGP0sDZR6hUOjIqjovPc0zASJlRgbQkyRo Qnea5GKHp/Qse2JNVvACbppUsiMhpy8Ywnwn8QYR2CHzuhZ6I5mzx9PWW4iH/9HUO++7 AM0jYalTGydX8rGQte03E/HcL6BzMnKdcom8dekD5/xF6t7qWro5HJ3DyLifTCCFTBNp y28Q== X-Gm-Message-State: AKwxytdq0DrNzKyIMwMIRQJCds8sghM3Jv9gKv2S9N3NTlsan5FFElr1 V7VUejLt9hQivP/4xGw9tlu9 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-dev] [PATCH 2/2] net/mlx5: fix allocation when no memory on device NUMA node 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: 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