FD.io VPP  v16.06
Vector Packet Processing
netmap.h File Reference
+ Include dependency graph for netmap.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  netmap_if_t
 
struct  netmap_mem_region_t
 
struct  netmap_main_t
 

Macros

#define NETMAP_IF(_base, _ofs)   _NETMAP_OFFSET(struct netmap_if *, _base, _ofs)
 
#define NETMAP_TXRING(nifp, index)
 
#define NETMAP_RXRING(nifp, index)
 
#define NETMAP_BUF(ring, index)   ((char *)(ring) + (ring)->buf_ofs + ((index)*(ring)->nr_buf_size))
 
#define NETMAP_BUF_IDX(ring, buf)
 

Functions

int netmap_create_if (vlib_main_t *vm, u8 *host_if_name, u8 *hw_addr_set, u8 is_pipe, u8 is_master)
 
int netmap_delete_if (vlib_main_t *vm, u8 *host_if_name)
 
static uint32_t nm_ring_next (struct netmap_ring *ring, uint32_t i)
 
static int nm_tx_pending (struct netmap_ring *ring)
 
static uint32_t nm_ring_space (struct netmap_ring *ring)
 

Variables

netmap_main_t netmap_main
 
vnet_device_class_t netmap_device_class
 
vlib_node_registration_t netmap_input_node
 (constructor) VLIB_REGISTER_NODE (netmap_input_node) More...
 

Macro Definition Documentation

#define NETMAP_BUF (   ring,
  index 
)    ((char *)(ring) + (ring)->buf_ofs + ((index)*(ring)->nr_buf_size))

Definition at line 115 of file netmap.h.

#define NETMAP_BUF_IDX (   ring,
  buf 
)
Value:
( ((char *)(buf) - ((char *)(ring) + (ring)->buf_ofs) ) / \
(ring)->nr_buf_size )

Definition at line 118 of file netmap.h.

#define NETMAP_IF (   _base,
  _ofs 
)    _NETMAP_OFFSET(struct netmap_if *, _base, _ofs)

Definition at line 107 of file netmap.h.

#define NETMAP_RXRING (   nifp,
  index 
)
Value:
_NETMAP_OFFSET(struct netmap_ring *, \
nifp, (nifp)->ring_ofs[index + (nifp)->ni_tx_rings + 1] )

Definition at line 112 of file netmap.h.

#define NETMAP_TXRING (   nifp,
  index 
)
Value:
_NETMAP_OFFSET(struct netmap_ring *, \
nifp, (nifp)->ring_ofs[index] )

Definition at line 109 of file netmap.h.

Function Documentation

int netmap_create_if ( vlib_main_t vm,
u8 host_if_name,
u8 hw_addr_set,
u8  is_pipe,
u8  is_master 
)

Definition at line 82 of file netmap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int netmap_delete_if ( vlib_main_t vm,
u8 host_if_name 
)

Definition at line 205 of file netmap.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint32_t nm_ring_next ( struct netmap_ring ring,
uint32_t  i 
)
inlinestatic

Definition at line 123 of file netmap.h.

+ Here is the caller graph for this function:

static uint32_t nm_ring_space ( struct netmap_ring ring)
inlinestatic

Definition at line 140 of file netmap.h.

+ Here is the caller graph for this function:

static int nm_tx_pending ( struct netmap_ring ring)
inlinestatic

Definition at line 134 of file netmap.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vnet_device_class_t netmap_device_class
vlib_node_registration_t netmap_input_node

(constructor) VLIB_REGISTER_NODE (netmap_input_node)

Definition at line 269 of file node.c.

netmap_main_t netmap_main

Definition at line 94 of file netmap.h.