net/mlx5: add OS specific flow type selection
[dpdk.git] / drivers / net / i40e / base / i40e_adminq_cmd.h
index c1ca290..1905167 100644 (file)
@@ -1,35 +1,6 @@
-/*******************************************************************************
-
-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
-    documentation and/or other materials provided with the distribution.
-
- 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.
-
-***************************************************************************/
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2001-2020 Intel Corporation
+ */
 
 #ifndef _I40E_ADMINQ_CMD_H_
 #define _I40E_ADMINQ_CMD_H_
@@ -41,7 +12,19 @@ POSSIBILITY OF SUCH DAMAGE.
  */
 
 #define I40E_FW_API_VERSION_MAJOR      0x0001
-#define I40E_FW_API_VERSION_MINOR      0x0005
+#define I40E_FW_API_VERSION_MINOR_X722 0x000A
+#define I40E_FW_API_VERSION_MINOR_X710 0x000A
+
+#define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \
+                                       I40E_FW_API_VERSION_MINOR_X710 : \
+                                       I40E_FW_API_VERSION_MINOR_X722)
+
+/* API version 1.7 implements additional link and PHY-specific APIs  */
+#define I40E_MINOR_VER_GET_LINK_INFO_XL710 0x0007
+/* API version 1.9 for X722 implements additional link and PHY-specific APIs */
+#define I40E_MINOR_VER_GET_LINK_INFO_X722 0x0009
+/* API version 1.6 for X722 devices adds ability to stop FW LLDP agent */
+#define I40E_MINOR_VER_FW_LLDP_STOPPABLE_X722 0x0006
 
 struct i40e_aq_desc {
        __le16 flags;
@@ -206,6 +189,7 @@ enum i40e_admin_queue_opc {
        /* DCB commands */
        i40e_aqc_opc_dcb_ignore_pfc     = 0x0301,
        i40e_aqc_opc_dcb_updated        = 0x0302,
+       i40e_aqc_opc_set_dcb_parameters = 0x0303,
 
        /* TX scheduler */
        i40e_aqc_opc_configure_vsi_bw_limit             = 0x0400,
@@ -254,6 +238,7 @@ enum i40e_admin_queue_opc {
        i40e_aqc_opc_nvm_update                 = 0x0703,
        i40e_aqc_opc_nvm_config_read            = 0x0704,
        i40e_aqc_opc_nvm_config_write           = 0x0705,
+       i40e_aqc_opc_nvm_progress               = 0x0706,
        i40e_aqc_opc_oem_post_update            = 0x0720,
        i40e_aqc_opc_thermal_sensor             = 0x0721,
 
@@ -282,6 +267,7 @@ enum i40e_admin_queue_opc {
        i40e_aqc_opc_get_cee_dcb_cfg    = 0x0A07,
        i40e_aqc_opc_lldp_set_local_mib = 0x0A08,
        i40e_aqc_opc_lldp_stop_start_spec_agent = 0x0A09,
+       i40e_aqc_opc_lldp_restore               = 0x0A0A,
 
        /* Tunnel commands */
        i40e_aqc_opc_add_udp_tunnel     = 0x0B00,
@@ -779,7 +765,50 @@ struct i40e_aqc_set_switch_config {
 #define I40E_AQ_SET_SWITCH_CFG_L2_FILTER       0x0002
 #define I40E_AQ_SET_SWITCH_CFG_HW_ATR_EVICT    0x0004
        __le16  valid_flags;
-       u8      reserved[12];
+       /* The ethertype in switch_tag is dropped on ingress and used
+        * internally by the switch. Set this to zero for the default
+        * of 0x88a8 (802.1ad). Should be zero for firmware API
+        * versions lower than 1.7.
+        */
+       __le16  switch_tag;
+       /* The ethertypes in first_tag and second_tag are used to
+        * match the outer and inner VLAN tags (respectively) when HW
+        * double VLAN tagging is enabled via the set port parameters
+        * AQ command. Otherwise these are both ignored. Set them to
+        * zero for their defaults of 0x8100 (802.1Q). Should be zero
+        * for firmware API versions lower than 1.7.
+        */
+       __le16  first_tag;
+       __le16  second_tag;
+       /* Next byte is split into following:
+        * Bit 7    : 0 : No action, 1: Switch to mode defined by bits 6:0
+        * Bit 6    : 0 : Destination Port, 1: source port
+        * Bit 5..4 : L4 type
+        * 0: rsvd
+        * 1: TCP
+        * 2: UDP
+        * 3: Both TCP and UDP
+        * Bits 3:0 Mode
+        * 0: default mode
+        * 1: L4 port only mode
+        * 2: non-tunneled mode
+        * 3: tunneled mode
+        */
+#define I40E_AQ_SET_SWITCH_BIT7_VALID          0x80
+
+#define I40E_AQ_SET_SWITCH_L4_SRC_PORT         0x40
+
+#define I40E_AQ_SET_SWITCH_L4_TYPE_RSVD                0x00
+#define I40E_AQ_SET_SWITCH_L4_TYPE_TCP         0x10
+#define I40E_AQ_SET_SWITCH_L4_TYPE_UDP         0x20
+#define I40E_AQ_SET_SWITCH_L4_TYPE_BOTH                0x30
+
+#define I40E_AQ_SET_SWITCH_MODE_DEFAULT                0x00
+#define I40E_AQ_SET_SWITCH_MODE_L4_PORT                0x01
+#define I40E_AQ_SET_SWITCH_MODE_NON_TUNNEL     0x02
+#define I40E_AQ_SET_SWITCH_MODE_TUNNEL         0x03
+       u8      mode;
+       u8      rsvd5[5];
 };
 
 I40E_CHECK_CMD_LENGTH(i40e_aqc_set_switch_config);
@@ -1334,6 +1363,7 @@ struct i40e_aqc_add_remove_cloud_filters {
                                        I40E_AQC_ADD_CLOUD_CMD_SEID_NUM_SHIFT)
        u8      big_buffer_flag;
 #define I40E_AQC_ADD_REM_CLOUD_CMD_BIG_BUFFER  1
+#define I40E_AQC_ADD_CLOUD_CMD_BB              1
        u8      reserved2[3];
        __le32  addr_high;
        __le32  addr_low;
@@ -1341,7 +1371,7 @@ struct i40e_aqc_add_remove_cloud_filters {
 
 I40E_CHECK_CMD_LENGTH(i40e_aqc_add_remove_cloud_filters);
 
-struct i40e_aqc_add_remove_cloud_filters_element_data {
+struct i40e_aqc_cloud_filters_element_data {
        u8      outer_mac[6];
        u8      inner_mac[6];
        __le16  inner_vlan;
@@ -1353,6 +1383,9 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
                struct {
                        u8 data[16];
                } v6;
+               struct {
+                       __le16 data[8];
+               } raw_v6;
        } ipaddr;
        __le16  flags;
 #define I40E_AQC_ADD_CLOUD_FILTER_SHIFT                        0
@@ -1371,7 +1404,13 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
 #define I40E_AQC_ADD_CLOUD_FILTER_IMAC                 0x000A
 #define I40E_AQC_ADD_CLOUD_FILTER_OMAC_TEN_ID_IMAC     0x000B
 #define I40E_AQC_ADD_CLOUD_FILTER_IIP                  0x000C
+/* 0x000D reserved */
+/* 0x000E reserved */
+/* 0x000F reserved */
 /* 0x0010 to 0x0017 is for custom filters */
+#define I40E_AQC_ADD_CLOUD_FILTER_IP_PORT              0x0010 /* Dest IP + L4 Port */
+#define I40E_AQC_ADD_CLOUD_FILTER_MAC_PORT             0x0011 /* Dest MAC + L4 Port */
+#define I40E_AQC_ADD_CLOUD_FILTER_MAC_VLAN_PORT                0x0012 /* Dest MAC + VLAN + L4 Port */
 
 #define I40E_AQC_ADD_CLOUD_FLAGS_TO_QUEUE              0x0080
 #define I40E_AQC_ADD_CLOUD_VNK_SHIFT                   6
@@ -1407,11 +1446,10 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
 };
 
 /* i40e_aqc_add_rm_cloud_filt_elem_ext is used when
- * I40E_AQC_ADD_REM_CLOUD_CMD_BIG_BUFFER flag is set. refer to
- * DCR288
+ * I40E_AQC_ADD_REM_CLOUD_CMD_BIG_BUFFER flag is set.
  */
 struct i40e_aqc_add_rm_cloud_filt_elem_ext {
-       struct i40e_aqc_add_remove_cloud_filters_element_data element;
+       struct i40e_aqc_cloud_filters_element_data element;
        u16     general_fields[32];
 #define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD0   0
 #define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD1   1
@@ -1446,6 +1484,49 @@ struct i40e_aqc_add_rm_cloud_filt_elem_ext {
 #define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD7   30
 };
 
+I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_cloud_filters_element_data);
+
+/* i40e_aqc_cloud_filters_element_bb is used when
+ * I40E_AQC_CLOUD_CMD_BB flag is set.
+ */
+struct i40e_aqc_cloud_filters_element_bb {
+       struct i40e_aqc_cloud_filters_element_data element;
+       u16     general_fields[32];
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD0   0
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD1   1
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X10_WORD2   2
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD0   3
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD1   4
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X11_WORD2   5
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X12_WORD0   6
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X12_WORD1   7
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X12_WORD2   8
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X13_WORD0   9
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X13_WORD1   10
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X13_WORD2   11
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X14_WORD0   12
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X14_WORD1   13
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X14_WORD2   14
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD0   15
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD1   16
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD2   17
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD3   18
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD4   19
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD5   20
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD6   21
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X16_WORD7   22
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD0   23
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD1   24
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD2   25
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD3   26
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD4   27
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD5   28
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD6   29
+#define I40E_AQC_ADD_CLOUD_FV_FLU_0X17_WORD7   30
+};
+
+I40E_CHECK_STRUCT_LEN(0x80, i40e_aqc_cloud_filters_element_bb);
+
 struct i40e_aqc_remove_cloud_filters_completion {
        __le16 perfect_ovlan_used;
        __le16 perfect_ovlan_free;
@@ -1466,6 +1547,8 @@ struct i40e_filter_data {
        u8 input[3];
 };
 
+I40E_CHECK_STRUCT_LEN(4, i40e_filter_data);
+
 struct i40e_aqc_replace_cloud_filters_cmd {
        u8      valid_flags;
 #define I40E_AQC_REPLACE_L1_FILTER             0x0
@@ -1476,11 +1559,14 @@ struct i40e_aqc_replace_cloud_filters_cmd {
        u8      old_filter_type;
        u8      new_filter_type;
        u8      tr_bit;
-       u8      reserved[4];
+       u8      tr_bit2;
+       u8      reserved[3];
        __le32 addr_high;
        __le32 addr_low;
 };
 
+I40E_CHECK_CMD_LENGTH(i40e_aqc_replace_cloud_filters_cmd);
+
 struct i40e_aqc_replace_cloud_filters_cmd_buf {
        u8      data[32];
 /* Filter type INPUT codes*/
@@ -1505,6 +1591,8 @@ struct i40e_aqc_replace_cloud_filters_cmd_buf {
        struct i40e_filter_data filters[8];
 };
 
+I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_replace_cloud_filters_cmd_buf);
+
 /* 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.
@@ -1853,22 +1941,68 @@ enum i40e_aq_phy_type {
        I40E_PHY_TYPE_25GBASE_LR                = 0x22,
        I40E_PHY_TYPE_25GBASE_AOC               = 0x23,
        I40E_PHY_TYPE_25GBASE_ACC               = 0x24,
+       I40E_PHY_TYPE_2_5GBASE_T                = 0x30,
+       I40E_PHY_TYPE_5GBASE_T                  = 0x31,
        I40E_PHY_TYPE_MAX,
+       I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP   = 0xFD,
        I40E_PHY_TYPE_EMPTY                     = 0xFE,
        I40E_PHY_TYPE_DEFAULT                   = 0xFF,
 };
 
+#define I40E_PHY_TYPES_BITMASK (BIT_ULL(I40E_PHY_TYPE_SGMII) | \
+                               BIT_ULL(I40E_PHY_TYPE_1000BASE_KX) | \
+                               BIT_ULL(I40E_PHY_TYPE_10GBASE_KX4) | \
+                               BIT_ULL(I40E_PHY_TYPE_10GBASE_KR) | \
+                               BIT_ULL(I40E_PHY_TYPE_40GBASE_KR4) | \
+                               BIT_ULL(I40E_PHY_TYPE_XAUI) | \
+                               BIT_ULL(I40E_PHY_TYPE_XFI) | \
+                               BIT_ULL(I40E_PHY_TYPE_SFI) | \
+                               BIT_ULL(I40E_PHY_TYPE_XLAUI) | \
+                               BIT_ULL(I40E_PHY_TYPE_XLPPI) | \
+                               BIT_ULL(I40E_PHY_TYPE_40GBASE_CR4_CU) | \
+                               BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1_CU) | \
+                               BIT_ULL(I40E_PHY_TYPE_10GBASE_AOC) | \
+                               BIT_ULL(I40E_PHY_TYPE_40GBASE_AOC) | \
+                               BIT_ULL(I40E_PHY_TYPE_UNRECOGNIZED) | \
+                               BIT_ULL(I40E_PHY_TYPE_UNSUPPORTED) | \
+                               BIT_ULL(I40E_PHY_TYPE_100BASE_TX) | \
+                               BIT_ULL(I40E_PHY_TYPE_1000BASE_T) | \
+                               BIT_ULL(I40E_PHY_TYPE_10GBASE_T) | \
+                               BIT_ULL(I40E_PHY_TYPE_10GBASE_SR) | \
+                               BIT_ULL(I40E_PHY_TYPE_10GBASE_LR) | \
+                               BIT_ULL(I40E_PHY_TYPE_10GBASE_SFPP_CU) | \
+                               BIT_ULL(I40E_PHY_TYPE_10GBASE_CR1) | \
+                               BIT_ULL(I40E_PHY_TYPE_40GBASE_CR4) | \
+                               BIT_ULL(I40E_PHY_TYPE_40GBASE_SR4) | \
+                               BIT_ULL(I40E_PHY_TYPE_40GBASE_LR4) | \
+                               BIT_ULL(I40E_PHY_TYPE_1000BASE_SX) | \
+                               BIT_ULL(I40E_PHY_TYPE_1000BASE_LX) | \
+                               BIT_ULL(I40E_PHY_TYPE_1000BASE_T_OPTICAL) | \
+                               BIT_ULL(I40E_PHY_TYPE_20GBASE_KR2) | \
+                               BIT_ULL(I40E_PHY_TYPE_25GBASE_KR) | \
+                               BIT_ULL(I40E_PHY_TYPE_25GBASE_CR) | \
+                               BIT_ULL(I40E_PHY_TYPE_25GBASE_SR) | \
+                               BIT_ULL(I40E_PHY_TYPE_25GBASE_LR) | \
+                               BIT_ULL(I40E_PHY_TYPE_25GBASE_AOC) | \
+                               BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC) | \
+                               BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T) | \
+                               BIT_ULL(I40E_PHY_TYPE_5GBASE_T))
+
+#define I40E_LINK_SPEED_2_5GB_SHIFT    0x0
 #define I40E_LINK_SPEED_100MB_SHIFT    0x1
 #define I40E_LINK_SPEED_1000MB_SHIFT   0x2
 #define I40E_LINK_SPEED_10GB_SHIFT     0x3
 #define I40E_LINK_SPEED_40GB_SHIFT     0x4
 #define I40E_LINK_SPEED_20GB_SHIFT     0x5
 #define I40E_LINK_SPEED_25GB_SHIFT     0x6
+#define I40E_LINK_SPEED_5GB_SHIFT      0x7
 
 enum i40e_aq_link_speed {
        I40E_LINK_SPEED_UNKNOWN = 0,
        I40E_LINK_SPEED_100MB   = (1 << I40E_LINK_SPEED_100MB_SHIFT),
        I40E_LINK_SPEED_1GB     = (1 << I40E_LINK_SPEED_1000MB_SHIFT),
+       I40E_LINK_SPEED_2_5GB   = (1 << I40E_LINK_SPEED_2_5GB_SHIFT),
+       I40E_LINK_SPEED_5GB     = (1 << I40E_LINK_SPEED_5GB_SHIFT),
        I40E_LINK_SPEED_10GB    = (1 << I40E_LINK_SPEED_10GB_SHIFT),
        I40E_LINK_SPEED_40GB    = (1 << I40E_LINK_SPEED_40GB_SHIFT),
        I40E_LINK_SPEED_20GB    = (1 << I40E_LINK_SPEED_20GB_SHIFT),
@@ -1898,12 +2032,15 @@ struct i40e_aq_get_phy_abilities_resp {
 #define I40E_AQ_PHY_FEC_ABILITY_KR     0x40
 #define I40E_AQ_PHY_FEC_ABILITY_RS     0x80
        __le16  eee_capability;
+#define I40E_AQ_EEE_AUTO               0x0001
 #define I40E_AQ_EEE_100BASE_TX         0x0002
 #define I40E_AQ_EEE_1000BASE_T         0x0004
 #define I40E_AQ_EEE_10GBASE_T          0x0008
 #define I40E_AQ_EEE_1000BASE_KX                0x0010
 #define I40E_AQ_EEE_10GBASE_KX4                0x0020
 #define I40E_AQ_EEE_10GBASE_KR         0x0040
+#define I40E_AQ_EEE_2_5GBASE_T         0x0100
+#define I40E_AQ_EEE_5GBASE_T           0x0200
        __le32  eeer_val;
        u8      d3_lpan;
 #define I40E_AQ_SET_PHY_D3_LPAN_ENA    0x01
@@ -1914,6 +2051,8 @@ struct i40e_aq_get_phy_abilities_resp {
 #define I40E_AQ_PHY_TYPE_EXT_25G_LR    0x08
 #define I40E_AQ_PHY_TYPE_EXT_25G_AOC   0x10
 #define I40E_AQ_PHY_TYPE_EXT_25G_ACC   0x20
+#define I40E_AQ_PHY_TYPE_EXT_2_5GBASE_T        0x40
+#define I40E_AQ_PHY_TYPE_EXT_5GBASE_T  0x80
        u8      fec_cfg_curr_mod_ext_info;
 #define I40E_AQ_ENABLE_FEC_KR          0x01
 #define I40E_AQ_ENABLE_FEC_RS          0x02
@@ -1964,20 +2103,21 @@ I40E_CHECK_CMD_LENGTH(i40e_aq_set_phy_config);
 struct i40e_aq_set_mac_config {
        __le16  max_frame_size;
        u8      params;
-#define I40E_AQ_SET_MAC_CONFIG_CRC_EN          0x04
-#define I40E_AQ_SET_MAC_CONFIG_PACING_MASK     0x78
-#define I40E_AQ_SET_MAC_CONFIG_PACING_SHIFT    3
-#define I40E_AQ_SET_MAC_CONFIG_PACING_NONE     0x0
-#define I40E_AQ_SET_MAC_CONFIG_PACING_1B_13TX  0xF
-#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_9TX  0x9
-#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_4TX  0x8
-#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_7TX  0x7
-#define I40E_AQ_SET_MAC_CONFIG_PACING_2DW_3TX  0x6
-#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_1TX  0x5
-#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_2TX  0x4
-#define I40E_AQ_SET_MAC_CONFIG_PACING_7DW_3TX  0x3
-#define I40E_AQ_SET_MAC_CONFIG_PACING_4DW_1TX  0x2
-#define I40E_AQ_SET_MAC_CONFIG_PACING_9DW_1TX  0x1
+#define I40E_AQ_SET_MAC_CONFIG_CRC_EN                  0x04
+#define I40E_AQ_SET_MAC_CONFIG_PACING_MASK             0x78
+#define I40E_AQ_SET_MAC_CONFIG_PACING_SHIFT            3
+#define I40E_AQ_SET_MAC_CONFIG_PACING_NONE             0x0
+#define I40E_AQ_SET_MAC_CONFIG_PACING_1B_13TX          0xF
+#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_9TX          0x9
+#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_4TX          0x8
+#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_7TX          0x7
+#define I40E_AQ_SET_MAC_CONFIG_PACING_2DW_3TX          0x6
+#define I40E_AQ_SET_MAC_CONFIG_PACING_1DW_1TX          0x5
+#define I40E_AQ_SET_MAC_CONFIG_PACING_3DW_2TX          0x4
+#define I40E_AQ_SET_MAC_CONFIG_PACING_7DW_3TX          0x3
+#define I40E_AQ_SET_MAC_CONFIG_PACING_4DW_1TX          0x2
+#define I40E_AQ_SET_MAC_CONFIG_PACING_9DW_1TX          0x1
+#define I40E_AQ_SET_MAC_CONFIG_DROP_BLOCKING_PACKET_EN 0x80
        u8      tx_timer_priority; /* bitmap */
        __le16  tx_timer_value;
        __le16  fc_refresh_threshold;
@@ -2138,15 +2278,32 @@ enum i40e_aq_phy_reg_type {
        I40E_AQC_PHY_REG_EXERNAL_MODULE = 0x3
 };
 
+#pragma pack(1)
 /* Run PHY Activity (0x0626) */
 struct i40e_aqc_run_phy_activity {
-       __le16  activity_id;
-       u8      flags;
-       u8      reserved1;
-       __le32  control;
-       __le32  data;
-       u8      reserved2[4];
+       u8      cmd_flags;
+       __le16  activity_id;
+#define I40E_AQ_RUN_PHY_ACT_ID_USR_DFND                        0x10
+       u8      reserved;
+       union {
+               struct {
+                       __le32  dnl_opcode;
+#define I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_STAT_DUR        0x801a
+#define I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_STAT    0x801b
+#define I40E_AQ_RUN_PHY_ACT_DNL_OPCODE_GET_EEE_DUR     0x1801b
+                       __le32  data;
+                       u8      reserved2[4];
+               } cmd;
+               struct {
+                       __le32  cmd_status;
+#define I40E_AQ_RUN_PHY_ACT_CMD_STAT_SUCC              0x4
+#define I40E_AQ_RUN_PHY_ACT_CMD_STAT_MASK              0xFFFF
+                       __le32  data0;
+                       __le32  data1;
+               } resp;
+       } params;
 };
+#pragma pack()
 
 I40E_CHECK_CMD_LENGTH(i40e_aqc_run_phy_activity);
 
@@ -2158,9 +2315,15 @@ struct i40e_aqc_phy_register_access {
 #define I40E_AQ_PHY_REG_ACCESS_EXTERNAL        1
 #define I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE 2
        u8      dev_addres;
-       u8      reserved1[2];
-       u32     reg_address;
-       u32     reg_value;
+       u8      cmd_flags;
+#define I40E_AQ_PHY_REG_ACCESS_DONT_CHANGE_QSFP_PAGE   0x01
+#define I40E_AQ_PHY_REG_ACCESS_SET_MDIO_IF_NUMBER      0x02
+#define I40E_AQ_PHY_REG_ACCESS_MDIO_IF_NUMBER_SHIFT    2
+#define I40E_AQ_PHY_REG_ACCESS_MDIO_IF_NUMBER_MASK     (0x3 << \
+               I40E_AQ_PHY_REG_ACCESS_MDIO_IF_NUMBER_SHIFT)
+       u8      reserved1;
+       __le32  reg_address;
+       __le32  reg_value;
        u8      reserved2[4];
 };
 
@@ -2172,8 +2335,14 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_phy_register_access);
  */
 struct i40e_aqc_nvm_update {
        u8      command_flags;
-#define I40E_AQ_NVM_LAST_CMD   0x01
-#define I40E_AQ_NVM_FLASH_ONLY 0x80
+#define I40E_AQ_NVM_LAST_CMD                   0x01
+#define I40E_AQ_NVM_REARRANGE_TO_FLAT          0x20
+#define I40E_AQ_NVM_REARRANGE_TO_STRUCT                0x40
+#define I40E_AQ_NVM_FLASH_ONLY                 0x80
+#define I40E_AQ_NVM_PRESERVATION_FLAGS_SHIFT   1
+#define I40E_AQ_NVM_PRESERVATION_FLAGS_MASK    0x03
+#define I40E_AQ_NVM_PRESERVATION_FLAGS_SELECTED        0x03
+#define I40E_AQ_NVM_PRESERVATION_FLAGS_ALL     0x01
        u8      module_pointer;
        __le16  length;
        __le32  offset;
@@ -2416,8 +2585,9 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_update_tlv);
 /* Stop LLDP (direct 0x0A05) */
 struct i40e_aqc_lldp_stop {
        u8      command;
-#define I40E_AQ_LLDP_AGENT_STOP                0x0
-#define I40E_AQ_LLDP_AGENT_SHUTDOWN    0x1
+#define I40E_AQ_LLDP_AGENT_STOP                        0x0
+#define I40E_AQ_LLDP_AGENT_SHUTDOWN            0x1
+#define I40E_AQ_LLDP_AGENT_STOP_PERSIST                0x2
        u8      reserved[15];
 };
 
@@ -2427,12 +2597,24 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_stop);
 
 struct i40e_aqc_lldp_start {
        u8      command;
-#define I40E_AQ_LLDP_AGENT_START       0x1
+#define I40E_AQ_LLDP_AGENT_START               0x1
+#define I40E_AQ_LLDP_AGENT_START_PERSIST       0x2
        u8      reserved[15];
 };
 
 I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_start);
 
+/* Set DCB (direct 0x0303) */
+struct i40e_aqc_set_dcb_parameters {
+       u8 command;
+#define I40E_AQ_DCB_SET_AGENT  0x1
+#define I40E_DCB_VALID         0x1
+       u8 valid_flags;
+       u8 reserved[14];
+};
+
+I40E_CHECK_CMD_LENGTH(i40e_aqc_set_dcb_parameters);
+
 /* Get CEE DCBX Oper Config (0x0A07)
  * uses the generic descriptor struct
  * returns below as indirect response
@@ -2536,6 +2718,16 @@ struct i40e_aqc_lldp_stop_start_specific_agent {
 
 I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_stop_start_specific_agent);
 
+/* Restore LLDP Agent factory settings (direct 0x0A0A) */
+struct i40e_aqc_lldp_restore {
+       u8      command;
+#define I40E_AQ_LLDP_AGENT_RESTORE_NOT         0x0
+#define I40E_AQ_LLDP_AGENT_RESTORE             0x1
+       u8      reserved[15];
+};
+
+I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_restore);
+
 /* Add Udp Tunnel command and completion (direct 0x0B00) */
 struct i40e_aqc_add_udp_tunnel {
        __le16  udp_port;