From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BD75CA0C47 for ; Tue, 26 Oct 2021 11:17:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DD97407FF; Tue, 26 Oct 2021 11:17:10 +0200 (CEST) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id 0A176407FF for ; Tue, 26 Oct 2021 11:17:09 +0200 (CEST) Received: by mail-wr1-f53.google.com with SMTP id k7so13282435wrd.13 for ; Tue, 26 Oct 2021 02:17:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Op83+o/WAG+6oLan2JlBhe7QRvH2sSoSc06SbL4dq/Y=; b=ReQkfVqjbyO8/QluTLSFDz0iDWIS59TCbi1ZIbnxHoEjON5fRb9K1r5z/e/84tNM5Q N9P33RaMWdgZaRUnfegOgq1uA16ND7GZGmsib7a+4tqaIOUcy/j2QXph+qvpeZVGHt0u bFy1Nafy71fYkS0opq8P9858YGltDTS88emeAc9HKqGtjKLK3b558X31aowScBItDGeO XpHAvTp0WJT4iy9AiJAHLgG+GtzkaZnpjEBjAXd5AA0beuY0q32DkrAz8l+SMuO1mtCk MRAE4+0+blAbxPQgR5UzFF8ZEPqi+4SLUAUlbCxhSndQOJzYNLGLyh99OtpJJp0uJ6/h hMpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Op83+o/WAG+6oLan2JlBhe7QRvH2sSoSc06SbL4dq/Y=; b=lPW595YqnGP22U6IBgYH3KYVdp7GDhQVjCdPyaxdMVbpftBKkbyI/TA/AKP2ShaOOD GuSBF0SiKWBzjFnqXb56LTE5SvA7lqmzXOg6l8as2JEzS0t6EmcTsn23Kyp5mpsftqF0 Q53Z6qL75ivqP12VYXq+SSdYchPZHWViD88MFv//45Cfjpc9rI1J+NgNZ70AymYMQz+k s2PAL1SAKuFS86sLwhhYBwBQhwNa6ADdNDMb8XTcZ51D2ZvrqH5DoUeiojgoDgYUTijR 6m/1p/CIMgf7EPmkfvfySzKnog7GJkiRWlLFPngaMkJbz9/c94wK06COgNA1wG5Nbdog j8rQ== X-Gm-Message-State: AOAM531NblhGBKyMBKtQgeL57tht0rZ10BqddwJcdMDbTs1ayd6Fc0Ex qN6U5koLqYlGkIUzMSe2P8pMmLTbbzrQtQ== X-Google-Smtp-Source: ABdhPJyLQtK+uql9JHt0ZcLXTgwnS36A8cibWGn9CDMdRGfiRHLYwomb+lSoDvXdoZHJEyiNLBXb9Q== X-Received: by 2002:adf:b19b:: with SMTP id q27mr30741268wra.125.1635239828791; Tue, 26 Oct 2021 02:17:08 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id v4sm11319011wrs.86.2021.10.26.02.17.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 02:17:08 -0700 (PDT) Date: Tue, 26 Oct 2021 11:17:07 +0200 From: Olivier Matz To: Houssem Bouhlel Cc: dev@dpdk.org, stable@dpdk.org Message-ID: References: <20211026090610.10823-1-houssem.bouhlel@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211026090610.10823-1-houssem.bouhlel@6wind.com> Subject: Re: [dpdk-stable] [PATCH] bus/pci: fix selection of default device NUMA node X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Tue, Oct 26, 2021 at 11:06:10AM +0200, Houssem Bouhlel wrote: > There can be dev binding issue when no hugepages > are allocated for socket 0. > To avoid this, set device numa node value based on > the first lcore instead of 0. > > Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Sorry, the Fixes line is wrong. This is the correct one: Fixes: 8a04cb612589 ("pci: set default numa node for broken systems") > Cc: stable@dpdk.org > > Signed-off-by: Houssem Bouhlel > Signed-off-by: Olivier Matz > --- > drivers/bus/pci/pci_common.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c > index f8fff2c98ebf..c70ab2373c79 100644 > --- a/drivers/bus/pci/pci_common.c > +++ b/drivers/bus/pci/pci_common.c > @@ -166,6 +166,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, > struct rte_pci_device *dev) > { > int ret; > + unsigned int socket_id; > bool already_probed; > struct rte_pci_addr *loc; > > @@ -194,7 +195,8 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, > if (rte_socket_count() > 1) > RTE_LOG(INFO, EAL, "Device %s is not NUMA-aware, defaulting socket to 0\n", > dev->name); One more comment (sorry, I should have done it before you send the mail): We should move this log below, and use the socket_id instead of 0. > - dev->device.numa_node = 0; > + socket_id = rte_lcore_to_socket_id(rte_get_next_lcore(-1, 0, 0)); > + dev->device.numa_node = socket_id; > } > > already_probed = rte_dev_is_probed(&dev->device); > -- > 2.30.2 >