net/ixgbe: restore L2 tunnel filter
[dpdk.git] / drivers / net / bnxt / hsi_struct_def_dpdk.h
index b059e0d..f024837 100644 (file)
@@ -4051,905 +4051,808 @@ struct hwrm_queue_qportcfg_output {
         */
 } __attribute__((packed));
 
-/* hwrm_cfa_l2_filter_alloc */
+/* hwrm_vnic_alloc */
 /*
- * A filter is used to identify traffic that contains a matching set of
- * parameters like unicast or broadcast MAC address or a VLAN tag amongst
- * other things which then allows the ASIC to direct the  incoming traffic
- * to an appropriate VNIC or Rx ring.
+ * Description: This VNIC is a resource in the RX side of the chip that is used
+ * to represent a virtual host "interface". # At the time of VNIC allocation or
+ * configuration, the function can specify whether it wants the requested VNIC
+ * to be the default VNIC for the function or not. # If a function requests
+ * allocation of a VNIC for the first time and a VNIC is successfully allocated
+ * by the HWRM, then the HWRM shall make the allocated VNIC as the default VNIC
+ * for that function. # The default VNIC shall be used for the default action
+ * for a partition or function. # For each VNIC allocated on a function, a
+ * mapping on the RX side to map the allocated VNIC to source virtual interface
+ * shall be performed by the HWRM. This should be hidden to the function driver
+ * requesting the VNIC allocation. This enables broadcast/multicast replication
+ * with source knockout. # If multicast replication with source knockout is
+ * enabled, then the internal VNIC to SVIF mapping data structures shall be
+ * programmed at the time of VNIC allocation.
  */
-
-/* Input (96 bytes) */
-struct hwrm_cfa_l2_filter_alloc_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
+/* Input (24 bytes) */
+struct hwrm_vnic_alloc_input {
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
        /*
-        * Enumeration denoting the RX, TX type of the resource. This
-        * enumeration is used for resources that are similar for both TX and RX
-        * paths of the chip.
-        */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH \
-                                                       UINT32_C(0x1)
-               /* tx path */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_TX \
-                                                       (UINT32_C(0x0) << 0)
-               /* rx path */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX \
-                                                       (UINT32_C(0x1) << 0)
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_LAST \
-                               HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX
-       /*
-        * Setting of this flag indicates the applicability to the loopback
-        * path.
-        */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK \
-                                                       UINT32_C(0x2)
-       /*
-        * Setting of this flag indicates drop action. If this flag is not set,
-        * then it should be considered accept action.
-        */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_DROP \
-                                                       UINT32_C(0x4)
-       /*
-        * If this flag is set, all t_l2_* fields are invalid and they should
-        * not be specified. If this flag is set, then l2_* fields refer to
-        * fields of outermost L2 header.
-        */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST \
-                                                       UINT32_C(0x8)
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
        uint32_t flags;
-
-       /* This bit must be '1' for the l2_addr field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR \
-                                                       UINT32_C(0x1)
-       /* This bit must be '1' for the l2_addr_mask field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK \
-                                                       UINT32_C(0x2)
-       /* This bit must be '1' for the l2_ovlan field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN \
-                                                       UINT32_C(0x4)
-       /* This bit must be '1' for the l2_ovlan_mask field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK \
-                                                       UINT32_C(0x8)
-       /* This bit must be '1' for the l2_ivlan field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN \
-                                                       UINT32_C(0x10)
-       /* This bit must be '1' for the l2_ivlan_mask field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK \
-                                                       UINT32_C(0x20)
-       /* This bit must be '1' for the t_l2_addr field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR \
-                                                       UINT32_C(0x40)
        /*
-        * This bit must be '1' for the t_l2_addr_mask field to be configured.
+        * When this bit is '1', this VNIC is requested to be the
+        * default VNIC for this function.
         */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR_MASK \
-                                                       UINT32_C(0x80)
-       /* This bit must be '1' for the t_l2_ovlan field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN \
-                                                       UINT32_C(0x100)
+       #define HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT     UINT32_C(0x1)
+       uint32_t unused_0;
+} __attribute__((packed));
+
+/* Output (16 bytes) */
+struct hwrm_vnic_alloc_output {
+       uint16_t error_code;
        /*
-        * This bit must be '1' for the t_l2_ovlan_mask field to be configured.
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN_MASK \
-                                                       UINT32_C(0x200)
-       /* This bit must be '1' for the t_l2_ivlan field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN \
-                                                       UINT32_C(0x400)
+       uint16_t req_type;
+       /* This field returns the type of original request. */
+       uint16_t seq_id;
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This bit must be '1' for the t_l2_ivlan_mask field to be configured.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN_MASK \
-                                                       UINT32_C(0x800)
-       /* This bit must be '1' for the src_type field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_TYPE \
-                                                       UINT32_C(0x1000)
-       /* This bit must be '1' for the src_id field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_ID \
-                                                       UINT32_C(0x2000)
-       /* This bit must be '1' for the tunnel_type field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
-                                                       UINT32_C(0x4000)
-       /* This bit must be '1' for the dst_id field to be configured. */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID \
-                                                       UINT32_C(0x8000)
+       uint32_t vnic_id;
+       /* Logical vnic ID */
+       uint8_t unused_0;
+       uint8_t unused_1;
+       uint8_t unused_2;
+       uint8_t valid;
        /*
-        * This bit must be '1' for the mirror_vnic_id field to be configured.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
-                                                       UINT32_C(0x10000)
-       uint32_t enables;
+} __attribute__((packed));
 
+/* hwrm_vnic_free */
+/*
+ * Description: Free a VNIC resource. Idle any resources associated with the
+ * VNIC as well as the VNIC. Reset and release all resources associated with the
+ * VNIC.
+ */
+/* Input (24 bytes) */
+struct hwrm_vnic_free_input {
+       uint16_t req_type;
        /*
-        * This value sets the match value for the L2 MAC address. Destination
-        * MAC address for RX path. Source MAC address for TX path.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
-       uint8_t l2_addr[6];
-
-       uint8_t unused_0;
-       uint8_t unused_1;
-
+       uint16_t cmpl_ring;
        /*
-        * This value sets the mask value for the L2 address. A value of 0 will
-        * mask the corresponding bit from compare.
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
-       uint8_t l2_addr_mask[6];
-
-       /* This value sets VLAN ID value for outer VLAN. */
-       uint16_t l2_ovlan;
-
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
+       uint16_t target_id;
        /*
-        * This value sets the mask value for the ovlan id. A value of 0 will
-        * mask the corresponding bit from compare.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
-       uint16_t l2_ovlan_mask;
-
-       /* This value sets VLAN ID value for inner VLAN. */
-       uint16_t l2_ivlan;
-
+       uint64_t resp_addr;
        /*
-        * This value sets the mask value for the ivlan id. A value of 0 will
-        * mask the corresponding bit from compare.
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
         */
-       uint16_t l2_ivlan_mask;
-
-       uint8_t unused_2;
-       uint8_t unused_3;
+       uint32_t vnic_id;
+       /* Logical vnic ID */
+       uint32_t unused_0;
+} __attribute__((packed));
 
+/* Output (16 bytes) */
+struct hwrm_vnic_free_output {
+       uint16_t error_code;
        /*
-        * This value sets the match value for the tunnel L2 MAC address.
-        * Destination MAC address for RX path. Source MAC address for TX path.
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint8_t t_l2_addr[6];
-
-       uint8_t unused_4;
-       uint8_t unused_5;
-
+       uint16_t req_type;
+       /* This field returns the type of original request. */
+       uint16_t seq_id;
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This value sets the mask value for the tunnel L2 address. A value of
-        * 0 will mask the corresponding bit from compare.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint8_t t_l2_addr_mask[6];
-
-       /* This value sets VLAN ID value for tunnel outer VLAN. */
-       uint16_t t_l2_ovlan;
-
+       uint32_t unused_0;
+       uint8_t unused_1;
+       uint8_t unused_2;
+       uint8_t unused_3;
+       uint8_t valid;
        /*
-        * This value sets the mask value for the tunnel ovlan id. A value of 0
-        * will mask the corresponding bit from compare.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint16_t t_l2_ovlan_mask;
-
-       /* This value sets VLAN ID value for tunnel inner VLAN. */
-       uint16_t t_l2_ivlan;
+} __attribute__((packed));
 
+/* hwrm_vnic_cfg */
+/* Description: Configure the RX VNIC structure. */
+/* Input (40 bytes) */
+struct hwrm_vnic_cfg_input {
+       uint16_t req_type;
        /*
-        * This value sets the mask value for the tunnel ivlan id. A value of 0
-        * will mask the corresponding bit from compare.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
-       uint16_t t_l2_ivlan_mask;
-
-       /* This value identifies the type of source of the packet. */
-               /* Network port */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_NPORT \
-                                                       (UINT32_C(0x0) << 0)
-               /* Physical function */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_PF \
-                                                       (UINT32_C(0x1) << 0)
-               /* Virtual function */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VF \
-                                                       (UINT32_C(0x2) << 0)
-               /* Virtual NIC of a function */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VNIC \
-                                                       (UINT32_C(0x3) << 0)
-               /* Embedded processor for CFA management */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_KONG \
-                                                       (UINT32_C(0x4) << 0)
-               /* Embedded processor for OOB management */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_APE \
-                                                       (UINT32_C(0x5) << 0)
-               /* Embedded processor for RoCE */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_BONO \
-                                                       (UINT32_C(0x6) << 0)
-               /* Embedded processor for network proxy functions */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_TANG \
-                                                       (UINT32_C(0x7) << 0)
-       uint8_t src_type;
-
-       uint8_t unused_6;
+       uint16_t cmpl_ring;
        /*
-        * This value is the id of the source. For a network port, it represents
-        * port_id. For a physical function, it represents fid. For a virtual
-        * function, it represents vf_id. For a vnic, it represents vnic_id. For
-        * embedded processors, this id is not valid. Notes: 1. The function ID
-        * is implied if it src_id is not provided for a src_type that is either
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
-       uint32_t src_id;
-
-       /* Tunnel Type. */
-               /* Non-tunnel */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
-                                                       (UINT32_C(0x0) << 0)
-               /* Virtual eXtensible Local Area Network (VXLAN) */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
-                                                       (UINT32_C(0x1) << 0)
-               /*
-                * Network Virtualization Generic Routing Encapsulation (NVGRE)
-                */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
-                                                       (UINT32_C(0x2) << 0)
-               /*
-                * Generic Routing Encapsulation (GRE) inside Ethernet payload
-                */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
-                                                       (UINT32_C(0x3) << 0)
-               /* IP in IP */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
-                                                       (UINT32_C(0x4) << 0)
-               /* Generic Network Virtualization Encapsulation (Geneve) */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
-                                                       (UINT32_C(0x5) << 0)
-               /* Multi-Protocol Lable Switching (MPLS) */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
-                                                       (UINT32_C(0x6) << 0)
-               /* Stateless Transport Tunnel (STT) */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \
-                                                       (UINT32_C(0x7) << 0)
-               /*
-                * Generic Routing Encapsulation (GRE) inside IP datagram
-                * payload
-                */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
-                                                       (UINT32_C(0x8) << 0)
-               /* Any tunneled traffic */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
-                                                       (UINT32_C(0xff) << 0)
-       uint8_t tunnel_type;
-
-       uint8_t unused_7;
-
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
+       uint16_t target_id;
        /*
-        * If set, this value shall represent the Logical VNIC ID of the
-        * destination VNIC for the RX path and network port id of the
-        * destination port for the TX path.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
-       uint16_t dst_id;
-
-       /* Logical VNIC ID of the VNIC where traffic is mirrored. */
-       uint16_t mirror_vnic_id;
-
+       uint64_t resp_addr;
        /*
-        * This hint is provided to help in placing the filter in the filter
-        * table.
-        */
-               /* No preference */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER \
-                                                       (UINT32_C(0x0) << 0)
-               /* Above the given filter */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE_FILTER \
-                                                       (UINT32_C(0x1) << 0)
-               /* Below the given filter */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_BELOW_FILTER \
-                                                       (UINT32_C(0x2) << 0)
-               /* As high as possible */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MAX \
-                                                       (UINT32_C(0x3) << 0)
-               /* As low as possible */
-       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MIN \
-                                                       (UINT32_C(0x4) << 0)
-       uint8_t pri_hint;
-
-       uint8_t unused_8;
-       uint32_t unused_9;
-
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
+       uint32_t flags;
        /*
-        * This is the ID of the filter that goes along with the pri_hint. This
-        * field is valid only for the following values. 1 - Above the given
-        * filter 2 - Below the given filter
+        * When this bit is '1', the VNIC is requested to be the default
+        * VNIC for the function.
         */
-       uint64_t l2_filter_id_hint;
-} __attribute__((packed));
-
-/* Output (24 bytes) */
-struct hwrm_cfa_l2_filter_alloc_output {
+       #define HWRM_VNIC_CFG_INPUT_FLAGS_DEFAULT       UINT32_C(0x1)
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * When this bit is '1', the VNIC is being configured to strip
+        * VLAN in the RX path. If set to '0', then VLAN stripping is
+        * disabled on this VNIC.
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
-       uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
-       uint16_t seq_id;
-
+       #define HWRM_VNIC_CFG_INPUT_FLAGS_VLAN_STRIP_MODE       UINT32_C(0x2)
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * When this bit is '1', the VNIC is being configured to buffer
+        * receive packets in the hardware until the host posts new
+        * receive buffers. If set to '0', then bd_stall is being
+        * configured to be disabled on this VNIC.
         */
-       uint16_t resp_len;
-
+       #define HWRM_VNIC_CFG_INPUT_FLAGS_BD_STALL_MODE UINT32_C(0x4)
        /*
-        * This value identifies a set of CFA data structures used for an L2
-        * context.
+        * When this bit is '1', the VNIC is being configured to receive
+        * both RoCE and non-RoCE traffic. If set to '0', then this VNIC
+        * is not configured to be operating in dual VNIC mode.
         */
-       uint64_t l2_filter_id;
-
+       #define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_DUAL_VNIC_MODE   UINT32_C(0x8)
        /*
-        * This is the ID of the flow associated with this filter. This value
-        * shall be used to match and associate the flow identifier returned in
-        * completion records. A value of 0xFFFFFFFF shall indicate no flow id.
+        * When this flag is set to '1', the VNIC is requested to be
+        * configured to receive only RoCE traffic. If this flag is set
+        * to '0', then this flag shall be ignored by the HWRM. If
+        * roce_dual_vnic_mode flag is set to '1', then the HWRM client
+        * shall not set this flag to '1'.
         */
-       uint32_t flow_id;
-
-       uint8_t unused_0;
-       uint8_t unused_1;
-       uint8_t unused_2;
-
+       #define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_ONLY_VNIC_MODE   UINT32_C(0x10)
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * When a VNIC uses one destination ring group for certain
+        * application (e.g. Receive Flow Steering) where exact match is
+        * used to direct packets to a VNIC with one destination ring
+        * group only, there is no need to configure RSS indirection
+        * table for that VNIC as only one destination ring group is
+        * used. This flag is used to enable a mode where RSS is enabled
+        * in the VNIC using a RSS context for computing RSS hash but
+        * the RSS indirection table is not configured using
+        * hwrm_vnic_rss_cfg. If this mode is enabled, then the driver
+        * should not program RSS indirection table for the RSS context
+        * that is used for computing RSS hash only.
+        */
+       #define HWRM_VNIC_CFG_INPUT_FLAGS_RSS_DFLT_CR_MODE      UINT32_C(0x20)
+       uint32_t enables;
+       /*
+        * This bit must be '1' for the dflt_ring_grp field to be
+        * configured.
         */
-       uint8_t valid;
-} __attribute__((packed));
-
-/* hwrm_cfa_l2_filter_free */
-/*
- * Description: Free a L2 filter. The HWRM shall free all associated filter
- * resources with the L2 filter.
- */
-
-/* Input (24 bytes) */
-struct hwrm_cfa_l2_filter_free_input {
+       #define HWRM_VNIC_CFG_INPUT_ENABLES_DFLT_RING_GRP       UINT32_C(0x1)
+       /* This bit must be '1' for the rss_rule field to be configured. */
+       #define HWRM_VNIC_CFG_INPUT_ENABLES_RSS_RULE    UINT32_C(0x2)
+       /* This bit must be '1' for the cos_rule field to be configured. */
+       #define HWRM_VNIC_CFG_INPUT_ENABLES_COS_RULE    UINT32_C(0x4)
+       /* This bit must be '1' for the lb_rule field to be configured. */
+       #define HWRM_VNIC_CFG_INPUT_ENABLES_LB_RULE     UINT32_C(0x8)
+       /* This bit must be '1' for the mru field to be configured. */
+       #define HWRM_VNIC_CFG_INPUT_ENABLES_MRU UINT32_C(0x10)
+       uint16_t vnic_id;
+       /* Logical vnic ID */
+       uint16_t dflt_ring_grp;
        /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
+        * Default Completion ring for the VNIC. This ring will be
+        * chosen if packet does not match any RSS rules and if there is
+        * no COS rule.
         */
-       uint16_t req_type;
-
+       uint16_t rss_rule;
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * RSS ID for RSS rule/table structure. 0xFF... (All Fs) if
+        * there is no RSS rule.
         */
-       uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
+       uint16_t cos_rule;
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * RSS ID for COS rule/table structure. 0xFF... (All Fs) if
+        * there is no COS rule.
         */
-       uint16_t target_id;
-
+       uint16_t lb_rule;
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * RSS ID for load balancing rule/table structure. 0xFF... (All
+        * Fs) if there is no LB rule.
         */
-       uint64_t resp_addr;
-
+       uint16_t mru;
        /*
-        * This value identifies a set of CFA data structures used for an L2
-        * context.
+        * The maximum receive unit of the vnic. Each vnic is associated
+        * with a function. The vnic mru value overwrites the mru
+        * setting of the associated function. The HWRM shall make sure
+        * that vnic mru does not exceed the mru of the port the
+        * function is associated with.
         */
-       uint64_t l2_filter_id;
+       uint32_t unused_0;
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-struct hwrm_cfa_l2_filter_free_output {
+struct hwrm_vnic_cfg_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
        uint32_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
        uint8_t unused_3;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-/* hwrm_cfa_l2_set_rx_mask */
-/* Description: This command will set rx mask of the function. */
-
-/* Input (40 bytes) */
-struct hwrm_cfa_l2_set_rx_mask_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
+/* hwrm_vnic_rss_cfg */
+/* Description: This function is used to enable RSS configuration. */
+/* Input (48 bytes) */
+struct hwrm_vnic_rss_cfg_input {
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
+       /*
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
+       uint32_t hash_type;
+       /*
+        * When this bit is '1', the RSS hash shall be computed over
+        * source and destination IPv4 addresses of IPv4 packets.
+        */
+       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4  UINT32_C(0x1)
+       /*
+        * When this bit is '1', the RSS hash shall be computed over
+        * source/destination IPv4 addresses and source/destination
+        * ports of TCP/IPv4 packets.
+        */
+       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4      UINT32_C(0x2)
+       /*
+        * When this bit is '1', the RSS hash shall be computed over
+        * source/destination IPv4 addresses and source/destination
+        * ports of UDP/IPv4 packets.
+        */
+       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV4      UINT32_C(0x4)
+       /*
+        * When this bit is '1', the RSS hash shall be computed over
+        * source and destination IPv4 addresses of IPv6 packets.
+        */
+       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6  UINT32_C(0x8)
+       /*
+        * When this bit is '1', the RSS hash shall be computed over
+        * source/destination IPv6 addresses and source/destination
+        * ports of TCP/IPv6 packets.
+        */
+       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV6      UINT32_C(0x10)
+       /*
+        * When this bit is '1', the RSS hash shall be computed over
+        * source/destination IPv6 addresses and source/destination
+        * ports of UDP/IPv6 packets.
+        */
+       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6      UINT32_C(0x20)
+       uint32_t unused_0;
+       uint64_t ring_grp_tbl_addr;
+       /* This is the address for rss ring group table */
+       uint64_t hash_key_tbl_addr;
+       /* This is the address for rss hash key table */
+       uint16_t rss_ctx_idx;
+       /* Index to the rss indirection table. */
+       uint16_t unused_1[3];
+} __attribute__((packed));
 
-       /* VNIC ID */
-       uint32_t vnic_id;
-
-       /* Reserved for future use. */
-       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_RESERVED     UINT32_C(0x1)
+/* Output (16 bytes) */
+struct hwrm_vnic_rss_cfg_output {
+       uint16_t error_code;
        /*
-        * When this bit is '1', the function is requested to accept multi-cast
-        * packets specified by the multicast addr table.
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST        UINT32_C(0x2)
+       uint16_t req_type;
+       /* This field returns the type of original request. */
+       uint16_t seq_id;
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * When this bit is '1', the function is requested to accept all multi-
-        * cast packets.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST    UINT32_C(0x4)
+       uint32_t unused_0;
+       uint8_t unused_1;
+       uint8_t unused_2;
+       uint8_t unused_3;
+       uint8_t valid;
+       /*
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
+        */
+} __attribute__((packed));
+
+/* hwrm_vnic_rss_cos_lb_ctx_alloc */
+/* Description: This function is used to allocate COS/Load Balance context. */
+/* Input (16 bytes) */
+struct hwrm_vnic_rss_cos_lb_ctx_alloc_input {
+       uint16_t req_type;
        /*
-        * When this bit is '1', the function is requested to accept broadcast
-        * packets.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
-       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST        UINT32_C(0x8)
+       uint16_t cmpl_ring;
        /*
-        * When this bit is '1', the function is requested to be put in the
-        * promiscuous mode. The HWRM should accept any function to set up
-        * promiscuous mode. The HWRM shall follow the semantics below for the
-        * promiscuous mode support. # When partitioning is not enabled on a
-        * port (i.e. single PF on the port), then the PF shall be allowed to be
-        * in the promiscuous mode. When the PF is in the promiscuous mode, then
-        * it shall receive all host bound traffic on that port. # When
-        * partitioning is enabled on a port (i.e. multiple PFs per port) and a
-        * PF on that port is in the promiscuous mode, then the PF receives all
-        * traffic within that partition as identified by a unique identifier
-        * for the PF (e.g. S-Tag). If a unique outer VLAN for the PF is
-        * specified, then the setting of promiscuous mode on that PF shall
-        * result in the PF receiving all host bound traffic with matching outer
-        * VLAN. # A VF shall can be set in the promiscuous mode. In the
-        * promiscuous mode, the VF does not receive any traffic unless a unique
-        * outer VLAN for the VF is specified. If a unique outer VLAN for the VF
-        * is specified, then the setting of promiscuous mode on that VF shall
-        * result in the VF receiving all host bound traffic with the matching
-        * outer VLAN. # The HWRM shall allow the setting of promiscuous mode on
-        * a function independently from the promiscuous mode settings on other
-        * functions.
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
-       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS  UINT32_C(0x10)
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
+       uint16_t target_id;
        /*
-        * If this flag is set, the corresponding RX filters shall be set up to
-        * cover multicast/broadcast filters for the outermost Layer 2
-        * destination MAC address field.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
-       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_OUTERMOST    UINT32_C(0x20)
-       uint32_t mask;
-
-       /* This is the address for mcast address tbl. */
-       uint64_t mc_tbl_addr;
-
+       uint64_t resp_addr;
        /*
-        * This value indicates how many entries in mc_tbl are valid. Each entry
-        * is 6 bytes.
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
         */
-       uint32_t num_mc_entries;
-
-       uint32_t unused_0;
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-struct hwrm_cfa_l2_set_rx_mask_output {
+struct hwrm_vnic_rss_cos_lb_ctx_alloc_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
-       uint32_t unused_0;
+       uint16_t rss_cos_lb_ctx_id;
+       /* rss_cos_lb_ctx_id is 16 b */
+       uint8_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
        uint8_t unused_3;
-
+       uint8_t unused_4;
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-/* hwrm_exec_fwd_resp */
-/*
- * Description: This command is used to send an encapsulated request to the
- * HWRM. This command instructs the HWRM to execute the request and forward the
- * response of the encapsulated request to the location specified in the
- * original request that is encapsulated. The target id of this command shall be
- * set to 0xFFFF (HWRM). The response location in this command shall be used to
- * acknowledge the receipt of the encapsulated request and forwarding of the
- * response.
- */
-
-/* Input (128 bytes) */
-struct hwrm_exec_fwd_resp_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
+/* hwrm_vnic_rss_cos_lb_ctx_free */
+/* Description: This function can be used to free COS/Load Balance context. */
+/* Input (24 bytes) */
+struct hwrm_vnic_rss_cos_lb_ctx_free_input {
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
-       /*
-        * This is an encapsulated request. This request should be executed by
-        * the HWRM and the response should be provided in the response buffer
-        * inside the encapsulated request.
-        */
-       uint32_t encap_request[26];
-
        /*
-        * This value indicates the target id of the response to the
-        * encapsulated request. 0x0 - 0xFFF8 - Used for function ids 0xFFF8 -
-        * 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
         */
-       uint16_t encap_resp_target_id;
-
+       uint16_t rss_cos_lb_ctx_id;
+       /* rss_cos_lb_ctx_id is 16 b */
        uint16_t unused_0[3];
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-struct hwrm_exec_fwd_resp_output {
+struct hwrm_vnic_rss_cos_lb_ctx_free_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
        uint32_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
        uint8_t unused_3;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-
 /* hwrm_ring_alloc */
 /*
  * Description: This command allocates and does basic preparation for a ring.
  */
-
 /* Input (80 bytes) */
 struct hwrm_ring_alloc_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
+       /*
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
+       uint32_t enables;
        /* This bit must be '1' for the Reserved1 field to be configured. */
-       #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED1         UINT32_C(0x1)
-       /* This bit must be '1' for the Reserved2 field to be configured. */
-       #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED2         UINT32_C(0x2)
+       #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED1 UINT32_C(0x1)
+       /* This bit must be '1' for the ring_arb_cfg field to be configured. */
+       #define HWRM_RING_ALLOC_INPUT_ENABLES_RING_ARB_CFG      UINT32_C(0x2)
        /* This bit must be '1' for the Reserved3 field to be configured. */
-       #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED3         UINT32_C(0x4)
+       #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED3 UINT32_C(0x4)
        /*
         * This bit must be '1' for the stat_ctx_id_valid field to be
         * configured.
         */
        #define HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID UINT32_C(0x8)
        /* This bit must be '1' for the Reserved4 field to be configured. */
-       #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED4         UINT32_C(0x10)
+       #define HWRM_RING_ALLOC_INPUT_ENABLES_RESERVED4 UINT32_C(0x10)
        /* This bit must be '1' for the max_bw_valid field to be configured. */
        #define HWRM_RING_ALLOC_INPUT_ENABLES_MAX_BW_VALID      UINT32_C(0x20)
-       uint32_t enables;
-
-       /* Ring Type. */
-               /* Completion Ring (CR) */
-       #define HWRM_RING_ALLOC_INPUT_RING_TYPE_CMPL    (UINT32_C(0x0) << 0)
-               /* TX Ring (TR) */
-       #define HWRM_RING_ALLOC_INPUT_RING_TYPE_TX      (UINT32_C(0x1) << 0)
-               /* RX Ring (RR) */
-       #define HWRM_RING_ALLOC_INPUT_RING_TYPE_RX      (UINT32_C(0x2) << 0)
        uint8_t ring_type;
-
+       /* Ring Type. */
+       /* Completion Ring (CR) */
+       #define HWRM_RING_ALLOC_INPUT_RING_TYPE_CMPL    UINT32_C(0x0)
+       /* TX Ring (TR) */
+       #define HWRM_RING_ALLOC_INPUT_RING_TYPE_TX      UINT32_C(0x1)
+       /* RX Ring (RR) */
+       #define HWRM_RING_ALLOC_INPUT_RING_TYPE_RX      UINT32_C(0x2)
        uint8_t unused_0;
        uint16_t unused_1;
-
-       /* This value is a pointer to the page table for the Ring. */
        uint64_t page_tbl_addr;
-
-       /* First Byte Offset of the first entry in the first page. */
+       /* This value is a pointer to the page table for the Ring. */
        uint32_t fbo;
-
-       /*
-        * Actual page size in 2^page_size. The supported range is increments in
-        * powers of 2 from 16 bytes to 1GB. - 4 = 16 B Page size is 16 B. - 12
-        * = 4 KB Page size is 4 KB. - 13 = 8 KB Page size is 8 KB. - 16 = 64 KB
-        * Page size is 64 KB. - 22 = 2 MB Page size is 2 MB. - 23 = 4 MB Page
-        * size is 4 MB. - 31 = 1 GB Page size is 1 GB.
-        */
+       /* First Byte Offset of the first entry in the first page. */
        uint8_t page_size;
-
        /*
-        * This value indicates the depth of page table. For this version of the
-        * specification, value other than 0 or 1 shall be considered as an
-        * invalid value. When the page_tbl_depth = 0, then it is treated as a
-        * special case with the following. 1. FBO and page size fields are not
-        * valid. 2. page_tbl_addr is the physical address of the first element
-        * of the ring.
+        * Actual page size in 2^page_size. The supported range is
+        * increments in powers of 2 from 16 bytes to 1GB. - 4 = 16 B
+        * Page size is 16 B. - 12 = 4 KB Page size is 4 KB. - 13 = 8 KB
+        * Page size is 8 KB. - 16 = 64 KB Page size is 64 KB. - 21 = 2
+        * MB Page size is 2 MB. - 22 = 4 MB Page size is 4 MB. - 30 = 1
+        * GB Page size is 1 GB.
         */
        uint8_t page_tbl_depth;
-
-       uint8_t unused_2;
-       uint8_t unused_3;
-
        /*
-        * Number of 16B units in the ring. Minimum size for a ring is 16 16B
-        * entries.
+        * This value indicates the depth of page table. For this
+        * version of the specification, value other than 0 or 1 shall
+        * be considered as an invalid value. When the page_tbl_depth =
+        * 0, then it is treated as a special case with the following.
+        * 1. FBO and page size fields are not valid. 2. page_tbl_addr
+        * is the physical address of the first element of the ring.
         */
+       uint8_t unused_2;
+       uint8_t unused_3;
        uint32_t length;
-
        /*
-        * Logical ring number for the ring to be allocated. This value
-        * determines the position in the doorbell area where the update to the
-        * ring will be made. For completion rings, this value is also the MSI-X
-        * vector number for the function the completion ring is associated
-        * with.
+        * Number of 16B units in the ring. Minimum size for a ring is
+        * 16 16B entries.
         */
        uint16_t logical_id;
-
        /*
-        * This field is used only when ring_type is a TX ring. This value
-        * indicates what completion ring the TX ring is associated with.
+        * Logical ring number for the ring to be allocated. This value
+        * determines the position in the doorbell area where the update
+        * to the ring will be made. For completion rings, this value is
+        * also the MSI-X vector number for the function the completion
+        * ring is associated with.
         */
        uint16_t cmpl_ring_id;
-
        /*
-        * This field is used only when ring_type is a TX ring. This value
-        * indicates what CoS queue the TX ring is associated with.
+        * This field is used only when ring_type is a TX ring. This
+        * value indicates what completion ring the TX ring is
+        * associated with.
         */
        uint16_t queue_id;
-
+       /*
+        * This field is used only when ring_type is a TX ring. This
+        * value indicates what CoS queue the TX ring is associated
+        * with.
+        */
        uint8_t unused_4;
        uint8_t unused_5;
-
-       /* This field is reserved for the future use. It shall be set to 0. */
        uint32_t reserved1;
        /* This field is reserved for the future use. It shall be set to 0. */
-       uint16_t reserved2;
-
+       uint16_t ring_arb_cfg;
+       /*
+        * This field is used only when ring_type is a TX ring. This
+        * field is used to configure arbitration related parameters for
+        * a TX ring.
+        */
+       /* Arbitration policy used for the ring. */
+       #define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_MASK      \
+               UINT32_C(0xf)
+       #define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_SFT       0
+       /*
+        * Use strict priority for the TX ring. Priority
+        * value is specified in arb_policy_param
+        */
+       #define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_SP        \
+               (UINT32_C(0x1) << 0)
+       /*
+        * Use weighted fair queue arbitration for the
+        * TX ring. Weight is specified in
+        * arb_policy_param
+        */
+       #define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_WFQ       \
+               (UINT32_C(0x2) << 0)
+       #define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_LAST      \
+               RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_WFQ
+       /* Reserved field. */
+       #define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_RSVD_MASK    UINT32_C(0xf0)
+       #define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_RSVD_SFT     4
+       /*
+        * Arbitration policy specific parameter. # For strict priority
+        * arbitration policy, this field represents a priority value.
+        * If set to 0, then the priority is not specified and the HWRM
+        * is allowed to select any priority for this TX ring. # For
+        * weighted fair queue arbitration policy, this field represents
+        * a weight value. If set to 0, then the weight is not specified
+        * and the HWRM is allowed to select any weight for this TX
+        * ring.
+        */
+       #define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_PARAM_MASK  \
+               UINT32_C(0xff00)
+       #define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_PARAM_SFT   8
        uint8_t unused_6;
        uint8_t unused_7;
-       /* This field is reserved for the future use. It shall be set to 0. */
        uint32_t reserved3;
-
-       /*
-        * This field is used only when ring_type is a TX ring. This input
-        * indicates what statistics context this ring should be associated
-        * with.
-        */
-       uint32_t stat_ctx_id;
-
        /* This field is reserved for the future use. It shall be set to 0. */
-       uint32_t reserved4;
-
+       uint32_t stat_ctx_id;
        /*
-        * This field is used only when ring_type is a TX ring. Maximum BW
-        * allocated to this TX ring in Mbps. The HWRM will translate this value
-        * into byte counter and time interval used for this ring inside the
-        * device.
+        * This field is used only when ring_type is a TX ring. This
+        * input indicates what statistics context this ring should be
+        * associated with.
         */
+       uint32_t reserved4;
+       /* This field is reserved for the future use. It shall be set to 0. */
        uint32_t max_bw;
-
        /*
-        * This field is used only when ring_type is a Completion ring. This
-        * value indicates what interrupt mode should be used on this completion
-        * ring. Note: In the legacy interrupt mode, no more than 16 completion
-        * rings are allowed.
-        */
-               /* Legacy INTA */
-       #define HWRM_RING_ALLOC_INPUT_INT_MODE_LEGACY   (UINT32_C(0x0) << 0)
-               /* Reserved */
-       #define HWRM_RING_ALLOC_INPUT_INT_MODE_RSVD     (UINT32_C(0x1) << 0)
-               /* MSI-X */
-       #define HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX     (UINT32_C(0x2) << 0)
-               /* No Interrupt - Polled mode */
-       #define HWRM_RING_ALLOC_INPUT_INT_MODE_POLL     (UINT32_C(0x3) << 0)
+        * This field is used only when ring_type is a TX ring to
+        * specify maximum BW allocated to the TX ring. The HWRM will
+        * translate this value into byte counter and time interval used
+        * for this ring inside the device.
+        */
+       /* Bandwidth value */
+       #define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_MASK      \
+               UINT32_C(0xfffffff)
+       #define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_SFT       0
+       /* Reserved */
+       #define HWRM_RING_ALLOC_INPUT_MAX_BW_RSVD       UINT32_C(0x10000000)
+       /* bw_value_unit is 3 b */
+       #define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_MASK \
+               UINT32_C(0xe0000000)
+       #define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_SFT  29
+       /* Value is in Mbps */
+       #define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_MBPS \
+               (UINT32_C(0x0) << 29)
+       /* Value is in 1/100th of a percentage of total bandwidth. */
+       #define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_PERCENT1_100  \
+               (UINT32_C(0x1) << 29)
+       /* Invalid unit */
+       #define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_INVALID      \
+               (UINT32_C(0x7) << 29)
+       #define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_LAST \
+               RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_INVALID
        uint8_t int_mode;
-
+       /*
+        * This field is used only when ring_type is a Completion ring.
+        * This value indicates what interrupt mode should be used on
+        * this completion ring. Note: In the legacy interrupt mode, no
+        * more than 16 completion rings are allowed.
+        */
+       /* Legacy INTA */
+       #define HWRM_RING_ALLOC_INPUT_INT_MODE_LEGACY   UINT32_C(0x0)
+       /* Reserved */
+       #define HWRM_RING_ALLOC_INPUT_INT_MODE_RSVD     UINT32_C(0x1)
+       /* MSI-X */
+       #define HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX     UINT32_C(0x2)
+       /* No Interrupt - Polled mode */
+       #define HWRM_RING_ALLOC_INPUT_INT_MODE_POLL     UINT32_C(0x3)
        uint8_t unused_8[3];
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-
 struct hwrm_ring_alloc_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
-       /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
-        */
+       /* This field provides original sequence number of the command. */
        uint16_t resp_len;
-
-       /* Physical number of ring allocated. */
+       /*
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
+        */
        uint16_t ring_id;
-
-       /* Logical number of ring allocated. */
+       /*
+        * Physical number of ring allocated. This value shall be unique
+        * for a ring type.
+        */
        uint16_t logical_ring_id;
-
+       /* Logical number of ring allocated. */
        uint8_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
 /* hwrm_ring_free */
@@ -4957,188 +4860,163 @@ struct hwrm_ring_alloc_output {
  * Description: This command is used to free a ring and associated resources.
  */
 /* Input (24 bytes) */
-
 struct hwrm_ring_free_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
-       /* Ring Type. */
-               /* Completion Ring (CR) */
-       #define HWRM_RING_FREE_INPUT_RING_TYPE_CMPL     (UINT32_C(0x0) << 0)
-               /* TX Ring (TR) */
-       #define HWRM_RING_FREE_INPUT_RING_TYPE_TX       (UINT32_C(0x1) << 0)
-               /* RX Ring (RR) */
-       #define HWRM_RING_FREE_INPUT_RING_TYPE_RX       (UINT32_C(0x2) << 0)
+       /*
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
        uint8_t ring_type;
-
+       /* Ring Type. */
+       /* Completion Ring (CR) */
+       #define HWRM_RING_FREE_INPUT_RING_TYPE_CMPL     UINT32_C(0x0)
+       /* TX Ring (TR) */
+       #define HWRM_RING_FREE_INPUT_RING_TYPE_TX       UINT32_C(0x1)
+       /* RX Ring (RR) */
+       #define HWRM_RING_FREE_INPUT_RING_TYPE_RX       UINT32_C(0x2)
        uint8_t unused_0;
-
-       /* Physical number of ring allocated. */
        uint16_t ring_id;
-
+       /* Physical number of ring allocated. */
        uint32_t unused_1;
 } __attribute__((packed));
 
 /* Output (16 bytes) */
 struct hwrm_ring_free_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
        uint32_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
        uint8_t unused_3;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
 /* hwrm_ring_grp_alloc */
 /*
  * Description: This API allocates and does basic preparation for a ring group.
  */
-
 /* Input (24 bytes) */
 struct hwrm_ring_grp_alloc_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
-       /* This value identifies the CR associated with the ring group. */
-       uint16_t cr;
-
-       /* This value identifies the main RR associated with the ring group. */
-       uint16_t rr;
-
        /*
-        * This value identifies the aggregation RR associated with the ring
-        * group. If this value is 0xFF... (All Fs), then no Aggregation ring
-        * will be set.
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
         */
+       uint16_t cr;
+       /* This value identifies the CR associated with the ring group. */
+       uint16_t rr;
+       /* This value identifies the main RR associated with the ring group. */
        uint16_t ar;
-
        /*
-        * This value identifies the statistics context associated with the ring
-        * group.
+        * This value identifies the aggregation RR associated with the
+        * ring group. If this value is 0xFF... (All Fs), then no
+        * Aggregation ring will be set.
         */
        uint16_t sc;
+       /*
+        * This value identifies the statistics context associated with
+        * the ring group.
+        */
 } __attribute__((packed));
 
 /* Output (16 bytes) */
 struct hwrm_ring_grp_alloc_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
-       /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
-        */
+       /* This field provides original sequence number of the command. */
        uint16_t resp_len;
-
        /*
-        * This is the ring group ID value. Use this value to program the
-        * default ring group for the VNIC or as table entries in an RSS/COS
-        * context.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
        uint32_t ring_group_id;
-
+       /*
+        * This is the ring group ID value. Use this value to program
+        * the default ring group for the VNIC or as table entries in an
+        * RSS/COS context.
+        */
        uint8_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
 /* hwrm_ring_grp_free */
@@ -5150,930 +5028,1016 @@ struct hwrm_ring_grp_alloc_output {
  * a part of executing this command, the HWRM shall reset all associated ring
  * group resources.
  */
-
 /* Input (24 bytes) */
 struct hwrm_ring_grp_free_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
-       /* This is the ring group ID value. */
+       /*
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
        uint32_t ring_group_id;
-
+       /* This is the ring group ID value. */
        uint32_t unused_0;
 } __attribute__((packed));
 
 /* Output (16 bytes) */
 struct hwrm_ring_grp_free_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
        uint32_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
        uint8_t unused_3;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-/* hwrm_stat_ctx_alloc */
+/* hwrm_cfa_l2_filter_alloc */
 /*
- * Description: This command allocates and does basic preparation for a stat
- * context.
+ * A filter is used to identify traffic that contains a matching set of
+ * parameters like unicast or broadcast MAC address or a VLAN tag amongst
+ * other things which then allows the ASIC to direct the  incoming traffic
+ * to an appropriate VNIC or Rx ring.
  */
-
-/* Input (32 bytes) */
-struct hwrm_stat_ctx_alloc_input {
+/* Input (96 bytes) */
+struct hwrm_cfa_l2_filter_alloc_input {
+       uint16_t req_type;
        /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
-       uint16_t req_type;
-
+       uint16_t cmpl_ring;
+       /*
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
+        */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
+       uint16_t target_id;
+       /*
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
+        */
+       uint64_t resp_addr;
+       /*
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
+       uint32_t flags;
+       /*
+        * Enumeration denoting the RX, TX type of the resource. This
+        * enumeration is used for resources that are similar for both
+        * TX and RX paths of the chip.
+        */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH       UINT32_C(0x1)
+       /* tx path */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_TX    (UINT32_C(0x0) << 0)
+       /* rx path */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX    (UINT32_C(0x1) << 0)
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_LAST  \
+               CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX
+       /*
+        * Setting of this flag indicates the applicability to the
+        * loopback path.
+        */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK   UINT32_C(0x2)
+       /*
+        * Setting of this flag indicates drop action. If this flag is
+        * not set, then it should be considered accept action.
+        */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_DROP       UINT32_C(0x4)
+       /*
+        * If this flag is set, all t_l2_* fields are invalid and they
+        * should not be specified. If this flag is set, then l2_*
+        * fields refer to fields of outermost L2 header.
+        */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST  UINT32_C(0x8)
+       uint32_t enables;
+       /* This bit must be '1' for the l2_addr field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR  UINT32_C(0x1)
+       /* This bit must be '1' for the l2_addr_mask field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK     UINT32_C(0x2)
+       /* This bit must be '1' for the l2_ovlan field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN UINT32_C(0x4)
+       /*
+        * This bit must be '1' for the l2_ovlan_mask field to be
+        * configured.
+        */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK    UINT32_C(0x8)
+       /* This bit must be '1' for the l2_ivlan field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN UINT32_C(0x10)
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This bit must be '1' for the l2_ivlan_mask field to be
+        * configured.
         */
-       uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK    UINT32_C(0x20)
+       /* This bit must be '1' for the t_l2_addr field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR        UINT32_C(0x40)
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This bit must be '1' for the t_l2_addr_mask field to be
+        * configured.
         */
-       uint16_t target_id;
-
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR_MASK   UINT32_C(0x80)
+       /* This bit must be '1' for the t_l2_ovlan field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN       UINT32_C(0x100)
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * This bit must be '1' for the t_l2_ovlan_mask field to be
+        * configured.
         */
-       uint64_t resp_addr;
-
-       /* This is the address for statistic block. */
-       uint64_t stats_dma_addr;
-
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN_MASK  UINT32_C(0x200)
+       /* This bit must be '1' for the t_l2_ivlan field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN       UINT32_C(0x400)
        /*
-        * The statistic block update period in ms. e.g. 250ms, 500ms, 750ms,
-        * 1000ms.
+        * This bit must be '1' for the t_l2_ivlan_mask field to be
+        * configured.
         */
-       uint32_t update_period_ms;
-
-       uint32_t unused_0;
-} __attribute__((packed));
-
-/* Output (16 bytes) */
-struct hwrm_stat_ctx_alloc_output {
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN_MASK  UINT32_C(0x800)
+       /* This bit must be '1' for the src_type field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_TYPE UINT32_C(0x1000)
+       /* This bit must be '1' for the src_id field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_ID   UINT32_C(0x2000)
+       /* This bit must be '1' for the tunnel_type field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE      UINT32_C(0x4000)
+       /* This bit must be '1' for the dst_id field to be configured. */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID   UINT32_C(0x8000)
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * This bit must be '1' for the mirror_vnic_id field to be
+        * configured.
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
-       uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
-       uint16_t seq_id;
-
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID   UINT32_C(0x10000)
+       uint8_t l2_addr[6];
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This value sets the match value for the L2 MAC address.
+        * Destination MAC address for RX path. Source MAC address for
+        * TX path.
         */
-       uint16_t resp_len;
-
-       /* This is the statistics context ID value. */
-       uint32_t stat_ctx_id;
-
        uint8_t unused_0;
        uint8_t unused_1;
+       uint8_t l2_addr_mask[6];
+       /*
+        * This value sets the mask value for the L2 address. A value of
+        * 0 will mask the corresponding bit from compare.
+        */
+       uint16_t l2_ovlan;
+       /* This value sets VLAN ID value for outer VLAN. */
+       uint16_t l2_ovlan_mask;
+       /*
+        * This value sets the mask value for the ovlan id. A value of 0
+        * will mask the corresponding bit from compare.
+        */
+       uint16_t l2_ivlan;
+       /* This value sets VLAN ID value for inner VLAN. */
+       uint16_t l2_ivlan_mask;
+       /*
+        * This value sets the mask value for the ivlan id. A value of 0
+        * will mask the corresponding bit from compare.
+        */
        uint8_t unused_2;
-
+       uint8_t unused_3;
+       uint8_t t_l2_addr[6];
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This value sets the match value for the tunnel L2 MAC
+        * address. Destination MAC address for RX path. Source MAC
+        * address for TX path.
         */
-       uint8_t valid;
-} __attribute__((packed));
-
-/* hwrm_stat_ctx_clr_stats */
-/* Description: This command clears statistics of a context. */
-
-/* Input (24 bytes) */
-struct hwrm_stat_ctx_clr_stats_input {
+       uint8_t unused_4;
+       uint8_t unused_5;
+       uint8_t t_l2_addr_mask[6];
        /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
+        * This value sets the mask value for the tunnel L2 address. A
+        * value of 0 will mask the corresponding bit from compare.
         */
-       uint16_t req_type;
-
+       uint16_t t_l2_ovlan;
+       /* This value sets VLAN ID value for tunnel outer VLAN. */
+       uint16_t t_l2_ovlan_mask;
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value sets the mask value for the tunnel ovlan id. A
+        * value of 0 will mask the corresponding bit from compare.
         */
-       uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
+       uint16_t t_l2_ivlan;
+       /* This value sets VLAN ID value for tunnel inner VLAN. */
+       uint16_t t_l2_ivlan_mask;
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value sets the mask value for the tunnel ivlan id. A
+        * value of 0 will mask the corresponding bit from compare.
         */
-       uint16_t target_id;
-
+       uint8_t src_type;
+       /* This value identifies the type of source of the packet. */
+       /* Network port */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_NPORT   UINT32_C(0x0)
+       /* Physical function */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_PF      UINT32_C(0x1)
+       /* Virtual function */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VF      UINT32_C(0x2)
+       /* Virtual NIC of a function */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VNIC    UINT32_C(0x3)
+       /* Embedded processor for CFA management */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_KONG    UINT32_C(0x4)
+       /* Embedded processor for OOB management */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_APE     UINT32_C(0x5)
+       /* Embedded processor for RoCE */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_BONO    UINT32_C(0x6)
+       /* Embedded processor for network proxy functions */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_TANG    UINT32_C(0x7)
+       uint8_t unused_6;
+       uint32_t src_id;
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * This value is the id of the source. For a network port, it
+        * represents port_id. For a physical function, it represents
+        * fid. For a virtual function, it represents vf_id. For a vnic,
+        * it represents vnic_id. For embedded processors, this id is
+        * not valid. Notes: 1. The function ID is implied if it src_id
+        * is not provided for a src_type that is either
+        */
+       uint8_t tunnel_type;
+       /* Tunnel Type. */
+       /* Non-tunnel */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL    UINT32_C(0x0)
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN        UINT32_C(0x1)
+       /*
+        * Network Virtualization Generic Routing
+        * Encapsulation (NVGRE)
+        */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE        UINT32_C(0x2)
+       /*
+        * Generic Routing Encapsulation (GRE) inside
+        * Ethernet payload
+        */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE        UINT32_C(0x3)
+       /* IP in IP */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP UINT32_C(0x4)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE       UINT32_C(0x5)
+       /* Multi-Protocol Lable Switching (MPLS) */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS UINT32_C(0x6)
+       /* Stateless Transport Tunnel (STT) */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT  UINT32_C(0x7)
+       /*
+        * Generic Routing Encapsulation (GRE) inside IP
+        * datagram payload
+        */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE        UINT32_C(0x8)
+       /* Any tunneled traffic */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL    UINT32_C(0xff)
+       uint8_t unused_7;
+       uint16_t dst_id;
+       /*
+        * If set, this value shall represent the Logical VNIC ID of the
+        * destination VNIC for the RX path and network port id of the
+        * destination port for the TX path.
+        */
+       uint16_t mirror_vnic_id;
+       /* Logical VNIC ID of the VNIC where traffic is mirrored. */
+       uint8_t pri_hint;
+       /*
+        * This hint is provided to help in placing the filter in the
+        * filter table.
+        */
+       /* No preference */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER       UINT32_C(0x0)
+       /* Above the given filter */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE_FILTER    UINT32_C(0x1)
+       /* Below the given filter */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_BELOW_FILTER    UINT32_C(0x2)
+       /* As high as possible */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MAX     UINT32_C(0x3)
+       /* As low as possible */
+       #define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MIN     UINT32_C(0x4)
+       uint8_t unused_8;
+       uint32_t unused_9;
+       uint64_t l2_filter_id_hint;
+       /*
+        * This is the ID of the filter that goes along with the
+        * pri_hint. This field is valid only for the following values.
+        * 1 - Above the given filter 2 - Below the given filter
         */
-       uint64_t resp_addr;
-
-       /* ID of the statistics context that is being queried. */
-       uint32_t stat_ctx_id;
-
-       uint32_t unused_0;
 } __attribute__((packed));
 
-/* Output (16 bytes) */
-struct hwrm_stat_ctx_clr_stats_output {
+/* Output (24 bytes) */
+struct hwrm_cfa_l2_filter_alloc_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
+       /*
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
+        */
+       uint64_t l2_filter_id;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This value identifies a set of CFA data structures used for
+        * an L2 context.
         */
-       uint16_t resp_len;
-
-       uint32_t unused_0;
+       uint32_t flow_id;
+       /*
+        * This is the ID of the flow associated with this filter. This
+        * value shall be used to match and associate the flow
+        * identifier returned in completion records. A value of
+        * 0xFFFFFFFF shall indicate no flow id.
+        */
+       uint8_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
-       uint8_t unused_3;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-/* hwrm_stat_ctx_free */
-/* Description: This command is used to free a stat context. */
+/* hwrm_cfa_l2_filter_free */
+/*
+ * Description: Free a L2 filter. The HWRM shall free all associated filter
+ * resources with the L2 filter.
+ */
 /* Input (24 bytes) */
-
-struct hwrm_stat_ctx_free_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
+struct hwrm_cfa_l2_filter_free_input {
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
-       /* ID of the statistics context that is being queried. */
-       uint32_t stat_ctx_id;
-
-       uint32_t unused_0;
+       /*
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
+       uint64_t l2_filter_id;
+       /*
+        * This value identifies a set of CFA data structures used for
+        * an L2 context.
+        */
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-
-struct hwrm_stat_ctx_free_output {
+struct hwrm_cfa_l2_filter_free_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
-       /* This is the statistics context ID value. */
-       uint32_t stat_ctx_id;
-
-       uint8_t unused_0;
+       uint32_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
-
-       /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
-        */
+       uint8_t unused_3;
        uint8_t valid;
-} __attribute__((packed));
-
-/* hwrm_vnic_alloc */
-/*
- * Description: This VNIC is a resource in the RX side of the chip that is used
- * to represent a virtual host "interface". # At the time of VNIC allocation or
- * configuration, the function can specify whether it wants the requested VNIC
- * to be the default VNIC for the function or not. # If a function requests
- * allocation of a VNIC for the first time and a VNIC is successfully allocated
- * by the HWRM, then the HWRM shall make the allocated VNIC as the default VNIC
- * for that function. # The default VNIC shall be used for the default action
- * for a partition or function. # For each VNIC allocated on a function, a
- * mapping on the RX side to map the allocated VNIC to source virtual interface
- * shall be performed by the HWRM. This should be hidden to the function driver
- * requesting the VNIC allocation. This enables broadcast/multicast replication
- * with source knockout. # If multicast replication with source knockout is
- * enabled, then the internal VNIC to SVIF mapping data structures shall be
- * programmed at the time of VNIC allocation.
- */
-
-/* Input (24 bytes) */
-struct hwrm_vnic_alloc_input {
        /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint16_t req_type;
+} __attribute__((packed));
 
+/* hwrm_cfa_l2_filter_cfg */
+/* Description: Change the configuration of an existing L2 filter */
+/* Input (40 bytes) */
+struct hwrm_cfa_l2_filter_cfg_input {
+       uint16_t req_type;
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
        /*
-        * When this bit is '1', this VNIC is requested to be the default VNIC
-        * for this function.
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
         */
-       #define HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT                UINT32_C(0x1)
        uint32_t flags;
-
-       uint32_t unused_0;
+       /*
+        * Enumeration denoting the RX, TX type of the resource. This
+        * enumeration is used for resources that are similar for both
+        * TX and RX paths of the chip.
+        */
+       #define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH UINT32_C(0x1)
+       /* tx path */
+       #define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_TX      (UINT32_C(0x0) << 0)
+       /* rx path */
+       #define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_RX      (UINT32_C(0x1) << 0)
+       #define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_LAST    \
+               CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_RX
+       /*
+        * Setting of this flag indicates drop action. If this flag is
+        * not set, then it should be considered accept action.
+        */
+       #define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_DROP UINT32_C(0x2)
+       uint32_t enables;
+       /* This bit must be '1' for the dst_id field to be configured. */
+       #define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_DST_ID     UINT32_C(0x1)
+       /*
+        * This bit must be '1' for the new_mirror_vnic_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID   UINT32_C(0x2)
+       uint64_t l2_filter_id;
+       /*
+        * This value identifies a set of CFA data structures used for
+        * an L2 context.
+        */
+       uint32_t dst_id;
+       /*
+        * If set, this value shall represent the Logical VNIC ID of the
+        * destination VNIC for the RX path and network port id of the
+        * destination port for the TX path.
+        */
+       uint32_t new_mirror_vnic_id;
+       /* New Logical VNIC ID of the VNIC where traffic is mirrored. */
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-struct hwrm_vnic_alloc_output {
+struct hwrm_cfa_l2_filter_cfg_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
-       /* Logical vnic ID */
-       uint32_t vnic_id;
-
-       uint8_t unused_0;
+       uint32_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
-
+       uint8_t unused_3;
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-/* hwrm_vnic_cfg */
-/* Description: Configure the RX VNIC structure. */
-
-/* Input (40 bytes) */
-struct hwrm_vnic_cfg_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
+/* hwrm_cfa_l2_set_rx_mask */
+/* Description: This command will set rx mask of the function. */
+/* Input (56 bytes) */
+struct hwrm_cfa_l2_set_rx_mask_input {
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
        /*
-        * When this bit is '1', the VNIC is requested to be the default VNIC
-        * for the function.
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
         */
-       #define HWRM_VNIC_CFG_INPUT_FLAGS_DEFAULT               UINT32_C(0x1)
+       uint32_t vnic_id;
+       /* VNIC ID */
+       uint32_t mask;
+       /* Reserved for future use. */
+       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_RESERVED     UINT32_C(0x1)
        /*
-        * When this bit is '1', the VNIC is being configured to strip VLAN in
-        * the RX path. If set to '0', then VLAN stripping is disabled on this
-        * VNIC.
+        * When this bit is '1', the function is requested to accept
+        * multi-cast packets specified by the multicast addr table.
         */
-       #define HWRM_VNIC_CFG_INPUT_FLAGS_VLAN_STRIP_MODE       UINT32_C(0x2)
+       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST        UINT32_C(0x2)
        /*
-        * When this bit is '1', the VNIC is being configured to buffer receive
-        * packets in the hardware until the host posts new receive buffers. If
-        * set to '0', then bd_stall is being configured to be disabled on this
-        * VNIC.
+        * When this bit is '1', the function is requested to accept all
+        * multi-cast packets.
         */
-       #define HWRM_VNIC_CFG_INPUT_FLAGS_BD_STALL_MODE         UINT32_C(0x4)
+       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST    UINT32_C(0x4)
        /*
-        * When this bit is '1', the VNIC is being configured to receive both
-        * RoCE and non-RoCE traffic. If set to '0', then this VNIC is not
-        * configured to be operating in dual VNIC mode.
+        * When this bit is '1', the function is requested to accept
+        * broadcast packets.
         */
-       #define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_DUAL_VNIC_MODE   UINT32_C(0x8)
+       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST        UINT32_C(0x8)
        /*
-        * When this flag is set to '1', the VNIC is requested to be configured
-        * to receive only RoCE traffic. If this flag is set to '0', then this
-        * flag shall be ignored by the HWRM. If roce_dual_vnic_mode flag is set
-        * to '1', then the HWRM client shall not set this flag to '1'.
+        * When this bit is '1', the function is requested to be put in
+        * the promiscuous mode. The HWRM should accept any function to
+        * set up promiscuous mode. The HWRM shall follow the semantics
+        * below for the promiscuous mode support. # When partitioning
+        * is not enabled on a port (i.e. single PF on the port), then
+        * the PF shall be allowed to be in the promiscuous mode. When
+        * the PF is in the promiscuous mode, then it shall receive all
+        * host bound traffic on that port. # When partitioning is
+        * enabled on a port (i.e. multiple PFs per port) and a PF on
+        * that port is in the promiscuous mode, then the PF receives
+        * all traffic within that partition as identified by a unique
+        * identifier for the PF (e.g. S-Tag). If a unique outer VLAN
+        * for the PF is specified, then the setting of promiscuous mode
+        * on that PF shall result in the PF receiving all host bound
+        * traffic with matching outer VLAN. # A VF shall can be set in
+        * the promiscuous mode. In the promiscuous mode, the VF does
+        * not receive any traffic unless a unique outer VLAN for the VF
+        * is specified. If a unique outer VLAN for the VF is specified,
+        * then the setting of promiscuous mode on that VF shall result
+        * in the VF receiving all host bound traffic with the matching
+        * outer VLAN. # The HWRM shall allow the setting of promiscuous
+        * mode on a function independently from the promiscuous mode
+        * settings on other functions.
         */
-       #define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_ONLY_VNIC_MODE   UINT32_C(0x10)
-       uint32_t flags;
-
-       /* This bit must be '1' for the dflt_ring_grp field to be configured. */
-       #define HWRM_VNIC_CFG_INPUT_ENABLES_DFLT_RING_GRP       UINT32_C(0x1)
-       /* This bit must be '1' for the rss_rule field to be configured. */
-       #define HWRM_VNIC_CFG_INPUT_ENABLES_RSS_RULE            UINT32_C(0x2)
-       /* This bit must be '1' for the cos_rule field to be configured. */
-       #define HWRM_VNIC_CFG_INPUT_ENABLES_COS_RULE            UINT32_C(0x4)
-       /* This bit must be '1' for the lb_rule field to be configured. */
-       #define HWRM_VNIC_CFG_INPUT_ENABLES_LB_RULE             UINT32_C(0x8)
-       /* This bit must be '1' for the mru field to be configured. */
-       #define HWRM_VNIC_CFG_INPUT_ENABLES_MRU                 UINT32_C(0x10)
-       uint32_t enables;
-
-       /* Logical vnic ID */
-       uint16_t vnic_id;
-
+       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS  UINT32_C(0x10)
        /*
-        * Default Completion ring for the VNIC. This ring will be chosen if
-        * packet does not match any RSS rules and if there is no COS rule.
+        * If this flag is set, the corresponding RX filters shall be
+        * set up to cover multicast/broadcast filters for the outermost
+        * Layer 2 destination MAC address field.
         */
-       uint16_t dflt_ring_grp;
-
+       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_OUTERMOST    UINT32_C(0x20)
        /*
-        * RSS ID for RSS rule/table structure. 0xFF... (All Fs) if there is no
-        * RSS rule.
+        * If this flag is set, the corresponding RX filters shall be
+        * set up to cover multicast/broadcast filters for the VLAN-
+        * tagged packets that match the TPID and VID fields of VLAN
+        * tags in the VLAN tag table specified in this command.
         */
-       uint16_t rss_rule;
-
+       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY     UINT32_C(0x40)
        /*
-        * RSS ID for COS rule/table structure. 0xFF... (All Fs) if there is no
-        * COS rule.
+        * If this flag is set, the corresponding RX filters shall be
+        * set up to cover multicast/broadcast filters for non-VLAN
+        * tagged packets and VLAN-tagged packets that match the TPID
+        * and VID fields of VLAN tags in the VLAN tag table specified
+        * in this command.
         */
-       uint16_t cos_rule;
-
+       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN UINT32_C(0x80)
        /*
-        * RSS ID for load balancing rule/table structure. 0xFF... (All Fs) if
-        * there is no LB rule.
+        * If this flag is set, the corresponding RX filters shall be
+        * set up to cover multicast/broadcast filters for non-VLAN
+        * tagged packets and VLAN-tagged packets matching any VLAN tag.
+        * If this flag is set, then the HWRM shall ignore VLAN tags
+        * specified in vlan_tag_tbl. If none of vlanonly, vlan_nonvlan,
+        * and anyvlan_nonvlan flags is set, then the HWRM shall ignore
+        * VLAN tags specified in vlan_tag_tbl. The HWRM client shall
+        * set at most one flag out of vlanonly, vlan_nonvlan, and
+        * anyvlan_nonvlan.
         */
-       uint16_t lb_rule;
-
+       #define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN      UINT32_C(0x100)
+       uint64_t mc_tbl_addr;
+       /* This is the address for mcast address tbl. */
+       uint32_t num_mc_entries;
        /*
-        * The maximum receive unit of the vnic. Each vnic is associated with a
-        * function. The vnic mru value overwrites the mru setting of the
-        * associated function. The HWRM shall make sure that vnic mru does not
-        * exceed the mru of the port the function is associated with.
+        * This value indicates how many entries in mc_tbl are valid.
+        * Each entry is 6 bytes.
         */
-       uint16_t mru;
-
        uint32_t unused_0;
+       uint64_t vlan_tag_tbl_addr;
+       /*
+        * This is the address for VLAN tag table. Each VLAN entry in
+        * the table is 4 bytes of a VLAN tag including TPID, PCP, DEI,
+        * and VID fields in network byte order.
+        */
+       uint32_t num_vlan_tags;
+       /*
+        * This value indicates how many entries in vlan_tag_tbl are
+        * valid. Each entry is 4 bytes.
+        */
+       uint32_t unused_1;
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-struct hwrm_vnic_cfg_output {
+struct hwrm_cfa_l2_set_rx_mask_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
        uint32_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
        uint8_t unused_3;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-/* hwrm_vnic_free */
+/* hwrm_stat_ctx_alloc */
 /*
- * Description: Free a VNIC resource. Idle any resources associated with the
- * VNIC as well as the VNIC. Reset and release all resources associated with the
- * VNIC.
+ * Description: This command allocates and does basic preparation for a stat
+ * context.
  */
-
-/* Input (24 bytes) */
-struct hwrm_vnic_free_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
+/* Input (32 bytes) */
+struct hwrm_stat_ctx_alloc_input {
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
-       /* Logical vnic ID */
-       uint32_t vnic_id;
-
+       /*
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
+       uint64_t stats_dma_addr;
+       /* This is the address for statistic block. */
+       uint32_t update_period_ms;
+       /*
+        * The statistic block update period in ms. e.g. 250ms, 500ms,
+        * 750ms, 1000ms. If update_period_ms is 0, then the stats
+        * update shall be never done and the DMA address shall not be
+        * used. In this case, the stat block can only be read by
+        * hwrm_stat_ctx_query command.
+        */
        uint32_t unused_0;
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-struct hwrm_vnic_free_output {
+struct hwrm_stat_ctx_alloc_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
-       uint32_t unused_0;
+       uint32_t stat_ctx_id;
+       /* This is the statistics context ID value. */
+       uint8_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
-       uint8_t unused_3;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-/* hwrm_vnic_rss_cfg */
-/* Description: This function is used to enable RSS configuration. */
-
-/* Input (48 bytes) */
-struct hwrm_vnic_rss_cfg_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
+/* hwrm_stat_ctx_free */
+/* Description: This command is used to free a stat context. */
+/* Input (24 bytes) */
+struct hwrm_stat_ctx_free_input {
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
-       /*
-        * When this bit is '1', the RSS hash shall be computed over source and
-        * destination IPv4 addresses of IPv4 packets.
-        */
-       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4          UINT32_C(0x1)
-       /*
-        * When this bit is '1', the RSS hash shall be computed over
-        * source/destination IPv4 addresses and source/destination ports of
-        * TCP/IPv4 packets.
-        */
-       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4      UINT32_C(0x2)
-       /*
-        * When this bit is '1', the RSS hash shall be computed over
-        * source/destination IPv4 addresses and source/destination ports of
-        * UDP/IPv4 packets.
-        */
-       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV4      UINT32_C(0x4)
-       /*
-        * When this bit is '1', the RSS hash shall be computed over source and
-        * destination IPv4 addresses of IPv6 packets.
-        */
-       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6          UINT32_C(0x8)
        /*
-        * When this bit is '1', the RSS hash shall be computed over
-        * source/destination IPv6 addresses and source/destination ports of
-        * TCP/IPv6 packets.
-        */
-       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV6      UINT32_C(0x10)
-       /*
-        * When this bit is '1', the RSS hash shall be computed over
-        * source/destination IPv6 addresses and source/destination ports of
-        * UDP/IPv6 packets.
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
         */
-       #define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6      UINT32_C(0x20)
-       uint32_t hash_type;
-
+       uint32_t stat_ctx_id;
+       /* ID of the statistics context that is being queried. */
        uint32_t unused_0;
-
-       /* This is the address for rss ring group table */
-       uint64_t ring_grp_tbl_addr;
-
-       /* This is the address for rss hash key table */
-       uint64_t hash_key_tbl_addr;
-
-       /* Index to the rss indirection table. */
-       uint16_t rss_ctx_idx;
-
-       uint16_t unused_1[3];
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-struct hwrm_vnic_rss_cfg_output {
+struct hwrm_stat_ctx_free_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
-       uint32_t unused_0;
+       uint32_t stat_ctx_id;
+       /* This is the statistics context ID value. */
+       uint8_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
-       uint8_t unused_3;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-/* Input (16 bytes) */
-struct hwrm_vnic_rss_cos_lb_ctx_alloc_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
+/* hwrm_stat_ctx_clr_stats */
+/* Description: This command clears statistics of a context. */
+/* Input (24 bytes) */
+struct hwrm_stat_ctx_clr_stats_input {
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
+       /*
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
+       uint32_t stat_ctx_id;
+       /* ID of the statistics context that is being queried. */
+       uint32_t unused_0;
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-
-struct hwrm_vnic_rss_cos_lb_ctx_alloc_output {
+struct hwrm_stat_ctx_clr_stats_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
-       /* rss_cos_lb_ctx_id is 16 b */
-       uint16_t rss_cos_lb_ctx_id;
-
-       uint8_t unused_0;
+       uint32_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
        uint8_t unused_3;
-       uint8_t unused_4;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-/* hwrm_vnic_rss_cos_lb_ctx_free */
-/* Description: This function can be used to free COS/Load Balance context. */
-/* Input (24 bytes) */
-
-struct hwrm_vnic_rss_cos_lb_ctx_free_input {
-       /*
-        * This value indicates what type of request this is. The format for the
-        * rest of the command is determined by this field.
-        */
+/* hwrm_exec_fwd_resp */
+/*
+ * Description: This command is used to send an encapsulated request to the
+ * HWRM. This command instructs the HWRM to execute the request and forward the
+ * response of the encapsulated request to the location specified in the
+ * original request that is encapsulated. The target id of this command shall be
+ * set to 0xFFFF (HWRM). The response location in this command shall be used to
+ * acknowledge the receipt of the encapsulated request and forwarding of the
+ * response.
+ */
+/* Input (128 bytes) */
+struct hwrm_exec_fwd_resp_input {
        uint16_t req_type;
-
        /*
-        * This value indicates the what completion ring the request will be
-        * optionally completed on. If the value is -1, then no CR completion
-        * will be generated. Any other value must be a valid CR ring_id value
-        * for this function.
+        * This value indicates what type of request this is. The format
+        * for the rest of the command is determined by this field.
         */
        uint16_t cmpl_ring;
-
-       /* This value indicates the command sequence number. */
-       uint16_t seq_id;
-
        /*
-        * Target ID of this command. 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF - HWRM
+        * This value indicates the what completion ring the request
+        * will be optionally completed on. If the value is -1, then no
+        * CR completion will be generated. Any other value must be a
+        * valid CR ring_id value for this function.
         */
+       uint16_t seq_id;
+       /* This value indicates the command sequence number. */
        uint16_t target_id;
-
        /*
-        * This is the host address where the response will be written when the
-        * request is complete. This area must be 16B aligned and must be
-        * cleared to zero before the request is made.
+        * Target ID of this command. 0x0 - 0xFFF8 - Used for function
+        * ids 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF
+        * - HWRM
         */
        uint64_t resp_addr;
-
-       /* rss_cos_lb_ctx_id is 16 b */
-       uint16_t rss_cos_lb_ctx_id;
-
+       /*
+        * This is the host address where the response will be written
+        * when the request is complete. This area must be 16B aligned
+        * and must be cleared to zero before the request is made.
+        */
+       uint32_t encap_request[26];
+       /*
+        * This is an encapsulated request. This request should be
+        * executed by the HWRM and the response should be provided in
+        * the response buffer inside the encapsulated request.
+        */
+       uint16_t encap_resp_target_id;
+       /*
+        * This value indicates the target id of the response to the
+        * encapsulated request. 0x0 - 0xFFF8 - Used for function ids
+        * 0xFFF8 - 0xFFFE - Reserved for internal processors 0xFFFF -
+        * HWRM
+        */
        uint16_t unused_0[3];
 } __attribute__((packed));
 
 /* Output (16 bytes) */
-struct hwrm_vnic_rss_cos_lb_ctx_free_output {
+struct hwrm_exec_fwd_resp_output {
+       uint16_t error_code;
        /*
-        * Pass/Fail or error type Note: receiver to verify the in parameters,
-        * and fail the call with an error when appropriate
+        * Pass/Fail or error type Note: receiver to verify the in
+        * parameters, and fail the call with an error when appropriate
         */
-       uint16_t error_code;
-
-       /* This field returns the type of original request. */
        uint16_t req_type;
-
-       /* This field provides original sequence number of the command. */
+       /* This field returns the type of original request. */
        uint16_t seq_id;
-
+       /* This field provides original sequence number of the command. */
+       uint16_t resp_len;
        /*
-        * This field is the length of the response in bytes. The last byte of
-        * the response is a valid flag that will read as '1' when the command
-        * has been completely written to memory.
+        * This field is the length of the response in bytes. The last
+        * byte of the response is a valid flag that will read as '1'
+        * when the command has been completely written to memory.
         */
-       uint16_t resp_len;
-
        uint32_t unused_0;
        uint8_t unused_1;
        uint8_t unused_2;
        uint8_t unused_3;
-
+       uint8_t valid;
        /*
-        * This field is used in Output records to indicate that the output is
-        * completely written to RAM. This field should be read as '1' to
-        * indicate that the output has been completely written. When writing a
-        * command completion or response to an internal processor, the order of
-        * writes has to be such that this field is written last.
+        * This field is used in Output records to indicate that the
+        * output is completely written to RAM. This field should be
+        * read as '1' to indicate that the output has been completely
+        * written. When writing a command completion or response to an
+        * internal processor, the order of writes has to be such that
+        * this field is written last.
         */
-       uint8_t valid;
 } __attribute__((packed));
 
-
 #endif