|
9 | 9 | */ |
10 | 10 |
|
11 | 11 | #define ICE_AQC_TOPO_MAX_LEVEL_NUM 0x9 |
| 12 | +#define ICE_AQ_SET_MAC_FRAME_SIZE_MAX 9728 |
12 | 13 |
|
13 | 14 | struct ice_aqc_generic { |
14 | 15 | __le32 param0; |
@@ -190,6 +191,199 @@ struct ice_aqc_get_sw_cfg_resp { |
190 | 191 | struct ice_aqc_get_sw_cfg_resp_elem elements[1]; |
191 | 192 | }; |
192 | 193 |
|
| 194 | +/* Add VSI (indirect 0x0210) |
| 195 | + * Update VSI (indirect 0x0211) |
| 196 | + * Get VSI (indirect 0x0212) |
| 197 | + * Free VSI (indirect 0x0213) |
| 198 | + */ |
| 199 | +struct ice_aqc_add_get_update_free_vsi { |
| 200 | + __le16 vsi_num; |
| 201 | +#define ICE_AQ_VSI_NUM_S 0 |
| 202 | +#define ICE_AQ_VSI_NUM_M (0x03FF << ICE_AQ_VSI_NUM_S) |
| 203 | +#define ICE_AQ_VSI_IS_VALID BIT(15) |
| 204 | + __le16 cmd_flags; |
| 205 | +#define ICE_AQ_VSI_KEEP_ALLOC 0x1 |
| 206 | + u8 vf_id; |
| 207 | + u8 reserved; |
| 208 | + __le16 vsi_flags; |
| 209 | +#define ICE_AQ_VSI_TYPE_S 0 |
| 210 | +#define ICE_AQ_VSI_TYPE_M (0x3 << ICE_AQ_VSI_TYPE_S) |
| 211 | +#define ICE_AQ_VSI_TYPE_VF 0x0 |
| 212 | +#define ICE_AQ_VSI_TYPE_VMDQ2 0x1 |
| 213 | +#define ICE_AQ_VSI_TYPE_PF 0x2 |
| 214 | +#define ICE_AQ_VSI_TYPE_EMP_MNG 0x3 |
| 215 | + __le32 addr_high; |
| 216 | + __le32 addr_low; |
| 217 | +}; |
| 218 | + |
| 219 | +/* Response descriptor for: |
| 220 | + * Add VSI (indirect 0x0210) |
| 221 | + * Update VSI (indirect 0x0211) |
| 222 | + * Free VSI (indirect 0x0213) |
| 223 | + */ |
| 224 | +struct ice_aqc_add_update_free_vsi_resp { |
| 225 | + __le16 vsi_num; |
| 226 | + __le16 ext_status; |
| 227 | + __le16 vsi_used; |
| 228 | + __le16 vsi_free; |
| 229 | + __le32 addr_high; |
| 230 | + __le32 addr_low; |
| 231 | +}; |
| 232 | + |
| 233 | +struct ice_aqc_vsi_props { |
| 234 | + __le16 valid_sections; |
| 235 | +#define ICE_AQ_VSI_PROP_SW_VALID BIT(0) |
| 236 | +#define ICE_AQ_VSI_PROP_SECURITY_VALID BIT(1) |
| 237 | +#define ICE_AQ_VSI_PROP_VLAN_VALID BIT(2) |
| 238 | +#define ICE_AQ_VSI_PROP_OUTER_TAG_VALID BIT(3) |
| 239 | +#define ICE_AQ_VSI_PROP_INGRESS_UP_VALID BIT(4) |
| 240 | +#define ICE_AQ_VSI_PROP_EGRESS_UP_VALID BIT(5) |
| 241 | +#define ICE_AQ_VSI_PROP_RXQ_MAP_VALID BIT(6) |
| 242 | +#define ICE_AQ_VSI_PROP_Q_OPT_VALID BIT(7) |
| 243 | +#define ICE_AQ_VSI_PROP_OUTER_UP_VALID BIT(8) |
| 244 | +#define ICE_AQ_VSI_PROP_FLOW_DIR_VALID BIT(11) |
| 245 | +#define ICE_AQ_VSI_PROP_PASID_VALID BIT(12) |
| 246 | + /* switch section */ |
| 247 | + u8 sw_id; |
| 248 | + u8 sw_flags; |
| 249 | +#define ICE_AQ_VSI_SW_FLAG_ALLOW_LB BIT(5) |
| 250 | +#define ICE_AQ_VSI_SW_FLAG_LOCAL_LB BIT(6) |
| 251 | +#define ICE_AQ_VSI_SW_FLAG_SRC_PRUNE BIT(7) |
| 252 | + u8 sw_flags2; |
| 253 | +#define ICE_AQ_VSI_SW_FLAG_RX_PRUNE_EN_S 0 |
| 254 | +#define ICE_AQ_VSI_SW_FLAG_RX_PRUNE_EN_M \ |
| 255 | + (0xF << ICE_AQ_VSI_SW_FLAG_RX_PRUNE_EN_S) |
| 256 | +#define ICE_AQ_VSI_SW_FLAG_RX_VLAN_PRUNE_ENA BIT(0) |
| 257 | +#define ICE_AQ_VSI_SW_FLAG_LAN_ENA BIT(4) |
| 258 | + u8 veb_stat_id; |
| 259 | +#define ICE_AQ_VSI_SW_VEB_STAT_ID_S 0 |
| 260 | +#define ICE_AQ_VSI_SW_VEB_STAT_ID_M (0x1F << ICE_AQ_VSI_SW_VEB_STAT_ID_S) |
| 261 | +#define ICE_AQ_VSI_SW_VEB_STAT_ID_VALID BIT(5) |
| 262 | + /* security section */ |
| 263 | + u8 sec_flags; |
| 264 | +#define ICE_AQ_VSI_SEC_FLAG_ALLOW_DEST_OVRD BIT(0) |
| 265 | +#define ICE_AQ_VSI_SEC_FLAG_ENA_MAC_ANTI_SPOOF BIT(2) |
| 266 | +#define ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S 4 |
| 267 | +#define ICE_AQ_VSI_SEC_TX_PRUNE_ENA_M (0xF << ICE_AQ_VSI_SEC_TX_PRUNE_ENA_S) |
| 268 | +#define ICE_AQ_VSI_SEC_TX_VLAN_PRUNE_ENA BIT(0) |
| 269 | + u8 sec_reserved; |
| 270 | + /* VLAN section */ |
| 271 | + __le16 pvid; /* VLANS include priority bits */ |
| 272 | + u8 pvlan_reserved[2]; |
| 273 | + u8 port_vlan_flags; |
| 274 | +#define ICE_AQ_VSI_PVLAN_MODE_S 0 |
| 275 | +#define ICE_AQ_VSI_PVLAN_MODE_M (0x3 << ICE_AQ_VSI_PVLAN_MODE_S) |
| 276 | +#define ICE_AQ_VSI_PVLAN_MODE_UNTAGGED 0x1 |
| 277 | +#define ICE_AQ_VSI_PVLAN_MODE_TAGGED 0x2 |
| 278 | +#define ICE_AQ_VSI_PVLAN_MODE_ALL 0x3 |
| 279 | +#define ICE_AQ_VSI_PVLAN_INSERT_PVID BIT(2) |
| 280 | +#define ICE_AQ_VSI_PVLAN_EMOD_S 3 |
| 281 | +#define ICE_AQ_VSI_PVLAN_EMOD_M (0x3 << ICE_AQ_VSI_PVLAN_EMOD_S) |
| 282 | +#define ICE_AQ_VSI_PVLAN_EMOD_STR_BOTH (0x0 << ICE_AQ_VSI_PVLAN_EMOD_S) |
| 283 | +#define ICE_AQ_VSI_PVLAN_EMOD_STR_UP (0x1 << ICE_AQ_VSI_PVLAN_EMOD_S) |
| 284 | +#define ICE_AQ_VSI_PVLAN_EMOD_STR (0x2 << ICE_AQ_VSI_PVLAN_EMOD_S) |
| 285 | +#define ICE_AQ_VSI_PVLAN_EMOD_NOTHING (0x3 << ICE_AQ_VSI_PVLAN_EMOD_S) |
| 286 | + u8 pvlan_reserved2[3]; |
| 287 | + /* ingress egress up sections */ |
| 288 | + __le32 ingress_table; /* bitmap, 3 bits per up */ |
| 289 | +#define ICE_AQ_VSI_UP_TABLE_UP0_S 0 |
| 290 | +#define ICE_AQ_VSI_UP_TABLE_UP0_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP0_S) |
| 291 | +#define ICE_AQ_VSI_UP_TABLE_UP1_S 3 |
| 292 | +#define ICE_AQ_VSI_UP_TABLE_UP1_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP1_S) |
| 293 | +#define ICE_AQ_VSI_UP_TABLE_UP2_S 6 |
| 294 | +#define ICE_AQ_VSI_UP_TABLE_UP2_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP2_S) |
| 295 | +#define ICE_AQ_VSI_UP_TABLE_UP3_S 9 |
| 296 | +#define ICE_AQ_VSI_UP_TABLE_UP3_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP3_S) |
| 297 | +#define ICE_AQ_VSI_UP_TABLE_UP4_S 12 |
| 298 | +#define ICE_AQ_VSI_UP_TABLE_UP4_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP4_S) |
| 299 | +#define ICE_AQ_VSI_UP_TABLE_UP5_S 15 |
| 300 | +#define ICE_AQ_VSI_UP_TABLE_UP5_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP5_S) |
| 301 | +#define ICE_AQ_VSI_UP_TABLE_UP6_S 18 |
| 302 | +#define ICE_AQ_VSI_UP_TABLE_UP6_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP6_S) |
| 303 | +#define ICE_AQ_VSI_UP_TABLE_UP7_S 21 |
| 304 | +#define ICE_AQ_VSI_UP_TABLE_UP7_M (0x7 << ICE_AQ_VSI_UP_TABLE_UP7_S) |
| 305 | + __le32 egress_table; /* same defines as for ingress table */ |
| 306 | + /* outer tags section */ |
| 307 | + __le16 outer_tag; |
| 308 | + u8 outer_tag_flags; |
| 309 | +#define ICE_AQ_VSI_OUTER_TAG_MODE_S 0 |
| 310 | +#define ICE_AQ_VSI_OUTER_TAG_MODE_M (0x3 << ICE_AQ_VSI_OUTER_TAG_MODE_S) |
| 311 | +#define ICE_AQ_VSI_OUTER_TAG_NOTHING 0x0 |
| 312 | +#define ICE_AQ_VSI_OUTER_TAG_REMOVE 0x1 |
| 313 | +#define ICE_AQ_VSI_OUTER_TAG_COPY 0x2 |
| 314 | +#define ICE_AQ_VSI_OUTER_TAG_TYPE_S 2 |
| 315 | +#define ICE_AQ_VSI_OUTER_TAG_TYPE_M (0x3 << ICE_AQ_VSI_OUTER_TAG_TYPE_S) |
| 316 | +#define ICE_AQ_VSI_OUTER_TAG_NONE 0x0 |
| 317 | +#define ICE_AQ_VSI_OUTER_TAG_STAG 0x1 |
| 318 | +#define ICE_AQ_VSI_OUTER_TAG_VLAN_8100 0x2 |
| 319 | +#define ICE_AQ_VSI_OUTER_TAG_VLAN_9100 0x3 |
| 320 | +#define ICE_AQ_VSI_OUTER_TAG_INSERT BIT(4) |
| 321 | +#define ICE_AQ_VSI_OUTER_TAG_ACCEPT_HOST BIT(6) |
| 322 | + u8 outer_tag_reserved; |
| 323 | + /* queue mapping section */ |
| 324 | + __le16 mapping_flags; |
| 325 | +#define ICE_AQ_VSI_Q_MAP_CONTIG 0x0 |
| 326 | +#define ICE_AQ_VSI_Q_MAP_NONCONTIG BIT(0) |
| 327 | + __le16 q_mapping[16]; |
| 328 | +#define ICE_AQ_VSI_Q_S 0 |
| 329 | +#define ICE_AQ_VSI_Q_M (0x7FF << ICE_AQ_VSI_Q_S) |
| 330 | + __le16 tc_mapping[8]; |
| 331 | +#define ICE_AQ_VSI_TC_Q_OFFSET_S 0 |
| 332 | +#define ICE_AQ_VSI_TC_Q_OFFSET_M (0x7FF << ICE_AQ_VSI_TC_Q_OFFSET_S) |
| 333 | +#define ICE_AQ_VSI_TC_Q_NUM_S 11 |
| 334 | +#define ICE_AQ_VSI_TC_Q_NUM_M (0xF << ICE_AQ_VSI_TC_Q_NUM_S) |
| 335 | + /* queueing option section */ |
| 336 | + u8 q_opt_rss; |
| 337 | +#define ICE_AQ_VSI_Q_OPT_RSS_LUT_S 0 |
| 338 | +#define ICE_AQ_VSI_Q_OPT_RSS_LUT_M (0x3 << ICE_AQ_VSI_Q_OPT_RSS_LUT_S) |
| 339 | +#define ICE_AQ_VSI_Q_OPT_RSS_LUT_VSI 0x0 |
| 340 | +#define ICE_AQ_VSI_Q_OPT_RSS_LUT_PF 0x2 |
| 341 | +#define ICE_AQ_VSI_Q_OPT_RSS_LUT_GBL 0x3 |
| 342 | +#define ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_S 2 |
| 343 | +#define ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_M (0xF << ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_S) |
| 344 | +#define ICE_AQ_VSI_Q_OPT_RSS_HASH_S 6 |
| 345 | +#define ICE_AQ_VSI_Q_OPT_RSS_HASH_M (0x3 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) |
| 346 | +#define ICE_AQ_VSI_Q_OPT_RSS_TPLZ (0x0 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) |
| 347 | +#define ICE_AQ_VSI_Q_OPT_RSS_SYM_TPLZ (0x1 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) |
| 348 | +#define ICE_AQ_VSI_Q_OPT_RSS_XOR (0x2 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) |
| 349 | +#define ICE_AQ_VSI_Q_OPT_RSS_JHASH (0x3 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S) |
| 350 | + u8 q_opt_tc; |
| 351 | +#define ICE_AQ_VSI_Q_OPT_TC_OVR_S 0 |
| 352 | +#define ICE_AQ_VSI_Q_OPT_TC_OVR_M (0x1F << ICE_AQ_VSI_Q_OPT_TC_OVR_S) |
| 353 | +#define ICE_AQ_VSI_Q_OPT_PROF_TC_OVR BIT(7) |
| 354 | + u8 q_opt_flags; |
| 355 | +#define ICE_AQ_VSI_Q_OPT_PE_FLTR_EN BIT(0) |
| 356 | + u8 q_opt_reserved[3]; |
| 357 | + /* outer up section */ |
| 358 | + __le32 outer_up_table; /* same structure and defines as ingress tbl */ |
| 359 | + /* section 10 */ |
| 360 | + __le16 sect_10_reserved; |
| 361 | + /* flow director section */ |
| 362 | + __le16 fd_options; |
| 363 | +#define ICE_AQ_VSI_FD_ENABLE BIT(0) |
| 364 | +#define ICE_AQ_VSI_FD_TX_AUTO_ENABLE BIT(1) |
| 365 | +#define ICE_AQ_VSI_FD_PROG_ENABLE BIT(3) |
| 366 | + __le16 max_fd_fltr_dedicated; |
| 367 | + __le16 max_fd_fltr_shared; |
| 368 | + __le16 fd_def_q; |
| 369 | +#define ICE_AQ_VSI_FD_DEF_Q_S 0 |
| 370 | +#define ICE_AQ_VSI_FD_DEF_Q_M (0x7FF << ICE_AQ_VSI_FD_DEF_Q_S) |
| 371 | +#define ICE_AQ_VSI_FD_DEF_GRP_S 12 |
| 372 | +#define ICE_AQ_VSI_FD_DEF_GRP_M (0x7 << ICE_AQ_VSI_FD_DEF_GRP_S) |
| 373 | + __le16 fd_report_opt; |
| 374 | +#define ICE_AQ_VSI_FD_REPORT_Q_S 0 |
| 375 | +#define ICE_AQ_VSI_FD_REPORT_Q_M (0x7FF << ICE_AQ_VSI_FD_REPORT_Q_S) |
| 376 | +#define ICE_AQ_VSI_FD_DEF_PRIORITY_S 12 |
| 377 | +#define ICE_AQ_VSI_FD_DEF_PRIORITY_M (0x7 << ICE_AQ_VSI_FD_DEF_PRIORITY_S) |
| 378 | +#define ICE_AQ_VSI_FD_DEF_DROP BIT(15) |
| 379 | + /* PASID section */ |
| 380 | + __le32 pasid_id; |
| 381 | +#define ICE_AQ_VSI_PASID_ID_S 0 |
| 382 | +#define ICE_AQ_VSI_PASID_ID_M (0xFFFFF << ICE_AQ_VSI_PASID_ID_S) |
| 383 | +#define ICE_AQ_VSI_PASID_ID_VALID BIT(31) |
| 384 | + u8 reserved[24]; |
| 385 | +}; |
| 386 | + |
193 | 387 | /* Get Default Topology (indirect 0x0400) */ |
194 | 388 | struct ice_aqc_get_topo { |
195 | 389 | u8 port_num; |
@@ -576,6 +770,7 @@ struct ice_aq_desc { |
576 | 770 | struct ice_aqc_query_txsched_res query_sched_res; |
577 | 771 | struct ice_aqc_add_move_delete_elem add_move_delete_elem; |
578 | 772 | struct ice_aqc_nvm nvm; |
| 773 | + struct ice_aqc_add_get_update_free_vsi vsi_cmd; |
579 | 774 | struct ice_aqc_get_link_status get_link_status; |
580 | 775 | } params; |
581 | 776 | }; |
@@ -626,6 +821,10 @@ enum ice_adminq_opc { |
626 | 821 | /* internal switch commands */ |
627 | 822 | ice_aqc_opc_get_sw_cfg = 0x0200, |
628 | 823 |
|
| 824 | + /* VSI commands */ |
| 825 | + ice_aqc_opc_add_vsi = 0x0210, |
| 826 | + ice_aqc_opc_update_vsi = 0x0211, |
| 827 | + ice_aqc_opc_free_vsi = 0x0213, |
629 | 828 | ice_aqc_opc_clear_pf_cfg = 0x02A4, |
630 | 829 |
|
631 | 830 | /* transmit scheduler commands */ |
|
0 commit comments