X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fl3fwd%2Fl3fwd_event.h;h=0e46164170c2466de3e17374f0bb9740ebf15ae5;hb=366a0500f432a862f37ab2ca220e60f5654eadd7;hp=d25c8d22234995f4441d20aa5d4afaa49dc55972;hpb=9176e1fceb742af235b32a4decc09be9e5a814b6;p=dpdk.git diff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h index d25c8d2223..0e46164170 100644 --- a/examples/l3fwd/l3fwd_event.h +++ b/examples/l3fwd/l3fwd_event.h @@ -7,17 +7,47 @@ #include #include +#include #include +#include #include #include "l3fwd.h" +#define L3FWD_EVENT_SINGLE 0x1 +#define L3FWD_EVENT_BURST 0x2 +#define L3FWD_EVENT_TX_DIRECT 0x4 +#define L3FWD_EVENT_TX_ENQ 0x8 + typedef uint32_t (*event_device_setup_cb)(void); typedef void (*event_queue_setup_cb)(uint32_t event_queue_cfg); typedef void (*event_port_setup_cb)(void); typedef void (*adapter_setup_cb)(void); typedef int (*event_loop_cb)(void *); +struct l3fwd_event_queues { + uint8_t *event_q_id; + uint8_t nb_queues; +}; + +struct l3fwd_event_ports { + uint8_t *event_p_id; + uint8_t nb_ports; + rte_spinlock_t lock; +}; + +struct l3fwd_event_rx_adptr { + uint32_t service_id; + uint8_t nb_rx_adptr; + uint8_t *rx_adptr; +}; + +struct l3fwd_event_tx_adptr { + uint32_t service_id; + uint8_t nb_tx_adptr; + uint8_t *tx_adptr; +}; + struct l3fwd_event_setup_ops { event_device_setup_cb event_device_setup; event_queue_setup_cb event_queue_setup; @@ -28,15 +58,28 @@ struct l3fwd_event_setup_ops { }; struct l3fwd_event_resources { + struct rte_event_port_conf def_p_conf; + struct l3fwd_event_rx_adptr rx_adptr; + struct l3fwd_event_tx_adptr tx_adptr; + uint8_t disable_implicit_release; struct l3fwd_event_setup_ops ops; + struct rte_mempool * (*pkt_pool)[NB_SOCKETS]; + struct l3fwd_event_queues evq; + struct l3fwd_event_ports evp; + uint32_t port_mask; + uint8_t per_port_pool; + uint8_t event_d_id; uint8_t sched_type; uint8_t tx_mode_q; + uint8_t deq_depth; + uint8_t has_burst; uint8_t enabled; uint8_t eth_rx_queues; }; struct l3fwd_event_resources *l3fwd_get_eventdev_rsrc(void); -void l3fwd_event_resource_setup(void); +void l3fwd_event_resource_setup(struct rte_eth_conf *port_conf); +int l3fwd_get_free_event_port(struct l3fwd_event_resources *eventdev_rsrc); void l3fwd_event_set_generic_ops(struct l3fwd_event_setup_ops *ops); void l3fwd_event_set_internal_port_ops(struct l3fwd_event_setup_ops *ops);