FD.io VPP  v16.09
Vector Packet Processing
af_packet.c File Reference
+ Include dependency graph for af_packet.c:

Go to the source code of this file.

Macros

#define AF_PACKET_DEBUG_SOCKET   0
 
#define AF_PACKET_TX_FRAMES_PER_BLOCK   1024
 
#define AF_PACKET_TX_FRAME_SIZE   (2048 * 5)
 
#define AF_PACKET_TX_BLOCK_NR   1
 
#define AF_PACKET_TX_FRAME_NR
 
#define AF_PACKET_TX_BLOCK_SIZE
 
#define AF_PACKET_RX_FRAMES_PER_BLOCK   1024
 
#define AF_PACKET_RX_FRAME_SIZE   (2048 * 5)
 
#define AF_PACKET_RX_BLOCK_NR   1
 
#define AF_PACKET_RX_FRAME_NR
 
#define AF_PACKET_RX_BLOCK_SIZE
 
#define DBG_SOCK(args...)
 

Typedefs

typedef struct tpacket_req tpacket_req_t
 

Functions

unsigned int if_nametoindex (const char *ifname)
 
static u32 af_packet_eth_flag_change (vnet_main_t *vnm, vnet_hw_interface_t *hi, u32 flags)
 
static clib_error_taf_packet_fd_read_ready (unix_file_t *uf)
 
static int create_packet_v2_sock (u8 *name, tpacket_req_t *rx_req, tpacket_req_t *tx_req, int *fd, u8 **ring)
 
int af_packet_create_if (vlib_main_t *vm, u8 *host_if_name, u8 *hw_addr_set, u32 *sw_if_index)
 
int af_packet_delete_if (vlib_main_t *vm, u8 *host_if_name)
 
static clib_error_taf_packet_init (vlib_main_t *vm)
 

Macro Definition Documentation

#define AF_PACKET_DEBUG_SOCKET   0

Definition at line 30 of file af_packet.c.

#define AF_PACKET_RX_BLOCK_NR   1

Definition at line 42 of file af_packet.c.

#define AF_PACKET_RX_BLOCK_SIZE
Value:
#define AF_PACKET_RX_FRAMES_PER_BLOCK
Definition: af_packet.c:40
#define AF_PACKET_RX_FRAME_SIZE
Definition: af_packet.c:41

Definition at line 45 of file af_packet.c.

#define AF_PACKET_RX_FRAME_NR
Value:
#define AF_PACKET_RX_BLOCK_NR
Definition: af_packet.c:42
#define AF_PACKET_RX_FRAMES_PER_BLOCK
Definition: af_packet.c:40

Definition at line 43 of file af_packet.c.

#define AF_PACKET_RX_FRAME_SIZE   (2048 * 5)

Definition at line 41 of file af_packet.c.

#define AF_PACKET_RX_FRAMES_PER_BLOCK   1024

Definition at line 40 of file af_packet.c.

#define AF_PACKET_TX_BLOCK_NR   1

Definition at line 34 of file af_packet.c.

#define AF_PACKET_TX_BLOCK_SIZE
Value:
#define AF_PACKET_TX_FRAMES_PER_BLOCK
Definition: af_packet.c:32
#define AF_PACKET_TX_FRAME_SIZE
Definition: af_packet.c:33

Definition at line 37 of file af_packet.c.

#define AF_PACKET_TX_FRAME_NR
Value:
#define AF_PACKET_TX_BLOCK_NR
Definition: af_packet.c:34
#define AF_PACKET_TX_FRAMES_PER_BLOCK
Definition: af_packet.c:32

Definition at line 35 of file af_packet.c.

#define AF_PACKET_TX_FRAME_SIZE   (2048 * 5)

Definition at line 33 of file af_packet.c.

#define AF_PACKET_TX_FRAMES_PER_BLOCK   1024

Definition at line 32 of file af_packet.c.

#define DBG_SOCK (   args...)

Definition at line 51 of file af_packet.c.

Typedef Documentation

typedef struct tpacket_req tpacket_req_t

Definition at line 57 of file af_packet.c.

Function Documentation

int af_packet_create_if ( vlib_main_t vm,
u8 host_if_name,
u8 hw_addr_set,
u32 sw_if_index 
)

Definition at line 175 of file af_packet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int af_packet_delete_if ( vlib_main_t vm,
u8 host_if_name 
)

Definition at line 284 of file af_packet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 af_packet_eth_flag_change ( vnet_main_t vnm,
vnet_hw_interface_t hi,
u32  flags 
)
static

Definition at line 60 of file af_packet.c.

+ Here is the caller graph for this function:

static clib_error_t* af_packet_fd_read_ready ( unix_file_t uf)
static

Definition at line 68 of file af_packet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* af_packet_init ( vlib_main_t vm)
static

Definition at line 339 of file af_packet.c.

+ Here is the call graph for this function:

static int create_packet_v2_sock ( u8 name,
tpacket_req_t rx_req,
tpacket_req_t tx_req,
int *  fd,
u8 **  ring 
)
static

Definition at line 84 of file af_packet.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

unsigned int if_nametoindex ( const char *  ifname)

+ Here is the caller graph for this function: