[03/39] examples/l2fwd-event: move structures to common header
Checks
Commit Message
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Signed-off-by: Lukasz Bartosik <lbartosik@marvell.com>
---
examples/l2fwd-event/l2fwd_common.h | 12 ++++++++++++
examples/l2fwd-event/main.c | 10 ----------
2 files changed, 12 insertions(+), 10 deletions(-)
@@ -22,4 +22,16 @@
#define MAX_TIMER_PERIOD 86400 /* 1 day max */
+struct lcore_queue_conf {
+ unsigned int n_rx_port;
+ unsigned int 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_ */
@@ -61,10 +61,6 @@ static uint32_t l2fwd_dst_ports[RTE_MAX_ETHPORTS];
static unsigned int l2fwd_rx_queue_per_lcore = 1;
-struct lcore_queue_conf {
- unsigned int n_rx_port;
- unsigned int 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];
@@ -80,12 +76,6 @@ static struct rte_eth_conf port_conf = {
struct rte_mempool *l2fwd_pktmbuf_pool;
-/* 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 */