|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
18 #ifndef _AVF_VIRTCHNL_H_
19 #define _AVF_VIRTCHNL_H_
21 #define VIRTCHNL_VERSION_MAJOR 1
22 #define VIRTCHNL_VERSION_MINOR 1
24 #define foreach_avf_promisc_flags \
25 _(0, UNICAST_PROMISC, "unicast") \
26 _(1, MULTICAST_PROMISC, "multicast")
30 #define _(a, b, c) FLAG_VF_ ##b = (1 << a),
35 #define AVFINT_DYN_CTLN(x) (0x00003800 + (0x4 * x))
36 #define AVFINT_ICR0 0x00004800
37 #define AVFINT_ICR0_ENA1 0x00005000
38 #define AVFINT_DYN_CTL0 0x00005C00
39 #define AVF_ARQBAH 0x00006000
40 #define AVF_ATQH 0x00006400
41 #define AVF_ATQLEN 0x00006800
42 #define AVF_ARQBAL 0x00006C00
43 #define AVF_ARQT 0x00007000
44 #define AVF_ARQH 0x00007400
45 #define AVF_ATQBAH 0x00007800
46 #define AVF_ATQBAL 0x00007C00
47 #define AVF_ARQLEN 0x00008000
48 #define AVF_ATQT 0x00008400
49 #define AVFGEN_RSTAT 0x00008800
50 #define AVF_QTX_TAIL(q) (0x00000000 + (0x4 * q))
51 #define AVF_QRX_TAIL(q) (0x00002000 + (0x4 * q))
53 #define AVF_AQ_F_DD (1 << 0)
54 #define AVF_AQ_F_CMP (1 << 1)
55 #define AVF_AQ_F_ERR (1 << 2)
56 #define AVF_AQ_F_VFE (1 << 3)
57 #define AVF_AQ_F_LB (1 << 9)
58 #define AVF_AQ_F_RD (1 << 10)
59 #define AVF_AQ_F_VFC (1 << 11)
60 #define AVF_AQ_F_BUF (1 << 12)
61 #define AVF_AQ_F_SI (1 << 13)
62 #define AVF_AQ_F_EI (1 << 14)
63 #define AVF_AQ_F_FE (1 << 15)
65 #define foreach_virtchnl_op \
69 _ (3, GET_VF_RESOURCES) \
70 _ (4, CONFIG_TX_QUEUE) \
71 _ (5, CONFIG_RX_QUEUE) \
72 _ (6, CONFIG_VSI_QUEUES) \
73 _ (7, CONFIG_IRQ_MAP) \
74 _ (8, ENABLE_QUEUES) \
75 _ (9, DISABLE_QUEUES) \
76 _ (10, ADD_ETH_ADDR) \
77 _ (11, DEL_ETH_ADDR) \
80 _ (14, CONFIG_PROMISCUOUS_MODE) \
87 _ (21, CONFIG_IWARP_IRQ_MAP) \
88 _ (22, RELEASE_IWARP_IRQ_MAP) \
89 _ (23, CONFIG_RSS_KEY) \
90 _ (24, CONFIG_RSS_LUT) \
91 _ (25, GET_RSS_HENA_CAPS) \
92 _ (26, SET_RSS_HENA) \
93 _ (27, ENABLE_VLAN_STRIPPING) \
94 _ (28, DISABLE_VLAN_STRIPPING) \
95 _ (29, REQUEST_QUEUES) \
96 _ (30, ENABLE_CHANNELS) \
97 _ (31, DISABLE_CHANNELS) \
98 _ (32, ADD_CLOUD_FILTER) \
99 _ (33, DEL_CLOUD_FILTER) \
100 _ (47, ADD_FDIR_FILTER) \
101 _ (48, DEL_FDIR_FILTER) \
102 _ (49, QUERY_FDIR_FILTER) \
103 _ (50, GET_MAX_RSS_QREGION) \
104 _ (51, GET_OFFLOAD_VLAN_V2_CAPS) \
105 _ (52, ADD_VLAN_V2) \
106 _ (53, DEL_VLAN_V2) \
107 _ (54, ENABLE_VLAN_STRIPPING_V2) \
108 _ (55, DISABLE_VLAN_STRIPPING_V2) \
109 _ (56, ENABLE_VLAN_INSERTION_V2) \
110 _ (57, DISABLE_VLAN_INSERTION_V2) \
111 _ (58, ENABLE_VLAN_FILTERING_V2) \
112 _ (59, DISABLE_VLAN_FILTERING_V2) \
113 _ (107, ENABLE_QUEUES_V2) \
114 _ (108, DISABLE_QUEUES_V2) \
115 _ (111, MAP_QUEUE_VECTOR)
119 #define _(v,n) VIRTCHNL_OP_##n = v,
137 #define foreach_avf_vf_cap_flag \
138 _ (0, OFFLOAD_L2, "l2") \
139 _ (1, OFFLOAD_IWARP, "iwarp") \
140 _ (2, OFFLOAD_RSVD, "rsvd") \
141 _ (3, OFFLOAD_RSS_AQ, "rss-aq") \
142 _ (4, OFFLOAD_RSS_REG, "rss-reg") \
143 _ (5, OFFLOAD_WB_ON_ITR, "wb-on-itr") \
144 _ (6, OFFLOAD_REQ_QUEUES, "req-queues") \
145 _ (7, CAP_ADV_LINK_SPEED, "adv-link-speed") \
146 _ (9, LARGE_NUM_QPAIRS, "large-num-qpairs") \
147 _ (15, OFFLOAD_VLAN_V2, "vlan-v2") \
148 _ (16, OFFLOAD_VLAN, "vlan") \
149 _ (17, OFFLOAD_RX_POLLING, "rx-polling") \
150 _ (18, OFFLOAD_RSS_PCTYPE_V2, "rss-pctype-v2") \
151 _ (19, OFFLOAD_RSS_PF, "rss-pf") \
152 _ (20, OFFLOAD_ENCAP, "encap") \
153 _ (21, OFFLOAD_ENCAP_CSUM, "encap-csum") \
154 _ (22, OFFLOAD_RX_ENCAP_CSUM, "rx-encap-csum") \
155 _ (23, OFFLOAD_ADQ, "offload-adq") \
156 _ (24, OFFLOAD_ADQ_v2, "offload-adq-v2") \
157 _ (25, OFFLOAD_USO, "offload-uso") \
158 _ (26, OFFLOAD_RX_FLEX_DESC, "offload-rx-flex-desc") \
159 _ (27, OFFLOAD_ADV_RSS_PF, "offload-adv-rss-pf") \
160 _ (28, OFFLOAD_FDIR_PF, "offload-fdir-pf") \
161 _ (30, CAP_DCF, "dcf")
165 #define _(a, b, c) VIRTCHNL_VF_##b = (1 << a),
189 u8 default_mac_addr[6];
204 #define foreach_virtchnl_event_code \
207 _(2, RESET_IMPENDING) \
208 _(3, PF_DRIVER_CLOSE)
212 #define _(a,b) VIRTCHNL_EVENT_##b = (a),
217 #define foreach_virtchnl_link_speed \
218 _(0, 2_5GB, "2.5 Gbps") \
219 _(1, 100MB, "100 Mbps") \
220 _(2, 1GB, "1 Gbps") \
221 _(3, 10GB, "10 Gbps") \
222 _(4, 40GB, "40 Gbps") \
223 _(5, 20GB, "20 Gbps") \
224 _(6, 25GB, "25 Gbps") \
230 #define _(a,b,c) VIRTCHNL_LINK_SPEED_##b = (1 << a),
379 #define foreach_virtchnl_eth_stats \
385 _(rx_unknown_protocol)\
453 #define foreach_virtchnl_vlan_support_bit \
454 _ (0, ETHERTYPE_8100, "dot1Q") \
455 _ (1, ETHERTYPE_88A8, "dot1AD") \
456 _ (2, ETHERTYPE_9100, "QinQ") \
457 _ (8, TAG_LOCATION_L2TAG1, "l2tag1") \
458 _ (9, TAG_LOCATION_L2TAG2, "l2tag2") \
459 _ (10, TAG_LOCATION_L2TAG2_2, "l2tag2_2") \
460 _ (24, PRIO, "prio") \
461 _ (28, FILTER_MASK, "filter-mask") \
462 _ (29, ETHERTYPE_AND, "etype-and") \
463 _ (30, ETHERTYPE_XOR, "etype-xor") \
464 _ (31, TOGGLE, "toggle")
469 #define _(a, b, c) VIRTCHNL_VLAN_##b = (1 << a),
#define foreach_virtchnl_op
@ VIRTCHNL_STATUS_ERR_OPCODE_MISMATCH
virtchnl_vlan_supported_caps_t insertion_support
#define foreach_virtchnl_event_code
struct virtchnl_vlan_offload_caps virtchnl_vlan_offload_caps_t
#define foreach_virtchnl_eth_stats
@ VIRTCHNL_VLAN_UNSUPPORTED
@ VIRTCHNL_LINK_SPEED_UNKNOWN
#define foreach_virtchnl_vlan_support_bit
virtchnl_vlan_supported_caps_t filtering_support
@ VIRTCHNL_STATUS_SUCCESS
@ VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR
@ VIRTCHNL_VFR_INPROGRESS
STATIC_ASSERT_SIZEOF(virtchnl_pf_event_t, 16)
virtchnl_link_speed_t link_speed
virtchnl_vlan_supported_caps_t stripping_support
virtchnl_vlan_offload_caps_t offloads
#define foreach_avf_vf_cap_flag
#define foreach_virtchnl_link_speed
@ VIRTCHNL_STATUS_ERR_INVALID_VF_ID
u32 inner_ethertype_setting
virtchnl_status_code_t v_retval
@ VIRTCHNL_STATUS_ERR_NO_MEMORY
u32 outer_ethertype_setting
@ VIRTCHNL_STATUS_NOT_SUPPORTED
#define foreach_avf_promisc_flags
virtchnl_vlan_filtering_caps_t filtering
virtchnl_event_codes_t event
u8 pad[3]
log2 (size of the packing page block)
virtchnl_vsi_type_t vsi_type
@ VIRTCHNL_VSI_TYPE_INVALID
@ VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR
@ VIRTCHNL_STATUS_ERR_PARAM