From: "Liang, Cunming" <cunming.liang@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] app/test: fix pmd_perf issue in no NUMA case
Date: Tue, 23 Jun 2015 01:45:43 +0000 [thread overview]
Message-ID: <D0158A423229094DA7ABF71CF2FA0DA311981B28@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <3079471.cQLiANhq3b@xps13>
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, June 23, 2015 5:02 AM
> To: Liang, Cunming
> Cc: dev@dpdk.org; Jayakumar, Muthurajan
> Subject: Re: [dpdk-dev] [PATCH v1] app/test: fix pmd_perf issue in no NUMA case
>
> 2015-06-08 14:33, Cunming Liang:
> > Reported-by: Jayakumar, Muthurajan <muthurajan.jayakumar@intel.com>
> > Signed-off-by: Cunming Liang <cunming.liang@intel.com>
>
> Please explain exactly what you try to fix.
> Is it still needed since this patch?
> http://dpdk.org/browse/dpdk/commit/?id=94ef2964148a4540
>
> > + socket_id = rte_eth_dev_socket_id(port_id);
> > + if (socket_id < 0)
> > + /* enforce using socket 0 when no NUMA support */
> > + socket_id = 0;
The referred patch 94ef29 fixes eal_cpu_socket_id() for the socket id of a logical core.
It's not for the case here which trying to get socket id of a port.
The original purpose of the patch is to allow the unit test works even without NUMA support.
Now I have a look on the function definition, when socket could not be determined, the default shall be zero instead of -1.
So I think the below change should be made in eal_pci.c
/*
* Return the NUMA socket to which an Ethernet device is connected
* @return
* The NUMA socket id to which the Ethernet device is connected or
* a default of zero if the socket could not be determined.
* -1 is returned is the port_id value is out of range.
*/
extern int rte_eth_dev_socket_id(uint8_t port_id);
diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index d2adc66..8f9f136 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -317,8 +317,8 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus,
snprintf(filename, sizeof(filename), "%s/numa_node",
dirname);
if (access(filename, R_OK) != 0) {
- /* if no NUMA support just set node to -1 */
- dev->numa_node = -1;
+ /* if no NUMA support just set node to 0 */
+ dev->numa_node = 0;
} else {
if (eal_parse_sysfs_value(filename, &tmp) < 0) {
free(dev);
/Steve
next prev parent reply other threads:[~2015-06-23 1:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 6:33 Cunming Liang
2015-06-08 7:01 ` Jayakumar, Muthurajan
2015-06-22 21:01 ` Thomas Monjalon
2015-06-23 1:45 ` Liang, Cunming [this message]
2015-07-31 1:36 ` [dpdk-dev] [PATCH] eal/linux: fix negative value for undetermined numa_node Cunming Liang
2015-08-01 3:56 ` Matthew Hall
2015-08-03 1:46 ` Liang, Cunming
2015-08-03 5:04 ` Matthew Hall
2015-08-03 17:19 ` 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=D0158A423229094DA7ABF71CF2FA0DA311981B28@shsmsx102.ccr.corp.intel.com \
--to=cunming.liang@intel.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).