* SUCH DAMAGE.
*/
-#include <stdint.h>
-#include <net/if.h>
-#include <sys/ioctl.h>
-#include <vnet/devices/netmap/net_netmap.h>
-
typedef struct {
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0);
u8 * host_if_name;
extern vnet_device_class_t netmap_device_class;
extern vlib_node_registration_t netmap_input_node;
-int netmap_create_if(vlib_main_t * vm, u8 * host_if_name, u8 * hw_addr_set, u8 is_pipe, u8 is_master);
+int netmap_create_if(vlib_main_t * vm, u8 * host_if_name, u8 * hw_addr_set,
+ u8 is_pipe, u8 is_master, u32 *sw_if_index);
int netmap_delete_if(vlib_main_t * vm, u8 * host_if_name);
/* Macros and helper functions from sys/net/netmap_user.h */
+#ifdef _NET_NETMAP_H_
+
#define _NETMAP_OFFSET(type, ptr, offset) \
((type)(void *)((char *)(ptr) + (offset)))
static inline uint32_t
nm_ring_next(struct netmap_ring *ring, uint32_t i)
{
- return ( unlikely(i + 1 == ring->num_slots) ? 0 : i + 1);
+ return ( PREDICT_FALSE(i + 1 == ring->num_slots) ? 0 : i + 1);
}
ret += ring->num_slots;
return ret;
}
-
+#endif