1 /*******************************************************************************
3 Copyright (c) 2013 - 2015, Intel Corporation
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
9 1. Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
16 3. Neither the name of the Intel Corporation nor the names of its
17 contributors may be used to endorse or promote products derived from
18 this software without specific prior written permission.
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
24 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 POSSIBILITY OF SUCH DAMAGE.
32 ***************************************************************************/
34 #ifndef _AVF_ADMINQ_CMD_H_
35 #define _AVF_ADMINQ_CMD_H_
37 /* This header file defines the avf Admin Queue commands and is shared between
38 * avf Firmware and Software.
40 * This file needs to comply with the Linux Kernel coding style.
44 #define AVF_FW_API_VERSION_MAJOR 0x0001
45 #define AVF_FW_API_VERSION_MINOR_X722 0x0005
46 #define AVF_FW_API_VERSION_MINOR_X710 0x0007
48 #define AVF_FW_MINOR_VERSION(_h) ((_h)->mac.type == AVF_MAC_XL710 ? \
49 AVF_FW_API_VERSION_MINOR_X710 : \
50 AVF_FW_API_VERSION_MINOR_X722)
52 /* API version 1.7 implements additional link and PHY-specific APIs */
53 #define AVF_MINOR_VER_GET_LINK_INFO_XL710 0x0007
79 /* Flags sub-structure
80 * |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |
81 * |DD |CMP|ERR|VFE| * * RESERVED * * |LB |RD |VFC|BUF|SI |EI |FE |
84 /* command flags and offsets*/
85 #define AVF_AQ_FLAG_DD_SHIFT 0
86 #define AVF_AQ_FLAG_CMP_SHIFT 1
87 #define AVF_AQ_FLAG_ERR_SHIFT 2
88 #define AVF_AQ_FLAG_VFE_SHIFT 3
89 #define AVF_AQ_FLAG_LB_SHIFT 9
90 #define AVF_AQ_FLAG_RD_SHIFT 10
91 #define AVF_AQ_FLAG_VFC_SHIFT 11
92 #define AVF_AQ_FLAG_BUF_SHIFT 12
93 #define AVF_AQ_FLAG_SI_SHIFT 13
94 #define AVF_AQ_FLAG_EI_SHIFT 14
95 #define AVF_AQ_FLAG_FE_SHIFT 15
97 #define AVF_AQ_FLAG_DD (1 << AVF_AQ_FLAG_DD_SHIFT) /* 0x1 */
98 #define AVF_AQ_FLAG_CMP (1 << AVF_AQ_FLAG_CMP_SHIFT) /* 0x2 */
99 #define AVF_AQ_FLAG_ERR (1 << AVF_AQ_FLAG_ERR_SHIFT) /* 0x4 */
100 #define AVF_AQ_FLAG_VFE (1 << AVF_AQ_FLAG_VFE_SHIFT) /* 0x8 */
101 #define AVF_AQ_FLAG_LB (1 << AVF_AQ_FLAG_LB_SHIFT) /* 0x200 */
102 #define AVF_AQ_FLAG_RD (1 << AVF_AQ_FLAG_RD_SHIFT) /* 0x400 */
103 #define AVF_AQ_FLAG_VFC (1 << AVF_AQ_FLAG_VFC_SHIFT) /* 0x800 */
104 #define AVF_AQ_FLAG_BUF (1 << AVF_AQ_FLAG_BUF_SHIFT) /* 0x1000 */
105 #define AVF_AQ_FLAG_SI (1 << AVF_AQ_FLAG_SI_SHIFT) /* 0x2000 */
106 #define AVF_AQ_FLAG_EI (1 << AVF_AQ_FLAG_EI_SHIFT) /* 0x4000 */
107 #define AVF_AQ_FLAG_FE (1 << AVF_AQ_FLAG_FE_SHIFT) /* 0x8000 */
110 enum avf_admin_queue_err {
111 AVF_AQ_RC_OK = 0, /* success */
112 AVF_AQ_RC_EPERM = 1, /* Operation not permitted */
113 AVF_AQ_RC_ENOENT = 2, /* No such element */
114 AVF_AQ_RC_ESRCH = 3, /* Bad opcode */
115 AVF_AQ_RC_EINTR = 4, /* operation interrupted */
116 AVF_AQ_RC_EIO = 5, /* I/O error */
117 AVF_AQ_RC_ENXIO = 6, /* No such resource */
118 AVF_AQ_RC_E2BIG = 7, /* Arg too long */
119 AVF_AQ_RC_EAGAIN = 8, /* Try again */
120 AVF_AQ_RC_ENOMEM = 9, /* Out of memory */
121 AVF_AQ_RC_EACCES = 10, /* Permission denied */
122 AVF_AQ_RC_EFAULT = 11, /* Bad address */
123 AVF_AQ_RC_EBUSY = 12, /* Device or resource busy */
124 AVF_AQ_RC_EEXIST = 13, /* object already exists */
125 AVF_AQ_RC_EINVAL = 14, /* Invalid argument */
126 AVF_AQ_RC_ENOTTY = 15, /* Not a typewriter */
127 AVF_AQ_RC_ENOSPC = 16, /* No space left or alloc failure */
128 AVF_AQ_RC_ENOSYS = 17, /* Function not implemented */
129 AVF_AQ_RC_ERANGE = 18, /* Parameter out of range */
130 AVF_AQ_RC_EFLUSHED = 19, /* Cmd flushed due to prev cmd error */
131 AVF_AQ_RC_BAD_ADDR = 20, /* Descriptor contains a bad pointer */
132 AVF_AQ_RC_EMODE = 21, /* Op not allowed in current dev mode */
133 AVF_AQ_RC_EFBIG = 22, /* File too large */
136 /* Admin Queue command opcodes */
137 enum avf_admin_queue_opc {
139 avf_aqc_opc_get_version = 0x0001,
140 avf_aqc_opc_driver_version = 0x0002,
141 avf_aqc_opc_queue_shutdown = 0x0003,
142 avf_aqc_opc_set_pf_context = 0x0004,
144 /* resource ownership */
145 avf_aqc_opc_request_resource = 0x0008,
146 avf_aqc_opc_release_resource = 0x0009,
148 avf_aqc_opc_list_func_capabilities = 0x000A,
149 avf_aqc_opc_list_dev_capabilities = 0x000B,
152 avf_aqc_opc_set_proxy_config = 0x0104,
153 avf_aqc_opc_set_ns_proxy_table_entry = 0x0105,
156 avf_aqc_opc_mac_address_read = 0x0107,
157 avf_aqc_opc_mac_address_write = 0x0108,
160 avf_aqc_opc_clear_pxe_mode = 0x0110,
163 avf_aqc_opc_set_wol_filter = 0x0120,
164 avf_aqc_opc_get_wake_reason = 0x0121,
165 avf_aqc_opc_clear_all_wol_filters = 0x025E,
167 /* internal switch commands */
168 avf_aqc_opc_get_switch_config = 0x0200,
169 avf_aqc_opc_add_statistics = 0x0201,
170 avf_aqc_opc_remove_statistics = 0x0202,
171 avf_aqc_opc_set_port_parameters = 0x0203,
172 avf_aqc_opc_get_switch_resource_alloc = 0x0204,
173 avf_aqc_opc_set_switch_config = 0x0205,
174 avf_aqc_opc_rx_ctl_reg_read = 0x0206,
175 avf_aqc_opc_rx_ctl_reg_write = 0x0207,
177 avf_aqc_opc_add_vsi = 0x0210,
178 avf_aqc_opc_update_vsi_parameters = 0x0211,
179 avf_aqc_opc_get_vsi_parameters = 0x0212,
181 avf_aqc_opc_add_pv = 0x0220,
182 avf_aqc_opc_update_pv_parameters = 0x0221,
183 avf_aqc_opc_get_pv_parameters = 0x0222,
185 avf_aqc_opc_add_veb = 0x0230,
186 avf_aqc_opc_update_veb_parameters = 0x0231,
187 avf_aqc_opc_get_veb_parameters = 0x0232,
189 avf_aqc_opc_delete_element = 0x0243,
191 avf_aqc_opc_add_macvlan = 0x0250,
192 avf_aqc_opc_remove_macvlan = 0x0251,
193 avf_aqc_opc_add_vlan = 0x0252,
194 avf_aqc_opc_remove_vlan = 0x0253,
195 avf_aqc_opc_set_vsi_promiscuous_modes = 0x0254,
196 avf_aqc_opc_add_tag = 0x0255,
197 avf_aqc_opc_remove_tag = 0x0256,
198 avf_aqc_opc_add_multicast_etag = 0x0257,
199 avf_aqc_opc_remove_multicast_etag = 0x0258,
200 avf_aqc_opc_update_tag = 0x0259,
201 avf_aqc_opc_add_control_packet_filter = 0x025A,
202 avf_aqc_opc_remove_control_packet_filter = 0x025B,
203 avf_aqc_opc_add_cloud_filters = 0x025C,
204 avf_aqc_opc_remove_cloud_filters = 0x025D,
205 avf_aqc_opc_clear_wol_switch_filters = 0x025E,
206 avf_aqc_opc_replace_cloud_filters = 0x025F,
208 avf_aqc_opc_add_mirror_rule = 0x0260,
209 avf_aqc_opc_delete_mirror_rule = 0x0261,
211 /* Dynamic Device Personalization */
212 avf_aqc_opc_write_personalization_profile = 0x0270,
213 avf_aqc_opc_get_personalization_profile_list = 0x0271,
216 avf_aqc_opc_dcb_ignore_pfc = 0x0301,
217 avf_aqc_opc_dcb_updated = 0x0302,
218 avf_aqc_opc_set_dcb_parameters = 0x0303,
221 avf_aqc_opc_configure_vsi_bw_limit = 0x0400,
222 avf_aqc_opc_configure_vsi_ets_sla_bw_limit = 0x0406,
223 avf_aqc_opc_configure_vsi_tc_bw = 0x0407,
224 avf_aqc_opc_query_vsi_bw_config = 0x0408,
225 avf_aqc_opc_query_vsi_ets_sla_config = 0x040A,
226 avf_aqc_opc_configure_switching_comp_bw_limit = 0x0410,
228 avf_aqc_opc_enable_switching_comp_ets = 0x0413,
229 avf_aqc_opc_modify_switching_comp_ets = 0x0414,
230 avf_aqc_opc_disable_switching_comp_ets = 0x0415,
231 avf_aqc_opc_configure_switching_comp_ets_bw_limit = 0x0416,
232 avf_aqc_opc_configure_switching_comp_bw_config = 0x0417,
233 avf_aqc_opc_query_switching_comp_ets_config = 0x0418,
234 avf_aqc_opc_query_port_ets_config = 0x0419,
235 avf_aqc_opc_query_switching_comp_bw_config = 0x041A,
236 avf_aqc_opc_suspend_port_tx = 0x041B,
237 avf_aqc_opc_resume_port_tx = 0x041C,
238 avf_aqc_opc_configure_partition_bw = 0x041D,
240 avf_aqc_opc_query_hmc_resource_profile = 0x0500,
241 avf_aqc_opc_set_hmc_resource_profile = 0x0501,
246 avf_aqc_opc_get_phy_abilities = 0x0600,
247 avf_aqc_opc_set_phy_config = 0x0601,
248 avf_aqc_opc_set_mac_config = 0x0603,
249 avf_aqc_opc_set_link_restart_an = 0x0605,
250 avf_aqc_opc_get_link_status = 0x0607,
251 avf_aqc_opc_set_phy_int_mask = 0x0613,
252 avf_aqc_opc_get_local_advt_reg = 0x0614,
253 avf_aqc_opc_set_local_advt_reg = 0x0615,
254 avf_aqc_opc_get_partner_advt = 0x0616,
255 avf_aqc_opc_set_lb_modes = 0x0618,
256 avf_aqc_opc_get_phy_wol_caps = 0x0621,
257 avf_aqc_opc_set_phy_debug = 0x0622,
258 avf_aqc_opc_upload_ext_phy_fm = 0x0625,
259 avf_aqc_opc_run_phy_activity = 0x0626,
260 avf_aqc_opc_set_phy_register = 0x0628,
261 avf_aqc_opc_get_phy_register = 0x0629,
264 avf_aqc_opc_nvm_read = 0x0701,
265 avf_aqc_opc_nvm_erase = 0x0702,
266 avf_aqc_opc_nvm_update = 0x0703,
267 avf_aqc_opc_nvm_config_read = 0x0704,
268 avf_aqc_opc_nvm_config_write = 0x0705,
269 avf_aqc_opc_nvm_progress = 0x0706,
270 avf_aqc_opc_oem_post_update = 0x0720,
271 avf_aqc_opc_thermal_sensor = 0x0721,
273 /* virtualization commands */
274 avf_aqc_opc_send_msg_to_pf = 0x0801,
275 avf_aqc_opc_send_msg_to_vf = 0x0802,
276 avf_aqc_opc_send_msg_to_peer = 0x0803,
278 /* alternate structure */
279 avf_aqc_opc_alternate_write = 0x0900,
280 avf_aqc_opc_alternate_write_indirect = 0x0901,
281 avf_aqc_opc_alternate_read = 0x0902,
282 avf_aqc_opc_alternate_read_indirect = 0x0903,
283 avf_aqc_opc_alternate_write_done = 0x0904,
284 avf_aqc_opc_alternate_set_mode = 0x0905,
285 avf_aqc_opc_alternate_clear_port = 0x0906,
288 avf_aqc_opc_lldp_get_mib = 0x0A00,
289 avf_aqc_opc_lldp_update_mib = 0x0A01,
290 avf_aqc_opc_lldp_add_tlv = 0x0A02,
291 avf_aqc_opc_lldp_update_tlv = 0x0A03,
292 avf_aqc_opc_lldp_delete_tlv = 0x0A04,
293 avf_aqc_opc_lldp_stop = 0x0A05,
294 avf_aqc_opc_lldp_start = 0x0A06,
295 avf_aqc_opc_get_cee_dcb_cfg = 0x0A07,
296 avf_aqc_opc_lldp_set_local_mib = 0x0A08,
297 avf_aqc_opc_lldp_stop_start_spec_agent = 0x0A09,
299 /* Tunnel commands */
300 avf_aqc_opc_add_udp_tunnel = 0x0B00,
301 avf_aqc_opc_del_udp_tunnel = 0x0B01,
302 avf_aqc_opc_set_rss_key = 0x0B02,
303 avf_aqc_opc_set_rss_lut = 0x0B03,
304 avf_aqc_opc_get_rss_key = 0x0B04,
305 avf_aqc_opc_get_rss_lut = 0x0B05,
308 avf_aqc_opc_event_lan_overflow = 0x1001,
311 avf_aqc_opc_oem_parameter_change = 0xFE00,
312 avf_aqc_opc_oem_device_status_change = 0xFE01,
313 avf_aqc_opc_oem_ocsd_initialize = 0xFE02,
314 avf_aqc_opc_oem_ocbb_initialize = 0xFE03,
317 avf_aqc_opc_debug_read_reg = 0xFF03,
318 avf_aqc_opc_debug_write_reg = 0xFF04,
319 avf_aqc_opc_debug_modify_reg = 0xFF07,
320 avf_aqc_opc_debug_dump_internals = 0xFF08,
323 /* command structures and indirect data structures */
325 /* Structure naming conventions:
326 * - no suffix for direct command descriptor structures
327 * - _data for indirect sent data
328 * - _resp for indirect return data (data which is both will use _data)
329 * - _completion for direct return data
330 * - _element_ for repeated elements (may also be _data or _resp)
332 * Command structures are expected to overlay the params.raw member of the basic
333 * descriptor, and as such cannot exceed 16 bytes in length.
336 /* This macro is used to generate a compilation error if a structure
337 * is not exactly the correct length. It gives a divide by zero error if the
338 * structure is not of the correct size, otherwise it creates an enum that is
341 #define AVF_CHECK_STRUCT_LEN(n, X) enum avf_static_assert_enum_##X \
342 { avf_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
344 /* This macro is used extensively to ensure that command structures are 16
345 * bytes in length as they have to map to the raw array of that size.
347 #define AVF_CHECK_CMD_LENGTH(X) AVF_CHECK_STRUCT_LEN(16, X)
349 /* internal (0x00XX) commands */
351 /* Get version (direct 0x0001) */
352 struct avf_aqc_get_version {
361 AVF_CHECK_CMD_LENGTH(avf_aqc_get_version);
363 /* Send driver version (indirect 0x0002) */
364 struct avf_aqc_driver_version {
368 u8 driver_subbuild_ver;
374 AVF_CHECK_CMD_LENGTH(avf_aqc_driver_version);
376 /* Queue Shutdown (direct 0x0003) */
377 struct avf_aqc_queue_shutdown {
378 __le32 driver_unloading;
379 #define AVF_AQ_DRIVER_UNLOADING 0x1
383 AVF_CHECK_CMD_LENGTH(avf_aqc_queue_shutdown);
385 /* Set PF context (0x0004, direct) */
386 struct avf_aqc_set_pf_context {
391 AVF_CHECK_CMD_LENGTH(avf_aqc_set_pf_context);
393 /* Request resource ownership (direct 0x0008)
394 * Release resource ownership (direct 0x0009)
396 #define AVF_AQ_RESOURCE_NVM 1
397 #define AVF_AQ_RESOURCE_SDP 2
398 #define AVF_AQ_RESOURCE_ACCESS_READ 1
399 #define AVF_AQ_RESOURCE_ACCESS_WRITE 2
400 #define AVF_AQ_RESOURCE_NVM_READ_TIMEOUT 3000
401 #define AVF_AQ_RESOURCE_NVM_WRITE_TIMEOUT 180000
403 struct avf_aqc_request_resource {
407 __le32 resource_number;
411 AVF_CHECK_CMD_LENGTH(avf_aqc_request_resource);
413 /* Get function capabilities (indirect 0x000A)
414 * Get device capabilities (indirect 0x000B)
416 struct avf_aqc_list_capabilites {
418 #define AVF_AQ_LIST_CAP_PF_INDEX_EN 1
426 AVF_CHECK_CMD_LENGTH(avf_aqc_list_capabilites);
428 struct avf_aqc_list_capabilities_element_resp {
440 #define AVF_AQ_CAP_ID_SWITCH_MODE 0x0001
441 #define AVF_AQ_CAP_ID_MNG_MODE 0x0002
442 #define AVF_AQ_CAP_ID_NPAR_ACTIVE 0x0003
443 #define AVF_AQ_CAP_ID_OS2BMC_CAP 0x0004
444 #define AVF_AQ_CAP_ID_FUNCTIONS_VALID 0x0005
445 #define AVF_AQ_CAP_ID_ALTERNATE_RAM 0x0006
446 #define AVF_AQ_CAP_ID_WOL_AND_PROXY 0x0008
447 #define AVF_AQ_CAP_ID_SRIOV 0x0012
448 #define AVF_AQ_CAP_ID_VF 0x0013
449 #define AVF_AQ_CAP_ID_VMDQ 0x0014
450 #define AVF_AQ_CAP_ID_8021QBG 0x0015
451 #define AVF_AQ_CAP_ID_8021QBR 0x0016
452 #define AVF_AQ_CAP_ID_VSI 0x0017
453 #define AVF_AQ_CAP_ID_DCB 0x0018
454 #define AVF_AQ_CAP_ID_FCOE 0x0021
455 #define AVF_AQ_CAP_ID_ISCSI 0x0022
456 #define AVF_AQ_CAP_ID_RSS 0x0040
457 #define AVF_AQ_CAP_ID_RXQ 0x0041
458 #define AVF_AQ_CAP_ID_TXQ 0x0042
459 #define AVF_AQ_CAP_ID_MSIX 0x0043
460 #define AVF_AQ_CAP_ID_VF_MSIX 0x0044
461 #define AVF_AQ_CAP_ID_FLOW_DIRECTOR 0x0045
462 #define AVF_AQ_CAP_ID_1588 0x0046
463 #define AVF_AQ_CAP_ID_IWARP 0x0051
464 #define AVF_AQ_CAP_ID_LED 0x0061
465 #define AVF_AQ_CAP_ID_SDP 0x0062
466 #define AVF_AQ_CAP_ID_MDIO 0x0063
467 #define AVF_AQ_CAP_ID_WSR_PROT 0x0064
468 #define AVF_AQ_CAP_ID_NVM_MGMT 0x0080
469 #define AVF_AQ_CAP_ID_FLEX10 0x00F1
470 #define AVF_AQ_CAP_ID_CEM 0x00F2
472 /* Set CPPM Configuration (direct 0x0103) */
473 struct avf_aqc_cppm_configuration {
474 __le16 command_flags;
475 #define AVF_AQ_CPPM_EN_LTRC 0x0800
476 #define AVF_AQ_CPPM_EN_DMCTH 0x1000
477 #define AVF_AQ_CPPM_EN_DMCTLX 0x2000
478 #define AVF_AQ_CPPM_EN_HPTC 0x4000
479 #define AVF_AQ_CPPM_EN_DMARC 0x8000
488 AVF_CHECK_CMD_LENGTH(avf_aqc_cppm_configuration);
490 /* Set ARP Proxy command / response (indirect 0x0104) */
491 struct avf_aqc_arp_proxy_data {
492 __le16 command_flags;
493 #define AVF_AQ_ARP_INIT_IPV4 0x0800
494 #define AVF_AQ_ARP_UNSUP_CTL 0x1000
495 #define AVF_AQ_ARP_ENA 0x2000
496 #define AVF_AQ_ARP_ADD_IPV4 0x4000
497 #define AVF_AQ_ARP_DEL_IPV4 0x8000
499 __le32 enabled_offloads;
500 #define AVF_AQ_ARP_DIRECTED_OFFLOAD_ENABLE 0x00000020
501 #define AVF_AQ_ARP_OFFLOAD_ENABLE 0x00000800
507 AVF_CHECK_STRUCT_LEN(0x14, avf_aqc_arp_proxy_data);
509 /* Set NS Proxy Table Entry Command (indirect 0x0105) */
510 struct avf_aqc_ns_proxy_data {
511 __le16 table_idx_mac_addr_0;
512 __le16 table_idx_mac_addr_1;
513 __le16 table_idx_ipv6_0;
514 __le16 table_idx_ipv6_1;
516 #define AVF_AQ_NS_PROXY_ADD_0 0x0001
517 #define AVF_AQ_NS_PROXY_DEL_0 0x0002
518 #define AVF_AQ_NS_PROXY_ADD_1 0x0004
519 #define AVF_AQ_NS_PROXY_DEL_1 0x0008
520 #define AVF_AQ_NS_PROXY_ADD_IPV6_0 0x0010
521 #define AVF_AQ_NS_PROXY_DEL_IPV6_0 0x0020
522 #define AVF_AQ_NS_PROXY_ADD_IPV6_1 0x0040
523 #define AVF_AQ_NS_PROXY_DEL_IPV6_1 0x0080
524 #define AVF_AQ_NS_PROXY_COMMAND_SEQ 0x0100
525 #define AVF_AQ_NS_PROXY_INIT_IPV6_TBL 0x0200
526 #define AVF_AQ_NS_PROXY_INIT_MAC_TBL 0x0400
527 #define AVF_AQ_NS_PROXY_OFFLOAD_ENABLE 0x0800
528 #define AVF_AQ_NS_PROXY_DIRECTED_OFFLOAD_ENABLE 0x1000
531 u8 local_mac_addr[6];
532 u8 ipv6_addr_0[16]; /* Warning! spec specifies BE byte order */
536 AVF_CHECK_STRUCT_LEN(0x3c, avf_aqc_ns_proxy_data);
538 /* Manage LAA Command (0x0106) - obsolete */
539 struct avf_aqc_mng_laa {
540 __le16 command_flags;
541 #define AVF_AQ_LAA_FLAG_WR 0x8000
548 AVF_CHECK_CMD_LENGTH(avf_aqc_mng_laa);
550 /* Manage MAC Address Read Command (indirect 0x0107) */
551 struct avf_aqc_mac_address_read {
552 __le16 command_flags;
553 #define AVF_AQC_LAN_ADDR_VALID 0x10
554 #define AVF_AQC_SAN_ADDR_VALID 0x20
555 #define AVF_AQC_PORT_ADDR_VALID 0x40
556 #define AVF_AQC_WOL_ADDR_VALID 0x80
557 #define AVF_AQC_MC_MAG_EN_VALID 0x100
558 #define AVF_AQC_WOL_PRESERVE_STATUS 0x200
559 #define AVF_AQC_ADDR_VALID_MASK 0x3F0
565 AVF_CHECK_CMD_LENGTH(avf_aqc_mac_address_read);
567 struct avf_aqc_mac_address_read_data {
574 AVF_CHECK_STRUCT_LEN(24, avf_aqc_mac_address_read_data);
576 /* Manage MAC Address Write Command (0x0108) */
577 struct avf_aqc_mac_address_write {
578 __le16 command_flags;
579 #define AVF_AQC_MC_MAG_EN 0x0100
580 #define AVF_AQC_WOL_PRESERVE_ON_PFR 0x0200
581 #define AVF_AQC_WRITE_TYPE_LAA_ONLY 0x0000
582 #define AVF_AQC_WRITE_TYPE_LAA_WOL 0x4000
583 #define AVF_AQC_WRITE_TYPE_PORT 0x8000
584 #define AVF_AQC_WRITE_TYPE_UPDATE_MC_MAG 0xC000
585 #define AVF_AQC_WRITE_TYPE_MASK 0xC000
592 AVF_CHECK_CMD_LENGTH(avf_aqc_mac_address_write);
594 /* PXE commands (0x011x) */
596 /* Clear PXE Command and response (direct 0x0110) */
597 struct avf_aqc_clear_pxe {
602 AVF_CHECK_CMD_LENGTH(avf_aqc_clear_pxe);
604 /* Set WoL Filter (0x0120) */
606 struct avf_aqc_set_wol_filter {
608 #define AVF_AQC_MAX_NUM_WOL_FILTERS 8
609 #define AVF_AQC_SET_WOL_FILTER_TYPE_MAGIC_SHIFT 15
610 #define AVF_AQC_SET_WOL_FILTER_TYPE_MAGIC_MASK (0x1 << \
611 AVF_AQC_SET_WOL_FILTER_TYPE_MAGIC_SHIFT)
613 #define AVF_AQC_SET_WOL_FILTER_INDEX_SHIFT 0
614 #define AVF_AQC_SET_WOL_FILTER_INDEX_MASK (0x7 << \
615 AVF_AQC_SET_WOL_FILTER_INDEX_SHIFT)
617 #define AVF_AQC_SET_WOL_FILTER 0x8000
618 #define AVF_AQC_SET_WOL_FILTER_NO_TCO_WOL 0x4000
619 #define AVF_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR 0x2000
620 #define AVF_AQC_SET_WOL_FILTER_ACTION_CLEAR 0
621 #define AVF_AQC_SET_WOL_FILTER_ACTION_SET 1
623 #define AVF_AQC_SET_WOL_FILTER_ACTION_VALID 0x8000
624 #define AVF_AQC_SET_WOL_FILTER_NO_TCO_ACTION_VALID 0x4000
630 AVF_CHECK_CMD_LENGTH(avf_aqc_set_wol_filter);
632 struct avf_aqc_set_wol_filter_data {
637 AVF_CHECK_STRUCT_LEN(0x90, avf_aqc_set_wol_filter_data);
639 /* Get Wake Reason (0x0121) */
641 struct avf_aqc_get_wake_reason_completion {
644 #define AVF_AQC_GET_WAKE_UP_REASON_WOL_REASON_MATCHED_INDEX_SHIFT 0
645 #define AVF_AQC_GET_WAKE_UP_REASON_WOL_REASON_MATCHED_INDEX_MASK (0xFF << \
646 AVF_AQC_GET_WAKE_UP_REASON_WOL_REASON_MATCHED_INDEX_SHIFT)
647 #define AVF_AQC_GET_WAKE_UP_REASON_WOL_REASON_RESERVED_SHIFT 8
648 #define AVF_AQC_GET_WAKE_UP_REASON_WOL_REASON_RESERVED_MASK (0xFF << \
649 AVF_AQC_GET_WAKE_UP_REASON_WOL_REASON_RESERVED_SHIFT)
653 AVF_CHECK_CMD_LENGTH(avf_aqc_get_wake_reason_completion);
655 /* Switch configuration commands (0x02xx) */
657 /* Used by many indirect commands that only pass an seid and a buffer in the
660 struct avf_aqc_switch_seid {
667 AVF_CHECK_CMD_LENGTH(avf_aqc_switch_seid);
669 /* Get Switch Configuration command (indirect 0x0200)
670 * uses avf_aqc_switch_seid for the descriptor
672 struct avf_aqc_get_switch_config_header_resp {
678 AVF_CHECK_CMD_LENGTH(avf_aqc_get_switch_config_header_resp);
680 struct avf_aqc_switch_config_element_resp {
682 #define AVF_AQ_SW_ELEM_TYPE_MAC 1
683 #define AVF_AQ_SW_ELEM_TYPE_PF 2
684 #define AVF_AQ_SW_ELEM_TYPE_VF 3
685 #define AVF_AQ_SW_ELEM_TYPE_EMP 4
686 #define AVF_AQ_SW_ELEM_TYPE_BMC 5
687 #define AVF_AQ_SW_ELEM_TYPE_PV 16
688 #define AVF_AQ_SW_ELEM_TYPE_VEB 17
689 #define AVF_AQ_SW_ELEM_TYPE_PA 18
690 #define AVF_AQ_SW_ELEM_TYPE_VSI 19
692 #define AVF_AQ_SW_ELEM_REV_1 1
695 __le16 downlink_seid;
698 #define AVF_AQ_CONN_TYPE_REGULAR 0x1
699 #define AVF_AQ_CONN_TYPE_DEFAULT 0x2
700 #define AVF_AQ_CONN_TYPE_CASCADED 0x3
705 AVF_CHECK_STRUCT_LEN(0x10, avf_aqc_switch_config_element_resp);
707 /* Get Switch Configuration (indirect 0x0200)
708 * an array of elements are returned in the response buffer
709 * the first in the array is the header, remainder are elements
711 struct avf_aqc_get_switch_config_resp {
712 struct avf_aqc_get_switch_config_header_resp header;
713 struct avf_aqc_switch_config_element_resp element[1];
716 AVF_CHECK_STRUCT_LEN(0x20, avf_aqc_get_switch_config_resp);
718 /* Add Statistics (direct 0x0201)
719 * Remove Statistics (direct 0x0202)
721 struct avf_aqc_add_remove_statistics {
728 AVF_CHECK_CMD_LENGTH(avf_aqc_add_remove_statistics);
730 /* Set Port Parameters command (direct 0x0203) */
731 struct avf_aqc_set_port_parameters {
732 __le16 command_flags;
733 #define AVF_AQ_SET_P_PARAMS_SAVE_BAD_PACKETS 1
734 #define AVF_AQ_SET_P_PARAMS_PAD_SHORT_PACKETS 2 /* must set! */
735 #define AVF_AQ_SET_P_PARAMS_DOUBLE_VLAN_ENA 4
736 __le16 bad_frame_vsi;
737 #define AVF_AQ_SET_P_PARAMS_BFRAME_SEID_SHIFT 0x0
738 #define AVF_AQ_SET_P_PARAMS_BFRAME_SEID_MASK 0x3FF
739 __le16 default_seid; /* reserved for command */
743 AVF_CHECK_CMD_LENGTH(avf_aqc_set_port_parameters);
745 /* Get Switch Resource Allocation (indirect 0x0204) */
746 struct avf_aqc_get_switch_resource_alloc {
747 u8 num_entries; /* reserved for command */
753 AVF_CHECK_CMD_LENGTH(avf_aqc_get_switch_resource_alloc);
755 /* expect an array of these structs in the response buffer */
756 struct avf_aqc_switch_resource_alloc_element_resp {
758 #define AVF_AQ_RESOURCE_TYPE_VEB 0x0
759 #define AVF_AQ_RESOURCE_TYPE_VSI 0x1
760 #define AVF_AQ_RESOURCE_TYPE_MACADDR 0x2
761 #define AVF_AQ_RESOURCE_TYPE_STAG 0x3
762 #define AVF_AQ_RESOURCE_TYPE_ETAG 0x4
763 #define AVF_AQ_RESOURCE_TYPE_MULTICAST_HASH 0x5
764 #define AVF_AQ_RESOURCE_TYPE_UNICAST_HASH 0x6
765 #define AVF_AQ_RESOURCE_TYPE_VLAN 0x7
766 #define AVF_AQ_RESOURCE_TYPE_VSI_LIST_ENTRY 0x8
767 #define AVF_AQ_RESOURCE_TYPE_ETAG_LIST_ENTRY 0x9
768 #define AVF_AQ_RESOURCE_TYPE_VLAN_STAT_POOL 0xA
769 #define AVF_AQ_RESOURCE_TYPE_MIRROR_RULE 0xB
770 #define AVF_AQ_RESOURCE_TYPE_QUEUE_SETS 0xC
771 #define AVF_AQ_RESOURCE_TYPE_VLAN_FILTERS 0xD
772 #define AVF_AQ_RESOURCE_TYPE_INNER_MAC_FILTERS 0xF
773 #define AVF_AQ_RESOURCE_TYPE_IP_FILTERS 0x10
774 #define AVF_AQ_RESOURCE_TYPE_GRE_VN_KEYS 0x11
775 #define AVF_AQ_RESOURCE_TYPE_VN2_KEYS 0x12
776 #define AVF_AQ_RESOURCE_TYPE_TUNNEL_PORTS 0x13
781 __le16 total_unalloced;
785 AVF_CHECK_STRUCT_LEN(0x10, avf_aqc_switch_resource_alloc_element_resp);
787 /* Set Switch Configuration (direct 0x0205) */
788 struct avf_aqc_set_switch_config {
790 /* flags used for both fields below */
791 #define AVF_AQ_SET_SWITCH_CFG_PROMISC 0x0001
792 #define AVF_AQ_SET_SWITCH_CFG_L2_FILTER 0x0002
793 #define AVF_AQ_SET_SWITCH_CFG_HW_ATR_EVICT 0x0004
795 /* The ethertype in switch_tag is dropped on ingress and used
796 * internally by the switch. Set this to zero for the default
797 * of 0x88a8 (802.1ad). Should be zero for firmware API
798 * versions lower than 1.7.
801 /* The ethertypes in first_tag and second_tag are used to
802 * match the outer and inner VLAN tags (respectively) when HW
803 * double VLAN tagging is enabled via the set port parameters
804 * AQ command. Otherwise these are both ignored. Set them to
805 * zero for their defaults of 0x8100 (802.1Q). Should be zero
806 * for firmware API versions lower than 1.7.
813 AVF_CHECK_CMD_LENGTH(avf_aqc_set_switch_config);
815 /* Read Receive control registers (direct 0x0206)
816 * Write Receive control registers (direct 0x0207)
817 * used for accessing Rx control registers that can be
818 * slow and need special handling when under high Rx load
820 struct avf_aqc_rx_ctl_reg_read_write {
827 AVF_CHECK_CMD_LENGTH(avf_aqc_rx_ctl_reg_read_write);
829 /* Add VSI (indirect 0x0210)
830 * this indirect command uses struct avf_aqc_vsi_properties_data
831 * as the indirect buffer (128 bytes)
833 * Update VSI (indirect 0x211)
834 * uses the same data structure as Add VSI
836 * Get VSI (indirect 0x0212)
837 * uses the same completion and data structure as Add VSI
839 struct avf_aqc_add_get_update_vsi {
842 #define AVF_AQ_VSI_CONN_TYPE_NORMAL 0x1
843 #define AVF_AQ_VSI_CONN_TYPE_DEFAULT 0x2
844 #define AVF_AQ_VSI_CONN_TYPE_CASCADED 0x3
849 #define AVF_AQ_VSI_TYPE_SHIFT 0x0
850 #define AVF_AQ_VSI_TYPE_MASK (0x3 << AVF_AQ_VSI_TYPE_SHIFT)
851 #define AVF_AQ_VSI_TYPE_VF 0x0
852 #define AVF_AQ_VSI_TYPE_VMDQ2 0x1
853 #define AVF_AQ_VSI_TYPE_PF 0x2
854 #define AVF_AQ_VSI_TYPE_EMP_MNG 0x3
855 #define AVF_AQ_VSI_FLAG_CASCADED_PV 0x4
860 AVF_CHECK_CMD_LENGTH(avf_aqc_add_get_update_vsi);
862 struct avf_aqc_add_get_update_vsi_completion {
871 AVF_CHECK_CMD_LENGTH(avf_aqc_add_get_update_vsi_completion);
873 struct avf_aqc_vsi_properties_data {
874 /* first 96 byte are written by SW */
875 __le16 valid_sections;
876 #define AVF_AQ_VSI_PROP_SWITCH_VALID 0x0001
877 #define AVF_AQ_VSI_PROP_SECURITY_VALID 0x0002
878 #define AVF_AQ_VSI_PROP_VLAN_VALID 0x0004
879 #define AVF_AQ_VSI_PROP_CAS_PV_VALID 0x0008
880 #define AVF_AQ_VSI_PROP_INGRESS_UP_VALID 0x0010
881 #define AVF_AQ_VSI_PROP_EGRESS_UP_VALID 0x0020
882 #define AVF_AQ_VSI_PROP_QUEUE_MAP_VALID 0x0040
883 #define AVF_AQ_VSI_PROP_QUEUE_OPT_VALID 0x0080
884 #define AVF_AQ_VSI_PROP_OUTER_UP_VALID 0x0100
885 #define AVF_AQ_VSI_PROP_SCHED_VALID 0x0200
887 __le16 switch_id; /* 12bit id combined with flags below */
888 #define AVF_AQ_VSI_SW_ID_SHIFT 0x0000
889 #define AVF_AQ_VSI_SW_ID_MASK (0xFFF << AVF_AQ_VSI_SW_ID_SHIFT)
890 #define AVF_AQ_VSI_SW_ID_FLAG_NOT_STAG 0x1000
891 #define AVF_AQ_VSI_SW_ID_FLAG_ALLOW_LB 0x2000
892 #define AVF_AQ_VSI_SW_ID_FLAG_LOCAL_LB 0x4000
894 /* security section */
896 #define AVF_AQ_VSI_SEC_FLAG_ALLOW_DEST_OVRD 0x01
897 #define AVF_AQ_VSI_SEC_FLAG_ENABLE_VLAN_CHK 0x02
898 #define AVF_AQ_VSI_SEC_FLAG_ENABLE_MAC_CHK 0x04
901 __le16 pvid; /* VLANS include priority bits */
904 #define AVF_AQ_VSI_PVLAN_MODE_SHIFT 0x00
905 #define AVF_AQ_VSI_PVLAN_MODE_MASK (0x03 << \
906 AVF_AQ_VSI_PVLAN_MODE_SHIFT)
907 #define AVF_AQ_VSI_PVLAN_MODE_TAGGED 0x01
908 #define AVF_AQ_VSI_PVLAN_MODE_UNTAGGED 0x02
909 #define AVF_AQ_VSI_PVLAN_MODE_ALL 0x03
910 #define AVF_AQ_VSI_PVLAN_INSERT_PVID 0x04
911 #define AVF_AQ_VSI_PVLAN_EMOD_SHIFT 0x03
912 #define AVF_AQ_VSI_PVLAN_EMOD_MASK (0x3 << \
913 AVF_AQ_VSI_PVLAN_EMOD_SHIFT)
914 #define AVF_AQ_VSI_PVLAN_EMOD_STR_BOTH 0x0
915 #define AVF_AQ_VSI_PVLAN_EMOD_STR_UP 0x08
916 #define AVF_AQ_VSI_PVLAN_EMOD_STR 0x10
917 #define AVF_AQ_VSI_PVLAN_EMOD_NOTHING 0x18
918 u8 pvlan_reserved[3];
919 /* ingress egress up sections */
920 __le32 ingress_table; /* bitmap, 3 bits per up */
921 #define AVF_AQ_VSI_UP_TABLE_UP0_SHIFT 0
922 #define AVF_AQ_VSI_UP_TABLE_UP0_MASK (0x7 << \
923 AVF_AQ_VSI_UP_TABLE_UP0_SHIFT)
924 #define AVF_AQ_VSI_UP_TABLE_UP1_SHIFT 3
925 #define AVF_AQ_VSI_UP_TABLE_UP1_MASK (0x7 << \
926 AVF_AQ_VSI_UP_TABLE_UP1_SHIFT)
927 #define AVF_AQ_VSI_UP_TABLE_UP2_SHIFT 6
928 #define AVF_AQ_VSI_UP_TABLE_UP2_MASK (0x7 << \
929 AVF_AQ_VSI_UP_TABLE_UP2_SHIFT)
930 #define AVF_AQ_VSI_UP_TABLE_UP3_SHIFT 9
931 #define AVF_AQ_VSI_UP_TABLE_UP3_MASK (0x7 << \
932 AVF_AQ_VSI_UP_TABLE_UP3_SHIFT)
933 #define AVF_AQ_VSI_UP_TABLE_UP4_SHIFT 12
934 #define AVF_AQ_VSI_UP_TABLE_UP4_MASK (0x7 << \
935 AVF_AQ_VSI_UP_TABLE_UP4_SHIFT)
936 #define AVF_AQ_VSI_UP_TABLE_UP5_SHIFT 15
937 #define AVF_AQ_VSI_UP_TABLE_UP5_MASK (0x7 << \
938 AVF_AQ_VSI_UP_TABLE_UP5_SHIFT)
939 #define AVF_AQ_VSI_UP_TABLE_UP6_SHIFT 18
940 #define AVF_AQ_VSI_UP_TABLE_UP6_MASK (0x7 << \
941 AVF_AQ_VSI_UP_TABLE_UP6_SHIFT)
942 #define AVF_AQ_VSI_UP_TABLE_UP7_SHIFT 21
943 #define AVF_AQ_VSI_UP_TABLE_UP7_MASK (0x7 << \
944 AVF_AQ_VSI_UP_TABLE_UP7_SHIFT)
945 __le32 egress_table; /* same defines as for ingress table */
946 /* cascaded PV section */
949 #define AVF_AQ_VSI_CAS_PV_TAGX_SHIFT 0x00
950 #define AVF_AQ_VSI_CAS_PV_TAGX_MASK (0x03 << \
951 AVF_AQ_VSI_CAS_PV_TAGX_SHIFT)
952 #define AVF_AQ_VSI_CAS_PV_TAGX_LEAVE 0x00
953 #define AVF_AQ_VSI_CAS_PV_TAGX_REMOVE 0x01
954 #define AVF_AQ_VSI_CAS_PV_TAGX_COPY 0x02
955 #define AVF_AQ_VSI_CAS_PV_INSERT_TAG 0x10
956 #define AVF_AQ_VSI_CAS_PV_ETAG_PRUNE 0x20
957 #define AVF_AQ_VSI_CAS_PV_ACCEPT_HOST_TAG 0x40
959 /* queue mapping section */
960 __le16 mapping_flags;
961 #define AVF_AQ_VSI_QUE_MAP_CONTIG 0x0
962 #define AVF_AQ_VSI_QUE_MAP_NONCONTIG 0x1
963 __le16 queue_mapping[16];
964 #define AVF_AQ_VSI_QUEUE_SHIFT 0x0
965 #define AVF_AQ_VSI_QUEUE_MASK (0x7FF << AVF_AQ_VSI_QUEUE_SHIFT)
966 __le16 tc_mapping[8];
967 #define AVF_AQ_VSI_TC_QUE_OFFSET_SHIFT 0
968 #define AVF_AQ_VSI_TC_QUE_OFFSET_MASK (0x1FF << \
969 AVF_AQ_VSI_TC_QUE_OFFSET_SHIFT)
970 #define AVF_AQ_VSI_TC_QUE_NUMBER_SHIFT 9
971 #define AVF_AQ_VSI_TC_QUE_NUMBER_MASK (0x7 << \
972 AVF_AQ_VSI_TC_QUE_NUMBER_SHIFT)
973 /* queueing option section */
974 u8 queueing_opt_flags;
975 #define AVF_AQ_VSI_QUE_OPT_MULTICAST_UDP_ENA 0x04
976 #define AVF_AQ_VSI_QUE_OPT_UNICAST_UDP_ENA 0x08
977 #define AVF_AQ_VSI_QUE_OPT_TCP_ENA 0x10
978 #define AVF_AQ_VSI_QUE_OPT_FCOE_ENA 0x20
979 #define AVF_AQ_VSI_QUE_OPT_RSS_LUT_PF 0x00
980 #define AVF_AQ_VSI_QUE_OPT_RSS_LUT_VSI 0x40
981 u8 queueing_opt_reserved[3];
982 /* scheduler section */
985 /* outer up section */
986 __le32 outer_up_table; /* same structure and defines as ingress tbl */
988 /* last 32 bytes are written by FW */
990 #define AVF_AQ_VSI_QS_HANDLE_INVALID 0xFFFF
991 __le16 stat_counter_idx;
993 u8 resp_reserved[12];
996 AVF_CHECK_STRUCT_LEN(128, avf_aqc_vsi_properties_data);
998 /* Add Port Virtualizer (direct 0x0220)
999 * also used for update PV (direct 0x0221) but only flags are used
1000 * (IS_CTRL_PORT only works on add PV)
1002 struct avf_aqc_add_update_pv {
1003 __le16 command_flags;
1004 #define AVF_AQC_PV_FLAG_PV_TYPE 0x1
1005 #define AVF_AQC_PV_FLAG_FWD_UNKNOWN_STAG_EN 0x2
1006 #define AVF_AQC_PV_FLAG_FWD_UNKNOWN_ETAG_EN 0x4
1007 #define AVF_AQC_PV_FLAG_IS_CTRL_PORT 0x8
1009 __le16 connected_seid;
1013 AVF_CHECK_CMD_LENGTH(avf_aqc_add_update_pv);
1015 struct avf_aqc_add_update_pv_completion {
1016 /* reserved for update; for add also encodes error if rc == ENOSPC */
1018 #define AVF_AQC_PV_ERR_FLAG_NO_PV 0x1
1019 #define AVF_AQC_PV_ERR_FLAG_NO_SCHED 0x2
1020 #define AVF_AQC_PV_ERR_FLAG_NO_COUNTER 0x4
1021 #define AVF_AQC_PV_ERR_FLAG_NO_ENTRY 0x8
1025 AVF_CHECK_CMD_LENGTH(avf_aqc_add_update_pv_completion);
1027 /* Get PV Params (direct 0x0222)
1028 * uses avf_aqc_switch_seid for the descriptor
1031 struct avf_aqc_get_pv_params_completion {
1033 __le16 default_stag;
1034 __le16 pv_flags; /* same flags as add_pv */
1035 #define AVF_AQC_GET_PV_PV_TYPE 0x1
1036 #define AVF_AQC_GET_PV_FRWD_UNKNOWN_STAG 0x2
1037 #define AVF_AQC_GET_PV_FRWD_UNKNOWN_ETAG 0x4
1039 __le16 default_port_seid;
1042 AVF_CHECK_CMD_LENGTH(avf_aqc_get_pv_params_completion);
1044 /* Add VEB (direct 0x0230) */
1045 struct avf_aqc_add_veb {
1047 __le16 downlink_seid;
1049 #define AVF_AQC_ADD_VEB_FLOATING 0x1
1050 #define AVF_AQC_ADD_VEB_PORT_TYPE_SHIFT 1
1051 #define AVF_AQC_ADD_VEB_PORT_TYPE_MASK (0x3 << \
1052 AVF_AQC_ADD_VEB_PORT_TYPE_SHIFT)
1053 #define AVF_AQC_ADD_VEB_PORT_TYPE_DEFAULT 0x2
1054 #define AVF_AQC_ADD_VEB_PORT_TYPE_DATA 0x4
1055 #define AVF_AQC_ADD_VEB_ENABLE_L2_FILTER 0x8 /* deprecated */
1056 #define AVF_AQC_ADD_VEB_ENABLE_DISABLE_STATS 0x10
1061 AVF_CHECK_CMD_LENGTH(avf_aqc_add_veb);
1063 struct avf_aqc_add_veb_completion {
1066 /* also encodes error if rc == ENOSPC; codes are the same as add_pv */
1068 #define AVF_AQC_VEB_ERR_FLAG_NO_VEB 0x1
1069 #define AVF_AQC_VEB_ERR_FLAG_NO_SCHED 0x2
1070 #define AVF_AQC_VEB_ERR_FLAG_NO_COUNTER 0x4
1071 #define AVF_AQC_VEB_ERR_FLAG_NO_ENTRY 0x8
1072 __le16 statistic_index;
1077 AVF_CHECK_CMD_LENGTH(avf_aqc_add_veb_completion);
1079 /* Get VEB Parameters (direct 0x0232)
1080 * uses avf_aqc_switch_seid for the descriptor
1082 struct avf_aqc_get_veb_parameters_completion {
1085 __le16 veb_flags; /* only the first/last flags from 0x0230 is valid */
1086 __le16 statistic_index;
1092 AVF_CHECK_CMD_LENGTH(avf_aqc_get_veb_parameters_completion);
1094 /* Delete Element (direct 0x0243)
1095 * uses the generic avf_aqc_switch_seid
1098 /* Add MAC-VLAN (indirect 0x0250) */
1100 /* used for the command for most vlan commands */
1101 struct avf_aqc_macvlan {
1102 __le16 num_addresses;
1104 #define AVF_AQC_MACVLAN_CMD_SEID_NUM_SHIFT 0
1105 #define AVF_AQC_MACVLAN_CMD_SEID_NUM_MASK (0x3FF << \
1106 AVF_AQC_MACVLAN_CMD_SEID_NUM_SHIFT)
1107 #define AVF_AQC_MACVLAN_CMD_SEID_VALID 0x8000
1112 AVF_CHECK_CMD_LENGTH(avf_aqc_macvlan);
1114 /* indirect data for command and response */
1115 struct avf_aqc_add_macvlan_element_data {
1119 #define AVF_AQC_MACVLAN_ADD_PERFECT_MATCH 0x0001
1120 #define AVF_AQC_MACVLAN_ADD_HASH_MATCH 0x0002
1121 #define AVF_AQC_MACVLAN_ADD_IGNORE_VLAN 0x0004
1122 #define AVF_AQC_MACVLAN_ADD_TO_QUEUE 0x0008
1123 #define AVF_AQC_MACVLAN_ADD_USE_SHARED_MAC 0x0010
1124 __le16 queue_number;
1125 #define AVF_AQC_MACVLAN_CMD_QUEUE_SHIFT 0
1126 #define AVF_AQC_MACVLAN_CMD_QUEUE_MASK (0x7FF << \
1127 AVF_AQC_MACVLAN_CMD_SEID_NUM_SHIFT)
1128 /* response section */
1130 #define AVF_AQC_MM_PERFECT_MATCH 0x01
1131 #define AVF_AQC_MM_HASH_MATCH 0x02
1132 #define AVF_AQC_MM_ERR_NO_RES 0xFF
1136 struct avf_aqc_add_remove_macvlan_completion {
1137 __le16 perfect_mac_used;
1138 __le16 perfect_mac_free;
1139 __le16 unicast_hash_free;
1140 __le16 multicast_hash_free;
1145 AVF_CHECK_CMD_LENGTH(avf_aqc_add_remove_macvlan_completion);
1147 /* Remove MAC-VLAN (indirect 0x0251)
1148 * uses avf_aqc_macvlan for the descriptor
1149 * data points to an array of num_addresses of elements
1152 struct avf_aqc_remove_macvlan_element_data {
1156 #define AVF_AQC_MACVLAN_DEL_PERFECT_MATCH 0x01
1157 #define AVF_AQC_MACVLAN_DEL_HASH_MATCH 0x02
1158 #define AVF_AQC_MACVLAN_DEL_IGNORE_VLAN 0x08
1159 #define AVF_AQC_MACVLAN_DEL_ALL_VSIS 0x10
1163 #define AVF_AQC_REMOVE_MACVLAN_SUCCESS 0x0
1164 #define AVF_AQC_REMOVE_MACVLAN_FAIL 0xFF
1165 u8 reply_reserved[3];
1168 /* Add VLAN (indirect 0x0252)
1169 * Remove VLAN (indirect 0x0253)
1170 * use the generic avf_aqc_macvlan for the command
1172 struct avf_aqc_add_remove_vlan_element_data {
1175 /* flags for add VLAN */
1176 #define AVF_AQC_ADD_VLAN_LOCAL 0x1
1177 #define AVF_AQC_ADD_PVLAN_TYPE_SHIFT 1
1178 #define AVF_AQC_ADD_PVLAN_TYPE_MASK (0x3 << AVF_AQC_ADD_PVLAN_TYPE_SHIFT)
1179 #define AVF_AQC_ADD_PVLAN_TYPE_REGULAR 0x0
1180 #define AVF_AQC_ADD_PVLAN_TYPE_PRIMARY 0x2
1181 #define AVF_AQC_ADD_PVLAN_TYPE_SECONDARY 0x4
1182 #define AVF_AQC_VLAN_PTYPE_SHIFT 3
1183 #define AVF_AQC_VLAN_PTYPE_MASK (0x3 << AVF_AQC_VLAN_PTYPE_SHIFT)
1184 #define AVF_AQC_VLAN_PTYPE_REGULAR_VSI 0x0
1185 #define AVF_AQC_VLAN_PTYPE_PROMISC_VSI 0x8
1186 #define AVF_AQC_VLAN_PTYPE_COMMUNITY_VSI 0x10
1187 #define AVF_AQC_VLAN_PTYPE_ISOLATED_VSI 0x18
1188 /* flags for remove VLAN */
1189 #define AVF_AQC_REMOVE_VLAN_ALL 0x1
1192 /* flags for add VLAN */
1193 #define AVF_AQC_ADD_VLAN_SUCCESS 0x0
1194 #define AVF_AQC_ADD_VLAN_FAIL_REQUEST 0xFE
1195 #define AVF_AQC_ADD_VLAN_FAIL_RESOURCE 0xFF
1196 /* flags for remove VLAN */
1197 #define AVF_AQC_REMOVE_VLAN_SUCCESS 0x0
1198 #define AVF_AQC_REMOVE_VLAN_FAIL 0xFF
1202 struct avf_aqc_add_remove_vlan_completion {
1210 /* Set VSI Promiscuous Modes (direct 0x0254) */
1211 struct avf_aqc_set_vsi_promiscuous_modes {
1212 __le16 promiscuous_flags;
1214 /* flags used for both fields above */
1215 #define AVF_AQC_SET_VSI_PROMISC_UNICAST 0x01
1216 #define AVF_AQC_SET_VSI_PROMISC_MULTICAST 0x02
1217 #define AVF_AQC_SET_VSI_PROMISC_BROADCAST 0x04
1218 #define AVF_AQC_SET_VSI_DEFAULT 0x08
1219 #define AVF_AQC_SET_VSI_PROMISC_VLAN 0x10
1220 #define AVF_AQC_SET_VSI_PROMISC_TX 0x8000
1222 #define AVF_AQC_VSI_PROM_CMD_SEID_MASK 0x3FF
1224 #define AVF_AQC_SET_VSI_VLAN_MASK 0x0FFF
1225 #define AVF_AQC_SET_VSI_VLAN_VALID 0x8000
1229 AVF_CHECK_CMD_LENGTH(avf_aqc_set_vsi_promiscuous_modes);
1231 /* Add S/E-tag command (direct 0x0255)
1232 * Uses generic avf_aqc_add_remove_tag_completion for completion
1234 struct avf_aqc_add_tag {
1236 #define AVF_AQC_ADD_TAG_FLAG_TO_QUEUE 0x0001
1238 #define AVF_AQC_ADD_TAG_CMD_SEID_NUM_SHIFT 0
1239 #define AVF_AQC_ADD_TAG_CMD_SEID_NUM_MASK (0x3FF << \
1240 AVF_AQC_ADD_TAG_CMD_SEID_NUM_SHIFT)
1242 __le16 queue_number;
1246 AVF_CHECK_CMD_LENGTH(avf_aqc_add_tag);
1248 struct avf_aqc_add_remove_tag_completion {
1254 AVF_CHECK_CMD_LENGTH(avf_aqc_add_remove_tag_completion);
1256 /* Remove S/E-tag command (direct 0x0256)
1257 * Uses generic avf_aqc_add_remove_tag_completion for completion
1259 struct avf_aqc_remove_tag {
1261 #define AVF_AQC_REMOVE_TAG_CMD_SEID_NUM_SHIFT 0
1262 #define AVF_AQC_REMOVE_TAG_CMD_SEID_NUM_MASK (0x3FF << \
1263 AVF_AQC_REMOVE_TAG_CMD_SEID_NUM_SHIFT)
1268 AVF_CHECK_CMD_LENGTH(avf_aqc_remove_tag);
1270 /* Add multicast E-Tag (direct 0x0257)
1271 * del multicast E-Tag (direct 0x0258) only uses pv_seid and etag fields
1272 * and no external data
1274 struct avf_aqc_add_remove_mcast_etag {
1277 u8 num_unicast_etags;
1279 __le32 addr_high; /* address of array of 2-byte s-tags */
1283 AVF_CHECK_CMD_LENGTH(avf_aqc_add_remove_mcast_etag);
1285 struct avf_aqc_add_remove_mcast_etag_completion {
1287 __le16 mcast_etags_used;
1288 __le16 mcast_etags_free;
1294 AVF_CHECK_CMD_LENGTH(avf_aqc_add_remove_mcast_etag_completion);
1296 /* Update S/E-Tag (direct 0x0259) */
1297 struct avf_aqc_update_tag {
1299 #define AVF_AQC_UPDATE_TAG_CMD_SEID_NUM_SHIFT 0
1300 #define AVF_AQC_UPDATE_TAG_CMD_SEID_NUM_MASK (0x3FF << \
1301 AVF_AQC_UPDATE_TAG_CMD_SEID_NUM_SHIFT)
1307 AVF_CHECK_CMD_LENGTH(avf_aqc_update_tag);
1309 struct avf_aqc_update_tag_completion {
1315 AVF_CHECK_CMD_LENGTH(avf_aqc_update_tag_completion);
1317 /* Add Control Packet filter (direct 0x025A)
1318 * Remove Control Packet filter (direct 0x025B)
1319 * uses the avf_aqc_add_oveb_cloud,
1320 * and the generic direct completion structure
1322 struct avf_aqc_add_remove_control_packet_filter {
1326 #define AVF_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC 0x0001
1327 #define AVF_AQC_ADD_CONTROL_PACKET_FLAGS_DROP 0x0002
1328 #define AVF_AQC_ADD_CONTROL_PACKET_FLAGS_TO_QUEUE 0x0004
1329 #define AVF_AQC_ADD_CONTROL_PACKET_FLAGS_TX 0x0008
1330 #define AVF_AQC_ADD_CONTROL_PACKET_FLAGS_RX 0x0000
1332 #define AVF_AQC_ADD_CONTROL_PACKET_CMD_SEID_NUM_SHIFT 0
1333 #define AVF_AQC_ADD_CONTROL_PACKET_CMD_SEID_NUM_MASK (0x3FF << \
1334 AVF_AQC_ADD_CONTROL_PACKET_CMD_SEID_NUM_SHIFT)
1339 AVF_CHECK_CMD_LENGTH(avf_aqc_add_remove_control_packet_filter);
1341 struct avf_aqc_add_remove_control_packet_filter_completion {
1342 __le16 mac_etype_used;
1344 __le16 mac_etype_free;
1349 AVF_CHECK_CMD_LENGTH(avf_aqc_add_remove_control_packet_filter_completion);
1351 /* Add Cloud filters (indirect 0x025C)
1352 * Remove Cloud filters (indirect 0x025D)
1353 * uses the avf_aqc_add_remove_cloud_filters,
1354 * and the generic indirect completion structure
1356 struct avf_aqc_add_remove_cloud_filters {
1360 #define AVF_AQC_ADD_CLOUD_CMD_SEID_NUM_SHIFT 0
1361 #define AVF_AQC_ADD_CLOUD_CMD_SEID_NUM_MASK (0x3FF << \
1362 AVF_AQC_ADD_CLOUD_CMD_SEID_NUM_SHIFT)
1364 #define AVF_AQC_ADD_REM_CLOUD_CMD_BIG_BUFFER 1
1370 AVF_CHECK_CMD_LENGTH(avf_aqc_add_remove_cloud_filters);
1372 struct avf_aqc_add_remove_cloud_filters_element_data {
1386 #define AVF_AQC_ADD_CLOUD_FILTER_SHIFT 0
1387 #define AVF_AQC_ADD_CLOUD_FILTER_MASK (0x3F << \
1388 AVF_AQC_ADD_CLOUD_FILTER_SHIFT)
1389 /* 0x0000 reserved */
1390 #define AVF_AQC_ADD_CLOUD_FILTER_OIP 0x0001
1391 /* 0x0002 reserved */
1392 #define AVF_AQC_ADD_CLOUD_FILTER_IMAC_IVLAN 0x0003
1393 #define AVF_AQC_ADD_CLOUD_FILTER_IMAC_IVLAN_TEN_ID 0x0004
1394 /* 0x0005 reserved */
1395 #define AVF_AQC_ADD_CLOUD_FILTER_IMAC_TEN_ID 0x0006
1396 /* 0x0007 reserved */
1397 /* 0x0008 reserved */
1398 #define AVF_AQC_ADD_CLOUD_FILTER_OMAC 0x0009
1399 #define AVF_AQC_ADD_CLOUD_FILTER_IMAC 0x000A
1400 #define AVF_AQC_ADD_CLOUD_FILTER_OMAC_TEN_ID_IMAC 0x000B
1401 #define AVF_AQC_ADD_CLOUD_FILTER_IIP 0x000C
1402 /* 0x0010 to 0x0017 is for custom filters */
1404 #define AVF_AQC_ADD_CLOUD_FLAGS_TO_QUEUE 0x0080
1405 #define AVF_AQC_ADD_CLOUD_VNK_SHIFT 6
1406 #define AVF_AQC_ADD_CLOUD_VNK_MASK 0x00C0
1407 #define AVF_AQC_ADD_CLOUD_FLAGS_IPV4 0
1408 #define AVF_AQC_ADD_CLOUD_FLAGS_IPV6 0x0100
1410 #define AVF_AQC_ADD_CLOUD_TNL_TYPE_SHIFT 9
1411 #define AVF_AQC_ADD_CLOUD_TNL_TYPE_MASK 0x1E00
1412 #define AVF_AQC_ADD_CLOUD_TNL_TYPE_VXLAN 0
1413 #define AVF_AQC_ADD_CLOUD_TNL_TYPE_NVGRE_OMAC 1
1414 #define AVF_AQC_ADD_CLOUD_TNL_TYPE_GENEVE 2
1415 #define AVF_AQC_ADD_CLOUD_TNL_TYPE_IP 3
1416 #define AVF_AQC_ADD_CLOUD_TNL_TYPE_RESERVED 4
1417 #define AVF_AQC_ADD_CLOUD_TNL_TYPE_VXLAN_GPE 5
1419 #define AVF_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_MAC 0x2000
1420 #define AVF_AQC_ADD_CLOUD_FLAGS_SHARED_INNER_MAC 0x4000
1421 #define AVF_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_IP 0x8000
1425 __le16 queue_number;
1426 #define AVF_AQC_ADD_CLOUD_QUEUE_SHIFT 0
1427 #define AVF_AQC_ADD_CLOUD_QUEUE_MASK (0x7FF << \
1428 AVF_AQC_ADD_CLOUD_QUEUE_SHIFT)
1430 /* response section */
1431 u8 allocation_result;
1432 #define AVF_AQC_ADD_CLOUD_FILTER_SUCCESS 0x0
1433 #define AVF_AQC_ADD_CLOUD_FILTER_FAIL 0xFF
1434 u8 response_reserved[7];
1437 /* avf_aqc_add_rm_cloud_filt_elem_ext is used when
1438 * AVF_AQC_ADD_REM_CLOUD_CMD_BIG_BUFFER flag is set. refer to
1441 struct avf_aqc_add_rm_cloud_filt_elem_ext {
1442 struct avf_aqc_add_remove_cloud_filters_element_data element;
1443 u16 general_fields[32];
1444 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X10_WORD0 0
1445 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X10_WORD1 1
1446 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X10_WORD2 2
1447 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X11_WORD0 3
1448 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X11_WORD1 4
1449 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X11_WORD2 5
1450 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X12_WORD0 6
1451 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X12_WORD1 7
1452 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X12_WORD2 8
1453 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X13_WORD0 9
1454 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X13_WORD1 10
1455 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X13_WORD2 11
1456 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X14_WORD0 12
1457 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X14_WORD1 13
1458 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X14_WORD2 14
1459 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X16_WORD0 15
1460 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X16_WORD1 16
1461 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X16_WORD2 17
1462 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X16_WORD3 18
1463 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X16_WORD4 19
1464 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X16_WORD5 20
1465 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X16_WORD6 21
1466 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X16_WORD7 22
1467 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X17_WORD0 23
1468 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X17_WORD1 24
1469 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X17_WORD2 25
1470 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X17_WORD3 26
1471 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X17_WORD4 27
1472 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X17_WORD5 28
1473 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X17_WORD6 29
1474 #define AVF_AQC_ADD_CLOUD_FV_FLU_0X17_WORD7 30
1477 struct avf_aqc_remove_cloud_filters_completion {
1478 __le16 perfect_ovlan_used;
1479 __le16 perfect_ovlan_free;
1486 AVF_CHECK_CMD_LENGTH(avf_aqc_remove_cloud_filters_completion);
1488 /* Replace filter Command 0x025F
1489 * uses the avf_aqc_replace_cloud_filters,
1490 * and the generic indirect completion structure
1492 struct avf_filter_data {
1497 struct avf_aqc_replace_cloud_filters_cmd {
1499 #define AVF_AQC_REPLACE_L1_FILTER 0x0
1500 #define AVF_AQC_REPLACE_CLOUD_FILTER 0x1
1501 #define AVF_AQC_GET_CLOUD_FILTERS 0x2
1502 #define AVF_AQC_MIRROR_CLOUD_FILTER 0x4
1503 #define AVF_AQC_HIGH_PRIORITY_CLOUD_FILTER 0x8
1512 struct avf_aqc_replace_cloud_filters_cmd_buf {
1514 /* Filter type INPUT codes*/
1515 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_ENTRIES_MAX 3
1516 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_VALIDATED (1 << 7UL)
1518 /* Field Vector offsets */
1519 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_MAC_DA 0
1520 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_STAG_ETH 6
1521 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_STAG 7
1522 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_VLAN 8
1523 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_STAG_OVLAN 9
1524 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_STAG_IVLAN 10
1525 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_TUNNLE_KEY 11
1526 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_IMAC 12
1528 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_IP_DA 14
1530 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_OIP_DA 15
1532 #define AVF_AQC_REPLACE_CLOUD_CMD_INPUT_FV_INNER_VLAN 37
1533 struct avf_filter_data filters[8];
1536 /* Add Mirror Rule (indirect or direct 0x0260)
1537 * Delete Mirror Rule (indirect or direct 0x0261)
1538 * note: some rule types (4,5) do not use an external buffer.
1539 * take care to set the flags correctly.
1541 struct avf_aqc_add_delete_mirror_rule {
1544 #define AVF_AQC_MIRROR_RULE_TYPE_SHIFT 0
1545 #define AVF_AQC_MIRROR_RULE_TYPE_MASK (0x7 << \
1546 AVF_AQC_MIRROR_RULE_TYPE_SHIFT)
1547 #define AVF_AQC_MIRROR_RULE_TYPE_VPORT_INGRESS 1
1548 #define AVF_AQC_MIRROR_RULE_TYPE_VPORT_EGRESS 2
1549 #define AVF_AQC_MIRROR_RULE_TYPE_VLAN 3
1550 #define AVF_AQC_MIRROR_RULE_TYPE_ALL_INGRESS 4
1551 #define AVF_AQC_MIRROR_RULE_TYPE_ALL_EGRESS 5
1553 __le16 destination; /* VSI for add, rule id for delete */
1554 __le32 addr_high; /* address of array of 2-byte VSI or VLAN ids */
1558 AVF_CHECK_CMD_LENGTH(avf_aqc_add_delete_mirror_rule);
1560 struct avf_aqc_add_delete_mirror_rule_completion {
1562 __le16 rule_id; /* only used on add */
1563 __le16 mirror_rules_used;
1564 __le16 mirror_rules_free;
1569 AVF_CHECK_CMD_LENGTH(avf_aqc_add_delete_mirror_rule_completion);
1571 /* Dynamic Device Personalization */
1572 struct avf_aqc_write_personalization_profile {
1575 __le32 profile_track_id;
1580 AVF_CHECK_CMD_LENGTH(avf_aqc_write_personalization_profile);
1582 struct avf_aqc_write_ddp_resp {
1583 __le32 error_offset;
1589 struct avf_aqc_get_applied_profiles {
1591 #define AVF_AQC_GET_DDP_GET_CONF 0x1
1592 #define AVF_AQC_GET_DDP_GET_RDPU_CONF 0x2
1599 AVF_CHECK_CMD_LENGTH(avf_aqc_get_applied_profiles);
1603 /* PFC Ignore (direct 0x0301)
1604 * the command and response use the same descriptor structure
1606 struct avf_aqc_pfc_ignore {
1608 u8 command_flags; /* unused on response */
1609 #define AVF_AQC_PFC_IGNORE_SET 0x80
1610 #define AVF_AQC_PFC_IGNORE_CLEAR 0x0
1614 AVF_CHECK_CMD_LENGTH(avf_aqc_pfc_ignore);
1616 /* DCB Update (direct 0x0302) uses the avf_aq_desc structure
1617 * with no parameters
1620 /* TX scheduler 0x04xx */
1622 /* Almost all the indirect commands use
1623 * this generic struct to pass the SEID in param0
1625 struct avf_aqc_tx_sched_ind {
1632 AVF_CHECK_CMD_LENGTH(avf_aqc_tx_sched_ind);
1634 /* Several commands respond with a set of queue set handles */
1635 struct avf_aqc_qs_handles_resp {
1636 __le16 qs_handles[8];
1639 /* Configure VSI BW limits (direct 0x0400) */
1640 struct avf_aqc_configure_vsi_bw_limit {
1645 u8 max_credit; /* 0-3, limit = 2^max */
1649 AVF_CHECK_CMD_LENGTH(avf_aqc_configure_vsi_bw_limit);
1651 /* Configure VSI Bandwidth Limit per Traffic Type (indirect 0x0406)
1652 * responds with avf_aqc_qs_handles_resp
1654 struct avf_aqc_configure_vsi_ets_sla_bw_data {
1657 __le16 tc_bw_credits[8]; /* FW writesback QS handles here */
1659 /* 4 bits per tc 0-7, 4th bit is reserved, limit = 2^max */
1660 __le16 tc_bw_max[2];
1664 AVF_CHECK_STRUCT_LEN(0x40, avf_aqc_configure_vsi_ets_sla_bw_data);
1666 /* Configure VSI Bandwidth Allocation per Traffic Type (indirect 0x0407)
1667 * responds with avf_aqc_qs_handles_resp
1669 struct avf_aqc_configure_vsi_tc_bw_data {
1672 u8 tc_bw_credits[8];
1674 __le16 qs_handles[8];
1677 AVF_CHECK_STRUCT_LEN(0x20, avf_aqc_configure_vsi_tc_bw_data);
1679 /* Query vsi bw configuration (indirect 0x0408) */
1680 struct avf_aqc_query_vsi_bw_config_resp {
1682 u8 tc_suspended_bits;
1684 __le16 qs_handles[8];
1686 __le16 port_bw_limit;
1688 u8 max_bw; /* 0-3, limit = 2^max */
1692 AVF_CHECK_STRUCT_LEN(0x40, avf_aqc_query_vsi_bw_config_resp);
1694 /* Query VSI Bandwidth Allocation per Traffic Type (indirect 0x040A) */
1695 struct avf_aqc_query_vsi_ets_sla_config_resp {
1698 u8 share_credits[8];
1701 /* 4 bits per tc 0-7, 4th bit is reserved, limit = 2^max */
1702 __le16 tc_bw_max[2];
1705 AVF_CHECK_STRUCT_LEN(0x20, avf_aqc_query_vsi_ets_sla_config_resp);
1707 /* Configure Switching Component Bandwidth Limit (direct 0x0410) */
1708 struct avf_aqc_configure_switching_comp_bw_limit {
1713 u8 max_bw; /* 0-3, limit = 2^max */
1717 AVF_CHECK_CMD_LENGTH(avf_aqc_configure_switching_comp_bw_limit);
1719 /* Enable Physical Port ETS (indirect 0x0413)
1720 * Modify Physical Port ETS (indirect 0x0414)
1721 * Disable Physical Port ETS (indirect 0x0415)
1723 struct avf_aqc_configure_switching_comp_ets_data {
1727 #define AVF_AQ_ETS_SEEPAGE_EN_MASK 0x1
1728 u8 tc_strict_priority_flags;
1730 u8 tc_bw_share_credits[8];
1734 AVF_CHECK_STRUCT_LEN(0x80, avf_aqc_configure_switching_comp_ets_data);
1736 /* Configure Switching Component Bandwidth Limits per Tc (indirect 0x0416) */
1737 struct avf_aqc_configure_switching_comp_ets_bw_limit_data {
1740 __le16 tc_bw_credit[8];
1742 /* 4 bits per tc 0-7, 4th bit is reserved, limit = 2^max */
1743 __le16 tc_bw_max[2];
1747 AVF_CHECK_STRUCT_LEN(0x40,
1748 avf_aqc_configure_switching_comp_ets_bw_limit_data);
1750 /* Configure Switching Component Bandwidth Allocation per Tc
1753 struct avf_aqc_configure_switching_comp_bw_config_data {
1756 u8 absolute_credits; /* bool */
1757 u8 tc_bw_share_credits[8];
1761 AVF_CHECK_STRUCT_LEN(0x20, avf_aqc_configure_switching_comp_bw_config_data);
1763 /* Query Switching Component Configuration (indirect 0x0418) */
1764 struct avf_aqc_query_switching_comp_ets_config_resp {
1767 __le16 port_bw_limit;
1769 u8 tc_bw_max; /* 0-3, limit = 2^max */
1773 AVF_CHECK_STRUCT_LEN(0x40, avf_aqc_query_switching_comp_ets_config_resp);
1775 /* Query PhysicalPort ETS Configuration (indirect 0x0419) */
1776 struct avf_aqc_query_port_ets_config_resp {
1780 u8 tc_strict_priority_bits;
1782 u8 tc_bw_share_credits[8];
1783 __le16 tc_bw_limits[8];
1785 /* 4 bits per tc 0-7, 4th bit reserved, limit = 2^max */
1786 __le16 tc_bw_max[2];
1790 AVF_CHECK_STRUCT_LEN(0x44, avf_aqc_query_port_ets_config_resp);
1792 /* Query Switching Component Bandwidth Allocation per Traffic Type
1795 struct avf_aqc_query_switching_comp_bw_config_resp {
1798 u8 absolute_credits_enable; /* bool */
1799 u8 tc_bw_share_credits[8];
1800 __le16 tc_bw_limits[8];
1802 /* 4 bits per tc 0-7, 4th bit is reserved, limit = 2^max */
1803 __le16 tc_bw_max[2];
1806 AVF_CHECK_STRUCT_LEN(0x20, avf_aqc_query_switching_comp_bw_config_resp);
1808 /* Suspend/resume port TX traffic
1809 * (direct 0x041B and 0x041C) uses the generic SEID struct
1812 /* Configure partition BW
1815 struct avf_aqc_configure_partition_bw_data {
1816 __le16 pf_valid_bits;
1817 u8 min_bw[16]; /* guaranteed bandwidth */
1818 u8 max_bw[16]; /* bandwidth limit */
1821 AVF_CHECK_STRUCT_LEN(0x22, avf_aqc_configure_partition_bw_data);
1823 /* Get and set the active HMC resource profile and status.
1824 * (direct 0x0500) and (direct 0x0501)
1826 struct avf_aq_get_set_hmc_resource_profile {
1832 AVF_CHECK_CMD_LENGTH(avf_aq_get_set_hmc_resource_profile);
1834 enum avf_aq_hmc_profile {
1835 /* AVF_HMC_PROFILE_NO_CHANGE = 0, reserved */
1836 AVF_HMC_PROFILE_DEFAULT = 1,
1837 AVF_HMC_PROFILE_FAVOR_VF = 2,
1838 AVF_HMC_PROFILE_EQUAL = 3,
1841 /* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */
1843 /* set in param0 for get phy abilities to report qualified modules */
1844 #define AVF_AQ_PHY_REPORT_QUALIFIED_MODULES 0x0001
1845 #define AVF_AQ_PHY_REPORT_INITIAL_VALUES 0x0002
1847 enum avf_aq_phy_type {
1848 AVF_PHY_TYPE_SGMII = 0x0,
1849 AVF_PHY_TYPE_1000BASE_KX = 0x1,
1850 AVF_PHY_TYPE_10GBASE_KX4 = 0x2,
1851 AVF_PHY_TYPE_10GBASE_KR = 0x3,
1852 AVF_PHY_TYPE_40GBASE_KR4 = 0x4,
1853 AVF_PHY_TYPE_XAUI = 0x5,
1854 AVF_PHY_TYPE_XFI = 0x6,
1855 AVF_PHY_TYPE_SFI = 0x7,
1856 AVF_PHY_TYPE_XLAUI = 0x8,
1857 AVF_PHY_TYPE_XLPPI = 0x9,
1858 AVF_PHY_TYPE_40GBASE_CR4_CU = 0xA,
1859 AVF_PHY_TYPE_10GBASE_CR1_CU = 0xB,
1860 AVF_PHY_TYPE_10GBASE_AOC = 0xC,
1861 AVF_PHY_TYPE_40GBASE_AOC = 0xD,
1862 AVF_PHY_TYPE_UNRECOGNIZED = 0xE,
1863 AVF_PHY_TYPE_UNSUPPORTED = 0xF,
1864 AVF_PHY_TYPE_100BASE_TX = 0x11,
1865 AVF_PHY_TYPE_1000BASE_T = 0x12,
1866 AVF_PHY_TYPE_10GBASE_T = 0x13,
1867 AVF_PHY_TYPE_10GBASE_SR = 0x14,
1868 AVF_PHY_TYPE_10GBASE_LR = 0x15,
1869 AVF_PHY_TYPE_10GBASE_SFPP_CU = 0x16,
1870 AVF_PHY_TYPE_10GBASE_CR1 = 0x17,
1871 AVF_PHY_TYPE_40GBASE_CR4 = 0x18,
1872 AVF_PHY_TYPE_40GBASE_SR4 = 0x19,
1873 AVF_PHY_TYPE_40GBASE_LR4 = 0x1A,
1874 AVF_PHY_TYPE_1000BASE_SX = 0x1B,
1875 AVF_PHY_TYPE_1000BASE_LX = 0x1C,
1876 AVF_PHY_TYPE_1000BASE_T_OPTICAL = 0x1D,
1877 AVF_PHY_TYPE_20GBASE_KR2 = 0x1E,
1878 AVF_PHY_TYPE_25GBASE_KR = 0x1F,
1879 AVF_PHY_TYPE_25GBASE_CR = 0x20,
1880 AVF_PHY_TYPE_25GBASE_SR = 0x21,
1881 AVF_PHY_TYPE_25GBASE_LR = 0x22,
1882 AVF_PHY_TYPE_25GBASE_AOC = 0x23,
1883 AVF_PHY_TYPE_25GBASE_ACC = 0x24,
1885 AVF_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP = 0xFD,
1886 AVF_PHY_TYPE_EMPTY = 0xFE,
1887 AVF_PHY_TYPE_DEFAULT = 0xFF,
1890 #define AVF_LINK_SPEED_100MB_SHIFT 0x1
1891 #define AVF_LINK_SPEED_1000MB_SHIFT 0x2
1892 #define AVF_LINK_SPEED_10GB_SHIFT 0x3
1893 #define AVF_LINK_SPEED_40GB_SHIFT 0x4
1894 #define AVF_LINK_SPEED_20GB_SHIFT 0x5
1895 #define AVF_LINK_SPEED_25GB_SHIFT 0x6
1897 enum avf_aq_link_speed {
1898 AVF_LINK_SPEED_UNKNOWN = 0,
1899 AVF_LINK_SPEED_100MB = (1 << AVF_LINK_SPEED_100MB_SHIFT),
1900 AVF_LINK_SPEED_1GB = (1 << AVF_LINK_SPEED_1000MB_SHIFT),
1901 AVF_LINK_SPEED_10GB = (1 << AVF_LINK_SPEED_10GB_SHIFT),
1902 AVF_LINK_SPEED_40GB = (1 << AVF_LINK_SPEED_40GB_SHIFT),
1903 AVF_LINK_SPEED_20GB = (1 << AVF_LINK_SPEED_20GB_SHIFT),
1904 AVF_LINK_SPEED_25GB = (1 << AVF_LINK_SPEED_25GB_SHIFT),
1907 struct avf_aqc_module_desc {
1915 AVF_CHECK_STRUCT_LEN(0x20, avf_aqc_module_desc);
1917 struct avf_aq_get_phy_abilities_resp {
1918 __le32 phy_type; /* bitmap using the above enum for offsets */
1919 u8 link_speed; /* bitmap using the above enum bit patterns */
1921 #define AVF_AQ_PHY_FLAG_PAUSE_TX 0x01
1922 #define AVF_AQ_PHY_FLAG_PAUSE_RX 0x02
1923 #define AVF_AQ_PHY_FLAG_LOW_POWER 0x04
1924 #define AVF_AQ_PHY_LINK_ENABLED 0x08
1925 #define AVF_AQ_PHY_AN_ENABLED 0x10
1926 #define AVF_AQ_PHY_FLAG_MODULE_QUAL 0x20
1927 #define AVF_AQ_PHY_FEC_ABILITY_KR 0x40
1928 #define AVF_AQ_PHY_FEC_ABILITY_RS 0x80
1929 __le16 eee_capability;
1930 #define AVF_AQ_EEE_100BASE_TX 0x0002
1931 #define AVF_AQ_EEE_1000BASE_T 0x0004
1932 #define AVF_AQ_EEE_10GBASE_T 0x0008
1933 #define AVF_AQ_EEE_1000BASE_KX 0x0010
1934 #define AVF_AQ_EEE_10GBASE_KX4 0x0020
1935 #define AVF_AQ_EEE_10GBASE_KR 0x0040
1938 #define AVF_AQ_SET_PHY_D3_LPAN_ENA 0x01
1940 #define AVF_AQ_PHY_TYPE_EXT_25G_KR 0x01
1941 #define AVF_AQ_PHY_TYPE_EXT_25G_CR 0x02
1942 #define AVF_AQ_PHY_TYPE_EXT_25G_SR 0x04
1943 #define AVF_AQ_PHY_TYPE_EXT_25G_LR 0x08
1944 #define AVF_AQ_PHY_TYPE_EXT_25G_AOC 0x10
1945 #define AVF_AQ_PHY_TYPE_EXT_25G_ACC 0x20
1946 u8 fec_cfg_curr_mod_ext_info;
1947 #define AVF_AQ_ENABLE_FEC_KR 0x01
1948 #define AVF_AQ_ENABLE_FEC_RS 0x02
1949 #define AVF_AQ_REQUEST_FEC_KR 0x04
1950 #define AVF_AQ_REQUEST_FEC_RS 0x08
1951 #define AVF_AQ_ENABLE_FEC_AUTO 0x10
1953 #define AVF_AQ_MODULE_TYPE_EXT_MASK 0xE0
1954 #define AVF_AQ_MODULE_TYPE_EXT_SHIFT 5
1959 u8 qualified_module_count;
1960 #define AVF_AQ_PHY_MAX_QMS 16
1961 struct avf_aqc_module_desc qualified_module[AVF_AQ_PHY_MAX_QMS];
1964 AVF_CHECK_STRUCT_LEN(0x218, avf_aq_get_phy_abilities_resp);
1966 /* Set PHY Config (direct 0x0601) */
1967 struct avf_aq_set_phy_config { /* same bits as above in all */
1971 /* bits 0-2 use the values from get_phy_abilities_resp */
1972 #define AVF_AQ_PHY_ENABLE_LINK 0x08
1973 #define AVF_AQ_PHY_ENABLE_AN 0x10
1974 #define AVF_AQ_PHY_ENABLE_ATOMIC_LINK 0x20
1975 __le16 eee_capability;
1980 #define AVF_AQ_SET_FEC_ABILITY_KR BIT(0)
1981 #define AVF_AQ_SET_FEC_ABILITY_RS BIT(1)
1982 #define AVF_AQ_SET_FEC_REQUEST_KR BIT(2)
1983 #define AVF_AQ_SET_FEC_REQUEST_RS BIT(3)
1984 #define AVF_AQ_SET_FEC_AUTO BIT(4)
1985 #define AVF_AQ_PHY_FEC_CONFIG_SHIFT 0x0
1986 #define AVF_AQ_PHY_FEC_CONFIG_MASK (0x1F << AVF_AQ_PHY_FEC_CONFIG_SHIFT)
1990 AVF_CHECK_CMD_LENGTH(avf_aq_set_phy_config);
1992 /* Set MAC Config command data structure (direct 0x0603) */
1993 struct avf_aq_set_mac_config {
1994 __le16 max_frame_size;
1996 #define AVF_AQ_SET_MAC_CONFIG_CRC_EN 0x04
1997 #define AVF_AQ_SET_MAC_CONFIG_PACING_MASK 0x78
1998 #define AVF_AQ_SET_MAC_CONFIG_PACING_SHIFT 3
1999 #define AVF_AQ_SET_MAC_CONFIG_PACING_NONE 0x0
2000 #define AVF_AQ_SET_MAC_CONFIG_PACING_1B_13TX 0xF
2001 #define AVF_AQ_SET_MAC_CONFIG_PACING_1DW_9TX 0x9
2002 #define AVF_AQ_SET_MAC_CONFIG_PACING_1DW_4TX 0x8
2003 #define AVF_AQ_SET_MAC_CONFIG_PACING_3DW_7TX 0x7
2004 #define AVF_AQ_SET_MAC_CONFIG_PACING_2DW_3TX 0x6
2005 #define AVF_AQ_SET_MAC_CONFIG_PACING_1DW_1TX 0x5
2006 #define AVF_AQ_SET_MAC_CONFIG_PACING_3DW_2TX 0x4
2007 #define AVF_AQ_SET_MAC_CONFIG_PACING_7DW_3TX 0x3
2008 #define AVF_AQ_SET_MAC_CONFIG_PACING_4DW_1TX 0x2
2009 #define AVF_AQ_SET_MAC_CONFIG_PACING_9DW_1TX 0x1
2010 u8 tx_timer_priority; /* bitmap */
2011 __le16 tx_timer_value;
2012 __le16 fc_refresh_threshold;
2016 AVF_CHECK_CMD_LENGTH(avf_aq_set_mac_config);
2018 /* Restart Auto-Negotiation (direct 0x605) */
2019 struct avf_aqc_set_link_restart_an {
2021 #define AVF_AQ_PHY_RESTART_AN 0x02
2022 #define AVF_AQ_PHY_LINK_ENABLE 0x04
2026 AVF_CHECK_CMD_LENGTH(avf_aqc_set_link_restart_an);
2028 /* Get Link Status cmd & response data structure (direct 0x0607) */
2029 struct avf_aqc_get_link_status {
2030 __le16 command_flags; /* only field set on command */
2031 #define AVF_AQ_LSE_MASK 0x3
2032 #define AVF_AQ_LSE_NOP 0x0
2033 #define AVF_AQ_LSE_DISABLE 0x2
2034 #define AVF_AQ_LSE_ENABLE 0x3
2035 /* only response uses this flag */
2036 #define AVF_AQ_LSE_IS_ENABLED 0x1
2037 u8 phy_type; /* avf_aq_phy_type */
2038 u8 link_speed; /* avf_aq_link_speed */
2040 #define AVF_AQ_LINK_UP 0x01 /* obsolete */
2041 #define AVF_AQ_LINK_UP_FUNCTION 0x01
2042 #define AVF_AQ_LINK_FAULT 0x02
2043 #define AVF_AQ_LINK_FAULT_TX 0x04
2044 #define AVF_AQ_LINK_FAULT_RX 0x08
2045 #define AVF_AQ_LINK_FAULT_REMOTE 0x10
2046 #define AVF_AQ_LINK_UP_PORT 0x20
2047 #define AVF_AQ_MEDIA_AVAILABLE 0x40
2048 #define AVF_AQ_SIGNAL_DETECT 0x80
2050 #define AVF_AQ_AN_COMPLETED 0x01
2051 #define AVF_AQ_LP_AN_ABILITY 0x02
2052 #define AVF_AQ_PD_FAULT 0x04
2053 #define AVF_AQ_FEC_EN 0x08
2054 #define AVF_AQ_PHY_LOW_POWER 0x10
2055 #define AVF_AQ_LINK_PAUSE_TX 0x20
2056 #define AVF_AQ_LINK_PAUSE_RX 0x40
2057 #define AVF_AQ_QUALIFIED_MODULE 0x80
2059 #define AVF_AQ_LINK_PHY_TEMP_ALARM 0x01
2060 #define AVF_AQ_LINK_XCESSIVE_ERRORS 0x02
2061 #define AVF_AQ_LINK_TX_SHIFT 0x02
2062 #define AVF_AQ_LINK_TX_MASK (0x03 << AVF_AQ_LINK_TX_SHIFT)
2063 #define AVF_AQ_LINK_TX_ACTIVE 0x00
2064 #define AVF_AQ_LINK_TX_DRAINED 0x01
2065 #define AVF_AQ_LINK_TX_FLUSHED 0x03
2066 #define AVF_AQ_LINK_FORCED_40G 0x10
2067 /* 25G Error Codes */
2068 #define AVF_AQ_25G_NO_ERR 0X00
2069 #define AVF_AQ_25G_NOT_PRESENT 0X01
2070 #define AVF_AQ_25G_NVM_CRC_ERR 0X02
2071 #define AVF_AQ_25G_SBUS_UCODE_ERR 0X03
2072 #define AVF_AQ_25G_SERDES_UCODE_ERR 0X04
2073 #define AVF_AQ_25G_NIMB_UCODE_ERR 0X05
2074 u8 loopback; /* use defines from avf_aqc_set_lb_mode */
2075 /* Since firmware API 1.7 loopback field keeps power class info as well */
2076 #define AVF_AQ_LOOPBACK_MASK 0x07
2077 #define AVF_AQ_PWR_CLASS_SHIFT_LB 6
2078 #define AVF_AQ_PWR_CLASS_MASK_LB (0x03 << AVF_AQ_PWR_CLASS_SHIFT_LB)
2079 __le16 max_frame_size;
2081 #define AVF_AQ_CONFIG_FEC_KR_ENA 0x01
2082 #define AVF_AQ_CONFIG_FEC_RS_ENA 0x02
2083 #define AVF_AQ_CONFIG_CRC_ENA 0x04
2084 #define AVF_AQ_CONFIG_PACING_MASK 0x78
2088 #define AVF_AQ_LINK_POWER_CLASS_1 0x00
2089 #define AVF_AQ_LINK_POWER_CLASS_2 0x01
2090 #define AVF_AQ_LINK_POWER_CLASS_3 0x02
2091 #define AVF_AQ_LINK_POWER_CLASS_4 0x03
2092 #define AVF_AQ_PWR_CLASS_MASK 0x03
2102 AVF_CHECK_CMD_LENGTH(avf_aqc_get_link_status);
2104 /* Set event mask command (direct 0x613) */
2105 struct avf_aqc_set_phy_int_mask {
2108 #define AVF_AQ_EVENT_LINK_UPDOWN 0x0002
2109 #define AVF_AQ_EVENT_MEDIA_NA 0x0004
2110 #define AVF_AQ_EVENT_LINK_FAULT 0x0008
2111 #define AVF_AQ_EVENT_PHY_TEMP_ALARM 0x0010
2112 #define AVF_AQ_EVENT_EXCESSIVE_ERRORS 0x0020
2113 #define AVF_AQ_EVENT_SIGNAL_DETECT 0x0040
2114 #define AVF_AQ_EVENT_AN_COMPLETED 0x0080
2115 #define AVF_AQ_EVENT_MODULE_QUAL_FAIL 0x0100
2116 #define AVF_AQ_EVENT_PORT_TX_SUSPENDED 0x0200
2120 AVF_CHECK_CMD_LENGTH(avf_aqc_set_phy_int_mask);
2122 /* Get Local AN advt register (direct 0x0614)
2123 * Set Local AN advt register (direct 0x0615)
2124 * Get Link Partner AN advt register (direct 0x0616)
2126 struct avf_aqc_an_advt_reg {
2127 __le32 local_an_reg0;
2128 __le16 local_an_reg1;
2132 AVF_CHECK_CMD_LENGTH(avf_aqc_an_advt_reg);
2134 /* Set Loopback mode (0x0618) */
2135 struct avf_aqc_set_lb_mode {
2137 #define AVF_AQ_LB_NONE 0
2138 #define AVF_AQ_LB_MAC 1
2139 #define AVF_AQ_LB_SERDES 2
2140 #define AVF_AQ_LB_PHY_INT 3
2141 #define AVF_AQ_LB_PHY_EXT 4
2142 #define AVF_AQ_LB_CPVL_PCS 5
2143 #define AVF_AQ_LB_CPVL_EXT 6
2144 #define AVF_AQ_LB_PHY_LOCAL 0x01
2145 #define AVF_AQ_LB_PHY_REMOTE 0x02
2146 #define AVF_AQ_LB_MAC_LOCAL 0x04
2148 #define AVF_AQ_LB_LOCAL 0
2149 #define AVF_AQ_LB_FAR 0x01
2151 #define AVF_AQ_LB_SPEED_NONE 0
2152 #define AVF_AQ_LB_SPEED_1G 1
2153 #define AVF_AQ_LB_SPEED_10G 2
2154 #define AVF_AQ_LB_SPEED_40G 3
2155 #define AVF_AQ_LB_SPEED_20G 4
2160 AVF_CHECK_CMD_LENGTH(avf_aqc_set_lb_mode);
2162 /* Set PHY Debug command (0x0622) */
2163 struct avf_aqc_set_phy_debug {
2165 #define AVF_AQ_PHY_DEBUG_RESET_INTERNAL 0x02
2166 #define AVF_AQ_PHY_DEBUG_RESET_EXTERNAL_SHIFT 2
2167 #define AVF_AQ_PHY_DEBUG_RESET_EXTERNAL_MASK (0x03 << \
2168 AVF_AQ_PHY_DEBUG_RESET_EXTERNAL_SHIFT)
2169 #define AVF_AQ_PHY_DEBUG_RESET_EXTERNAL_NONE 0x00
2170 #define AVF_AQ_PHY_DEBUG_RESET_EXTERNAL_HARD 0x01
2171 #define AVF_AQ_PHY_DEBUG_RESET_EXTERNAL_SOFT 0x02
2172 /* Disable link manageability on a single port */
2173 #define AVF_AQ_PHY_DEBUG_DISABLE_LINK_FW 0x10
2174 /* Disable link manageability on all ports needs both bits 4 and 5 */
2175 #define AVF_AQ_PHY_DEBUG_DISABLE_ALL_LINK_FW 0x20
2179 AVF_CHECK_CMD_LENGTH(avf_aqc_set_phy_debug);
2181 enum avf_aq_phy_reg_type {
2182 AVF_AQC_PHY_REG_INTERNAL = 0x1,
2183 AVF_AQC_PHY_REG_EXERNAL_BASET = 0x2,
2184 AVF_AQC_PHY_REG_EXERNAL_MODULE = 0x3
2187 /* Run PHY Activity (0x0626) */
2188 struct avf_aqc_run_phy_activity {
2197 AVF_CHECK_CMD_LENGTH(avf_aqc_run_phy_activity);
2199 /* Set PHY Register command (0x0628) */
2200 /* Get PHY Register command (0x0629) */
2201 struct avf_aqc_phy_register_access {
2203 #define AVF_AQ_PHY_REG_ACCESS_INTERNAL 0
2204 #define AVF_AQ_PHY_REG_ACCESS_EXTERNAL 1
2205 #define AVF_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE 2
2213 AVF_CHECK_CMD_LENGTH(avf_aqc_phy_register_access);
2215 /* NVM Read command (indirect 0x0701)
2216 * NVM Erase commands (direct 0x0702)
2217 * NVM Update commands (indirect 0x0703)
2219 struct avf_aqc_nvm_update {
2221 #define AVF_AQ_NVM_LAST_CMD 0x01
2222 #define AVF_AQ_NVM_FLASH_ONLY 0x80
2223 #define AVF_AQ_NVM_PRESERVATION_FLAGS_SHIFT 1
2224 #define AVF_AQ_NVM_PRESERVATION_FLAGS_MASK 0x03
2225 #define AVF_AQ_NVM_PRESERVATION_FLAGS_SELECTED 0x03
2226 #define AVF_AQ_NVM_PRESERVATION_FLAGS_ALL 0x01
2234 AVF_CHECK_CMD_LENGTH(avf_aqc_nvm_update);
2236 /* NVM Config Read (indirect 0x0704) */
2237 struct avf_aqc_nvm_config_read {
2239 #define AVF_AQ_ANVM_SINGLE_OR_MULTIPLE_FEATURES_MASK 1
2240 #define AVF_AQ_ANVM_READ_SINGLE_FEATURE 0
2241 #define AVF_AQ_ANVM_READ_MULTIPLE_FEATURES 1
2242 __le16 element_count;
2243 __le16 element_id; /* Feature/field ID */
2244 __le16 element_id_msw; /* MSWord of field ID */
2245 __le32 address_high;
2249 AVF_CHECK_CMD_LENGTH(avf_aqc_nvm_config_read);
2251 /* NVM Config Write (indirect 0x0705) */
2252 struct avf_aqc_nvm_config_write {
2254 __le16 element_count;
2256 __le32 address_high;
2260 AVF_CHECK_CMD_LENGTH(avf_aqc_nvm_config_write);
2262 /* Used for 0x0704 as well as for 0x0705 commands */
2263 #define AVF_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT 1
2264 #define AVF_AQ_ANVM_FEATURE_OR_IMMEDIATE_MASK \
2265 (1 << AVF_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT)
2266 #define AVF_AQ_ANVM_FEATURE 0
2267 #define AVF_AQ_ANVM_IMMEDIATE_FIELD (1 << FEATURE_OR_IMMEDIATE_SHIFT)
2268 struct avf_aqc_nvm_config_data_feature {
2270 #define AVF_AQ_ANVM_FEATURE_OPTION_OEM_ONLY 0x01
2271 #define AVF_AQ_ANVM_FEATURE_OPTION_DWORD_MAP 0x08
2272 #define AVF_AQ_ANVM_FEATURE_OPTION_POR_CSR 0x10
2273 __le16 feature_options;
2274 __le16 feature_selection;
2277 AVF_CHECK_STRUCT_LEN(0x6, avf_aqc_nvm_config_data_feature);
2279 struct avf_aqc_nvm_config_data_immediate_field {
2282 __le16 field_options;
2286 AVF_CHECK_STRUCT_LEN(0xc, avf_aqc_nvm_config_data_immediate_field);
2288 /* OEM Post Update (indirect 0x0720)
2289 * no command data struct used
2291 struct avf_aqc_nvm_oem_post_update {
2292 #define AVF_AQ_NVM_OEM_POST_UPDATE_EXTERNAL_DATA 0x01
2297 AVF_CHECK_STRUCT_LEN(0x8, avf_aqc_nvm_oem_post_update);
2299 struct avf_aqc_nvm_oem_post_update_buffer {
2306 AVF_CHECK_STRUCT_LEN(0x28, avf_aqc_nvm_oem_post_update_buffer);
2308 /* Thermal Sensor (indirect 0x0721)
2309 * read or set thermal sensor configs and values
2310 * takes a sensor and command specific data buffer, not detailed here
2312 struct avf_aqc_thermal_sensor {
2314 #define AVF_AQ_THERMAL_SENSOR_READ_CONFIG 0
2315 #define AVF_AQ_THERMAL_SENSOR_SET_CONFIG 1
2316 #define AVF_AQ_THERMAL_SENSOR_READ_TEMP 2
2322 AVF_CHECK_CMD_LENGTH(avf_aqc_thermal_sensor);
2324 /* Send to PF command (indirect 0x0801) id is only used by PF
2325 * Send to VF command (indirect 0x0802) id is only used by PF
2326 * Send to Peer PF command (indirect 0x0803)
2328 struct avf_aqc_pf_vf_message {
2335 AVF_CHECK_CMD_LENGTH(avf_aqc_pf_vf_message);
2337 /* Alternate structure */
2339 /* Direct write (direct 0x0900)
2340 * Direct read (direct 0x0902)
2342 struct avf_aqc_alternate_write {
2349 AVF_CHECK_CMD_LENGTH(avf_aqc_alternate_write);
2351 /* Indirect write (indirect 0x0901)
2352 * Indirect read (indirect 0x0903)
2355 struct avf_aqc_alternate_ind_write {
2362 AVF_CHECK_CMD_LENGTH(avf_aqc_alternate_ind_write);
2364 /* Done alternate write (direct 0x0904)
2367 struct avf_aqc_alternate_write_done {
2369 #define AVF_AQ_ALTERNATE_MODE_BIOS_MASK 1
2370 #define AVF_AQ_ALTERNATE_MODE_BIOS_LEGACY 0
2371 #define AVF_AQ_ALTERNATE_MODE_BIOS_UEFI 1
2372 #define AVF_AQ_ALTERNATE_RESET_NEEDED 2
2376 AVF_CHECK_CMD_LENGTH(avf_aqc_alternate_write_done);
2378 /* Set OEM mode (direct 0x0905) */
2379 struct avf_aqc_alternate_set_mode {
2381 #define AVF_AQ_ALTERNATE_MODE_NONE 0
2382 #define AVF_AQ_ALTERNATE_MODE_OEM 1
2386 AVF_CHECK_CMD_LENGTH(avf_aqc_alternate_set_mode);
2388 /* Clear port Alternate RAM (direct 0x0906) uses avf_aq_desc */
2390 /* async events 0x10xx */
2392 /* Lan Queue Overflow Event (direct, 0x1001) */
2393 struct avf_aqc_lan_overflow {
2394 __le32 prtdcb_rupto;
2399 AVF_CHECK_CMD_LENGTH(avf_aqc_lan_overflow);
2401 /* Get LLDP MIB (indirect 0x0A00) */
2402 struct avf_aqc_lldp_get_mib {
2405 #define AVF_AQ_LLDP_MIB_TYPE_MASK 0x3
2406 #define AVF_AQ_LLDP_MIB_LOCAL 0x0
2407 #define AVF_AQ_LLDP_MIB_REMOTE 0x1
2408 #define AVF_AQ_LLDP_MIB_LOCAL_AND_REMOTE 0x2
2409 #define AVF_AQ_LLDP_BRIDGE_TYPE_MASK 0xC
2410 #define AVF_AQ_LLDP_BRIDGE_TYPE_SHIFT 0x2
2411 #define AVF_AQ_LLDP_BRIDGE_TYPE_NEAREST_BRIDGE 0x0
2412 #define AVF_AQ_LLDP_BRIDGE_TYPE_NON_TPMR 0x1
2413 #define AVF_AQ_LLDP_TX_SHIFT 0x4
2414 #define AVF_AQ_LLDP_TX_MASK (0x03 << AVF_AQ_LLDP_TX_SHIFT)
2415 /* TX pause flags use AVF_AQ_LINK_TX_* above */
2423 AVF_CHECK_CMD_LENGTH(avf_aqc_lldp_get_mib);
2425 /* Configure LLDP MIB Change Event (direct 0x0A01)
2426 * also used for the event (with type in the command field)
2428 struct avf_aqc_lldp_update_mib {
2430 #define AVF_AQ_LLDP_MIB_UPDATE_ENABLE 0x0
2431 #define AVF_AQ_LLDP_MIB_UPDATE_DISABLE 0x1
2437 AVF_CHECK_CMD_LENGTH(avf_aqc_lldp_update_mib);
2439 /* Add LLDP TLV (indirect 0x0A02)
2440 * Delete LLDP TLV (indirect 0x0A04)
2442 struct avf_aqc_lldp_add_tlv {
2443 u8 type; /* only nearest bridge and non-TPMR from 0x0A00 */
2451 AVF_CHECK_CMD_LENGTH(avf_aqc_lldp_add_tlv);
2453 /* Update LLDP TLV (indirect 0x0A03) */
2454 struct avf_aqc_lldp_update_tlv {
2455 u8 type; /* only nearest bridge and non-TPMR from 0x0A00 */
2464 AVF_CHECK_CMD_LENGTH(avf_aqc_lldp_update_tlv);
2466 /* Stop LLDP (direct 0x0A05) */
2467 struct avf_aqc_lldp_stop {
2469 #define AVF_AQ_LLDP_AGENT_STOP 0x0
2470 #define AVF_AQ_LLDP_AGENT_SHUTDOWN 0x1
2474 AVF_CHECK_CMD_LENGTH(avf_aqc_lldp_stop);
2476 /* Start LLDP (direct 0x0A06) */
2478 struct avf_aqc_lldp_start {
2480 #define AVF_AQ_LLDP_AGENT_START 0x1
2484 AVF_CHECK_CMD_LENGTH(avf_aqc_lldp_start);
2486 /* Set DCB (direct 0x0303) */
2487 struct avf_aqc_set_dcb_parameters {
2489 #define AVF_AQ_DCB_SET_AGENT 0x1
2490 #define AVF_DCB_VALID 0x1
2495 AVF_CHECK_CMD_LENGTH(avf_aqc_set_dcb_parameters);
2497 /* Get CEE DCBX Oper Config (0x0A07)
2498 * uses the generic descriptor struct
2499 * returns below as indirect response
2502 #define AVF_AQC_CEE_APP_FCOE_SHIFT 0x0
2503 #define AVF_AQC_CEE_APP_FCOE_MASK (0x7 << AVF_AQC_CEE_APP_FCOE_SHIFT)
2504 #define AVF_AQC_CEE_APP_ISCSI_SHIFT 0x3
2505 #define AVF_AQC_CEE_APP_ISCSI_MASK (0x7 << AVF_AQC_CEE_APP_ISCSI_SHIFT)
2506 #define AVF_AQC_CEE_APP_FIP_SHIFT 0x8
2507 #define AVF_AQC_CEE_APP_FIP_MASK (0x7 << AVF_AQC_CEE_APP_FIP_SHIFT)
2509 #define AVF_AQC_CEE_PG_STATUS_SHIFT 0x0
2510 #define AVF_AQC_CEE_PG_STATUS_MASK (0x7 << AVF_AQC_CEE_PG_STATUS_SHIFT)
2511 #define AVF_AQC_CEE_PFC_STATUS_SHIFT 0x3
2512 #define AVF_AQC_CEE_PFC_STATUS_MASK (0x7 << AVF_AQC_CEE_PFC_STATUS_SHIFT)
2513 #define AVF_AQC_CEE_APP_STATUS_SHIFT 0x8
2514 #define AVF_AQC_CEE_APP_STATUS_MASK (0x7 << AVF_AQC_CEE_APP_STATUS_SHIFT)
2515 #define AVF_AQC_CEE_FCOE_STATUS_SHIFT 0x8
2516 #define AVF_AQC_CEE_FCOE_STATUS_MASK (0x7 << AVF_AQC_CEE_FCOE_STATUS_SHIFT)
2517 #define AVF_AQC_CEE_ISCSI_STATUS_SHIFT 0xB
2518 #define AVF_AQC_CEE_ISCSI_STATUS_MASK (0x7 << AVF_AQC_CEE_ISCSI_STATUS_SHIFT)
2519 #define AVF_AQC_CEE_FIP_STATUS_SHIFT 0x10
2520 #define AVF_AQC_CEE_FIP_STATUS_MASK (0x7 << AVF_AQC_CEE_FIP_STATUS_SHIFT)
2522 /* struct avf_aqc_get_cee_dcb_cfg_v1_resp was originally defined with
2523 * word boundary layout issues, which the Linux compilers silently deal
2524 * with by adding padding, making the actual struct larger than designed.
2525 * However, the FW compiler for the NIC is less lenient and complains
2526 * about the struct. Hence, the struct defined here has an extra byte in
2527 * fields reserved3 and reserved4 to directly acknowledge that padding,
2528 * and the new length is used in the length check macro.
2530 struct avf_aqc_get_cee_dcb_cfg_v1_resp {
2538 __le16 oper_app_prio;
2543 AVF_CHECK_STRUCT_LEN(0x18, avf_aqc_get_cee_dcb_cfg_v1_resp);
2545 struct avf_aqc_get_cee_dcb_cfg_resp {
2550 __le16 oper_app_prio;
2555 AVF_CHECK_STRUCT_LEN(0x20, avf_aqc_get_cee_dcb_cfg_resp);
2557 /* Set Local LLDP MIB (indirect 0x0A08)
2558 * Used to replace the local MIB of a given LLDP agent. e.g. DCBx
2560 struct avf_aqc_lldp_set_local_mib {
2561 #define SET_LOCAL_MIB_AC_TYPE_DCBX_SHIFT 0
2562 #define SET_LOCAL_MIB_AC_TYPE_DCBX_MASK (1 << \
2563 SET_LOCAL_MIB_AC_TYPE_DCBX_SHIFT)
2564 #define SET_LOCAL_MIB_AC_TYPE_LOCAL_MIB 0x0
2565 #define SET_LOCAL_MIB_AC_TYPE_NON_WILLING_APPS_SHIFT (1)
2566 #define SET_LOCAL_MIB_AC_TYPE_NON_WILLING_APPS_MASK (1 << \
2567 SET_LOCAL_MIB_AC_TYPE_NON_WILLING_APPS_SHIFT)
2568 #define SET_LOCAL_MIB_AC_TYPE_NON_WILLING_APPS 0x1
2573 __le32 address_high;
2577 AVF_CHECK_CMD_LENGTH(avf_aqc_lldp_set_local_mib);
2579 struct avf_aqc_lldp_set_local_mib_resp {
2580 #define SET_LOCAL_MIB_RESP_EVENT_TRIGGERED_MASK 0x01
2585 AVF_CHECK_STRUCT_LEN(0x10, avf_aqc_lldp_set_local_mib_resp);
2587 /* Stop/Start LLDP Agent (direct 0x0A09)
2588 * Used for stopping/starting specific LLDP agent. e.g. DCBx
2590 struct avf_aqc_lldp_stop_start_specific_agent {
2591 #define AVF_AQC_START_SPECIFIC_AGENT_SHIFT 0
2592 #define AVF_AQC_START_SPECIFIC_AGENT_MASK \
2593 (1 << AVF_AQC_START_SPECIFIC_AGENT_SHIFT)
2598 AVF_CHECK_CMD_LENGTH(avf_aqc_lldp_stop_start_specific_agent);
2600 /* Add Udp Tunnel command and completion (direct 0x0B00) */
2601 struct avf_aqc_add_udp_tunnel {
2605 #define AVF_AQC_TUNNEL_TYPE_VXLAN 0x00
2606 #define AVF_AQC_TUNNEL_TYPE_NGE 0x01
2607 #define AVF_AQC_TUNNEL_TYPE_TEREDO 0x10
2608 #define AVF_AQC_TUNNEL_TYPE_VXLAN_GPE 0x11
2612 AVF_CHECK_CMD_LENGTH(avf_aqc_add_udp_tunnel);
2614 struct avf_aqc_add_udp_tunnel_completion {
2616 u8 filter_entry_index;
2618 #define AVF_AQC_SINGLE_PF 0x0
2619 #define AVF_AQC_MULTIPLE_PFS 0x1
2624 AVF_CHECK_CMD_LENGTH(avf_aqc_add_udp_tunnel_completion);
2626 /* remove UDP Tunnel command (0x0B01) */
2627 struct avf_aqc_remove_udp_tunnel {
2629 u8 index; /* 0 to 15 */
2633 AVF_CHECK_CMD_LENGTH(avf_aqc_remove_udp_tunnel);
2635 struct avf_aqc_del_udp_tunnel_completion {
2637 u8 index; /* 0 to 15 */
2639 u8 total_filters_used;
2643 AVF_CHECK_CMD_LENGTH(avf_aqc_del_udp_tunnel_completion);
2645 struct avf_aqc_get_set_rss_key {
2646 #define AVF_AQC_SET_RSS_KEY_VSI_VALID (0x1 << 15)
2647 #define AVF_AQC_SET_RSS_KEY_VSI_ID_SHIFT 0
2648 #define AVF_AQC_SET_RSS_KEY_VSI_ID_MASK (0x3FF << \
2649 AVF_AQC_SET_RSS_KEY_VSI_ID_SHIFT)
2656 AVF_CHECK_CMD_LENGTH(avf_aqc_get_set_rss_key);
2658 struct avf_aqc_get_set_rss_key_data {
2659 u8 standard_rss_key[0x28];
2660 u8 extended_hash_key[0xc];
2663 AVF_CHECK_STRUCT_LEN(0x34, avf_aqc_get_set_rss_key_data);
2665 struct avf_aqc_get_set_rss_lut {
2666 #define AVF_AQC_SET_RSS_LUT_VSI_VALID (0x1 << 15)
2667 #define AVF_AQC_SET_RSS_LUT_VSI_ID_SHIFT 0
2668 #define AVF_AQC_SET_RSS_LUT_VSI_ID_MASK (0x3FF << \
2669 AVF_AQC_SET_RSS_LUT_VSI_ID_SHIFT)
2671 #define AVF_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT 0
2672 #define AVF_AQC_SET_RSS_LUT_TABLE_TYPE_MASK (0x1 << \
2673 AVF_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT)
2675 #define AVF_AQC_SET_RSS_LUT_TABLE_TYPE_VSI 0
2676 #define AVF_AQC_SET_RSS_LUT_TABLE_TYPE_PF 1
2683 AVF_CHECK_CMD_LENGTH(avf_aqc_get_set_rss_lut);
2685 /* tunnel key structure 0x0B10 */
2687 struct avf_aqc_tunnel_key_structure {
2690 u8 key1_len; /* 0 to 15 */
2691 u8 key2_len; /* 0 to 15 */
2693 #define AVF_AQC_TUNNEL_KEY_STRUCT_OVERRIDE 0x01
2694 /* response flags */
2695 #define AVF_AQC_TUNNEL_KEY_STRUCT_SUCCESS 0x01
2696 #define AVF_AQC_TUNNEL_KEY_STRUCT_MODIFIED 0x02
2697 #define AVF_AQC_TUNNEL_KEY_STRUCT_OVERRIDDEN 0x03
2698 u8 network_key_index;
2699 #define AVF_AQC_NETWORK_KEY_INDEX_VXLAN 0x0
2700 #define AVF_AQC_NETWORK_KEY_INDEX_NGE 0x1
2701 #define AVF_AQC_NETWORK_KEY_INDEX_FLEX_MAC_IN_UDP 0x2
2702 #define AVF_AQC_NETWORK_KEY_INDEX_GRE 0x3
2706 AVF_CHECK_CMD_LENGTH(avf_aqc_tunnel_key_structure);
2708 /* OEM mode commands (direct 0xFE0x) */
2709 struct avf_aqc_oem_param_change {
2711 #define AVF_AQ_OEM_PARAM_TYPE_PF_CTL 0
2712 #define AVF_AQ_OEM_PARAM_TYPE_BW_CTL 1
2713 #define AVF_AQ_OEM_PARAM_MAC 2
2714 __le32 param_value1;
2715 __le16 param_value2;
2719 AVF_CHECK_CMD_LENGTH(avf_aqc_oem_param_change);
2721 struct avf_aqc_oem_state_change {
2723 #define AVF_AQ_OEM_STATE_LINK_DOWN 0x0
2724 #define AVF_AQ_OEM_STATE_LINK_UP 0x1
2728 AVF_CHECK_CMD_LENGTH(avf_aqc_oem_state_change);
2730 /* Initialize OCSD (0xFE02, direct) */
2731 struct avf_aqc_opc_oem_ocsd_initialize {
2734 __le32 ocsd_memory_block_addr_high;
2735 __le32 ocsd_memory_block_addr_low;
2736 __le32 requested_update_interval;
2739 AVF_CHECK_CMD_LENGTH(avf_aqc_opc_oem_ocsd_initialize);
2741 /* Initialize OCBB (0xFE03, direct) */
2742 struct avf_aqc_opc_oem_ocbb_initialize {
2745 __le32 ocbb_memory_block_addr_high;
2746 __le32 ocbb_memory_block_addr_low;
2750 AVF_CHECK_CMD_LENGTH(avf_aqc_opc_oem_ocbb_initialize);
2752 /* debug commands */
2754 /* get device id (0xFF00) uses the generic structure */
2756 /* set test more (0xFF01, internal) */
2758 struct avf_acq_set_test_mode {
2760 #define AVF_AQ_TEST_PARTIAL 0
2761 #define AVF_AQ_TEST_FULL 1
2762 #define AVF_AQ_TEST_NVM 2
2765 #define AVF_AQ_TEST_OPEN 0
2766 #define AVF_AQ_TEST_CLOSE 1
2767 #define AVF_AQ_TEST_INC 2
2769 __le32 address_high;
2773 AVF_CHECK_CMD_LENGTH(avf_acq_set_test_mode);
2775 /* Debug Read Register command (0xFF03)
2776 * Debug Write Register command (0xFF04)
2778 struct avf_aqc_debug_reg_read_write {
2785 AVF_CHECK_CMD_LENGTH(avf_aqc_debug_reg_read_write);
2787 /* Scatter/gather Reg Read (indirect 0xFF05)
2788 * Scatter/gather Reg Write (indirect 0xFF06)
2791 /* avf_aq_desc is used for the command */
2792 struct avf_aqc_debug_reg_sg_element_data {
2797 /* Debug Modify register (direct 0xFF07) */
2798 struct avf_aqc_debug_modify_reg {
2805 AVF_CHECK_CMD_LENGTH(avf_aqc_debug_modify_reg);
2807 /* dump internal data (0xFF08, indirect) */
2809 #define AVF_AQ_CLUSTER_ID_AUX 0
2810 #define AVF_AQ_CLUSTER_ID_SWITCH_FLU 1
2811 #define AVF_AQ_CLUSTER_ID_TXSCHED 2
2812 #define AVF_AQ_CLUSTER_ID_HMC 3
2813 #define AVF_AQ_CLUSTER_ID_MAC0 4
2814 #define AVF_AQ_CLUSTER_ID_MAC1 5
2815 #define AVF_AQ_CLUSTER_ID_MAC2 6
2816 #define AVF_AQ_CLUSTER_ID_MAC3 7
2817 #define AVF_AQ_CLUSTER_ID_DCB 8
2818 #define AVF_AQ_CLUSTER_ID_EMP_MEM 9
2819 #define AVF_AQ_CLUSTER_ID_PKT_BUF 10
2820 #define AVF_AQ_CLUSTER_ID_ALTRAM 11
2822 struct avf_aqc_debug_dump_internals {
2827 __le32 address_high;
2831 AVF_CHECK_CMD_LENGTH(avf_aqc_debug_dump_internals);
2833 struct avf_aqc_debug_modify_internals {
2835 u8 cluster_specific_params[7];
2836 __le32 address_high;
2840 AVF_CHECK_CMD_LENGTH(avf_aqc_debug_modify_internals);
2842 #endif /* _AVF_ADMINQ_CMD_H_ */