Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 18.05
[deb_dpdk.git]
/
test
/
test
/
test_pmd_perf.c
diff --git
a/test/test/test_pmd_perf.c
b/test/test/test_pmd_perf.c
index
911dd76
..
54bc4f6
100644
(file)
--- a/
test/test/test_pmd_perf.c
+++ b/
test/test/test_pmd_perf.c
@@
-676,7
+676,7
@@
test_pmd_perf(void)
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
signal(SIGUSR1, signal_handler);
signal(SIGUSR2, signal_handler);
- nb_ports = rte_eth_dev_count();
+ nb_ports = rte_eth_dev_count
_avail
();
if (nb_ports < NB_ETHPORTS_USED) {
printf("At least %u port(s) used for perf. test\n",
NB_ETHPORTS_USED);
if (nb_ports < NB_ETHPORTS_USED) {
printf("At least %u port(s) used for perf. test\n",
NB_ETHPORTS_USED);
@@
-698,7
+698,7
@@
test_pmd_perf(void)
reset_count();
num = 0;
reset_count();
num = 0;
-
for (portid = 0; portid < nb_ports; portid++
) {
+
RTE_ETH_FOREACH_DEV(portid
) {
if (socketid == -1) {
socketid = rte_eth_dev_socket_id(portid);
slave_id = alloc_lcore(socketid);
if (socketid == -1) {
socketid = rte_eth_dev_socket_id(portid);
slave_id = alloc_lcore(socketid);
@@
-791,7
+791,7
@@
test_pmd_perf(void)
return -1;
/* port tear down */
return -1;
/* port tear down */
-
for (portid = 0; portid < nb_ports; portid++
) {
+
RTE_ETH_FOREACH_DEV(portid
) {
if (socketid != rte_eth_dev_socket_id(portid))
continue;
if (socketid != rte_eth_dev_socket_id(portid))
continue;