git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
app/testpmd: fix NUMA structures initialization
[dpdk.git]
/
app
/
test-pmd
/
testpmd.c
diff --git
a/app/test-pmd/testpmd.c
b/app/test-pmd/testpmd.c
index
5c4d201
..
dd216f6
100644
(file)
--- a/
app/test-pmd/testpmd.c
+++ b/
app/test-pmd/testpmd.c
@@
-529,6
+529,13
@@
init_config(void)
uint8_t port_per_socket[RTE_MAX_NUMA_NODES];
memset(port_per_socket,0,RTE_MAX_NUMA_NODES);
uint8_t port_per_socket[RTE_MAX_NUMA_NODES];
memset(port_per_socket,0,RTE_MAX_NUMA_NODES);
+
+ if (numa_support) {
+ memset(port_numa, NUMA_NO_CONFIG, RTE_MAX_ETHPORTS);
+ memset(rxring_numa, NUMA_NO_CONFIG, RTE_MAX_ETHPORTS);
+ memset(txring_numa, NUMA_NO_CONFIG, RTE_MAX_ETHPORTS);
+ }
+
/* Configuration of logical cores. */
fwd_lcores = rte_zmalloc("testpmd: fwd_lcores",
sizeof(struct fwd_lcore *) * nb_lcores,
/* Configuration of logical cores. */
fwd_lcores = rte_zmalloc("testpmd: fwd_lcores",
sizeof(struct fwd_lcore *) * nb_lcores,
@@
-971,7
+978,8
@@
run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd)
}
#endif
#ifdef RTE_LIBRTE_LATENCY_STATS
}
#endif
#ifdef RTE_LIBRTE_LATENCY_STATS
- if (latencystats_lcore_id == rte_lcore_id())
+ if (latencystats_enabled != 0 &&
+ latencystats_lcore_id == rte_lcore_id())
rte_latencystats_update();
#endif
rte_latencystats_update();
#endif
@@
-2238,10
+2246,13
@@
main(int argc, char** argv)
rte_panic("Empty set of forwarding logical cores - check the "
"core mask supplied in the command parameters\n");
rte_panic("Empty set of forwarding logical cores - check the "
"core mask supplied in the command parameters\n");
- /* Bitrate stats disabled by default */
+ /* Bitrate
/latency
stats disabled by default */
#ifdef RTE_LIBRTE_BITRATE
bitrate_enabled = 0;
#endif
#ifdef RTE_LIBRTE_BITRATE
bitrate_enabled = 0;
#endif
+#ifdef RTE_LIBRTE_LATENCY_STATS
+ latencystats_enabled = 0;
+#endif
argc -= diag;
argv += diag;
argc -= diag;
argv += diag;