[dpdk-dev,03/15] examples/l2fwd: move structure definitions to common header
Checks
Commit Message
Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
examples/l2fwd/l2fwd_common.h | 12 ++++++++++++
examples/l2fwd/main.c | 10 ----------
2 files changed, 12 insertions(+), 10 deletions(-)
@@ -21,4 +21,16 @@
#define MAX_TIMER_PERIOD 86400 /* 1 day max */
+struct lcore_queue_conf {
+ unsigned n_rx_port;
+ unsigned rx_port_list[MAX_RX_QUEUE_PER_LCORE];
+} __rte_cache_aligned;
+
+/* Per-port statistics struct */
+struct l2fwd_port_statistics {
+ uint64_t tx;
+ uint64_t rx;
+ uint64_t dropped;
+} __rte_cache_aligned;
+
#endif /* _L2FWD_COMMON_H_ */
@@ -60,10 +60,6 @@ static uint32_t l2fwd_dst_ports[RTE_MAX_ETHPORTS];
static unsigned int l2fwd_rx_queue_per_lcore = 1;
-struct lcore_queue_conf {
- unsigned n_rx_port;
- unsigned rx_port_list[MAX_RX_QUEUE_PER_LCORE];
-} __rte_cache_aligned;
struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE];
static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS];
@@ -81,12 +77,6 @@ static struct rte_eth_conf port_conf = {
struct rte_mempool * l2fwd_pktmbuf_pool = NULL;
-/* Per-port statistics struct */
-struct l2fwd_port_statistics {
- uint64_t tx;
- uint64_t rx;
- uint64_t dropped;
-} __rte_cache_aligned;
struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS];
/* A tsc-based timer responsible for triggering statistics printout */