FD.io VPP  v19.08-27-gf4dcae4
Vector Packet Processing
device.c File Reference
+ Include dependency graph for device.c:

Go to the source code of this file.

Data Structures

struct  virtchnl_promisc_info_t
 

Macros

#define AVF_MBOX_LEN   64
 
#define AVF_MBOX_BUF_SZ   512
 
#define AVF_RXQ_SZ   512
 
#define AVF_TXQ_SZ   512
 
#define AVF_ITR_INT   8160
 
#define PCI_VENDOR_ID_INTEL   0x8086
 
#define PCI_DEVICE_ID_INTEL_AVF   0x1889
 
#define PCI_DEVICE_ID_INTEL_X710_VF   0x154c
 
#define PCI_DEVICE_ID_INTEL_X722_VF   0x37cd
 

Functions

static void avf_irq_0_disable (avf_device_t *ad)
 
static void avf_irq_0_enable (avf_device_t *ad)
 
static void avf_irq_n_disable (avf_device_t *ad, u8 line)
 
static void avf_irq_n_enable (avf_device_t *ad, u8 line)
 
clib_error_tavf_aq_desc_enq (vlib_main_t *vm, avf_device_t *ad, avf_aq_desc_t *dt, void *data, int len)
 
clib_error_tavf_cmd_rx_ctl_reg_write (vlib_main_t *vm, avf_device_t *ad, u32 reg, u32 val)
 
clib_error_tavf_rxq_init (vlib_main_t *vm, avf_device_t *ad, u16 qid, u16 rxq_size)
 
clib_error_tavf_txq_init (vlib_main_t *vm, avf_device_t *ad, u16 qid, u16 txq_size)
 
void avf_arq_slot_init (avf_device_t *ad, u16 slot)
 
static uword avf_dma_addr (vlib_main_t *vm, avf_device_t *ad, void *p)
 
static void avf_adminq_init (vlib_main_t *vm, avf_device_t *ad)
 
clib_error_tavf_send_to_pf (vlib_main_t *vm, avf_device_t *ad, virtchnl_ops_t op, void *in, int in_len, void *out, int out_len)
 
clib_error_tavf_op_version (vlib_main_t *vm, avf_device_t *ad, virtchnl_version_info_t *ver)
 
clib_error_tavf_op_get_vf_resources (vlib_main_t *vm, avf_device_t *ad, virtchnl_vf_resource_t *res)
 
clib_error_tavf_op_config_rss_lut (vlib_main_t *vm, avf_device_t *ad)
 
clib_error_tavf_op_config_rss_key (vlib_main_t *vm, avf_device_t *ad)
 
clib_error_tavf_op_disable_vlan_stripping (vlib_main_t *vm, avf_device_t *ad)
 
clib_error_tavf_config_promisc_mode (vlib_main_t *vm, avf_device_t *ad)
 
clib_error_tavf_op_config_vsi_queues (vlib_main_t *vm, avf_device_t *ad)
 
clib_error_tavf_op_config_irq_map (vlib_main_t *vm, avf_device_t *ad)
 
clib_error_tavf_op_add_eth_addr (vlib_main_t *vm, avf_device_t *ad, u8 count, u8 *macs)
 
clib_error_tavf_op_enable_queues (vlib_main_t *vm, avf_device_t *ad, u32 rx, u32 tx)
 
clib_error_tavf_op_get_stats (vlib_main_t *vm, avf_device_t *ad, virtchnl_eth_stats_t *es)
 
clib_error_tavf_device_reset (vlib_main_t *vm, avf_device_t *ad)
 
clib_error_tavf_request_queues (vlib_main_t *vm, avf_device_t *ad, u16 num_queue_pairs)
 
clib_error_tavf_device_init (vlib_main_t *vm, avf_main_t *am, avf_device_t *ad, avf_create_if_args_t *args)
 
void avf_process_one_device (vlib_main_t *vm, avf_device_t *ad, int is_irq)
 
static u32 avf_flag_change (vnet_main_t *vnm, vnet_hw_interface_t *hw, u32 flags)
 
static uword avf_process (vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
 
static void avf_irq_0_handler (vlib_main_t *vm, vlib_pci_dev_handle_t h, u16 line)
 
static void avf_irq_n_handler (vlib_main_t *vm, vlib_pci_dev_handle_t h, u16 line)
 
void avf_delete_if (vlib_main_t *vm, avf_device_t *ad)
 
void avf_create_if (vlib_main_t *vm, avf_create_if_args_t *args)
 
static clib_error_tavf_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
static clib_error_tavf_interface_rx_mode_change (vnet_main_t *vnm, u32 hw_if_index, u32 qid, vnet_hw_interface_rx_mode mode)
 
static void avf_set_interface_next_node (vnet_main_t *vnm, u32 hw_if_index, u32 node_index)
 
static void avf_clear_hw_interface_counters (u32 instance)
 
 VNET_DEVICE_CLASS (avf_device_class,)
 
clib_error_tavf_init (vlib_main_t *vm)
 

Variables

avf_main_t avf_main
 
static pci_device_id_t avf_pci_device_ids []
 
static const char * virtchnl_event_names []
 
static const char * virtchnl_link_speed_str []
 
static vlib_node_registration_t avf_process_node
 (constructor) VLIB_REGISTER_NODE (avf_process_node) More...
 
static char * avf_tx_func_error_strings []
 

Macro Definition Documentation

#define AVF_ITR_INT   8160

Definition at line 30 of file device.c.

#define AVF_MBOX_BUF_SZ   512

Definition at line 27 of file device.c.

#define AVF_MBOX_LEN   64

Definition at line 26 of file device.c.

#define AVF_RXQ_SZ   512

Definition at line 28 of file device.c.

#define AVF_TXQ_SZ   512

Definition at line 29 of file device.c.

#define PCI_DEVICE_ID_INTEL_AVF   0x1889

Definition at line 33 of file device.c.

#define PCI_DEVICE_ID_INTEL_X710_VF   0x154c

Definition at line 34 of file device.c.

#define PCI_DEVICE_ID_INTEL_X722_VF   0x37cd

Definition at line 35 of file device.c.

#define PCI_VENDOR_ID_INTEL   0x8086

Definition at line 32 of file device.c.

Function Documentation

static void avf_adminq_init ( vlib_main_t vm,
avf_device_t ad 
)
static

Definition at line 347 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_aq_desc_enq ( vlib_main_t vm,
avf_device_t ad,
avf_aq_desc_t dt,
void *  data,
int  len 
)

Definition at line 113 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void avf_arq_slot_init ( avf_device_t ad,
u16  slot 
)

Definition at line 327 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avf_clear_hw_interface_counters ( u32  instance)
static

Definition at line 1525 of file device.c.

+ Here is the call graph for this function:

clib_error_t* avf_cmd_rx_ctl_reg_write ( vlib_main_t vm,
avf_device_t ad,
u32  reg,
u32  val 
)

Definition at line 199 of file device.c.

+ Here is the call graph for this function:

clib_error_t* avf_config_promisc_mode ( vlib_main_t vm,
avf_device_t ad 
)

Definition at line 609 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void avf_create_if ( vlib_main_t vm,
avf_create_if_args_t args 
)

Definition at line 1300 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void avf_delete_if ( vlib_main_t vm,
avf_device_t ad 
)

Definition at line 1243 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_device_init ( vlib_main_t vm,
avf_main_t am,
avf_device_t ad,
avf_create_if_args_t args 
)

Definition at line 849 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_device_reset ( vlib_main_t vm,
avf_device_t ad 
)

Definition at line 776 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword avf_dma_addr ( vlib_main_t vm,
avf_device_t ad,
void *  p 
)
inlinestatic

Definition at line 340 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 avf_flag_change ( vnet_main_t vnm,
vnet_hw_interface_t hw,
u32  flags 
)
static

Definition at line 1102 of file device.c.

+ Here is the caller graph for this function:

clib_error_t* avf_init ( vlib_main_t vm)

Definition at line 1549 of file device.c.

+ Here is the call graph for this function:

static clib_error_t* avf_interface_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 1458 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* avf_interface_rx_mode_change ( vnet_main_t vnm,
u32  hw_if_index,
u32  qid,
vnet_hw_interface_rx_mode  mode 
)
static

Definition at line 1483 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avf_irq_0_disable ( avf_device_t ad)
inlinestatic

Definition at line 59 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avf_irq_0_enable ( avf_device_t ad)
inlinestatic

Definition at line 71 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avf_irq_0_handler ( vlib_main_t vm,
vlib_pci_dev_handle_t  h,
u16  line 
)
static

Definition at line 1168 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avf_irq_n_disable ( avf_device_t ad,
u8  line 
)
inlinestatic

Definition at line 89 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avf_irq_n_enable ( avf_device_t ad,
u8  line 
)
inlinestatic

Definition at line 98 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avf_irq_n_handler ( vlib_main_t vm,
vlib_pci_dev_handle_t  h,
u16  line 
)
static

Definition at line 1206 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_op_add_eth_addr ( vlib_main_t vm,
avf_device_t ad,
u8  count,
u8 macs 
)

Definition at line 708 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_op_config_irq_map ( vlib_main_t vm,
avf_device_t ad 
)

Definition at line 682 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_op_config_rss_key ( vlib_main_t vm,
avf_device_t ad 
)

Definition at line 576 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_op_config_rss_lut ( vlib_main_t vm,
avf_device_t ad 
)

Definition at line 553 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_op_config_vsi_queues ( vlib_main_t vm,
avf_device_t ad 
)

Definition at line 626 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_op_disable_vlan_stripping ( vlib_main_t vm,
avf_device_t ad 
)

Definition at line 600 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_op_enable_queues ( vlib_main_t vm,
avf_device_t ad,
u32  rx,
u32  tx 
)

Definition at line 736 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_op_get_stats ( vlib_main_t vm,
avf_device_t ad,
virtchnl_eth_stats_t es 
)

Definition at line 762 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_op_get_vf_resources ( vlib_main_t vm,
avf_device_t ad,
virtchnl_vf_resource_t res 
)

Definition at line 516 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_op_version ( vlib_main_t vm,
avf_device_t ad,
virtchnl_version_info_t ver 
)

Definition at line 494 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword avf_process ( vlib_main_t vm,
vlib_node_runtime_t rt,
vlib_frame_t f 
)
static

Definition at line 1110 of file device.c.

+ Here is the call graph for this function:

void avf_process_one_device ( vlib_main_t vm,
avf_device_t ad,
int  is_irq 
)

Definition at line 963 of file device.c.

+ Here is the call graph for this function:

clib_error_t* avf_request_queues ( vlib_main_t vm,
avf_device_t ad,
u16  num_queue_pairs 
)

Definition at line 807 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_rxq_init ( vlib_main_t vm,
avf_device_t ad,
u16  qid,
u16  rxq_size 
)

Definition at line 230 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_send_to_pf ( vlib_main_t vm,
avf_device_t ad,
virtchnl_ops_t  op,
void *  in,
int  in_len,
void *  out,
int  out_len 
)

Definition at line 384 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void avf_set_interface_next_node ( vnet_main_t vnm,
u32  hw_if_index,
u32  node_index 
)
static

Definition at line 1500 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* avf_txq_init ( vlib_main_t vm,
avf_device_t ad,
u16  qid,
u16  txq_size 
)

Definition at line 281 of file device.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VNET_DEVICE_CLASS ( avf_device_class  )

Variable Documentation

avf_main_t avf_main

Definition at line 37 of file device.c.

pci_device_id_t avf_pci_device_ids[]
static
Initial value:
= {
{.vendor_id = PCI_VENDOR_ID_INTEL,.device_id = PCI_DEVICE_ID_INTEL_AVF},
{.vendor_id = PCI_VENDOR_ID_INTEL,.device_id = PCI_DEVICE_ID_INTEL_X710_VF},
{.vendor_id = PCI_VENDOR_ID_INTEL,.device_id = PCI_DEVICE_ID_INTEL_X722_VF},
{0},
}
#define PCI_DEVICE_ID_INTEL_AVF
Definition: device.c:33
#define PCI_DEVICE_ID_INTEL_X722_VF
Definition: device.c:35
#define PCI_DEVICE_ID_INTEL_X710_VF
Definition: device.c:34
#define PCI_VENDOR_ID_INTEL
Definition: device.c:32

Definition at line 39 of file device.c.

vlib_node_registration_t avf_process_node
static
Initial value:
= {
.function = avf_process,
.name = "avf-process",
}
static uword avf_process(vlib_main_t *vm, vlib_node_runtime_t *rt, vlib_frame_t *f)
Definition: device.c:1110

(constructor) VLIB_REGISTER_NODE (avf_process_node)

Definition at line 1160 of file device.c.

char* avf_tx_func_error_strings[]
static
Initial value:
= {
#define _(n,s)
}
#define foreach_avf_tx_func_error
Definition: avf.h:328

Definition at line 1518 of file device.c.

const char* virtchnl_event_names[]
static
Initial value:

Definition at line 46 of file device.c.

const char* virtchnl_link_speed_str[]
static
Initial value:

Definition at line 52 of file device.c.