Setting tag sliver-openvswitch-2.2.90-1
[sliver-openvswitch.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 #ifdef DPDK_NETDEV
8
9 #include <rte_config.h>
10 #include <rte_eal.h>
11 #include <rte_debug.h>
12 #include <rte_ethdev.h>
13 #include <rte_errno.h>
14 #include <rte_memzone.h>
15 #include <rte_memcpy.h>
16 #include <rte_cycles.h>
17 #include <rte_spinlock.h>
18 #include <rte_launch.h>
19 #include <rte_malloc.h>
20
21 int dpdk_init(int argc, char **argv);
22 void netdev_dpdk_register(void);
23 void free_dpdk_buf(struct ofpbuf *);
24 int pmd_thread_setaffinity_cpu(int cpu);
25
26 #else
27
28 static inline int
29 dpdk_init(int arg1 OVS_UNUSED, char **arg2 OVS_UNUSED)
30 {
31     return 0;
32 }
33
34 static inline void
35 netdev_dpdk_register(void)
36 {
37     /* Nothing */
38 }
39
40 static inline void
41 free_dpdk_buf(struct ofpbuf *buf OVS_UNUSED)
42 {
43     /* Nothing */
44 }
45
46 static inline int
47 pmd_thread_setaffinity_cpu(int cpu OVS_UNUSED)
48 {
49     return 0;
50 }
51
52 #endif /* DPDK_NETDEV */
53 #endif