/******************************************************************************
Copyright (c) 2013-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
3. Neither the name of the Intel Corporation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/
/*$FreeBSD: head/sys/dev/ixl/i40e_adminq_cmd.h 284049 2015-06-05 22:52:42Z jfv $*/
#ifndef _I40E_ADMINQ_CMD_H_
#define _I40E_ADMINQ_CMD_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.
*/
#ifdef X722_SUPPORT
#else
#endif
struct i40e_aq_desc {
union {
struct {
} internal;
struct {
} external;
} params;
};
/* 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_DD_SHIFT 0
/* error codes */
enum i40e_admin_queue_err {
};
/* Admin Queue command opcodes */
enum i40e_admin_queue_opc {
/* aq commands */
/* resource ownership */
/* LAA */
/* PXE */
/* internal switch commands */
/* DCB commands */
/* TX scheduler */
/* hmc */
/* phy commands*/
/* NVM commands */
/* virtualization commands */
/* alternate structure */
/* LLDP commands */
/* Tunnel commands */
#ifdef X722_SUPPORT
#endif
/* Async Events */
/* OEM commands */
/* debug commands */
};
/* 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.
*/
{ i40e_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
/* 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.
*/
/* internal (0x00XX) commands */
/* Get version (direct 0x0001) */
struct i40e_aqc_get_version {
};
/* Send driver version (indirect 0x0002) */
struct i40e_aqc_driver_version {
};
/* Queue Shutdown (direct 0x0003) */
struct i40e_aqc_queue_shutdown {
};
/* Set PF context (0x0004, direct) */
struct i40e_aqc_set_pf_context {
};
/* Request resource ownership (direct 0x0008)
* Release resource ownership (direct 0x0009)
*/
struct i40e_aqc_request_resource {
};
/* Get function capabilities (indirect 0x000A)
* Get device capabilities (indirect 0x000B)
*/
struct i40e_aqc_list_capabilites {
};
};
/* list of caps */
/* Set CPPM Configuration (direct 0x0103) */
struct i40e_aqc_cppm_configuration {
};
/* Set ARP Proxy command / response (indirect 0x0104) */
struct i40e_aqc_arp_proxy_data {
};
/* Set NS Proxy Table Entry Command (indirect 0x0105) */
struct i40e_aqc_ns_proxy_data {
};
/* Manage LAA Command (0x0106) - obsolete */
struct i40e_aqc_mng_laa {
};
/* Manage MAC Address Read Command (indirect 0x0107) */
struct i40e_aqc_mac_address_read {
};
struct i40e_aqc_mac_address_read_data {
};
/* Manage MAC Address Write Command (0x0108) */
struct i40e_aqc_mac_address_write {
};
/* PXE commands (0x011x) */
/* Clear PXE Command and response (direct 0x0110) */
struct i40e_aqc_clear_pxe {
};
/* 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 {
};
/* Get Switch Configuration command (indirect 0x0200)
* uses i40e_aqc_switch_seid for the descriptor
*/
};
struct i40e_aqc_switch_config_element_resp {
};
/* 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 {
};
/* Add Statistics (direct 0x0201)
* Remove Statistics (direct 0x0202)
*/
struct i40e_aqc_add_remove_statistics {
};
/* Set Port Parameters command (direct 0x0203) */
struct i40e_aqc_set_port_parameters {
};
/* Get Switch Resource Allocation (indirect 0x0204) */
struct i40e_aqc_get_switch_resource_alloc {
};
/* expect an array of these structs in the response buffer */
};
/* 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 {
};
};
struct i40e_aqc_vsi_properties_data {
/* first 96 byte are written by SW */
/* switch section */
/* security section */
/* VLAN section */
/* ingress egress up sections */
#define I40E_AQ_VSI_UP_TABLE_UP0_SHIFT 0
/* cascaded PV section */
/* queue mapping section */
#define I40E_AQ_VSI_TC_QUE_OFFSET_SHIFT 0
/* queueing option section */
#ifdef X722_SUPPORT
#endif
#ifdef X722_SUPPORT
#endif
/* scheduler section */
/* outer up section */
/* last 32 bytes are written by FW */
};
/* 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 {
};
struct i40e_aqc_add_update_pv_completion {
/* reserved for update; for add also encodes error if rc == ENOSPC */
};
/* Get PV Params (direct 0x0222)
* uses i40e_aqc_switch_seid for the descriptor
*/
struct i40e_aqc_get_pv_params_completion {
};
/* Add VEB (direct 0x0230) */
struct i40e_aqc_add_veb {
};
struct i40e_aqc_add_veb_completion {
/* also encodes error if rc == ENOSPC; codes are the same as add_pv */
};
/* Get VEB Parameters (direct 0x0232)
* uses i40e_aqc_switch_seid for the descriptor
*/
};
/* 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 {
#define I40E_AQC_MACVLAN_CMD_SEID_NUM_SHIFT 0
};
/* indirect data for command and response */
struct i40e_aqc_add_macvlan_element_data {
#define I40E_AQC_MACVLAN_CMD_QUEUE_SHIFT 0
/* response section */
};
};
/* 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 {
/* reply section */
};
/* Add VLAN (indirect 0x0252)
* Remove VLAN (indirect 0x0253)
* use the generic i40e_aqc_macvlan for the command
*/
/* flags for add VLAN */
/* flags for remove VLAN */
/* flags for add VLAN */
/* flags for remove VLAN */
};
struct i40e_aqc_add_remove_vlan_completion {
};
/* Set VSI Promiscuous Modes (direct 0x0254) */
struct i40e_aqc_set_vsi_promiscuous_modes {
/* flags used for both fields above */
};
* Uses generic i40e_aqc_add_remove_tag_completion for completion
*/
struct i40e_aqc_add_tag {
#define I40E_AQC_ADD_TAG_CMD_SEID_NUM_SHIFT 0
};
struct i40e_aqc_add_remove_tag_completion {
};
* Uses generic i40e_aqc_add_remove_tag_completion for completion
*/
struct i40e_aqc_remove_tag {
#define I40E_AQC_REMOVE_TAG_CMD_SEID_NUM_SHIFT 0
};
/* 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 {
};
};
struct i40e_aqc_update_tag {
#define I40E_AQC_UPDATE_TAG_CMD_SEID_NUM_SHIFT 0
};
struct i40e_aqc_update_tag_completion {
};
/* 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
*/
};
};
/* 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 {
#define I40E_AQC_ADD_CLOUD_CMD_SEID_NUM_SHIFT 0
};
union {
struct {
} v4;
struct {
} v6;
} ipaddr;
#define I40E_AQC_ADD_CLOUD_FILTER_SHIFT 0
/* 0x0000 reserved */
/* 0x0002 reserved */
/* 0x0005 reserved */
/* 0x0007 reserved */
/* 0x0008 reserved */
#define I40E_AQC_ADD_CLOUD_FLAGS_IPV4 0
#define I40E_AQC_ADD_CLOUD_TNL_TYPE_XVLAN 0
#define I40E_AQC_ADD_CLOUD_QUEUE_SHIFT 0
/* response section */
};
};
/* 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 {
#define I40E_AQC_MIRROR_RULE_TYPE_SHIFT 0
};
};
/* DCB 0x03xx*/
/* PFC Ignore (direct 0x0301)
* the command and response use the same descriptor structure
*/
struct i40e_aqc_pfc_ignore {
};
/* 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 {
};
/* 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 {
};
/* Configure VSI Bandwidth Limit per Traffic Type (indirect 0x0406)
* responds with i40e_aqc_qs_handles_resp
*/
/* 4 bits per tc 0-7, 4th bit is reserved, limit = 2^max */
};
/* Configure VSI Bandwidth Allocation per Traffic Type (indirect 0x0407)
* responds with i40e_aqc_qs_handles_resp
*/
struct i40e_aqc_configure_vsi_tc_bw_data {
};
/* Query vsi bw configuration (indirect 0x0408) */
struct i40e_aqc_query_vsi_bw_config_resp {
};
/* Query VSI Bandwidth Allocation per Traffic Type (indirect 0x040A) */
/* 4 bits per tc 0-7, 4th bit is reserved, limit = 2^max */
};
/* Configure Switching Component Bandwidth Limit (direct 0x0410) */
};
/* Enable Physical Port ETS (indirect 0x0413)
* Modify Physical Port ETS (indirect 0x0414)
* Disable Physical Port ETS (indirect 0x0415)
*/
};
/* Configure Switching Component Bandwidth Limits per Tc (indirect 0x0416) */
/* 4 bits per tc 0-7, 4th bit is reserved, limit = 2^max */
};
/* Configure Switching Component Bandwidth Allocation per Tc
* (indirect 0x0417)
*/
};
/* Query Switching Component Configuration (indirect 0x0418) */
};
/* Query PhysicalPort ETS Configuration (indirect 0x0419) */
struct i40e_aqc_query_port_ets_config_resp {
/* 4 bits per tc 0-7, 4th bit reserved, limit = 2^max */
};
/* Query Switching Component Bandwidth Allocation per Traffic Type
* (indirect 0x041A)
*/
/* 4 bits per tc 0-7, 4th bit is reserved, limit = 2^max */
};
* (direct 0x041B and 0x041C) uses the generic SEID struct
*/
/* Configure partition BW
* (indirect 0x041D)
*/
struct i40e_aqc_configure_partition_bw_data {
};
/* Get and set the active HMC resource profile and status.
* (direct 0x0500) and (direct 0x0501)
*/
struct i40e_aq_get_set_hmc_resource_profile {
};
enum i40e_aq_hmc_profile {
/* I40E_HMC_PROFILE_NO_CHANGE = 0, reserved */
};
/* Get PHY Abilities (indirect 0x0600) uses the generic indirect struct */
/* set in param0 for get phy abilities to report qualified modules */
enum i40e_aq_phy_type {
};
enum i40e_aq_link_speed {
};
struct i40e_aqc_module_desc {
};
struct i40e_aq_get_phy_abilities_resp {
};
/* Set PHY Config (direct 0x0601) */
/* bits 0-2 use the values from get_phy_abilities_resp */
};
/* Set MAC Config command data structure (direct 0x0603) */
struct i40e_aq_set_mac_config {
};
/* Restart Auto-Negotiation (direct 0x605) */
struct i40e_aqc_set_link_restart_an {
};
/* Get Link Status cmd & response data structure (direct 0x0607) */
struct i40e_aqc_get_link_status {
/* only response uses this flag */
};
/* Set event mask command (direct 0x613) */
struct i40e_aqc_set_phy_int_mask {
};
/* 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 {
};
/* Set Loopback mode (0x0618) */
struct i40e_aqc_set_lb_mode {
};
/* Set PHY Debug command (0x0622) */
struct i40e_aqc_set_phy_debug {
};
enum i40e_aq_phy_reg_type {
};
/* NVM Read command (indirect 0x0701)
* NVM Erase commands (direct 0x0702)
* NVM Update commands (indirect 0x0703)
*/
struct i40e_aqc_nvm_update {
};
/* NVM Config Read (indirect 0x0704) */
struct i40e_aqc_nvm_config_read {
#define I40E_AQ_ANVM_READ_SINGLE_FEATURE 0
};
/* NVM Config Write (indirect 0x0705) */
struct i40e_aqc_nvm_config_write {
};
/* Used for 0x0704 as well as for 0x0705 commands */
#define I40E_AQ_ANVM_FEATURE 0
struct i40e_aqc_nvm_config_data_feature {
};
};
/* OEM Post Update (indirect 0x0720)
* no command data struct used
*/
struct i40e_aqc_nvm_oem_post_update {
};
struct i40e_aqc_nvm_oem_post_update_buffer {
};
/* 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 {
};
/* Alternate structure */
/* Direct write (direct 0x0900)
* Direct read (direct 0x0902)
*/
struct i40e_aqc_alternate_write {
};
/* Indirect write (indirect 0x0901)
* Indirect read (indirect 0x0903)
*/
struct i40e_aqc_alternate_ind_write {
};
/* Done alternate write (direct 0x0904)
* uses i40e_aq_desc
*/
struct i40e_aqc_alternate_write_done {
#define I40E_AQ_ALTERNATE_MODE_BIOS_LEGACY 0
};
/* Set OEM mode (direct 0x0905) */
struct i40e_aqc_alternate_set_mode {
#define I40E_AQ_ALTERNATE_MODE_NONE 0
};
/* Clear port Alternate RAM (direct 0x0906) uses i40e_aq_desc */
/* async events 0x10xx */
/* Lan Queue Overflow Event (direct, 0x1001) */
struct i40e_aqc_lan_overflow {
};
/* Get LLDP MIB (indirect 0x0A00) */
struct i40e_aqc_lldp_get_mib {
/* TX pause flags use I40E_AQ_LINK_TX_* above */
};
/* Configure LLDP MIB Change Event (direct 0x0A01)
* also used for the event (with type in the command field)
*/
struct i40e_aqc_lldp_update_mib {
};
/* Add LLDP TLV (indirect 0x0A02)
* Delete LLDP TLV (indirect 0x0A04)
*/
struct i40e_aqc_lldp_add_tlv {
};
/* Update LLDP TLV (indirect 0x0A03) */
struct i40e_aqc_lldp_update_tlv {
};
/* Stop LLDP (direct 0x0A05) */
struct i40e_aqc_lldp_stop {
};
/* Start LLDP (direct 0x0A06) */
struct i40e_aqc_lldp_start {
};
/* Get CEE DCBX Oper Config (0x0A07)
* uses the generic descriptor struct
* returns below as indirect response
*/
/* 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 {
};
struct i40e_aqc_get_cee_dcb_cfg_resp {
};
/* 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 {
#define SET_LOCAL_MIB_AC_TYPE_DCBX_SHIFT 0
};
*/
#define I40E_AQC_START_SPECIFIC_AGENT_SHIFT 0
};
/* Add Udp Tunnel command and completion (direct 0x0B00) */
struct i40e_aqc_add_udp_tunnel {
};
struct i40e_aqc_add_udp_tunnel_completion {
};
/* remove UDP Tunnel command (0x0B01) */
struct i40e_aqc_remove_udp_tunnel {
};
struct i40e_aqc_del_udp_tunnel_completion {
};
#ifdef X722_SUPPORT
struct i40e_aqc_get_set_rss_key {
#define I40E_AQC_SET_RSS_KEY_VSI_ID_SHIFT 0
};
struct i40e_aqc_get_set_rss_key_data {
};
struct i40e_aqc_get_set_rss_lut {
#define I40E_AQC_SET_RSS_LUT_VSI_ID_SHIFT 0
#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_SHIFT 0
#define I40E_AQC_SET_RSS_LUT_TABLE_TYPE_VSI 0
};
#endif
/* tunnel key structure 0x0B10 */
struct i40e_aqc_tunnel_key_structure {
/* response flags */
};
/* OEM mode commands (direct 0xFE0x) */
struct i40e_aqc_oem_param_change {
#define I40E_AQ_OEM_PARAM_TYPE_PF_CTL 0
};
struct i40e_aqc_oem_state_change {
};
/* Initialize OCSD (0xFE02, direct) */
struct i40e_aqc_opc_oem_ocsd_initialize {
};
/* Initialize OCBB (0xFE03, direct) */
struct i40e_aqc_opc_oem_ocbb_initialize {
};
/* debug commands */
/* get device id (0xFF00) uses the generic structure */
/* set test more (0xFF01, internal) */
struct i40e_acq_set_test_mode {
#define I40E_AQ_TEST_PARTIAL 0
#define I40E_AQ_TEST_OPEN 0
};
/* Debug Read Register command (0xFF03)
* Debug Write Register command (0xFF04)
*/
struct i40e_aqc_debug_reg_read_write {
};
*/
/* 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 {
};
/* dump internal data (0xFF08, indirect) */
#define I40E_AQ_CLUSTER_ID_AUX 0
struct i40e_aqc_debug_dump_internals {
};
struct i40e_aqc_debug_modify_internals {
};
#endif