From: Olivier Matz <olivier.matz@6wind.com>
To: Houssem Bouhlel <houssem.bouhlel@6wind.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix selection of default device NUMA node
Date: Tue, 26 Oct 2021 11:17:07 +0200 [thread overview]
Message-ID: <YXfHk0mGy8xU3LEH@platinum> (raw)
In-Reply-To: <20211026090610.10823-1-houssem.bouhlel@6wind.com>
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 <houssem.bouhlel@6wind.com>
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> ---
> 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
>
next prev parent reply other threads:[~2021-10-26 9:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 9:06 [dpdk-dev] [PATCH] bus/pci: fix selection of default device NUMA node Houssem Bouhlel
2021-10-26 9:17 ` Olivier Matz [this message]
2021-10-29 8:44 ` Olivier Matz
2021-11-03 20:36 ` David Marchand
2021-11-04 8:57 ` Olivier Matz
2022-07-14 13:46 ` [dpdk-stable] " Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YXfHk0mGy8xU3LEH@platinum \
--to=olivier.matz@6wind.com \
--cc=dev@dpdk.org \
--cc=houssem.bouhlel@6wind.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.