lib: Fix FreeBSD build.
[cascardo/ovs.git] / lib / netdev-dpdk.h
1 #ifndef NETDEV_DPDK_H
2 #define NETDEV_DPDK_H
3
4 #include <config.h>
5 #include "ofpbuf.h"
6
7 struct dpif_packet;
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_errno.h>
16 #include <rte_memzone.h>
17 #include <rte_memcpy.h>
18 #include <rte_cycles.h>
19 #include <rte_spinlock.h>
20 #include <rte_launch.h>
21 #include <rte_malloc.h>
22
23 int dpdk_init(int argc, char **argv);
24 void netdev_dpdk_register(void);
25 void free_dpdk_buf(struct dpif_packet *);
26 int pmd_thread_setaffinity_cpu(int cpu);
27
28 #else
29
30 static inline int
31 dpdk_init(int arg1 OVS_UNUSED, char **arg2 OVS_UNUSED)
32 {
33     return 0;
34 }
35
36 static inline void
37 netdev_dpdk_register(void)
38 {
39     /* Nothing */
40 }
41
42 static inline void
43 free_dpdk_buf(struct dpif_packet *buf OVS_UNUSED)
44 {
45     /* Nothing */
46 }
47
48 static inline int
49 pmd_thread_setaffinity_cpu(int cpu OVS_UNUSED)
50 {
51     return 0;
52 }
53
54 #endif /* DPDK_NETDEV */
55 #endif