DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: move variables definition in source
@ 2018-01-24 11:53 Georgios P. Katsikas
  2018-01-30  8:25 ` Georgios Katsikas
  2018-01-31 22:18 ` Thomas Monjalon
  0 siblings, 2 replies; 3+ messages in thread
From: Georgios P. Katsikas @ 2018-01-24 11:53 UTC (permalink / raw)
  To: wenzhuo.lu, jingjing.wu; +Cc: dev, Georgios Katsikas

From: Georgios Katsikas <katsikas.gp@gmail.com>

This patch moves the definition of 3 variables in testpmd.h
into the respective .c file. The idea behind this move is
to allow external applications to compile against testpmd
without throwing compilation errors related to multiple
definition of variables.

Also, an extern dcb_q_mapping in testpmd.h is removed
since it appears that this variable is not defined
elsewhere in the tree.

Signed-off-by: Georgios Katsikas <katsikas.gp@gmail.com>
---
 app/test-pmd/testpmd.c | 18 ++++++++++++++++++
 app/test-pmd/testpmd.h |  7 +++----
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5dc8cca..02e8787 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -91,6 +91,24 @@ uint8_t socket_num = UMA_NO_CONFIG;
 uint8_t mp_anon = 0;
 
 /*
+ * Store specified sockets on which memory pool to be used by ports
+ * is allocated.
+ */
+uint8_t port_numa[RTE_MAX_ETHPORTS];
+
+/*
+ * Store specified sockets on which RX ring to be used by ports
+ * is allocated.
+ */
+uint8_t rxring_numa[RTE_MAX_ETHPORTS];
+
+/*
+ * Store specified sockets on which TX ring to be used by ports
+ * is allocated.
+ */
+uint8_t txring_numa[RTE_MAX_ETHPORTS];
+
+/*
  * Record the Ethernet address of peer target ports to which packets are
  * forwarded.
  * Must be instantiated with the ethernet addresses of peer traffic generator
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 47f8fa8..153abea 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -329,19 +329,19 @@ extern uint32_t bypass_timeout; /**< Store the NIC bypass watchdog timeout */
  * Store specified sockets on which memory pool to be used by ports
  * is allocated.
  */
-uint8_t port_numa[RTE_MAX_ETHPORTS];
+extern uint8_t port_numa[RTE_MAX_ETHPORTS];
 
 /*
  * Store specified sockets on which RX ring to be used by ports
  * is allocated.
  */
-uint8_t rxring_numa[RTE_MAX_ETHPORTS];
+extern uint8_t rxring_numa[RTE_MAX_ETHPORTS];
 
 /*
  * Store specified sockets on which TX ring to be used by ports
  * is allocated.
  */
-uint8_t txring_numa[RTE_MAX_ETHPORTS];
+extern uint8_t txring_numa[RTE_MAX_ETHPORTS];
 
 extern uint8_t socket_num;
 
@@ -384,7 +384,6 @@ extern int16_t tx_rs_thresh;
 
 extern uint8_t dcb_config;
 extern uint8_t dcb_test;
-extern enum dcb_queue_mapping_mode dcb_q_mapping;
 
 extern uint16_t mbuf_data_size; /**< Mbuf data space size. */
 extern uint32_t param_total_num_mbufs;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-31 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 11:53 [dpdk-dev] [PATCH] app/testpmd: move variables definition in source Georgios P. Katsikas
2018-01-30  8:25 ` Georgios Katsikas
2018-01-31 22:18 ` Thomas Monjalon

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).