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 6EDCEA0C47; Tue, 26 Oct 2021 11:17:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC57C41C27; 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 11506410D5 for ; Tue, 26 Oct 2021 11:17:09 +0200 (CEST) Received: by mail-wr1-f53.google.com with SMTP id m22so14596246wrb.0 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=oz2nm7B1UWTJXKMLp9f5TlM4cqeuULvuWJLNey9Z+D87KQ3Z82YEi9iH1AIROJRG6j /ESeNIf2LY8k3x1pO1UHpBvZBYHv+j/34kgFl7uPChblkONAhgT+tOLaWX2FbJzRKtnG fds3PBnSYTo7JUpIPylzOa/OKZu2AenJ4KkmccJVFH1dzDmx1X5itPcppxa+4S/FVuDZ 7Tp5ixao6CX1AklWq9IAtBCnJpMgR+RFEjTuLtm3rapb3AOedwXXWivivH52bzz0k3MK JR9ZqtTPDV2JRPahSSTUhU8Wj/7kJj5pcKSuOMkxp4teOl08cQj2lp+trxO2NmBrYgOr XhdA== X-Gm-Message-State: AOAM533OUCR5PwBv7LQTPBIYMUEmvXtkkg11vRQHzkxyM9MlXmbeP68Y Q9Y5RALCi/68sBY4rwAIyNXzSw== 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-dev] [PATCH] bus/pci: fix selection of default device NUMA node X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 >