FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
avf.h File Reference
+ Include dependency graph for avf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  avf_rx_desc_t
 
struct  avf_tx_desc_t
 
struct  avf_rxq_t
 
struct  avf_txq_t
 
struct  avf_device_t
 
struct  avf_rx_tail_t
 
struct  avf_per_thread_data_t
 
struct  avf_main_t
 
struct  avf_create_if_args_t
 
struct  avf_input_trace_t
 

Macros

#define AVF_RXD_STATUS(x)   (1ULL << x)
 
#define AVF_RXD_STATUS_DD   AVF_RXD_STATUS(0)
 
#define AVF_RXD_STATUS_EOP   AVF_RXD_STATUS(1)
 
#define AVF_RXD_ERROR_SHIFT   19
 
#define AVF_RXD_PTYPE_SHIFT   30
 
#define AVF_RXD_LEN_SHIFT   38
 
#define AVF_RX_MAX_DESC_IN_CHAIN   5
 
#define AVF_RXD_ERROR_IPE   (1ULL << (AVF_RXD_ERROR_SHIFT + 3))
 
#define AVF_RXD_ERROR_L4E   (1ULL << (AVF_RXD_ERROR_SHIFT + 4))
 
#define AVF_TXD_CMD(x)   (1 << (x + 4))
 
#define AVF_TXD_CMD_EOP   AVF_TXD_CMD(0)
 
#define AVF_TXD_CMD_RS   AVF_TXD_CMD(1)
 
#define AVF_TXD_CMD_RSV   AVF_TXD_CMD(2)
 
#define foreach_avf_device_flags
 
#define AVF_RX_VECTOR_SZ   VLIB_FRAME_SIZE
 
#define foreach_avf_tx_func_error   _(NO_FREE_SLOTS, "no free tx slots")
 

Enumerations

enum  { foreach_avf_device_flags }
 
enum  { AVF_PROCESS_EVENT_START = 1, AVF_PROCESS_EVENT_STOP = 2, AVF_PROCESS_EVENT_AQ_INT = 3 }
 
enum  avf_tx_func_error_t { AVF_TX_N_ERROR }
 

Functions

 STATIC_ASSERT_SIZEOF (avf_rx_desc_t, 32)
 
 STATIC_ASSERT_SIZEOF (avf_tx_desc_t, 16)
 
void avf_create_if (vlib_main_t *vm, avf_create_if_args_t *args)
 
void avf_delete_if (vlib_main_t *vm, avf_device_t *ad)
 
static u32 avf_get_u32 (void *start, int offset)
 
static u64 avf_get_u64 (void *start, int offset)
 
static u32 avf_get_u32_bits (void *start, int offset, int first, int last)
 
static u64 avf_get_u64_bits (void *start, int offset, int first, int last)
 
static void avf_set_u32 (void *start, int offset, u32 value)
 
static void avf_reg_write (avf_device_t *ad, u32 addr, u32 val)
 
static u32 avf_reg_read (avf_device_t *ad, u32 addr)
 
static void avf_reg_flush (avf_device_t *ad)
 
static_always_inline int avf_rxd_is_not_eop (avf_rx_desc_t *d)
 
static_always_inline int avf_rxd_is_not_dd (avf_rx_desc_t *d)
 

Variables

enum { ... }  avf_process_event_t
 
avf_main_t avf_main
 
vlib_node_registration_t avf_input_node
 (constructor) VLIB_REGISTER_NODE (avf_input_node) More...
 
vnet_device_class_t avf_device_class
 
format_function_t format_avf_device
 
format_function_t format_avf_device_name
 
format_function_t format_avf_input_trace
 

Macro Definition Documentation

◆ AVF_RX_MAX_DESC_IN_CHAIN

#define AVF_RX_MAX_DESC_IN_CHAIN   5

Definition at line 31 of file avf.h.

◆ AVF_RX_VECTOR_SZ

#define AVF_RX_VECTOR_SZ   VLIB_FRAME_SIZE

Definition at line 168 of file avf.h.

◆ AVF_RXD_ERROR_IPE

#define AVF_RXD_ERROR_IPE   (1ULL << (AVF_RXD_ERROR_SHIFT + 3))

Definition at line 33 of file avf.h.

◆ AVF_RXD_ERROR_L4E

#define AVF_RXD_ERROR_L4E   (1ULL << (AVF_RXD_ERROR_SHIFT + 4))

Definition at line 34 of file avf.h.

◆ AVF_RXD_ERROR_SHIFT

#define AVF_RXD_ERROR_SHIFT   19

Definition at line 28 of file avf.h.

◆ AVF_RXD_LEN_SHIFT

#define AVF_RXD_LEN_SHIFT   38

Definition at line 30 of file avf.h.

◆ AVF_RXD_PTYPE_SHIFT

#define AVF_RXD_PTYPE_SHIFT   30

Definition at line 29 of file avf.h.

◆ AVF_RXD_STATUS

#define AVF_RXD_STATUS (   x)    (1ULL << x)

Definition at line 25 of file avf.h.

◆ AVF_RXD_STATUS_DD

#define AVF_RXD_STATUS_DD   AVF_RXD_STATUS(0)

Definition at line 26 of file avf.h.

◆ AVF_RXD_STATUS_EOP

#define AVF_RXD_STATUS_EOP   AVF_RXD_STATUS(1)

Definition at line 27 of file avf.h.

◆ AVF_TXD_CMD

#define AVF_TXD_CMD (   x)    (1 << (x + 4))

Definition at line 36 of file avf.h.

◆ AVF_TXD_CMD_EOP

#define AVF_TXD_CMD_EOP   AVF_TXD_CMD(0)

Definition at line 37 of file avf.h.

◆ AVF_TXD_CMD_RS

#define AVF_TXD_CMD_RS   AVF_TXD_CMD(1)

Definition at line 38 of file avf.h.

◆ AVF_TXD_CMD_RSV

#define AVF_TXD_CMD_RSV   AVF_TXD_CMD(2)

Definition at line 39 of file avf.h.

◆ foreach_avf_device_flags

#define foreach_avf_device_flags
Value:
_(0, INITIALIZED, "initialized") \
_(1, ERROR, "error") \
_(2, ADMIN_UP, "admin-up") \
_(3, VA_DMA, "vaddr-dma") \
_(4, LINK_UP, "link-up") \
_(5, SHARED_TXQ_LOCK, "shared-txq-lock") \
_(6, ELOG, "elog")
#define ELOG(em, f, data)
Definition: elog.h:474

Definition at line 41 of file avf.h.

◆ foreach_avf_tx_func_error

#define foreach_avf_tx_func_error   _(NO_FREE_SLOTS, "no free tx slots")

Definition at line 307 of file avf.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
foreach_avf_device_flags 

Definition at line 50 of file avf.h.

◆ anonymous enum

anonymous enum
Enumerator
AVF_PROCESS_EVENT_START 
AVF_PROCESS_EVENT_STOP 
AVF_PROCESS_EVENT_AQ_INT 

Definition at line 170 of file avf.h.

◆ avf_tx_func_error_t

Enumerator
AVF_TX_N_ERROR 

Definition at line 310 of file avf.h.

Function Documentation

◆ avf_create_if()

void avf_create_if ( vlib_main_t vm,
avf_create_if_args_t args 
)

Definition at line 1191 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avf_delete_if()

void avf_delete_if ( vlib_main_t vm,
avf_device_t ad 
)

Definition at line 1134 of file device.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avf_get_u32()

static u32 avf_get_u32 ( void *  start,
int  offset 
)
inlinestatic

Definition at line 230 of file avf.h.

+ Here is the caller graph for this function:

◆ avf_get_u32_bits()

static u32 avf_get_u32_bits ( void *  start,
int  offset,
int  first,
int  last 
)
inlinestatic

Definition at line 242 of file avf.h.

+ Here is the call graph for this function:

◆ avf_get_u64()

static u64 avf_get_u64 ( void *  start,
int  offset 
)
inlinestatic

Definition at line 236 of file avf.h.

+ Here is the caller graph for this function:

◆ avf_get_u64_bits()

static u64 avf_get_u64_bits ( void *  start,
int  offset,
int  first,
int  last 
)
inlinestatic

Definition at line 253 of file avf.h.

+ Here is the call graph for this function:

◆ avf_reg_flush()

static void avf_reg_flush ( avf_device_t ad)
inlinestatic

Definition at line 282 of file avf.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ avf_reg_read()

static u32 avf_reg_read ( avf_device_t ad,
u32  addr 
)
inlinestatic

Definition at line 276 of file avf.h.

+ Here is the caller graph for this function:

◆ avf_reg_write()

static void avf_reg_write ( avf_device_t ad,
u32  addr,
u32  val 
)
inlinestatic

Definition at line 270 of file avf.h.

+ Here is the caller graph for this function:

◆ avf_rxd_is_not_dd()

static_always_inline int avf_rxd_is_not_dd ( avf_rx_desc_t d)

Definition at line 295 of file avf.h.

+ Here is the caller graph for this function:

◆ avf_rxd_is_not_eop()

static_always_inline int avf_rxd_is_not_eop ( avf_rx_desc_t d)

Definition at line 289 of file avf.h.

+ Here is the caller graph for this function:

◆ avf_set_u32()

static void avf_set_u32 ( void *  start,
int  offset,
u32  value 
)
inlinestatic

Definition at line 264 of file avf.h.

◆ STATIC_ASSERT_SIZEOF() [1/2]

STATIC_ASSERT_SIZEOF ( avf_rx_desc_t  ,
32   
)

◆ STATIC_ASSERT_SIZEOF() [2/2]

STATIC_ASSERT_SIZEOF ( avf_tx_desc_t  ,
16   
)

Variable Documentation

◆ avf_device_class

vnet_device_class_t avf_device_class

◆ avf_input_node

vlib_node_registration_t avf_input_node

(constructor) VLIB_REGISTER_NODE (avf_input_node)

Definition at line 448 of file input.c.

◆ avf_main

avf_main_t avf_main

Definition at line 37 of file device.c.

◆ avf_process_event_t

enum { ... } avf_process_event_t

◆ format_avf_device

format_function_t format_avf_device

Definition at line 225 of file avf.h.

◆ format_avf_device_name

format_function_t format_avf_device_name

Definition at line 226 of file avf.h.

◆ format_avf_input_trace

format_function_t format_avf_input_trace

Definition at line 227 of file avf.h.