net/ixgbe: fix mask bits register set error for FDIR
[dpdk.git] / drivers / net / bnxt / hsi_struct_def_dpdk.h
index df84f87..fd6d880 100644 (file)
@@ -20728,12 +20728,12 @@ struct hwrm_cfa_vlan_antispoof_qcfg_output {
 } __attribute__((packed));
 
 /********************************
- * hwrm_cfa_ntuple_filter_alloc *
+ * hwrm_cfa_tunnel_filter_alloc *
  ********************************/
 
 
-/* hwrm_cfa_ntuple_filter_alloc_input (size:1024b/128B) */
-struct hwrm_cfa_ntuple_filter_alloc_input {
+/* hwrm_cfa_tunnel_filter_alloc_input (size:704b/88B) */
+struct hwrm_cfa_tunnel_filter_alloc_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -20763,314 +20763,209 @@ struct hwrm_cfa_ntuple_filter_alloc_input {
        uint64_t        resp_addr;
        uint32_t        flags;
        /* Setting of this flag indicates the applicability to the loopback path. */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK \
                UINT32_C(0x1)
-       /*
-        * Setting of this flag indicates drop action. If this flag is not set,
-        * then it should be considered accept action.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DROP \
-               UINT32_C(0x2)
-       /*
-        * Setting of this flag indicates that a meter is expected to be attached
-        * to this flow. This hint can be used when choosing the action record
-        * format required for the flow.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_METER \
-               UINT32_C(0x4)
        uint32_t        enables;
        /*
         * This bit must be '1' for the l2_filter_id field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID \
                UINT32_C(0x1)
        /*
-        * This bit must be '1' for the ethertype field to be
+        * This bit must be '1' for the l2_addr field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR \
                UINT32_C(0x2)
        /*
-        * This bit must be '1' for the tunnel_type field to be
+        * This bit must be '1' for the l2_ivlan field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN \
                UINT32_C(0x4)
        /*
-        * This bit must be '1' for the src_macaddr field to be
+        * This bit must be '1' for the l3_addr field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L3_ADDR \
                UINT32_C(0x8)
        /*
-        * This bit must be '1' for the ipaddr_type field to be
+        * This bit must be '1' for the l3_addr_type field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_IPADDR_TYPE \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L3_ADDR_TYPE \
                UINT32_C(0x10)
        /*
-        * This bit must be '1' for the src_ipaddr field to be
+        * This bit must be '1' for the t_l3_addr_type field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_T_L3_ADDR_TYPE \
                UINT32_C(0x20)
        /*
-        * This bit must be '1' for the src_ipaddr_mask field to be
+        * This bit must be '1' for the t_l3_addr field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR_MASK \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_T_L3_ADDR \
                UINT32_C(0x40)
        /*
-        * This bit must be '1' for the dst_ipaddr field to be
+        * This bit must be '1' for the tunnel_type field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
                UINT32_C(0x80)
        /*
-        * This bit must be '1' for the dst_ipaddr_mask field to be
+        * This bit must be '1' for the vni field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR_MASK \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_VNI \
                UINT32_C(0x100)
        /*
-        * This bit must be '1' for the ip_protocol field to be
+        * This bit must be '1' for the dst_vnic_id field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_IP_PROTOCOL \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_DST_VNIC_ID \
                UINT32_C(0x200)
-       /*
-        * This bit must be '1' for the src_port field to be
-        * configured.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT \
-               UINT32_C(0x400)
-       /*
-        * This bit must be '1' for the src_port_mask field to be
-        * configured.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT_MASK \
-               UINT32_C(0x800)
-       /*
-        * This bit must be '1' for the dst_port field to be
-        * configured.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_PORT \
-               UINT32_C(0x1000)
-       /*
-        * This bit must be '1' for the dst_port_mask field to be
-        * configured.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_PORT_MASK \
-               UINT32_C(0x2000)
-       /*
-        * This bit must be '1' for the pri_hint field to be
-        * configured.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_PRI_HINT \
-               UINT32_C(0x4000)
-       /*
-        * This bit must be '1' for the ntuple_filter_id field to be
-        * configured.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_NTUPLE_FILTER_ID \
-               UINT32_C(0x8000)
-       /*
-        * This bit must be '1' for the dst_id field to be
-        * configured.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_ID \
-               UINT32_C(0x10000)
        /*
         * This bit must be '1' for the mirror_vnic_id field to be
         * configured.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
-               UINT32_C(0x20000)
-       /*
-        * This bit must be '1' for the dst_macaddr field to be
-        * configured.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR \
-               UINT32_C(0x40000)
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
+               UINT32_C(0x400)
        /*
         * This value identifies a set of CFA data structures used for an L2
         * context.
         */
        uint64_t        l2_filter_id;
        /*
-        * This value indicates the source MAC address in
-        * the Ethernet header.
+        * This value sets the match value for the inner L2
+        * MAC address.
+        * Destination MAC address for RX path.
+        * Source MAC address for TX path.
         */
-       uint8_t src_macaddr[6];
-       /* This value indicates the ethertype in the Ethernet header. */
-       uint16_t        ethertype;
+       uint8_t l2_addr[6];
        /*
-        * This value indicates the type of IP address.
-        * 4 - IPv4
-        * 6 - IPv6
-        * All others are invalid.
+        * This value sets VLAN ID value for inner VLAN.
+        * Only 12-bits of VLAN ID are used in setting the filter.
         */
-       uint8_t ip_addr_type;
-       /* invalid */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN \
-               UINT32_C(0x0)
-       /* IPv4 */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4 \
-               UINT32_C(0x4)
-       /* IPv6 */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6 \
-               UINT32_C(0x6)
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_LAST \
-               HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
+       uint16_t        l2_ivlan;
        /*
-        * The value of protocol filed in IP header.
-        * Applies to UDP and TCP traffic.
-        * 6 - TCP
-        * 17 - UDP
+        * The value of inner destination IP address to be used in filtering.
+        * For IPv4, first four bytes represent the IP address.
         */
-       uint8_t ip_protocol;
-       /* invalid */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN \
-               UINT32_C(0x0)
-       /* TCP */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_TCP \
-               UINT32_C(0x6)
-       /* UDP */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP \
-               UINT32_C(0x11)
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_LAST \
-               HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP
+       uint32_t        l3_addr[4];
        /*
-        * 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.
+        * The value of tunnel destination IP address to be used in filtering.
+        * For IPv4, first four bytes represent the IP address.
         */
-       uint16_t        dst_id;
+       uint32_t        t_l3_addr[4];
        /*
-        * Logical VNIC ID of the VNIC where traffic is
-        * mirrored.
+        * This value indicates the type of inner IP address.
+        * 4 - IPv4
+        * 6 - IPv6
+        * All others are invalid.
         */
-       uint16_t        mirror_vnic_id;
+       uint8_t l3_addr_type;
        /*
-        * This value indicates the tunnel type for this filter.
-        * If this field is not specified, then the filter shall
-        * apply to both non-tunneled and tunneled packets.
-        * If this field conflicts with the tunnel_type specified
-        * in the l2_filter_id, then the HWRM shall return an
-        * error for this command.
+        * This value indicates the type of tunnel IP address.
+        * 4 - IPv4
+        * 6 - IPv6
+        * All others are invalid.
         */
+       uint8_t t_l3_addr_type;
+       /* Tunnel Type. */
        uint8_t tunnel_type;
        /* Non-tunnel */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
                UINT32_C(0x0)
        /* Virtual eXtensible Local Area Network (VXLAN) */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
                UINT32_C(0x1)
        /* Network Virtualization Generic Routing Encapsulation (NVGRE) */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
                UINT32_C(0x2)
        /* Generic Routing Encapsulation (GRE) inside Ethernet payload */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
                UINT32_C(0x3)
        /* IP in IP */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
                UINT32_C(0x4)
        /* Generic Network Virtualization Encapsulation (Geneve) */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
                UINT32_C(0x5)
        /* Multi-Protocol Lable Switching (MPLS) */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
                UINT32_C(0x6)
        /* Stateless Transport Tunnel (STT) */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \
                UINT32_C(0x7)
        /* Generic Routing Encapsulation (GRE) inside IP datagram payload */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
                UINT32_C(0x8)
        /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
                UINT32_C(0x9)
        /* Any tunneled traffic */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
                UINT32_C(0xff)
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST \
-               HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
-       /*
-        * This hint is provided to help in placing
-        * the filter in the filter table.
-        */
-       uint8_t pri_hint;
-       /* No preference */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER \
-               UINT32_C(0x0)
-       /* Above the given filter */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE \
-               UINT32_C(0x1)
-       /* Below the given filter */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_BELOW \
-               UINT32_C(0x2)
-       /* As high as possible */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_HIGHEST \
-               UINT32_C(0x3)
-       /* As low as possible */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LOWEST \
-               UINT32_C(0x4)
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LAST \
-               HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LOWEST
-       /*
-        * The value of source IP address to be used in filtering.
-        * For IPv4, first four bytes represent the IP address.
-        */
-       uint32_t        src_ipaddr[4];
-       /*
-        * The value of source IP address mask to be used in
-        * filtering.
-        * For IPv4, first four bytes represent the IP address mask.
-        */
-       uint32_t        src_ipaddr_mask[4];
-       /*
-        * The value of destination IP address to be used in filtering.
-        * For IPv4, first four bytes represent the IP address.
-        */
-       uint32_t        dst_ipaddr[4];
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST \
+               HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
        /*
-        * The value of destination IP address mask to be used in
-        * filtering.
-        * For IPv4, first four bytes represent the IP address mask.
+        * tunnel_flags allows the user to indicate the tunnel tag detection
+        * for the tunnel type specified in tunnel_type.
         */
-       uint32_t        dst_ipaddr_mask[4];
+       uint8_t tunnel_flags;
        /*
-        * The value of source port to be used in filtering.
-        * Applies to UDP and TCP traffic.
+        * If the tunnel_type is geneve, then this bit indicates if we
+        * need to match the geneve OAM packet.
+        * If the tunnel_type is nvgre or gre, then this bit indicates if
+        * we need to detect checksum present bit in geneve header.
+        * If the tunnel_type is mpls, then this bit indicates if we need
+        * to match mpls packet with explicit IPV4/IPV6 null header.
         */
-       uint16_t        src_port;
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_FLAGS_TUN_FLAGS_OAM_CHECKSUM_EXPLHDR \
+               UINT32_C(0x1)
        /*
-        * The value of source port mask to be used in filtering.
-        * Applies to UDP and TCP traffic.
+        * If the tunnel_type is geneve, then this bit indicates if we
+        * need to detect the critical option bit set in the oam packet.
+        * If the tunnel_type is nvgre or gre, then this bit indicates
+        * if we need to match nvgre packets with key present bit set in
+        * gre header.
+        * If the tunnel_type is mpls, then this bit indicates if we
+        * need to match mpls packet with S bit from inner/second label.
         */
-       uint16_t        src_port_mask;
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_FLAGS_TUN_FLAGS_CRITICAL_OPT_S1 \
+               UINT32_C(0x2)
        /*
-        * The value of destination port to be used in filtering.
-        * Applies to UDP and TCP traffic.
+        * If the tunnel_type is geneve, then this bit indicates if we
+        * need to match geneve packet with extended header bit set in
+        * geneve header.
+        * If the tunnel_type is nvgre or gre, then this bit indicates
+        * if we need to match nvgre packets with sequence number
+        * present bit set in gre header.
+        * If the tunnel_type is mpls, then this bit indicates if we
+        * need to match mpls packet with S bit from out/first label.
         */
-       uint16_t        dst_port;
+       #define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_FLAGS_TUN_FLAGS_EXTHDR_SEQNUM_S0 \
+               UINT32_C(0x4)
        /*
-        * The value of destination port mask to be used in
-        * filtering.
-        * Applies to UDP and TCP traffic.
+        * Virtual Network Identifier (VNI). Only valid with
+        * tunnel_types VXLAN, NVGRE, and Geneve.
+        * Only lower 24-bits of VNI field are used
+        * in setting up the filter.
         */
-       uint16_t        dst_port_mask;
+       uint32_t        vni;
+       /* Logical VNIC ID of the destination VNIC. */
+       uint32_t        dst_vnic_id;
        /*
-        * This is the ID of the filter that goes along with
-        * the pri_hint.
+        * Logical VNIC ID of the VNIC where traffic is
+        * mirrored.
         */
-       uint64_t        ntuple_filter_id_hint;
+       uint32_t        mirror_vnic_id;
 } __attribute__((packed));
 
-/* hwrm_cfa_ntuple_filter_alloc_output (size:192b/24B) */
-struct hwrm_cfa_ntuple_filter_alloc_output {
+/* hwrm_cfa_tunnel_filter_alloc_output (size:192b/24B) */
+struct hwrm_cfa_tunnel_filter_alloc_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -21080,7 +20975,7 @@ struct hwrm_cfa_ntuple_filter_alloc_output {
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
        /* This value is an opaque id into CFA data structures. */
-       uint64_t        ntuple_filter_id;
+       uint64_t        tunnel_filter_id;
        /*
         * This is the ID of the flow associated with this
         * filter.
@@ -21100,31 +20995,72 @@ struct hwrm_cfa_ntuple_filter_alloc_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/* hwrm_cfa_ntuple_filter_alloc_cmd_err (size:64b/8B) */
-struct hwrm_cfa_ntuple_filter_alloc_cmd_err {
+/*******************************
+ * hwrm_cfa_tunnel_filter_free *
+ *******************************/
+
+
+/* hwrm_cfa_tunnel_filter_free_input (size:192b/24B) */
+struct hwrm_cfa_tunnel_filter_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
        /*
-        * command specific error codes that goes to
-        * the cmd_err field in Common HWRM Error Response.
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
         */
-       uint8_t code;
-       /* Unknown error */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_UNKNOWN \
-               UINT32_C(0x0)
-       /* Unable to complete operation due to conflict with Rx Mask VLAN */
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_RX_MASK_VLAN_CONFLICT_ERR \
-               UINT32_C(0x1)
-       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_LAST \
-               HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_RX_MASK_VLAN_CONFLICT_ERR
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* This value is an opaque id into CFA data structures. */
+       uint64_t        tunnel_filter_id;
+} __attribute__((packed));
+
+/* hwrm_cfa_tunnel_filter_free_output (size:128b/16B) */
+struct hwrm_cfa_tunnel_filter_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
        uint8_t unused_0[7];
+       /*
+        * 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_ntuple_filter_free *
- *******************************/
+/***************************************
+ * hwrm_cfa_redirect_tunnel_type_alloc *
+ ***************************************/
 
 
-/* hwrm_cfa_ntuple_filter_free_input (size:192b/24B) */
-struct hwrm_cfa_ntuple_filter_free_input {
+/* hwrm_cfa_redirect_tunnel_type_alloc_input (size:192b/24B) */
+struct hwrm_cfa_redirect_tunnel_type_alloc_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -21152,12 +21088,58 @@ struct hwrm_cfa_ntuple_filter_free_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
-       /* This value is an opaque id into CFA data structures. */
-       uint64_t        ntuple_filter_id;
+       /* The destination function id, to whom the traffic is redirected. */
+       uint16_t        dest_fid;
+       /* Tunnel Type. */
+       uint8_t tunnel_type;
+       /* Non-tunnel */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
+               UINT32_C(0x0)
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
+               UINT32_C(0x1)
+       /* Network Virtualization Generic Routing Encapsulation (NVGRE) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
+               UINT32_C(0x2)
+       /* Generic Routing Encapsulation (GRE) inside Ethernet payload */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
+               UINT32_C(0x3)
+       /* IP in IP */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
+               UINT32_C(0x4)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
+               UINT32_C(0x5)
+       /* Multi-Protocol Lable Switching (MPLS) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
+               UINT32_C(0x6)
+       /* Stateless Transport Tunnel (STT) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_STT \
+               UINT32_C(0x7)
+       /* Generic Routing Encapsulation (GRE) inside IP datagram payload */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
+               UINT32_C(0x8)
+       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
+               UINT32_C(0x9)
+       /* Enhance Generic Routing Encapsulation (GRE version 1) inside IP datagram payload */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
+               UINT32_C(0xa)
+       /* Any tunneled traffic */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
+               UINT32_C(0xff)
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_LAST \
+               HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
+       /* Tunnel alloc flags. */
+       uint8_t flags;
+       /* Setting of this flag indicates modify existing redirect tunnel to new destination function ID. */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_FLAGS_MODIFY_DST \
+               UINT32_C(0x1)
+       uint8_t unused_0[4];
 } __attribute__((packed));
 
-/* hwrm_cfa_ntuple_filter_free_output (size:128b/16B) */
-struct hwrm_cfa_ntuple_filter_free_output {
+/* hwrm_cfa_redirect_tunnel_type_alloc_output (size:128b/16B) */
+struct hwrm_cfa_redirect_tunnel_type_alloc_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -21177,13 +21159,13 @@ struct hwrm_cfa_ntuple_filter_free_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/******************************
- * hwrm_cfa_ntuple_filter_cfg *
- ******************************/
+/**************************************
+ * hwrm_cfa_redirect_tunnel_type_free *
+ **************************************/
 
 
-/* hwrm_cfa_ntuple_filter_cfg_input (size:384b/48B) */
-struct hwrm_cfa_ntuple_filter_cfg_input {
+/* hwrm_cfa_redirect_tunnel_type_free_input (size:192b/24B) */
+struct hwrm_cfa_redirect_tunnel_type_free_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -21211,59 +21193,153 @@ struct hwrm_cfa_ntuple_filter_cfg_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
-       uint32_t        enables;
-       /*
-        * This bit must be '1' for the new_dst_id field to be
-        * configured.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_DST_ID \
+       /* The destination function id, to whom the traffic is redirected. */
+       uint16_t        dest_fid;
+       /* Tunnel Type. */
+       uint8_t tunnel_type;
+       /* Non-tunnel */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_NONTUNNEL \
+               UINT32_C(0x0)
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_VXLAN \
                UINT32_C(0x1)
-       /*
-        * This bit must be '1' for the new_mirror_vnic_id field to be
-        * configured.
-        */
-       #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID \
+       /* Network Virtualization Generic Routing Encapsulation (NVGRE) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_NVGRE \
                UINT32_C(0x2)
+       /* Generic Routing Encapsulation (GRE) inside Ethernet payload */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_L2GRE \
+               UINT32_C(0x3)
+       /* IP in IP */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_IPIP \
+               UINT32_C(0x4)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_GENEVE \
+               UINT32_C(0x5)
+       /* Multi-Protocol Lable Switching (MPLS) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_MPLS \
+               UINT32_C(0x6)
+       /* Stateless Transport Tunnel (STT) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_STT \
+               UINT32_C(0x7)
+       /* Generic Routing Encapsulation (GRE) inside IP datagram payload */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_IPGRE \
+               UINT32_C(0x8)
+       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_VXLAN_V4 \
+               UINT32_C(0x9)
+       /* Enhance Generic Routing Encapsulation (GRE version 1) inside IP datagram payload */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_IPGRE_V1 \
+               UINT32_C(0xa)
+       /* Any tunneled traffic */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_ANYTUNNEL \
+               UINT32_C(0xff)
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_LAST \
+               HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_ANYTUNNEL
+       uint8_t unused_0[5];
+} __attribute__((packed));
+
+/* hwrm_cfa_redirect_tunnel_type_free_output (size:128b/16B) */
+struct hwrm_cfa_redirect_tunnel_type_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
        /*
-        * This bit must be '1' for the new_meter_instance_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_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_METER_INSTANCE_ID \
-               UINT32_C(0x4)
-       uint8_t unused_0[4];
-       /* This value is an opaque id into CFA data structures. */
-       uint64_t        ntuple_filter_id;
+       uint8_t valid;
+} __attribute__((packed));
+
+/**************************************
+ * hwrm_cfa_redirect_tunnel_type_info *
+ **************************************/
+
+
+/* hwrm_cfa_redirect_tunnel_type_info_input (size:192b/24B) */
+struct hwrm_cfa_redirect_tunnel_type_info_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
        /*
-        * If set, this value shall represent the new
-        * Logical VNIC ID of the destination VNIC for the RX
-        * path and new network port id of the destination port for
-        * the TX path.
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
         */
-       uint32_t        new_dst_id;
+       uint16_t        cmpl_ring;
        /*
-        * New Logical VNIC ID of the VNIC where traffic is
-        * mirrored.
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
         */
-       uint32_t        new_mirror_vnic_id;
+       uint16_t        seq_id;
        /*
-        * New meter to attach to the flow. Specifying the
-        * invalid instance ID is used to remove any existing
-        * meter from the flow.
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
         */
-       uint16_t        new_meter_instance_id;
+       uint16_t        target_id;
        /*
-        * A value of 0xfff is considered invalid and implies the
-        * instance is not configured.
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
         */
-       #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID \
-               UINT32_C(0xffff)
-       #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_LAST \
-               HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID
-       uint8_t unused_1[6];
+       uint64_t        resp_addr;
+       /* The source function id. */
+       uint16_t        src_fid;
+       /* Tunnel Type. */
+       uint8_t tunnel_type;
+       /* Non-tunnel */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_NONTUNNEL \
+               UINT32_C(0x0)
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_VXLAN \
+               UINT32_C(0x1)
+       /* Network Virtualization Generic Routing Encapsulation (NVGRE) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_NVGRE \
+               UINT32_C(0x2)
+       /* Generic Routing Encapsulation (GRE) inside Ethernet payload */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_L2GRE \
+               UINT32_C(0x3)
+       /* IP in IP */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_IPIP \
+               UINT32_C(0x4)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_GENEVE \
+               UINT32_C(0x5)
+       /* Multi-Protocol Lable Switching (MPLS) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_MPLS \
+               UINT32_C(0x6)
+       /* Stateless Transport Tunnel (STT) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_STT \
+               UINT32_C(0x7)
+       /* Generic Routing Encapsulation (GRE) inside IP datagram payload */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_IPGRE \
+               UINT32_C(0x8)
+       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_VXLAN_V4 \
+               UINT32_C(0x9)
+       /* Enhance Generic Routing Encapsulation (GRE version 1) inside IP datagram payload */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_IPGRE_V1 \
+               UINT32_C(0xa)
+       /* Any tunneled traffic */
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_ANYTUNNEL \
+               UINT32_C(0xff)
+       #define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_LAST \
+               HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_ANYTUNNEL
+       uint8_t unused_0[5];
 } __attribute__((packed));
 
-/* hwrm_cfa_ntuple_filter_cfg_output (size:128b/16B) */
-struct hwrm_cfa_ntuple_filter_cfg_output {
+/* hwrm_cfa_redirect_tunnel_type_info_output (size:128b/16B) */
+struct hwrm_cfa_redirect_tunnel_type_info_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -21272,7 +21348,9 @@ struct hwrm_cfa_ntuple_filter_cfg_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       uint8_t unused_0[7];
+       /* The destination function id, to whom the traffic is redirected. */
+       uint16_t        dest_fid;
+       uint8_t unused_0[5];
        /*
         * This field is used in Output records to indicate that the output
         * is completely written to RAM.  This field should be read as '1'
@@ -21283,13 +21361,113 @@ struct hwrm_cfa_ntuple_filter_cfg_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/**************************
- * hwrm_cfa_em_flow_alloc *
- **************************/
+/* hwrm_vxlan_ipv4_hdr (size:128b/16B) */
+struct hwrm_vxlan_ipv4_hdr {
+       /* IPv4 version and header length. */
+       uint8_t ver_hlen;
+       /* IPv4 header length */
+       #define HWRM_VXLAN_IPV4_HDR_VER_HLEN_HEADER_LENGTH_MASK UINT32_C(0xf)
+       #define HWRM_VXLAN_IPV4_HDR_VER_HLEN_HEADER_LENGTH_SFT 0
+       /* Version */
+       #define HWRM_VXLAN_IPV4_HDR_VER_HLEN_VERSION_MASK      UINT32_C(0xf0)
+       #define HWRM_VXLAN_IPV4_HDR_VER_HLEN_VERSION_SFT       4
+       /* IPv4 type of service. */
+       uint8_t tos;
+       /* IPv4 identification. */
+       uint16_t        ip_id;
+       /* IPv4 flags and offset. */
+       uint16_t        flags_frag_offset;
+       /* IPv4 TTL. */
+       uint8_t ttl;
+       /* IPv4 protocol. */
+       uint8_t protocol;
+       /* IPv4 source address. */
+       uint32_t        src_ip_addr;
+       /* IPv4 destination address. */
+       uint32_t        dest_ip_addr;
+} __attribute__((packed));
+
+/* hwrm_vxlan_ipv6_hdr (size:320b/40B) */
+struct hwrm_vxlan_ipv6_hdr {
+       /* IPv6 version, traffic class and flow label. */
+       uint32_t        ver_tc_flow_label;
+       /* IPv6 version shift */
+       #define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_VER_SFT \
+               UINT32_C(0x1c)
+       /* IPv6 version mask */
+       #define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_VER_MASK \
+               UINT32_C(0xf0000000)
+       /* IPv6 TC shift */
+       #define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_TC_SFT \
+               UINT32_C(0x14)
+       /* IPv6 TC mask */
+       #define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_TC_MASK \
+               UINT32_C(0xff00000)
+       /* IPv6 flow label shift */
+       #define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_SFT \
+               UINT32_C(0x0)
+       /* IPv6 flow label mask */
+       #define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_MASK \
+               UINT32_C(0xfffff)
+       #define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_LAST \
+               HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_MASK
+       /* IPv6 payload length. */
+       uint16_t        payload_len;
+       /* IPv6 next header. */
+       uint8_t next_hdr;
+       /* IPv6 TTL. */
+       uint8_t ttl;
+       /* IPv6 source address. */
+       uint32_t        src_ip_addr[4];
+       /* IPv6 destination address. */
+       uint32_t        dest_ip_addr[4];
+} __attribute__((packed));
+
+/* hwrm_cfa_encap_data_vxlan (size:576b/72B) */
+struct hwrm_cfa_encap_data_vxlan {
+       /* Source MAC address. */
+       uint8_t src_mac_addr[6];
+       /* reserved. */
+       uint16_t        unused_0;
+       /* Destination MAC address. */
+       uint8_t dst_mac_addr[6];
+       /* Number of VLAN tags. */
+       uint8_t num_vlan_tags;
+       /* reserved. */
+       uint8_t unused_1;
+       /* Outer VLAN TPID. */
+       uint16_t        ovlan_tpid;
+       /* Outer VLAN TCI. */
+       uint16_t        ovlan_tci;
+       /* Inner VLAN TPID. */
+       uint16_t        ivlan_tpid;
+       /* Inner VLAN TCI. */
+       uint16_t        ivlan_tci;
+       /* L3 header fields. */
+       uint32_t        l3[10];
+       /* IP version mask. */
+       #define HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_MASK UINT32_C(0xf)
+       /* IP version 4. */
+       #define HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_IPV4 UINT32_C(0x4)
+       /* IP version 6. */
+       #define HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_IPV6 UINT32_C(0x6)
+       #define HWRM_CFA_ENCAP_DATA_VXLAN_L3_LAST \
+               HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_IPV6
+       /* UDP source port. */
+       uint16_t        src_port;
+       /* UDP destination port. */
+       uint16_t        dst_port;
+       /* VXLAN Network Identifier. */
+       uint32_t        vni;
+} __attribute__((packed));
 
+/*******************************
+ * hwrm_cfa_encap_record_alloc *
+ *******************************/
 
-/* hwrm_cfa_em_flow_alloc_input (size:896b/112B) */
-struct hwrm_cfa_em_flow_alloc_input {
+
+/* hwrm_cfa_encap_record_alloc_input (size:832b/104B) */
+struct hwrm_cfa_encap_record_alloc_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -21318,306 +21496,469 @@ struct hwrm_cfa_em_flow_alloc_input {
         */
        uint64_t        resp_addr;
        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_EM_FLOW_ALLOC_INPUT_FLAGS_PATH         UINT32_C(0x1)
-       /* tx path */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_TX        UINT32_C(0x0)
-       /* rx path */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_RX        UINT32_C(0x1)
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_LAST \
-               HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_RX
-       /*
-        * Setting of this flag indicates enabling of a byte counter for a given
-        * flow.
+       /* Setting of this flag indicates the applicability to the loopback path. */
+       #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_FLAGS_LOOPBACK \
+               UINT32_C(0x1)
+       /* Encapsulation Type. */
+       uint8_t encap_type;
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN \
+               UINT32_C(0x1)
+       /* Network Virtualization Generic Routing Encapsulation (NVGRE) */
+       #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_NVGRE \
+               UINT32_C(0x2)
+       /* Generic Routing Encapsulation (GRE) after inside Ethernet payload */
+       #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_L2GRE \
+               UINT32_C(0x3)
+       /* IP in IP */
+       #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPIP \
+               UINT32_C(0x4)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_GENEVE \
+               UINT32_C(0x5)
+       /* Multi-Protocol Lable Switching (MPLS) */
+       #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_MPLS \
+               UINT32_C(0x6)
+       /* VLAN */
+       #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VLAN \
+               UINT32_C(0x7)
+       /* Generic Routing Encapsulation (GRE) inside IP datagram payload */
+       #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPGRE \
+               UINT32_C(0x8)
+       #define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_LAST \
+               HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPGRE
+       uint8_t unused_0[3];
+       /* This value is encap data used for the given encap type. */
+       uint32_t        encap_data[20];
+} __attribute__((packed));
+
+/* hwrm_cfa_encap_record_alloc_output (size:128b/16B) */
+struct hwrm_cfa_encap_record_alloc_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* This value is an opaque id into CFA data structures. */
+       uint32_t        encap_record_id;
+       uint8_t unused_0[3];
+       /*
+        * 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_EM_FLOW_ALLOC_INPUT_FLAGS_BYTE_CTR     UINT32_C(0x2)
+       uint8_t valid;
+} __attribute__((packed));
+
+/******************************
+ * hwrm_cfa_encap_record_free *
+ ******************************/
+
+
+/* hwrm_cfa_encap_record_free_input (size:192b/24B) */
+struct hwrm_cfa_encap_record_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
        /*
-        * Setting of this flag indicates enabling of a packet counter for a given
-        * flow.
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PKT_CTR      UINT32_C(0x4)
-       /* Setting of this flag indicates de-capsulation action for the given flow. */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_DECAP        UINT32_C(0x8)
-       /* Setting of this flag indicates encapsulation action for the given flow. */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_ENCAP        UINT32_C(0x10)
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* This value is an opaque id into CFA data structures. */
+       uint32_t        encap_record_id;
+       uint8_t unused_0[4];
+} __attribute__((packed));
+
+/* hwrm_cfa_encap_record_free_output (size:128b/16B) */
+struct hwrm_cfa_encap_record_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_ntuple_filter_alloc *
+ ********************************/
+
+
+/* hwrm_cfa_ntuple_filter_alloc_input (size:1024b/128B) */
+struct hwrm_cfa_ntuple_filter_alloc_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint32_t        flags;
+       /* Setting of this flag indicates the applicability to the loopback path. */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK \
+               UINT32_C(0x1)
        /*
         * Setting of this flag indicates drop action. If this flag is not set,
         * then it should be considered accept action.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_DROP         UINT32_C(0x20)
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DROP \
+               UINT32_C(0x2)
        /*
         * Setting of this flag indicates that a meter is expected to be attached
         * to this flow. This hint can be used when choosing the action record
         * format required for the flow.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_METER        UINT32_C(0x40)
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_METER \
+               UINT32_C(0x4)
        uint32_t        enables;
        /*
         * This bit must be '1' for the l2_filter_id field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_L2_FILTER_ID \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID \
                UINT32_C(0x1)
        /*
-        * This bit must be '1' for the tunnel_type field to be
+        * This bit must be '1' for the ethertype field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE \
                UINT32_C(0x2)
        /*
-        * This bit must be '1' for the tunnel_id field to be
+        * This bit must be '1' for the tunnel_type field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_TUNNEL_ID \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
                UINT32_C(0x4)
        /*
         * This bit must be '1' for the src_macaddr field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_MACADDR \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR \
                UINT32_C(0x8)
        /*
-        * This bit must be '1' for the dst_macaddr field to be
+        * This bit must be '1' for the ipaddr_type field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_MACADDR \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_IPADDR_TYPE \
                UINT32_C(0x10)
        /*
-        * This bit must be '1' for the ovlan_vid field to be
+        * This bit must be '1' for the src_ipaddr field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_OVLAN_VID \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR \
                UINT32_C(0x20)
        /*
-        * This bit must be '1' for the ivlan_vid field to be
+        * This bit must be '1' for the src_ipaddr_mask field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IVLAN_VID \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR_MASK \
                UINT32_C(0x40)
        /*
-        * This bit must be '1' for the ethertype field to be
+        * This bit must be '1' for the dst_ipaddr field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_ETHERTYPE \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR \
                UINT32_C(0x80)
        /*
-        * This bit must be '1' for the src_ipaddr field to be
+        * This bit must be '1' for the dst_ipaddr_mask field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_IPADDR \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR_MASK \
                UINT32_C(0x100)
        /*
-        * This bit must be '1' for the dst_ipaddr field to be
+        * This bit must be '1' for the ip_protocol field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_IPADDR \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_IP_PROTOCOL \
                UINT32_C(0x200)
        /*
-        * This bit must be '1' for the ipaddr_type field to be
+        * This bit must be '1' for the src_port field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IPADDR_TYPE \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT \
                UINT32_C(0x400)
        /*
-        * This bit must be '1' for the ip_protocol field to be
+        * This bit must be '1' for the src_port_mask field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IP_PROTOCOL \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT_MASK \
                UINT32_C(0x800)
        /*
-        * This bit must be '1' for the src_port field to be
+        * This bit must be '1' for the dst_port field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_PORT \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_PORT \
                UINT32_C(0x1000)
        /*
-        * This bit must be '1' for the dst_port field to be
+        * This bit must be '1' for the dst_port_mask field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_PORT \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_PORT_MASK \
                UINT32_C(0x2000)
        /*
-        * This bit must be '1' for the dst_id field to be
+        * This bit must be '1' for the pri_hint field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_ID \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_PRI_HINT \
                UINT32_C(0x4000)
        /*
-        * This bit must be '1' for the mirror_vnic_id field to be
+        * This bit must be '1' for the ntuple_filter_id field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_NTUPLE_FILTER_ID \
                UINT32_C(0x8000)
        /*
-        * This bit must be '1' for the encap_record_id field to be
+        * This bit must be '1' for the dst_id field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_ENCAP_RECORD_ID \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_ID \
                UINT32_C(0x10000)
        /*
-        * This bit must be '1' for the meter_instance_id field to be
+        * This bit must be '1' for the mirror_vnic_id field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_METER_INSTANCE_ID \
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
                UINT32_C(0x20000)
+       /*
+        * This bit must be '1' for the dst_macaddr field to be
+        * configured.
+        */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR \
+               UINT32_C(0x40000)
        /*
         * This value identifies a set of CFA data structures used for an L2
         * context.
         */
        uint64_t        l2_filter_id;
-       /* Tunnel Type. */
-       uint8_t tunnel_type;
-       /* Non-tunnel */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
+       /*
+        * This value indicates the source MAC address in
+        * the Ethernet header.
+        */
+       uint8_t src_macaddr[6];
+       /* This value indicates the ethertype in the Ethernet header. */
+       uint16_t        ethertype;
+       /*
+        * This value indicates the type of IP address.
+        * 4 - IPv4
+        * 6 - IPv6
+        * All others are invalid.
+        */
+       uint8_t ip_addr_type;
+       /* invalid */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN \
                UINT32_C(0x0)
-       /* Virtual eXtensible Local Area Network (VXLAN) */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
-               UINT32_C(0x1)
-       /* Network Virtualization Generic Routing Encapsulation (NVGRE) */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
-               UINT32_C(0x2)
-       /* Generic Routing Encapsulation (GRE) inside Ethernet payload */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
-               UINT32_C(0x3)
-       /* IP in IP */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
+       /* IPv4 */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4 \
                UINT32_C(0x4)
-       /* Generic Network Virtualization Encapsulation (Geneve) */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
-               UINT32_C(0x5)
-       /* Multi-Protocol Lable Switching (MPLS) */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
+       /* IPv6 */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6 \
                UINT32_C(0x6)
-       /* Stateless Transport Tunnel (STT) */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_STT \
-               UINT32_C(0x7)
-       /* Generic Routing Encapsulation (GRE) inside IP datagram payload */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
-               UINT32_C(0x8)
-       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
-               UINT32_C(0x9)
-       /* Any tunneled traffic */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
-               UINT32_C(0xff)
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_LAST \
-               HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
-       uint8_t unused_0[3];
-       /*
-        * Tunnel identifier.
-        * Virtual Network Identifier (VNI). Only valid with
-        * tunnel_types VXLAN, NVGRE, and Geneve.
-        * Only lower 24-bits of VNI field are used
-        * in setting up the filter.
-        */
-       uint32_t        tunnel_id;
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_LAST \
+               HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
        /*
-        * This value indicates the source MAC address in
-        * the Ethernet header.
+        * The value of protocol filed in IP header.
+        * Applies to UDP and TCP traffic.
+        * 6 - TCP
+        * 17 - UDP
         */
-       uint8_t src_macaddr[6];
-       /* The meter instance to attach to the flow. */
-       uint16_t        meter_instance_id;
+       uint8_t ip_protocol;
+       /* invalid */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN \
+               UINT32_C(0x0)
+       /* TCP */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_TCP \
+               UINT32_C(0x6)
+       /* UDP */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP \
+               UINT32_C(0x11)
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_LAST \
+               HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP
        /*
-        * A value of 0xfff is considered invalid and implies the
-        * instance is not configured.
+        * 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.
         */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_INVALID \
-               UINT32_C(0xffff)
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_LAST \
-               HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_INVALID
+       uint16_t        dst_id;
        /*
-        * This value indicates the destination MAC address in
-        * the Ethernet header.
+        * Logical VNIC ID of the VNIC where traffic is
+        * mirrored.
         */
-       uint8_t dst_macaddr[6];
+       uint16_t        mirror_vnic_id;
        /*
-        * This value indicates the VLAN ID of the outer VLAN tag
-        * in the Ethernet header.
+        * This value indicates the tunnel type for this filter.
+        * If this field is not specified, then the filter shall
+        * apply to both non-tunneled and tunneled packets.
+        * If this field conflicts with the tunnel_type specified
+        * in the l2_filter_id, then the HWRM shall return an
+        * error for this command.
         */
-       uint16_t        ovlan_vid;
+       uint8_t tunnel_type;
+       /* Non-tunnel */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
+               UINT32_C(0x0)
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
+               UINT32_C(0x1)
+       /* Network Virtualization Generic Routing Encapsulation (NVGRE) */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
+               UINT32_C(0x2)
+       /* Generic Routing Encapsulation (GRE) inside Ethernet payload */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
+               UINT32_C(0x3)
+       /* IP in IP */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
+               UINT32_C(0x4)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
+               UINT32_C(0x5)
+       /* Multi-Protocol Lable Switching (MPLS) */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
+               UINT32_C(0x6)
+       /* Stateless Transport Tunnel (STT) */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \
+               UINT32_C(0x7)
+       /* Generic Routing Encapsulation (GRE) inside IP datagram payload */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
+               UINT32_C(0x8)
+       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
+               UINT32_C(0x9)
+       /* Any tunneled traffic */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
+               UINT32_C(0xff)
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST \
+               HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
        /*
-        * This value indicates the VLAN ID of the inner VLAN tag
-        * in the Ethernet header.
+        * This hint is provided to help in placing
+        * the filter in the filter table.
         */
-       uint16_t        ivlan_vid;
-       /* This value indicates the ethertype in the Ethernet header. */
-       uint16_t        ethertype;
+       uint8_t pri_hint;
+       /* No preference */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER \
+               UINT32_C(0x0)
+       /* Above the given filter */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE \
+               UINT32_C(0x1)
+       /* Below the given filter */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_BELOW \
+               UINT32_C(0x2)
+       /* As high as possible */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_HIGHEST \
+               UINT32_C(0x3)
+       /* As low as possible */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LOWEST \
+               UINT32_C(0x4)
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LAST \
+               HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LOWEST
        /*
-        * This value indicates the type of IP address.
-        * 4 - IPv4
-        * 6 - IPv6
-        * All others are invalid.
+        * The value of source IP address to be used in filtering.
+        * For IPv4, first four bytes represent the IP address.
         */
-       uint8_t ip_addr_type;
-       /* invalid */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN UINT32_C(0x0)
-       /* IPv4 */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV4    UINT32_C(0x4)
-       /* IPv6 */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV6    UINT32_C(0x6)
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_LAST \
-               HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
+       uint32_t        src_ipaddr[4];
        /*
-        * The value of protocol filed in IP header.
-        * Applies to UDP and TCP traffic.
-        * 6 - TCP
-        * 17 - UDP
+        * The value of source IP address mask to be used in
+        * filtering.
+        * For IPv4, first four bytes represent the IP address mask.
         */
-       uint8_t ip_protocol;
-       /* invalid */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN UINT32_C(0x0)
-       /* TCP */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_TCP     UINT32_C(0x6)
-       /* UDP */
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UDP     UINT32_C(0x11)
-       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_LAST \
-               HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UDP
-       uint8_t unused_1[2];
+       uint32_t        src_ipaddr_mask[4];
        /*
-        * The value of source IP address to be used in filtering.
+        * The value of destination IP address to be used in filtering.
         * For IPv4, first four bytes represent the IP address.
         */
-       uint32_t        src_ipaddr[4];
+       uint32_t        dst_ipaddr[4];
        /*
-        * big_endian = True
-        *     The value of destination IP address to be used in filtering.
-        *     For IPv4, first four bytes represent the IP address.
+        * The value of destination IP address mask to be used in
+        * filtering.
+        * For IPv4, first four bytes represent the IP address mask.
         */
-       uint32_t        dst_ipaddr[4];
+       uint32_t        dst_ipaddr_mask[4];
        /*
         * The value of source port to be used in filtering.
         * Applies to UDP and TCP traffic.
         */
        uint16_t        src_port;
+       /*
+        * The value of source port mask to be used in filtering.
+        * Applies to UDP and TCP traffic.
+        */
+       uint16_t        src_port_mask;
        /*
         * The value of destination port to be used in filtering.
         * Applies to UDP and TCP traffic.
         */
        uint16_t        dst_port;
        /*
-        * 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.
+        * The value of destination port mask to be used in
+        * filtering.
+        * Applies to UDP and TCP traffic.
         */
-       uint16_t        dst_id;
+       uint16_t        dst_port_mask;
        /*
-        * Logical VNIC ID of the VNIC where traffic is
-        * mirrored.
+        * This is the ID of the filter that goes along with
+        * the pri_hint.
         */
-       uint16_t        mirror_vnic_id;
-       /* Logical ID of the encapsulation record. */
-       uint32_t        encap_record_id;
-       uint8_t unused_2[4];
+       uint64_t        ntuple_filter_id_hint;
 } __attribute__((packed));
 
-/* hwrm_cfa_em_flow_alloc_output (size:192b/24B) */
-struct hwrm_cfa_em_flow_alloc_output {
+/* hwrm_cfa_ntuple_filter_alloc_output (size:192b/24B) */
+struct hwrm_cfa_ntuple_filter_alloc_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -21627,7 +21968,7 @@ struct hwrm_cfa_em_flow_alloc_output {
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
        /* This value is an opaque id into CFA data structures. */
-       uint64_t        em_filter_id;
+       uint64_t        ntuple_filter_id;
        /*
         * This is the ID of the flow associated with this
         * filter.
@@ -21647,13 +21988,31 @@ struct hwrm_cfa_em_flow_alloc_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/*************************
- * hwrm_cfa_em_flow_free *
- *************************/
+/* hwrm_cfa_ntuple_filter_alloc_cmd_err (size:64b/8B) */
+struct hwrm_cfa_ntuple_filter_alloc_cmd_err {
+       /*
+        * command specific error codes that goes to
+        * the cmd_err field in Common HWRM Error Response.
+        */
+       uint8_t code;
+       /* Unknown error */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_UNKNOWN \
+               UINT32_C(0x0)
+       /* Unable to complete operation due to conflict with Rx Mask VLAN */
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_RX_MASK_VLAN_CONFLICT_ERR \
+               UINT32_C(0x1)
+       #define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_LAST \
+               HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_RX_MASK_VLAN_CONFLICT_ERR
+       uint8_t unused_0[7];
+} __attribute__((packed));
+
+/*******************************
+ * hwrm_cfa_ntuple_filter_free *
+ *******************************/
 
 
-/* hwrm_cfa_em_flow_free_input (size:192b/24B) */
-struct hwrm_cfa_em_flow_free_input {
+/* hwrm_cfa_ntuple_filter_free_input (size:192b/24B) */
+struct hwrm_cfa_ntuple_filter_free_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -21682,11 +22041,11 @@ struct hwrm_cfa_em_flow_free_input {
         */
        uint64_t        resp_addr;
        /* This value is an opaque id into CFA data structures. */
-       uint64_t        em_filter_id;
+       uint64_t        ntuple_filter_id;
 } __attribute__((packed));
 
-/* hwrm_cfa_em_flow_free_output (size:128b/16B) */
-struct hwrm_cfa_em_flow_free_output {
+/* hwrm_cfa_ntuple_filter_free_output (size:128b/16B) */
+struct hwrm_cfa_ntuple_filter_free_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -21706,13 +22065,13 @@ struct hwrm_cfa_em_flow_free_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/************************
- * hwrm_cfa_em_flow_cfg *
- ************************/
+/******************************
+ * hwrm_cfa_ntuple_filter_cfg *
+ ******************************/
 
 
-/* hwrm_cfa_em_flow_cfg_input (size:384b/48B) */
-struct hwrm_cfa_em_flow_cfg_input {
+/* hwrm_cfa_ntuple_filter_cfg_input (size:384b/48B) */
+struct hwrm_cfa_ntuple_filter_cfg_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -21745,27 +22104,27 @@ struct hwrm_cfa_em_flow_cfg_input {
         * This bit must be '1' for the new_dst_id field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_DST_ID \
+       #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_DST_ID \
                UINT32_C(0x1)
        /*
         * This bit must be '1' for the new_mirror_vnic_id field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID \
+       #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID \
                UINT32_C(0x2)
        /*
         * This bit must be '1' for the new_meter_instance_id field to be
         * configured.
         */
-       #define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_METER_INSTANCE_ID \
+       #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_METER_INSTANCE_ID \
                UINT32_C(0x4)
        uint8_t unused_0[4];
        /* This value is an opaque id into CFA data structures. */
-       uint64_t        em_filter_id;
+       uint64_t        ntuple_filter_id;
        /*
         * If set, this value shall represent the new
         * Logical VNIC ID of the destination VNIC for the RX
-        * path and network port id of the destination port for
+        * path and new network port id of the destination port for
         * the TX path.
         */
        uint32_t        new_dst_id;
@@ -21784,15 +22143,15 @@ struct hwrm_cfa_em_flow_cfg_input {
         * A value of 0xfff is considered invalid and implies the
         * instance is not configured.
         */
-       #define HWRM_CFA_EM_FLOW_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID \
+       #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID \
                UINT32_C(0xffff)
-       #define HWRM_CFA_EM_FLOW_CFG_INPUT_NEW_METER_INSTANCE_ID_LAST \
-               HWRM_CFA_EM_FLOW_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID
+       #define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_LAST \
+               HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID
        uint8_t unused_1[6];
 } __attribute__((packed));
 
-/* hwrm_cfa_em_flow_cfg_output (size:128b/16B) */
-struct hwrm_cfa_em_flow_cfg_output {
+/* hwrm_cfa_ntuple_filter_cfg_output (size:128b/16B) */
+struct hwrm_cfa_ntuple_filter_cfg_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -21812,13 +22171,13 @@ struct hwrm_cfa_em_flow_cfg_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/******************************
- * hwrm_tunnel_dst_port_query *
- ******************************/
+/**************************
+ * hwrm_cfa_em_flow_alloc *
+ **************************/
 
 
-/* hwrm_tunnel_dst_port_query_input (size:192b/24B) */
-struct hwrm_tunnel_dst_port_query_input {
+/* hwrm_cfa_em_flow_alloc_input (size:896b/112B) */
+struct hwrm_cfa_em_flow_alloc_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -21846,216 +22205,307 @@ struct hwrm_tunnel_dst_port_query_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
-       /* Tunnel Type. */
-       uint8_t tunnel_type;
-       /* Virtual eXtensible Local Area Network (VXLAN) */
-       #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN \
-               UINT32_C(0x1)
-       /* Generic Network Virtualization Encapsulation (Geneve) */
-       #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_GENEVE \
-               UINT32_C(0x5)
-       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
-       #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN_V4 \
-               UINT32_C(0x9)
-       /* Enhance Generic Routing Encapsulation (GRE version 1) inside IP datagram payload */
-       #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_IPGRE_V1 \
-               UINT32_C(0xa)
-       #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_LAST \
-               HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_IPGRE_V1
-       uint8_t unused_0[7];
-} __attribute__((packed));
-
-/* hwrm_tunnel_dst_port_query_output (size:128b/16B) */
-struct hwrm_tunnel_dst_port_query_output {
-       /* The specific error status for the command. */
-       uint16_t        error_code;
-       /* The HWRM command request type. */
-       uint16_t        req_type;
-       /* The sequence ID from the original command. */
-       uint16_t        seq_id;
-       /* The length of the response data in number of bytes. */
-       uint16_t        resp_len;
+       uint32_t        flags;
        /*
-        * This field represents the identifier of L4 destination port
-        * used for the given tunnel type. This field is valid for
-        * specific tunnel types that use layer 4 (e.g. UDP)
-        * transports for tunneling.
+        * 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.
         */
-       uint16_t        tunnel_dst_port_id;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH         UINT32_C(0x1)
+       /* tx path */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_TX        UINT32_C(0x0)
+       /* rx path */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_RX        UINT32_C(0x1)
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_LAST \
+               HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_RX
        /*
-        * This field represents the value of L4 destination port
-        * identified by tunnel_dst_port_id. This field is valid for
-        * specific tunnel types that use layer 4 (e.g. UDP)
-        * transports for tunneling.
-        * This field is in network byte order.
-        *
-        * A value of 0 means that the destination port is not
-        * configured.
+        * Setting of this flag indicates enabling of a byte counter for a given
+        * flow.
         */
-       uint16_t        tunnel_dst_port_val;
-       uint8_t unused_0[3];
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_BYTE_CTR     UINT32_C(0x2)
        /*
-        * 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.
+        * Setting of this flag indicates enabling of a packet counter for a given
+        * flow.
         */
-       uint8_t valid;
-} __attribute__((packed));
-
-/******************************
- * hwrm_tunnel_dst_port_alloc *
- ******************************/
-
-
-/* hwrm_tunnel_dst_port_alloc_input (size:192b/24B) */
-struct hwrm_tunnel_dst_port_alloc_input {
-       /* The HWRM command request type. */
-       uint16_t        req_type;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PKT_CTR      UINT32_C(0x4)
+       /* Setting of this flag indicates de-capsulation action for the given flow. */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_DECAP        UINT32_C(0x8)
+       /* Setting of this flag indicates encapsulation action for the given flow. */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_ENCAP        UINT32_C(0x10)
        /*
-        * The completion ring to send the completion event on. This should
-        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        * Setting of this flag indicates drop action. If this flag is not set,
+        * then it should be considered accept action.
         */
-       uint16_t        cmpl_ring;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_DROP         UINT32_C(0x20)
        /*
-        * The sequence ID is used by the driver for tracking multiple
-        * commands. This ID is treated as opaque data by the firmware and
-        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        * Setting of this flag indicates that a meter is expected to be attached
+        * to this flow. This hint can be used when choosing the action record
+        * format required for the flow.
         */
-       uint16_t        seq_id;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_METER        UINT32_C(0x40)
+       uint32_t        enables;
        /*
-        * The target ID of the command:
-        * * 0x0-0xFFF8 - The function ID
-        * * 0xFFF8-0xFFFE - Reserved for internal processors
-        * * 0xFFFF - HWRM
+        * This bit must be '1' for the l2_filter_id field to be
+        * configured.
         */
-       uint16_t        target_id;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_L2_FILTER_ID \
+               UINT32_C(0x1)
        /*
-        * A physical address pointer pointing to a host buffer that the
-        * command's response data will be written. This can be either a host
-        * physical address (HPA) or a guest physical address (GPA) and must
-        * point to a physically contiguous block of memory.
+        * This bit must be '1' for the tunnel_type field to be
+        * configured.
         */
-       uint64_t        resp_addr;
-       /* Tunnel Type. */
-       uint8_t tunnel_type;
-       /* Virtual eXtensible Local Area Network (VXLAN) */
-       #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
-               UINT32_C(0x1)
-       /* Generic Network Virtualization Encapsulation (Geneve) */
-       #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
-               UINT32_C(0x5)
-       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
-       #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
-               UINT32_C(0x9)
-       /* Enhance Generic Routing Encapsulation (GRE version 1) inside IP datagram payload */
-       #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
-               UINT32_C(0xa)
-       #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_LAST \
-               HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1
-       uint8_t unused_0;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
+               UINT32_C(0x2)
        /*
-        * This field represents the value of L4 destination port used
-        * for the given tunnel type. This field is valid for
-        * specific tunnel types that use layer 4 (e.g. UDP)
-        * transports for tunneling.
-        *
-        * This field is in network byte order.
-        *
-        * A value of 0 shall fail the command.
+        * This bit must be '1' for the tunnel_id field to be
+        * configured.
         */
-       uint16_t        tunnel_dst_port_val;
-       uint8_t unused_1[4];
-} __attribute__((packed));
-
-/* hwrm_tunnel_dst_port_alloc_output (size:128b/16B) */
-struct hwrm_tunnel_dst_port_alloc_output {
-       /* The specific error status for the command. */
-       uint16_t        error_code;
-       /* The HWRM command request type. */
-       uint16_t        req_type;
-       /* The sequence ID from the original command. */
-       uint16_t        seq_id;
-       /* The length of the response data in number of bytes. */
-       uint16_t        resp_len;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_TUNNEL_ID \
+               UINT32_C(0x4)
        /*
-        * Identifier of a tunnel L4 destination port value. Only applies to tunnel
-        * types that has l4 destination port parameters.
+        * This bit must be '1' for the src_macaddr field to be
+        * configured.
         */
-       uint16_t        tunnel_dst_port_id;
-       uint8_t unused_0[5];
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_MACADDR \
+               UINT32_C(0x8)
        /*
-        * 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 bit must be '1' for the dst_macaddr field to be
+        * configured.
         */
-       uint8_t valid;
-} __attribute__((packed));
-
-/*****************************
- * hwrm_tunnel_dst_port_free *
- *****************************/
-
-
-/* hwrm_tunnel_dst_port_free_input (size:192b/24B) */
-struct hwrm_tunnel_dst_port_free_input {
-       /* The HWRM command request type. */
-       uint16_t        req_type;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_MACADDR \
+               UINT32_C(0x10)
        /*
-        * The completion ring to send the completion event on. This should
-        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        * This bit must be '1' for the ovlan_vid field to be
+        * configured.
         */
-       uint16_t        cmpl_ring;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_OVLAN_VID \
+               UINT32_C(0x20)
        /*
-        * The sequence ID is used by the driver for tracking multiple
-        * commands. This ID is treated as opaque data by the firmware and
-        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        * This bit must be '1' for the ivlan_vid field to be
+        * configured.
         */
-       uint16_t        seq_id;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IVLAN_VID \
+               UINT32_C(0x40)
        /*
-        * The target ID of the command:
-        * * 0x0-0xFFF8 - The function ID
-        * * 0xFFF8-0xFFFE - Reserved for internal processors
-        * * 0xFFFF - HWRM
+        * This bit must be '1' for the ethertype field to be
+        * configured.
         */
-       uint16_t        target_id;
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_ETHERTYPE \
+               UINT32_C(0x80)
        /*
-        * A physical address pointer pointing to a host buffer that the
-        * command's response data will be written. This can be either a host
-        * physical address (HPA) or a guest physical address (GPA) and must
-        * point to a physically contiguous block of memory.
+        * This bit must be '1' for the src_ipaddr field to be
+        * configured.
         */
-       uint64_t        resp_addr;
-       /* Tunnel Type. */
-       uint8_t tunnel_type;
-       /* Virtual eXtensible Local Area Network (VXLAN) */
-       #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN \
-               UINT32_C(0x1)
-       /* Generic Network Virtualization Encapsulation (Geneve) */
-       #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GENEVE \
-               UINT32_C(0x5)
-       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
-       #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN_V4 \
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_IPADDR \
+               UINT32_C(0x100)
+       /*
+        * This bit must be '1' for the dst_ipaddr field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_IPADDR \
+               UINT32_C(0x200)
+       /*
+        * This bit must be '1' for the ipaddr_type field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IPADDR_TYPE \
+               UINT32_C(0x400)
+       /*
+        * This bit must be '1' for the ip_protocol field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IP_PROTOCOL \
+               UINT32_C(0x800)
+       /*
+        * This bit must be '1' for the src_port field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_PORT \
+               UINT32_C(0x1000)
+       /*
+        * This bit must be '1' for the dst_port field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_PORT \
+               UINT32_C(0x2000)
+       /*
+        * This bit must be '1' for the dst_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_ID \
+               UINT32_C(0x4000)
+       /*
+        * This bit must be '1' for the mirror_vnic_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
+               UINT32_C(0x8000)
+       /*
+        * This bit must be '1' for the encap_record_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_ENCAP_RECORD_ID \
+               UINT32_C(0x10000)
+       /*
+        * This bit must be '1' for the meter_instance_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_METER_INSTANCE_ID \
+               UINT32_C(0x20000)
+       /*
+        * This value identifies a set of CFA data structures used for an L2
+        * context.
+        */
+       uint64_t        l2_filter_id;
+       /* Tunnel Type. */
+       uint8_t tunnel_type;
+       /* Non-tunnel */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
+               UINT32_C(0x0)
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
+               UINT32_C(0x1)
+       /* Network Virtualization Generic Routing Encapsulation (NVGRE) */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
+               UINT32_C(0x2)
+       /* Generic Routing Encapsulation (GRE) inside Ethernet payload */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
+               UINT32_C(0x3)
+       /* IP in IP */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
+               UINT32_C(0x4)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
+               UINT32_C(0x5)
+       /* Multi-Protocol Lable Switching (MPLS) */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
+               UINT32_C(0x6)
+       /* Stateless Transport Tunnel (STT) */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_STT \
+               UINT32_C(0x7)
+       /* Generic Routing Encapsulation (GRE) inside IP datagram payload */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
+               UINT32_C(0x8)
+       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
                UINT32_C(0x9)
-       /* Enhance Generic Routing Encapsulation (GRE version 1) inside IP datagram payload */
-       #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_IPGRE_V1 \
-               UINT32_C(0xa)
-       #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_LAST \
-               HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_IPGRE_V1
-       uint8_t unused_0;
+       /* Any tunneled traffic */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
+               UINT32_C(0xff)
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_LAST \
+               HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
+       uint8_t unused_0[3];
        /*
-        * Identifier of a tunnel L4 destination port value. Only applies to tunnel
-        * types that has l4 destination port parameters.
+        * Tunnel identifier.
+        * Virtual Network Identifier (VNI). Only valid with
+        * tunnel_types VXLAN, NVGRE, and Geneve.
+        * Only lower 24-bits of VNI field are used
+        * in setting up the filter.
         */
-       uint16_t        tunnel_dst_port_id;
-       uint8_t unused_1[4];
+       uint32_t        tunnel_id;
+       /*
+        * This value indicates the source MAC address in
+        * the Ethernet header.
+        */
+       uint8_t src_macaddr[6];
+       /* The meter instance to attach to the flow. */
+       uint16_t        meter_instance_id;
+       /*
+        * A value of 0xfff is considered invalid and implies the
+        * instance is not configured.
+        */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_INVALID \
+               UINT32_C(0xffff)
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_LAST \
+               HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_INVALID
+       /*
+        * This value indicates the destination MAC address in
+        * the Ethernet header.
+        */
+       uint8_t dst_macaddr[6];
+       /*
+        * This value indicates the VLAN ID of the outer VLAN tag
+        * in the Ethernet header.
+        */
+       uint16_t        ovlan_vid;
+       /*
+        * This value indicates the VLAN ID of the inner VLAN tag
+        * in the Ethernet header.
+        */
+       uint16_t        ivlan_vid;
+       /* This value indicates the ethertype in the Ethernet header. */
+       uint16_t        ethertype;
+       /*
+        * This value indicates the type of IP address.
+        * 4 - IPv4
+        * 6 - IPv6
+        * All others are invalid.
+        */
+       uint8_t ip_addr_type;
+       /* invalid */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN UINT32_C(0x0)
+       /* IPv4 */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV4    UINT32_C(0x4)
+       /* IPv6 */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV6    UINT32_C(0x6)
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_LAST \
+               HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
+       /*
+        * The value of protocol filed in IP header.
+        * Applies to UDP and TCP traffic.
+        * 6 - TCP
+        * 17 - UDP
+        */
+       uint8_t ip_protocol;
+       /* invalid */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN UINT32_C(0x0)
+       /* TCP */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_TCP     UINT32_C(0x6)
+       /* UDP */
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UDP     UINT32_C(0x11)
+       #define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_LAST \
+               HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UDP
+       uint8_t unused_1[2];
+       /*
+        * The value of source IP address to be used in filtering.
+        * For IPv4, first four bytes represent the IP address.
+        */
+       uint32_t        src_ipaddr[4];
+       /*
+        * big_endian = True
+        *     The value of destination IP address to be used in filtering.
+        *     For IPv4, first four bytes represent the IP address.
+        */
+       uint32_t        dst_ipaddr[4];
+       /*
+        * The value of source port to be used in filtering.
+        * Applies to UDP and TCP traffic.
+        */
+       uint16_t        src_port;
+       /*
+        * The value of destination port to be used in filtering.
+        * Applies to UDP and TCP traffic.
+        */
+       uint16_t        dst_port;
+       /*
+        * 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        dst_id;
+       /*
+        * Logical VNIC ID of the VNIC where traffic is
+        * mirrored.
+        */
+       uint16_t        mirror_vnic_id;
+       /* Logical ID of the encapsulation record. */
+       uint32_t        encap_record_id;
+       uint8_t unused_2[4];
 } __attribute__((packed));
 
-/* hwrm_tunnel_dst_port_free_output (size:128b/16B) */
-struct hwrm_tunnel_dst_port_free_output {
+/* hwrm_cfa_em_flow_alloc_output (size:192b/24B) */
+struct hwrm_cfa_em_flow_alloc_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -22064,68 +22514,3679 @@ struct hwrm_tunnel_dst_port_free_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       uint8_t unused_1[7];
+       /* This value is an opaque id into CFA data structures. */
+       uint64_t        em_filter_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.
+        */
+       uint32_t        flow_id;
+       uint8_t unused_0[3];
+       /*
+        * 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_em_flow_free *
+ *************************/
+
+
+/* hwrm_cfa_em_flow_free_input (size:192b/24B) */
+struct hwrm_cfa_em_flow_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* This value is an opaque id into CFA data structures. */
+       uint64_t        em_filter_id;
+} __attribute__((packed));
+
+/* hwrm_cfa_em_flow_free_output (size:128b/16B) */
+struct hwrm_cfa_em_flow_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_em_flow_cfg *
+ ************************/
+
+
+/* hwrm_cfa_em_flow_cfg_input (size:384b/48B) */
+struct hwrm_cfa_em_flow_cfg_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint32_t        enables;
+       /*
+        * This bit must be '1' for the new_dst_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_DST_ID \
+               UINT32_C(0x1)
+       /*
+        * This bit must be '1' for the new_mirror_vnic_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID \
+               UINT32_C(0x2)
+       /*
+        * This bit must be '1' for the new_meter_instance_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_EM_FLOW_CFG_INPUT_ENABLES_NEW_METER_INSTANCE_ID \
+               UINT32_C(0x4)
+       uint8_t unused_0[4];
+       /* This value is an opaque id into CFA data structures. */
+       uint64_t        em_filter_id;
+       /*
+        * If set, this value shall represent the new
+        * 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_dst_id;
+       /*
+        * New Logical VNIC ID of the VNIC where traffic is
+        * mirrored.
+        */
+       uint32_t        new_mirror_vnic_id;
+       /*
+        * New meter to attach to the flow. Specifying the
+        * invalid instance ID is used to remove any existing
+        * meter from the flow.
+        */
+       uint16_t        new_meter_instance_id;
+       /*
+        * A value of 0xfff is considered invalid and implies the
+        * instance is not configured.
+        */
+       #define HWRM_CFA_EM_FLOW_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID \
+               UINT32_C(0xffff)
+       #define HWRM_CFA_EM_FLOW_CFG_INPUT_NEW_METER_INSTANCE_ID_LAST \
+               HWRM_CFA_EM_FLOW_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID
+       uint8_t unused_1[6];
+} __attribute__((packed));
+
+/* hwrm_cfa_em_flow_cfg_output (size:128b/16B) */
+struct hwrm_cfa_em_flow_cfg_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_meter_profile_alloc *
+ ********************************/
+
+
+/* hwrm_cfa_meter_profile_alloc_input (size:320b/40B) */
+struct hwrm_cfa_meter_profile_alloc_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint8_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_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH     UINT32_C(0x1)
+       /* tx path */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_TX \
+               UINT32_C(0x0)
+       /* rx path */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_RX \
+               UINT32_C(0x1)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_RX
+       /* The meter algorithm type. */
+       uint8_t meter_type;
+       /* RFC 2697 (srTCM) */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC2697 \
+               UINT32_C(0x0)
+       /* RFC 2698 (trTCM) */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC2698 \
+               UINT32_C(0x1)
+       /* RFC 4115 (trTCM) */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC4115 \
+               UINT32_C(0x2)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC4115
+       /*
+        * This field is reserved for the future use.
+        * It shall be set to 0.
+        */
+       uint16_t        reserved1;
+       /*
+        * This field is reserved for the future use.
+        * It shall be set to 0.
+        */
+       uint32_t        reserved2;
+       /* A meter rate specified in bytes-per-second. */
+       uint32_t        commit_rate;
+       /* The bandwidth value. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_MASK \
+               UINT32_C(0xfffffff)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_SFT \
+               0
+       /* The granularity of the value (bits or bytes). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE \
+               UINT32_C(0x10000000)
+       /* Value is in bits. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_BITS \
+               (UINT32_C(0x0) << 28)
+       /* Value is in bytes. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_BYTES \
+               (UINT32_C(0x1) << 28)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_BYTES
+       /* bw_value_unit is 3 b */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MASK \
+               UINT32_C(0xe0000000)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_SFT \
+               29
+       /* Value is in Mb or MB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MEGA \
+               (UINT32_C(0x0) << 29)
+       /* Value is in Kb or KB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_KILO \
+               (UINT32_C(0x2) << 29)
+       /* Value is in bits or bytes. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_BASE \
+               (UINT32_C(0x4) << 29)
+       /* Value is in Gb or GB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_GIGA \
+               (UINT32_C(0x6) << 29)
+       /* Value is in 1/100th of a percentage of total bandwidth. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_PERCENT1_100 \
+               (UINT32_C(0x1) << 29)
+       /* Invalid unit */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_INVALID \
+               (UINT32_C(0x7) << 29)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_INVALID
+       /* A meter burst size specified in bytes. */
+       uint32_t        commit_burst;
+       /* The bandwidth value. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_MASK \
+               UINT32_C(0xfffffff)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_SFT \
+               0
+       /* The granularity of the value (bits or bytes). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE \
+               UINT32_C(0x10000000)
+       /* Value is in bits. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_BITS \
+               (UINT32_C(0x0) << 28)
+       /* Value is in bytes. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_BYTES \
+               (UINT32_C(0x1) << 28)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_BYTES
+       /* bw_value_unit is 3 b */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MASK \
+               UINT32_C(0xe0000000)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_SFT \
+               29
+       /* Value is in Mb or MB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MEGA \
+               (UINT32_C(0x0) << 29)
+       /* Value is in Kb or KB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_KILO \
+               (UINT32_C(0x2) << 29)
+       /* Value is in bits or bytes. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_BASE \
+               (UINT32_C(0x4) << 29)
+       /* Value is in Gb or GB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_GIGA \
+               (UINT32_C(0x6) << 29)
+       /* Value is in 1/100th of a percentage of total bandwidth. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_PERCENT1_100 \
+               (UINT32_C(0x1) << 29)
+       /* Invalid unit */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID \
+               (UINT32_C(0x7) << 29)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID
+       /* A meter rate specified in bytes-per-second. */
+       uint32_t        excess_peak_rate;
+       /* The bandwidth value. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_MASK \
+               UINT32_C(0xfffffff)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_SFT \
+               0
+       /* The granularity of the value (bits or bytes). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE \
+               UINT32_C(0x10000000)
+       /* Value is in bits. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_BITS \
+               (UINT32_C(0x0) << 28)
+       /* Value is in bytes. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES \
+               (UINT32_C(0x1) << 28)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES
+       /* bw_value_unit is 3 b */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MASK \
+               UINT32_C(0xe0000000)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_SFT \
+               29
+       /* Value is in Mb or MB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MEGA \
+               (UINT32_C(0x0) << 29)
+       /* Value is in Kb or KB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_KILO \
+               (UINT32_C(0x2) << 29)
+       /* Value is in bits or bytes. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_BASE \
+               (UINT32_C(0x4) << 29)
+       /* Value is in Gb or GB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_GIGA \
+               (UINT32_C(0x6) << 29)
+       /* Value is in 1/100th of a percentage of total bandwidth. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_PERCENT1_100 \
+               (UINT32_C(0x1) << 29)
+       /* Invalid unit */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_INVALID \
+               (UINT32_C(0x7) << 29)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_INVALID
+       /* A meter burst size specified in bytes. */
+       uint32_t        excess_peak_burst;
+       /* The bandwidth value. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_MASK \
+               UINT32_C(0xfffffff)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_SFT \
+               0
+       /* The granularity of the value (bits or bytes). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE \
+               UINT32_C(0x10000000)
+       /* Value is in bits. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_BITS \
+               (UINT32_C(0x0) << 28)
+       /* Value is in bytes. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES \
+               (UINT32_C(0x1) << 28)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES
+       /* bw_value_unit is 3 b */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MASK \
+               UINT32_C(0xe0000000)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_SFT \
+               29
+       /* Value is in Mb or MB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MEGA \
+               (UINT32_C(0x0) << 29)
+       /* Value is in Kb or KB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_KILO \
+               (UINT32_C(0x2) << 29)
+       /* Value is in bits or bytes. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_BASE \
+               (UINT32_C(0x4) << 29)
+       /* Value is in Gb or GB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_GIGA \
+               (UINT32_C(0x6) << 29)
+       /* Value is in 1/100th of a percentage of total bandwidth. */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_PERCENT1_100 \
+               (UINT32_C(0x1) << 29)
+       /* Invalid unit */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID \
+               (UINT32_C(0x7) << 29)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID
+} __attribute__((packed));
+
+/* hwrm_cfa_meter_profile_alloc_output (size:128b/16B) */
+struct hwrm_cfa_meter_profile_alloc_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* This value identifies a meter profile in CFA. */
+       uint16_t        meter_profile_id;
+       /*
+        * A value of 0xfff is considered invalid and implies the
+        * profile is not configured.
+        */
+       #define HWRM_CFA_METER_PROFILE_ALLOC_OUTPUT_METER_PROFILE_ID_INVALID \
+               UINT32_C(0xffff)
+       #define HWRM_CFA_METER_PROFILE_ALLOC_OUTPUT_METER_PROFILE_ID_LAST \
+               HWRM_CFA_METER_PROFILE_ALLOC_OUTPUT_METER_PROFILE_ID_INVALID
+       uint8_t unused_0[5];
+       /*
+        * 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_meter_profile_free *
+ *******************************/
+
+
+/* hwrm_cfa_meter_profile_free_input (size:192b/24B) */
+struct hwrm_cfa_meter_profile_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint8_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_METER_PROFILE_FREE_INPUT_FLAGS_PATH     UINT32_C(0x1)
+       /* tx path */
+       #define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_TX \
+               UINT32_C(0x0)
+       /* rx path */
+       #define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_RX \
+               UINT32_C(0x1)
+       #define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_LAST \
+               HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_RX
+       uint8_t unused_0;
+       /* This value identifies a meter profile in CFA. */
+       uint16_t        meter_profile_id;
+       /*
+        * A value of 0xfff is considered invalid and implies the
+        * profile is not configured.
+        */
+       #define HWRM_CFA_METER_PROFILE_FREE_INPUT_METER_PROFILE_ID_INVALID \
+               UINT32_C(0xffff)
+       #define HWRM_CFA_METER_PROFILE_FREE_INPUT_METER_PROFILE_ID_LAST \
+               HWRM_CFA_METER_PROFILE_FREE_INPUT_METER_PROFILE_ID_INVALID
+       uint8_t unused_1[4];
+} __attribute__((packed));
+
+/* hwrm_cfa_meter_profile_free_output (size:128b/16B) */
+struct hwrm_cfa_meter_profile_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_meter_profile_cfg *
+ ******************************/
+
+
+/* hwrm_cfa_meter_profile_cfg_input (size:320b/40B) */
+struct hwrm_cfa_meter_profile_cfg_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint8_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_METER_PROFILE_CFG_INPUT_FLAGS_PATH     UINT32_C(0x1)
+       /* tx path */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_TX    UINT32_C(0x0)
+       /* rx path */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_RX    UINT32_C(0x1)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_RX
+       /* The meter algorithm type. */
+       uint8_t meter_type;
+       /* RFC 2697 (srTCM) */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC2697 \
+               UINT32_C(0x0)
+       /* RFC 2698 (trTCM) */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC2698 \
+               UINT32_C(0x1)
+       /* RFC 4115 (trTCM) */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC4115 \
+               UINT32_C(0x2)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC4115
+       /* This value identifies a meter profile in CFA. */
+       uint16_t        meter_profile_id;
+       /*
+        * A value of 0xfff is considered invalid and implies the
+        * profile is not configured.
+        */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_PROFILE_ID_INVALID \
+               UINT32_C(0xffff)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_PROFILE_ID_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_PROFILE_ID_INVALID
+       /*
+        * This field is reserved for the future use.
+        * It shall be set to 0.
+        */
+       uint32_t        reserved;
+       /* A meter rate specified in bytes-per-second. */
+       uint32_t        commit_rate;
+       /* The bandwidth value. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_MASK \
+               UINT32_C(0xfffffff)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_SFT \
+               0
+       /* The granularity of the value (bits or bytes). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE \
+               UINT32_C(0x10000000)
+       /* Value is in bits. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_BITS \
+               (UINT32_C(0x0) << 28)
+       /* Value is in bytes. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_BYTES \
+               (UINT32_C(0x1) << 28)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_BYTES
+       /* bw_value_unit is 3 b */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MASK \
+               UINT32_C(0xe0000000)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_SFT \
+               29
+       /* Value is in Mb or MB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MEGA \
+               (UINT32_C(0x0) << 29)
+       /* Value is in Kb or KB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_KILO \
+               (UINT32_C(0x2) << 29)
+       /* Value is in bits or bytes. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_BASE \
+               (UINT32_C(0x4) << 29)
+       /* Value is in Gb or GB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_GIGA \
+               (UINT32_C(0x6) << 29)
+       /* Value is in 1/100th of a percentage of total bandwidth. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_PERCENT1_100 \
+               (UINT32_C(0x1) << 29)
+       /* Invalid unit */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_INVALID \
+               (UINT32_C(0x7) << 29)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_INVALID
+       /* A meter burst size specified in bytes. */
+       uint32_t        commit_burst;
+       /* The bandwidth value. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_MASK \
+               UINT32_C(0xfffffff)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_SFT \
+               0
+       /* The granularity of the value (bits or bytes). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE \
+               UINT32_C(0x10000000)
+       /* Value is in bits. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_BITS \
+               (UINT32_C(0x0) << 28)
+       /* Value is in bytes. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_BYTES \
+               (UINT32_C(0x1) << 28)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_BYTES
+       /* bw_value_unit is 3 b */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MASK \
+               UINT32_C(0xe0000000)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_SFT \
+               29
+       /* Value is in Mb or MB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MEGA \
+               (UINT32_C(0x0) << 29)
+       /* Value is in Kb or KB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_KILO \
+               (UINT32_C(0x2) << 29)
+       /* Value is in bits or bytes. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_BASE \
+               (UINT32_C(0x4) << 29)
+       /* Value is in Gb or GB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_GIGA \
+               (UINT32_C(0x6) << 29)
+       /* Value is in 1/100th of a percentage of total bandwidth. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_PERCENT1_100 \
+               (UINT32_C(0x1) << 29)
+       /* Invalid unit */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID \
+               (UINT32_C(0x7) << 29)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID
+       /* A meter rate specified in bytes-per-second. */
+       uint32_t        excess_peak_rate;
+       /* The bandwidth value. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_MASK \
+               UINT32_C(0xfffffff)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_SFT \
+               0
+       /* The granularity of the value (bits or bytes). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE \
+               UINT32_C(0x10000000)
+       /* Value is in bits. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_BITS \
+               (UINT32_C(0x0) << 28)
+       /* Value is in bytes. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES \
+               (UINT32_C(0x1) << 28)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES
+       /* bw_value_unit is 3 b */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MASK \
+               UINT32_C(0xe0000000)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_SFT \
+               29
+       /* Value is in Mb or MB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MEGA \
+               (UINT32_C(0x0) << 29)
+       /* Value is in Kb or KB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_KILO \
+               (UINT32_C(0x2) << 29)
+       /* Value is in bits or bytes. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_BASE \
+               (UINT32_C(0x4) << 29)
+       /* Value is in Gb or GB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_GIGA \
+               (UINT32_C(0x6) << 29)
+       /* Value is in 1/100th of a percentage of total bandwidth. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_PERCENT1_100 \
+               (UINT32_C(0x1) << 29)
+       /* Invalid unit */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_INVALID \
+               (UINT32_C(0x7) << 29)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_INVALID
+       /* A meter burst size specified in bytes. */
+       uint32_t        excess_peak_burst;
+       /* The bandwidth value. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_MASK \
+               UINT32_C(0xfffffff)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_SFT \
+               0
+       /* The granularity of the value (bits or bytes). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE \
+               UINT32_C(0x10000000)
+       /* Value is in bits. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_BITS \
+               (UINT32_C(0x0) << 28)
+       /* Value is in bytes. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES \
+               (UINT32_C(0x1) << 28)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES
+       /* bw_value_unit is 3 b */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MASK \
+               UINT32_C(0xe0000000)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_SFT \
+               29
+       /* Value is in Mb or MB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MEGA \
+               (UINT32_C(0x0) << 29)
+       /* Value is in Kb or KB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_KILO \
+               (UINT32_C(0x2) << 29)
+       /* Value is in bits or bytes. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_BASE \
+               (UINT32_C(0x4) << 29)
+       /* Value is in Gb or GB (base 10). */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_GIGA \
+               (UINT32_C(0x6) << 29)
+       /* Value is in 1/100th of a percentage of total bandwidth. */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_PERCENT1_100 \
+               (UINT32_C(0x1) << 29)
+       /* Invalid unit */
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID \
+               (UINT32_C(0x7) << 29)
+       #define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_LAST \
+               HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID
+} __attribute__((packed));
+
+/* hwrm_cfa_meter_profile_cfg_output (size:128b/16B) */
+struct hwrm_cfa_meter_profile_cfg_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_meter_instance_alloc *
+ *********************************/
+
+
+/* hwrm_cfa_meter_instance_alloc_input (size:192b/24B) */
+struct hwrm_cfa_meter_instance_alloc_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint8_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_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH \
+               UINT32_C(0x1)
+       /* tx path */
+       #define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_TX \
+               UINT32_C(0x0)
+       /* rx path */
+       #define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_RX \
+               UINT32_C(0x1)
+       #define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_LAST \
+               HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_RX
+       uint8_t unused_0;
+       /* This value identifies a meter profile in CFA. */
+       uint16_t        meter_profile_id;
+       /*
+        * A value of 0xfff is considered invalid and implies the
+        * profile is not configured.
+        */
+       #define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_METER_PROFILE_ID_INVALID \
+               UINT32_C(0xffff)
+       #define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_METER_PROFILE_ID_LAST \
+               HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_METER_PROFILE_ID_INVALID
+       uint8_t unused_1[4];
+} __attribute__((packed));
+
+/* hwrm_cfa_meter_instance_alloc_output (size:128b/16B) */
+struct hwrm_cfa_meter_instance_alloc_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* This value identifies a meter instance in CFA. */
+       uint16_t        meter_instance_id;
+       /*
+        * A value of 0xfff is considered invalid and implies the
+        * instance is not configured.
+        */
+       #define HWRM_CFA_METER_INSTANCE_ALLOC_OUTPUT_METER_INSTANCE_ID_INVALID \
+               UINT32_C(0xffff)
+       #define HWRM_CFA_METER_INSTANCE_ALLOC_OUTPUT_METER_INSTANCE_ID_LAST \
+               HWRM_CFA_METER_INSTANCE_ALLOC_OUTPUT_METER_INSTANCE_ID_INVALID
+       uint8_t unused_0[5];
+       /*
+        * 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_meter_instance_free *
+ ********************************/
+
+
+/* hwrm_cfa_meter_instance_free_input (size:192b/24B) */
+struct hwrm_cfa_meter_instance_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint8_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_METER_INSTANCE_FREE_INPUT_FLAGS_PATH     UINT32_C(0x1)
+       /* tx path */
+       #define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_TX \
+               UINT32_C(0x0)
+       /* rx path */
+       #define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_RX \
+               UINT32_C(0x1)
+       #define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_LAST \
+               HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_RX
+       uint8_t unused_0;
+       /* This value identifies a meter instance in CFA. */
+       uint16_t        meter_instance_id;
+       /*
+        * A value of 0xfff is considered invalid and implies the
+        * instance is not configured.
+        */
+       #define HWRM_CFA_METER_INSTANCE_FREE_INPUT_METER_INSTANCE_ID_INVALID \
+               UINT32_C(0xffff)
+       #define HWRM_CFA_METER_INSTANCE_FREE_INPUT_METER_INSTANCE_ID_LAST \
+               HWRM_CFA_METER_INSTANCE_FREE_INPUT_METER_INSTANCE_ID_INVALID
+       uint8_t unused_1[4];
+} __attribute__((packed));
+
+/* hwrm_cfa_meter_instance_free_output (size:128b/16B) */
+struct hwrm_cfa_meter_instance_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_decap_filter_alloc *
+ *******************************/
+
+
+/* hwrm_cfa_decap_filter_alloc_input (size:832b/104B) */
+struct hwrm_cfa_decap_filter_alloc_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint32_t        flags;
+       /* ovs_tunnel is 1 b */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_FLAGS_OVS_TUNNEL \
+               UINT32_C(0x1)
+       uint32_t        enables;
+       /*
+        * This bit must be '1' for the tunnel_type field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
+               UINT32_C(0x1)
+       /*
+        * This bit must be '1' for the tunnel_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_ID \
+               UINT32_C(0x2)
+       /*
+        * This bit must be '1' for the src_macaddr field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR \
+               UINT32_C(0x4)
+       /*
+        * This bit must be '1' for the dst_macaddr field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR \
+               UINT32_C(0x8)
+       /*
+        * This bit must be '1' for the ovlan_vid field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_OVLAN_VID \
+               UINT32_C(0x10)
+       /*
+        * This bit must be '1' for the ivlan_vid field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_IVLAN_VID \
+               UINT32_C(0x20)
+       /*
+        * This bit must be '1' for the t_ovlan_vid field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_T_OVLAN_VID \
+               UINT32_C(0x40)
+       /*
+        * This bit must be '1' for the t_ivlan_vid field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_T_IVLAN_VID \
+               UINT32_C(0x80)
+       /*
+        * This bit must be '1' for the ethertype field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE \
+               UINT32_C(0x100)
+       /*
+        * This bit must be '1' for the src_ipaddr field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR \
+               UINT32_C(0x200)
+       /*
+        * This bit must be '1' for the dst_ipaddr field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR \
+               UINT32_C(0x400)
+       /*
+        * This bit must be '1' for the ipaddr_type field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_IPADDR_TYPE \
+               UINT32_C(0x800)
+       /*
+        * This bit must be '1' for the ip_protocol field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_IP_PROTOCOL \
+               UINT32_C(0x1000)
+       /*
+        * This bit must be '1' for the src_port field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT \
+               UINT32_C(0x2000)
+       /*
+        * This bit must be '1' for the dst_port field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_PORT \
+               UINT32_C(0x4000)
+       /*
+        * This bit must be '1' for the dst_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_ID \
+               UINT32_C(0x8000)
+       /*
+        * This bit must be '1' for the mirror_vnic_id field to be
+        * configured.
+        */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
+               UINT32_C(0x10000)
+       /*
+        * Tunnel identifier.
+        * Virtual Network Identifier (VNI). Only valid with
+        * tunnel_types VXLAN, NVGRE, and Geneve.
+        * Only lower 24-bits of VNI field are used
+        * in setting up the filter.
+        */
+       uint32_t        tunnel_id;
+       /* Tunnel Type. */
+       uint8_t tunnel_type;
+       /* Non-tunnel */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
+               UINT32_C(0x0)
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
+               UINT32_C(0x1)
+       /* Network Virtualization Generic Routing Encapsulation (NVGRE) */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
+               UINT32_C(0x2)
+       /* Generic Routing Encapsulation (GRE) inside Ethernet payload */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
+               UINT32_C(0x3)
+       /* IP in IP */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
+               UINT32_C(0x4)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
+               UINT32_C(0x5)
+       /* Multi-Protocol Lable Switching (MPLS) */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
+               UINT32_C(0x6)
+       /* Stateless Transport Tunnel (STT) */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \
+               UINT32_C(0x7)
+       /* Generic Routing Encapsulation (GRE) inside IP datagram payload */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
+               UINT32_C(0x8)
+       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
+               UINT32_C(0x9)
+       /* Any tunneled traffic */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
+               UINT32_C(0xff)
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST \
+               HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
+       uint8_t unused_0;
+       uint16_t        unused_1;
+       /*
+        * This value indicates the source MAC address in
+        * the Ethernet header.
+        */
+       uint8_t src_macaddr[6];
+       uint8_t unused_2[2];
+       /*
+        * This value indicates the destination MAC address in
+        * the Ethernet header.
+        */
+       uint8_t dst_macaddr[6];
+       /*
+        * This value indicates the VLAN ID of the outer VLAN tag
+        * in the Ethernet header.
+        */
+       uint16_t        ovlan_vid;
+       /*
+        * This value indicates the VLAN ID of the inner VLAN tag
+        * in the Ethernet header.
+        */
+       uint16_t        ivlan_vid;
+       /*
+        * This value indicates the VLAN ID of the outer VLAN tag
+        * in the tunnel Ethernet header.
+        */
+       uint16_t        t_ovlan_vid;
+       /*
+        * This value indicates the VLAN ID of the inner VLAN tag
+        * in the tunnel Ethernet header.
+        */
+       uint16_t        t_ivlan_vid;
+       /* This value indicates the ethertype in the Ethernet header. */
+       uint16_t        ethertype;
+       /*
+        * This value indicates the type of IP address.
+        * 4 - IPv4
+        * 6 - IPv6
+        * All others are invalid.
+        */
+       uint8_t ip_addr_type;
+       /* invalid */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN \
+               UINT32_C(0x0)
+       /* IPv4 */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4 \
+               UINT32_C(0x4)
+       /* IPv6 */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6 \
+               UINT32_C(0x6)
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_LAST \
+               HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
+       /*
+        * The value of protocol filed in IP header.
+        * Applies to UDP and TCP traffic.
+        * 6 - TCP
+        * 17 - UDP
+        */
+       uint8_t ip_protocol;
+       /* invalid */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN \
+               UINT32_C(0x0)
+       /* TCP */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_TCP \
+               UINT32_C(0x6)
+       /* UDP */
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP \
+               UINT32_C(0x11)
+       #define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_LAST \
+               HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP
+       uint16_t        unused_3;
+       uint32_t        unused_4;
+       /*
+        * The value of source IP address to be used in filtering.
+        * For IPv4, first four bytes represent the IP address.
+        */
+       uint32_t        src_ipaddr[4];
+       /*
+        * The value of destination IP address to be used in filtering.
+        * For IPv4, first four bytes represent the IP address.
+        */
+       uint32_t        dst_ipaddr[4];
+       /*
+        * The value of source port to be used in filtering.
+        * Applies to UDP and TCP traffic.
+        */
+       uint16_t        src_port;
+       /*
+        * The value of destination port to be used in filtering.
+        * Applies to UDP and TCP traffic.
+        */
+       uint16_t        dst_port;
+       /*
+        * If set, this value shall represent the
+        * Logical VNIC ID of the destination VNIC for the RX
+        * path.
+        */
+       uint16_t        dst_id;
+       /*
+        * If set, this value shall represent the L2 context that matches the L2
+        * information of the decap filter.
+        */
+       uint16_t        l2_ctxt_ref_id;
+} __attribute__((packed));
+
+/* hwrm_cfa_decap_filter_alloc_output (size:128b/16B) */
+struct hwrm_cfa_decap_filter_alloc_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* This value is an opaque id into CFA data structures. */
+       uint32_t        decap_filter_id;
+       uint8_t unused_0[3];
+       /*
+        * 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_decap_filter_free *
+ ******************************/
+
+
+/* hwrm_cfa_decap_filter_free_input (size:192b/24B) */
+struct hwrm_cfa_decap_filter_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* This value is an opaque id into CFA data structures. */
+       uint32_t        decap_filter_id;
+       uint8_t unused_0[4];
+} __attribute__((packed));
+
+/* hwrm_cfa_decap_filter_free_output (size:128b/16B) */
+struct hwrm_cfa_decap_filter_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_flow_alloc *
+ ***********************/
+
+
+/* hwrm_cfa_flow_alloc_input (size:1024b/128B) */
+struct hwrm_cfa_flow_alloc_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint16_t        flags;
+       /* tunnel is 1 b */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_TUNNEL       UINT32_C(0x1)
+       /* num_vlan is 2 b */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_MASK UINT32_C(0x6)
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_SFT 1
+       /* no tags */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_NONE \
+               (UINT32_C(0x0) << 1)
+       /* 1 tag */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_ONE \
+               (UINT32_C(0x1) << 1)
+       /* 2 tags */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_TWO \
+               (UINT32_C(0x2) << 1)
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_LAST \
+               HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_TWO
+       /* Enumeration denoting the Flow Type. */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_MASK UINT32_C(0x38)
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_SFT 3
+       /* L2 flow */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_L2 \
+               (UINT32_C(0x0) << 3)
+       /* IPV4 flow */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_IPV4 \
+               (UINT32_C(0x1) << 3)
+       /* IPV6 flow */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_IPV6 \
+               (UINT32_C(0x2) << 3)
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_LAST \
+               HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_IPV6
+       /*
+        * Tx Flow: vf fid.
+        * Rx Flow: pf fid.
+        */
+       uint16_t        src_fid;
+       /* Tunnel handle valid when tunnel flag is set. */
+       uint32_t        tunnel_handle;
+       uint16_t        action_flags;
+       /*
+        * Setting of this flag indicates drop action. If this flag is not set,
+        * then it should be considered accept action.
+        */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_FWD \
+               UINT32_C(0x1)
+       /* recycle is 1 b */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_RECYCLE \
+               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_FLOW_ALLOC_INPUT_ACTION_FLAGS_DROP \
+               UINT32_C(0x4)
+       /* meter is 1 b */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_METER \
+               UINT32_C(0x8)
+       /* tunnel is 1 b */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_TUNNEL \
+               UINT32_C(0x10)
+       /* nat_src is 1 b */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NAT_SRC \
+               UINT32_C(0x20)
+       /* nat_dest is 1 b */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NAT_DEST \
+               UINT32_C(0x40)
+       /* nat_ipv4_address is 1 b */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NAT_IPV4_ADDRESS \
+               UINT32_C(0x80)
+       /* l2_header_rewrite is 1 b */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_L2_HEADER_REWRITE \
+               UINT32_C(0x100)
+       /* ttl_decrement is 1 b */
+       #define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_TTL_DECREMENT \
+               UINT32_C(0x200)
+       /*
+        * Tx Flow: pf or vf fid.
+        * Rx Flow: vf fid.
+        */
+       uint16_t        dst_fid;
+       /* VLAN tpid, valid when push_vlan flag is set. */
+       uint16_t        l2_rewrite_vlan_tpid;
+       /* VLAN tci, valid when push_vlan flag is set. */
+       uint16_t        l2_rewrite_vlan_tci;
+       /* Meter id, valid when meter flag is set. */
+       uint16_t        act_meter_id;
+       /* Flow with the same l2 context tcam key. */
+       uint16_t        ref_flow_handle;
+       /* This value sets the match value for the ethertype. */
+       uint16_t        ethertype;
+       /* valid when num tags is 1 or 2. */
+       uint16_t        outer_vlan_tci;
+       /* This value sets the match value for the Destination MAC address. */
+       uint16_t        dmac[3];
+       /* valid when num tags is 2. */
+       uint16_t        inner_vlan_tci;
+       /* This value sets the match value for the Source MAC address. */
+       uint16_t        smac[3];
+       /* The bit length of destination IP address mask. */
+       uint8_t ip_dst_mask_len;
+       /* The bit length of source IP address mask. */
+       uint8_t ip_src_mask_len;
+       /* The value of destination IPv4/IPv6 address. */
+       uint32_t        ip_dst[4];
+       /* The source IPv4/IPv6 address. */
+       uint32_t        ip_src[4];
+       /*
+        * The value of source port.
+        * Applies to UDP and TCP traffic.
+        */
+       uint16_t        l4_src_port;
+       /*
+        * The value of source port mask.
+        * Applies to UDP and TCP traffic.
+        */
+       uint16_t        l4_src_port_mask;
+       /*
+        * The value of destination port.
+        * Applies to UDP and TCP traffic.
+        */
+       uint16_t        l4_dst_port;
+       /*
+        * The value of destination port mask.
+        * Applies to UDP and TCP traffic.
+        */
+       uint16_t        l4_dst_port_mask;
+       /*
+        * NAT IPv4/6 address based on address type flag.
+        * 0 values are ignored.
+        */
+       uint32_t        nat_ip_address[4];
+       /* L2 header re-write Destination MAC address. */
+       uint16_t        l2_rewrite_dmac[3];
+       /*
+        * The NAT source/destination port based on direction flag.
+        * Applies to UDP and TCP traffic.
+        * 0 values are ignored.
+        */
+       uint16_t        nat_port;
+       /* L2 header re-write Source MAC address. */
+       uint16_t        l2_rewrite_smac[3];
+       /* The value of ip protocol. */
+       uint8_t ip_proto;
+       uint8_t unused_0;
+} __attribute__((packed));
+
+/* hwrm_cfa_flow_alloc_output (size:128b/16B) */
+struct hwrm_cfa_flow_alloc_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* Flow record index. */
+       uint16_t        flow_handle;
+       uint8_t unused_0[5];
+       /*
+        * 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_flow_free *
+ **********************/
+
+
+/* hwrm_cfa_flow_free_input (size:192b/24B) */
+struct hwrm_cfa_flow_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* Flow record index. */
+       uint16_t        flow_handle;
+       uint8_t unused_0[6];
+} __attribute__((packed));
+
+/* hwrm_cfa_flow_free_output (size:256b/32B) */
+struct hwrm_cfa_flow_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* packet is 64 b */
+       uint64_t        packet;
+       /* byte is 64 b */
+       uint64_t        byte;
+       uint8_t unused_0[7];
+       /*
+        * 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_flow_info *
+ **********************/
+
+
+/* hwrm_cfa_flow_info_input (size:192b/24B) */
+struct hwrm_cfa_flow_info_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* Flow record index. */
+       uint16_t        flow_handle;
+       /* Max flow handle */
+       #define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_MAX_MASK \
+               UINT32_C(0xfff)
+       #define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_MAX_SFT     0
+       /* CNP flow handle */
+       #define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_CNP_CNT \
+               UINT32_C(0x1000)
+       /* Direction rx = 1 */
+       #define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_DIR_RX \
+               UINT32_C(0x8000)
+       uint8_t unused_0[6];
+} __attribute__((packed));
+
+/* hwrm_cfa_flow_info_output (size:448b/56B) */
+struct hwrm_cfa_flow_info_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* flags is 8 b */
+       uint8_t flags;
+       /* profile is 8 b */
+       uint8_t profile;
+       /* src_fid is 16 b */
+       uint16_t        src_fid;
+       /* dst_fid is 16 b */
+       uint16_t        dst_fid;
+       /* l2_ctxt_id is 16 b */
+       uint16_t        l2_ctxt_id;
+       /* em_info is 64 b */
+       uint64_t        em_info;
+       /* tcam_info is 64 b */
+       uint64_t        tcam_info;
+       /* vfp_tcam_info is 64 b */
+       uint64_t        vfp_tcam_info;
+       /* ar_id is 16 b */
+       uint16_t        ar_id;
+       /* flow_handle is 16 b */
+       uint16_t        flow_handle;
+       /* tunnel_handle is 32 b */
+       uint32_t        tunnel_handle;
+       uint8_t unused_0[7];
+       /*
+        * 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_flow_flush *
+ ***********************/
+
+
+/* hwrm_cfa_flow_flush_input (size:192b/24B) */
+struct hwrm_cfa_flow_flush_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint32_t        flags;
+       uint8_t unused_0[4];
+} __attribute__((packed));
+
+/* hwrm_cfa_flow_flush_output (size:128b/16B) */
+struct hwrm_cfa_flow_flush_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_flow_stats *
+ ***********************/
+
+
+/* hwrm_cfa_flow_stats_input (size:320b/40B) */
+struct hwrm_cfa_flow_stats_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* Flow handle. */
+       uint16_t        num_flows;
+       /* Flow handle. */
+       uint16_t        flow_handle_0;
+       /* Flow handle. */
+       uint16_t        flow_handle_1;
+       /* Flow handle. */
+       uint16_t        flow_handle_2;
+       /* Flow handle. */
+       uint16_t        flow_handle_3;
+       /* Flow handle. */
+       uint16_t        flow_handle_4;
+       /* Flow handle. */
+       uint16_t        flow_handle_5;
+       /* Flow handle. */
+       uint16_t        flow_handle_6;
+       /* Flow handle. */
+       uint16_t        flow_handle_7;
+       /* Flow handle. */
+       uint16_t        flow_handle_8;
+       /* Flow handle. */
+       uint16_t        flow_handle_9;
+       uint8_t unused_0[2];
+} __attribute__((packed));
+
+/* hwrm_cfa_flow_stats_output (size:1408b/176B) */
+struct hwrm_cfa_flow_stats_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* packet_0 is 64 b */
+       uint64_t        packet_0;
+       /* packet_1 is 64 b */
+       uint64_t        packet_1;
+       /* packet_2 is 64 b */
+       uint64_t        packet_2;
+       /* packet_3 is 64 b */
+       uint64_t        packet_3;
+       /* packet_4 is 64 b */
+       uint64_t        packet_4;
+       /* packet_5 is 64 b */
+       uint64_t        packet_5;
+       /* packet_6 is 64 b */
+       uint64_t        packet_6;
+       /* packet_7 is 64 b */
+       uint64_t        packet_7;
+       /* packet_8 is 64 b */
+       uint64_t        packet_8;
+       /* packet_9 is 64 b */
+       uint64_t        packet_9;
+       /* byte_0 is 64 b */
+       uint64_t        byte_0;
+       /* byte_1 is 64 b */
+       uint64_t        byte_1;
+       /* byte_2 is 64 b */
+       uint64_t        byte_2;
+       /* byte_3 is 64 b */
+       uint64_t        byte_3;
+       /* byte_4 is 64 b */
+       uint64_t        byte_4;
+       /* byte_5 is 64 b */
+       uint64_t        byte_5;
+       /* byte_6 is 64 b */
+       uint64_t        byte_6;
+       /* byte_7 is 64 b */
+       uint64_t        byte_7;
+       /* byte_8 is 64 b */
+       uint64_t        byte_8;
+       /* byte_9 is 64 b */
+       uint64_t        byte_9;
+       uint8_t unused_0[7];
+       /*
+        * 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_vf_pair_alloc *
+ **************************/
+
+
+/* hwrm_cfa_vf_pair_alloc_input (size:448b/56B) */
+struct hwrm_cfa_vf_pair_alloc_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* Logical VF number (range: 0 -> MAX_VFS -1). */
+       uint16_t        vf_a_id;
+       /* Logical VF number (range: 0 -> MAX_VFS -1). */
+       uint16_t        vf_b_id;
+       uint8_t unused_0[4];
+       /* VF Pair name (32 byte string). */
+       char    pair_name[32];
+} __attribute__((packed));
+
+/* hwrm_cfa_vf_pair_alloc_output (size:128b/16B) */
+struct hwrm_cfa_vf_pair_alloc_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_vf_pair_free *
+ *************************/
+
+
+/* hwrm_cfa_vf_pair_free_input (size:384b/48B) */
+struct hwrm_cfa_vf_pair_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* VF Pair name (32 byte string). */
+       char    pair_name[32];
+} __attribute__((packed));
+
+/* hwrm_cfa_vf_pair_free_output (size:128b/16B) */
+struct hwrm_cfa_vf_pair_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_vf_pair_info *
+ *************************/
+
+
+/* hwrm_cfa_vf_pair_info_input (size:448b/56B) */
+struct hwrm_cfa_vf_pair_info_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint32_t        flags;
+       /* If this flag is set, lookup by name else lookup by index. */
+       #define HWRM_CFA_VF_PAIR_INFO_INPUT_FLAGS_LOOKUP_TYPE     UINT32_C(0x1)
+       /* vf pair table index. */
+       uint16_t        vf_pair_index;
+       uint8_t unused_0[2];
+       /* VF Pair name (32 byte string). */
+       char    vf_pair_name[32];
+} __attribute__((packed));
+
+/* hwrm_cfa_vf_pair_info_output (size:512b/64B) */
+struct hwrm_cfa_vf_pair_info_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* vf pair table index. */
+       uint16_t        next_vf_pair_index;
+       /* vf pair member a's vf_fid. */
+       uint16_t        vf_a_fid;
+       /* vf pair member a's Linux logical VF number. */
+       uint16_t        vf_a_index;
+       /* vf pair member b's vf_fid. */
+       uint16_t        vf_b_fid;
+       /* vf pair member a's Linux logical VF number. */
+       uint16_t        vf_b_index;
+       /* vf pair state. */
+       uint8_t pair_state;
+       /* Pair has been allocated */
+       #define HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_ALLOCATED UINT32_C(0x1)
+       /* Both pair members are active */
+       #define HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE    UINT32_C(0x2)
+       #define HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_LAST \
+               HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE
+       uint8_t unused_0[5];
+       /* VF Pair name (32 byte string). */
+       char    pair_name[32];
+       uint8_t unused_1[7];
+       /*
+        * 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_pair_alloc *
+ ***********************/
+
+
+/* hwrm_cfa_pair_alloc_input (size:576b/72B) */
+struct hwrm_cfa_pair_alloc_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* Pair mode (0-vf2fn, 1-rep2fn, 2-rep2rep, 3-proxy, 4-pfpair, 5-rep2fn_mod). */
+       uint8_t pair_mode;
+       /* Pair between VF on local host with PF or VF on specified host. */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_VF2FN         UINT32_C(0x0)
+       /* Pair between REP on local host with PF or VF on specified host. */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN        UINT32_C(0x1)
+       /* Pair between REP on local host with REP on specified host. */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2REP       UINT32_C(0x2)
+       /* Pair for the proxy interface. */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_PROXY         UINT32_C(0x3)
+       /* Pair for the PF interface. */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_PFPAIR        UINT32_C(0x4)
+       /* Modify exiting rep2fn pair and move pair to new PF. */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_MOD    UINT32_C(0x5)
+       /* Modify exiting rep2fn pairs paired with same PF and move pairs to new PF. */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_MODALL UINT32_C(0x6)
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_LAST \
+               HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_MODALL
+       uint8_t unused_0;
+       /* Logical VF number (range: 0 -> MAX_VFS -1). */
+       uint16_t        vf_a_id;
+       /* Logical Host (0xff-local host). */
+       uint8_t host_b_id;
+       /* Logical PF (0xff-PF for command channel). */
+       uint8_t pf_b_id;
+       /* Logical VF number (range: 0 -> MAX_VFS -1). */
+       uint16_t        vf_b_id;
+       /* Loopback port (0xff-internal loopback), valid for mode-3. */
+       uint8_t port_id;
+       /* Priority used for encap of loopback packets valid for mode-3. */
+       uint8_t pri;
+       /* New PF for rep2fn modify, valid for mode 5. */
+       uint16_t        new_pf_fid;
+       uint32_t        enables;
+       /*
+        * This bit must be '1' for the q_ab field to be
+        * configured.
+        */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_Q_AB_VALID      UINT32_C(0x1)
+       /*
+        * This bit must be '1' for the q_ba field to be
+        * configured.
+        */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_Q_BA_VALID      UINT32_C(0x2)
+       /*
+        * This bit must be '1' for the fc_ab field to be
+        * configured.
+        */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_FC_AB_VALID     UINT32_C(0x4)
+       /*
+        * This bit must be '1' for the fc_ba field to be
+        * configured.
+        */
+       #define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_FC_BA_VALID     UINT32_C(0x8)
+       /* VF Pair name (32 byte string). */
+       char    pair_name[32];
+       /*
+        * The q_ab value specifies the logical index of the TX/RX CoS
+        * queue to be assigned for traffic in the A to B direction of
+        * the interface pair. The default value is 0.
+        */
+       uint8_t q_ab;
+       /*
+        * The q_ba value specifies the logical index of the TX/RX CoS
+        * queue to be assigned for traffic in the B to A direction of
+        * the interface pair. The default value is 1.
+        */
+       uint8_t q_ba;
+       /*
+        * Specifies whether RX ring flow control is disabled (0) or enabled
+        * (1) in the A to B direction. The default value is 0, meaning that
+        * packets will be dropped when the B-side RX rings are full.
+        */
+       uint8_t fc_ab;
+       /*
+        * Specifies whether RX ring flow control is disabled (0) or enabled
+        * (1) in the B to A direction. The default value is 1, meaning that
+        * the RX CoS queue will be flow controlled when the A-side RX rings
+        * are full.
+        */
+       uint8_t fc_ba;
+       uint8_t unused_1[4];
+} __attribute__((packed));
+
+/* hwrm_cfa_pair_alloc_output (size:192b/24B) */
+struct hwrm_cfa_pair_alloc_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* Only valid for modes 1 and 2. */
+       uint16_t        rx_cfa_code_a;
+       /* Only valid for modes 1 and 2. */
+       uint16_t        tx_cfa_action_a;
+       /* Only valid for mode 2. */
+       uint16_t        rx_cfa_code_b;
+       /* Only valid for mode 2. */
+       uint16_t        tx_cfa_action_b;
+       uint8_t unused_0[7];
+       /*
+        * 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_pair_free *
+ **********************/
+
+
+/* hwrm_cfa_pair_free_input (size:384b/48B) */
+struct hwrm_cfa_pair_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* VF Pair name (32 byte string). */
+       char    pair_name[32];
+} __attribute__((packed));
+
+/* hwrm_cfa_pair_free_output (size:128b/16B) */
+struct hwrm_cfa_pair_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_pair_info *
+ **********************/
+
+
+/* hwrm_cfa_pair_info_input (size:448b/56B) */
+struct hwrm_cfa_pair_info_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       uint32_t        flags;
+       /* If this flag is set, lookup by name else lookup by index. */
+       #define HWRM_CFA_PAIR_INFO_INPUT_FLAGS_LOOKUP_TYPE      UINT32_C(0x1)
+       /* If this flag is set, lookup by PF id and VF id. */
+       #define HWRM_CFA_PAIR_INFO_INPUT_FLAGS_LOOKUP_REPRE     UINT32_C(0x2)
+       /* Pair table index. */
+       uint16_t        pair_index;
+       /* Pair pf index. */
+       uint8_t pair_pfid;
+       /* Pair vf index. */
+       uint8_t pair_vfid;
+       /* Pair name (32 byte string). */
+       char    pair_name[32];
+} __attribute__((packed));
+
+/* hwrm_cfa_pair_info_output (size:576b/72B) */
+struct hwrm_cfa_pair_info_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* Pair table index. */
+       uint16_t        next_pair_index;
+       /* Pair member a's fid. */
+       uint16_t        a_fid;
+       /* Logical host number. */
+       uint8_t host_a_index;
+       /* Logical PF number. */
+       uint8_t pf_a_index;
+       /* Pair member a's Linux logical VF number. */
+       uint16_t        vf_a_index;
+       /* Rx CFA code. */
+       uint16_t        rx_cfa_code_a;
+       /* Tx CFA action. */
+       uint16_t        tx_cfa_action_a;
+       /* Pair member b's fid. */
+       uint16_t        b_fid;
+       /* Logical host number. */
+       uint8_t host_b_index;
+       /* Logical PF number. */
+       uint8_t pf_b_index;
+       /* Pair member a's Linux logical VF number. */
+       uint16_t        vf_b_index;
+       /* Rx CFA code. */
+       uint16_t        rx_cfa_code_b;
+       /* Tx CFA action. */
+       uint16_t        tx_cfa_action_b;
+       /* Pair mode (0-vf2fn, 1-rep2fn, 2-rep2rep, 3-proxy, 4-pfpair). */
+       uint8_t pair_mode;
+       /* Pair between VF on local host with PF or VF on specified host. */
+       #define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_VF2FN   UINT32_C(0x0)
+       /* Pair between REP on local host with PF or VF on specified host. */
+       #define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_REP2FN  UINT32_C(0x1)
+       /* Pair between REP on local host with REP on specified host. */
+       #define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_REP2REP UINT32_C(0x2)
+       /* Pair for the proxy interface. */
+       #define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_PROXY   UINT32_C(0x3)
+       /* Pair for the PF interface. */
+       #define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_PFPAIR  UINT32_C(0x4)
+       #define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_LAST \
+               HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_PFPAIR
+       /* Pair state. */
+       uint8_t pair_state;
+       /* Pair has been allocated */
+       #define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_ALLOCATED UINT32_C(0x1)
+       /* Both pair members are active */
+       #define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE    UINT32_C(0x2)
+       #define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_LAST \
+               HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE
+       /* Pair name (32 byte string). */
+       char    pair_name[32];
+       uint8_t unused_0[7];
+       /*
+        * 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_vfr_alloc *
+ **********************/
+
+
+/* hwrm_cfa_vfr_alloc_input (size:448b/56B) */
+struct hwrm_cfa_vfr_alloc_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* Logical VF number (range: 0 -> MAX_VFS -1). */
+       uint16_t        vf_id;
+       /*
+        * This field is reserved for the future use.
+        * It shall be set to 0.
+        */
+       uint16_t        reserved;
+       uint8_t unused_0[4];
+       /* VF Representor name (32 byte string). */
+       char    vfr_name[32];
+} __attribute__((packed));
+
+/* hwrm_cfa_vfr_alloc_output (size:128b/16B) */
+struct hwrm_cfa_vfr_alloc_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* Rx CFA code. */
+       uint16_t        rx_cfa_code;
+       /* Tx CFA action. */
+       uint16_t        tx_cfa_action;
+       uint8_t unused_0[3];
+       /*
+        * 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_vfr_free *
+ *********************/
+
+
+/* hwrm_cfa_vfr_free_input (size:384b/48B) */
+struct hwrm_cfa_vfr_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* VF Representor name (32 byte string). */
+       char    vfr_name[32];
+} __attribute__((packed));
+
+/* hwrm_cfa_vfr_free_output (size:128b/16B) */
+struct hwrm_cfa_vfr_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_tunnel_dst_port_query *
+ ******************************/
+
+
+/* hwrm_tunnel_dst_port_query_input (size:192b/24B) */
+struct hwrm_tunnel_dst_port_query_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* Tunnel Type. */
+       uint8_t tunnel_type;
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN \
+               UINT32_C(0x1)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_GENEVE \
+               UINT32_C(0x5)
+       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
+       #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN_V4 \
+               UINT32_C(0x9)
+       /* Enhance Generic Routing Encapsulation (GRE version 1) inside IP datagram payload */
+       #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_IPGRE_V1 \
+               UINT32_C(0xa)
+       #define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_LAST \
+               HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_IPGRE_V1
+       uint8_t unused_0[7];
+} __attribute__((packed));
+
+/* hwrm_tunnel_dst_port_query_output (size:128b/16B) */
+struct hwrm_tunnel_dst_port_query_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /*
+        * This field represents the identifier of L4 destination port
+        * used for the given tunnel type. This field is valid for
+        * specific tunnel types that use layer 4 (e.g. UDP)
+        * transports for tunneling.
+        */
+       uint16_t        tunnel_dst_port_id;
+       /*
+        * This field represents the value of L4 destination port
+        * identified by tunnel_dst_port_id. This field is valid for
+        * specific tunnel types that use layer 4 (e.g. UDP)
+        * transports for tunneling.
+        * This field is in network byte order.
+        *
+        * A value of 0 means that the destination port is not
+        * configured.
+        */
+       uint16_t        tunnel_dst_port_val;
+       uint8_t unused_0[3];
+       /*
+        * 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_tunnel_dst_port_alloc *
+ ******************************/
+
+
+/* hwrm_tunnel_dst_port_alloc_input (size:192b/24B) */
+struct hwrm_tunnel_dst_port_alloc_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* Tunnel Type. */
+       uint8_t tunnel_type;
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
+               UINT32_C(0x1)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
+               UINT32_C(0x5)
+       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
+       #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
+               UINT32_C(0x9)
+       /* Enhance Generic Routing Encapsulation (GRE version 1) inside IP datagram payload */
+       #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
+               UINT32_C(0xa)
+       #define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_LAST \
+               HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1
+       uint8_t unused_0;
+       /*
+        * This field represents the value of L4 destination port used
+        * for the given tunnel type. This field is valid for
+        * specific tunnel types that use layer 4 (e.g. UDP)
+        * transports for tunneling.
+        *
+        * This field is in network byte order.
+        *
+        * A value of 0 shall fail the command.
+        */
+       uint16_t        tunnel_dst_port_val;
+       uint8_t unused_1[4];
+} __attribute__((packed));
+
+/* hwrm_tunnel_dst_port_alloc_output (size:128b/16B) */
+struct hwrm_tunnel_dst_port_alloc_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /*
+        * Identifier of a tunnel L4 destination port value. Only applies to tunnel
+        * types that has l4 destination port parameters.
+        */
+       uint16_t        tunnel_dst_port_id;
+       uint8_t unused_0[5];
+       /*
+        * 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_tunnel_dst_port_free *
+ *****************************/
+
+
+/* hwrm_tunnel_dst_port_free_input (size:192b/24B) */
+struct hwrm_tunnel_dst_port_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* Tunnel Type. */
+       uint8_t tunnel_type;
+       /* Virtual eXtensible Local Area Network (VXLAN) */
+       #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN \
+               UINT32_C(0x1)
+       /* Generic Network Virtualization Encapsulation (Geneve) */
+       #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GENEVE \
+               UINT32_C(0x5)
+       /* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
+       #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN_V4 \
+               UINT32_C(0x9)
+       /* Enhance Generic Routing Encapsulation (GRE version 1) inside IP datagram payload */
+       #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_IPGRE_V1 \
+               UINT32_C(0xa)
+       #define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_LAST \
+               HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_IPGRE_V1
+       uint8_t unused_0;
+       /*
+        * Identifier of a tunnel L4 destination port value. Only applies to tunnel
+        * types that has l4 destination port parameters.
+        */
+       uint16_t        tunnel_dst_port_id;
+       uint8_t unused_1[4];
+} __attribute__((packed));
+
+/* hwrm_tunnel_dst_port_free_output (size:128b/16B) */
+struct hwrm_tunnel_dst_port_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_1[7];
+       /*
+        * 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));
+
+/* ctx_hw_stats (size:1280b/160B) */
+struct ctx_hw_stats {
+       /* Number of received unicast packets */
+       uint64_t        rx_ucast_pkts;
+       /* Number of received multicast packets */
+       uint64_t        rx_mcast_pkts;
+       /* Number of received broadcast packets */
+       uint64_t        rx_bcast_pkts;
+       /* Number of discarded packets on received path */
+       uint64_t        rx_discard_pkts;
+       /* Number of dropped packets on received path */
+       uint64_t        rx_drop_pkts;
+       /* Number of received bytes for unicast traffic */
+       uint64_t        rx_ucast_bytes;
+       /* Number of received bytes for multicast traffic */
+       uint64_t        rx_mcast_bytes;
+       /* Number of received bytes for broadcast traffic */
+       uint64_t        rx_bcast_bytes;
+       /* Number of transmitted unicast packets */
+       uint64_t        tx_ucast_pkts;
+       /* Number of transmitted multicast packets */
+       uint64_t        tx_mcast_pkts;
+       /* Number of transmitted broadcast packets */
+       uint64_t        tx_bcast_pkts;
+       /* Number of discarded packets on transmit path */
+       uint64_t        tx_discard_pkts;
+       /* Number of dropped packets on transmit path */
+       uint64_t        tx_drop_pkts;
+       /* Number of transmitted bytes for unicast traffic */
+       uint64_t        tx_ucast_bytes;
+       /* Number of transmitted bytes for multicast traffic */
+       uint64_t        tx_mcast_bytes;
+       /* Number of transmitted bytes for broadcast traffic */
+       uint64_t        tx_bcast_bytes;
+       /* Number of TPA packets */
+       uint64_t        tpa_pkts;
+       /* Number of TPA bytes */
+       uint64_t        tpa_bytes;
+       /* Number of TPA events */
+       uint64_t        tpa_events;
+       /* Number of TPA aborts */
+       uint64_t        tpa_aborts;
+} __attribute__((packed));
+
+/***********************
+ * hwrm_stat_ctx_alloc *
+ ***********************/
+
+
+/* hwrm_stat_ctx_alloc_input (size:256b/32B) */
+struct hwrm_stat_ctx_alloc_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* This is the address for statistic block. */
+       uint64_t        stats_dma_addr;
+       /*
+        * 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        update_period_ms;
+       /*
+        * This field is used to specify statistics context specific
+        * configuration flags.
+        */
+       uint8_t stat_ctx_flags;
+       /*
+        * When this bit is set to '1', the statistics context shall be
+        * allocated for RoCE traffic only. In this case, traffic other
+        * than offloaded RoCE traffic shall not be included in this
+        * statistic context.
+        * When this bit is set to '0', the statistics context shall be
+        * used for the network traffic other than offloaded RoCE traffic.
+        */
+       #define HWRM_STAT_CTX_ALLOC_INPUT_STAT_CTX_FLAGS_ROCE     UINT32_C(0x1)
+       uint8_t unused_0[3];
+} __attribute__((packed));
+
+/* hwrm_stat_ctx_alloc_output (size:128b/16B) */
+struct hwrm_stat_ctx_alloc_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* This is the statistics context ID value. */
+       uint32_t        stat_ctx_id;
+       uint8_t unused_0[3];
+       /*
+        * 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 *
+ **********************/
+
+
+/* hwrm_stat_ctx_free_input (size:192b/24B) */
+struct hwrm_stat_ctx_free_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* ID of the statistics context that is being queried. */
+       uint32_t        stat_ctx_id;
+       uint8_t unused_0[4];
+} __attribute__((packed));
+
+/* hwrm_stat_ctx_free_output (size:128b/16B) */
+struct hwrm_stat_ctx_free_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* This is the statistics context ID value. */
+       uint32_t        stat_ctx_id;
+       uint8_t unused_0[3];
+       /*
+        * 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_query *
+ ***********************/
+
+
+/* hwrm_stat_ctx_query_input (size:192b/24B) */
+struct hwrm_stat_ctx_query_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* ID of the statistics context that is being queried. */
+       uint32_t        stat_ctx_id;
+       uint8_t unused_0[4];
+} __attribute__((packed));
+
+/* hwrm_stat_ctx_query_output (size:1408b/176B) */
+struct hwrm_stat_ctx_query_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* Number of transmitted unicast packets */
+       uint64_t        tx_ucast_pkts;
+       /* Number of transmitted multicast packets */
+       uint64_t        tx_mcast_pkts;
+       /* Number of transmitted broadcast packets */
+       uint64_t        tx_bcast_pkts;
+       /* Number of transmitted packets with error */
+       uint64_t        tx_err_pkts;
+       /* Number of dropped packets on transmit path */
+       uint64_t        tx_drop_pkts;
+       /* Number of transmitted bytes for unicast traffic */
+       uint64_t        tx_ucast_bytes;
+       /* Number of transmitted bytes for multicast traffic */
+       uint64_t        tx_mcast_bytes;
+       /* Number of transmitted bytes for broadcast traffic */
+       uint64_t        tx_bcast_bytes;
+       /* Number of received unicast packets */
+       uint64_t        rx_ucast_pkts;
+       /* Number of received multicast packets */
+       uint64_t        rx_mcast_pkts;
+       /* Number of received broadcast packets */
+       uint64_t        rx_bcast_pkts;
+       /* Number of received packets with error */
+       uint64_t        rx_err_pkts;
+       /* Number of dropped packets on received path */
+       uint64_t        rx_drop_pkts;
+       /* Number of received bytes for unicast traffic */
+       uint64_t        rx_ucast_bytes;
+       /* Number of received bytes for multicast traffic */
+       uint64_t        rx_mcast_bytes;
+       /* Number of received bytes for broadcast traffic */
+       uint64_t        rx_bcast_bytes;
+       /* Number of aggregated unicast packets */
+       uint64_t        rx_agg_pkts;
+       /* Number of aggregated unicast bytes */
+       uint64_t        rx_agg_bytes;
+       /* Number of aggregation events */
+       uint64_t        rx_agg_events;
+       /* Number of aborted aggregations */
+       uint64_t        rx_agg_aborts;
+       uint8_t unused_0[7];
+       /*
+        * 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_clr_stats *
+ ***************************/
+
+
+/* hwrm_stat_ctx_clr_stats_input (size:192b/24B) */
+struct hwrm_stat_ctx_clr_stats_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /* ID of the statistics context that is being queried. */
+       uint32_t        stat_ctx_id;
+       uint8_t unused_0[4];
+} __attribute__((packed));
+
+/* hwrm_stat_ctx_clr_stats_output (size:128b/16B) */
+struct hwrm_stat_ctx_clr_stats_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_pcie_qstats *
+ ********************/
+
+
+/* hwrm_pcie_qstats_input (size:256b/32B) */
+struct hwrm_pcie_qstats_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /*
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
+        */
+       uint16_t        cmpl_ring;
+       /*
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        */
+       uint16_t        seq_id;
+       /*
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
+        */
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
+       /*
+        * The size of PCIe statistics block in bytes.
+        * Firmware will DMA the PCIe statistics to
+        * the host with this field size in the response.
+        */
+       uint16_t        pcie_stat_size;
+       uint8_t unused_0[6];
+       /*
+        * This is the host address where
+        * PCIe statistics will be stored
+        */
+       uint64_t        pcie_stat_host_addr;
+} __attribute__((packed));
+
+/* hwrm_pcie_qstats_output (size:128b/16B) */
+struct hwrm_pcie_qstats_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* The size of PCIe statistics block in bytes. */
+       uint16_t        pcie_stat_size;
+       uint8_t unused_0[5];
+       /*
+        * 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));
+
+/* Port Tx Statistics Formats */
+/* tx_port_stats (size:3264b/408B) */
+struct tx_port_stats {
+       /* Total Number of 64 Bytes frames transmitted */
+       uint64_t        tx_64b_frames;
+       /* Total Number of 65-127 Bytes frames transmitted */
+       uint64_t        tx_65b_127b_frames;
+       /* Total Number of 128-255 Bytes frames transmitted */
+       uint64_t        tx_128b_255b_frames;
+       /* Total Number of 256-511 Bytes frames transmitted */
+       uint64_t        tx_256b_511b_frames;
+       /* Total Number of 512-1023 Bytes frames transmitted */
+       uint64_t        tx_512b_1023b_frames;
+       /* Total Number of 1024-1518 Bytes frames transmitted */
+       uint64_t        tx_1024b_1518_frames;
+       /*
+        * Total Number of each good VLAN (exludes FCS errors)
+        * frame transmitted which is 1519 to 1522 bytes in length
+        * inclusive (excluding framing bits but including FCS bytes).
+        */
+       uint64_t        tx_good_vlan_frames;
+       /* Total Number of 1519-2047 Bytes frames transmitted */
+       uint64_t        tx_1519b_2047_frames;
+       /* Total Number of 2048-4095 Bytes frames transmitted */
+       uint64_t        tx_2048b_4095b_frames;
+       /* Total Number of 4096-9216 Bytes frames transmitted */
+       uint64_t        tx_4096b_9216b_frames;
+       /* Total Number of 9217-16383 Bytes frames transmitted */
+       uint64_t        tx_9217b_16383b_frames;
+       /* Total Number of good frames transmitted */
+       uint64_t        tx_good_frames;
+       /* Total Number of frames transmitted */
+       uint64_t        tx_total_frames;
+       /* Total number of unicast frames transmitted */
+       uint64_t        tx_ucast_frames;
+       /* Total number of multicast frames transmitted */
+       uint64_t        tx_mcast_frames;
+       /* Total number of broadcast frames transmitted */
+       uint64_t        tx_bcast_frames;
+       /* Total number of PAUSE control frames transmitted */
+       uint64_t        tx_pause_frames;
+       /*
+        * Total number of PFC/per-priority PAUSE
+        * control frames transmitted
+        */
+       uint64_t        tx_pfc_frames;
+       /* Total number of jabber frames transmitted */
+       uint64_t        tx_jabber_frames;
+       /* Total number of frames transmitted with FCS error */
+       uint64_t        tx_fcs_err_frames;
+       /* Total number of control frames transmitted */
+       uint64_t        tx_control_frames;
+       /* Total number of over-sized frames transmitted */
+       uint64_t        tx_oversz_frames;
+       /* Total number of frames with single deferral */
+       uint64_t        tx_single_dfrl_frames;
+       /* Total number of frames with multiple deferrals */
+       uint64_t        tx_multi_dfrl_frames;
+       /* Total number of frames with single collision */
+       uint64_t        tx_single_coll_frames;
+       /* Total number of frames with multiple collisions */
+       uint64_t        tx_multi_coll_frames;
+       /* Total number of frames with late collisions */
+       uint64_t        tx_late_coll_frames;
+       /* Total number of frames with excessive collisions */
+       uint64_t        tx_excessive_coll_frames;
+       /* Total number of fragmented frames transmitted */
+       uint64_t        tx_frag_frames;
+       /* Total number of transmit errors */
+       uint64_t        tx_err;
+       /* Total number of single VLAN tagged frames transmitted */
+       uint64_t        tx_tagged_frames;
+       /* Total number of double VLAN tagged frames transmitted */
+       uint64_t        tx_dbl_tagged_frames;
+       /* Total number of runt frames transmitted */
+       uint64_t        tx_runt_frames;
+       /* Total number of TX FIFO under runs */
+       uint64_t        tx_fifo_underruns;
+       /*
+        * Total number of PFC frames with PFC enabled bit for
+        * Pri 0 transmitted
+        */
+       uint64_t        tx_pfc_ena_frames_pri0;
+       /*
+        * Total number of PFC frames with PFC enabled bit for
+        * Pri 1 transmitted
+        */
+       uint64_t        tx_pfc_ena_frames_pri1;
+       /*
+        * Total number of PFC frames with PFC enabled bit for
+        * Pri 2 transmitted
+        */
+       uint64_t        tx_pfc_ena_frames_pri2;
+       /*
+        * Total number of PFC frames with PFC enabled bit for
+        * Pri 3 transmitted
+        */
+       uint64_t        tx_pfc_ena_frames_pri3;
+       /*
+        * Total number of PFC frames with PFC enabled bit for
+        * Pri 4 transmitted
+        */
+       uint64_t        tx_pfc_ena_frames_pri4;
+       /*
+        * Total number of PFC frames with PFC enabled bit for
+        * Pri 5 transmitted
+        */
+       uint64_t        tx_pfc_ena_frames_pri5;
+       /*
+        * Total number of PFC frames with PFC enabled bit for
+        * Pri 6 transmitted
+        */
+       uint64_t        tx_pfc_ena_frames_pri6;
+       /*
+        * Total number of PFC frames with PFC enabled bit for
+        * Pri 7 transmitted
+        */
+       uint64_t        tx_pfc_ena_frames_pri7;
+       /* Total number of EEE LPI Events on TX */
+       uint64_t        tx_eee_lpi_events;
+       /* EEE LPI Duration Counter on TX */
+       uint64_t        tx_eee_lpi_duration;
+       /*
+        * Total number of Link Level Flow Control (LLFC) messages
+        * transmitted
+        */
+       uint64_t        tx_llfc_logical_msgs;
+       /* Total number of HCFC messages transmitted */
+       uint64_t        tx_hcfc_msgs;
+       /* Total number of TX collisions */
+       uint64_t        tx_total_collisions;
+       /* Total number of transmitted bytes */
+       uint64_t        tx_bytes;
+       /* Total number of end-to-end HOL frames */
+       uint64_t        tx_xthol_frames;
+       /* Total Tx Drops per Port reported by STATS block */
+       uint64_t        tx_stat_discard;
+       /* Total Tx Error Drops per Port reported by STATS block */
+       uint64_t        tx_stat_error;
+} __attribute__((packed));
+
+/* Port Rx Statistics Formats */
+/* rx_port_stats (size:4224b/528B) */
+struct rx_port_stats {
+       /* Total Number of 64 Bytes frames received */
+       uint64_t        rx_64b_frames;
+       /* Total Number of 65-127 Bytes frames received */
+       uint64_t        rx_65b_127b_frames;
+       /* Total Number of 128-255 Bytes frames received */
+       uint64_t        rx_128b_255b_frames;
+       /* Total Number of 256-511 Bytes frames received */
+       uint64_t        rx_256b_511b_frames;
+       /* Total Number of 512-1023 Bytes frames received */
+       uint64_t        rx_512b_1023b_frames;
+       /* Total Number of 1024-1518 Bytes frames received */
+       uint64_t        rx_1024b_1518_frames;
+       /*
+        * Total Number of each good VLAN (exludes FCS errors)
+        * frame received which is 1519 to 1522 bytes in length
+        * inclusive (excluding framing bits but including FCS bytes).
+        */
+       uint64_t        rx_good_vlan_frames;
+       /* Total Number of 1519-2047 Bytes frames received */
+       uint64_t        rx_1519b_2047b_frames;
+       /* Total Number of 2048-4095 Bytes frames received */
+       uint64_t        rx_2048b_4095b_frames;
+       /* Total Number of 4096-9216 Bytes frames received */
+       uint64_t        rx_4096b_9216b_frames;
+       /* Total Number of 9217-16383 Bytes frames received */
+       uint64_t        rx_9217b_16383b_frames;
+       /* Total number of frames received */
+       uint64_t        rx_total_frames;
+       /* Total number of unicast frames received */
+       uint64_t        rx_ucast_frames;
+       /* Total number of multicast frames received */
+       uint64_t        rx_mcast_frames;
+       /* Total number of broadcast frames received */
+       uint64_t        rx_bcast_frames;
+       /* Total number of received frames with FCS error */
+       uint64_t        rx_fcs_err_frames;
+       /* Total number of control frames received */
+       uint64_t        rx_ctrl_frames;
+       /* Total number of PAUSE frames received */
+       uint64_t        rx_pause_frames;
+       /* Total number of PFC frames received */
+       uint64_t        rx_pfc_frames;
+       /*
+        * Total number of frames received with an unsupported
+        * opcode
+        */
+       uint64_t        rx_unsupported_opcode_frames;
+       /*
+        * Total number of frames received with an unsupported
+        * DA for pause and PFC
+        */
+       uint64_t        rx_unsupported_da_pausepfc_frames;
+       /* Total number of frames received with an unsupported SA */
+       uint64_t        rx_wrong_sa_frames;
+       /* Total number of received packets with alignment error */
+       uint64_t        rx_align_err_frames;
+       /* Total number of received frames with out-of-range length */
+       uint64_t        rx_oor_len_frames;
+       /* Total number of received frames with error termination */
+       uint64_t        rx_code_err_frames;
+       /*
+        * Total number of received frames with a false carrier is
+        * detected during idle, as defined by RX_ER samples active
+        * and RXD is 0xE. The event is reported along with the
+        * statistics generated on the next received frame. Only
+        * one false carrier condition can be detected and logged
+        * between frames.
+        *
+        * Carrier event, valid for 10M/100M speed modes only.
+        */
+       uint64_t        rx_false_carrier_frames;
+       /* Total number of over-sized frames received */
+       uint64_t        rx_ovrsz_frames;
+       /* Total number of jabber packets received */
+       uint64_t        rx_jbr_frames;
+       /* Total number of received frames with MTU error */
+       uint64_t        rx_mtu_err_frames;
+       /* Total number of received frames with CRC match */
+       uint64_t        rx_match_crc_frames;
+       /* Total number of frames received promiscuously */
+       uint64_t        rx_promiscuous_frames;
+       /*
+        * Total number of received frames with one or two VLAN
+        * tags
+        */
+       uint64_t        rx_tagged_frames;
+       /* Total number of received frames with two VLAN tags */
+       uint64_t        rx_double_tagged_frames;
+       /* Total number of truncated frames received */
+       uint64_t        rx_trunc_frames;
+       /* Total number of good frames (without errors) received */
+       uint64_t        rx_good_frames;
+       /*
+        * Total number of received PFC frames with transition from
+        * XON to XOFF on Pri 0
+        */
+       uint64_t        rx_pfc_xon2xoff_frames_pri0;
+       /*
+        * Total number of received PFC frames with transition from
+        * XON to XOFF on Pri 1
+        */
+       uint64_t        rx_pfc_xon2xoff_frames_pri1;
+       /*
+        * Total number of received PFC frames with transition from
+        * XON to XOFF on Pri 2
+        */
+       uint64_t        rx_pfc_xon2xoff_frames_pri2;
+       /*
+        * Total number of received PFC frames with transition from
+        * XON to XOFF on Pri 3
+        */
+       uint64_t        rx_pfc_xon2xoff_frames_pri3;
+       /*
+        * Total number of received PFC frames with transition from
+        * XON to XOFF on Pri 4
+        */
+       uint64_t        rx_pfc_xon2xoff_frames_pri4;
+       /*
+        * Total number of received PFC frames with transition from
+        * XON to XOFF on Pri 5
+        */
+       uint64_t        rx_pfc_xon2xoff_frames_pri5;
+       /*
+        * Total number of received PFC frames with transition from
+        * XON to XOFF on Pri 6
+        */
+       uint64_t        rx_pfc_xon2xoff_frames_pri6;
+       /*
+        * Total number of received PFC frames with transition from
+        * XON to XOFF on Pri 7
+        */
+       uint64_t        rx_pfc_xon2xoff_frames_pri7;
+       /*
+        * Total number of received PFC frames with PFC enabled
+        * bit for Pri 0
+        */
+       uint64_t        rx_pfc_ena_frames_pri0;
+       /*
+        * Total number of received PFC frames with PFC enabled
+        * bit for Pri 1
+        */
+       uint64_t        rx_pfc_ena_frames_pri1;
+       /*
+        * Total number of received PFC frames with PFC enabled
+        * bit for Pri 2
+        */
+       uint64_t        rx_pfc_ena_frames_pri2;
+       /*
+        * Total number of received PFC frames with PFC enabled
+        * bit for Pri 3
+        */
+       uint64_t        rx_pfc_ena_frames_pri3;
+       /*
+        * Total number of received PFC frames with PFC enabled
+        * bit for Pri 4
+        */
+       uint64_t        rx_pfc_ena_frames_pri4;
+       /*
+        * Total number of received PFC frames with PFC enabled
+        * bit for Pri 5
+        */
+       uint64_t        rx_pfc_ena_frames_pri5;
+       /*
+        * Total number of received PFC frames with PFC enabled
+        * bit for Pri 6
+        */
+       uint64_t        rx_pfc_ena_frames_pri6;
+       /*
+        * Total number of received PFC frames with PFC enabled
+        * bit for Pri 7
+        */
+       uint64_t        rx_pfc_ena_frames_pri7;
+       /* Total Number of frames received with SCH CRC error */
+       uint64_t        rx_sch_crc_err_frames;
+       /* Total Number of under-sized frames received */
+       uint64_t        rx_undrsz_frames;
+       /* Total Number of fragmented frames received */
+       uint64_t        rx_frag_frames;
+       /* Total number of RX EEE LPI Events */
+       uint64_t        rx_eee_lpi_events;
+       /* EEE LPI Duration Counter on RX */
+       uint64_t        rx_eee_lpi_duration;
+       /*
+        * Total number of physical type Link Level Flow Control
+        * (LLFC) messages received
+        */
+       uint64_t        rx_llfc_physical_msgs;
+       /*
+        * Total number of logical type Link Level Flow Control
+        * (LLFC) messages received
+        */
+       uint64_t        rx_llfc_logical_msgs;
+       /*
+        * Total number of logical type Link Level Flow Control
+        * (LLFC) messages received with CRC error
+        */
+       uint64_t        rx_llfc_msgs_with_crc_err;
+       /* Total number of HCFC messages received */
+       uint64_t        rx_hcfc_msgs;
+       /* Total number of HCFC messages received with CRC error */
+       uint64_t        rx_hcfc_msgs_with_crc_err;
+       /* Total number of received bytes */
+       uint64_t        rx_bytes;
+       /* Total number of bytes received in runt frames */
+       uint64_t        rx_runt_bytes;
+       /* Total number of runt frames received */
+       uint64_t        rx_runt_frames;
+       /* Total Rx Discards per Port reported by STATS block */
+       uint64_t        rx_stat_discard;
+       uint64_t        rx_stat_err;
+} __attribute__((packed));
+
+/* Port Rx Statistics extended Formats */
+/* rx_port_stats_ext (size:320b/40B) */
+struct rx_port_stats_ext {
+       /* Number of times link state changed to down */
+       uint64_t        link_down_events;
+       /* Number of times the idle rings with pause bit are found */
+       uint64_t        continuous_pause_events;
+       /* Number of times the active rings pause bit resumed back */
+       uint64_t        resume_pause_events;
+       /* Number of times, the ROCE cos queue PFC is disabled to avoid pause flood/burst */
+       uint64_t        continuous_roce_pause_events;
+       /* Number of times, the ROCE cos queue PFC is enabled back */
+       uint64_t        resume_roce_pause_events;
+} __attribute__((packed));
+
+/* PCIe Statistics Formats */
+/* pcie_ctx_hw_stats (size:768b/96B) */
+struct pcie_ctx_hw_stats {
+       /* Number of physical layer receiver errors */
+       uint64_t        pcie_pl_signal_integrity;
+       /* Number of DLLP CRC errors detected by Data Link Layer */
+       uint64_t        pcie_dl_signal_integrity;
+       /*
+        * Number of TLP LCRC and sequence number errors detected
+        * by Data Link Layer
+        */
+       uint64_t        pcie_tl_signal_integrity;
+       /* Number of times LTSSM entered Recovery state */
+       uint64_t        pcie_link_integrity;
+       /* Number of TLP bytes that have been trasmitted */
+       uint64_t        pcie_tx_traffic_rate;
+       /* Number of TLP bytes that have been received */
+       uint64_t        pcie_rx_traffic_rate;
+       /* Number of DLLP bytes that have been trasmitted */
+       uint64_t        pcie_tx_dllp_statistics;
+       /* Number of DLLP bytes that have been received */
+       uint64_t        pcie_rx_dllp_statistics;
        /*
-        * 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.
+        * Number of times spent in each phase of gen3
+        * equalization
         */
-       uint8_t valid;
-} __attribute__((packed));
-
-/* ctx_hw_stats (size:1280b/160B) */
-struct ctx_hw_stats {
-       /* Number of received unicast packets */
-       uint64_t        rx_ucast_pkts;
-       /* Number of received multicast packets */
-       uint64_t        rx_mcast_pkts;
-       /* Number of received broadcast packets */
-       uint64_t        rx_bcast_pkts;
-       /* Number of discarded packets on received path */
-       uint64_t        rx_discard_pkts;
-       /* Number of dropped packets on received path */
-       uint64_t        rx_drop_pkts;
-       /* Number of received bytes for unicast traffic */
-       uint64_t        rx_ucast_bytes;
-       /* Number of received bytes for multicast traffic */
-       uint64_t        rx_mcast_bytes;
-       /* Number of received bytes for broadcast traffic */
-       uint64_t        rx_bcast_bytes;
-       /* Number of transmitted unicast packets */
-       uint64_t        tx_ucast_pkts;
-       /* Number of transmitted multicast packets */
-       uint64_t        tx_mcast_pkts;
-       /* Number of transmitted broadcast packets */
-       uint64_t        tx_bcast_pkts;
-       /* Number of discarded packets on transmit path */
-       uint64_t        tx_discard_pkts;
-       /* Number of dropped packets on transmit path */
-       uint64_t        tx_drop_pkts;
-       /* Number of transmitted bytes for unicast traffic */
-       uint64_t        tx_ucast_bytes;
-       /* Number of transmitted bytes for multicast traffic */
-       uint64_t        tx_mcast_bytes;
-       /* Number of transmitted bytes for broadcast traffic */
-       uint64_t        tx_bcast_bytes;
-       /* Number of TPA packets */
-       uint64_t        tpa_pkts;
-       /* Number of TPA bytes */
-       uint64_t        tpa_bytes;
-       /* Number of TPA events */
-       uint64_t        tpa_events;
-       /* Number of TPA aborts */
-       uint64_t        tpa_aborts;
+       uint64_t        pcie_equalization_time;
+       /* Records the last 16 transitions of the LTSSM */
+       uint32_t        pcie_ltssm_histogram[4];
+       /*
+        * Record the last 8 reasons on why LTSSM transitioned
+        * to Recovery
+        */
+       uint64_t        pcie_recovery_histogram;
 } __attribute__((packed));
 
-/***********************
- * hwrm_stat_ctx_alloc *
- ***********************/
+/**********************
+ * hwrm_exec_fwd_resp *
+ **********************/
 
 
-/* hwrm_stat_ctx_alloc_input (size:256b/32B) */
-struct hwrm_stat_ctx_alloc_input {
+/* hwrm_exec_fwd_resp_input (size:1024b/128B) */
+struct hwrm_exec_fwd_resp_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -22153,36 +26214,26 @@ struct hwrm_stat_ctx_alloc_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
-       /* This is the address for statistic block. */
-       uint64_t        stats_dma_addr;
-       /*
-        * 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        update_period_ms;
        /*
-        * This field is used to specify statistics context specific
-        * configuration flags.
+        * 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.
         */
-       uint8_t stat_ctx_flags;
+       uint32_t        encap_request[26];
        /*
-        * When this bit is set to '1', the statistics context shall be
-        * allocated for RoCE traffic only. In this case, traffic other
-        * than offloaded RoCE traffic shall not be included in this
-        * statistic context.
-        * When this bit is set to '0', the statistics context shall be
-        * used for the network traffic other than offloaded RoCE traffic.
+        * 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
         */
-       #define HWRM_STAT_CTX_ALLOC_INPUT_STAT_CTX_FLAGS_ROCE     UINT32_C(0x1)
-       uint8_t unused_0[3];
+       uint16_t        encap_resp_target_id;
+       uint8_t unused_0[6];
 } __attribute__((packed));
 
-/* hwrm_stat_ctx_alloc_output (size:128b/16B) */
-struct hwrm_stat_ctx_alloc_output {
+/* hwrm_exec_fwd_resp_output (size:128b/16B) */
+struct hwrm_exec_fwd_resp_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -22191,9 +26242,7 @@ struct hwrm_stat_ctx_alloc_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       /* This is the statistics context ID value. */
-       uint32_t        stat_ctx_id;
-       uint8_t unused_0[3];
+       uint8_t unused_0[7];
        /*
         * This field is used in Output records to indicate that the output
         * is completely written to RAM.  This field should be read as '1'
@@ -22204,13 +26253,13 @@ struct hwrm_stat_ctx_alloc_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/**********************
- * hwrm_stat_ctx_free *
- **********************/
+/************************
+ * hwrm_reject_fwd_resp *
+ ************************/
 
 
-/* hwrm_stat_ctx_free_input (size:192b/24B) */
-struct hwrm_stat_ctx_free_input {
+/* hwrm_reject_fwd_resp_input (size:1024b/128B) */
+struct hwrm_reject_fwd_resp_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -22238,13 +26287,26 @@ struct hwrm_stat_ctx_free_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
-       /* ID of the statistics context that is being queried. */
-       uint32_t        stat_ctx_id;
-       uint8_t unused_0[4];
+       /*
+        * This is an encapsulated request. This request should
+        * be rejected by the HWRM and the error 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
+        */
+       uint16_t        encap_resp_target_id;
+       uint8_t unused_0[6];
 } __attribute__((packed));
 
-/* hwrm_stat_ctx_free_output (size:128b/16B) */
-struct hwrm_stat_ctx_free_output {
+/* hwrm_reject_fwd_resp_output (size:128b/16B) */
+struct hwrm_reject_fwd_resp_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -22253,9 +26315,7 @@ struct hwrm_stat_ctx_free_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       /* This is the statistics context ID value. */
-       uint32_t        stat_ctx_id;
-       uint8_t unused_0[3];
+       uint8_t unused_0[7];
        /*
         * This field is used in Output records to indicate that the output
         * is completely written to RAM.  This field should be read as '1'
@@ -22266,13 +26326,13 @@ struct hwrm_stat_ctx_free_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/***********************
- * hwrm_stat_ctx_query *
- ***********************/
+/*****************
+ * hwrm_fwd_resp *
+ *****************/
 
 
-/* hwrm_stat_ctx_query_input (size:192b/24B) */
-struct hwrm_stat_ctx_query_input {
+/* hwrm_fwd_resp_input (size:1024b/128B) */
+struct hwrm_fwd_resp_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -22300,113 +26360,41 @@ struct hwrm_stat_ctx_query_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
-       /* ID of the statistics context that is being queried. */
-       uint32_t        stat_ctx_id;
-       uint8_t unused_0[4];
-} __attribute__((packed));
-
-/* hwrm_stat_ctx_query_output (size:1408b/176B) */
-struct hwrm_stat_ctx_query_output {
-       /* The specific error status for the command. */
-       uint16_t        error_code;
-       /* The HWRM command request type. */
-       uint16_t        req_type;
-       /* The sequence ID from the original command. */
-       uint16_t        seq_id;
-       /* The length of the response data in number of bytes. */
-       uint16_t        resp_len;
-       /* Number of transmitted unicast packets */
-       uint64_t        tx_ucast_pkts;
-       /* Number of transmitted multicast packets */
-       uint64_t        tx_mcast_pkts;
-       /* Number of transmitted broadcast packets */
-       uint64_t        tx_bcast_pkts;
-       /* Number of transmitted packets with error */
-       uint64_t        tx_err_pkts;
-       /* Number of dropped packets on transmit path */
-       uint64_t        tx_drop_pkts;
-       /* Number of transmitted bytes for unicast traffic */
-       uint64_t        tx_ucast_bytes;
-       /* Number of transmitted bytes for multicast traffic */
-       uint64_t        tx_mcast_bytes;
-       /* Number of transmitted bytes for broadcast traffic */
-       uint64_t        tx_bcast_bytes;
-       /* Number of received unicast packets */
-       uint64_t        rx_ucast_pkts;
-       /* Number of received multicast packets */
-       uint64_t        rx_mcast_pkts;
-       /* Number of received broadcast packets */
-       uint64_t        rx_bcast_pkts;
-       /* Number of received packets with error */
-       uint64_t        rx_err_pkts;
-       /* Number of dropped packets on received path */
-       uint64_t        rx_drop_pkts;
-       /* Number of received bytes for unicast traffic */
-       uint64_t        rx_ucast_bytes;
-       /* Number of received bytes for multicast traffic */
-       uint64_t        rx_mcast_bytes;
-       /* Number of received bytes for broadcast traffic */
-       uint64_t        rx_bcast_bytes;
-       /* Number of aggregated unicast packets */
-       uint64_t        rx_agg_pkts;
-       /* Number of aggregated unicast bytes */
-       uint64_t        rx_agg_bytes;
-       /* Number of aggregation events */
-       uint64_t        rx_agg_events;
-       /* Number of aborted aggregations */
-       uint64_t        rx_agg_aborts;
-       uint8_t unused_0[7];
-       /*
-        * 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_clr_stats *
- ***************************/
-
-
-/* hwrm_stat_ctx_clr_stats_input (size:192b/24B) */
-struct hwrm_stat_ctx_clr_stats_input {
-       /* The HWRM command request type. */
-       uint16_t        req_type;
-       /*
-        * The completion ring to send the completion event on. This should
-        * be the NQ ID returned from the `nq_alloc` HWRM command.
-        */
-       uint16_t        cmpl_ring;
        /*
-        * The sequence ID is used by the driver for tracking multiple
-        * commands. This ID is treated as opaque data by the firmware and
-        * the value is returned in the `hwrm_resp_hdr` upon completion.
+        * This value indicates the target id of the encapsulated
+        * response.
+        * 0x0 - 0xFFF8 - Used for function ids
+        * 0xFFF8 - 0xFFFE - Reserved for internal processors
+        * 0xFFFF - HWRM
         */
-       uint16_t        seq_id;
+       uint16_t        encap_resp_target_id;
        /*
-        * The target ID of the command:
-        * * 0x0-0xFFF8 - The function ID
-        * * 0xFFF8-0xFFFE - Reserved for internal processors
-        * * 0xFFFF - HWRM
+        * This value indicates the completion ring the encapsulated
+        * response will be optionally completed on.  If the value is
+        * -1, then no CR completion shall be generated for the
+        * encapsulated response. Any other value must be a
+        * valid CR ring_id value. If a valid encap_resp_cmpl_ring
+        * is provided, then a CR completion shall be generated for
+        * the encapsulated response.
         */
-       uint16_t        target_id;
+       uint16_t        encap_resp_cmpl_ring;
+       /* This field indicates the length of encapsulated response. */
+       uint16_t        encap_resp_len;
+       uint8_t unused_0;
+       uint8_t unused_1;
        /*
-        * A physical address pointer pointing to a host buffer that the
-        * command's response data will be written. This can be either a host
-        * physical address (HPA) or a guest physical address (GPA) and must
-        * point to a physically contiguous block of memory.
+        * This is the host address where the encapsulated response
+        * will be written.
+        * This area must be 16B aligned and must be cleared to zero
+        * before the original request is made.
         */
-       uint64_t        resp_addr;
-       /* ID of the statistics context that is being queried. */
-       uint32_t        stat_ctx_id;
-       uint8_t unused_0[4];
+       uint64_t        encap_resp_addr;
+       /* This is an encapsulated response. */
+       uint32_t        encap_resp[24];
 } __attribute__((packed));
 
-/* hwrm_stat_ctx_clr_stats_output (size:128b/16B) */
-struct hwrm_stat_ctx_clr_stats_output {
+/* hwrm_fwd_resp_output (size:128b/16B) */
+struct hwrm_fwd_resp_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -22426,13 +26414,13 @@ struct hwrm_stat_ctx_clr_stats_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/********************
- * hwrm_pcie_qstats *
- ********************/
+/*****************************
+ * hwrm_fwd_async_event_cmpl *
+ *****************************/
 
 
-/* hwrm_pcie_qstats_input (size:256b/32B) */
-struct hwrm_pcie_qstats_input {
+/* hwrm_fwd_async_event_cmpl_input (size:320b/40B) */
+struct hwrm_fwd_async_event_cmpl_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -22461,21 +26449,21 @@ struct hwrm_pcie_qstats_input {
         */
        uint64_t        resp_addr;
        /*
-        * The size of PCIe statistics block in bytes.
-        * Firmware will DMA the PCIe statistics to
-        * the host with this field size in the response.
+        * This value indicates the target id of the encapsulated
+        * asynchronous event.
+        * 0x0 - 0xFFF8 - Used for function ids
+        * 0xFFF8 - 0xFFFE - Reserved for internal processors
+        * 0xFFFF - Broadcast to all children VFs (only applicable when
+        * a PF is the requester)
         */
-       uint16_t        pcie_stat_size;
+       uint16_t        encap_async_event_target_id;
        uint8_t unused_0[6];
-       /*
-        * This is the host address where
-        * PCIe statistics will be stored
-        */
-       uint64_t        pcie_stat_host_addr;
+       /* This is an encapsulated asynchronous event completion. */
+       uint32_t        encap_async_event_cmpl[4];
 } __attribute__((packed));
 
-/* hwrm_pcie_qstats_output (size:128b/16B) */
-struct hwrm_pcie_qstats_output {
+/* hwrm_fwd_async_event_cmpl_output (size:128b/16B) */
+struct hwrm_fwd_async_event_cmpl_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -22484,9 +26472,7 @@ struct hwrm_pcie_qstats_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       /* The size of PCIe statistics block in bytes. */
-       uint16_t        pcie_stat_size;
-       uint8_t unused_0[5];
+       uint8_t unused_0[7];
        /*
         * This field is used in Output records to indicate that the output
         * is completely written to RAM.  This field should be read as '1'
@@ -22497,420 +26483,341 @@ struct hwrm_pcie_qstats_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/* Port Tx Statistics Formats */
-/* tx_port_stats (size:3264b/408B) */
-struct tx_port_stats {
-       /* Total Number of 64 Bytes frames transmitted */
-       uint64_t        tx_64b_frames;
-       /* Total Number of 65-127 Bytes frames transmitted */
-       uint64_t        tx_65b_127b_frames;
-       /* Total Number of 128-255 Bytes frames transmitted */
-       uint64_t        tx_128b_255b_frames;
-       /* Total Number of 256-511 Bytes frames transmitted */
-       uint64_t        tx_256b_511b_frames;
-       /* Total Number of 512-1023 Bytes frames transmitted */
-       uint64_t        tx_512b_1023b_frames;
-       /* Total Number of 1024-1518 Bytes frames transmitted */
-       uint64_t        tx_1024b_1518_frames;
-       /*
-        * Total Number of each good VLAN (exludes FCS errors)
-        * frame transmitted which is 1519 to 1522 bytes in length
-        * inclusive (excluding framing bits but including FCS bytes).
-        */
-       uint64_t        tx_good_vlan_frames;
-       /* Total Number of 1519-2047 Bytes frames transmitted */
-       uint64_t        tx_1519b_2047_frames;
-       /* Total Number of 2048-4095 Bytes frames transmitted */
-       uint64_t        tx_2048b_4095b_frames;
-       /* Total Number of 4096-9216 Bytes frames transmitted */
-       uint64_t        tx_4096b_9216b_frames;
-       /* Total Number of 9217-16383 Bytes frames transmitted */
-       uint64_t        tx_9217b_16383b_frames;
-       /* Total Number of good frames transmitted */
-       uint64_t        tx_good_frames;
-       /* Total Number of frames transmitted */
-       uint64_t        tx_total_frames;
-       /* Total number of unicast frames transmitted */
-       uint64_t        tx_ucast_frames;
-       /* Total number of multicast frames transmitted */
-       uint64_t        tx_mcast_frames;
-       /* Total number of broadcast frames transmitted */
-       uint64_t        tx_bcast_frames;
-       /* Total number of PAUSE control frames transmitted */
-       uint64_t        tx_pause_frames;
-       /*
-        * Total number of PFC/per-priority PAUSE
-        * control frames transmitted
-        */
-       uint64_t        tx_pfc_frames;
-       /* Total number of jabber frames transmitted */
-       uint64_t        tx_jabber_frames;
-       /* Total number of frames transmitted with FCS error */
-       uint64_t        tx_fcs_err_frames;
-       /* Total number of control frames transmitted */
-       uint64_t        tx_control_frames;
-       /* Total number of over-sized frames transmitted */
-       uint64_t        tx_oversz_frames;
-       /* Total number of frames with single deferral */
-       uint64_t        tx_single_dfrl_frames;
-       /* Total number of frames with multiple deferrals */
-       uint64_t        tx_multi_dfrl_frames;
-       /* Total number of frames with single collision */
-       uint64_t        tx_single_coll_frames;
-       /* Total number of frames with multiple collisions */
-       uint64_t        tx_multi_coll_frames;
-       /* Total number of frames with late collisions */
-       uint64_t        tx_late_coll_frames;
-       /* Total number of frames with excessive collisions */
-       uint64_t        tx_excessive_coll_frames;
-       /* Total number of fragmented frames transmitted */
-       uint64_t        tx_frag_frames;
-       /* Total number of transmit errors */
-       uint64_t        tx_err;
-       /* Total number of single VLAN tagged frames transmitted */
-       uint64_t        tx_tagged_frames;
-       /* Total number of double VLAN tagged frames transmitted */
-       uint64_t        tx_dbl_tagged_frames;
-       /* Total number of runt frames transmitted */
-       uint64_t        tx_runt_frames;
-       /* Total number of TX FIFO under runs */
-       uint64_t        tx_fifo_underruns;
-       /*
-        * Total number of PFC frames with PFC enabled bit for
-        * Pri 0 transmitted
-        */
-       uint64_t        tx_pfc_ena_frames_pri0;
-       /*
-        * Total number of PFC frames with PFC enabled bit for
-        * Pri 1 transmitted
-        */
-       uint64_t        tx_pfc_ena_frames_pri1;
-       /*
-        * Total number of PFC frames with PFC enabled bit for
-        * Pri 2 transmitted
-        */
-       uint64_t        tx_pfc_ena_frames_pri2;
-       /*
-        * Total number of PFC frames with PFC enabled bit for
-        * Pri 3 transmitted
-        */
-       uint64_t        tx_pfc_ena_frames_pri3;
-       /*
-        * Total number of PFC frames with PFC enabled bit for
-        * Pri 4 transmitted
-        */
-       uint64_t        tx_pfc_ena_frames_pri4;
-       /*
-        * Total number of PFC frames with PFC enabled bit for
-        * Pri 5 transmitted
-        */
-       uint64_t        tx_pfc_ena_frames_pri5;
-       /*
-        * Total number of PFC frames with PFC enabled bit for
-        * Pri 6 transmitted
-        */
-       uint64_t        tx_pfc_ena_frames_pri6;
-       /*
-        * Total number of PFC frames with PFC enabled bit for
-        * Pri 7 transmitted
-        */
-       uint64_t        tx_pfc_ena_frames_pri7;
-       /* Total number of EEE LPI Events on TX */
-       uint64_t        tx_eee_lpi_events;
-       /* EEE LPI Duration Counter on TX */
-       uint64_t        tx_eee_lpi_duration;
-       /*
-        * Total number of Link Level Flow Control (LLFC) messages
-        * transmitted
-        */
-       uint64_t        tx_llfc_logical_msgs;
-       /* Total number of HCFC messages transmitted */
-       uint64_t        tx_hcfc_msgs;
-       /* Total number of TX collisions */
-       uint64_t        tx_total_collisions;
-       /* Total number of transmitted bytes */
-       uint64_t        tx_bytes;
-       /* Total number of end-to-end HOL frames */
-       uint64_t        tx_xthol_frames;
-       /* Total Tx Drops per Port reported by STATS block */
-       uint64_t        tx_stat_discard;
-       /* Total Tx Error Drops per Port reported by STATS block */
-       uint64_t        tx_stat_error;
-} __attribute__((packed));
+/**************************
+ * hwrm_nvm_raw_write_blk *
+ **************************/
 
-/* Port Rx Statistics Formats */
-/* rx_port_stats (size:4224b/528B) */
-struct rx_port_stats {
-       /* Total Number of 64 Bytes frames received */
-       uint64_t        rx_64b_frames;
-       /* Total Number of 65-127 Bytes frames received */
-       uint64_t        rx_65b_127b_frames;
-       /* Total Number of 128-255 Bytes frames received */
-       uint64_t        rx_128b_255b_frames;
-       /* Total Number of 256-511 Bytes frames received */
-       uint64_t        rx_256b_511b_frames;
-       /* Total Number of 512-1023 Bytes frames received */
-       uint64_t        rx_512b_1023b_frames;
-       /* Total Number of 1024-1518 Bytes frames received */
-       uint64_t        rx_1024b_1518_frames;
-       /*
-        * Total Number of each good VLAN (exludes FCS errors)
-        * frame received which is 1519 to 1522 bytes in length
-        * inclusive (excluding framing bits but including FCS bytes).
-        */
-       uint64_t        rx_good_vlan_frames;
-       /* Total Number of 1519-2047 Bytes frames received */
-       uint64_t        rx_1519b_2047b_frames;
-       /* Total Number of 2048-4095 Bytes frames received */
-       uint64_t        rx_2048b_4095b_frames;
-       /* Total Number of 4096-9216 Bytes frames received */
-       uint64_t        rx_4096b_9216b_frames;
-       /* Total Number of 9217-16383 Bytes frames received */
-       uint64_t        rx_9217b_16383b_frames;
-       /* Total number of frames received */
-       uint64_t        rx_total_frames;
-       /* Total number of unicast frames received */
-       uint64_t        rx_ucast_frames;
-       /* Total number of multicast frames received */
-       uint64_t        rx_mcast_frames;
-       /* Total number of broadcast frames received */
-       uint64_t        rx_bcast_frames;
-       /* Total number of received frames with FCS error */
-       uint64_t        rx_fcs_err_frames;
-       /* Total number of control frames received */
-       uint64_t        rx_ctrl_frames;
-       /* Total number of PAUSE frames received */
-       uint64_t        rx_pause_frames;
-       /* Total number of PFC frames received */
-       uint64_t        rx_pfc_frames;
+
+/* hwrm_nvm_raw_write_blk_input (size:256b/32B) */
+struct hwrm_nvm_raw_write_blk_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
        /*
-        * Total number of frames received with an unsupported
-        * opcode
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
         */
-       uint64_t        rx_unsupported_opcode_frames;
+       uint16_t        cmpl_ring;
        /*
-        * Total number of frames received with an unsupported
-        * DA for pause and PFC
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
         */
-       uint64_t        rx_unsupported_da_pausepfc_frames;
-       /* Total number of frames received with an unsupported SA */
-       uint64_t        rx_wrong_sa_frames;
-       /* Total number of received packets with alignment error */
-       uint64_t        rx_align_err_frames;
-       /* Total number of received frames with out-of-range length */
-       uint64_t        rx_oor_len_frames;
-       /* Total number of received frames with error termination */
-       uint64_t        rx_code_err_frames;
+       uint16_t        seq_id;
        /*
-        * Total number of received frames with a false carrier is
-        * detected during idle, as defined by RX_ER samples active
-        * and RXD is 0xE. The event is reported along with the
-        * statistics generated on the next received frame. Only
-        * one false carrier condition can be detected and logged
-        * between frames.
-        *
-        * Carrier event, valid for 10M/100M speed modes only.
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
         */
-       uint64_t        rx_false_carrier_frames;
-       /* Total number of over-sized frames received */
-       uint64_t        rx_ovrsz_frames;
-       /* Total number of jabber packets received */
-       uint64_t        rx_jbr_frames;
-       /* Total number of received frames with MTU error */
-       uint64_t        rx_mtu_err_frames;
-       /* Total number of received frames with CRC match */
-       uint64_t        rx_match_crc_frames;
-       /* Total number of frames received promiscuously */
-       uint64_t        rx_promiscuous_frames;
+       uint16_t        target_id;
        /*
-        * Total number of received frames with one or two VLAN
-        * tags
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
         */
-       uint64_t        rx_tagged_frames;
-       /* Total number of received frames with two VLAN tags */
-       uint64_t        rx_double_tagged_frames;
-       /* Total number of truncated frames received */
-       uint64_t        rx_trunc_frames;
-       /* Total number of good frames (without errors) received */
-       uint64_t        rx_good_frames;
+       uint64_t        resp_addr;
        /*
-        * Total number of received PFC frames with transition from
-        * XON to XOFF on Pri 0
+        * 64-bit Host Source Address.
+        * This is the loation of the source data to be written.
         */
-       uint64_t        rx_pfc_xon2xoff_frames_pri0;
+       uint64_t        host_src_addr;
        /*
-        * Total number of received PFC frames with transition from
-        * XON to XOFF on Pri 1
+        * 32-bit Destination Address.
+        * This is the NVRAM byte-offset where the source data will be written to.
         */
-       uint64_t        rx_pfc_xon2xoff_frames_pri1;
+       uint32_t        dest_addr;
+       /* Length of data to be written, in bytes. */
+       uint32_t        len;
+} __attribute__((packed));
+
+/* hwrm_nvm_raw_write_blk_output (size:128b/16B) */
+struct hwrm_nvm_raw_write_blk_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
        /*
-        * Total number of received PFC frames with transition from
-        * XON to XOFF on Pri 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.
         */
-       uint64_t        rx_pfc_xon2xoff_frames_pri2;
+       uint8_t valid;
+} __attribute__((packed));
+
+/*****************
+ * hwrm_nvm_read *
+ *****************/
+
+
+/* hwrm_nvm_read_input (size:320b/40B) */
+struct hwrm_nvm_read_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
        /*
-        * Total number of received PFC frames with transition from
-        * XON to XOFF on Pri 3
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
         */
-       uint64_t        rx_pfc_xon2xoff_frames_pri3;
+       uint16_t        cmpl_ring;
        /*
-        * Total number of received PFC frames with transition from
-        * XON to XOFF on Pri 4
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
         */
-       uint64_t        rx_pfc_xon2xoff_frames_pri4;
+       uint16_t        seq_id;
        /*
-        * Total number of received PFC frames with transition from
-        * XON to XOFF on Pri 5
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
         */
-       uint64_t        rx_pfc_xon2xoff_frames_pri5;
+       uint16_t        target_id;
        /*
-        * Total number of received PFC frames with transition from
-        * XON to XOFF on Pri 6
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
         */
-       uint64_t        rx_pfc_xon2xoff_frames_pri6;
+       uint64_t        resp_addr;
        /*
-        * Total number of received PFC frames with transition from
-        * XON to XOFF on Pri 7
+        * 64-bit Host Destination Address.
+        * This is the host address where the data will be written to.
         */
-       uint64_t        rx_pfc_xon2xoff_frames_pri7;
+       uint64_t        host_dest_addr;
+       /* The 0-based index of the directory entry. */
+       uint16_t        dir_idx;
+       uint8_t unused_0[2];
+       /* The NVRAM byte-offset to read from. */
+       uint32_t        offset;
+       /* The length of the data to be read, in bytes. */
+       uint32_t        len;
+       uint8_t unused_1[4];
+} __attribute__((packed));
+
+/* hwrm_nvm_read_output (size:128b/16B) */
+struct hwrm_nvm_read_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
        /*
-        * Total number of received PFC frames with PFC enabled
-        * bit for Pri 0
+        * 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.
         */
-       uint64_t        rx_pfc_ena_frames_pri0;
+       uint8_t valid;
+} __attribute__((packed));
+
+/*********************
+ * hwrm_nvm_raw_dump *
+ *********************/
+
+
+/* hwrm_nvm_raw_dump_input (size:256b/32B) */
+struct hwrm_nvm_raw_dump_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
        /*
-        * Total number of received PFC frames with PFC enabled
-        * bit for Pri 1
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
         */
-       uint64_t        rx_pfc_ena_frames_pri1;
+       uint16_t        cmpl_ring;
        /*
-        * Total number of received PFC frames with PFC enabled
-        * bit for Pri 2
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
         */
-       uint64_t        rx_pfc_ena_frames_pri2;
+       uint16_t        seq_id;
        /*
-        * Total number of received PFC frames with PFC enabled
-        * bit for Pri 3
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
         */
-       uint64_t        rx_pfc_ena_frames_pri3;
+       uint16_t        target_id;
        /*
-        * Total number of received PFC frames with PFC enabled
-        * bit for Pri 4
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
         */
-       uint64_t        rx_pfc_ena_frames_pri4;
+       uint64_t        resp_addr;
        /*
-        * Total number of received PFC frames with PFC enabled
-        * bit for Pri 5
+        * 64-bit Host Destination Address.
+        * This is the host address where the data will be written to.
         */
-       uint64_t        rx_pfc_ena_frames_pri5;
+       uint64_t        host_dest_addr;
+       /* 32-bit NVRAM byte-offset to read from. */
+       uint32_t        offset;
+       /* Total length of NVRAM contents to be read, in bytes. */
+       uint32_t        len;
+} __attribute__((packed));
+
+/* hwrm_nvm_raw_dump_output (size:128b/16B) */
+struct hwrm_nvm_raw_dump_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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_nvm_get_dir_entries *
+ ****************************/
+
+
+/* hwrm_nvm_get_dir_entries_input (size:192b/24B) */
+struct hwrm_nvm_get_dir_entries_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
        /*
-        * Total number of received PFC frames with PFC enabled
-        * bit for Pri 6
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
         */
-       uint64_t        rx_pfc_ena_frames_pri6;
+       uint16_t        cmpl_ring;
        /*
-        * Total number of received PFC frames with PFC enabled
-        * bit for Pri 7
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
         */
-       uint64_t        rx_pfc_ena_frames_pri7;
-       /* Total Number of frames received with SCH CRC error */
-       uint64_t        rx_sch_crc_err_frames;
-       /* Total Number of under-sized frames received */
-       uint64_t        rx_undrsz_frames;
-       /* Total Number of fragmented frames received */
-       uint64_t        rx_frag_frames;
-       /* Total number of RX EEE LPI Events */
-       uint64_t        rx_eee_lpi_events;
-       /* EEE LPI Duration Counter on RX */
-       uint64_t        rx_eee_lpi_duration;
+       uint16_t        seq_id;
        /*
-        * Total number of physical type Link Level Flow Control
-        * (LLFC) messages received
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
         */
-       uint64_t        rx_llfc_physical_msgs;
+       uint16_t        target_id;
        /*
-        * Total number of logical type Link Level Flow Control
-        * (LLFC) messages received
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
         */
-       uint64_t        rx_llfc_logical_msgs;
+       uint64_t        resp_addr;
        /*
-        * Total number of logical type Link Level Flow Control
-        * (LLFC) messages received with CRC error
+        * 64-bit Host Destination Address.
+        * This is the host address where the directory will be written.
         */
-       uint64_t        rx_llfc_msgs_with_crc_err;
-       /* Total number of HCFC messages received */
-       uint64_t        rx_hcfc_msgs;
-       /* Total number of HCFC messages received with CRC error */
-       uint64_t        rx_hcfc_msgs_with_crc_err;
-       /* Total number of received bytes */
-       uint64_t        rx_bytes;
-       /* Total number of bytes received in runt frames */
-       uint64_t        rx_runt_bytes;
-       /* Total number of runt frames received */
-       uint64_t        rx_runt_frames;
-       /* Total Rx Discards per Port reported by STATS block */
-       uint64_t        rx_stat_discard;
-       uint64_t        rx_stat_err;
+       uint64_t        host_dest_addr;
 } __attribute__((packed));
 
-/* Port Rx Statistics extended Formats */
-/* rx_port_stats_ext (size:320b/40B) */
-struct rx_port_stats_ext {
-       /* Number of times link state changed to down */
-       uint64_t        link_down_events;
-       /* Number of times the idle rings with pause bit are found */
-       uint64_t        continuous_pause_events;
-       /* Number of times the active rings pause bit resumed back */
-       uint64_t        resume_pause_events;
-       /* Number of times, the ROCE cos queue PFC is disabled to avoid pause flood/burst */
-       uint64_t        continuous_roce_pause_events;
-       /* Number of times, the ROCE cos queue PFC is enabled back */
-       uint64_t        resume_roce_pause_events;
+/* hwrm_nvm_get_dir_entries_output (size:128b/16B) */
+struct hwrm_nvm_get_dir_entries_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       uint8_t unused_0[7];
+       /*
+        * 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));
 
-/* PCIe Statistics Formats */
-/* pcie_ctx_hw_stats (size:768b/96B) */
-struct pcie_ctx_hw_stats {
-       /* Number of physical layer receiver errors */
-       uint64_t        pcie_pl_signal_integrity;
-       /* Number of DLLP CRC errors detected by Data Link Layer */
-       uint64_t        pcie_dl_signal_integrity;
+/*************************
+ * hwrm_nvm_get_dir_info *
+ *************************/
+
+
+/* hwrm_nvm_get_dir_info_input (size:128b/16B) */
+struct hwrm_nvm_get_dir_info_input {
+       /* The HWRM command request type. */
+       uint16_t        req_type;
        /*
-        * Number of TLP LCRC and sequence number errors detected
-        * by Data Link Layer
+        * The completion ring to send the completion event on. This should
+        * be the NQ ID returned from the `nq_alloc` HWRM command.
         */
-       uint64_t        pcie_tl_signal_integrity;
-       /* Number of times LTSSM entered Recovery state */
-       uint64_t        pcie_link_integrity;
-       /* Number of TLP bytes that have been trasmitted */
-       uint64_t        pcie_tx_traffic_rate;
-       /* Number of TLP bytes that have been received */
-       uint64_t        pcie_rx_traffic_rate;
-       /* Number of DLLP bytes that have been trasmitted */
-       uint64_t        pcie_tx_dllp_statistics;
-       /* Number of DLLP bytes that have been received */
-       uint64_t        pcie_rx_dllp_statistics;
+       uint16_t        cmpl_ring;
        /*
-        * Number of times spent in each phase of gen3
-        * equalization
+        * The sequence ID is used by the driver for tracking multiple
+        * commands. This ID is treated as opaque data by the firmware and
+        * the value is returned in the `hwrm_resp_hdr` upon completion.
         */
-       uint64_t        pcie_equalization_time;
-       /* Records the last 16 transitions of the LTSSM */
-       uint32_t        pcie_ltssm_histogram[4];
+       uint16_t        seq_id;
        /*
-        * Record the last 8 reasons on why LTSSM transitioned
-        * to Recovery
+        * The target ID of the command:
+        * * 0x0-0xFFF8 - The function ID
+        * * 0xFFF8-0xFFFE - Reserved for internal processors
+        * * 0xFFFF - HWRM
         */
-       uint64_t        pcie_recovery_histogram;
+       uint16_t        target_id;
+       /*
+        * A physical address pointer pointing to a host buffer that the
+        * command's response data will be written. This can be either a host
+        * physical address (HPA) or a guest physical address (GPA) and must
+        * point to a physically contiguous block of memory.
+        */
+       uint64_t        resp_addr;
 } __attribute__((packed));
 
-/**********************
- * hwrm_exec_fwd_resp *
- **********************/
+/* hwrm_nvm_get_dir_info_output (size:192b/24B) */
+struct hwrm_nvm_get_dir_info_output {
+       /* The specific error status for the command. */
+       uint16_t        error_code;
+       /* The HWRM command request type. */
+       uint16_t        req_type;
+       /* The sequence ID from the original command. */
+       uint16_t        seq_id;
+       /* The length of the response data in number of bytes. */
+       uint16_t        resp_len;
+       /* Number of directory entries in the directory. */
+       uint32_t        entries;
+       /* Size of each directory entry, in bytes. */
+       uint32_t        entry_length;
+       uint8_t unused_0[7];
+       /*
+        * 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_nvm_write *
+ ******************/
 
 
-/* hwrm_exec_fwd_resp_input (size:1024b/128B) */
-struct hwrm_exec_fwd_resp_input {
+/* hwrm_nvm_write_input (size:384b/48B) */
+struct hwrm_nvm_write_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -22939,25 +26846,48 @@ struct hwrm_exec_fwd_resp_input {
         */
        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.
+        * 64-bit Host Source Address.
+        * This is where the source data is.
         */
-       uint32_t        encap_request[26];
+       uint64_t        host_src_addr;
+       /* The Directory Entry Type (valid values are defined in the bnxnvm_directory_type enum defined in the file bnxnvm_defs.h). */
+       uint16_t        dir_type;
        /*
-        * 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
+        * Directory ordinal.
+        * The 0-based instance of the combined Directory Entry Type and Extension.
         */
-       uint16_t        encap_resp_target_id;
-       uint8_t unused_0[6];
+       uint16_t        dir_ordinal;
+       /* The Directory Entry Extension flags (see BNX_DIR_EXT_* in the file bnxnvm_defs.h). */
+       uint16_t        dir_ext;
+       /* Directory Entry Attribute flags (see BNX_DIR_ATTR_* in the file bnxnvm_defs.h). */
+       uint16_t        dir_attr;
+       /*
+        * Length of data to write, in bytes. May be less than or equal to the allocated size for the directory entry.
+        * The data length stored in the directory entry will be updated to reflect this value once the write is complete.
+        */
+       uint32_t        dir_data_length;
+       /* Option. */
+       uint16_t        option;
+       uint16_t        flags;
+       /*
+        * When this bit is '1', the original active image
+        * will not be removed. TBD: what purpose is this?
+        */
+       #define HWRM_NVM_WRITE_INPUT_FLAGS_KEEP_ORIG_ACTIVE_IMG \
+               UINT32_C(0x1)
+       /*
+        * The requested length of the allocated NVM for the item, in bytes. This value may be greater than or equal to the specified data length (dir_data_length).
+        * If this value is less than the specified data length, it will be ignored.
+        * The response will contain the actual allocated item length, which may be greater than the requested item length.
+        * The purpose for allocating more than the required number of bytes for an item's data is to pre-allocate extra storage (padding) to accomodate
+        * the potential future growth of an item (e.g. upgraded firmware with a size increase, log growth, expanded configuration data).
+        */
+       uint32_t        dir_item_length;
+       uint32_t        unused_0;
 } __attribute__((packed));
 
-/* hwrm_exec_fwd_resp_output (size:128b/16B) */
-struct hwrm_exec_fwd_resp_output {
+/* hwrm_nvm_write_output (size:128b/16B) */
+struct hwrm_nvm_write_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -22966,7 +26896,14 @@ struct hwrm_exec_fwd_resp_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       uint8_t unused_0[7];
+       /*
+        * Length of the allocated NVM for the item, in bytes. The value may be greater than or equal to the specified data length or the requested item length.
+        * The actual item length used when creating a new directory entry will be a multiple of an NVM block size.
+        */
+       uint32_t        dir_item_length;
+       /* The directory index of the created or modified item. */
+       uint16_t        dir_idx;
+       uint8_t unused_0;
        /*
         * This field is used in Output records to indicate that the output
         * is completely written to RAM.  This field should be read as '1'
@@ -22977,13 +26914,31 @@ struct hwrm_exec_fwd_resp_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/************************
- * hwrm_reject_fwd_resp *
- ************************/
+/* hwrm_nvm_write_cmd_err (size:64b/8B) */
+struct hwrm_nvm_write_cmd_err {
+       /*
+        * command specific error codes that goes to
+        * the cmd_err field in Common HWRM Error Response.
+        */
+       uint8_t code;
+       /* Unknown error */
+       #define HWRM_NVM_WRITE_CMD_ERR_CODE_UNKNOWN  UINT32_C(0x0)
+       /* Unable to complete operation due to fragmentation */
+       #define HWRM_NVM_WRITE_CMD_ERR_CODE_FRAG_ERR UINT32_C(0x1)
+       /* nvm is completely full. */
+       #define HWRM_NVM_WRITE_CMD_ERR_CODE_NO_SPACE UINT32_C(0x2)
+       #define HWRM_NVM_WRITE_CMD_ERR_CODE_LAST \
+               HWRM_NVM_WRITE_CMD_ERR_CODE_NO_SPACE
+       uint8_t unused_0[7];
+} __attribute__((packed));
+
+/*******************
+ * hwrm_nvm_modify *
+ *******************/
 
 
-/* hwrm_reject_fwd_resp_input (size:1024b/128B) */
-struct hwrm_reject_fwd_resp_input {
+/* hwrm_nvm_modify_input (size:320b/40B) */
+struct hwrm_nvm_modify_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23012,25 +26967,25 @@ struct hwrm_reject_fwd_resp_input {
         */
        uint64_t        resp_addr;
        /*
-        * This is an encapsulated request. This request should
-        * be rejected by the HWRM and the error response should be
-        * provided in the response buffer inside the encapsulated
-        * request.
+        * 64-bit Host Source Address.
+        * This is where the modified data is.
         */
-       uint32_t        encap_request[26];
+       uint64_t        host_src_addr;
+       /* 16-bit directory entry index. */
+       uint16_t        dir_idx;
+       uint8_t unused_0[2];
+       /* 32-bit NVRAM byte-offset to modify content from. */
+       uint32_t        offset;
        /*
-        * 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
+        * Length of data to be modified, in bytes. The length shall
+        * be non-zero.
         */
-       uint16_t        encap_resp_target_id;
-       uint8_t unused_0[6];
+       uint32_t        len;
+       uint8_t unused_1[4];
 } __attribute__((packed));
 
-/* hwrm_reject_fwd_resp_output (size:128b/16B) */
-struct hwrm_reject_fwd_resp_output {
+/* hwrm_nvm_modify_output (size:128b/16B) */
+struct hwrm_nvm_modify_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23050,13 +27005,13 @@ struct hwrm_reject_fwd_resp_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/*****************
- * hwrm_fwd_resp *
- *****************/
+/***************************
+ * hwrm_nvm_find_dir_entry *
+ ***************************/
 
 
-/* hwrm_fwd_resp_input (size:1024b/128B) */
-struct hwrm_fwd_resp_input {
+/* hwrm_nvm_find_dir_entry_input (size:256b/32B) */
+struct hwrm_nvm_find_dir_entry_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23084,41 +27039,42 @@ struct hwrm_fwd_resp_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
+       uint32_t        enables;
        /*
-        * This value indicates the target id of the encapsulated
-        * response.
-        * 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors
-        * 0xFFFF - HWRM
-        */
-       uint16_t        encap_resp_target_id;
-       /*
-        * This value indicates the completion ring the encapsulated
-        * response will be optionally completed on.  If the value is
-        * -1, then no CR completion shall be generated for the
-        * encapsulated response. Any other value must be a
-        * valid CR ring_id value. If a valid encap_resp_cmpl_ring
-        * is provided, then a CR completion shall be generated for
-        * the encapsulated response.
+        * This bit must be '1' for the dir_idx_valid field to be
+        * configured.
         */
-       uint16_t        encap_resp_cmpl_ring;
-       /* This field indicates the length of encapsulated response. */
-       uint16_t        encap_resp_len;
-       uint8_t unused_0;
-       uint8_t unused_1;
+       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_ENABLES_DIR_IDX_VALID \
+               UINT32_C(0x1)
+       /* Directory Entry Index */
+       uint16_t        dir_idx;
+       /* Directory Entry (Image) Type */
+       uint16_t        dir_type;
        /*
-        * This is the host address where the encapsulated response
-        * will be written.
-        * This area must be 16B aligned and must be cleared to zero
-        * before the original request is made.
+        * Directory ordinal.
+        * The instance of this Directory Type
         */
-       uint64_t        encap_resp_addr;
-       /* This is an encapsulated response. */
-       uint32_t        encap_resp[24];
+       uint16_t        dir_ordinal;
+       /* The Directory Entry Extension flags. */
+       uint16_t        dir_ext;
+       /* This value indicates the search option using dir_ordinal. */
+       uint8_t opt_ordinal;
+       /* This value indicates the search option using dir_ordinal. */
+       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_MASK UINT32_C(0x3)
+       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_SFT 0
+       /* Equal to specified ordinal value. */
+       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_EQ    UINT32_C(0x0)
+       /* Greater than or equal to specified ordinal value */
+       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GE    UINT32_C(0x1)
+       /* Greater than specified ordinal value */
+       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GT    UINT32_C(0x2)
+       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_LAST \
+               HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GT
+       uint8_t unused_0[3];
 } __attribute__((packed));
 
-/* hwrm_fwd_resp_output (size:128b/16B) */
-struct hwrm_fwd_resp_output {
+/* hwrm_nvm_find_dir_entry_output (size:256b/32B) */
+struct hwrm_nvm_find_dir_entry_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23127,6 +27083,19 @@ struct hwrm_fwd_resp_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
+       /* Allocated NVRAM for this directory entry, in bytes. */
+       uint32_t        dir_item_length;
+       /* Size of the stored data for this directory entry, in bytes. */
+       uint32_t        dir_data_length;
+       /*
+        * Firmware version.
+        * Only valid if the directory entry is for embedded firmware stored in APE_BIN Format.
+        */
+       uint32_t        fw_ver;
+       /* Directory ordinal. */
+       uint16_t        dir_ordinal;
+       /* Directory Entry Index */
+       uint16_t        dir_idx;
        uint8_t unused_0[7];
        /*
         * This field is used in Output records to indicate that the output
@@ -23138,13 +27107,13 @@ struct hwrm_fwd_resp_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/*****************************
- * hwrm_fwd_async_event_cmpl *
- *****************************/
+/****************************
+ * hwrm_nvm_erase_dir_entry *
+ ****************************/
 
 
-/* hwrm_fwd_async_event_cmpl_input (size:320b/40B) */
-struct hwrm_fwd_async_event_cmpl_input {
+/* hwrm_nvm_erase_dir_entry_input (size:192b/24B) */
+struct hwrm_nvm_erase_dir_entry_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23172,22 +27141,13 @@ struct hwrm_fwd_async_event_cmpl_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
-       /*
-        * This value indicates the target id of the encapsulated
-        * asynchronous event.
-        * 0x0 - 0xFFF8 - Used for function ids
-        * 0xFFF8 - 0xFFFE - Reserved for internal processors
-        * 0xFFFF - Broadcast to all children VFs (only applicable when
-        * a PF is the requester)
-        */
-       uint16_t        encap_async_event_target_id;
+       /* Directory Entry Index */
+       uint16_t        dir_idx;
        uint8_t unused_0[6];
-       /* This is an encapsulated asynchronous event completion. */
-       uint32_t        encap_async_event_cmpl[4];
 } __attribute__((packed));
 
-/* hwrm_fwd_async_event_cmpl_output (size:128b/16B) */
-struct hwrm_fwd_async_event_cmpl_output {
+/* hwrm_nvm_erase_dir_entry_output (size:128b/16B) */
+struct hwrm_nvm_erase_dir_entry_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23207,13 +27167,13 @@ struct hwrm_fwd_async_event_cmpl_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/**************************
- * hwrm_nvm_raw_write_blk *
- **************************/
+/*************************
+ * hwrm_nvm_get_dev_info *
+ *************************/
 
 
-/* hwrm_nvm_raw_write_blk_input (size:256b/32B) */
-struct hwrm_nvm_raw_write_blk_input {
+/* hwrm_nvm_get_dev_info_input (size:128b/16B) */
+struct hwrm_nvm_get_dev_info_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23241,22 +27201,10 @@ struct hwrm_nvm_raw_write_blk_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
-       /*
-        * 64-bit Host Source Address.
-        * This is the loation of the source data to be written.
-        */
-       uint64_t        host_src_addr;
-       /*
-        * 32-bit Destination Address.
-        * This is the NVRAM byte-offset where the source data will be written to.
-        */
-       uint32_t        dest_addr;
-       /* Length of data to be written, in bytes. */
-       uint32_t        len;
 } __attribute__((packed));
 
-/* hwrm_nvm_raw_write_blk_output (size:128b/16B) */
-struct hwrm_nvm_raw_write_blk_output {
+/* hwrm_nvm_get_dev_info_output (size:256b/32B) */
+struct hwrm_nvm_get_dev_info_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23265,7 +27213,18 @@ struct hwrm_nvm_raw_write_blk_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       uint8_t unused_0[7];
+       /* Manufacturer ID. */
+       uint16_t        manufacturer_id;
+       /* Device ID. */
+       uint16_t        device_id;
+       /* Sector size of the NVRAM device. */
+       uint32_t        sector_size;
+       /* Total size, in bytes of the NVRAM device. */
+       uint32_t        nvram_size;
+       uint32_t        reserved_size;
+       /* Available size that can be used, in bytes.  Available size is the NVRAM size take away the used size and reserved size. */
+       uint32_t        available_size;
+       uint8_t unused_0[3];
        /*
         * This field is used in Output records to indicate that the output
         * is completely written to RAM.  This field should be read as '1'
@@ -23276,13 +27235,13 @@ struct hwrm_nvm_raw_write_blk_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/*****************
- * hwrm_nvm_read *
- *****************/
+/**************************
+ * hwrm_nvm_mod_dir_entry *
+ **************************/
 
 
-/* hwrm_nvm_read_input (size:320b/40B) */
-struct hwrm_nvm_read_input {
+/* hwrm_nvm_mod_dir_entry_input (size:256b/32B) */
+struct hwrm_nvm_mod_dir_entry_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23310,23 +27269,32 @@ struct hwrm_nvm_read_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
+       uint32_t        enables;
        /*
-        * 64-bit Host Destination Address.
-        * This is the host address where the data will be written to.
+        * This bit must be '1' for the checksum field to be
+        * configured.
         */
-       uint64_t        host_dest_addr;
-       /* The 0-based index of the directory entry. */
+       #define HWRM_NVM_MOD_DIR_ENTRY_INPUT_ENABLES_CHECKSUM     UINT32_C(0x1)
+       /* Directory Entry Index */
        uint16_t        dir_idx;
-       uint8_t unused_0[2];
-       /* The NVRAM byte-offset to read from. */
-       uint32_t        offset;
-       /* The length of the data to be read, in bytes. */
-       uint32_t        len;
-       uint8_t unused_1[4];
+       /*
+        * Directory ordinal.
+        * The (0-based) instance of this Directory Type.
+        */
+       uint16_t        dir_ordinal;
+       /* The Directory Entry Extension flags (see BNX_DIR_EXT_* for extension flag definitions). */
+       uint16_t        dir_ext;
+       /* Directory Entry Attribute flags (see BNX_DIR_ATTR_* for attribute flag definitions). */
+       uint16_t        dir_attr;
+       /*
+        * If valid, then this field updates the checksum
+        * value of the content in the directory entry.
+        */
+       uint32_t        checksum;
 } __attribute__((packed));
 
-/* hwrm_nvm_read_output (size:128b/16B) */
-struct hwrm_nvm_read_output {
+/* hwrm_nvm_mod_dir_entry_output (size:128b/16B) */
+struct hwrm_nvm_mod_dir_entry_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23346,13 +27314,13 @@ struct hwrm_nvm_read_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/*********************
- * hwrm_nvm_raw_dump *
- *********************/
+/**************************
+ * hwrm_nvm_verify_update *
+ **************************/
 
 
-/* hwrm_nvm_raw_dump_input (size:256b/32B) */
-struct hwrm_nvm_raw_dump_input {
+/* hwrm_nvm_verify_update_input (size:192b/24B) */
+struct hwrm_nvm_verify_update_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23380,19 +27348,26 @@ struct hwrm_nvm_raw_dump_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
+       /* Directory Entry Type, to be verified. */
+       uint16_t        dir_type;
        /*
-        * 64-bit Host Destination Address.
-        * This is the host address where the data will be written to.
+        * Directory ordinal.
+        * The instance of the Directory Type to be verified.
         */
-       uint64_t        host_dest_addr;
-       /* 32-bit NVRAM byte-offset to read from. */
-       uint32_t        offset;
-       /* Total length of NVRAM contents to be read, in bytes. */
-       uint32_t        len;
+       uint16_t        dir_ordinal;
+       /*
+        * The Directory Entry Extension flags.
+        * The "UPDATE" extension flag must be set in this value.
+        * A corresponding directory entry with the same type and ordinal values but *without*
+        * the "UPDATE" extension flag must also exist. The other flags of the extension must
+        * be identical between the active and update entries.
+        */
+       uint16_t        dir_ext;
+       uint8_t unused_0[2];
 } __attribute__((packed));
 
-/* hwrm_nvm_raw_dump_output (size:128b/16B) */
-struct hwrm_nvm_raw_dump_output {
+/* hwrm_nvm_verify_update_output (size:128b/16B) */
+struct hwrm_nvm_verify_update_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23412,13 +27387,13 @@ struct hwrm_nvm_raw_dump_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/****************************
- * hwrm_nvm_get_dir_entries *
- ****************************/
+/***************************
+ * hwrm_nvm_install_update *
+ ***************************/
 
 
-/* hwrm_nvm_get_dir_entries_input (size:192b/24B) */
-struct hwrm_nvm_get_dir_entries_input {
+/* hwrm_nvm_install_update_input (size:192b/24B) */
+struct hwrm_nvm_install_update_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23447,14 +27422,49 @@ struct hwrm_nvm_get_dir_entries_input {
         */
        uint64_t        resp_addr;
        /*
-        * 64-bit Host Destination Address.
-        * This is the host address where the directory will be written.
+        * Installation type. If the value 3 through 0xffff is used,
+        * only packaged items with that type value will be installed and
+        * conditional installation directives for those packaged items
+        * will be over-ridden (i.e. 'create' or 'replace' will be treated
+        * as 'install').
         */
-       uint64_t        host_dest_addr;
+       uint32_t        install_type;
+       /*
+        * Perform a normal package installation. Conditional installation
+        * directives (e.g. 'create' and 'replace') of packaged items
+        * will be followed.
+        */
+       #define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_NORMAL UINT32_C(0x0)
+       /*
+        * Install all packaged items regardless of installation directive
+        * (i.e. treat all packaged items as though they have an installation
+        * directive of 'install').
+        */
+       #define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_ALL \
+               UINT32_C(0xffffffff)
+       #define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_LAST \
+               HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_ALL
+       uint16_t        flags;
+       /* If set to 1, then securely erase all unused locations in persistent storage. */
+       #define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_ERASE_UNUSED_SPACE \
+               UINT32_C(0x1)
+       /*
+        * If set to 1, then unspecifed images, images not in the package file, will be safely deleted.
+        * When combined with erase_unused_space then unspecified images will be securely erased.
+        */
+       #define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_REMOVE_UNUSED_PKG \
+               UINT32_C(0x2)
+       /*
+        * If set to 1, FW will defragment the NVM if defragmentation is required for the update.
+        * Allow additional time for this command to complete if this bit is set to 1.
+        */
+       #define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_ALLOWED_TO_DEFRAG \
+               UINT32_C(0x4)
+       uint8_t unused_0[2];
 } __attribute__((packed));
 
-/* hwrm_nvm_get_dir_entries_output (size:128b/16B) */
-struct hwrm_nvm_get_dir_entries_output {
+/* hwrm_nvm_install_update_output (size:192b/24B) */
+struct hwrm_nvm_install_update_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23463,7 +27473,55 @@ struct hwrm_nvm_get_dir_entries_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       uint8_t unused_0[7];
+       /*
+        * Bit-mask of successfully installed items.
+        * Bit-0 corresponding to the first packaged item, Bit-1 for the second item, etc.
+        * A value of 0 indicates that no items were successfully installed.
+        */
+       uint64_t        installed_items;
+       /* result is 8 b */
+       uint8_t result;
+       /* There was no problem with the package installation. */
+       #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_SUCCESS UINT32_C(0x0)
+       #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_LAST \
+               HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_SUCCESS
+       /* problem_item is 8 b */
+       uint8_t problem_item;
+       /* There was no problem with any packaged items. */
+       #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_NONE \
+               UINT32_C(0x0)
+       /* There was a problem with the NVM package itself. */
+       #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_PACKAGE \
+               UINT32_C(0xff)
+       #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_LAST \
+               HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_PACKAGE
+       /* reset_required is 8 b */
+       uint8_t reset_required;
+       /*
+        * No reset is required for installed/updated firmware or
+        * microcode to take effect.
+        */
+       #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_NONE \
+               UINT32_C(0x0)
+       /*
+        * A PCIe reset (e.g. system reboot) is
+        * required for newly installed/updated firmware or
+        * microcode to take effect.
+        */
+       #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_PCI \
+               UINT32_C(0x1)
+       /*
+        * A controller power reset (e.g. system power-cycle) is
+        * required for newly installed/updated firmware or
+        * microcode to take effect. Some newly installed/updated
+        * firmware or microcode may still take effect upon the
+        * next PCIe reset.
+        */
+       #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_POWER \
+               UINT32_C(0x2)
+       #define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_LAST \
+               HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_POWER
+       uint8_t unused_0[4];
        /*
         * This field is used in Output records to indicate that the output
         * is completely written to RAM.  This field should be read as '1'
@@ -23474,13 +27532,31 @@ struct hwrm_nvm_get_dir_entries_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/*************************
- * hwrm_nvm_get_dir_info *
- *************************/
+/* hwrm_nvm_install_update_cmd_err (size:64b/8B) */
+struct hwrm_nvm_install_update_cmd_err {
+       /*
+        * command specific error codes that goes to
+        * the cmd_err field in Common HWRM Error Response.
+        */
+       uint8_t code;
+       /* Unknown error */
+       #define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_UNKNOWN  UINT32_C(0x0)
+       /* Unable to complete operation due to fragmentation */
+       #define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR UINT32_C(0x1)
+       /* nvm is completely full. */
+       #define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_NO_SPACE UINT32_C(0x2)
+       #define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_LAST \
+               HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_NO_SPACE
+       uint8_t unused_0[7];
+} __attribute__((packed));
+
+/******************
+ * hwrm_nvm_flush *
+ ******************/
 
 
-/* hwrm_nvm_get_dir_info_input (size:128b/16B) */
-struct hwrm_nvm_get_dir_info_input {
+/* hwrm_nvm_flush_input (size:128b/16B) */
+struct hwrm_nvm_flush_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23510,8 +27586,8 @@ struct hwrm_nvm_get_dir_info_input {
        uint64_t        resp_addr;
 } __attribute__((packed));
 
-/* hwrm_nvm_get_dir_info_output (size:192b/24B) */
-struct hwrm_nvm_get_dir_info_output {
+/* hwrm_nvm_flush_output (size:128b/16B) */
+struct hwrm_nvm_flush_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23520,10 +27596,6 @@ struct hwrm_nvm_get_dir_info_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       /* Number of directory entries in the directory. */
-       uint32_t        entries;
-       /* Size of each directory entry, in bytes. */
-       uint32_t        entry_length;
        uint8_t unused_0[7];
        /*
         * This field is used in Output records to indicate that the output
@@ -23535,13 +27607,29 @@ struct hwrm_nvm_get_dir_info_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/******************
- * hwrm_nvm_write *
- ******************/
+/* hwrm_nvm_flush_cmd_err (size:64b/8B) */
+struct hwrm_nvm_flush_cmd_err {
+       /*
+        * command specific error codes that goes to
+        * the cmd_err field in Common HWRM Error Response.
+        */
+       uint8_t code;
+       /* Unknown error */
+       #define HWRM_NVM_FLUSH_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0)
+       /* flush could not be performed */
+       #define HWRM_NVM_FLUSH_CMD_ERR_CODE_FAIL    UINT32_C(0x1)
+       #define HWRM_NVM_FLUSH_CMD_ERR_CODE_LAST \
+               HWRM_NVM_FLUSH_CMD_ERR_CODE_FAIL
+       uint8_t unused_0[7];
+} __attribute__((packed));
 
+/*************************
+ * hwrm_nvm_get_variable *
+ *************************/
 
-/* hwrm_nvm_write_input (size:384b/48B) */
-struct hwrm_nvm_write_input {
+
+/* hwrm_nvm_get_variable_input (size:320b/40B) */
+struct hwrm_nvm_get_variable_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23570,48 +27658,49 @@ struct hwrm_nvm_write_input {
         */
        uint64_t        resp_addr;
        /*
-        * 64-bit Host Source Address.
-        * This is where the source data is.
-        */
-       uint64_t        host_src_addr;
-       /* The Directory Entry Type (valid values are defined in the bnxnvm_directory_type enum defined in the file bnxnvm_defs.h). */
-       uint16_t        dir_type;
-       /*
-        * Directory ordinal.
-        * The 0-based instance of the combined Directory Entry Type and Extension.
-        */
-       uint16_t        dir_ordinal;
-       /* The Directory Entry Extension flags (see BNX_DIR_EXT_* in the file bnxnvm_defs.h). */
-       uint16_t        dir_ext;
-       /* Directory Entry Attribute flags (see BNX_DIR_ATTR_* in the file bnxnvm_defs.h). */
-       uint16_t        dir_attr;
-       /*
-        * Length of data to write, in bytes. May be less than or equal to the allocated size for the directory entry.
-        * The data length stored in the directory entry will be updated to reflect this value once the write is complete.
+        * This is the host address where
+        * nvm variable will be stored
         */
-       uint32_t        dir_data_length;
-       /* Option. */
-       uint16_t        option;
-       uint16_t        flags;
+       uint64_t        dest_data_addr;
+       /* size of data in bits */
+       uint16_t        data_len;
+       /* nvm cfg option number */
+       uint16_t        option_num;
+       /* reserved. */
+       #define HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_RSVD_0    UINT32_C(0x0)
+       /* reserved. */
+       #define HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF \
+               UINT32_C(0xffff)
+       #define HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_LAST \
+               HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF
+       /*
+        * Number of dimensions for this nvm configuration variable.
+        * This value indicates how many of the indexN values to use.
+        * A value of 0 means that none of the indexN values are valid.
+        * A value of 1 requires at index0 is valued, a value of 2
+        * requires that index0 and index1 are valid, and so forth
+        */
+       uint16_t        dimensions;
+       /* index for the 1st dimensions */
+       uint16_t        index_0;
+       /* index for the 2nd dimensions */
+       uint16_t        index_1;
+       /* index for the 3rd dimensions */
+       uint16_t        index_2;
+       /* index for the 4th dimensions */
+       uint16_t        index_3;
+       uint8_t flags;
        /*
-        * When this bit is '1', the original active image
-        * will not be removed. TBD: what purpose is this?
+        * When this bit is set to 1, the factory default value will be returned,
+        * 0 returns the operational value.
         */
-       #define HWRM_NVM_WRITE_INPUT_FLAGS_KEEP_ORIG_ACTIVE_IMG \
+       #define HWRM_NVM_GET_VARIABLE_INPUT_FLAGS_FACTORY_DFLT \
                UINT32_C(0x1)
-       /*
-        * The requested length of the allocated NVM for the item, in bytes. This value may be greater than or equal to the specified data length (dir_data_length).
-        * If this value is less than the specified data length, it will be ignored.
-        * The response will contain the actual allocated item length, which may be greater than the requested item length.
-        * The purpose for allocating more than the required number of bytes for an item's data is to pre-allocate extra storage (padding) to accomodate
-        * the potential future growth of an item (e.g. upgraded firmware with a size increase, log growth, expanded configuration data).
-        */
-       uint32_t        dir_item_length;
-       uint32_t        unused_0;
+       uint8_t unused_0;
 } __attribute__((packed));
 
-/* hwrm_nvm_write_output (size:128b/16B) */
-struct hwrm_nvm_write_output {
+/* hwrm_nvm_get_variable_output (size:128b/16B) */
+struct hwrm_nvm_get_variable_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23620,14 +27709,25 @@ struct hwrm_nvm_write_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
+       /* size of data of the actual variable retrieved in bits */
+       uint16_t        data_len;
        /*
-        * Length of the allocated NVM for the item, in bytes. The value may be greater than or equal to the specified data length or the requested item length.
-        * The actual item length used when creating a new directory entry will be a multiple of an NVM block size.
+        * option_num is the option number for the data retrieved.  It is possible in the
+        * future that the option number returned would be different than requested.  This
+        * condition could occur if an option is deprecated and a new option id is defined
+        * with similar characteristics, but has a slightly different definition.  This
+        * also makes it convenient for the caller to identify the variable result with
+        * the option id from the response.
         */
-       uint32_t        dir_item_length;
-       /* The directory index of the created or modified item. */
-       uint16_t        dir_idx;
-       uint8_t unused_0;
+       uint16_t        option_num;
+       /* reserved. */
+       #define HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_RSVD_0    UINT32_C(0x0)
+       /* reserved. */
+       #define HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_RSVD_FFFF \
+               UINT32_C(0xffff)
+       #define HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_LAST \
+               HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_RSVD_FFFF
+       uint8_t unused_0[3];
        /*
         * This field is used in Output records to indicate that the output
         * is completely written to RAM.  This field should be read as '1'
@@ -23638,31 +27738,33 @@ struct hwrm_nvm_write_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/* hwrm_nvm_write_cmd_err (size:64b/8B) */
-struct hwrm_nvm_write_cmd_err {
+/* hwrm_nvm_get_variable_cmd_err (size:64b/8B) */
+struct hwrm_nvm_get_variable_cmd_err {
        /*
         * command specific error codes that goes to
         * the cmd_err field in Common HWRM Error Response.
         */
        uint8_t code;
        /* Unknown error */
-       #define HWRM_NVM_WRITE_CMD_ERR_CODE_UNKNOWN  UINT32_C(0x0)
-       /* Unable to complete operation due to fragmentation */
-       #define HWRM_NVM_WRITE_CMD_ERR_CODE_FRAG_ERR UINT32_C(0x1)
-       /* nvm is completely full. */
-       #define HWRM_NVM_WRITE_CMD_ERR_CODE_NO_SPACE UINT32_C(0x2)
-       #define HWRM_NVM_WRITE_CMD_ERR_CODE_LAST \
-               HWRM_NVM_WRITE_CMD_ERR_CODE_NO_SPACE
+       #define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_UNKNOWN       UINT32_C(0x0)
+       /* variable does not exist */
+       #define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_VAR_NOT_EXIST UINT32_C(0x1)
+       /* configuration is corrupted and the variable cannot be saved */
+       #define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR   UINT32_C(0x2)
+       /* length specified is too small */
+       #define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_LEN_TOO_SHORT UINT32_C(0x3)
+       #define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_LAST \
+               HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_LEN_TOO_SHORT
        uint8_t unused_0[7];
 } __attribute__((packed));
 
-/*******************
- * hwrm_nvm_modify *
- *******************/
+/*************************
+ * hwrm_nvm_set_variable *
+ *************************/
 
 
-/* hwrm_nvm_modify_input (size:320b/40B) */
-struct hwrm_nvm_modify_input {
+/* hwrm_nvm_set_variable_input (size:320b/40B) */
+struct hwrm_nvm_set_variable_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23691,25 +27793,64 @@ struct hwrm_nvm_modify_input {
         */
        uint64_t        resp_addr;
        /*
-        * 64-bit Host Source Address.
-        * This is where the modified data is.
-        */
-       uint64_t        host_src_addr;
-       /* 16-bit directory entry index. */
-       uint16_t        dir_idx;
-       uint8_t unused_0[2];
-       /* 32-bit NVRAM byte-offset to modify content from. */
-       uint32_t        offset;
-       /*
-        * Length of data to be modified, in bytes. The length shall
-        * be non-zero.
+        * This is the host address where
+        * nvm variable will be copied from
         */
-       uint32_t        len;
-       uint8_t unused_1[4];
+       uint64_t        src_data_addr;
+       /* size of data in bits */
+       uint16_t        data_len;
+       /* nvm cfg option number */
+       uint16_t        option_num;
+       /* reserved. */
+       #define HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_RSVD_0    UINT32_C(0x0)
+       /* reserved. */
+       #define HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF \
+               UINT32_C(0xffff)
+       #define HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_LAST \
+               HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF
+       /*
+        * Number of dimensions for this nvm configuration variable.
+        * This value indicates how many of the indexN values to use.
+        * A value of 0 means that none of the indexN values are valid.
+        * A value of 1 requires at index0 is valued, a value of 2
+        * requires that index0 and index1 are valid, and so forth
+        */
+       uint16_t        dimensions;
+       /* index for the 1st dimensions */
+       uint16_t        index_0;
+       /* index for the 2nd dimensions */
+       uint16_t        index_1;
+       /* index for the 3rd dimensions */
+       uint16_t        index_2;
+       /* index for the 4th dimensions */
+       uint16_t        index_3;
+       uint8_t flags;
+       /* When this bit is 1, flush internal cache after this write operation (see hwrm_nvm_flush command.) */
+       #define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_FORCE_FLUSH \
+               UINT32_C(0x1)
+       /* encryption method */
+       #define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_MASK \
+               UINT32_C(0xe)
+       #define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_SFT           1
+       /* No encryption. */
+       #define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_NONE \
+               (UINT32_C(0x0) << 1)
+       /* one-way encryption. */
+       #define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_HMAC_SHA1 \
+               (UINT32_C(0x1) << 1)
+       /* symmetric AES256 encryption. */
+       #define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_AES256 \
+               (UINT32_C(0x2) << 1)
+       /* SHA1 digest appended to plaintext contents, for authentication */
+       #define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_HMAC_SHA1_AUTH \
+               (UINT32_C(0x3) << 1)
+       #define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_LAST \
+               HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_HMAC_SHA1_AUTH
+       uint8_t unused_0;
 } __attribute__((packed));
 
-/* hwrm_nvm_modify_output (size:128b/16B) */
-struct hwrm_nvm_modify_output {
+/* hwrm_nvm_set_variable_output (size:128b/16B) */
+struct hwrm_nvm_set_variable_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23729,13 +27870,31 @@ struct hwrm_nvm_modify_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/***************************
- * hwrm_nvm_find_dir_entry *
- ***************************/
+/* hwrm_nvm_set_variable_cmd_err (size:64b/8B) */
+struct hwrm_nvm_set_variable_cmd_err {
+       /*
+        * command specific error codes that goes to
+        * the cmd_err field in Common HWRM Error Response.
+        */
+       uint8_t code;
+       /* Unknown error */
+       #define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_UNKNOWN       UINT32_C(0x0)
+       /* variable does not exist */
+       #define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_VAR_NOT_EXIST UINT32_C(0x1)
+       /* configuration is corrupted and the variable cannot be saved */
+       #define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR   UINT32_C(0x2)
+       #define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_LAST \
+               HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR
+       uint8_t unused_0[7];
+} __attribute__((packed));
+
+/****************************
+ * hwrm_nvm_validate_option *
+ ****************************/
 
 
-/* hwrm_nvm_find_dir_entry_input (size:256b/32B) */
-struct hwrm_nvm_find_dir_entry_input {
+/* hwrm_nvm_validate_option_input (size:320b/40B) */
+struct hwrm_nvm_validate_option_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23763,42 +27922,44 @@ struct hwrm_nvm_find_dir_entry_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
-       uint32_t        enables;
-       /*
-        * This bit must be '1' for the dir_idx_valid field to be
-        * configured.
-        */
-       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_ENABLES_DIR_IDX_VALID \
-               UINT32_C(0x1)
-       /* Directory Entry Index */
-       uint16_t        dir_idx;
-       /* Directory Entry (Image) Type */
-       uint16_t        dir_type;
        /*
-        * Directory ordinal.
-        * The instance of this Directory Type
+        * This is the host address where
+        * nvm variable will be copied from
         */
-       uint16_t        dir_ordinal;
-       /* The Directory Entry Extension flags. */
-       uint16_t        dir_ext;
-       /* This value indicates the search option using dir_ordinal. */
-       uint8_t opt_ordinal;
-       /* This value indicates the search option using dir_ordinal. */
-       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_MASK UINT32_C(0x3)
-       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_SFT 0
-       /* Equal to specified ordinal value. */
-       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_EQ    UINT32_C(0x0)
-       /* Greater than or equal to specified ordinal value */
-       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GE    UINT32_C(0x1)
-       /* Greater than specified ordinal value */
-       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GT    UINT32_C(0x2)
-       #define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_LAST \
-               HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GT
-       uint8_t unused_0[3];
+       uint64_t        src_data_addr;
+       /* size of data in bits */
+       uint16_t        data_len;
+       /* nvm cfg option number */
+       uint16_t        option_num;
+       /* reserved. */
+       #define HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_RSVD_0 \
+               UINT32_C(0x0)
+       /* reserved. */
+       #define HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_RSVD_FFFF \
+               UINT32_C(0xffff)
+       #define HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_LAST \
+               HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_RSVD_FFFF
+       /*
+        * Number of dimensions for this nvm configuration variable.
+        * This value indicates how many of the indexN values to use.
+        * A value of 0 means that none of the indexN values are valid.
+        * A value of 1 requires at index0 is valued, a value of 2
+        * requires that index0 and index1 are valid, and so forth
+        */
+       uint16_t        dimensions;
+       /* index for the 1st dimensions */
+       uint16_t        index_0;
+       /* index for the 2nd dimensions */
+       uint16_t        index_1;
+       /* index for the 3rd dimensions */
+       uint16_t        index_2;
+       /* index for the 4th dimensions */
+       uint16_t        index_3;
+       uint8_t unused_0[2];
 } __attribute__((packed));
 
-/* hwrm_nvm_find_dir_entry_output (size:256b/32B) */
-struct hwrm_nvm_find_dir_entry_output {
+/* hwrm_nvm_validate_option_output (size:128b/16B) */
+struct hwrm_nvm_validate_option_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23807,20 +27968,14 @@ struct hwrm_nvm_find_dir_entry_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       /* Allocated NVRAM for this directory entry, in bytes. */
-       uint32_t        dir_item_length;
-       /* Size of the stored data for this directory entry, in bytes. */
-       uint32_t        dir_data_length;
-       /*
-        * Firmware version.
-        * Only valid if the directory entry is for embedded firmware stored in APE_BIN Format.
-        */
-       uint32_t        fw_ver;
-       /* Directory ordinal. */
-       uint16_t        dir_ordinal;
-       /* Directory Entry Index */
-       uint16_t        dir_idx;
-       uint8_t unused_0[7];
+       uint8_t result;
+       /* indicates that the value provided for the option is not matching with the saved data. */
+       #define HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_NOT_MATCH UINT32_C(0x0)
+       /* indicates that the value provided for the option is matching the saved data. */
+       #define HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_MATCH     UINT32_C(0x1)
+       #define HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_LAST \
+               HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_MATCH
+       uint8_t unused_0[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'
@@ -23831,13 +27986,27 @@ struct hwrm_nvm_find_dir_entry_output {
        uint8_t valid;
 } __attribute__((packed));
 
-/****************************
- * hwrm_nvm_erase_dir_entry *
- ****************************/
+/* hwrm_nvm_validate_option_cmd_err (size:64b/8B) */
+struct hwrm_nvm_validate_option_cmd_err {
+       /*
+        * command specific error codes that goes to
+        * the cmd_err field in Common HWRM Error Response.
+        */
+       uint8_t code;
+       /* Unknown error */
+       #define HWRM_NVM_VALIDATE_OPTION_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0)
+       #define HWRM_NVM_VALIDATE_OPTION_CMD_ERR_CODE_LAST \
+               HWRM_NVM_VALIDATE_OPTION_CMD_ERR_CODE_UNKNOWN
+       uint8_t unused_0[7];
+} __attribute__((packed));
 
+/*****************************
+ * hwrm_nvm_factory_defaults *
+ *****************************/
 
-/* hwrm_nvm_erase_dir_entry_input (size:192b/24B) */
-struct hwrm_nvm_erase_dir_entry_input {
+
+/* hwrm_nvm_factory_defaults_input (size:192b/24B) */
+struct hwrm_nvm_factory_defaults_input {
        /* The HWRM command request type. */
        uint16_t        req_type;
        /*
@@ -23865,13 +28034,19 @@ struct hwrm_nvm_erase_dir_entry_input {
         * point to a physically contiguous block of memory.
         */
        uint64_t        resp_addr;
-       /* Directory Entry Index */
-       uint16_t        dir_idx;
-       uint8_t unused_0[6];
+       /* mode is 8 b */
+       uint8_t mode;
+       /* If set to 1, it will trigger restoration of factory default settings */
+       #define HWRM_NVM_FACTORY_DEFAULTS_INPUT_MODE_RESTORE UINT32_C(0x0)
+       /* If set to 1, it will trigger creation of factory default settings */
+       #define HWRM_NVM_FACTORY_DEFAULTS_INPUT_MODE_CREATE  UINT32_C(0x1)
+       #define HWRM_NVM_FACTORY_DEFAULTS_INPUT_MODE_LAST \
+               HWRM_NVM_FACTORY_DEFAULTS_INPUT_MODE_CREATE
+       uint8_t unused_0[7];
 } __attribute__((packed));
 
-/* hwrm_nvm_erase_dir_entry_output (size:128b/16B) */
-struct hwrm_nvm_erase_dir_entry_output {
+/* hwrm_nvm_factory_defaults_output (size:128b/16B) */
+struct hwrm_nvm_factory_defaults_output {
        /* The specific error status for the command. */
        uint16_t        error_code;
        /* The HWRM command request type. */
@@ -23880,7 +28055,19 @@ struct hwrm_nvm_erase_dir_entry_output {
        uint16_t        seq_id;
        /* The length of the response data in number of bytes. */
        uint16_t        resp_len;
-       uint8_t unused_0[7];
+       uint8_t result;
+       /* factory defaults created successfully. */
+       #define HWRM_NVM_FACTORY_DEFAULTS_OUTPUT_RESULT_CREATE_OK \
+               UINT32_C(0x0)
+       /* factory defaults restored successfully. */
+       #define HWRM_NVM_FACTORY_DEFAULTS_OUTPUT_RESULT_RESTORE_OK \
+               UINT32_C(0x1)
+       /* factory defaults already created. */
+       #define HWRM_NVM_FACTORY_DEFAULTS_OUTPUT_RESULT_CREATE_ALREADY \
+               UINT32_C(0x2)
+       #define HWRM_NVM_FACTORY_DEFAULTS_OUTPUT_RESULT_LAST \
+               HWRM_NVM_FACTORY_DEFAULTS_OUTPUT_RESULT_CREATE_ALREADY
+       uint8_t unused_0[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'
@@ -23891,5 +28078,25 @@ struct hwrm_nvm_erase_dir_entry_output {
        uint8_t valid;
 } __attribute__((packed));
 
+/* hwrm_nvm_factory_defaults_cmd_err (size:64b/8B) */
+struct hwrm_nvm_factory_defaults_cmd_err {
+       /*
+        * command specific error codes that goes to
+        * the cmd_err field in Common HWRM Error Response.
+        */
+       uint8_t code;
+       /* Unknown error */
+       #define HWRM_NVM_FACTORY_DEFAULTS_CMD_ERR_CODE_UNKNOWN \
+               UINT32_C(0x0)
+       /* valid configuration not present to create defaults */
+       #define HWRM_NVM_FACTORY_DEFAULTS_CMD_ERR_CODE_NO_VALID_CFG \
+               UINT32_C(0x1)
+       /* No saved configuration present to restore, restore failed */
+       #define HWRM_NVM_FACTORY_DEFAULTS_CMD_ERR_CODE_NO_SAVED_CFG \
+               UINT32_C(0x2)
+       #define HWRM_NVM_FACTORY_DEFAULTS_CMD_ERR_CODE_LAST \
+               HWRM_NVM_FACTORY_DEFAULTS_CMD_ERR_CODE_NO_SAVED_CFG
+       uint8_t unused_0[7];
+} __attribute__((packed));
 
 #endif /* _HSI_STRUCT_DEF_DPDK_H_ */