Branch data Line data Source code
1 : : #ifndef NETDEV_DPDK_H
2 : : #define NETDEV_DPDK_H
3 : :
4 : : #include <config.h>
5 : :
6 : : struct dp_packet;
7 : : struct smap;
8 : :
9 : : #ifdef DPDK_NETDEV
10 : :
11 : : #include <rte_config.h>
12 : : #include <rte_eal.h>
13 : : #include <rte_debug.h>
14 : : #include <rte_ethdev.h>
15 : : #include <rte_eth_ring.h>
16 : : #include <rte_errno.h>
17 : : #include <rte_memzone.h>
18 : : #include <rte_memcpy.h>
19 : : #include <rte_cycles.h>
20 : : #include <rte_spinlock.h>
21 : : #include <rte_launch.h>
22 : : #include <rte_malloc.h>
23 : :
24 : : #define NON_PMD_CORE_ID LCORE_ID_ANY
25 : :
26 : : void netdev_dpdk_register(void);
27 : : void free_dpdk_buf(struct dp_packet *);
28 : : void dpdk_set_lcore_id(unsigned cpu);
29 : :
30 : : #else
31 : :
32 : : #define NON_PMD_CORE_ID UINT32_MAX
33 : :
34 : : #include "util.h"
35 : :
36 : : static inline void
37 : : netdev_dpdk_register(void)
38 : : {
39 : : /* Nothing */
40 : : }
41 : :
42 : : static inline void
43 : 0 : free_dpdk_buf(struct dp_packet *buf OVS_UNUSED)
44 : : {
45 : : /* Nothing */
46 : 0 : }
47 : :
48 : : static inline void
49 : 53 : dpdk_set_lcore_id(unsigned cpu OVS_UNUSED)
50 : : {
51 : : /* Nothing */
52 : 53 : }
53 : :
54 : : #endif /* DPDK_NETDEV */
55 : :
56 : : void dpdk_init(const struct smap *ovs_other_config);
57 : :
58 : : #endif
|