From: "Jayakumar, Muthurajan" <muthurajan.jayakumar@intel.com>
To: "Liang, Cunming" <cunming.liang@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v1] app/test: fix pmd_perf issue in no NUMA case
Date: Mon, 8 Jun 2015 07:01:27 +0000 [thread overview]
Message-ID: <5D695A7F6F10504DBD9B9187395A21797D23C344@ORSMSX112.amr.corp.intel.com> (raw)
In-Reply-To: <1433745194-27771-1-git-send-email-cunming.liang@intel.com>
Thank you Steve.
Acked.
Thanks
M Jay
http://www.dpdk.org
-----Original Message-----
From: Liang, Cunming
Sent: Sunday, June 07, 2015 11:33 PM
To: dev@dpdk.org
Cc: Jayakumar, Muthurajan; Liang, Cunming
Subject: [PATCH v1] app/test: fix pmd_perf issue in no NUMA case
Reported-by: Jayakumar, Muthurajan <muthurajan.jayakumar@intel.com>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
---
app/test/test_pmd_perf.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index 1fd6843..6f218f7 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -321,6 +321,19 @@ alloc_lcore(uint16_t socketid)
return (uint16_t)-1;
}
+static int
+get_socket_id(uint8_t port_id)
+{
+ int socket_id;
+
+ socket_id = rte_eth_dev_socket_id(port_id);
+ if (socket_id < 0)
+ /* enforce using socket 0 when no NUMA support */
+ socket_id = 0;
+
+ return socket_id;
+}
+
volatile uint64_t stop;
uint64_t count;
uint64_t drop;
@@ -727,7 +740,7 @@ test_pmd_perf(void)
num = 0;
for (portid = 0; portid < nb_ports; portid++) {
if (socketid == -1) {
- socketid = rte_eth_dev_socket_id(portid);
+ socketid = get_socket_id(portid);
slave_id = alloc_lcore(socketid);
if (slave_id == (uint16_t)-1) {
printf("No avail lcore to run test\n"); @@ -737,7 +750,7 @@ test_pmd_perf(void)
slave_id, socketid);
}
- if (socketid != rte_eth_dev_socket_id(portid)) {
+ if (socketid != get_socket_id(portid)) {
printf("Skip port %d\n", portid);
continue;
}
@@ -818,7 +831,7 @@ test_pmd_perf(void)
/* port tear down */
for (portid = 0; portid < nb_ports; portid++) {
- if (socketid != rte_eth_dev_socket_id(portid))
+ if (socketid != get_socket_id(portid))
continue;
rte_eth_dev_stop(portid);
--
1.8.1.4
next prev parent reply other threads:[~2015-06-08 7:01 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 [this message]
2015-06-22 21:01 ` Thomas Monjalon
2015-06-23 1:45 ` Liang, Cunming
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=5D695A7F6F10504DBD9B9187395A21797D23C344@ORSMSX112.amr.corp.intel.com \
--to=muthurajan.jayakumar@intel.com \
--cc=cunming.liang@intel.com \
--cc=dev@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 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).