1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2019 Marvell International Ltd.
8 #include <rte_atomic.h>
9 #include <rte_cycles.h>
10 #include <rte_ethdev.h>
11 #include <rte_eventdev.h>
12 #include <rte_event_eth_rx_adapter.h>
13 #include <rte_event_eth_tx_adapter.h>
14 #include <rte_lcore.h>
15 #include <rte_malloc.h>
16 #include <rte_spinlock.h>
18 #include "l2fwd_event.h"
21 l2fwd_event_resource_setup(struct l2fwd_resources *rsrc)
23 struct l2fwd_event_resources *evt_rsrc;
25 if (!rte_event_dev_count())
26 rte_panic("No Eventdev found\n");
28 evt_rsrc = rte_zmalloc("l2fwd_event",
29 sizeof(struct l2fwd_event_resources), 0);
31 rte_panic("Failed to allocate memory\n");
33 rsrc->evt_rsrc = evt_rsrc;