]>
git.proxmox.com Git - mirror_ovs.git/blob - lib/netdev-dpdk.h
8 /* Reserves cpu core 0 for all non-pmd threads. Changing the value of this
9 * macro will allow pmd thread to be pinned on cpu core 0. This may not be
10 * ideal since the core may be non-isolated. */
11 #define NON_PMD_CORE_ID 0
15 #include <rte_config.h>
17 #include <rte_debug.h>
18 #include <rte_ethdev.h>
19 #include <rte_eth_ring.h>
20 #include <rte_errno.h>
21 #include <rte_memzone.h>
22 #include <rte_memcpy.h>
23 #include <rte_cycles.h>
24 #include <rte_spinlock.h>
25 #include <rte_launch.h>
26 #include <rte_malloc.h>
28 int dpdk_init(int argc
, char **argv
);
29 void netdev_dpdk_register(void);
30 void free_dpdk_buf(struct dpif_packet
*);
31 int pmd_thread_setaffinity_cpu(int cpu
);
32 void thread_set_nonpmd(void);
39 dpdk_init(int argc
, char **argv
)
41 if (argc
>= 2 && !strcmp(argv
[1], "--dpdk")) {
42 ovs_fatal(0, "DPDK support not built into this copy of Open vSwitch.");
48 netdev_dpdk_register(void)
54 free_dpdk_buf(struct dpif_packet
*buf OVS_UNUSED
)
60 pmd_thread_setaffinity_cpu(int cpu OVS_UNUSED
)
66 thread_set_nonpmd(void)
71 #endif /* DPDK_NETDEV */