1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2019 Marvell International Ltd.
5 #ifndef __L2FWD_EVENT_H__
6 #define __L2FWD_EVENT_H__
8 #include <rte_common.h>
9 #include <rte_event_eth_rx_adapter.h>
10 #include <rte_event_eth_tx_adapter.h>
12 #include <rte_spinlock.h>
14 #include "l2fwd_common.h"
16 typedef uint32_t (*event_device_setup_cb)(struct l2fwd_resources *rsrc);
17 typedef void (*event_port_setup_cb)(struct l2fwd_resources *rsrc);
18 typedef void (*event_queue_setup_cb)(struct l2fwd_resources *rsrc,
19 uint32_t event_queue_cfg);
20 typedef void (*adapter_setup_cb)(struct l2fwd_resources *rsrc);
21 typedef void (*event_loop_cb)(struct l2fwd_resources *rsrc);
34 struct event_rx_adptr {
40 struct event_tx_adptr {
46 struct event_setup_ops {
47 event_device_setup_cb event_device_setup;
48 event_queue_setup_cb event_queue_setup;
49 event_port_setup_cb event_port_setup;
50 adapter_setup_cb adapter_setup;
51 event_loop_cb l2fwd_event_loop;
54 struct l2fwd_event_resources {
59 uint8_t disable_implicit_release;
60 struct event_ports evp;
61 struct event_queues evq;
62 struct event_setup_ops ops;
63 struct event_rx_adptr rx_adptr;
64 struct event_tx_adptr tx_adptr;
65 struct rte_event_port_conf def_p_conf;
68 void l2fwd_event_resource_setup(struct l2fwd_resources *rsrc);
69 void l2fwd_event_set_generic_ops(struct event_setup_ops *ops);
70 void l2fwd_event_set_internal_port_ops(struct event_setup_ops *ops);
71 void l2fwd_event_service_setup(struct l2fwd_resources *rsrc);
73 #endif /* __L2FWD_EVENT_H__ */