linux/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright(c) 2013 - 2021 Intel Corporation. */

#ifndef _I40E_ADMINQ_CMD_H_
#define _I40E_ADMINQ_CMD_H_

#include <linux/bits.h>
#include <linux/types.h>

/* This header file defines the i40e Admin Queue commands and is shared between
 * i40e Firmware and Software.
 *
 * This file needs to comply with the Linux Kernel coding style.
 */

#define I40E_FW_API_VERSION_MAJOR
#define I40E_FW_API_VERSION_MINOR_X722
#define I40E_FW_API_VERSION_MINOR_X710

#define I40E_FW_MINOR_VERSION(_h)

/* API version 1.7 implements additional link and PHY-specific APIs  */
#define I40E_MINOR_VER_GET_LINK_INFO_XL710
/* API version 1.9 for X722 implements additional link and PHY-specific APIs */
#define I40E_MINOR_VER_GET_LINK_INFO_X722
/* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */
#define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722
/* API version 1.10 for X722 devices adds ability to request FEC encoding */
#define I40E_MINOR_VER_FW_REQUEST_FEC_X722

struct i40e_aq_desc {};

/* Flags sub-structure
 * |0  |1  |2  |3  |4  |5  |6  |7  |8  |9  |10 |11 |12 |13 |14 |15 |
 * |DD |CMP|ERR|VFE| * *  RESERVED * * |LB |RD |VFC|BUF|SI |EI |FE |
 */

/* command flags and offsets*/
#define I40E_AQ_FLAG_ERR_SHIFT
#define I40E_AQ_FLAG_LB_SHIFT
#define I40E_AQ_FLAG_RD_SHIFT
#define I40E_AQ_FLAG_BUF_SHIFT
#define I40E_AQ_FLAG_SI_SHIFT

#define I40E_AQ_FLAG_ERR
#define I40E_AQ_FLAG_LB
#define I40E_AQ_FLAG_RD
#define I40E_AQ_FLAG_BUF
#define I40E_AQ_FLAG_SI

/* error codes */
enum i40e_admin_queue_err {};

/* Admin Queue command opcodes */
enum i40e_admin_queue_opc {};

/* command structures and indirect data structures */

/* Structure naming conventions:
 * - no suffix for direct command descriptor structures
 * - _data for indirect sent data
 * - _resp for indirect return data (data which is both will use _data)
 * - _completion for direct return data
 * - _element_ for repeated elements (may also be _data or _resp)
 *
 * Command structures are expected to overlay the params.raw member of the basic
 * descriptor, and as such cannot exceed 16 bytes in length.
 */

/* This macro is used to generate a compilation error if a structure
 * is not exactly the correct length. It gives a divide by zero error if the
 * structure is not of the correct size, otherwise it creates an enum that is
 * never used.
 */
#define I40E_CHECK_STRUCT_LEN(n, X)

/* This macro is used extensively to ensure that command structures are 16
 * bytes in length as they have to map to the raw array of that size.
 */
#define I40E_CHECK_CMD_LENGTH(X)

/* internal (0x00XX) commands */

/* Get version (direct 0x0001) */
struct i40e_aqc_get_version {};

I40E_CHECK_CMD_LENGTH();

/* Send driver version (indirect 0x0002) */
struct i40e_aqc_driver_version {};

I40E_CHECK_CMD_LENGTH();

/* Queue Shutdown (direct 0x0003) */
struct i40e_aqc_queue_shutdown {};

I40E_CHECK_CMD_LENGTH();

/* Set PF context (0x0004, direct) */
struct i40e_aqc_set_pf_context {};

I40E_CHECK_CMD_LENGTH();

/* Request resource ownership (direct 0x0008)
 * Release resource ownership (direct 0x0009)
 */
struct i40e_aqc_request_resource {};

I40E_CHECK_CMD_LENGTH();

/* Get function capabilities (indirect 0x000A)
 * Get device capabilities (indirect 0x000B)
 */
struct i40e_aqc_list_capabilites {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_list_capabilities_element_resp {};

/* list of caps */

#define I40E_AQ_CAP_ID_SWITCH_MODE
#define I40E_AQ_CAP_ID_MNG_MODE
#define I40E_AQ_CAP_ID_NPAR_ACTIVE
#define I40E_AQ_CAP_ID_OS2BMC_CAP
#define I40E_AQ_CAP_ID_FUNCTIONS_VALID
#define I40E_AQ_CAP_ID_SRIOV
#define I40E_AQ_CAP_ID_VF
#define I40E_AQ_CAP_ID_VMDQ
#define I40E_AQ_CAP_ID_8021QBG
#define I40E_AQ_CAP_ID_8021QBR
#define I40E_AQ_CAP_ID_VSI
#define I40E_AQ_CAP_ID_DCB
#define I40E_AQ_CAP_ID_FCOE
#define I40E_AQ_CAP_ID_ISCSI
#define I40E_AQ_CAP_ID_RSS
#define I40E_AQ_CAP_ID_RXQ
#define I40E_AQ_CAP_ID_TXQ
#define I40E_AQ_CAP_ID_MSIX
#define I40E_AQ_CAP_ID_VF_MSIX
#define I40E_AQ_CAP_ID_FLOW_DIRECTOR
#define I40E_AQ_CAP_ID_1588
#define I40E_AQ_CAP_ID_IWARP
#define I40E_AQ_CAP_ID_LED
#define I40E_AQ_CAP_ID_SDP
#define I40E_AQ_CAP_ID_MDIO
#define I40E_AQ_CAP_ID_WSR_PROT
#define I40E_AQ_CAP_ID_NVM_MGMT
#define I40E_AQ_CAP_ID_FLEX10
#define I40E_AQ_CAP_ID_CEM

/* Set CPPM Configuration (direct 0x0103) */
struct i40e_aqc_cppm_configuration {};

I40E_CHECK_CMD_LENGTH();

/* Set ARP Proxy command / response (indirect 0x0104) */
struct i40e_aqc_arp_proxy_data {};

I40E_CHECK_STRUCT_LEN();

/* Set NS Proxy Table Entry Command (indirect 0x0105) */
struct i40e_aqc_ns_proxy_data {};

I40E_CHECK_STRUCT_LEN();

/* Manage LAA Command (0x0106) - obsolete */
struct i40e_aqc_mng_laa {};

I40E_CHECK_CMD_LENGTH();

/* Manage MAC Address Read Command (indirect 0x0107) */
struct i40e_aqc_mac_address_read {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_mac_address_read_data {};

I40E_CHECK_STRUCT_LEN();

/* Manage MAC Address Write Command (0x0108) */
struct i40e_aqc_mac_address_write {};

I40E_CHECK_CMD_LENGTH();

/* PXE commands (0x011x) */

/* Clear PXE Command and response  (direct 0x0110) */
struct i40e_aqc_clear_pxe {};

I40E_CHECK_CMD_LENGTH();

/* Set WoL Filter (0x0120) */

struct i40e_aqc_set_wol_filter {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_set_wol_filter_data {};

I40E_CHECK_STRUCT_LEN();

/* Get Wake Reason (0x0121) */

struct i40e_aqc_get_wake_reason_completion {};

I40E_CHECK_CMD_LENGTH();

/* Switch configuration commands (0x02xx) */

/* Used by many indirect commands that only pass an seid and a buffer in the
 * command
 */
struct i40e_aqc_switch_seid {};

I40E_CHECK_CMD_LENGTH();

/* Get Switch Configuration command (indirect 0x0200)
 * uses i40e_aqc_switch_seid for the descriptor
 */
struct i40e_aqc_get_switch_config_header_resp {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_switch_config_element_resp {};

I40E_CHECK_STRUCT_LEN();

/* Get Switch Configuration (indirect 0x0200)
 *    an array of elements are returned in the response buffer
 *    the first in the array is the header, remainder are elements
 */
struct i40e_aqc_get_switch_config_resp {};

I40E_CHECK_STRUCT_LEN();

/* Add Statistics (direct 0x0201)
 * Remove Statistics (direct 0x0202)
 */
struct i40e_aqc_add_remove_statistics {};

I40E_CHECK_CMD_LENGTH();

/* Set Port Parameters command (direct 0x0203) */
struct i40e_aqc_set_port_parameters {};

I40E_CHECK_CMD_LENGTH();

/* Get Switch Resource Allocation (indirect 0x0204) */
struct i40e_aqc_get_switch_resource_alloc {};

I40E_CHECK_CMD_LENGTH();

/* expect an array of these structs in the response buffer */
struct i40e_aqc_switch_resource_alloc_element_resp {};

I40E_CHECK_STRUCT_LEN();

/* Set Switch Configuration (direct 0x0205) */
struct i40e_aqc_set_switch_config {};

I40E_CHECK_CMD_LENGTH();

/* Read Receive control registers  (direct 0x0206)
 * Write Receive control registers (direct 0x0207)
 *     used for accessing Rx control registers that can be
 *     slow and need special handling when under high Rx load
 */
struct i40e_aqc_rx_ctl_reg_read_write {};

I40E_CHECK_CMD_LENGTH();

/* Add VSI (indirect 0x0210)
 *    this indirect command uses struct i40e_aqc_vsi_properties_data
 *    as the indirect buffer (128 bytes)
 *
 * Update VSI (indirect 0x211)
 *     uses the same data structure as Add VSI
 *
 * Get VSI (indirect 0x0212)
 *     uses the same completion and data structure as Add VSI
 */
struct i40e_aqc_add_get_update_vsi {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_add_get_update_vsi_completion {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_vsi_properties_data {};

I40E_CHECK_STRUCT_LEN();

/* Add Port Virtualizer (direct 0x0220)
 * also used for update PV (direct 0x0221) but only flags are used
 * (IS_CTRL_PORT only works on add PV)
 */
struct i40e_aqc_add_update_pv {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_add_update_pv_completion {};

I40E_CHECK_CMD_LENGTH();

/* Get PV Params (direct 0x0222)
 * uses i40e_aqc_switch_seid for the descriptor
 */

struct i40e_aqc_get_pv_params_completion {};

I40E_CHECK_CMD_LENGTH();

/* Add VEB (direct 0x0230) */
struct i40e_aqc_add_veb {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_add_veb_completion {};

I40E_CHECK_CMD_LENGTH();

/* Get VEB Parameters (direct 0x0232)
 * uses i40e_aqc_switch_seid for the descriptor
 */
struct i40e_aqc_get_veb_parameters_completion {};

I40E_CHECK_CMD_LENGTH();

/* Delete Element (direct 0x0243)
 * uses the generic i40e_aqc_switch_seid
 */

/* Add MAC-VLAN (indirect 0x0250) */

/* used for the command for most vlan commands */
struct i40e_aqc_macvlan {};

I40E_CHECK_CMD_LENGTH();

/* indirect data for command and response */
struct i40e_aqc_add_macvlan_element_data {};

struct i40e_aqc_add_remove_macvlan_completion {};

I40E_CHECK_CMD_LENGTH();

/* Remove MAC-VLAN (indirect 0x0251)
 * uses i40e_aqc_macvlan for the descriptor
 * data points to an array of num_addresses of elements
 */

struct i40e_aqc_remove_macvlan_element_data {};

/* Add VLAN (indirect 0x0252)
 * Remove VLAN (indirect 0x0253)
 * use the generic i40e_aqc_macvlan for the command
 */
struct i40e_aqc_add_remove_vlan_element_data {};

struct i40e_aqc_add_remove_vlan_completion {};

/* Set VSI Promiscuous Modes (direct 0x0254) */
struct i40e_aqc_set_vsi_promiscuous_modes {};

I40E_CHECK_CMD_LENGTH();

/* Add S/E-tag command (direct 0x0255)
 * Uses generic i40e_aqc_add_remove_tag_completion for completion
 */
struct i40e_aqc_add_tag {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_add_remove_tag_completion {};

I40E_CHECK_CMD_LENGTH();

/* Remove S/E-tag command (direct 0x0256)
 * Uses generic i40e_aqc_add_remove_tag_completion for completion
 */
struct i40e_aqc_remove_tag {};

I40E_CHECK_CMD_LENGTH();

/* Add multicast E-Tag (direct 0x0257)
 * del multicast E-Tag (direct 0x0258) only uses pv_seid and etag fields
 * and no external data
 */
struct i40e_aqc_add_remove_mcast_etag {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_add_remove_mcast_etag_completion {};

I40E_CHECK_CMD_LENGTH();

/* Update S/E-Tag (direct 0x0259) */
struct i40e_aqc_update_tag {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_update_tag_completion {};

I40E_CHECK_CMD_LENGTH();

/* Add Control Packet filter (direct 0x025A)
 * Remove Control Packet filter (direct 0x025B)
 * uses the i40e_aqc_add_oveb_cloud,
 * and the generic direct completion structure
 */
struct i40e_aqc_add_remove_control_packet_filter {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_add_remove_control_packet_filter_completion {};

I40E_CHECK_CMD_LENGTH();

/* Add Cloud filters (indirect 0x025C)
 * Remove Cloud filters (indirect 0x025D)
 * uses the i40e_aqc_add_remove_cloud_filters,
 * and the generic indirect completion structure
 */
struct i40e_aqc_add_remove_cloud_filters {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_cloud_filters_element_data {};

I40E_CHECK_STRUCT_LEN();

/* i40e_aqc_cloud_filters_element_bb is used when
 * I40E_AQC_CLOUD_CMD_BB flag is set.
 */
struct i40e_aqc_cloud_filters_element_bb {};

I40E_CHECK_STRUCT_LEN();

struct i40e_aqc_remove_cloud_filters_completion {};

I40E_CHECK_CMD_LENGTH();

/* Replace filter Command 0x025F
 * uses the i40e_aqc_replace_cloud_filters,
 * and the generic indirect completion structure
 */
struct i40e_filter_data {};

I40E_CHECK_STRUCT_LEN();

struct i40e_aqc_replace_cloud_filters_cmd {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_replace_cloud_filters_cmd_buf {};

I40E_CHECK_STRUCT_LEN();

/* Add Mirror Rule (indirect or direct 0x0260)
 * Delete Mirror Rule (indirect or direct 0x0261)
 * note: some rule types (4,5) do not use an external buffer.
 *       take care to set the flags correctly.
 */
struct i40e_aqc_add_delete_mirror_rule {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_add_delete_mirror_rule_completion {};

I40E_CHECK_CMD_LENGTH();

/* Dynamic Device Personalization */
struct i40e_aqc_write_personalization_profile {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_write_ddp_resp {};

struct i40e_aqc_get_applied_profiles {};

I40E_CHECK_CMD_LENGTH();

/* DCB 0x03xx*/

/* PFC Ignore (direct 0x0301)
 *    the command and response use the same descriptor structure
 */
struct i40e_aqc_pfc_ignore {};

I40E_CHECK_CMD_LENGTH();

/* DCB Update (direct 0x0302) uses the i40e_aq_desc structure
 * with no parameters
 */

/* TX scheduler 0x04xx */

/* Almost all the indirect commands use
 * this generic struct to pass the SEID in param0
 */
struct i40e_aqc_tx_sched_ind {};

I40E_CHECK_CMD_LENGTH();

/* Several commands respond with a set of queue set handles */
struct i40e_aqc_qs_handles_resp {};

/* Configure VSI BW limits (direct 0x0400) */
struct i40e_aqc_configure_vsi_bw_limit {};

I40E_CHECK_CMD_LENGTH();

/* Configure VSI Bandwidth Limit per Traffic Type (indirect 0x0406)
 *    responds with i40e_aqc_qs_handles_resp
 */
struct i40e_aqc_configure_vsi_ets_sla_bw_data {};

I40E_CHECK_STRUCT_LEN();

/* Configure VSI Bandwidth Allocation per Traffic Type (indirect 0x0407)
 *    responds with i40e_aqc_qs_handles_resp
 */
struct i40e_aqc_configure_vsi_tc_bw_data {};

I40E_CHECK_STRUCT_LEN();

/* Query vsi bw configuration (indirect 0x0408) */
struct i40e_aqc_query_vsi_bw_config_resp {};

I40E_CHECK_STRUCT_LEN();

/* Query VSI Bandwidth Allocation per Traffic Type (indirect 0x040A) */
struct i40e_aqc_query_vsi_ets_sla_config_resp {};

I40E_CHECK_STRUCT_LEN();

/* Configure Switching Component Bandwidth Limit (direct 0x0410) */
struct i40e_aqc_configure_switching_comp_bw_limit {};

I40E_CHECK_CMD_LENGTH();

/* Enable  Physical Port ETS (indirect 0x0413)
 * Modify  Physical Port ETS (indirect 0x0414)
 * Disable Physical Port ETS (indirect 0x0415)
 */
struct i40e_aqc_configure_switching_comp_ets_data {};

I40E_CHECK_STRUCT_LEN();

/* Configure Switching Component Bandwidth Limits per Tc (indirect 0x0416) */
struct i40e_aqc_configure_switching_comp_ets_bw_limit_data {};

I40E_CHECK_STRUCT_LEN();

/* Configure Switching Component Bandwidth Allocation per Tc
 * (indirect 0x0417)
 */
struct i40e_aqc_configure_switching_comp_bw_config_data {};

I40E_CHECK_STRUCT_LEN();

/* Query Switching Component Configuration (indirect 0x0418) */
struct i40e_aqc_query_switching_comp_ets_config_resp {};

I40E_CHECK_STRUCT_LEN();

/* Query PhysicalPort ETS Configuration (indirect 0x0419) */
struct i40e_aqc_query_port_ets_config_resp {};

I40E_CHECK_STRUCT_LEN();

/* Query Switching Component Bandwidth Allocation per Traffic Type
 * (indirect 0x041A)
 */
struct i40e_aqc_query_switching_comp_bw_config_resp {};

I40E_CHECK_STRUCT_LEN();

/* Suspend/resume port TX traffic
 * (direct 0x041B and 0x041C) uses the generic SEID struct
 */

/* Configure partition BW
 * (indirect 0x041D)
 */
struct i40e_aqc_configure_partition_bw_data {};

I40E_CHECK_STRUCT_LEN();

/* Get and set the active HMC resource profile and status.
 * (direct 0x0500) and (direct 0x0501)
 */
struct i40e_aq_get_set_hmc_resource_profile {};

I40E_CHECK_CMD_LENGTH();

enum i40e_aq_hmc_profile {};

/* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */

/* set in param0 for get phy abilities to report qualified modules */
#define I40E_AQ_PHY_REPORT_QUALIFIED_MODULES
#define I40E_AQ_PHY_REPORT_INITIAL_VALUES

enum i40e_aq_phy_type {};

#define I40E_PHY_TYPES_BITMASK

#define I40E_LINK_SPEED_2_5GB_SHIFT
#define I40E_LINK_SPEED_100MB_SHIFT
#define I40E_LINK_SPEED_1000MB_SHIFT
#define I40E_LINK_SPEED_10GB_SHIFT
#define I40E_LINK_SPEED_40GB_SHIFT
#define I40E_LINK_SPEED_20GB_SHIFT
#define I40E_LINK_SPEED_25GB_SHIFT
#define I40E_LINK_SPEED_5GB_SHIFT

enum i40e_aq_link_speed {};

struct i40e_aqc_module_desc {};

I40E_CHECK_STRUCT_LEN();

struct i40e_aq_get_phy_abilities_resp {};

I40E_CHECK_STRUCT_LEN();

/* Set PHY Config (direct 0x0601) */
struct i40e_aq_set_phy_config {};

I40E_CHECK_CMD_LENGTH();

/* Set MAC Config command data structure (direct 0x0603) */
struct i40e_aq_set_mac_config {};

I40E_CHECK_CMD_LENGTH();

/* Restart Auto-Negotiation (direct 0x605) */
struct i40e_aqc_set_link_restart_an {};

I40E_CHECK_CMD_LENGTH();

/* Get Link Status cmd & response data structure (direct 0x0607) */
struct i40e_aqc_get_link_status {};

I40E_CHECK_CMD_LENGTH();

/* Set event mask command (direct 0x613) */
struct i40e_aqc_set_phy_int_mask {};

I40E_CHECK_CMD_LENGTH();

/* Get Local AN advt register (direct 0x0614)
 * Set Local AN advt register (direct 0x0615)
 * Get Link Partner AN advt register (direct 0x0616)
 */
struct i40e_aqc_an_advt_reg {};

I40E_CHECK_CMD_LENGTH();

/* Set Loopback mode (0x0618) */
struct i40e_aqc_set_lb_mode {};

I40E_CHECK_CMD_LENGTH();

/* Set PHY Debug command (0x0622) */
struct i40e_aqc_set_phy_debug {};

I40E_CHECK_CMD_LENGTH();

enum i40e_aq_phy_reg_type {};

/* Run PHY Activity (0x0626) */
struct i40e_aqc_run_phy_activity {};

I40E_CHECK_CMD_LENGTH();

/* Set PHY Register command (0x0628) */
/* Get PHY Register command (0x0629) */
struct i40e_aqc_phy_register_access {};

I40E_CHECK_CMD_LENGTH();

/* NVM Read command (indirect 0x0701)
 * NVM Erase commands (direct 0x0702)
 * NVM Update commands (indirect 0x0703)
 */
struct i40e_aqc_nvm_update {};

I40E_CHECK_CMD_LENGTH();

/* NVM Config Read (indirect 0x0704) */
struct i40e_aqc_nvm_config_read {};

I40E_CHECK_CMD_LENGTH();

/* NVM Config Write (indirect 0x0705) */
struct i40e_aqc_nvm_config_write {};

I40E_CHECK_CMD_LENGTH();

/* Used for 0x0704 as well as for 0x0705 commands */
struct i40e_aqc_nvm_config_data_feature {};

I40E_CHECK_STRUCT_LEN();

struct i40e_aqc_nvm_config_data_immediate_field {};

I40E_CHECK_STRUCT_LEN();

/* OEM Post Update (indirect 0x0720)
 * no command data struct used
 */
struct i40e_aqc_nvm_oem_post_update {};

I40E_CHECK_STRUCT_LEN();

struct i40e_aqc_nvm_oem_post_update_buffer {};

I40E_CHECK_STRUCT_LEN();

/* Thermal Sensor (indirect 0x0721)
 *     read or set thermal sensor configs and values
 *     takes a sensor and command specific data buffer, not detailed here
 */
struct i40e_aqc_thermal_sensor {};

I40E_CHECK_CMD_LENGTH();

/* Send to PF command (indirect 0x0801) id is only used by PF
 * Send to VF command (indirect 0x0802) id is only used by PF
 * Send to Peer PF command (indirect 0x0803)
 */
struct i40e_aqc_pf_vf_message {};

I40E_CHECK_CMD_LENGTH();

/* Alternate structure */

/* Direct write (direct 0x0900)
 * Direct read (direct 0x0902)
 */
struct i40e_aqc_alternate_write {};

I40E_CHECK_CMD_LENGTH();

/* Indirect write (indirect 0x0901)
 * Indirect read (indirect 0x0903)
 */

struct i40e_aqc_alternate_ind_write {};

I40E_CHECK_CMD_LENGTH();

/* Done alternate write (direct 0x0904)
 * uses i40e_aq_desc
 */
struct i40e_aqc_alternate_write_done {};

I40E_CHECK_CMD_LENGTH();

/* Set OEM mode (direct 0x0905) */
struct i40e_aqc_alternate_set_mode {};

I40E_CHECK_CMD_LENGTH();

/* Clear port Alternate RAM (direct 0x0906) uses i40e_aq_desc */

/* async events 0x10xx */

/* Lan Queue Overflow Event (direct, 0x1001) */
struct i40e_aqc_lan_overflow {};

I40E_CHECK_CMD_LENGTH();

/* Get LLDP MIB (indirect 0x0A00) */
struct i40e_aqc_lldp_get_mib {};

I40E_CHECK_CMD_LENGTH();

/* Configure LLDP MIB Change Event (direct 0x0A01)
 * also used for the event (with type in the command field)
 */
struct i40e_aqc_lldp_update_mib {};

I40E_CHECK_CMD_LENGTH();

/* Add LLDP TLV (indirect 0x0A02)
 * Delete LLDP TLV (indirect 0x0A04)
 */
struct i40e_aqc_lldp_add_tlv {};

I40E_CHECK_CMD_LENGTH();

/* Update LLDP TLV (indirect 0x0A03) */
struct i40e_aqc_lldp_update_tlv {};

I40E_CHECK_CMD_LENGTH();

/* Stop LLDP (direct 0x0A05) */
struct i40e_aqc_lldp_stop {};

I40E_CHECK_CMD_LENGTH();

/* Start LLDP (direct 0x0A06) */
struct i40e_aqc_lldp_start {};

I40E_CHECK_CMD_LENGTH();

/* Set DCB (direct 0x0303) */
struct i40e_aqc_set_dcb_parameters {};

I40E_CHECK_CMD_LENGTH();

/* Get CEE DCBX Oper Config (0x0A07)
 * uses the generic descriptor struct
 * returns below as indirect response
 */

#define I40E_AQC_CEE_APP_FCOE_SHIFT
#define I40E_AQC_CEE_APP_FCOE_MASK
#define I40E_AQC_CEE_APP_ISCSI_SHIFT
#define I40E_AQC_CEE_APP_ISCSI_MASK
#define I40E_AQC_CEE_APP_FIP_SHIFT
#define I40E_AQC_CEE_APP_FIP_MASK

#define I40E_AQC_CEE_PG_STATUS_SHIFT
#define I40E_AQC_CEE_PG_STATUS_MASK
#define I40E_AQC_CEE_PFC_STATUS_SHIFT
#define I40E_AQC_CEE_PFC_STATUS_MASK
#define I40E_AQC_CEE_APP_STATUS_SHIFT
#define I40E_AQC_CEE_APP_STATUS_MASK
#define I40E_AQC_CEE_FCOE_STATUS_SHIFT
#define I40E_AQC_CEE_FCOE_STATUS_MASK
#define I40E_AQC_CEE_ISCSI_STATUS_SHIFT
#define I40E_AQC_CEE_ISCSI_STATUS_MASK
#define I40E_AQC_CEE_FIP_STATUS_SHIFT
#define I40E_AQC_CEE_FIP_STATUS_MASK

/* struct i40e_aqc_get_cee_dcb_cfg_v1_resp was originally defined with
 * word boundary layout issues, which the Linux compilers silently deal
 * with by adding padding, making the actual struct larger than designed.
 * However, the FW compiler for the NIC is less lenient and complains
 * about the struct.  Hence, the struct defined here has an extra byte in
 * fields reserved3 and reserved4 to directly acknowledge that padding,
 * and the new length is used in the length check macro.
 */
struct i40e_aqc_get_cee_dcb_cfg_v1_resp {};

I40E_CHECK_STRUCT_LEN();

struct i40e_aqc_get_cee_dcb_cfg_resp {};

I40E_CHECK_STRUCT_LEN();

/*	Set Local LLDP MIB (indirect 0x0A08)
 *	Used to replace the local MIB of a given LLDP agent. e.g. DCBx
 */
struct i40e_aqc_lldp_set_local_mib {};

I40E_CHECK_CMD_LENGTH();

/*	Stop/Start LLDP Agent (direct 0x0A09)
 *	Used for stopping/starting specific LLDP agent. e.g. DCBx
 */
struct i40e_aqc_lldp_stop_start_specific_agent {};

I40E_CHECK_CMD_LENGTH();

/* Restore LLDP Agent factory settings (direct 0x0A0A) */
struct i40e_aqc_lldp_restore {};

I40E_CHECK_CMD_LENGTH();

/* Add Udp Tunnel command and completion (direct 0x0B00) */
struct i40e_aqc_add_udp_tunnel {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_add_udp_tunnel_completion {};

I40E_CHECK_CMD_LENGTH();

/* remove UDP Tunnel command (0x0B01) */
struct i40e_aqc_remove_udp_tunnel {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_del_udp_tunnel_completion {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_get_set_rss_key {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_get_set_rss_key_data {};

I40E_CHECK_STRUCT_LEN();

struct  i40e_aqc_get_set_rss_lut {};

I40E_CHECK_CMD_LENGTH();

/* tunnel key structure 0x0B10 */

struct i40e_aqc_tunnel_key_structure {};

I40E_CHECK_CMD_LENGTH();

/* OEM mode commands (direct 0xFE0x) */
struct i40e_aqc_oem_param_change {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_oem_state_change {};

I40E_CHECK_CMD_LENGTH();

/* Initialize OCSD (0xFE02, direct) */
struct i40e_aqc_opc_oem_ocsd_initialize {};

I40E_CHECK_CMD_LENGTH();

/* Initialize OCBB  (0xFE03, direct) */
struct i40e_aqc_opc_oem_ocbb_initialize {};

I40E_CHECK_CMD_LENGTH();

/* debug commands */

/* get device id (0xFF00) uses the generic structure */

/* set test more (0xFF01, internal) */

struct i40e_acq_set_test_mode {};

I40E_CHECK_CMD_LENGTH();

/* Debug Read Register command (0xFF03)
 * Debug Write Register command (0xFF04)
 */
struct i40e_aqc_debug_reg_read_write {};

I40E_CHECK_CMD_LENGTH();

/* Scatter/gather Reg Read  (indirect 0xFF05)
 * Scatter/gather Reg Write (indirect 0xFF06)
 */

/* i40e_aq_desc is used for the command */
struct i40e_aqc_debug_reg_sg_element_data {};

/* Debug Modify register (direct 0xFF07) */
struct i40e_aqc_debug_modify_reg {};

I40E_CHECK_CMD_LENGTH();

/* dump internal data (0xFF08, indirect) */
struct i40e_aqc_debug_dump_internals {};

I40E_CHECK_CMD_LENGTH();

struct i40e_aqc_debug_modify_internals {};

I40E_CHECK_CMD_LENGTH();

#endif /* _I40E_ADMINQ_CMD_H_ */