FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
virtchnl.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  virtchnl_vsi_resource_t
 
struct  virtchnl_vf_resource_t
 
struct  virtchnl_pf_event_t
 
struct  virtchnl_version_info_t
 
struct  avf_aq_desc_t
 
struct  virtchnl_txq_info_t
 
struct  virtchnl_rxq_info_t
 
struct  virtchnl_queue_pair_info_t
 
struct  virtchnl_vsi_queue_config_info_t
 
struct  virtchnl_queue_select_t
 
struct  virtchnl_vector_map_t
 
struct  virtchnl_irq_map_info_t
 
struct  virtchnl_ether_addr_t
 
struct  virtchnl_ether_addr_list_t
 
struct  virtchnl_eth_stats_t
 
struct  virtchnl_rss_key_t
 
struct  virtchnl_rss_lut_t
 
struct  virtchnl_vf_res_request_t
 
struct  virtchnl_vlan_supported_caps_t
 
struct  virtchnl_vlan_filtering_caps_t
 
struct  virtchnl_vlan_offload_caps
 
struct  virtchnl_vlan_caps_t
 
struct  virtchnl_vlan_setting_t
 

Macros

#define VIRTCHNL_VERSION_MAJOR   1
 
#define VIRTCHNL_VERSION_MINOR   1
 
#define foreach_avf_promisc_flags
 
#define AVFINT_DYN_CTLN(x)   (0x00003800 + (0x4 * x))
 
#define AVFINT_ICR0   0x00004800
 
#define AVFINT_ICR0_ENA1   0x00005000
 
#define AVFINT_DYN_CTL0   0x00005C00
 
#define AVF_ARQBAH   0x00006000
 
#define AVF_ATQH   0x00006400
 
#define AVF_ATQLEN   0x00006800
 
#define AVF_ARQBAL   0x00006C00
 
#define AVF_ARQT   0x00007000
 
#define AVF_ARQH   0x00007400
 
#define AVF_ATQBAH   0x00007800
 
#define AVF_ATQBAL   0x00007C00
 
#define AVF_ARQLEN   0x00008000
 
#define AVF_ATQT   0x00008400
 
#define AVFGEN_RSTAT   0x00008800
 
#define AVF_QTX_TAIL(q)   (0x00000000 + (0x4 * q))
 
#define AVF_QRX_TAIL(q)   (0x00002000 + (0x4 * q))
 
#define AVF_AQ_F_DD   (1 << 0)
 
#define AVF_AQ_F_CMP   (1 << 1)
 
#define AVF_AQ_F_ERR   (1 << 2)
 
#define AVF_AQ_F_VFE   (1 << 3)
 
#define AVF_AQ_F_LB   (1 << 9)
 
#define AVF_AQ_F_RD   (1 << 10)
 
#define AVF_AQ_F_VFC   (1 << 11)
 
#define AVF_AQ_F_BUF   (1 << 12)
 
#define AVF_AQ_F_SI   (1 << 13)
 
#define AVF_AQ_F_EI   (1 << 14)
 
#define AVF_AQ_F_FE   (1 << 15)
 
#define foreach_virtchnl_op
 
#define foreach_avf_vf_cap_flag
 
#define foreach_virtchnl_event_code
 
#define foreach_virtchnl_link_speed
 
#define foreach_virtchnl_eth_stats
 
#define foreach_virtchnl_vlan_support_bit
 

Typedefs

typedef struct virtchnl_vlan_offload_caps virtchnl_vlan_offload_caps_t
 

Enumerations

enum  { foreach_avf_promisc_flags }
 
enum  virtchnl_ops_t { VIRTCHNL_N_OPS }
 
enum  virtchnl_status_code_t {
  VIRTCHNL_STATUS_SUCCESS = 0, VIRTCHNL_STATUS_ERR_PARAM = -5, VIRTCHNL_STATUS_ERR_NO_MEMORY = -18, VIRTCHNL_STATUS_ERR_OPCODE_MISMATCH = -38,
  VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR = -39, VIRTCHNL_STATUS_ERR_INVALID_VF_ID = -40, VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR = -53, VIRTCHNL_STATUS_NOT_SUPPORTED = -64
}
 
enum  avf_vf_cap_flag_t { foreach_avf_vf_cap_flag }
 
enum  virtchnl_vsi_type_t { VIRTCHNL_VSI_TYPE_INVALID = 0, VIRTCHNL_VSI_SRIOV = 6 }
 
enum  virtchnl_vfr_states_t { VIRTCHNL_VFR_INPROGRESS = 0, VIRTCHNL_VFR_COMPLETED, VIRTCHNL_VFR_VFACTIVE }
 
enum  virtchnl_event_codes_t { foreach_virtchnl_event_code }
 
enum  virtchnl_link_speed_t { VIRTCHNL_LINK_SPEED_UNKNOWN = 0, foreach_virtchnl_link_speed }
 
enum  virtchnl_vlan_support_t { VIRTCHNL_VLAN_UNSUPPORTED = 0, foreach_virtchnl_vlan_support_bit }
 

Functions

 STATIC_ASSERT_SIZEOF (virtchnl_pf_event_t, 16)
 
 STATIC_ASSERT_SIZEOF (avf_aq_desc_t, 32)
 
 STATIC_ASSERT_SIZEOF (virtchnl_txq_info_t, 24)
 
 STATIC_ASSERT_SIZEOF (virtchnl_rxq_info_t, 40)
 
 STATIC_ASSERT_SIZEOF (virtchnl_vsi_queue_config_info_t, 72)
 
 STATIC_ASSERT_SIZEOF (virtchnl_queue_select_t, 12)
 
 STATIC_ASSERT_SIZEOF (virtchnl_irq_map_info_t, 14)
 
 STATIC_ASSERT_SIZEOF (virtchnl_rss_key_t, 6)
 
 STATIC_ASSERT_SIZEOF (virtchnl_rss_lut_t, 6)
 

Macro Definition Documentation

◆ AVF_AQ_F_BUF

#define AVF_AQ_F_BUF   (1 << 12)

Definition at line 60 of file virtchnl.h.

◆ AVF_AQ_F_CMP

#define AVF_AQ_F_CMP   (1 << 1)

Definition at line 54 of file virtchnl.h.

◆ AVF_AQ_F_DD

#define AVF_AQ_F_DD   (1 << 0)

Definition at line 53 of file virtchnl.h.

◆ AVF_AQ_F_EI

#define AVF_AQ_F_EI   (1 << 14)

Definition at line 62 of file virtchnl.h.

◆ AVF_AQ_F_ERR

#define AVF_AQ_F_ERR   (1 << 2)

Definition at line 55 of file virtchnl.h.

◆ AVF_AQ_F_FE

#define AVF_AQ_F_FE   (1 << 15)

Definition at line 63 of file virtchnl.h.

◆ AVF_AQ_F_LB

#define AVF_AQ_F_LB   (1 << 9)

Definition at line 57 of file virtchnl.h.

◆ AVF_AQ_F_RD

#define AVF_AQ_F_RD   (1 << 10)

Definition at line 58 of file virtchnl.h.

◆ AVF_AQ_F_SI

#define AVF_AQ_F_SI   (1 << 13)

Definition at line 61 of file virtchnl.h.

◆ AVF_AQ_F_VFC

#define AVF_AQ_F_VFC   (1 << 11)

Definition at line 59 of file virtchnl.h.

◆ AVF_AQ_F_VFE

#define AVF_AQ_F_VFE   (1 << 3)

Definition at line 56 of file virtchnl.h.

◆ AVF_ARQBAH

#define AVF_ARQBAH   0x00006000

Definition at line 39 of file virtchnl.h.

◆ AVF_ARQBAL

#define AVF_ARQBAL   0x00006C00

Definition at line 42 of file virtchnl.h.

◆ AVF_ARQH

#define AVF_ARQH   0x00007400

Definition at line 44 of file virtchnl.h.

◆ AVF_ARQLEN

#define AVF_ARQLEN   0x00008000

Definition at line 47 of file virtchnl.h.

◆ AVF_ARQT

#define AVF_ARQT   0x00007000

Definition at line 43 of file virtchnl.h.

◆ AVF_ATQBAH

#define AVF_ATQBAH   0x00007800

Definition at line 45 of file virtchnl.h.

◆ AVF_ATQBAL

#define AVF_ATQBAL   0x00007C00

Definition at line 46 of file virtchnl.h.

◆ AVF_ATQH

#define AVF_ATQH   0x00006400

Definition at line 40 of file virtchnl.h.

◆ AVF_ATQLEN

#define AVF_ATQLEN   0x00006800

Definition at line 41 of file virtchnl.h.

◆ AVF_ATQT

#define AVF_ATQT   0x00008400

Definition at line 48 of file virtchnl.h.

◆ AVF_QRX_TAIL

#define AVF_QRX_TAIL (   q)    (0x00002000 + (0x4 * q))

Definition at line 51 of file virtchnl.h.

◆ AVF_QTX_TAIL

#define AVF_QTX_TAIL (   q)    (0x00000000 + (0x4 * q))

Definition at line 50 of file virtchnl.h.

◆ AVFGEN_RSTAT

#define AVFGEN_RSTAT   0x00008800

Definition at line 49 of file virtchnl.h.

◆ AVFINT_DYN_CTL0

#define AVFINT_DYN_CTL0   0x00005C00

Definition at line 38 of file virtchnl.h.

◆ AVFINT_DYN_CTLN

#define AVFINT_DYN_CTLN (   x)    (0x00003800 + (0x4 * x))

Definition at line 35 of file virtchnl.h.

◆ AVFINT_ICR0

#define AVFINT_ICR0   0x00004800

Definition at line 36 of file virtchnl.h.

◆ AVFINT_ICR0_ENA1

#define AVFINT_ICR0_ENA1   0x00005000

Definition at line 37 of file virtchnl.h.

◆ foreach_avf_promisc_flags

#define foreach_avf_promisc_flags
Value:
_(0, UNICAST_PROMISC, "unicast") \
_(1, MULTICAST_PROMISC, "multicast")

Definition at line 24 of file virtchnl.h.

◆ foreach_avf_vf_cap_flag

#define foreach_avf_vf_cap_flag
Value:
_ (0, OFFLOAD_L2, "l2") \
_ (1, OFFLOAD_IWARP, "iwarp") \
_ (2, OFFLOAD_RSVD, "rsvd") \
_ (3, OFFLOAD_RSS_AQ, "rss-aq") \
_ (4, OFFLOAD_RSS_REG, "rss-reg") \
_ (5, OFFLOAD_WB_ON_ITR, "wb-on-itr") \
_ (6, OFFLOAD_REQ_QUEUES, "req-queues") \
_ (7, CAP_ADV_LINK_SPEED, "adv-link-speed") \
_ (9, LARGE_NUM_QPAIRS, "large-num-qpairs") \
_ (15, OFFLOAD_VLAN_V2, "vlan-v2") \
_ (16, OFFLOAD_VLAN, "vlan") \
_ (17, OFFLOAD_RX_POLLING, "rx-polling") \
_ (18, OFFLOAD_RSS_PCTYPE_V2, "rss-pctype-v2") \
_ (19, OFFLOAD_RSS_PF, "rss-pf") \
_ (20, OFFLOAD_ENCAP, "encap") \
_ (21, OFFLOAD_ENCAP_CSUM, "encap-csum") \
_ (22, OFFLOAD_RX_ENCAP_CSUM, "rx-encap-csum") \
_ (23, OFFLOAD_ADQ, "offload-adq") \
_ (24, OFFLOAD_ADQ_v2, "offload-adq-v2") \
_ (25, OFFLOAD_USO, "offload-uso") \
_ (26, OFFLOAD_RX_FLEX_DESC, "offload-rx-flex-desc") \
_ (27, OFFLOAD_ADV_RSS_PF, "offload-adv-rss-pf") \
_ (28, OFFLOAD_FDIR_PF, "offload-fdir-pf") \
_ (30, CAP_DCF, "dcf")

Definition at line 137 of file virtchnl.h.

◆ foreach_virtchnl_eth_stats

#define foreach_virtchnl_eth_stats
Value:
_(rx_bytes) \
_(rx_unicast) \
_(rx_multicast) \
_(rx_broadcast) \
_(rx_discards) \
_(rx_unknown_protocol)\
_(tx_bytes) \
_(tx_unicast) \
_(tx_multicast) \
_(tx_broadcast) \
_(tx_discards) \
_(tx_errors)

Definition at line 379 of file virtchnl.h.

◆ foreach_virtchnl_event_code

#define foreach_virtchnl_event_code
Value:
_(0, UNKNOWN) \
_(1, LINK_CHANGE) \
_(2, RESET_IMPENDING) \
_(3, PF_DRIVER_CLOSE)

Definition at line 204 of file virtchnl.h.

◆ foreach_virtchnl_link_speed

#define foreach_virtchnl_link_speed
Value:
_(0, 2_5GB, "2.5 Gbps") \
_(1, 100MB, "100 Mbps") \
_(2, 1GB, "1 Gbps") \
_(3, 10GB, "10 Gbps") \
_(4, 40GB, "40 Gbps") \
_(5, 20GB, "20 Gbps") \
_(6, 25GB, "25 Gbps") \
_(7, 5GB, "5 Gbps")

Definition at line 217 of file virtchnl.h.

◆ foreach_virtchnl_op

#define foreach_virtchnl_op
Value:
_ (0, UNKNOWN) \
_ (1, VERSION) \
_ (2, RESET_VF) \
_ (3, GET_VF_RESOURCES) \
_ (4, CONFIG_TX_QUEUE) \
_ (5, CONFIG_RX_QUEUE) \
_ (6, CONFIG_VSI_QUEUES) \
_ (7, CONFIG_IRQ_MAP) \
_ (8, ENABLE_QUEUES) \
_ (9, DISABLE_QUEUES) \
_ (10, ADD_ETH_ADDR) \
_ (11, DEL_ETH_ADDR) \
_ (12, ADD_VLAN) \
_ (13, DEL_VLAN) \
_ (14, CONFIG_PROMISCUOUS_MODE) \
_ (15, GET_STATS) \
_ (16, RSVD) \
_ (17, EVENT) \
_ (18, UNDEF_18) \
_ (19, UNDEF_19) \
_ (20, IWARP) \
_ (21, CONFIG_IWARP_IRQ_MAP) \
_ (22, RELEASE_IWARP_IRQ_MAP) \
_ (23, CONFIG_RSS_KEY) \
_ (24, CONFIG_RSS_LUT) \
_ (25, GET_RSS_HENA_CAPS) \
_ (26, SET_RSS_HENA) \
_ (27, ENABLE_VLAN_STRIPPING) \
_ (28, DISABLE_VLAN_STRIPPING) \
_ (29, REQUEST_QUEUES) \
_ (30, ENABLE_CHANNELS) \
_ (31, DISABLE_CHANNELS) \
_ (32, ADD_CLOUD_FILTER) \
_ (33, DEL_CLOUD_FILTER) \
_ (47, ADD_FDIR_FILTER) \
_ (48, DEL_FDIR_FILTER) \
_ (49, QUERY_FDIR_FILTER) \
_ (50, GET_MAX_RSS_QREGION) \
_ (51, GET_OFFLOAD_VLAN_V2_CAPS) \
_ (52, ADD_VLAN_V2) \
_ (53, DEL_VLAN_V2) \
_ (54, ENABLE_VLAN_STRIPPING_V2) \
_ (55, DISABLE_VLAN_STRIPPING_V2) \
_ (56, ENABLE_VLAN_INSERTION_V2) \
_ (57, DISABLE_VLAN_INSERTION_V2) \
_ (58, ENABLE_VLAN_FILTERING_V2) \
_ (59, DISABLE_VLAN_FILTERING_V2) \
_ (107, ENABLE_QUEUES_V2) \
_ (108, DISABLE_QUEUES_V2) \
_ (111, MAP_QUEUE_VECTOR)

Definition at line 65 of file virtchnl.h.

◆ foreach_virtchnl_vlan_support_bit

#define foreach_virtchnl_vlan_support_bit
Value:
_ (0, ETHERTYPE_8100, "dot1Q") \
_ (1, ETHERTYPE_88A8, "dot1AD") \
_ (2, ETHERTYPE_9100, "QinQ") \
_ (8, TAG_LOCATION_L2TAG1, "l2tag1") \
_ (9, TAG_LOCATION_L2TAG2, "l2tag2") \
_ (10, TAG_LOCATION_L2TAG2_2, "l2tag2_2") \
_ (24, PRIO, "prio") \
_ (28, FILTER_MASK, "filter-mask") \
_ (29, ETHERTYPE_AND, "etype-and") \
_ (30, ETHERTYPE_XOR, "etype-xor") \
_ (31, TOGGLE, "toggle")

Definition at line 453 of file virtchnl.h.

◆ VIRTCHNL_VERSION_MAJOR

#define VIRTCHNL_VERSION_MAJOR   1

Definition at line 21 of file virtchnl.h.

◆ VIRTCHNL_VERSION_MINOR

#define VIRTCHNL_VERSION_MINOR   1

Definition at line 22 of file virtchnl.h.

Typedef Documentation

◆ virtchnl_vlan_offload_caps_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
foreach_avf_promisc_flags 

Definition at line 28 of file virtchnl.h.

◆ avf_vf_cap_flag_t

Enumerator
foreach_avf_vf_cap_flag 

Definition at line 163 of file virtchnl.h.

◆ virtchnl_event_codes_t

Enumerator
foreach_virtchnl_event_code 

Definition at line 210 of file virtchnl.h.

◆ virtchnl_link_speed_t

Enumerator
VIRTCHNL_LINK_SPEED_UNKNOWN 
foreach_virtchnl_link_speed 

Definition at line 227 of file virtchnl.h.

◆ virtchnl_ops_t

Enumerator
VIRTCHNL_N_OPS 

Definition at line 117 of file virtchnl.h.

◆ virtchnl_status_code_t

Enumerator
VIRTCHNL_STATUS_SUCCESS 
VIRTCHNL_STATUS_ERR_PARAM 
VIRTCHNL_STATUS_ERR_NO_MEMORY 
VIRTCHNL_STATUS_ERR_OPCODE_MISMATCH 
VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR 
VIRTCHNL_STATUS_ERR_INVALID_VF_ID 
VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR 
VIRTCHNL_STATUS_NOT_SUPPORTED 

Definition at line 125 of file virtchnl.h.

◆ virtchnl_vfr_states_t

Enumerator
VIRTCHNL_VFR_INPROGRESS 
VIRTCHNL_VFR_COMPLETED 
VIRTCHNL_VFR_VFACTIVE 

Definition at line 176 of file virtchnl.h.

◆ virtchnl_vlan_support_t

Enumerator
VIRTCHNL_VLAN_UNSUPPORTED 
foreach_virtchnl_vlan_support_bit 

Definition at line 466 of file virtchnl.h.

◆ virtchnl_vsi_type_t

Enumerator
VIRTCHNL_VSI_TYPE_INVALID 
VIRTCHNL_VSI_SRIOV 

Definition at line 170 of file virtchnl.h.

Function Documentation

◆ STATIC_ASSERT_SIZEOF() [1/9]

STATIC_ASSERT_SIZEOF ( avf_aq_desc_t  ,
32   
)

◆ STATIC_ASSERT_SIZEOF() [2/9]

STATIC_ASSERT_SIZEOF ( virtchnl_irq_map_info_t  ,
14   
)

◆ STATIC_ASSERT_SIZEOF() [3/9]

STATIC_ASSERT_SIZEOF ( virtchnl_pf_event_t  ,
16   
)

◆ STATIC_ASSERT_SIZEOF() [4/9]

STATIC_ASSERT_SIZEOF ( virtchnl_queue_select_t  ,
12   
)

◆ STATIC_ASSERT_SIZEOF() [5/9]

STATIC_ASSERT_SIZEOF ( virtchnl_rss_key_t  ,
 
)

◆ STATIC_ASSERT_SIZEOF() [6/9]

STATIC_ASSERT_SIZEOF ( virtchnl_rss_lut_t  ,
 
)

◆ STATIC_ASSERT_SIZEOF() [7/9]

STATIC_ASSERT_SIZEOF ( virtchnl_rxq_info_t  ,
40   
)

◆ STATIC_ASSERT_SIZEOF() [8/9]

STATIC_ASSERT_SIZEOF ( virtchnl_txq_info_t  ,
24   
)

◆ STATIC_ASSERT_SIZEOF() [9/9]

STATIC_ASSERT_SIZEOF ( virtchnl_vsi_queue_config_info_t  ,
72   
)