2014-03-24 19:23:08 -07:00
|
|
|
#ifndef NETDEV_DPDK_H
|
|
|
|
#define NETDEV_DPDK_H
|
|
|
|
|
|
|
|
#include <config.h>
|
2014-03-24 21:10:39 -07:00
|
|
|
|
2015-02-25 12:01:53 -08:00
|
|
|
struct dp_packet;
|
2016-04-29 13:44:01 -04:00
|
|
|
struct smap;
|
2014-06-23 11:43:57 -07:00
|
|
|
|
2014-03-24 21:10:39 -07:00
|
|
|
#ifdef DPDK_NETDEV
|
2014-03-24 19:23:08 -07:00
|
|
|
|
|
|
|
#include <rte_config.h>
|
|
|
|
#include <rte_eal.h>
|
|
|
|
#include <rte_debug.h>
|
|
|
|
#include <rte_ethdev.h>
|
2014-07-11 13:37:11 +01:00
|
|
|
#include <rte_eth_ring.h>
|
2014-03-24 19:23:08 -07:00
|
|
|
#include <rte_errno.h>
|
|
|
|
#include <rte_memzone.h>
|
|
|
|
#include <rte_memcpy.h>
|
|
|
|
#include <rte_cycles.h>
|
|
|
|
#include <rte_spinlock.h>
|
|
|
|
#include <rte_launch.h>
|
|
|
|
#include <rte_malloc.h>
|
|
|
|
|
2015-05-22 17:14:20 +01:00
|
|
|
#define NON_PMD_CORE_ID LCORE_ID_ANY
|
|
|
|
|
2014-03-24 19:23:08 -07:00
|
|
|
void netdev_dpdk_register(void);
|
2015-02-25 12:01:53 -08:00
|
|
|
void free_dpdk_buf(struct dp_packet *);
|
2016-06-06 17:05:49 -07:00
|
|
|
void dpdk_set_lcore_id(unsigned cpu);
|
2014-03-24 19:23:08 -07:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
2015-05-22 17:14:20 +01:00
|
|
|
#define NON_PMD_CORE_ID UINT32_MAX
|
|
|
|
|
2014-09-30 09:57:08 -07:00
|
|
|
#include "util.h"
|
|
|
|
|
2014-03-24 21:10:39 -07:00
|
|
|
static inline void
|
|
|
|
netdev_dpdk_register(void)
|
|
|
|
{
|
|
|
|
/* Nothing */
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
2015-02-25 12:01:53 -08:00
|
|
|
free_dpdk_buf(struct dp_packet *buf OVS_UNUSED)
|
2014-03-24 21:10:39 -07:00
|
|
|
{
|
|
|
|
/* Nothing */
|
|
|
|
}
|
|
|
|
|
2016-06-06 17:05:49 -07:00
|
|
|
static inline void
|
|
|
|
dpdk_set_lcore_id(unsigned cpu OVS_UNUSED)
|
2014-03-24 21:10:39 -07:00
|
|
|
{
|
2016-06-06 17:05:49 -07:00
|
|
|
/* Nothing */
|
2014-03-24 21:10:39 -07:00
|
|
|
}
|
2014-03-24 19:23:08 -07:00
|
|
|
|
|
|
|
#endif /* DPDK_NETDEV */
|
2016-04-29 13:44:01 -04:00
|
|
|
|
|
|
|
void dpdk_init(const struct smap *ovs_other_config);
|
|
|
|
|
2014-03-24 19:23:08 -07:00
|
|
|
#endif
|