X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl2fwd-event%2Fl2fwd_common.h;h=396e238c6a2b9334a524511046311ff9c4806947;hb=79aab97c94024c4f969308ec806efb168cccc83d;hp=cecbd9b70e314efbbee55f5a7e1e67106fcfe246;hpb=04d43857ea3acbd4db4b28939dc2807932b85e72;p=dpdk.git diff --git a/examples/l2fwd-event/l2fwd_common.h b/examples/l2fwd-event/l2fwd_common.h index cecbd9b70e..396e238c6a 100644 --- a/examples/l2fwd-event/l2fwd_common.h +++ b/examples/l2fwd-event/l2fwd_common.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -56,6 +55,9 @@ #define DEFAULT_TIMER_PERIOD 10 /* default period is 10 seconds */ #define MAX_TIMER_PERIOD 86400 /* 1 day max */ +#define VECTOR_SIZE_DEFAULT MAX_PKT_BURST +#define VECTOR_TMO_NS_DEFAULT 1E6 /* 1ms */ + /* Per-port statistics struct */ struct l2fwd_port_statistics { uint64_t dropped; @@ -63,6 +65,13 @@ struct l2fwd_port_statistics { uint64_t rx; } __rte_cache_aligned; +/* Event vector attributes */ +struct l2fwd_event_vector_params { + uint8_t enabled; + uint16_t size; + uint64_t timeout_ns; +}; + struct l2fwd_resources { volatile uint8_t force_quit; uint8_t event_mode; @@ -75,9 +84,11 @@ struct l2fwd_resources { uint32_t enabled_port_mask; uint64_t timer_period; struct rte_mempool *pktmbuf_pool; + struct rte_mempool *evt_vec_pool; uint32_t dst_ports[RTE_MAX_ETHPORTS]; struct rte_ether_addr eth_addr[RTE_MAX_ETHPORTS]; struct l2fwd_port_statistics port_stats[RTE_MAX_ETHPORTS]; + struct l2fwd_event_vector_params evt_vec; void *evt_rsrc; void *poll_rsrc; } __rte_cache_aligned;