dpif-netdev: Avoid variable length array on MSVC.
[cascardo/ovs.git] / lib / netdev-dpdk.h
1 #ifndef NETDEV_DPDK_H
2 #define NETDEV_DPDK_H
3
4 #include <config.h>
5
6 struct dpif_packet;
7
8 #ifdef DPDK_NETDEV
9
10 #include <rte_config.h>
11 #include <rte_eal.h>
12 #include <rte_debug.h>
13 #include <rte_ethdev.h>
14 #include <rte_eth_ring.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 void thread_set_nonpmd(void);
28
29 #else
30
31 static inline int
32 dpdk_init(int arg1 OVS_UNUSED, char **arg2 OVS_UNUSED)
33 {
34     return 0;
35 }
36
37 static inline void
38 netdev_dpdk_register(void)
39 {
40     /* Nothing */
41 }
42
43 static inline void
44 free_dpdk_buf(struct dpif_packet *buf OVS_UNUSED)
45 {
46     /* Nothing */
47 }
48
49 static inline int
50 pmd_thread_setaffinity_cpu(int cpu OVS_UNUSED)
51 {
52     return 0;
53 }
54
55 static inline void
56 thread_set_nonpmd(void)
57 {
58     /* Nothing */
59 }
60
61 #endif /* DPDK_NETDEV */
62 #endif