From: Georgios Katsikas Date: Wed, 24 Jan 2018 11:53:36 +0000 (+0100) Subject: app/testpmd: move variables definition in source X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=63531389d5790fe3d1045ecbf1112b0aa70e8046;p=dpdk.git app/testpmd: move variables definition in source 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 --- diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index fc8effad9a..00cc6f49f9 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. diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 47f8fa8773..153abea050 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;