xref: /dpdk/drivers/net/bnxt/hsi_struct_def_dpdk.h (revision e77506397fc8005c5129e22e9e2d15d5876790fd)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2014-2024 Broadcom Inc.
3  * All rights reserved.
4  *
5  * DO NOT MODIFY!!! This file is automatically generated.
6  */
7 
8 #ifndef _HSI_STRUCT_DEF_DPDK_H_
9 #define _HSI_STRUCT_DEF_DPDK_H_
10 
11 /* This is the HWRM command header. */
12 /* hwrm_cmd_hdr (size:128b/16B) */
13 struct __rte_packed_begin hwrm_cmd_hdr {
14 	/* The HWRM command request type. */
15 	uint16_t	req_type;
16 	/*
17 	 * The completion ring to send the completion event on. This should
18 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
19 	 */
20 	uint16_t	cmpl_ring;
21 	/*
22 	 * The sequence ID is used by the driver for tracking multiple
23 	 * commands. This ID is treated as opaque data by the firmware and
24 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25 	 */
26 	uint16_t	seq_id;
27 	/*
28 	 * The target ID of the command:
29 	 * * 0x0-0xFFF8 - The function ID
30 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
31 	 * * 0xFFFD - Reserved for user-space HWRM interface
32 	 * * 0xFFFF - HWRM
33 	 */
34 	uint16_t	target_id;
35 	/*
36 	 * A physical address pointer pointing to a host buffer that the
37 	 * command's response data will be written. This can be either a host
38 	 * physical address (HPA) or a guest physical address (GPA) and must
39 	 * point to a physically contiguous block of memory.
40 	 */
41 	uint64_t	resp_addr;
42 } __rte_packed_end;
43 
44 /* This is the HWRM response header. */
45 /* hwrm_resp_hdr (size:64b/8B) */
46 struct __rte_packed_begin hwrm_resp_hdr {
47 	/* The specific error status for the command. */
48 	uint16_t	error_code;
49 	/* The HWRM command request type. */
50 	uint16_t	req_type;
51 	/* The sequence ID from the original command. */
52 	uint16_t	seq_id;
53 	/* The length of the response data in number of bytes. */
54 	uint16_t	resp_len;
55 } __rte_packed_end;
56 
57 /*
58  * TLV encapsulated message. Use the TLV type field of the
59  * TLV to determine the type of message encapsulated.
60  */
61 #define CMD_DISCR_TLV_ENCAP UINT32_C(0x8000)
62 #define CMD_DISCR_LAST     CMD_DISCR_TLV_ENCAP
63 
64 
65 /* HWRM request message */
66 #define TLV_TYPE_HWRM_REQUEST                    UINT32_C(0x1)
67 /* HWRM response message */
68 #define TLV_TYPE_HWRM_RESPONSE                   UINT32_C(0x2)
69 /* RoCE slow path command */
70 #define TLV_TYPE_ROCE_SP_COMMAND                 UINT32_C(0x3)
71 /* RoCE slow path command to query CC Gen1 support. */
72 #define TLV_TYPE_QUERY_ROCE_CC_GEN1              UINT32_C(0x4)
73 /* RoCE slow path command to modify CC Gen1 support. */
74 #define TLV_TYPE_MODIFY_ROCE_CC_GEN1             UINT32_C(0x5)
75 /* RoCE slow path command to query CC Gen2 support. */
76 #define TLV_TYPE_QUERY_ROCE_CC_GEN2              UINT32_C(0x6)
77 /* RoCE slow path command to modify CC Gen2 support. */
78 #define TLV_TYPE_MODIFY_ROCE_CC_GEN2             UINT32_C(0x7)
79 /* Engine CKV - The Alias key EC curve and ECC public key information. */
80 #define TLV_TYPE_ENGINE_CKV_ALIAS_ECC_PUBLIC_KEY UINT32_C(0x8001)
81 /* Engine CKV - Initialization vector. */
82 #define TLV_TYPE_ENGINE_CKV_IV                   UINT32_C(0x8003)
83 /* Engine CKV - Authentication tag. */
84 #define TLV_TYPE_ENGINE_CKV_AUTH_TAG             UINT32_C(0x8004)
85 /* Engine CKV - The encrypted data. */
86 #define TLV_TYPE_ENGINE_CKV_CIPHERTEXT           UINT32_C(0x8005)
87 /* Engine CKV - Supported host_algorithms. */
88 #define TLV_TYPE_ENGINE_CKV_HOST_ALGORITHMS      UINT32_C(0x8006)
89 /* Engine CKV - The Host EC curve name and ECC public key information. */
90 #define TLV_TYPE_ENGINE_CKV_HOST_ECC_PUBLIC_KEY  UINT32_C(0x8007)
91 /* Engine CKV - The ECDSA signature. */
92 #define TLV_TYPE_ENGINE_CKV_ECDSA_SIGNATURE      UINT32_C(0x8008)
93 /* Engine CKV - The firmware EC curve name and ECC public key information. */
94 #define TLV_TYPE_ENGINE_CKV_FW_ECC_PUBLIC_KEY    UINT32_C(0x8009)
95 /* Engine CKV - Supported firmware algorithms. */
96 #define TLV_TYPE_ENGINE_CKV_FW_ALGORITHMS        UINT32_C(0x800a)
97 #define TLV_TYPE_LAST \
98 	TLV_TYPE_ENGINE_CKV_FW_ALGORITHMS
99 
100 
101 /* tlv (size:64b/8B) */
102 struct __rte_packed_begin tlv {
103 	/*
104 	 * The command discriminator is used to differentiate between various
105 	 * types of HWRM messages. This includes legacy HWRM and RoCE slowpath
106 	 * command messages as well as newer TLV encapsulated HWRM commands.
107 	 *
108 	 * For TLV encapsulated messages this field must be 0x8000.
109 	 */
110 	uint16_t	cmd_discr;
111 	uint8_t	reserved_8b;
112 	uint8_t	flags;
113 	/*
114 	 * Indicates the presence of additional TLV encapsulated data
115 	 * follows this TLV.
116 	 */
117 	#define TLV_FLAGS_MORE         UINT32_C(0x1)
118 	/* Last TLV in a sequence of TLVs. */
119 	#define TLV_FLAGS_MORE_LAST      UINT32_C(0x0)
120 	/* More TLVs follow this TLV. */
121 	#define TLV_FLAGS_MORE_NOT_LAST  UINT32_C(0x1)
122 	/*
123 	 * When an HWRM receiver detects a TLV type that it does not
124 	 * support with the TLV required flag set, the receiver must
125 	 * reject the HWRM message with an error code indicating an
126 	 * unsupported TLV type.
127 	 */
128 	#define TLV_FLAGS_REQUIRED     UINT32_C(0x2)
129 	/* No */
130 	#define TLV_FLAGS_REQUIRED_NO    (UINT32_C(0x0) << 1)
131 	/* Yes */
132 	#define TLV_FLAGS_REQUIRED_YES   (UINT32_C(0x1) << 1)
133 	#define TLV_FLAGS_REQUIRED_LAST TLV_FLAGS_REQUIRED_YES
134 	/*
135 	 * This field defines the TLV type value which is divided into
136 	 * two ranges to differentiate between global and local TLV types.
137 	 * Global TLV types must be unique across all defined TLV types.
138 	 * Local TLV types are valid only for extensions to a given
139 	 * HWRM message and may be repeated across different HWRM message
140 	 * types. There is a direct correlation of each HWRM message type
141 	 * to a single global TLV type value.
142 	 *
143 	 * Global TLV range: `0 - (63k-1)`
144 	 *
145 	 * Local TLV range: `63k - (64k-1)`
146 	 */
147 	uint16_t	tlv_type;
148 	/*
149 	 * Length of the message data encapsulated by this TLV in bytes.
150 	 * This length does not include the size of the TLV header itself
151 	 * and it must be an integer multiple of 8B.
152 	 */
153 	uint16_t	length;
154 } __rte_packed_end;
155 
156 /* Input */
157 /* input (size:128b/16B) */
158 struct __rte_packed_begin input {
159 	/*
160 	 * This value indicates what type of request this is. The format
161 	 * for the rest of the command is determined by this field.
162 	 */
163 	uint16_t	req_type;
164 	/*
165 	 * This value indicates the what completion ring the request will
166 	 * be optionally completed on. If the value is -1, then no
167 	 * CR completion will be generated. Any other value must be a
168 	 * valid CR ring_id value for this function.
169 	 */
170 	uint16_t	cmpl_ring;
171 	/* This value indicates the command sequence number. */
172 	uint16_t	seq_id;
173 	/*
174 	 * Target ID of this command.
175 	 *
176 	 * 0x0 - 0xFFF8 - Used for function ids
177 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
178 	 * 0xFFFF - HWRM
179 	 */
180 	uint16_t	target_id;
181 	/*
182 	 * This is the host address where the response will be written
183 	 * when the request is complete. This area must be 16B aligned
184 	 * and must be cleared to zero before the request is made.
185 	 */
186 	uint64_t	resp_addr;
187 } __rte_packed_end;
188 
189 /* Output */
190 /* output (size:64b/8B) */
191 struct __rte_packed_begin output {
192 	/*
193 	 * Pass/Fail or error type
194 	 *
195 	 * Note: receiver to verify the in parameters, and fail the call
196 	 * with an error when appropriate
197 	 */
198 	uint16_t	error_code;
199 	/* This field returns the type of original request. */
200 	uint16_t	req_type;
201 	/* This field provides original sequence number of the command. */
202 	uint16_t	seq_id;
203 	/*
204 	 * This field is the length of the response in bytes. The
205 	 * last byte of the response is a valid flag that will read
206 	 * as '1' when the command has been completely written to
207 	 * memory.
208 	 */
209 	uint16_t	resp_len;
210 } __rte_packed_end;
211 
212 /* Short Command Structure */
213 /* hwrm_short_input (size:128b/16B) */
214 struct __rte_packed_begin hwrm_short_input {
215 	/*
216 	 * This field indicates the type of request in the request buffer.
217 	 * The format for the rest of the command (request) is determined
218 	 * by this field.
219 	 */
220 	uint16_t	req_type;
221 	/*
222 	 * This field indicates a signature that is used to identify short
223 	 * form of the command listed here. This field shall be set to
224 	 * 17185 (0x4321).
225 	 */
226 	uint16_t	signature;
227 	/* Signature indicating this is a short form of HWRM command */
228 	#define HWRM_SHORT_INPUT_SIGNATURE_SHORT_CMD UINT32_C(0x4321)
229 	#define HWRM_SHORT_INPUT_SIGNATURE_LAST \
230 		HWRM_SHORT_INPUT_SIGNATURE_SHORT_CMD
231 	/* The target ID of the command */
232 	uint16_t	target_id;
233 	/* Default target_id (0x0) to maintain compatibility with old driver */
234 	#define HWRM_SHORT_INPUT_TARGET_ID_DEFAULT UINT32_C(0x0)
235 	/* Reserved for user-space HWRM interface */
236 	#define HWRM_SHORT_INPUT_TARGET_ID_TOOLS   UINT32_C(0xfffd)
237 	#define HWRM_SHORT_INPUT_TARGET_ID_LAST \
238 		HWRM_SHORT_INPUT_TARGET_ID_TOOLS
239 	/* This value indicates the length of the request. */
240 	uint16_t	size;
241 	/*
242 	 * This is the host address where the request was written.
243 	 * This area must be 16B aligned.
244 	 */
245 	uint64_t	req_addr;
246 } __rte_packed_end;
247 
248 /*
249  * Command numbering
250  * # NOTE - definitions already in hwrm_req_type, in hwrm_types.yaml
251  * #        So only structure definition is provided here.
252  */
253 /* cmd_nums (size:64b/8B) */
254 struct __rte_packed_begin cmd_nums {
255 	/*
256 	 * This version of the specification defines the commands listed in
257 	 * the table below. The following are general implementation
258 	 * requirements for these commands:
259 	 *
260 	 * # All commands listed below that are marked neither
261 	 * reserved nor experimental shall be implemented by the HWRM.
262 	 * # A HWRM client compliant to this specification should not use
263 	 * commands outside of the list below.
264 	 * # A HWRM client compliant to this specification should not use
265 	 * command numbers marked reserved below.
266 	 * # A command marked experimental below may not be implemented
267 	 * by the HWRM.
268 	 * # A command marked experimental may change in the
269 	 * future version of the HWRM specification.
270 	 * # A command not listed below may be implemented by the HWRM.
271 	 * The behavior of commands that are not listed below is outside
272 	 * the scope of this specification.
273 	 */
274 	uint16_t	req_type;
275 	#define HWRM_VER_GET                              UINT32_C(0x0)
276 	#define HWRM_FUNC_ECHO_RESPONSE                   UINT32_C(0xb)
277 	#define HWRM_ERROR_RECOVERY_QCFG                  UINT32_C(0xc)
278 	#define HWRM_FUNC_DRV_IF_CHANGE                   UINT32_C(0xd)
279 	#define HWRM_FUNC_BUF_UNRGTR                      UINT32_C(0xe)
280 	#define HWRM_FUNC_VF_CFG                          UINT32_C(0xf)
281 	/* Reserved for future use. */
282 	#define HWRM_RESERVED1                            UINT32_C(0x10)
283 	#define HWRM_FUNC_RESET                           UINT32_C(0x11)
284 	#define HWRM_FUNC_GETFID                          UINT32_C(0x12)
285 	#define HWRM_FUNC_VF_ALLOC                        UINT32_C(0x13)
286 	#define HWRM_FUNC_VF_FREE                         UINT32_C(0x14)
287 	#define HWRM_FUNC_QCAPS                           UINT32_C(0x15)
288 	#define HWRM_FUNC_QCFG                            UINT32_C(0x16)
289 	#define HWRM_FUNC_CFG                             UINT32_C(0x17)
290 	#define HWRM_FUNC_QSTATS                          UINT32_C(0x18)
291 	#define HWRM_FUNC_CLR_STATS                       UINT32_C(0x19)
292 	#define HWRM_FUNC_DRV_UNRGTR                      UINT32_C(0x1a)
293 	#define HWRM_FUNC_VF_RESC_FREE                    UINT32_C(0x1b)
294 	#define HWRM_FUNC_VF_VNIC_IDS_QUERY               UINT32_C(0x1c)
295 	#define HWRM_FUNC_DRV_RGTR                        UINT32_C(0x1d)
296 	#define HWRM_FUNC_DRV_QVER                        UINT32_C(0x1e)
297 	#define HWRM_FUNC_BUF_RGTR                        UINT32_C(0x1f)
298 	#define HWRM_PORT_PHY_CFG                         UINT32_C(0x20)
299 	#define HWRM_PORT_MAC_CFG                         UINT32_C(0x21)
300 	/* Experimental */
301 	#define HWRM_PORT_TS_QUERY                        UINT32_C(0x22)
302 	#define HWRM_PORT_QSTATS                          UINT32_C(0x23)
303 	#define HWRM_PORT_LPBK_QSTATS                     UINT32_C(0x24)
304 	/* Experimental */
305 	#define HWRM_PORT_CLR_STATS                       UINT32_C(0x25)
306 	/* Experimental */
307 	#define HWRM_PORT_LPBK_CLR_STATS                  UINT32_C(0x26)
308 	#define HWRM_PORT_PHY_QCFG                        UINT32_C(0x27)
309 	#define HWRM_PORT_MAC_QCFG                        UINT32_C(0x28)
310 	/* Experimental */
311 	#define HWRM_PORT_MAC_PTP_QCFG                    UINT32_C(0x29)
312 	#define HWRM_PORT_PHY_QCAPS                       UINT32_C(0x2a)
313 	#define HWRM_PORT_PHY_I2C_WRITE                   UINT32_C(0x2b)
314 	#define HWRM_PORT_PHY_I2C_READ                    UINT32_C(0x2c)
315 	#define HWRM_PORT_LED_CFG                         UINT32_C(0x2d)
316 	#define HWRM_PORT_LED_QCFG                        UINT32_C(0x2e)
317 	#define HWRM_PORT_LED_QCAPS                       UINT32_C(0x2f)
318 	#define HWRM_QUEUE_QPORTCFG                       UINT32_C(0x30)
319 	#define HWRM_QUEUE_QCFG                           UINT32_C(0x31)
320 	#define HWRM_QUEUE_CFG                            UINT32_C(0x32)
321 	#define HWRM_FUNC_VLAN_CFG                        UINT32_C(0x33)
322 	#define HWRM_FUNC_VLAN_QCFG                       UINT32_C(0x34)
323 	#define HWRM_QUEUE_PFCENABLE_QCFG                 UINT32_C(0x35)
324 	#define HWRM_QUEUE_PFCENABLE_CFG                  UINT32_C(0x36)
325 	#define HWRM_QUEUE_PRI2COS_QCFG                   UINT32_C(0x37)
326 	#define HWRM_QUEUE_PRI2COS_CFG                    UINT32_C(0x38)
327 	#define HWRM_QUEUE_COS2BW_QCFG                    UINT32_C(0x39)
328 	#define HWRM_QUEUE_COS2BW_CFG                     UINT32_C(0x3a)
329 	#define HWRM_QUEUE_DSCP_QCAPS                     UINT32_C(0x3b)
330 	#define HWRM_QUEUE_DSCP2PRI_QCFG                  UINT32_C(0x3c)
331 	#define HWRM_QUEUE_DSCP2PRI_CFG                   UINT32_C(0x3d)
332 	#define HWRM_VNIC_ALLOC                           UINT32_C(0x40)
333 	#define HWRM_VNIC_FREE                            UINT32_C(0x41)
334 	#define HWRM_VNIC_CFG                             UINT32_C(0x42)
335 	#define HWRM_VNIC_QCFG                            UINT32_C(0x43)
336 	#define HWRM_VNIC_TPA_CFG                         UINT32_C(0x44)
337 	/* Experimental */
338 	#define HWRM_VNIC_TPA_QCFG                        UINT32_C(0x45)
339 	#define HWRM_VNIC_RSS_CFG                         UINT32_C(0x46)
340 	#define HWRM_VNIC_RSS_QCFG                        UINT32_C(0x47)
341 	#define HWRM_VNIC_PLCMODES_CFG                    UINT32_C(0x48)
342 	#define HWRM_VNIC_PLCMODES_QCFG                   UINT32_C(0x49)
343 	#define HWRM_VNIC_QCAPS                           UINT32_C(0x4a)
344 	/* Updates specific fields in RX VNIC structure */
345 	#define HWRM_VNIC_UPDATE                          UINT32_C(0x4b)
346 	#define HWRM_RING_ALLOC                           UINT32_C(0x50)
347 	#define HWRM_RING_FREE                            UINT32_C(0x51)
348 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS        UINT32_C(0x52)
349 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS     UINT32_C(0x53)
350 	#define HWRM_RING_AGGINT_QCAPS                    UINT32_C(0x54)
351 	#define HWRM_RING_SCHQ_ALLOC                      UINT32_C(0x55)
352 	#define HWRM_RING_SCHQ_CFG                        UINT32_C(0x56)
353 	#define HWRM_RING_SCHQ_FREE                       UINT32_C(0x57)
354 	#define HWRM_RING_RESET                           UINT32_C(0x5e)
355 	#define HWRM_RING_GRP_ALLOC                       UINT32_C(0x60)
356 	#define HWRM_RING_GRP_FREE                        UINT32_C(0x61)
357 	#define HWRM_RING_CFG                             UINT32_C(0x62)
358 	#define HWRM_RING_QCFG                            UINT32_C(0x63)
359 	/* Reserved for future use. */
360 	#define HWRM_RESERVED5                            UINT32_C(0x64)
361 	/* Reserved for future use. */
362 	#define HWRM_RESERVED6                            UINT32_C(0x65)
363 	#define HWRM_VNIC_RSS_COS_LB_CTX_ALLOC            UINT32_C(0x70)
364 	#define HWRM_VNIC_RSS_COS_LB_CTX_FREE             UINT32_C(0x71)
365 	#define HWRM_QUEUE_MPLS_QCAPS                     UINT32_C(0x80)
366 	#define HWRM_QUEUE_MPLSTC2PRI_QCFG                UINT32_C(0x81)
367 	#define HWRM_QUEUE_MPLSTC2PRI_CFG                 UINT32_C(0x82)
368 	#define HWRM_QUEUE_VLANPRI_QCAPS                  UINT32_C(0x83)
369 	#define HWRM_QUEUE_VLANPRI2PRI_QCFG               UINT32_C(0x84)
370 	#define HWRM_QUEUE_VLANPRI2PRI_CFG                UINT32_C(0x85)
371 	#define HWRM_QUEUE_GLOBAL_CFG                     UINT32_C(0x86)
372 	#define HWRM_QUEUE_GLOBAL_QCFG                    UINT32_C(0x87)
373 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG      UINT32_C(0x88)
374 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG       UINT32_C(0x89)
375 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG      UINT32_C(0x8a)
376 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG       UINT32_C(0x8b)
377 	#define HWRM_QUEUE_QCAPS                          UINT32_C(0x8c)
378 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_QCFG       UINT32_C(0x8d)
379 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG        UINT32_C(0x8e)
380 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_QCFG       UINT32_C(0x8f)
381 	#define HWRM_CFA_L2_FILTER_ALLOC                  UINT32_C(0x90)
382 	#define HWRM_CFA_L2_FILTER_FREE                   UINT32_C(0x91)
383 	#define HWRM_CFA_L2_FILTER_CFG                    UINT32_C(0x92)
384 	#define HWRM_CFA_L2_SET_RX_MASK                   UINT32_C(0x93)
385 	#define HWRM_CFA_VLAN_ANTISPOOF_CFG               UINT32_C(0x94)
386 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC              UINT32_C(0x95)
387 	#define HWRM_CFA_TUNNEL_FILTER_FREE               UINT32_C(0x96)
388 	/* Experimental */
389 	#define HWRM_CFA_ENCAP_RECORD_ALLOC               UINT32_C(0x97)
390 	/* Experimental */
391 	#define HWRM_CFA_ENCAP_RECORD_FREE                UINT32_C(0x98)
392 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC              UINT32_C(0x99)
393 	#define HWRM_CFA_NTUPLE_FILTER_FREE               UINT32_C(0x9a)
394 	#define HWRM_CFA_NTUPLE_FILTER_CFG                UINT32_C(0x9b)
395 	/* Experimental */
396 	#define HWRM_CFA_EM_FLOW_ALLOC                    UINT32_C(0x9c)
397 	/* Experimental */
398 	#define HWRM_CFA_EM_FLOW_FREE                     UINT32_C(0x9d)
399 	/* Experimental */
400 	#define HWRM_CFA_EM_FLOW_CFG                      UINT32_C(0x9e)
401 	#define HWRM_TUNNEL_DST_PORT_QUERY                UINT32_C(0xa0)
402 	#define HWRM_TUNNEL_DST_PORT_ALLOC                UINT32_C(0xa1)
403 	#define HWRM_TUNNEL_DST_PORT_FREE                 UINT32_C(0xa2)
404 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG        UINT32_C(0xa3)
405 	#define HWRM_STAT_CTX_ENG_QUERY                   UINT32_C(0xaf)
406 	#define HWRM_STAT_CTX_ALLOC                       UINT32_C(0xb0)
407 	#define HWRM_STAT_CTX_FREE                        UINT32_C(0xb1)
408 	#define HWRM_STAT_CTX_QUERY                       UINT32_C(0xb2)
409 	#define HWRM_STAT_CTX_CLR_STATS                   UINT32_C(0xb3)
410 	#define HWRM_PORT_QSTATS_EXT                      UINT32_C(0xb4)
411 	#define HWRM_PORT_PHY_MDIO_WRITE                  UINT32_C(0xb5)
412 	#define HWRM_PORT_PHY_MDIO_READ                   UINT32_C(0xb6)
413 	#define HWRM_PORT_PHY_MDIO_BUS_ACQUIRE            UINT32_C(0xb7)
414 	#define HWRM_PORT_PHY_MDIO_BUS_RELEASE            UINT32_C(0xb8)
415 	#define HWRM_PORT_QSTATS_EXT_PFC_WD               UINT32_C(0xb9)
416 	/* Reserved. */
417 	#define HWRM_RESERVED7                            UINT32_C(0xba)
418 	#define HWRM_PORT_TX_FIR_CFG                      UINT32_C(0xbb)
419 	#define HWRM_PORT_TX_FIR_QCFG                     UINT32_C(0xbc)
420 	#define HWRM_PORT_ECN_QSTATS                      UINT32_C(0xbd)
421 	#define HWRM_FW_LIVEPATCH_QUERY                   UINT32_C(0xbe)
422 	#define HWRM_FW_LIVEPATCH                         UINT32_C(0xbf)
423 	#define HWRM_FW_RESET                             UINT32_C(0xc0)
424 	#define HWRM_FW_QSTATUS                           UINT32_C(0xc1)
425 	#define HWRM_FW_HEALTH_CHECK                      UINT32_C(0xc2)
426 	#define HWRM_FW_SYNC                              UINT32_C(0xc3)
427 	#define HWRM_FW_STATE_QCAPS                       UINT32_C(0xc4)
428 	#define HWRM_FW_STATE_QUIESCE                     UINT32_C(0xc5)
429 	#define HWRM_FW_STATE_BACKUP                      UINT32_C(0xc6)
430 	#define HWRM_FW_STATE_RESTORE                     UINT32_C(0xc7)
431 	/* Experimental */
432 	#define HWRM_FW_SET_TIME                          UINT32_C(0xc8)
433 	/* Experimental */
434 	#define HWRM_FW_GET_TIME                          UINT32_C(0xc9)
435 	/* Experimental */
436 	#define HWRM_FW_SET_STRUCTURED_DATA               UINT32_C(0xca)
437 	/* Experimental */
438 	#define HWRM_FW_GET_STRUCTURED_DATA               UINT32_C(0xcb)
439 	/* Experimental */
440 	#define HWRM_FW_IPC_MAILBOX                       UINT32_C(0xcc)
441 	#define HWRM_FW_ECN_CFG                           UINT32_C(0xcd)
442 	#define HWRM_FW_ECN_QCFG                          UINT32_C(0xce)
443 	#define HWRM_FW_SECURE_CFG                        UINT32_C(0xcf)
444 	#define HWRM_EXEC_FWD_RESP                        UINT32_C(0xd0)
445 	#define HWRM_REJECT_FWD_RESP                      UINT32_C(0xd1)
446 	#define HWRM_FWD_RESP                             UINT32_C(0xd2)
447 	#define HWRM_FWD_ASYNC_EVENT_CMPL                 UINT32_C(0xd3)
448 	#define HWRM_OEM_CMD                              UINT32_C(0xd4)
449 	/* Tells the fw to run PRBS test on a given port and lane. */
450 	#define HWRM_PORT_PRBS_TEST                       UINT32_C(0xd5)
451 	#define HWRM_PORT_SFP_SIDEBAND_CFG                UINT32_C(0xd6)
452 	#define HWRM_PORT_SFP_SIDEBAND_QCFG               UINT32_C(0xd7)
453 	#define HWRM_FW_STATE_UNQUIESCE                   UINT32_C(0xd8)
454 	/* Tells the fw to collect dsc dump on a given port and lane. */
455 	#define HWRM_PORT_DSC_DUMP                        UINT32_C(0xd9)
456 	#define HWRM_PORT_EP_TX_QCFG                      UINT32_C(0xda)
457 	#define HWRM_PORT_EP_TX_CFG                       UINT32_C(0xdb)
458 	#define HWRM_PORT_CFG                             UINT32_C(0xdc)
459 	#define HWRM_PORT_QCFG                            UINT32_C(0xdd)
460 	/* Queries MAC capabilities for the specified port */
461 	#define HWRM_PORT_MAC_QCAPS                       UINT32_C(0xdf)
462 	#define HWRM_TEMP_MONITOR_QUERY                   UINT32_C(0xe0)
463 	#define HWRM_REG_POWER_QUERY                      UINT32_C(0xe1)
464 	#define HWRM_CORE_FREQUENCY_QUERY                 UINT32_C(0xe2)
465 	#define HWRM_REG_POWER_HISTOGRAM                  UINT32_C(0xe3)
466 	#define HWRM_WOL_FILTER_ALLOC                     UINT32_C(0xf0)
467 	#define HWRM_WOL_FILTER_FREE                      UINT32_C(0xf1)
468 	#define HWRM_WOL_FILTER_QCFG                      UINT32_C(0xf2)
469 	#define HWRM_WOL_REASON_QCFG                      UINT32_C(0xf3)
470 	/* Experimental */
471 	#define HWRM_CFA_METER_QCAPS                      UINT32_C(0xf4)
472 	/* Experimental */
473 	#define HWRM_CFA_METER_PROFILE_ALLOC              UINT32_C(0xf5)
474 	/* Experimental */
475 	#define HWRM_CFA_METER_PROFILE_FREE               UINT32_C(0xf6)
476 	/* Experimental */
477 	#define HWRM_CFA_METER_PROFILE_CFG                UINT32_C(0xf7)
478 	/* Experimental */
479 	#define HWRM_CFA_METER_INSTANCE_ALLOC             UINT32_C(0xf8)
480 	/* Experimental */
481 	#define HWRM_CFA_METER_INSTANCE_FREE              UINT32_C(0xf9)
482 	/* Experimental */
483 	#define HWRM_CFA_METER_INSTANCE_CFG               UINT32_C(0xfa)
484 	/* Experimental */
485 	#define HWRM_CFA_VFR_ALLOC                        UINT32_C(0xfd)
486 	/* Experimental */
487 	#define HWRM_CFA_VFR_FREE                         UINT32_C(0xfe)
488 	/* Experimental */
489 	#define HWRM_CFA_VF_PAIR_ALLOC                    UINT32_C(0x100)
490 	/* Experimental */
491 	#define HWRM_CFA_VF_PAIR_FREE                     UINT32_C(0x101)
492 	/* Experimental */
493 	#define HWRM_CFA_VF_PAIR_INFO                     UINT32_C(0x102)
494 	/* Experimental */
495 	#define HWRM_CFA_FLOW_ALLOC                       UINT32_C(0x103)
496 	/* Experimental */
497 	#define HWRM_CFA_FLOW_FREE                        UINT32_C(0x104)
498 	/* Experimental */
499 	#define HWRM_CFA_FLOW_FLUSH                       UINT32_C(0x105)
500 	#define HWRM_CFA_FLOW_STATS                       UINT32_C(0x106)
501 	#define HWRM_CFA_FLOW_INFO                        UINT32_C(0x107)
502 	/* Experimental */
503 	#define HWRM_CFA_DECAP_FILTER_ALLOC               UINT32_C(0x108)
504 	/* Experimental */
505 	#define HWRM_CFA_DECAP_FILTER_FREE                UINT32_C(0x109)
506 	#define HWRM_CFA_VLAN_ANTISPOOF_QCFG              UINT32_C(0x10a)
507 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC       UINT32_C(0x10b)
508 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE        UINT32_C(0x10c)
509 	/* Experimental */
510 	#define HWRM_CFA_PAIR_ALLOC                       UINT32_C(0x10d)
511 	/* Experimental */
512 	#define HWRM_CFA_PAIR_FREE                        UINT32_C(0x10e)
513 	/* Experimental */
514 	#define HWRM_CFA_PAIR_INFO                        UINT32_C(0x10f)
515 	/* Experimental */
516 	#define HWRM_FW_IPC_MSG                           UINT32_C(0x110)
517 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO        UINT32_C(0x111)
518 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE       UINT32_C(0x112)
519 	/* Experimental */
520 	#define HWRM_CFA_FLOW_AGING_TIMER_RESET           UINT32_C(0x113)
521 	/* Experimental */
522 	#define HWRM_CFA_FLOW_AGING_CFG                   UINT32_C(0x114)
523 	/* Experimental */
524 	#define HWRM_CFA_FLOW_AGING_QCFG                  UINT32_C(0x115)
525 	/* Experimental */
526 	#define HWRM_CFA_FLOW_AGING_QCAPS                 UINT32_C(0x116)
527 	/* Experimental */
528 	#define HWRM_CFA_CTX_MEM_RGTR                     UINT32_C(0x117)
529 	/* Experimental */
530 	#define HWRM_CFA_CTX_MEM_UNRGTR                   UINT32_C(0x118)
531 	/* Experimental */
532 	#define HWRM_CFA_CTX_MEM_QCTX                     UINT32_C(0x119)
533 	/* Experimental */
534 	#define HWRM_CFA_CTX_MEM_QCAPS                    UINT32_C(0x11a)
535 	/* Experimental */
536 	#define HWRM_CFA_COUNTER_QCAPS                    UINT32_C(0x11b)
537 	/* Experimental */
538 	#define HWRM_CFA_COUNTER_CFG                      UINT32_C(0x11c)
539 	/* Experimental */
540 	#define HWRM_CFA_COUNTER_QCFG                     UINT32_C(0x11d)
541 	/* Experimental */
542 	#define HWRM_CFA_COUNTER_QSTATS                   UINT32_C(0x11e)
543 	/* Experimental */
544 	#define HWRM_CFA_TCP_FLAG_PROCESS_QCFG            UINT32_C(0x11f)
545 	/* Experimental */
546 	#define HWRM_CFA_EEM_QCAPS                        UINT32_C(0x120)
547 	/* Experimental */
548 	#define HWRM_CFA_EEM_CFG                          UINT32_C(0x121)
549 	/* Experimental */
550 	#define HWRM_CFA_EEM_QCFG                         UINT32_C(0x122)
551 	/* Experimental */
552 	#define HWRM_CFA_EEM_OP                           UINT32_C(0x123)
553 	/* Experimental */
554 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS              UINT32_C(0x124)
555 	/* Experimental - DEPRECATED */
556 	#define HWRM_CFA_TFLIB                            UINT32_C(0x125)
557 	/* Experimental */
558 	#define HWRM_CFA_LAG_GROUP_MEMBER_RGTR            UINT32_C(0x126)
559 	/* Experimental */
560 	#define HWRM_CFA_LAG_GROUP_MEMBER_UNRGTR          UINT32_C(0x127)
561 	/* Experimental */
562 	#define HWRM_CFA_TLS_FILTER_ALLOC                 UINT32_C(0x128)
563 	/* Experimental */
564 	#define HWRM_CFA_TLS_FILTER_FREE                  UINT32_C(0x129)
565 	/* Release an AFM function for TF control */
566 	#define HWRM_CFA_RELEASE_AFM_FUNC                 UINT32_C(0x12a)
567 	/*
568 	 * Engine CKV - Get the current allocation status of keys provisioned in
569 	 * the key vault.
570 	 */
571 	#define HWRM_ENGINE_CKV_STATUS                    UINT32_C(0x12e)
572 	/* Engine CKV - Add a new CKEK used to encrypt keys. */
573 	#define HWRM_ENGINE_CKV_CKEK_ADD                  UINT32_C(0x12f)
574 	/* Engine CKV - Delete a previously added CKEK. */
575 	#define HWRM_ENGINE_CKV_CKEK_DELETE               UINT32_C(0x130)
576 	/* Engine CKV - Add a new key to the key vault. */
577 	#define HWRM_ENGINE_CKV_KEY_ADD                   UINT32_C(0x131)
578 	/* Engine CKV - Delete a key from the key vault. */
579 	#define HWRM_ENGINE_CKV_KEY_DELETE                UINT32_C(0x132)
580 	/* Engine CKV - Delete all keys from the key vault. */
581 	#define HWRM_ENGINE_CKV_FLUSH                     UINT32_C(0x133)
582 	/* Engine CKV - Get random data. */
583 	#define HWRM_ENGINE_CKV_RNG_GET                   UINT32_C(0x134)
584 	/* Engine CKV - Generate and encrypt a new AES key. */
585 	#define HWRM_ENGINE_CKV_KEY_GEN                   UINT32_C(0x135)
586 	/* Engine CKV - Configure a label index with a label value. */
587 	#define HWRM_ENGINE_CKV_KEY_LABEL_CFG             UINT32_C(0x136)
588 	/* Engine CKV - Query a label */
589 	#define HWRM_ENGINE_CKV_KEY_LABEL_QCFG            UINT32_C(0x137)
590 	/* Engine - Query the available queue groups configuration. */
591 	#define HWRM_ENGINE_QG_CONFIG_QUERY               UINT32_C(0x13c)
592 	/* Engine - Query the queue groups assigned to a function. */
593 	#define HWRM_ENGINE_QG_QUERY                      UINT32_C(0x13d)
594 	/* Engine - Query the available queue group meter profile configuration. */
595 	#define HWRM_ENGINE_QG_METER_PROFILE_CONFIG_QUERY UINT32_C(0x13e)
596 	/* Engine - Query the configuration of a queue group meter profile. */
597 	#define HWRM_ENGINE_QG_METER_PROFILE_QUERY        UINT32_C(0x13f)
598 	/* Engine - Allocate a queue group meter profile. */
599 	#define HWRM_ENGINE_QG_METER_PROFILE_ALLOC        UINT32_C(0x140)
600 	/* Engine - Free a queue group meter profile. */
601 	#define HWRM_ENGINE_QG_METER_PROFILE_FREE         UINT32_C(0x141)
602 	/* Engine - Query the meters assigned to a queue group. */
603 	#define HWRM_ENGINE_QG_METER_QUERY                UINT32_C(0x142)
604 	/* Engine - Bind a queue group meter profile to a queue group. */
605 	#define HWRM_ENGINE_QG_METER_BIND                 UINT32_C(0x143)
606 	/* Engine - Unbind a queue group meter profile from a queue group. */
607 	#define HWRM_ENGINE_QG_METER_UNBIND               UINT32_C(0x144)
608 	/* Engine - Bind a queue group to a function. */
609 	#define HWRM_ENGINE_QG_FUNC_BIND                  UINT32_C(0x145)
610 	/* Engine - Query the scheduling group configuration. */
611 	#define HWRM_ENGINE_SG_CONFIG_QUERY               UINT32_C(0x146)
612 	/* Engine - Query the queue groups assigned to a scheduling group. */
613 	#define HWRM_ENGINE_SG_QUERY                      UINT32_C(0x147)
614 	/* Engine - Query the configuration of a scheduling group's meter profiles. */
615 	#define HWRM_ENGINE_SG_METER_QUERY                UINT32_C(0x148)
616 	/* Engine - Configure a scheduling group's meter profiles. */
617 	#define HWRM_ENGINE_SG_METER_CONFIG               UINT32_C(0x149)
618 	/* Engine - Bind a queue group to a scheduling group. */
619 	#define HWRM_ENGINE_SG_QG_BIND                    UINT32_C(0x14a)
620 	/* Engine - Unbind a queue group from its scheduling group. */
621 	#define HWRM_ENGINE_QG_SG_UNBIND                  UINT32_C(0x14b)
622 	/* Engine - Query the Engine configuration. */
623 	#define HWRM_ENGINE_CONFIG_QUERY                  UINT32_C(0x154)
624 	/* Engine - Configure the statistics accumulator for an Engine. */
625 	#define HWRM_ENGINE_STATS_CONFIG                  UINT32_C(0x155)
626 	/* Engine - Clear the statistics accumulator for an Engine. */
627 	#define HWRM_ENGINE_STATS_CLEAR                   UINT32_C(0x156)
628 	/* Engine - Query the statistics accumulator for an Engine. */
629 	#define HWRM_ENGINE_STATS_QUERY                   UINT32_C(0x157)
630 	/*
631 	 * Engine - Query statistics counters for continuous errors from all CDDIP
632 	 * Engines.
633 	 */
634 	#define HWRM_ENGINE_STATS_QUERY_CONTINUOUS_ERROR  UINT32_C(0x158)
635 	/* Engine - Allocate an Engine RQ. */
636 	#define HWRM_ENGINE_RQ_ALLOC                      UINT32_C(0x15e)
637 	/* Engine - Free an Engine RQ. */
638 	#define HWRM_ENGINE_RQ_FREE                       UINT32_C(0x15f)
639 	/* Engine - Allocate an Engine CQ. */
640 	#define HWRM_ENGINE_CQ_ALLOC                      UINT32_C(0x160)
641 	/* Engine - Free an Engine CQ. */
642 	#define HWRM_ENGINE_CQ_FREE                       UINT32_C(0x161)
643 	/* Engine - Allocate an NQ. */
644 	#define HWRM_ENGINE_NQ_ALLOC                      UINT32_C(0x162)
645 	/* Engine - Free an NQ. */
646 	#define HWRM_ENGINE_NQ_FREE                       UINT32_C(0x163)
647 	/* Engine - Set the on-die RQE credit update location. */
648 	#define HWRM_ENGINE_ON_DIE_RQE_CREDITS            UINT32_C(0x164)
649 	/* Engine - Query the engine function configuration. */
650 	#define HWRM_ENGINE_FUNC_QCFG                     UINT32_C(0x165)
651 	/* Experimental */
652 	#define HWRM_FUNC_RESOURCE_QCAPS                  UINT32_C(0x190)
653 	/* Experimental */
654 	#define HWRM_FUNC_VF_RESOURCE_CFG                 UINT32_C(0x191)
655 	/* Experimental */
656 	#define HWRM_FUNC_BACKING_STORE_QCAPS             UINT32_C(0x192)
657 	/* Experimental */
658 	#define HWRM_FUNC_BACKING_STORE_CFG               UINT32_C(0x193)
659 	/* Experimental */
660 	#define HWRM_FUNC_BACKING_STORE_QCFG              UINT32_C(0x194)
661 	/* Configures the BW of any VF */
662 	#define HWRM_FUNC_VF_BW_CFG                       UINT32_C(0x195)
663 	/* Queries the BW of any VF */
664 	#define HWRM_FUNC_VF_BW_QCFG                      UINT32_C(0x196)
665 	/* Queries pf ids belong to specified host(s) */
666 	#define HWRM_FUNC_HOST_PF_IDS_QUERY               UINT32_C(0x197)
667 	/* Queries extended stats per function */
668 	#define HWRM_FUNC_QSTATS_EXT                      UINT32_C(0x198)
669 	/* Queries extended statistics context */
670 	#define HWRM_STAT_EXT_CTX_QUERY                   UINT32_C(0x199)
671 	/* Configure SoC packet DMA settings */
672 	#define HWRM_FUNC_SPD_CFG                         UINT32_C(0x19a)
673 	/* Query SoC packet DMA settings */
674 	#define HWRM_FUNC_SPD_QCFG                        UINT32_C(0x19b)
675 	/* PTP - Queries configuration of timesync IO pins. */
676 	#define HWRM_FUNC_PTP_PIN_QCFG                    UINT32_C(0x19c)
677 	/* PTP - Configuration of timesync IO pins. */
678 	#define HWRM_FUNC_PTP_PIN_CFG                     UINT32_C(0x19d)
679 	/* PTP - Configuration for disciplining PHC. */
680 	#define HWRM_FUNC_PTP_CFG                         UINT32_C(0x19e)
681 	/* PTP - Queries for PHC timestamps. */
682 	#define HWRM_FUNC_PTP_TS_QUERY                    UINT32_C(0x19f)
683 	/* PTP - Extended PTP configuration. */
684 	#define HWRM_FUNC_PTP_EXT_CFG                     UINT32_C(0x1a0)
685 	/* PTP - Query extended PTP configuration. */
686 	#define HWRM_FUNC_PTP_EXT_QCFG                    UINT32_C(0x1a1)
687 	/* The command is used to allocate KTLS or QUIC key contexts. */
688 	#define HWRM_FUNC_KEY_CTX_ALLOC                   UINT32_C(0x1a2)
689 	/* The is the new API to configure backing stores. */
690 	#define HWRM_FUNC_BACKING_STORE_CFG_V2            UINT32_C(0x1a3)
691 	/* The is the new API to query backing store configurations. */
692 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2           UINT32_C(0x1a4)
693 	/* To support doorbell pacing configuration. */
694 	#define HWRM_FUNC_DBR_PACING_CFG                  UINT32_C(0x1a5)
695 	/* To query doorbell pacing configuration. */
696 	#define HWRM_FUNC_DBR_PACING_QCFG                 UINT32_C(0x1a6)
697 	/*
698 	 * To broadcast the doorbell event to the drivers to
699 	 * initiate pacing of doorbells.
700 	 */
701 	#define HWRM_FUNC_DBR_PACING_BROADCAST_EVENT      UINT32_C(0x1a7)
702 	/* The is the new API to query backing store capabilities. */
703 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2          UINT32_C(0x1a8)
704 	/* To query doorbell pacing NQ id list configuration. */
705 	#define HWRM_FUNC_DBR_PACING_NQLIST_QUERY         UINT32_C(0x1a9)
706 	/*
707 	 * To notify the firmware that recovery cycle has been
708 	 * completed by host function drivers.
709 	 */
710 	#define HWRM_FUNC_DBR_RECOVERY_COMPLETED          UINT32_C(0x1aa)
711 	/* Configures SyncE configurations. */
712 	#define HWRM_FUNC_SYNCE_CFG                       UINT32_C(0x1ab)
713 	/* Queries SyncE configurations. */
714 	#define HWRM_FUNC_SYNCE_QCFG                      UINT32_C(0x1ac)
715 	/* The command is used to deallocate KTLS or QUIC key contexts. */
716 	#define HWRM_FUNC_KEY_CTX_FREE                    UINT32_C(0x1ad)
717 	/* The command is used to configure link aggr group mode. */
718 	#define HWRM_FUNC_LAG_MODE_CFG                    UINT32_C(0x1ae)
719 	/* The command is used to query link aggr group mode. */
720 	#define HWRM_FUNC_LAG_MODE_QCFG                   UINT32_C(0x1af)
721 	/* The command is used to create a link aggr group. */
722 	#define HWRM_FUNC_LAG_CREATE                      UINT32_C(0x1b0)
723 	/* The command is used to update a link aggr group. */
724 	#define HWRM_FUNC_LAG_UPDATE                      UINT32_C(0x1b1)
725 	/* The command is used to free a link aggr group. */
726 	#define HWRM_FUNC_LAG_FREE                        UINT32_C(0x1b2)
727 	/* The command is used to query a link aggr group. */
728 	#define HWRM_FUNC_LAG_QCFG                        UINT32_C(0x1b3)
729 	/* Experimental */
730 	#define HWRM_SELFTEST_QLIST                       UINT32_C(0x200)
731 	/* Experimental */
732 	#define HWRM_SELFTEST_EXEC                        UINT32_C(0x201)
733 	/* Experimental */
734 	#define HWRM_SELFTEST_IRQ                         UINT32_C(0x202)
735 	/* Experimental */
736 	#define HWRM_SELFTEST_RETRIEVE_SERDES_DATA        UINT32_C(0x203)
737 	/* Experimental */
738 	#define HWRM_PCIE_QSTATS                          UINT32_C(0x204)
739 	/* Experimental */
740 	#define HWRM_MFG_FRU_WRITE_CONTROL                UINT32_C(0x205)
741 	/* Returns the current value of a free running counter from the device. */
742 	#define HWRM_MFG_TIMERS_QUERY                     UINT32_C(0x206)
743 	/* Experimental */
744 	#define HWRM_MFG_OTP_CFG                          UINT32_C(0x207)
745 	/* Experimental */
746 	#define HWRM_MFG_OTP_QCFG                         UINT32_C(0x208)
747 	/*
748 	 * Tells the fw to run the DMA read from the host and DMA write
749 	 * to the host test.
750 	 */
751 	#define HWRM_MFG_HDMA_TEST                        UINT32_C(0x209)
752 	/* Tells the fw to program the fru memory */
753 	#define HWRM_MFG_FRU_EEPROM_WRITE                 UINT32_C(0x20a)
754 	/* Tells the fw to read the fru memory */
755 	#define HWRM_MFG_FRU_EEPROM_READ                  UINT32_C(0x20b)
756 	/* Used to provision SoC software images */
757 	#define HWRM_MFG_SOC_IMAGE                        UINT32_C(0x20c)
758 	/* Retrieves the SoC status and image provisioning information */
759 	#define HWRM_MFG_SOC_QSTATUS                      UINT32_C(0x20d)
760 	/* Tells the fw to finalize the critical data (store and lock it) */
761 	#define HWRM_MFG_PARAM_CRITICAL_DATA_FINALIZE     UINT32_C(0x20e)
762 	/* Tells the fw to read the critical data */
763 	#define HWRM_MFG_PARAM_CRITICAL_DATA_READ         UINT32_C(0x20f)
764 	/* Tells the fw to get the health of critical data */
765 	#define HWRM_MFG_PARAM_CRITICAL_DATA_HEALTH       UINT32_C(0x210)
766 	/*
767 	 * The command is used for certificate provisioning to export a
768 	 * Certificate Signing Request (CSR) from the device.
769 	 */
770 	#define HWRM_MFG_PRVSN_EXPORT_CSR                 UINT32_C(0x211)
771 	/*
772 	 * The command is used for certificate provisioning to import a
773 	 * CA-signed certificate chain to the device.
774 	 */
775 	#define HWRM_MFG_PRVSN_IMPORT_CERT                UINT32_C(0x212)
776 	/*
777 	 * The command is used for certificate provisioning to query the
778 	 * provisioned state.
779 	 */
780 	#define HWRM_MFG_PRVSN_GET_STATE                  UINT32_C(0x213)
781 	/*
782 	 * The command is used to get the hash of the NVM configuration that is
783 	 * calculated during firmware boot.
784 	 */
785 	#define HWRM_MFG_GET_NVM_MEASUREMENT              UINT32_C(0x214)
786 	/* Retrieves the PSOC status and provisioning information. */
787 	#define HWRM_MFG_PSOC_QSTATUS                     UINT32_C(0x215)
788 	/*
789 	 * This command allows manufacturing tool to determine which selftests
790 	 * are available to be run.
791 	 */
792 	#define HWRM_MFG_SELFTEST_QLIST                   UINT32_C(0x216)
793 	/*
794 	 * This command allows manufacturing tool to request which selftests
795 	 * to run.
796 	 */
797 	#define HWRM_MFG_SELFTEST_EXEC                    UINT32_C(0x217)
798 	/* Queries the generic stats */
799 	#define HWRM_STAT_GENERIC_QSTATS                  UINT32_C(0x218)
800 	/*
801 	 * The command is used for certificate provisioning to export a
802 	 * certificate chain from the device.
803 	 */
804 	#define HWRM_MFG_PRVSN_EXPORT_CERT                UINT32_C(0x219)
805 	/* Query the statistics for doorbell drops due to various error conditions. */
806 	#define HWRM_STAT_DB_ERROR_QSTATS                 UINT32_C(0x21a)
807 	/*
808 	 * This command returns the capabilities related to User Defined
809 	 * Congestion Control on a function.
810 	 */
811 	#define HWRM_UDCC_QCAPS                           UINT32_C(0x258)
812 	/* This command configures User Defined Congestion Control on a function. */
813 	#define HWRM_UDCC_CFG                             UINT32_C(0x259)
814 	/*
815 	 * This command queries the configuration of User Defined Congestion
816 	 * Control on a function.
817 	 */
818 	#define HWRM_UDCC_QCFG                            UINT32_C(0x25a)
819 	/* This command configures an existing UDCC session. */
820 	#define HWRM_UDCC_SESSION_CFG                     UINT32_C(0x25b)
821 	/* This command queries the configuration of a UDCC session. */
822 	#define HWRM_UDCC_SESSION_QCFG                    UINT32_C(0x25c)
823 	/* This command queries the UDCC session. */
824 	#define HWRM_UDCC_SESSION_QUERY                   UINT32_C(0x25d)
825 	/* This command configures the computation unit. */
826 	#define HWRM_UDCC_COMP_CFG                        UINT32_C(0x25e)
827 	/* This command queries the configuration of the computation unit. */
828 	#define HWRM_UDCC_COMP_QCFG                       UINT32_C(0x25f)
829 	/* This command queries the status and statistics of the computation unit. */
830 	#define HWRM_UDCC_COMP_QUERY                      UINT32_C(0x260)
831 	/* Experimental */
832 	#define HWRM_TF                                   UINT32_C(0x2bc)
833 	/* Experimental */
834 	#define HWRM_TF_VERSION_GET                       UINT32_C(0x2bd)
835 	/* Experimental */
836 	#define HWRM_TF_SESSION_OPEN                      UINT32_C(0x2c6)
837 	/* Experimental */
838 	#define HWRM_TF_SESSION_REGISTER                  UINT32_C(0x2c8)
839 	/* Experimental */
840 	#define HWRM_TF_SESSION_UNREGISTER                UINT32_C(0x2c9)
841 	/* Experimental */
842 	#define HWRM_TF_SESSION_CLOSE                     UINT32_C(0x2ca)
843 	/* Experimental */
844 	#define HWRM_TF_SESSION_QCFG                      UINT32_C(0x2cb)
845 	/* Experimental */
846 	#define HWRM_TF_SESSION_RESC_QCAPS                UINT32_C(0x2cc)
847 	/* Experimental */
848 	#define HWRM_TF_SESSION_RESC_ALLOC                UINT32_C(0x2cd)
849 	/* Experimental */
850 	#define HWRM_TF_SESSION_RESC_FREE                 UINT32_C(0x2ce)
851 	/* Experimental */
852 	#define HWRM_TF_SESSION_RESC_FLUSH                UINT32_C(0x2cf)
853 	/* Experimental */
854 	#define HWRM_TF_SESSION_RESC_INFO                 UINT32_C(0x2d0)
855 	/* Experimental */
856 	#define HWRM_TF_SESSION_HOTUP_STATE_SET           UINT32_C(0x2d1)
857 	/* Experimental */
858 	#define HWRM_TF_SESSION_HOTUP_STATE_GET           UINT32_C(0x2d2)
859 	/* Experimental */
860 	#define HWRM_TF_TBL_TYPE_GET                      UINT32_C(0x2da)
861 	/* Experimental */
862 	#define HWRM_TF_TBL_TYPE_SET                      UINT32_C(0x2db)
863 	/* Experimental */
864 	#define HWRM_TF_TBL_TYPE_BULK_GET                 UINT32_C(0x2dc)
865 	/* Experimental */
866 	#define HWRM_TF_EM_INSERT                         UINT32_C(0x2ea)
867 	/* Experimental */
868 	#define HWRM_TF_EM_DELETE                         UINT32_C(0x2eb)
869 	/* Experimental */
870 	#define HWRM_TF_EM_HASH_INSERT                    UINT32_C(0x2ec)
871 	/* Experimental */
872 	#define HWRM_TF_EM_MOVE                           UINT32_C(0x2ed)
873 	/* Experimental */
874 	#define HWRM_TF_TCAM_SET                          UINT32_C(0x2f8)
875 	/* Experimental */
876 	#define HWRM_TF_TCAM_GET                          UINT32_C(0x2f9)
877 	/* Experimental */
878 	#define HWRM_TF_TCAM_MOVE                         UINT32_C(0x2fa)
879 	/* Experimental */
880 	#define HWRM_TF_TCAM_FREE                         UINT32_C(0x2fb)
881 	/* Experimental */
882 	#define HWRM_TF_GLOBAL_CFG_SET                    UINT32_C(0x2fc)
883 	/* Experimental */
884 	#define HWRM_TF_GLOBAL_CFG_GET                    UINT32_C(0x2fd)
885 	/* Experimental */
886 	#define HWRM_TF_IF_TBL_SET                        UINT32_C(0x2fe)
887 	/* Experimental */
888 	#define HWRM_TF_IF_TBL_GET                        UINT32_C(0x2ff)
889 	/* Experimental */
890 	#define HWRM_TF_RESC_USAGE_SET                    UINT32_C(0x300)
891 	/* Experimental */
892 	#define HWRM_TF_RESC_USAGE_QUERY                  UINT32_C(0x301)
893 	/* Truflow command to allocate a table */
894 	#define HWRM_TF_TBL_TYPE_ALLOC                    UINT32_C(0x302)
895 	/* Truflow command to free a table */
896 	#define HWRM_TF_TBL_TYPE_FREE                     UINT32_C(0x303)
897 	/* TruFlow command to check firmware table scope capabilities. */
898 	#define HWRM_TFC_TBL_SCOPE_QCAPS                  UINT32_C(0x380)
899 	/* TruFlow command to allocate a table scope ID and create the pools. */
900 	#define HWRM_TFC_TBL_SCOPE_ID_ALLOC               UINT32_C(0x381)
901 	/* TruFlow command to configure the table scope memory. */
902 	#define HWRM_TFC_TBL_SCOPE_CONFIG                 UINT32_C(0x382)
903 	/* TruFlow command to deconfigure a table scope memory. */
904 	#define HWRM_TFC_TBL_SCOPE_DECONFIG               UINT32_C(0x383)
905 	/* TruFlow command to add a FID to a table scope. */
906 	#define HWRM_TFC_TBL_SCOPE_FID_ADD                UINT32_C(0x384)
907 	/* TruFlow command to remove a FID from a table scope. */
908 	#define HWRM_TFC_TBL_SCOPE_FID_REM                UINT32_C(0x385)
909 	/* DEPRECATED */
910 	#define HWRM_TFC_TBL_SCOPE_POOL_ALLOC             UINT32_C(0x386)
911 	/* DEPRECATED */
912 	#define HWRM_TFC_TBL_SCOPE_POOL_FREE              UINT32_C(0x387)
913 	/* Experimental */
914 	#define HWRM_TFC_SESSION_ID_ALLOC                 UINT32_C(0x388)
915 	/* Experimental */
916 	#define HWRM_TFC_SESSION_FID_ADD                  UINT32_C(0x389)
917 	/* Experimental */
918 	#define HWRM_TFC_SESSION_FID_REM                  UINT32_C(0x38a)
919 	/* Experimental */
920 	#define HWRM_TFC_IDENT_ALLOC                      UINT32_C(0x38b)
921 	/* Experimental */
922 	#define HWRM_TFC_IDENT_FREE                       UINT32_C(0x38c)
923 	/* TruFlow command to allocate an index table entry */
924 	#define HWRM_TFC_IDX_TBL_ALLOC                    UINT32_C(0x38d)
925 	/* TruFlow command to allocate and set an index table entry */
926 	#define HWRM_TFC_IDX_TBL_ALLOC_SET                UINT32_C(0x38e)
927 	/* TruFlow command to set an index table entry */
928 	#define HWRM_TFC_IDX_TBL_SET                      UINT32_C(0x38f)
929 	/* TruFlow command to get an index table entry */
930 	#define HWRM_TFC_IDX_TBL_GET                      UINT32_C(0x390)
931 	/* TruFlow command to free an index table entry */
932 	#define HWRM_TFC_IDX_TBL_FREE                     UINT32_C(0x391)
933 	/* TruFlow command to allocate resources for a global id. */
934 	#define HWRM_TFC_GLOBAL_ID_ALLOC                  UINT32_C(0x392)
935 	/* TruFlow command to set TCAM entry. */
936 	#define HWRM_TFC_TCAM_SET                         UINT32_C(0x393)
937 	/* TruFlow command to get TCAM entry. */
938 	#define HWRM_TFC_TCAM_GET                         UINT32_C(0x394)
939 	/* TruFlow command to allocate a TCAM entry. */
940 	#define HWRM_TFC_TCAM_ALLOC                       UINT32_C(0x395)
941 	/* TruFlow command allocate and set TCAM entry. */
942 	#define HWRM_TFC_TCAM_ALLOC_SET                   UINT32_C(0x396)
943 	/* TruFlow command to free a TCAM entry. */
944 	#define HWRM_TFC_TCAM_FREE                        UINT32_C(0x397)
945 	/* Truflow command to set an interface table entry */
946 	#define HWRM_TFC_IF_TBL_SET                       UINT32_C(0x398)
947 	/* Truflow command to get an interface table entry */
948 	#define HWRM_TFC_IF_TBL_GET                       UINT32_C(0x399)
949 	/* TruFlow command to get configured info about a table scope. */
950 	#define HWRM_TFC_TBL_SCOPE_CONFIG_GET             UINT32_C(0x39a)
951 	/* TruFlow command to query the resource usage state. */
952 	#define HWRM_TFC_RESC_USAGE_QUERY                 UINT32_C(0x39b)
953 	/*
954 	 * This command is used to query the pfc watchdog max configurable
955 	 * timeout value.
956 	 */
957 	#define HWRM_QUEUE_PFCWD_TIMEOUT_QCAPS            UINT32_C(0x39c)
958 	/* This command is used to set the PFC watchdog timeout value. */
959 	#define HWRM_QUEUE_PFCWD_TIMEOUT_CFG              UINT32_C(0x39d)
960 	/*
961 	 * This command is used to query the current configured pfc watchdog
962 	 * timeout value.
963 	 */
964 	#define HWRM_QUEUE_PFCWD_TIMEOUT_QCFG             UINT32_C(0x39e)
965 	/* Experimental */
966 	#define HWRM_SV                                   UINT32_C(0x400)
967 	/* Flush any trace buffer data that has not been sent to the host. */
968 	#define HWRM_DBG_LOG_BUFFER_FLUSH                 UINT32_C(0xff0f)
969 	/* Experimental */
970 	#define HWRM_DBG_READ_DIRECT                      UINT32_C(0xff10)
971 	/* Experimental */
972 	#define HWRM_DBG_READ_INDIRECT                    UINT32_C(0xff11)
973 	/* Experimental */
974 	#define HWRM_DBG_WRITE_DIRECT                     UINT32_C(0xff12)
975 	/* Experimental */
976 	#define HWRM_DBG_WRITE_INDIRECT                   UINT32_C(0xff13)
977 	#define HWRM_DBG_DUMP                             UINT32_C(0xff14)
978 	/* Experimental */
979 	#define HWRM_DBG_ERASE_NVM                        UINT32_C(0xff15)
980 	/* Experimental */
981 	#define HWRM_DBG_CFG                              UINT32_C(0xff16)
982 	/* Experimental */
983 	#define HWRM_DBG_COREDUMP_LIST                    UINT32_C(0xff17)
984 	/* Experimental */
985 	#define HWRM_DBG_COREDUMP_INITIATE                UINT32_C(0xff18)
986 	/* Experimental */
987 	#define HWRM_DBG_COREDUMP_RETRIEVE                UINT32_C(0xff19)
988 	/* Experimental */
989 	#define HWRM_DBG_FW_CLI                           UINT32_C(0xff1a)
990 	/*  */
991 	#define HWRM_DBG_I2C_CMD                          UINT32_C(0xff1b)
992 	/*  */
993 	#define HWRM_DBG_RING_INFO_GET                    UINT32_C(0xff1c)
994 	/* Experimental */
995 	#define HWRM_DBG_CRASHDUMP_HEADER                 UINT32_C(0xff1d)
996 	/* Experimental */
997 	#define HWRM_DBG_CRASHDUMP_ERASE                  UINT32_C(0xff1e)
998 	/* Send driver debug information to firmware */
999 	#define HWRM_DBG_DRV_TRACE                        UINT32_C(0xff1f)
1000 	/* Query debug capabilities of firmware */
1001 	#define HWRM_DBG_QCAPS                            UINT32_C(0xff20)
1002 	/* Retrieve debug settings of firmware */
1003 	#define HWRM_DBG_QCFG                             UINT32_C(0xff21)
1004 	/* Set destination parameters for crashdump medium */
1005 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG             UINT32_C(0xff22)
1006 	/* Experimental */
1007 	#define HWRM_DBG_USEQ_ALLOC                       UINT32_C(0xff23)
1008 	/* Experimental */
1009 	#define HWRM_DBG_USEQ_FREE                        UINT32_C(0xff24)
1010 	/* Experimental */
1011 	#define HWRM_DBG_USEQ_FLUSH                       UINT32_C(0xff25)
1012 	/* Experimental */
1013 	#define HWRM_DBG_USEQ_QCAPS                       UINT32_C(0xff26)
1014 	/* Experimental */
1015 	#define HWRM_DBG_USEQ_CW_CFG                      UINT32_C(0xff27)
1016 	/* Experimental */
1017 	#define HWRM_DBG_USEQ_SCHED_CFG                   UINT32_C(0xff28)
1018 	/* Experimental */
1019 	#define HWRM_DBG_USEQ_RUN                         UINT32_C(0xff29)
1020 	/* Experimental */
1021 	#define HWRM_DBG_USEQ_DELIVERY_REQ                UINT32_C(0xff2a)
1022 	/* Experimental */
1023 	#define HWRM_DBG_USEQ_RESP_HDR                    UINT32_C(0xff2b)
1024 	#define HWRM_NVM_GET_VPD_FIELD_INFO               UINT32_C(0xffea)
1025 	#define HWRM_NVM_SET_VPD_FIELD_INFO               UINT32_C(0xffeb)
1026 	#define HWRM_NVM_DEFRAG                           UINT32_C(0xffec)
1027 	#define HWRM_NVM_REQ_ARBITRATION                  UINT32_C(0xffed)
1028 	/* Experimental */
1029 	#define HWRM_NVM_FACTORY_DEFAULTS                 UINT32_C(0xffee)
1030 	#define HWRM_NVM_VALIDATE_OPTION                  UINT32_C(0xffef)
1031 	#define HWRM_NVM_FLUSH                            UINT32_C(0xfff0)
1032 	#define HWRM_NVM_GET_VARIABLE                     UINT32_C(0xfff1)
1033 	#define HWRM_NVM_SET_VARIABLE                     UINT32_C(0xfff2)
1034 	#define HWRM_NVM_INSTALL_UPDATE                   UINT32_C(0xfff3)
1035 	#define HWRM_NVM_MODIFY                           UINT32_C(0xfff4)
1036 	#define HWRM_NVM_VERIFY_UPDATE                    UINT32_C(0xfff5)
1037 	#define HWRM_NVM_GET_DEV_INFO                     UINT32_C(0xfff6)
1038 	#define HWRM_NVM_ERASE_DIR_ENTRY                  UINT32_C(0xfff7)
1039 	#define HWRM_NVM_MOD_DIR_ENTRY                    UINT32_C(0xfff8)
1040 	#define HWRM_NVM_FIND_DIR_ENTRY                   UINT32_C(0xfff9)
1041 	#define HWRM_NVM_GET_DIR_ENTRIES                  UINT32_C(0xfffa)
1042 	#define HWRM_NVM_GET_DIR_INFO                     UINT32_C(0xfffb)
1043 	#define HWRM_NVM_RAW_DUMP                         UINT32_C(0xfffc)
1044 	#define HWRM_NVM_READ                             UINT32_C(0xfffd)
1045 	#define HWRM_NVM_WRITE                            UINT32_C(0xfffe)
1046 	#define HWRM_NVM_RAW_WRITE_BLK                    UINT32_C(0xffff)
1047 	#define HWRM_LAST                                HWRM_NVM_RAW_WRITE_BLK
1048 	uint16_t	unused_0[3];
1049 } __rte_packed_end;
1050 
1051 /* Return Codes */
1052 /* ret_codes (size:64b/8B) */
1053 struct __rte_packed_begin ret_codes {
1054 	uint16_t	error_code;
1055 	/* Request was successfully executed by the HWRM. */
1056 	#define HWRM_ERR_CODE_SUCCESS                      UINT32_C(0x0)
1057 	/* The HWRM failed to execute the request. */
1058 	#define HWRM_ERR_CODE_FAIL                         UINT32_C(0x1)
1059 	/*
1060 	 * The request contains invalid argument(s) or input
1061 	 * parameters.
1062 	 */
1063 	#define HWRM_ERR_CODE_INVALID_PARAMS               UINT32_C(0x2)
1064 	/*
1065 	 * The requester is not allowed to access the requested
1066 	 * resource. This error code shall be provided in a
1067 	 * response to a request to query or modify an existing
1068 	 * resource that is not accessible by the requester.
1069 	 */
1070 	#define HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED       UINT32_C(0x3)
1071 	/*
1072 	 * The HWRM is unable to allocate the requested resource.
1073 	 * This code only applies to requests for HWRM resource
1074 	 * allocations.
1075 	 */
1076 	#define HWRM_ERR_CODE_RESOURCE_ALLOC_ERROR         UINT32_C(0x4)
1077 	/*
1078 	 * Invalid combination of flags is specified in the
1079 	 * request.
1080 	 */
1081 	#define HWRM_ERR_CODE_INVALID_FLAGS                UINT32_C(0x5)
1082 	/*
1083 	 * Invalid combination of enables fields is specified in
1084 	 * the request.
1085 	 */
1086 	#define HWRM_ERR_CODE_INVALID_ENABLES              UINT32_C(0x6)
1087 	/*
1088 	 * Request contains a required TLV that is not supported by
1089 	 * the installed version of firmware.
1090 	 */
1091 	#define HWRM_ERR_CODE_UNSUPPORTED_TLV              UINT32_C(0x7)
1092 	/*
1093 	 * No firmware buffer available to accept the request. Driver
1094 	 * should retry the request.
1095 	 */
1096 	#define HWRM_ERR_CODE_NO_BUFFER                    UINT32_C(0x8)
1097 	/*
1098 	 * This error code is only reported by firmware when some
1099 	 * sub-option of a supported HWRM command is unsupported.
1100 	 */
1101 	#define HWRM_ERR_CODE_UNSUPPORTED_OPTION_ERR       UINT32_C(0x9)
1102 	/*
1103 	 * This error code is only reported by firmware when the specific
1104 	 * request is not able to process when the HOT reset in progress.
1105 	 */
1106 	#define HWRM_ERR_CODE_HOT_RESET_PROGRESS           UINT32_C(0xa)
1107 	/*
1108 	 * This error code is only reported by firmware when the registered
1109 	 * driver instances are not capable of hot reset.
1110 	 */
1111 	#define HWRM_ERR_CODE_HOT_RESET_FAIL               UINT32_C(0xb)
1112 	/*
1113 	 * This error code is only reported by the firmware when during
1114 	 * flow allocation when a request for a flow counter fails because
1115 	 * the number of flow counters are exhausted.
1116 	 */
1117 	#define HWRM_ERR_CODE_NO_FLOW_COUNTER_DURING_ALLOC UINT32_C(0xc)
1118 	/*
1119 	 * This error code is only reported by firmware when the registered
1120 	 * driver instances requested to offloaded a flow but was unable to
1121 	 * because the requested key's hash collides with the installed keys.
1122 	 */
1123 	#define HWRM_ERR_CODE_KEY_HASH_COLLISION           UINT32_C(0xd)
1124 	/*
1125 	 * This error code is only reported by firmware when the registered
1126 	 * driver instances requested to offloaded a flow but was unable to
1127 	 * because the same key has already been installed.
1128 	 */
1129 	#define HWRM_ERR_CODE_KEY_ALREADY_EXISTS           UINT32_C(0xe)
1130 	/*
1131 	 * Generic HWRM execution error that represents an
1132 	 * internal error.
1133 	 */
1134 	#define HWRM_ERR_CODE_HWRM_ERROR                   UINT32_C(0xf)
1135 	/*
1136 	 * Firmware is unable to service the request at the present time.
1137 	 * Caller may try again later.
1138 	 */
1139 	#define HWRM_ERR_CODE_BUSY                         UINT32_C(0x10)
1140 	/*
1141 	 * This error code is reported by Firmware when an operation requested
1142 	 * by the host is not allowed due to a secure lock violation.
1143 	 */
1144 	#define HWRM_ERR_CODE_RESOURCE_LOCKED              UINT32_C(0x11)
1145 	/*
1146 	 * This error code is reported by Firmware when an operation requested
1147 	 * by a VF cannot be forwarded to the parent PF as required, either
1148 	 * because the PF is down or otherwise doesn't have an appropriate
1149 	 * async completion ring or associated forwarding buffers configured.
1150 	 */
1151 	#define HWRM_ERR_CODE_PF_UNAVAILABLE               UINT32_C(0x12)
1152 	/*
1153 	 * This error code is reported by Firmware when the specific entity
1154 	 * requested by the host is not present or does not exist.
1155 	 */
1156 	#define HWRM_ERR_CODE_ENTITY_NOT_PRESENT           UINT32_C(0x13)
1157 	/*
1158 	 * This value indicates that the HWRM response is in TLV format and
1159 	 * should be interpreted as one or more TLVs starting with the
1160 	 * hwrm_resp_hdr TLV. This value is not an indication of any error
1161 	 * by itself, just an indication that the response should be parsed
1162 	 * as TLV and the actual error code will be in the hwrm_resp_hdr TLV.
1163 	 */
1164 	#define HWRM_ERR_CODE_TLV_ENCAPSULATED_RESPONSE    UINT32_C(0x8000)
1165 	/* Unknown error */
1166 	#define HWRM_ERR_CODE_UNKNOWN_ERR                  UINT32_C(0xfffe)
1167 	/* Unsupported or invalid command */
1168 	#define HWRM_ERR_CODE_CMD_NOT_SUPPORTED            UINT32_C(0xffff)
1169 	#define HWRM_ERR_CODE_LAST \
1170 		HWRM_ERR_CODE_CMD_NOT_SUPPORTED
1171 	uint16_t	unused_0[3];
1172 } __rte_packed_end;
1173 
1174 /* Output */
1175 /* hwrm_err_output (size:128b/16B) */
1176 struct __rte_packed_begin hwrm_err_output {
1177 	/*
1178 	 * Pass/Fail or error type
1179 	 *
1180 	 * Note: receiver to verify the in parameters, and fail the call
1181 	 * with an error when appropriate
1182 	 */
1183 	uint16_t	error_code;
1184 	/* This field returns the type of original request. */
1185 	uint16_t	req_type;
1186 	/* This field provides original sequence number of the command. */
1187 	uint16_t	seq_id;
1188 	/*
1189 	 * This field is the length of the response in bytes. The
1190 	 * last byte of the response is a valid flag that will read
1191 	 * as '1' when the command has been completely written to
1192 	 * memory.
1193 	 */
1194 	uint16_t	resp_len;
1195 	/* debug info for this error response. */
1196 	uint32_t	opaque_0;
1197 	/* debug info for this error response. */
1198 	uint16_t	opaque_1;
1199 	/*
1200 	 * In the case of an error response, command specific error
1201 	 * code is returned in this field.
1202 	 */
1203 	uint8_t	cmd_err;
1204 	/*
1205 	 * This field is used in Output records to indicate that the output
1206 	 * is completely written to RAM. This field should be read as '1'
1207 	 * to indicate that the output has been completely written. When
1208 	 * writing a command completion or response to an internal processor,
1209 	 * the order of writes has to be such that this field is written last.
1210 	 */
1211 	uint8_t	valid;
1212 } __rte_packed_end;
1213 /*
1214  * Following is the signature for HWRM message field that indicates not
1215  * applicable (All F's). Need to cast it the size of the field if needed.
1216  */
1217 #define HWRM_NA_SIGNATURE ((uint32_t)(-1))
1218 /*
1219  * This is reflecting the size of the PF mailbox and not the maximum
1220  * command size for any of the HWRM command structures. To determine
1221  * the maximum size of an HWRM command supported by the firmware, see
1222  * the max_ext_req_len field in the response of the HWRM_VER_GET command.
1223  */
1224 #define HWRM_MAX_REQ_LEN 128
1225 /* hwrm_cfa_flow_info */
1226 #define HWRM_MAX_RESP_LEN 704
1227 /* 7 bit indirection table index. */
1228 #define HW_HASH_INDEX_SIZE 0x80
1229 #define HW_HASH_KEY_SIZE 40
1230 /* valid key for HWRM response */
1231 #define HWRM_RESP_VALID_KEY 1
1232 /* Reserved for BONO processor */
1233 #define HWRM_TARGET_ID_BONO 0xFFF8
1234 /* Reserved for KONG processor */
1235 #define HWRM_TARGET_ID_KONG 0xFFF9
1236 /* Reserved for APE processor */
1237 #define HWRM_TARGET_ID_APE 0xFFFA
1238 /*
1239  * This value will be used by tools for User-space HWRM Interface.
1240  * When tool execute any HWRM command with this target_id, firmware
1241  * will copy the response and/or data payload via register space instead
1242  * of DMAing it.
1243  */
1244 #define HWRM_TARGET_ID_TOOLS 0xFFFD
1245 #define HWRM_VERSION_MAJOR 1
1246 #define HWRM_VERSION_MINOR 10
1247 #define HWRM_VERSION_UPDATE 3
1248 /* non-zero means beta version */
1249 #define HWRM_VERSION_RSVD 40
1250 #define HWRM_VERSION_STR "1.10.3.40"
1251 
1252 /****************
1253  * hwrm_ver_get *
1254  ****************/
1255 
1256 
1257 /* hwrm_ver_get_input (size:192b/24B) */
1258 struct __rte_packed_begin hwrm_ver_get_input {
1259 	/* The HWRM command request type. */
1260 	uint16_t	req_type;
1261 	/*
1262 	 * The completion ring to send the completion event on. This should
1263 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
1264 	 */
1265 	uint16_t	cmpl_ring;
1266 	/*
1267 	 * The sequence ID is used by the driver for tracking multiple
1268 	 * commands. This ID is treated as opaque data by the firmware and
1269 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
1270 	 */
1271 	uint16_t	seq_id;
1272 	/*
1273 	 * The target ID of the command:
1274 	 * * 0x0-0xFFF8 - The function ID
1275 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
1276 	 * * 0xFFFD - Reserved for user-space HWRM interface
1277 	 * * 0xFFFF - HWRM
1278 	 */
1279 	uint16_t	target_id;
1280 	/*
1281 	 * A physical address pointer pointing to a host buffer that the
1282 	 * command's response data will be written. This can be either a host
1283 	 * physical address (HPA) or a guest physical address (GPA) and must
1284 	 * point to a physically contiguous block of memory.
1285 	 */
1286 	uint64_t	resp_addr;
1287 	/*
1288 	 * This field represents the major version of HWRM interface
1289 	 * specification supported by the driver HWRM implementation.
1290 	 * The interface major version is intended to change only when
1291 	 * non backward compatible changes are made to the HWRM
1292 	 * interface specification.
1293 	 */
1294 	uint8_t	hwrm_intf_maj;
1295 	/*
1296 	 * This field represents the minor version of HWRM interface
1297 	 * specification supported by the driver HWRM implementation.
1298 	 * A change in interface minor version is used to reflect
1299 	 * significant backward compatible modification to HWRM
1300 	 * interface specification.
1301 	 * This can be due to addition or removal of functionality.
1302 	 * HWRM interface specifications with the same major version
1303 	 * but different minor versions are compatible.
1304 	 */
1305 	uint8_t	hwrm_intf_min;
1306 	/*
1307 	 * This field represents the update version of HWRM interface
1308 	 * specification supported by the driver HWRM implementation.
1309 	 * The interface update version is used to reflect minor
1310 	 * changes or bug fixes to a released HWRM interface
1311 	 * specification.
1312 	 */
1313 	uint8_t	hwrm_intf_upd;
1314 	uint8_t	unused_0[5];
1315 } __rte_packed_end;
1316 
1317 /* hwrm_ver_get_output (size:1408b/176B) */
1318 struct __rte_packed_begin hwrm_ver_get_output {
1319 	/* The specific error status for the command. */
1320 	uint16_t	error_code;
1321 	/* The HWRM command request type. */
1322 	uint16_t	req_type;
1323 	/* The sequence ID from the original command. */
1324 	uint16_t	seq_id;
1325 	/* The length of the response data in number of bytes. */
1326 	uint16_t	resp_len;
1327 	/*
1328 	 * This field represents the major version of HWRM interface
1329 	 * specification supported by the HWRM implementation.
1330 	 * The interface major version is intended to change only when
1331 	 * non backward compatible changes are made to the HWRM
1332 	 * interface specification.
1333 	 * A HWRM implementation that is compliant with this
1334 	 * specification shall provide value of 1 in this field.
1335 	 */
1336 	uint8_t	hwrm_intf_maj_8b;
1337 	/*
1338 	 * This field represents the minor version of HWRM interface
1339 	 * specification supported by the HWRM implementation.
1340 	 * A change in interface minor version is used to reflect
1341 	 * significant backward compatible modification to HWRM
1342 	 * interface specification.
1343 	 * This can be due to addition or removal of functionality.
1344 	 * HWRM interface specifications with the same major version
1345 	 * but different minor versions are compatible.
1346 	 * A HWRM implementation that is compliant with this
1347 	 * specification shall provide value of 2 in this field.
1348 	 */
1349 	uint8_t	hwrm_intf_min_8b;
1350 	/*
1351 	 * This field represents the update version of HWRM interface
1352 	 * specification supported by the HWRM implementation.
1353 	 * The interface update version is used to reflect minor
1354 	 * changes or bug fixes to a released HWRM interface
1355 	 * specification.
1356 	 * A HWRM implementation that is compliant with this
1357 	 * specification shall provide value of 2 in this field.
1358 	 */
1359 	uint8_t	hwrm_intf_upd_8b;
1360 	uint8_t	hwrm_intf_rsvd_8b;
1361 	/*
1362 	 * This field represents the major version of HWRM firmware.
1363 	 * A change in firmware major version represents a major
1364 	 * firmware release.
1365 	 */
1366 	uint8_t	hwrm_fw_maj_8b;
1367 	/*
1368 	 * This field represents the minor version of HWRM firmware.
1369 	 * A change in firmware minor version represents significant
1370 	 * firmware functionality changes.
1371 	 */
1372 	uint8_t	hwrm_fw_min_8b;
1373 	/*
1374 	 * This field represents the build version of HWRM firmware.
1375 	 * A change in firmware build version represents bug fixes
1376 	 * to a released firmware.
1377 	 */
1378 	uint8_t	hwrm_fw_bld_8b;
1379 	/*
1380 	 * This field is a reserved field. This field can be used to
1381 	 * represent firmware branches or customer specific releases
1382 	 * tied to a specific (major,minor,update) version of the
1383 	 * HWRM firmware.
1384 	 */
1385 	uint8_t	hwrm_fw_rsvd_8b;
1386 	/*
1387 	 * This field represents the major version of mgmt firmware.
1388 	 * A change in major version represents a major release.
1389 	 */
1390 	uint8_t	mgmt_fw_maj_8b;
1391 	/*
1392 	 * This field represents the minor version of mgmt firmware.
1393 	 * A change in minor version represents significant
1394 	 * functionality changes.
1395 	 */
1396 	uint8_t	mgmt_fw_min_8b;
1397 	/*
1398 	 * This field represents the build version of mgmt firmware.
1399 	 * A change in update version represents bug fixes.
1400 	 */
1401 	uint8_t	mgmt_fw_bld_8b;
1402 	/*
1403 	 * This field is a reserved field. This field can be used to
1404 	 * represent firmware branches or customer specific releases
1405 	 * tied to a specific (major,minor,update) version
1406 	 */
1407 	uint8_t	mgmt_fw_rsvd_8b;
1408 	/*
1409 	 * This field represents the major version of network
1410 	 * control firmware.
1411 	 * A change in major version represents a major release.
1412 	 */
1413 	uint8_t	netctrl_fw_maj_8b;
1414 	/*
1415 	 * This field represents the minor version of network
1416 	 * control firmware.
1417 	 * A change in minor version represents significant
1418 	 * functionality changes.
1419 	 */
1420 	uint8_t	netctrl_fw_min_8b;
1421 	/*
1422 	 * This field represents the build version of network
1423 	 * control firmware.
1424 	 * A change in update version represents bug fixes.
1425 	 */
1426 	uint8_t	netctrl_fw_bld_8b;
1427 	/*
1428 	 * This field is a reserved field. This field can be used to
1429 	 * represent firmware branches or customer specific releases
1430 	 * tied to a specific (major,minor,update) version
1431 	 */
1432 	uint8_t	netctrl_fw_rsvd_8b;
1433 	/*
1434 	 * This field is used to indicate device's capabilities and
1435 	 * configurations.
1436 	 */
1437 	uint32_t	dev_caps_cfg;
1438 	/*
1439 	 * If set to 1, then secure firmware update behavior
1440 	 * is supported.
1441 	 * If set to 0, then secure firmware update behavior is
1442 	 * not supported.
1443 	 */
1444 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SECURE_FW_UPD_SUPPORTED \
1445 		UINT32_C(0x1)
1446 	/*
1447 	 * If set to 1, then firmware based DCBX agent is supported.
1448 	 * If set to 0, then firmware based DCBX agent capability
1449 	 * is not supported on this device.
1450 	 */
1451 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_FW_DCBX_AGENT_SUPPORTED \
1452 		UINT32_C(0x2)
1453 	/*
1454 	 * If set to 1, then HWRM short command format is supported.
1455 	 * If set to 0, then HWRM short command format is not supported.
1456 	 */
1457 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_SUPPORTED \
1458 		UINT32_C(0x4)
1459 	/*
1460 	 * If set to 1, then HWRM short command format is required.
1461 	 * If set to 0, then HWRM short command format is not required.
1462 	 */
1463 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SHORT_CMD_REQUIRED \
1464 		UINT32_C(0x8)
1465 	/*
1466 	 * If set to 1, then the KONG host mailbox channel is supported.
1467 	 * If set to 0, then the KONG host mailbox channel is not supported.
1468 	 * By default, this flag should be 0 for older version of core
1469 	 * firmware.
1470 	 */
1471 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_KONG_MB_CHNL_SUPPORTED \
1472 		UINT32_C(0x10)
1473 	/*
1474 	 * If set to 1, then the 64bit flow handle is supported in addition
1475 	 * to the legacy 16bit flow handle. If set to 0, then the 64bit flow
1476 	 * handle is not supported. By default, this flag should be 0 for
1477 	 * older version of core firmware.
1478 	 */
1479 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_FLOW_HANDLE_64BIT_SUPPORTED \
1480 		UINT32_C(0x20)
1481 	/*
1482 	 * If set to 1, then filter type can be provided in filter_alloc or
1483 	 * filter_cfg filter types like L2 for l2 traffic and ROCE for roce &
1484 	 * l2 traffic. If set to 0, then filter types not supported. By
1485 	 * default, this flag should be 0 for older version of core firmware.
1486 	 */
1487 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_L2_FILTER_TYPES_ROCE_OR_L2_SUPPORTED \
1488 		UINT32_C(0x40)
1489 	/*
1490 	 * If set to 1, firmware is capable to support virtio vSwitch offload
1491 	 * model. If set to 0, firmware can't supported virtio vSwitch
1492 	 * offload model.
1493 	 * By default, this flag should be 0 for older version of core
1494 	 * firmware.
1495 	 */
1496 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_VIRTIO_VSWITCH_OFFLOAD_SUPPORTED \
1497 		UINT32_C(0x80)
1498 	/*
1499 	 * If set to 1, firmware is capable to support trusted VF.
1500 	 * If set to 0, firmware is not capable to support trusted VF.
1501 	 * By default, this flag should be 0 for older version of core
1502 	 * firmware.
1503 	 */
1504 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_TRUSTED_VF_SUPPORTED \
1505 		UINT32_C(0x100)
1506 	/*
1507 	 * If set to 1, firmware is capable to support flow aging.
1508 	 * If set to 0, firmware is not capable to support flow aging.
1509 	 * By default, this flag should be 0 for older version of core
1510 	 * firmware. (deprecated)
1511 	 */
1512 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_FLOW_AGING_SUPPORTED \
1513 		UINT32_C(0x200)
1514 	/*
1515 	 * If set to 1, firmware is capable to support advanced flow counters
1516 	 * like, Meter drop counters and EEM counters.
1517 	 * If set to 0, firmware is not capable to support advanced flow
1518 	 * counters. By default, this flag should be 0 for older version of
1519 	 * core firmware. (deprecated)
1520 	 */
1521 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_ADV_FLOW_COUNTERS_SUPPORTED \
1522 		UINT32_C(0x400)
1523 	/*
1524 	 * If set to 1, the firmware is able to support the use of the CFA
1525 	 * Extended Exact Match(EEM) feature.
1526 	 * If set to 0, firmware is not capable to support the use of the
1527 	 * CFA EEM feature.
1528 	 * By default, this flag should be 0 for older version of core
1529 	 * firmware. (deprecated)
1530 	 */
1531 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_EEM_SUPPORTED \
1532 		UINT32_C(0x800)
1533 	/*
1534 	 * If set to 1, the firmware is able to support advance CFA flow
1535 	 * management features reported in the HWRM_CFA_FLOW_MGNT_QCAPS.
1536 	 * If set to 0, then the firmware doesn't support the advance CFA
1537 	 * flow management features.
1538 	 * By default, this flag should be 0 for older version of core
1539 	 * firmware.
1540 	 */
1541 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_ADV_FLOW_MGNT_SUPPORTED \
1542 		UINT32_C(0x1000)
1543 	/*
1544 	 * Deprecated and replaced with cfa_truflow_supported.
1545 	 * If set to 1, the firmware is able to support TFLIB features.
1546 	 * If set to 0, then the firmware doesn't support TFLIB features.
1547 	 * By default, this flag should be 0 for older version of core
1548 	 * firmware.
1549 	 */
1550 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_TFLIB_SUPPORTED \
1551 		UINT32_C(0x2000)
1552 	/*
1553 	 * If set to 1, the firmware is able to support TruFlow features.
1554 	 * If set to 0, then the firmware doesn't support TruFlow features.
1555 	 * By default, this flag should be 0 for older version of
1556 	 * core firmware.
1557 	 */
1558 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_CFA_TRUFLOW_SUPPORTED \
1559 		UINT32_C(0x4000)
1560 	/*
1561 	 * If set to 1, then firmware supports secure boot.
1562 	 * If set to 0, then firmware doesn't support secure boot.
1563 	 */
1564 	#define HWRM_VER_GET_OUTPUT_DEV_CAPS_CFG_SECURE_BOOT_CAPABLE \
1565 		UINT32_C(0x8000)
1566 	/*
1567 	 * This field represents the major version of RoCE firmware.
1568 	 * A change in major version represents a major release.
1569 	 */
1570 	uint8_t	roce_fw_maj_8b;
1571 	/*
1572 	 * This field represents the minor version of RoCE firmware.
1573 	 * A change in minor version represents significant
1574 	 * functionality changes.
1575 	 */
1576 	uint8_t	roce_fw_min_8b;
1577 	/*
1578 	 * This field represents the build version of RoCE firmware.
1579 	 * A change in update version represents bug fixes.
1580 	 */
1581 	uint8_t	roce_fw_bld_8b;
1582 	/*
1583 	 * This field is a reserved field. This field can be used to
1584 	 * represent firmware branches or customer specific releases
1585 	 * tied to a specific (major,minor,update) version
1586 	 */
1587 	uint8_t	roce_fw_rsvd_8b;
1588 	/*
1589 	 * This field represents the name of HWRM FW (ASCII chars
1590 	 * with NULL at the end).
1591 	 */
1592 	char	hwrm_fw_name[16];
1593 	/*
1594 	 * This field represents the name of mgmt FW (ASCII chars
1595 	 * with NULL at the end).
1596 	 */
1597 	char	mgmt_fw_name[16];
1598 	/*
1599 	 * This field represents the name of network control
1600 	 * firmware (ASCII chars with NULL at the end).
1601 	 */
1602 	char	netctrl_fw_name[16];
1603 	/* This field represents the active board package name. */
1604 	char	active_pkg_name[16];
1605 	/*
1606 	 * This field represents the name of RoCE FW (ASCII chars
1607 	 * with NULL at the end).
1608 	 */
1609 	char	roce_fw_name[16];
1610 	/* This field returns the chip number. */
1611 	uint16_t	chip_num;
1612 	/* This field returns the revision of chip. */
1613 	uint8_t	chip_rev;
1614 	/* This field returns the chip metal number. */
1615 	uint8_t	chip_metal;
1616 	/* This field returns the bond id of the chip. */
1617 	uint8_t	chip_bond_id;
1618 	/*
1619 	 * This value indicates the type of platform used for chip
1620 	 * implementation.
1621 	 */
1622 	uint8_t	chip_platform_type;
1623 	/* ASIC */
1624 	#define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_ASIC      UINT32_C(0x0)
1625 	/* FPGA platform of the chip. */
1626 	#define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_FPGA      UINT32_C(0x1)
1627 	/* Palladium platform of the chip. */
1628 	#define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_PALLADIUM UINT32_C(0x2)
1629 	#define HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_LAST \
1630 		HWRM_VER_GET_OUTPUT_CHIP_PLATFORM_TYPE_PALLADIUM
1631 	/*
1632 	 * This field returns the maximum value of request window that
1633 	 * is supported by the HWRM. The request window is mapped
1634 	 * into device address space using MMIO.
1635 	 */
1636 	uint16_t	max_req_win_len;
1637 	/*
1638 	 * This field returns the maximum value of response buffer in
1639 	 * bytes.
1640 	 */
1641 	uint16_t	max_resp_len;
1642 	/*
1643 	 * This field returns the default request timeout value in
1644 	 * milliseconds.
1645 	 */
1646 	uint16_t	def_req_timeout;
1647 	/*
1648 	 * This field will indicate if any subsystems is not fully
1649 	 * initialized.
1650 	 */
1651 	uint8_t	flags;
1652 	/*
1653 	 * If set to 1, it will indicate to host drivers that firmware is
1654 	 * not ready to start full blown HWRM commands. Host drivers should
1655 	 * re-try HWRM_VER_GET with some timeout period. The timeout period
1656 	 * can be selected up to 5 seconds. Host drivers should also check
1657 	 * for dev_not_rdy_backing_store to identify if flag is set due to
1658 	 * backing store not been available.
1659 	 * For Example, PCIe hot-plug:
1660 	 *     Hot plug timing is system dependent. It generally takes up to
1661 	 *     600 milliseconds for firmware to clear DEV_NOT_RDY flag.
1662 	 * If set to 0, device is ready to accept all HWRM commands.
1663 	 */
1664 	#define HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY \
1665 		UINT32_C(0x1)
1666 	/*
1667 	 * If set to 1, external version present.
1668 	 * If set to 0, external version not present.
1669 	 */
1670 	#define HWRM_VER_GET_OUTPUT_FLAGS_EXT_VER_AVAIL \
1671 		UINT32_C(0x2)
1672 	/*
1673 	 * Firmware sets this flag along with dev_not_rdy flag to indicate
1674 	 * host drivers that it has not completed resource initialization
1675 	 * required for data path operations. Host drivers should not send
1676 	 * any HWRM command that requires data path resources. Firmware will
1677 	 * fail those commands with HWRM_ERR_CODE_BUSY. Host drivers can
1678 	 * retry those commands once both the flags are cleared.
1679 	 * If this flag and dev_not_rdy flag are set to 0, device is ready
1680 	 * to accept all HWRM commands.
1681 	 */
1682 	#define HWRM_VER_GET_OUTPUT_FLAGS_DEV_NOT_RDY_BACKING_STORE \
1683 		UINT32_C(0x4)
1684 	uint8_t	unused_0[2];
1685 	/*
1686 	 * For backward compatibility this field must be set to 1.
1687 	 * Older drivers might look for this field to be 1 before
1688 	 * processing the message.
1689 	 */
1690 	uint8_t	always_1;
1691 	/*
1692 	 * This field represents the major version of HWRM interface
1693 	 * specification supported by the HWRM implementation.
1694 	 * The interface major version is intended to change only when
1695 	 * non backward compatible changes are made to the HWRM
1696 	 * interface specification. A HWRM implementation that is
1697 	 * compliant with this specification shall provide value of 1
1698 	 * in this field.
1699 	 */
1700 	uint16_t	hwrm_intf_major;
1701 	/*
1702 	 * This field represents the minor version of HWRM interface
1703 	 * specification supported by the HWRM implementation.
1704 	 * A change in interface minor version is used to reflect
1705 	 * significant backward compatible modification to HWRM
1706 	 * interface specification. This can be due to addition or
1707 	 * removal of functionality. HWRM interface specifications
1708 	 * with the same major version but different minor versions are
1709 	 * compatible. A HWRM implementation that is compliant with
1710 	 * this specification shall provide value of 2 in this field.
1711 	 */
1712 	uint16_t	hwrm_intf_minor;
1713 	/*
1714 	 * This field represents the update version of HWRM interface
1715 	 * specification supported by the HWRM implementation. The
1716 	 * interface update version is used to reflect minor changes or
1717 	 * bug fixes to a released HWRM interface specification.
1718 	 * A HWRM implementation that is compliant with this
1719 	 * specification shall provide value of 2 in this field.
1720 	 */
1721 	uint16_t	hwrm_intf_build;
1722 	/*
1723 	 * This field represents the patch version of HWRM interface
1724 	 * specification supported by the HWRM implementation.
1725 	 */
1726 	uint16_t	hwrm_intf_patch;
1727 	/*
1728 	 * This field represents the major version of HWRM firmware.
1729 	 * A change in firmware major version represents a major
1730 	 * firmware release.
1731 	 */
1732 	uint16_t	hwrm_fw_major;
1733 	/*
1734 	 * This field represents the minor version of HWRM firmware.
1735 	 * A change in firmware minor version represents significant
1736 	 * firmware functionality changes.
1737 	 */
1738 	uint16_t	hwrm_fw_minor;
1739 	/*
1740 	 * This field represents the build version of HWRM firmware.
1741 	 * A change in firmware build version represents bug fixes to
1742 	 * a released firmware.
1743 	 */
1744 	uint16_t	hwrm_fw_build;
1745 	/*
1746 	 * This field is a reserved field.
1747 	 * This field can be used to represent firmware branches or customer
1748 	 * specific releases tied to a specific (major,minor,update) version
1749 	 * of the HWRM firmware.
1750 	 */
1751 	uint16_t	hwrm_fw_patch;
1752 	/*
1753 	 * This field represents the major version of mgmt firmware.
1754 	 * A change in major version represents a major release.
1755 	 */
1756 	uint16_t	mgmt_fw_major;
1757 	/*
1758 	 * This field represents the minor version of HWRM firmware.
1759 	 * A change in firmware minor version represents significant
1760 	 * firmware functionality changes.
1761 	 */
1762 	uint16_t	mgmt_fw_minor;
1763 	/*
1764 	 * This field represents the build version of mgmt firmware.
1765 	 * A change in update version represents bug fixes.
1766 	 */
1767 	uint16_t	mgmt_fw_build;
1768 	/*
1769 	 * This field is a reserved field. This field can be used to
1770 	 * represent firmware branches or customer specific releases
1771 	 * tied to a specific (major,minor,update) version.
1772 	 */
1773 	uint16_t	mgmt_fw_patch;
1774 	/*
1775 	 * This field represents the major version of network control
1776 	 * firmware. A change in major version represents
1777 	 * a major release.
1778 	 */
1779 	uint16_t	netctrl_fw_major;
1780 	/*
1781 	 * This field represents the minor version of network control
1782 	 * firmware. A change in minor version represents significant
1783 	 * functionality changes.
1784 	 */
1785 	uint16_t	netctrl_fw_minor;
1786 	/*
1787 	 * This field represents the build version of network control
1788 	 * firmware. A change in update version represents bug fixes.
1789 	 */
1790 	uint16_t	netctrl_fw_build;
1791 	/*
1792 	 * This field is a reserved field. This field can be used to
1793 	 * represent firmware branches or customer specific releases
1794 	 * tied to a specific (major,minor,update) version
1795 	 */
1796 	uint16_t	netctrl_fw_patch;
1797 	/*
1798 	 * This field represents the major version of RoCE firmware.
1799 	 * A change in major version represents a major release.
1800 	 */
1801 	uint16_t	roce_fw_major;
1802 	/*
1803 	 * This field represents the minor version of RoCE firmware.
1804 	 * A change in minor version represents significant
1805 	 * functionality changes.
1806 	 */
1807 	uint16_t	roce_fw_minor;
1808 	/*
1809 	 * This field represents the build version of RoCE firmware.
1810 	 * A change in update version represents bug fixes.
1811 	 */
1812 	uint16_t	roce_fw_build;
1813 	/*
1814 	 * This field is a reserved field. This field can be used to
1815 	 * represent firmware branches or customer specific releases
1816 	 * tied to a specific (major,minor,update) version
1817 	 */
1818 	uint16_t	roce_fw_patch;
1819 	/*
1820 	 * This field returns the maximum extended request length acceptable
1821 	 * by the device which allows requests greater than mailbox size when
1822 	 * used with the short cmd request format.
1823 	 */
1824 	uint16_t	max_ext_req_len;
1825 	/*
1826 	 * This field returns the maximum request timeout value in seconds.
1827 	 * For backward compatibility, a value of zero should be interpreted
1828 	 * as the default value of 40 seconds. Drivers should always honor the
1829 	 * maximum timeout, but are permitted to warn if a longer duration than
1830 	 * this default is advertised. Values larger than 40 seconds should
1831 	 * only be used as a stopgap measure to address a device limitation or
1832 	 * for the purposes of test and debugging. The long term goal is for
1833 	 * firmware to significantly reduce this value in the passage of time.
1834 	 */
1835 	uint16_t	max_req_timeout;
1836 	uint8_t	unused_1[3];
1837 	/*
1838 	 * This field is used in Output records to indicate that the output
1839 	 * is completely written to RAM. This field should be read as '1'
1840 	 * to indicate that the output has been completely written. When
1841 	 * writing a command completion or response to an internal processor,
1842 	 * the order of writes has to be such that this field is written last.
1843 	 */
1844 	uint8_t	valid;
1845 } __rte_packed_end;
1846 
1847 /* cfa_bds_read_cmd_data_msg (size:128b/16B) */
1848 struct __rte_packed_begin cfa_bds_read_cmd_data_msg {
1849 	/* This value selects the format for the mid-path command for the CFA. */
1850 	uint8_t	opcode;
1851 	/*
1852 	 * This is read command. From 32 to 128B can be read from a table
1853 	 * using this command.
1854 	 */
1855 	#define CFA_BDS_READ_CMD_DATA_MSG_OPCODE_READ UINT32_C(0x0)
1856 	#define CFA_BDS_READ_CMD_DATA_MSG_OPCODE_LAST \
1857 		CFA_BDS_READ_CMD_DATA_MSG_OPCODE_READ
1858 	/* This value selects the table type to be acted upon. */
1859 	uint8_t	table_type;
1860 	/* This value selects the table type to be acted upon. */
1861 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_MASK  UINT32_C(0xf)
1862 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_SFT   0
1863 	/* This command acts on the action table of the specified scope. */
1864 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_ACTION  UINT32_C(0x0)
1865 	/* This command acts on the exact match table of the specified scope. */
1866 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_EM      UINT32_C(0x1)
1867 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_LAST \
1868 		CFA_BDS_READ_CMD_DATA_MSG_TABLE_TYPE_EM
1869 	/* This value selects which table scope will be accessed. */
1870 	uint8_t	table_scope;
1871 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
1872 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
1873 	/*
1874 	 * This value identifies the number of 32B units will be accessed. A
1875 	 * value of zero is invalid. Maximum value is 4.
1876 	 */
1877 	uint8_t	data_size;
1878 	#define CFA_BDS_READ_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
1879 	#define CFA_BDS_READ_CMD_DATA_MSG_DATA_SIZE_SFT 0
1880 	/* This is the 32B index into the selected table to access. */
1881 	uint32_t	table_index;
1882 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_INDEX_MASK UINT32_C(0x3ffffff)
1883 	#define CFA_BDS_READ_CMD_DATA_MSG_TABLE_INDEX_SFT 0
1884 	/*
1885 	 * This is the 64b host address where you want the data returned to. The
1886 	 * data will be written to the same function as the one that owns the SQ
1887 	 * this command is read from. The bottom two bits of this value must be
1888 	 * zero. The size of the write is controlled by the data_size field.
1889 	 */
1890 	uint64_t	host_address;
1891 } __rte_packed_end;
1892 
1893 /* cfa_bds_write_cmd_data_msg (size:1152b/144B) */
1894 struct __rte_packed_begin cfa_bds_write_cmd_data_msg {
1895 	/* This value selects the format for the mid-path command for the CFA. */
1896 	uint8_t	opcode;
1897 	/*
1898 	 * This is write command. From 32 to 128B can be written to a table
1899 	 * using this command.
1900 	 */
1901 	#define CFA_BDS_WRITE_CMD_DATA_MSG_OPCODE_WRITE UINT32_C(0x1)
1902 	#define CFA_BDS_WRITE_CMD_DATA_MSG_OPCODE_LAST \
1903 		CFA_BDS_WRITE_CMD_DATA_MSG_OPCODE_WRITE
1904 	/* This value selects the table type to be acted upon. */
1905 	uint8_t	write_thru_table_type;
1906 	/* This value selects the table type to be acted upon. */
1907 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_MASK  UINT32_C(0xf)
1908 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_SFT   0
1909 	/* This command acts on the action table of the specified scope. */
1910 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_ACTION  UINT32_C(0x0)
1911 	/* This command acts on the exact match table of the specified scope. */
1912 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_EM      UINT32_C(0x1)
1913 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_LAST \
1914 		CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_TYPE_EM
1915 	/*
1916 	 * Indicates write-through control. Indicates write-through when set,
1917 	 * or write back when cleared.
1918 	 */
1919 	#define CFA_BDS_WRITE_CMD_DATA_MSG_WRITE_THRU       UINT32_C(0x10)
1920 	/* This value selects which table scope will be accessed. */
1921 	uint8_t	table_scope;
1922 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
1923 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
1924 	/*
1925 	 * This value identifies the number of 32B units will be accessed. A
1926 	 * value of zero is invalid. Maximum value is 4.
1927 	 */
1928 	uint8_t	data_size;
1929 	#define CFA_BDS_WRITE_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
1930 	#define CFA_BDS_WRITE_CMD_DATA_MSG_DATA_SIZE_SFT 0
1931 	/* This is the 32B index into the selected table to access. */
1932 	uint32_t	table_index;
1933 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_INDEX_MASK UINT32_C(0x3ffffff)
1934 	#define CFA_BDS_WRITE_CMD_DATA_MSG_TABLE_INDEX_SFT 0
1935 	uint32_t	unused0;
1936 	uint32_t	unused1;
1937 	/*
1938 	 * This is the data to be written. Data length is determined by the
1939 	 * data_size field. The bd_cnt in the encapsulating BD must also be set
1940 	 * correctly to ensure that the BD is processed correctly and the full
1941 	 * WRITE_CMD message is extracted from the BD.
1942 	 */
1943 	uint32_t	dta[32];
1944 } __rte_packed_end;
1945 
1946 /* cfa_bds_read_clr_cmd_data_msg (size:256b/32B) */
1947 struct __rte_packed_begin cfa_bds_read_clr_cmd_data_msg {
1948 	/* This value selects the format for the mid-path command for the CFA. */
1949 	uint8_t	opcode;
1950 	/*
1951 	 * This is read-clear command. 32B can be read from a table and
1952 	 * a 16b mask can be used to clear specific 16b units after the
1953 	 * read as an atomic operation.
1954 	 */
1955 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_OPCODE_READ_CLR UINT32_C(0x2)
1956 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_OPCODE_LAST \
1957 		CFA_BDS_READ_CLR_CMD_DATA_MSG_OPCODE_READ_CLR
1958 	/* This value selects the table type to be acted upon. */
1959 	uint8_t	table_type;
1960 	/* This value selects the table type to be acted upon. */
1961 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_MASK  UINT32_C(0xf)
1962 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_SFT   0
1963 	/* This command acts on the action table of the specified scope. */
1964 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_ACTION  UINT32_C(0x0)
1965 	/* This command acts on the exact match table of the specified scope. */
1966 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_EM      UINT32_C(0x1)
1967 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_LAST \
1968 		CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_TYPE_EM
1969 	/* This value selects which table scope will be accessed. */
1970 	uint8_t	table_scope;
1971 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
1972 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
1973 	/*
1974 	 * This value identifies the number of 32B units will be accessed.
1975 	 * Always set the value to 1.
1976 	 */
1977 	uint8_t	data_size;
1978 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
1979 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_DATA_SIZE_SFT 0
1980 	/* This is the 32B index into the selected table to access. */
1981 	uint32_t	table_index;
1982 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_INDEX_MASK \
1983 		UINT32_C(0x3ffffff)
1984 	#define CFA_BDS_READ_CLR_CMD_DATA_MSG_TABLE_INDEX_SFT 0
1985 	/*
1986 	 * This is the 64b host address where you want the data returned to. The
1987 	 * data will be written to the same function as the one that owns the SQ
1988 	 * this command is read from. The bottom two bits of this value must be
1989 	 * zero. The size of the write is controlled by the data_size field.
1990 	 */
1991 	uint64_t	host_address;
1992 	/*
1993 	 * This is active high clear mask for the 32B of data that this command
1994 	 * can read. Bit 0 of the field will clear bits 15:0 of the first word
1995 	 * of data read when set to '1'.
1996 	 */
1997 	uint16_t	clear_mask;
1998 	uint16_t	unused0[3];
1999 	uint16_t	unused1[4];
2000 } __rte_packed_end;
2001 
2002 /* cfa_bds_em_insert_cmd_data_msg (size:1152b/144B) */
2003 struct __rte_packed_begin cfa_bds_em_insert_cmd_data_msg {
2004 	/* This value selects the format for the mid-path command for the CFA. */
2005 	uint8_t	opcode;
2006 	/*
2007 	 * An exact match table insert will be attempted into the table.
2008 	 * If there is a free location in the bucket, the payload will
2009 	 * be written to the bucket.
2010 	 */
2011 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_OPCODE_EM_INSERT UINT32_C(0x3)
2012 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_OPCODE_LAST \
2013 		CFA_BDS_EM_INSERT_CMD_DATA_MSG_OPCODE_EM_INSERT
2014 	/*
2015 	 * Indicates write-through control. Indicates write-through when set,
2016 	 * or write back when cleared.
2017 	 */
2018 	uint8_t	write_thru;
2019 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_UNUSED_MASK    UINT32_C(0xf)
2020 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_UNUSED_SFT     0
2021 	/*
2022 	 * Indicates write-through control. Indicates write-through when set,
2023 	 * or write back when cleared.
2024 	 */
2025 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_WRITE_THRU     UINT32_C(0x10)
2026 	/* This value selects which table scope will be accessed. */
2027 	uint8_t	table_scope;
2028 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
2029 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2030 	/*
2031 	 * This value identifies the number of 32B units will be accessed. A
2032 	 * value of zero is invalid. Maximum value is 4.
2033 	 */
2034 	uint8_t	data_size;
2035 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2036 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_DATA_SIZE_SFT 0
2037 	/* This is the 32B index into the selected table to access. */
2038 	uint32_t	table_index;
2039 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_TABLE_INDEX_MASK \
2040 		UINT32_C(0x3ffffff)
2041 	#define CFA_BDS_EM_INSERT_CMD_DATA_MSG_TABLE_INDEX_SFT 0
2042 	/*
2043 	 * This is the 64b host address where you want the data returned to. The
2044 	 * data will be written to the same function as the one that owns the SQ
2045 	 */
2046 	uint64_t	host_address;
2047 	/*
2048 	 * This is the Exact Match Lookup Record. Data length is determined by
2049 	 * the data_size field. The bd_cnt in the encapsulating BD must also be
2050 	 */
2051 	uint32_t	dta[32];
2052 } __rte_packed_end;
2053 
2054 /* cfa_bds_em_delete_cmd_data_msg (size:256b/32B) */
2055 struct __rte_packed_begin cfa_bds_em_delete_cmd_data_msg {
2056 	/* This value selects the format for the mid-path command for the CFA. */
2057 	uint8_t	opcode;
2058 	/* An exact match table delete will be attempted. */
2059 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_OPCODE_EM_DELETE UINT32_C(0x4)
2060 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_OPCODE_LAST \
2061 		CFA_BDS_EM_DELETE_CMD_DATA_MSG_OPCODE_EM_DELETE
2062 	/*
2063 	 * Indicates write-through control. Indicates write-through when set,
2064 	 * or write back when cleared.
2065 	 */
2066 	uint8_t	write_thru;
2067 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_UNUSED_MASK    UINT32_C(0xf)
2068 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_UNUSED_SFT     0
2069 	/*
2070 	 * Indicates write-through control. Indicates write-through when set,
2071 	 * or write back when cleared.
2072 	 */
2073 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_WRITE_THRU     UINT32_C(0x10)
2074 	/* This value selects which table scope will be accessed. */
2075 	uint8_t	table_scope;
2076 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
2077 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2078 	/*
2079 	 * This value identifies the number of 32B units will be accessed. A
2080 	 * value of zero is invalid. Maximum value is 4.
2081 	 */
2082 	uint8_t	data_size;
2083 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2084 	#define CFA_BDS_EM_DELETE_CMD_DATA_MSG_DATA_SIZE_SFT 0
2085 	uint32_t	unused0;
2086 	/*
2087 	 * This is the 64b host address where you want the data returned to. The
2088 	 * data will be written to the same function as the one that owns the SQ
2089 	 */
2090 	uint64_t	host_address;
2091 	/*
2092 	 * This is the Exact Match Lookup Record. Data length is determined by
2093 	 * the data_size field. The bd_cnt in the encapsulating BD must also be
2094 	 */
2095 	uint64_t	dta;
2096 	uint32_t	unused1[2];
2097 } __rte_packed_end;
2098 
2099 /* cfa_bds_invalidate_cmd_data_msg (size:128b/16B) */
2100 struct __rte_packed_begin cfa_bds_invalidate_cmd_data_msg {
2101 	/* This value selects the format for the mid-path command for the CFA. */
2102 	uint8_t	opcode;
2103 	/*
2104 	 * The specified table area will be invalidated. If it is needed.
2105 	 * again, it will be read from the backing store.
2106 	 */
2107 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_OPCODE_INVALIDATE UINT32_C(0x5)
2108 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_OPCODE_LAST \
2109 		CFA_BDS_INVALIDATE_CMD_DATA_MSG_OPCODE_INVALIDATE
2110 	/* This value selects the table type to be acted upon. */
2111 	uint8_t	table_type;
2112 	/* This value selects the table type to be acted upon. */
2113 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_MASK  UINT32_C(0xf)
2114 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_SFT   0
2115 	/* This command acts on the action table of the specified scope. */
2116 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_ACTION \
2117 		UINT32_C(0x0)
2118 	/* This command acts on the exact match table of the specified scope. */
2119 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_EM \
2120 		UINT32_C(0x1)
2121 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_LAST \
2122 		CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_TYPE_EM
2123 	/* This value selects which table scope will be accessed. */
2124 	uint8_t	table_scope;
2125 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
2126 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2127 	/* This value specifies the number of cache lines to invalidate. */
2128 	uint8_t	data_size;
2129 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2130 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_DATA_SIZE_SFT 0
2131 	/* This is the 32B index into the selected table to access. */
2132 	uint32_t	table_index;
2133 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_INDEX_MASK \
2134 		UINT32_C(0x3ffffff)
2135 	#define CFA_BDS_INVALIDATE_CMD_DATA_MSG_TABLE_INDEX_SFT 0
2136 	uint32_t	unused[2];
2137 } __rte_packed_end;
2138 
2139 /* cfa_bds_event_collect_cmd_data_msg (size:128b/16B) */
2140 struct __rte_packed_begin cfa_bds_event_collect_cmd_data_msg {
2141 	/* This value selects the format for the mid-path command for the CFA. */
2142 	uint8_t	opcode;
2143 	/* Reads notification messages from the Host Notification Queue. */
2144 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_OPCODE_EVENT_COLLECT \
2145 		UINT32_C(0x6)
2146 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_OPCODE_LAST \
2147 		CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_OPCODE_EVENT_COLLECT
2148 	uint8_t	unused0;
2149 	/* This value selects which table scope will be accessed. */
2150 	uint8_t	table_scope;
2151 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_TABLE_SCOPE_MASK \
2152 		UINT32_C(0x1f)
2153 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_TABLE_SCOPE_SFT 0
2154 	/*
2155 	 * This value identifies the number of 32B units will be accessed. A
2156 	 * value of zero is invalid. Maximum value is 4.
2157 	 */
2158 	uint8_t	data_size;
2159 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_DATA_SIZE_MASK UINT32_C(0x7)
2160 	#define CFA_BDS_EVENT_COLLECT_CMD_DATA_MSG_DATA_SIZE_SFT 0
2161 	uint32_t	unused1;
2162 	/*
2163 	 * This is the 64b host address where you want the data returned to. The
2164 	 * data will be written to the same function as the one that owns the SQ
2165 	 */
2166 	uint64_t	host_address;
2167 } __rte_packed_end;
2168 
2169 /* ce_bds_add_data_msg (size:576b/72B) */
2170 struct __rte_packed_begin ce_bds_add_data_msg {
2171 	uint32_t	version_algorithm_kid_opcode;
2172 	/*
2173 	 * This value selects the operation for the mid-path command for the
2174 	 * crypto blocks.
2175 	 */
2176 	#define CE_BDS_ADD_DATA_MSG_OPCODE_MASK               UINT32_C(0xf)
2177 	#define CE_BDS_ADD_DATA_MSG_OPCODE_SFT                0
2178 	/*
2179 	 * This is the add command. Using this opcode, Host Driver can add
2180 	 * information required for kTLS processing. The information is
2181 	 * updated in the CFCK context.
2182 	 */
2183 	#define CE_BDS_ADD_DATA_MSG_OPCODE_ADD                  UINT32_C(0x1)
2184 	#define CE_BDS_ADD_DATA_MSG_OPCODE_LAST \
2185 		CE_BDS_ADD_DATA_MSG_OPCODE_ADD
2186 	/*
2187 	 * This field is the Crypto Context ID. The KID is used to store
2188 	 * information used by the associated kTLS offloaded connection.
2189 	 */
2190 	#define CE_BDS_ADD_DATA_MSG_KID_MASK \
2191 		UINT32_C(0xfffff0)
2192 	#define CE_BDS_ADD_DATA_MSG_KID_SFT                   4
2193 	/*
2194 	 * Currently only two algorithms are supported, AES_GCM_128 and
2195 	 * AES_GCM_256. Additional bits for future growth.
2196 	 */
2197 	#define CE_BDS_ADD_DATA_MSG_ALGORITHM_MASK \
2198 		UINT32_C(0xf000000)
2199 	#define CE_BDS_ADD_DATA_MSG_ALGORITHM_SFT             24
2200 	/* AES_GCM_128 Algorithm */
2201 	#define CE_BDS_ADD_DATA_MSG_ALGORITHM_AES_GCM_128 \
2202 		UINT32_C(0x1000000)
2203 	/* AES_GCM_256 Algorithm */
2204 	#define CE_BDS_ADD_DATA_MSG_ALGORITHM_AES_GCM_256 \
2205 		UINT32_C(0x2000000)
2206 	/*
2207 	 * Version number of TLS connection. HW will provide registers that
2208 	 * converts the 4b encoded version number to 16b of actual version
2209 	 * number in the TLS Header. This field is initialized/updated by
2210 	 * this "KTLS crypto add" mid-path command.
2211 	 */
2212 	#define CE_BDS_ADD_DATA_MSG_VERSION_MASK \
2213 		UINT32_C(0xf0000000)
2214 	#define CE_BDS_ADD_DATA_MSG_VERSION_SFT               28
2215 	/* TLS1.2 Version */
2216 	#define CE_BDS_ADD_DATA_MSG__TLS1_2 \
2217 		(UINT32_C(0x0) << 28)
2218 	/* TLS1.3 Version */
2219 	#define CE_BDS_ADD_DATA_MSG__TLS1_3 \
2220 		(UINT32_C(0x1) << 28)
2221 	#define CE_BDS_ADD_DATA_MSG__LAST \
2222 		CE_BDS_ADD_DATA_MSG__TLS1_3
2223 	uint8_t	ctx_kind;
2224 	/* This field selects the context kind for the request. */
2225 	#define CE_BDS_ADD_DATA_MSG_CTX_KIND_MASK UINT32_C(0x1f)
2226 	#define CE_BDS_ADD_DATA_MSG_CTX_KIND_SFT  0
2227 	/* Crypto key transmit context */
2228 	#define CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_TX  UINT32_C(0x11)
2229 	/* Crypto key receive context */
2230 	#define CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_RX  UINT32_C(0x12)
2231 	#define CE_BDS_ADD_DATA_MSG_CTX_KIND_LAST \
2232 		CE_BDS_ADD_DATA_MSG_CTX_KIND_CK_RX
2233 	uint8_t	unused0[3];
2234 	/*
2235 	 * Salt is part of the nonce that is used as the Initial Vector (IV) in
2236 	 * AES-GCM cipher suites. These are exchanged as part of the handshake
2237 	 * process and is either the client_write_iv (when the client is
2238 	 * sending) or server_write_iv (when the server is sending). In
2239 	 * TLS1.2, 4B of Salt is concatenated with 8B of explicit_nonce to
2240 	 * generate the 12B of IV. In TLS1.3, 8B of TLS record sequence number
2241 	 * is zero padded to 12B and then xor'ed with the 4B of salt to generate
2242 	 * the 12B of IV. This value is initialized by this mid-path command.
2243 	 */
2244 	uint8_t	salt[4];
2245 	uint8_t	unused1[4];
2246 	/*
2247 	 * This field keeps track of the TCP sequence number that is expected as
2248 	 * the first byte in the next TCP packet. This field is calculated by HW
2249 	 * using the output of the parser. The field is initialized as part of
2250 	 * the Mid-path BD download/update of a kTLS connection. For every TCP
2251 	 * packet processed, TCE HW will update the value to Current packet TCP
2252 	 * sequence number + Current packet TCP Payload Length.
2253 	 */
2254 	uint32_t	pkt_tcp_seq_num;
2255 	/*
2256 	 * This field maintains the TCP sequence number of the first byte in the
2257 	 * header of the active TLS record. This field is initialized as part of
2258 	 * the Mid-path BD download/update of a kTLS connection. For every
2259 	 * record that is processed, TCE HW copies the value from the
2260 	 * next_tls_header_tcp_seq_num field.
2261 	 */
2262 	uint32_t	tls_header_tcp_seq_num;
2263 	/*
2264 	 * This is sequence number for the TLS record in a particular session.
2265 	 * In TLS1.2, record sequence number is part of the Associated Data (AD)
2266 	 * in the AEAD algorithm. In TLS1.3, record sequence number is part of
2267 	 * the Initial Vector (IV). The field is initialized as part of the
2268 	 * mid-path BD download/update of a kTLS connection. TCE HW increments
2269 	 * the field after that for every record processed as it parses the TCP
2270 	 * packet.
2271 	 */
2272 	uint64_t	record_seq_num;
2273 	/*
2274 	 * Key used for encrypting or decrypting TLS records. The Key is
2275 	 * exchanged during the hand-shake protocol by the client-server and
2276 	 * provided to HW through this mid-path BD.
2277 	 */
2278 	uint8_t	session_key[32];
2279 	/*
2280 	 * Additional IV that is exchanged as part of sessions setup between
2281 	 * the two end points. This field is used for TLS1.3 only.
2282 	 */
2283 	uint8_t	addl_iv[8];
2284 } __rte_packed_end;
2285 
2286 /* ce_bds_delete_data_msg (size:32b/4B) */
2287 struct __rte_packed_begin ce_bds_delete_data_msg {
2288 	uint32_t	kid_opcode_ctx_kind;
2289 	/*
2290 	 * This value selects the operation for the mid-path command for the
2291 	 * crypto blocks.
2292 	 */
2293 	#define CE_BDS_DELETE_DATA_MSG_OPCODE_MASK     UINT32_C(0xf)
2294 	#define CE_BDS_DELETE_DATA_MSG_OPCODE_SFT      0
2295 	/*
2296 	 * This is the delete command. Using this opcode, the host Driver
2297 	 * can remove a key context from the CFCK. If context is deleted
2298 	 * and packets with the same KID come through the pipeline, the
2299 	 * following actions are taken. For transmit packets, no crypto
2300 	 * operation will be performed, payload will be zero'ed out. For
2301 	 * receive packets, no crypto operation will be performed,
2302 	 * payload will be unmodified.
2303 	 */
2304 	#define CE_BDS_DELETE_DATA_MSG_OPCODE_DELETE     UINT32_C(0x2)
2305 	#define CE_BDS_DELETE_DATA_MSG_OPCODE_LAST \
2306 		CE_BDS_DELETE_DATA_MSG_OPCODE_DELETE
2307 	/*
2308 	 * This field is the Crypto Context ID. The KID is used to store
2309 	 * information used by the associated kTLS offloaded connection.
2310 	 */
2311 	#define CE_BDS_DELETE_DATA_MSG_KID_MASK        UINT32_C(0xfffff0)
2312 	#define CE_BDS_DELETE_DATA_MSG_KID_SFT         4
2313 	/* This field selects the context kind for the request. */
2314 	#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_MASK   UINT32_C(0x1f000000)
2315 	#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_SFT    24
2316 	/* Crypto Key Transmit Context. */
2317 	#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_CK_TX    (UINT32_C(0x11) << 24)
2318 	/* Crypto Key Receive Context. */
2319 	#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_CK_RX    (UINT32_C(0x12) << 24)
2320 	/* QUIC Key Transmit Context. */
2321 	#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_QUIC_TX  (UINT32_C(0x14) << 24)
2322 	/* QUIC Key Receive Context. */
2323 	#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_QUIC_RX  (UINT32_C(0x15) << 24)
2324 	#define CE_BDS_DELETE_DATA_MSG_CTX_KIND_LAST \
2325 		CE_BDS_DELETE_DATA_MSG_CTX_KIND_QUIC_RX
2326 } __rte_packed_end;
2327 
2328 /* ce_bds_resync_resp_ack_msg (size:128b/16B) */
2329 struct __rte_packed_begin ce_bds_resync_resp_ack_msg {
2330 	uint32_t	resync_status_kid_opcode;
2331 	/*
2332 	 * This value selects the operation for the mid-path command for the
2333 	 * crypto blocks.
2334 	 */
2335 	#define CE_BDS_RESYNC_RESP_ACK_MSG_OPCODE_MASK       UINT32_C(0xf)
2336 	#define CE_BDS_RESYNC_RESP_ACK_MSG_OPCODE_SFT        0
2337 	/*
2338 	 * This command is used by the driver as a response to the resync
2339 	 * request sent by the crypto engine.
2340 	 */
2341 	#define CE_BDS_RESYNC_RESP_ACK_MSG_OPCODE_RESYNC       UINT32_C(0x3)
2342 	#define CE_BDS_RESYNC_RESP_ACK_MSG_OPCODE_LAST \
2343 		CE_BDS_RESYNC_RESP_ACK_MSG_OPCODE_RESYNC
2344 	/*
2345 	 * This field is the Crypto Context ID. The KID is used to store
2346 	 * information used by the associated kTLS offloaded connection.
2347 	 */
2348 	#define CE_BDS_RESYNC_RESP_ACK_MSG_KID_MASK          UINT32_C(0xfffff0)
2349 	#define CE_BDS_RESYNC_RESP_ACK_MSG_KID_SFT           4
2350 	/*
2351 	 * This field indicates if the resync request resulted in a success or
2352 	 * a failure.
2353 	 */
2354 	#define CE_BDS_RESYNC_RESP_ACK_MSG_RESYNC_STATUS \
2355 		UINT32_C(0x1000000)
2356 	/*
2357 	 * An ACK indicates that the driver was able to find the TLS record
2358 	 * associated with TCP sequence number provided by the HW
2359 	 */
2360 	#define CE_BDS_RESYNC_RESP_ACK_MSG_RESYNC_STATUS_ACK \
2361 		(UINT32_C(0x0) << 24)
2362 	#define CE_BDS_RESYNC_RESP_ACK_MSG_RESYNC_STATUS_LAST \
2363 		CE_BDS_RESYNC_RESP_ACK_MSG_RESYNC_STATUS_ACK
2364 	/*
2365 	 * This field is the echo of the TCP sequence number provided in the
2366 	 * resync request by the HW. If HW sent multiple resync requests, it
2367 	 * only tracks the latest TCP sequence number. When the response from
2368 	 * the Driver doesn't match the latest request, HW will drop the resync
2369 	 * response.
2370 	 */
2371 	uint32_t	resync_record_tcp_seq_num;
2372 	/*
2373 	 * This field indicates the TLS record sequence number associated with
2374 	 * the resync request. HW will take this number and add the delta records
2375 	 * it has found since sending the resync request, update the context and
2376 	 * resume decrypting records.
2377 	 */
2378 	uint64_t	resync_record_seq_num;
2379 } __rte_packed_end;
2380 
2381 /* ce_bds_resync_resp_nack_msg (size:64b/8B) */
2382 struct __rte_packed_begin ce_bds_resync_resp_nack_msg {
2383 	uint32_t	resync_status_kid_opcode;
2384 	/*
2385 	 * This value selects the operation for the mid-path command for the
2386 	 * crypto blocks.
2387 	 */
2388 	#define CE_BDS_RESYNC_RESP_NACK_MSG_OPCODE_MASK       UINT32_C(0xf)
2389 	#define CE_BDS_RESYNC_RESP_NACK_MSG_OPCODE_SFT        0
2390 	/*
2391 	 * This command is used by the driver as a response to the resync
2392 	 * request sent by the crypto engine.
2393 	 */
2394 	#define CE_BDS_RESYNC_RESP_NACK_MSG_OPCODE_RESYNC       UINT32_C(0x3)
2395 	#define CE_BDS_RESYNC_RESP_NACK_MSG_OPCODE_LAST \
2396 		CE_BDS_RESYNC_RESP_NACK_MSG_OPCODE_RESYNC
2397 	/*
2398 	 * This field is the Crypto Context ID. The KID is used to store
2399 	 * information used by the associated kTLS offloaded connection.
2400 	 */
2401 	#define CE_BDS_RESYNC_RESP_NACK_MSG_KID_MASK \
2402 		UINT32_C(0xfffff0)
2403 	#define CE_BDS_RESYNC_RESP_NACK_MSG_KID_SFT           4
2404 	/*
2405 	 * This field indicates if the resync request resulted in a success or
2406 	 * a failure.
2407 	 */
2408 	#define CE_BDS_RESYNC_RESP_NACK_MSG_RESYNC_STATUS \
2409 		UINT32_C(0x1000000)
2410 	/*
2411 	 * An NAK indicates that the driver wasn't able to find the TLS
2412 	 * record associated with TCP sequence number provided by the HW
2413 	 */
2414 	#define CE_BDS_RESYNC_RESP_NACK_MSG_RESYNC_STATUS_NACK \
2415 		(UINT32_C(0x1) << 24)
2416 	#define CE_BDS_RESYNC_RESP_NACK_MSG_RESYNC_STATUS_LAST \
2417 		CE_BDS_RESYNC_RESP_NACK_MSG_RESYNC_STATUS_NACK
2418 	/*
2419 	 * This field is the echo of the TCP sequence number provided in the
2420 	 * resync request by the HW. If HW sent multiple resync requests, it
2421 	 * only tracks the latest TCP sequence number. When the response from
2422 	 * the Driver doesn't match the latest request, HW will drop the resync
2423 	 * response.
2424 	 */
2425 	uint32_t	resync_record_tcp_seq_num;
2426 } __rte_packed_end;
2427 
2428 /* crypto_presync_bd_cmd (size:256b/32B) */
2429 struct __rte_packed_begin crypto_presync_bd_cmd {
2430 	uint8_t	flags;
2431 	/*
2432 	 * Typically, presync BDs are used for packet retransmissions. Source
2433 	 * port sends all the packets in order over the network to destination
2434 	 * port and packets get dropped in the network. The destination port
2435 	 * will request retransmission of dropped packets and source port
2436 	 * driver will send presync BD to setup the transmitter appropriately.
2437 	 * It will provide the start and end TCP sequence number of the data to
2438 	 * be transmitted. HW keeps two sets of context variable, one for in
2439 	 * order traffic and one for retransmission traffic. HW is designed to
2440 	 * transmit everything posted in the presync BD and return to in order
2441 	 * mode after that. No inorder context variables are updated in the
2442 	 * process. There is a special case where packets can be dropped
2443 	 * between the TCP stack and Device Driver (Berkeley Packet Filter for
2444 	 * ex) and HW still needs to transmit rest of the traffic. In this
2445 	 * mode, driver will send a presync BD as if it is a retransmission but
2446 	 * at the end of the transmission, the in order variables need to be
2447 	 * updated. This flag is used by driver to indicate that in order
2448 	 * variables needs to be updated at the end of completing the task
2449 	 * associated with the presync BD.
2450 	 */
2451 	#define CRYPTO_PRESYNC_BD_CMD_FLAGS_UPDATE_IN_ORDER_VAR \
2452 		UINT32_C(0x1)
2453 	/*
2454 	 * When packet with an authentication TAG is lost in the network,
2455 	 * During retransmission Device driver will post the entire record for
2456 	 * the hardware to recalculate the TAG. Hardware is set to retransmit
2457 	 * only portions of the record, it does so by looking at the Header
2458 	 * TCP Sequence Number and Start TCP Sequence Number. However, there
2459 	 * is a case where the header packet gets dropped in the stack for ex
2460 	 * BPF packet filter and it is impossible for the Hardware to
2461 	 * determine if this is a case of full replay for only the TAG
2462 	 * generation.
2463 	 */
2464 	#define CRYPTO_PRESYNC_BD_CMD_FLAGS_FULL_REPLAY_RETRAN \
2465 		UINT32_C(0x2)
2466 	uint8_t	unused0;
2467 	uint16_t	unused1;
2468 	/*
2469 	 * This field maintains the TCP sequence number of the first byte in the
2470 	 * Header of the active TLS record. This field is set to 0 during
2471 	 * mid-path BD updates, but is set to correct value when a presync BD is
2472 	 * detected. For every record that is processed, the value from the
2473 	 * next_tls_header_tcp_seq_num field is copied.
2474 	 */
2475 	uint32_t	header_tcp_seq_num;
2476 	/*
2477 	 * When a retransmitted packet has a TLS authentication TAG present and
2478 	 * the data spans multiple TCP Packets, HW is required to read the entire
2479 	 * record to recalculate the TAG but only transmit what is required. This
2480 	 * field is the start TCP sequence number of the packet(s) that need to
2481 	 * be re-transmitted. This field is initialized to 0 during Mid-path BD
2482 	 * add command and initialized to value provided by the driver when
2483 	 * Pre-sync BD is detected. This field is never updated unless another
2484 	 * Pre-sync BD signaling a new retransmission is scheduled.
2485 	 */
2486 	uint32_t	start_tcp_seq_num;
2487 	/*
2488 	 * When a retransmitted packet has a TLS authentication TAG present and
2489 	 * the data spans multiple TCP Packets, HW is required to read the
2490 	 * entire record to recalculate the TAG but only transmit what is
2491 	 * required. This field is the end TCP sequence number of the packet(s)
2492 	 * that need to be re-transmitted. This field is initialized to 0 during
2493 	 * Mid-path BD add command and initialized to value provided by the
2494 	 * driver when Pre-sync BD is detected. This field is never updated
2495 	 * unless another Pre-sync BD signaling a new retransmission is
2496 	 * scheduled.
2497 	 */
2498 	uint32_t	end_tcp_seq_num;
2499 	/*
2500 	 * For TLS1.2, an explicit nonce is used as part of the IV (concatenated
2501 	 * with the SALT). For retrans packets, this field is extracted from the
2502 	 * TLS record, field right after the TLS Header and stored in the
2503 	 * context. This field needs to be stored in context as TCP segmentation
2504 	 * could have split the field into multiple TCP packets. This value is
2505 	 * initialized to 0 when presync BD is detected by taking the value from
2506 	 * the first TLS header. When subsequent TLS Headers are detected, the
2507 	 * value is extracted from packet.
2508 	 */
2509 	uint8_t	explicit_nonce[8];
2510 	/*
2511 	 * This is sequence number for the TLS record in a particular session. In
2512 	 * TLS1.2, record sequence number is part of the Associated Data (AD) in
2513 	 * the AEAD algorithm. In TLS1.3, record sequence number is part of the
2514 	 * Initial Vector (IV). The field is initialized to 0 during Mid-path BD
2515 	 * download. Is initialized to correct value when a pre-sync BD is
2516 	 * detected. TCE HW increments the field after that for every record
2517 	 * processed as it parses the TCP packet. Subsequent pre-sync BDs
2518 	 * delivering more retransmission instruction will also update this
2519 	 * field.
2520 	 */
2521 	uint64_t	record_seq_num;
2522 } __rte_packed_end;
2523 
2524 /* ce_bds_quic_add_data_msg (size:832b/104B) */
2525 struct __rte_packed_begin ce_bds_quic_add_data_msg {
2526 	uint32_t	ver_algo_kid_opcode;
2527 	/*
2528 	 * This value selects the operation for the mid-path command for the
2529 	 * crypto blocks.
2530 	 */
2531 	#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_MASK          UINT32_C(0xf)
2532 	#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_SFT           0
2533 	/*
2534 	 * This is the add command. Using this opcode, Host Driver can add
2535 	 * information required for QUIC processing. The information is
2536 	 * updated in the CFCK context.
2537 	 */
2538 	#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_ADD             UINT32_C(0x1)
2539 	#define CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_LAST \
2540 		CE_BDS_QUIC_ADD_DATA_MSG_OPCODE_ADD
2541 	/*
2542 	 * This field is the Crypto Context ID. The KID is used to store
2543 	 * information used by the associated QUIC offloaded connection.
2544 	 */
2545 	#define CE_BDS_QUIC_ADD_DATA_MSG_KID_MASK \
2546 		UINT32_C(0xfffff0)
2547 	#define CE_BDS_QUIC_ADD_DATA_MSG_KID_SFT              4
2548 	/* Algorithm used for encryption and decryption. */
2549 	#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_MASK \
2550 		UINT32_C(0xf000000)
2551 	#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_SFT        24
2552 	/* AES_GCM_128 Algorithm. */
2553 	#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_AES_GCM_128 \
2554 		(UINT32_C(0x1) << 24)
2555 	/* AES_GCM_256 Algorithm. */
2556 	#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_AES_GCM_256 \
2557 		(UINT32_C(0x2) << 24)
2558 	/* Chacha20 Algorithm. */
2559 	#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_CHACHA20 \
2560 		(UINT32_C(0x3) << 24)
2561 	#define CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_LAST \
2562 		CE_BDS_QUIC_ADD_DATA_MSG_ALGORITHM_CHACHA20
2563 	/* Version number of QUIC connection. */
2564 	#define CE_BDS_QUIC_ADD_DATA_MSG_VERSION_MASK \
2565 		UINT32_C(0xf0000000)
2566 	#define CE_BDS_QUIC_ADD_DATA_MSG_VERSION_SFT          28
2567 	/* TLS1.2 Version */
2568 	#define CE_BDS_QUIC_ADD_DATA_MSG__TLS1_2 \
2569 		(UINT32_C(0x0) << 28)
2570 	/* TLS1.3 Version */
2571 	#define CE_BDS_QUIC_ADD_DATA_MSG__TLS1_3 \
2572 		(UINT32_C(0x1) << 28)
2573 	/* DTLS1.2 Version */
2574 	#define CE_BDS_QUIC_ADD_DATA_MSG__DTLS1_2 \
2575 		(UINT32_C(0x2) << 28)
2576 	/* DTLS1.2 for RoCE Version */
2577 	#define CE_BDS_QUIC_ADD_DATA_MSG__DTLS1_2_ROCE \
2578 		(UINT32_C(0x3) << 28)
2579 	/* QUIC Version */
2580 	#define CE_BDS_QUIC_ADD_DATA_MSG__QUIC \
2581 		(UINT32_C(0x4) << 28)
2582 	#define CE_BDS_QUIC_ADD_DATA_MSG__LAST \
2583 		CE_BDS_QUIC_ADD_DATA_MSG__QUIC
2584 	uint32_t	ctx_kind_dcid_width_key_phase;
2585 	/* Key phase. */
2586 	#define CE_BDS_QUIC_ADD_DATA_MSG_KEY_PHASE       UINT32_C(0x1)
2587 	/* Destination connection ID width. */
2588 	#define CE_BDS_QUIC_ADD_DATA_MSG_DCID_WIDTH_MASK UINT32_C(0x3e)
2589 	#define CE_BDS_QUIC_ADD_DATA_MSG_DCID_WIDTH_SFT  1
2590 	/* This field selects the context kind for the request. */
2591 	#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_MASK   UINT32_C(0x7c0)
2592 	#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_SFT    6
2593 	/* QUIC key transmit context */
2594 	#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_QUIC_TX \
2595 		(UINT32_C(0x14) << 6)
2596 	/* QUIC key receive context */
2597 	#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_QUIC_RX \
2598 		(UINT32_C(0x15) << 6)
2599 	#define CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_LAST \
2600 		CE_BDS_QUIC_ADD_DATA_MSG_CTX_KIND_QUIC_RX
2601 	uint32_t	unused_0[2];
2602 	/*
2603 	 * Least-significant 64 bits (of 96) of additional IV that is
2604 	 * exchanged as part of sessions setup between the two end
2605 	 * points for QUIC operations.
2606 	 */
2607 	uint8_t	quic_iv_lo[8];
2608 	/*
2609 	 * Most-significant 32 bits (of 96) of additional IV that is
2610 	 * exchanged as part of sessions setup between the two end
2611 	 * points for QUIC operations.
2612 	 */
2613 	uint8_t	quic_iv_hi[4];
2614 	uint32_t	unused_1;
2615 	/*
2616 	 * Key used for encrypting or decrypting records. The Key is exchanged
2617 	 * as part of sessions setup between the two end points through this
2618 	 * mid-path BD.
2619 	 */
2620 	uint8_t	session_key[32];
2621 	/* Header protection key. */
2622 	uint8_t	hp_key[32];
2623 	/* Packet number associated with the QUIC connection. */
2624 	uint64_t	pkt_number;
2625 } __rte_packed_end;
2626 
2627 /* bd_base (size:64b/8B) */
2628 struct __rte_packed_begin bd_base {
2629 	uint8_t	type;
2630 	/* This value identifies the type of buffer descriptor. */
2631 	#define BD_BASE_TYPE_MASK             UINT32_C(0x3f)
2632 	#define BD_BASE_TYPE_SFT              0
2633 	/*
2634 	 * Indicates that this BD is 16B long and is used for
2635 	 * normal L2 packet transmission.
2636 	 */
2637 	#define BD_BASE_TYPE_TX_BD_SHORT        UINT32_C(0x0)
2638 	/*
2639 	 * Indicates that this BD is 1BB long and is an empty
2640 	 * TX BD. Not valid for use by the driver.
2641 	 */
2642 	#define BD_BASE_TYPE_TX_BD_EMPTY        UINT32_C(0x1)
2643 	/*
2644 	 * Indicates that this BD is 16B long and is an RX Producer
2645 	 * (i.e. empty) buffer descriptor.
2646 	 */
2647 	#define BD_BASE_TYPE_RX_PROD_PKT        UINT32_C(0x4)
2648 	/*
2649 	 * Indicates that this BD is 16B long and is an RX
2650 	 * Producer Buffer BD.
2651 	 */
2652 	#define BD_BASE_TYPE_RX_PROD_BFR        UINT32_C(0x5)
2653 	/*
2654 	 * Indicates that this BD is 16B long and is an
2655 	 * RX Producer Assembly Buffer Descriptor.
2656 	 */
2657 	#define BD_BASE_TYPE_RX_PROD_AGG        UINT32_C(0x6)
2658 	/*
2659 	 * Indicates that this BD is used to issue a command to one of
2660 	 * the mid-path destinations.
2661 	 */
2662 	#define BD_BASE_TYPE_TX_BD_MP_CMD       UINT32_C(0x8)
2663 	/*
2664 	 * Indicates that this BD is used to issue a cryptographic pre-
2665 	 * sync command through the fast path and destined for TCE.
2666 	 */
2667 	#define BD_BASE_TYPE_TX_BD_PRESYNC_CMD  UINT32_C(0x9)
2668 	/*
2669 	 * Indicates a timed transmit BD. This is a 16b BD that is inserted
2670 	 * into a packet BD chain immediately after the first BD. It is used
2671 	 * to control the flow in a timed transmit operation.
2672 	 */
2673 	#define BD_BASE_TYPE_TX_BD_TIMEDTX      UINT32_C(0xa)
2674 	/*
2675 	 * Indicates that this BD is 32B long and is used for
2676 	 * normal L2 packet transmission.
2677 	 */
2678 	#define BD_BASE_TYPE_TX_BD_LONG         UINT32_C(0x10)
2679 	/*
2680 	 * Indicates that this BD is 32B long and is used for
2681 	 * L2 packet transmission for small packets that require
2682 	 * low latency.
2683 	 */
2684 	#define BD_BASE_TYPE_TX_BD_LONG_INLINE  UINT32_C(0x11)
2685 	#define BD_BASE_TYPE_LAST              BD_BASE_TYPE_TX_BD_LONG_INLINE
2686 	uint8_t	unused_1[7];
2687 } __rte_packed_end;
2688 
2689 /* tx_bd_short (size:128b/16B) */
2690 struct __rte_packed_begin tx_bd_short {
2691 	/*
2692 	 * All bits in this field must be valid on the first BD of a packet.
2693 	 * Only the packet_end bit must be valid for the remaining BDs
2694 	 * of a packet.
2695 	 */
2696 	uint16_t	flags_type;
2697 	/* This value identifies the type of buffer descriptor. */
2698 	#define TX_BD_SHORT_TYPE_MASK            UINT32_C(0x3f)
2699 	#define TX_BD_SHORT_TYPE_SFT             0
2700 	/*
2701 	 * Indicates that this BD is 16B long and is used for
2702 	 * normal L2 packet transmission.
2703 	 */
2704 	#define TX_BD_SHORT_TYPE_TX_BD_SHORT       UINT32_C(0x0)
2705 	#define TX_BD_SHORT_TYPE_LAST             TX_BD_SHORT_TYPE_TX_BD_SHORT
2706 	/*
2707 	 * All bits in this field must be valid on the first BD of a packet.
2708 	 * Only the packet_end bit must be valid for the remaining BDs
2709 	 * of a packet.
2710 	 */
2711 	#define TX_BD_SHORT_FLAGS_MASK           UINT32_C(0xffc0)
2712 	#define TX_BD_SHORT_FLAGS_SFT            6
2713 	/*
2714 	 * If set to 1, the packet ends with the data in the buffer
2715 	 * pointed to by this descriptor. This flag must be
2716 	 * valid on every BD.
2717 	 */
2718 	#define TX_BD_SHORT_FLAGS_PACKET_END      UINT32_C(0x40)
2719 	/*
2720 	 * If set to 1, the device will not generate a completion for
2721 	 * this transmit packet unless there is an error in it's
2722 	 * processing.
2723 	 * If this bit
2724 	 * is set to 0, then the packet will be completed normally.
2725 	 *
2726 	 * This bit must be valid only on the first BD of a packet.
2727 	 */
2728 	#define TX_BD_SHORT_FLAGS_NO_CMPL         UINT32_C(0x80)
2729 	/*
2730 	 * This value indicates how many 16B BD locations are consumed
2731 	 * in the ring by this packet.
2732 	 * A value of 1 indicates that this BD is the only BD (and that
2733 	 * it is a short BD). A value
2734 	 * of 3 indicates either 3 short BDs or 1 long BD and one short
2735 	 * BD in the packet. A value of 0 indicates
2736 	 * that there are 32 BD locations in the packet (the maximum).
2737 	 *
2738 	 * This field is valid only on the first BD of a packet.
2739 	 */
2740 	#define TX_BD_SHORT_FLAGS_BD_CNT_MASK     UINT32_C(0x1f00)
2741 	#define TX_BD_SHORT_FLAGS_BD_CNT_SFT      8
2742 	/*
2743 	 * This value is a hint for the length of the entire packet.
2744 	 * It is used by the chip to optimize internal processing.
2745 	 *
2746 	 * The packet will be dropped if the hint is too short.
2747 	 *
2748 	 * This field is valid only on the first BD of a packet.
2749 	 */
2750 	#define TX_BD_SHORT_FLAGS_LHINT_MASK      UINT32_C(0x6000)
2751 	#define TX_BD_SHORT_FLAGS_LHINT_SFT       13
2752 	/* indicates packet length < 512B */
2753 	#define TX_BD_SHORT_FLAGS_LHINT_LT512       (UINT32_C(0x0) << 13)
2754 	/* indicates 512 <= packet length < 1KB */
2755 	#define TX_BD_SHORT_FLAGS_LHINT_LT1K        (UINT32_C(0x1) << 13)
2756 	/* indicates 1KB <= packet length < 2KB */
2757 	#define TX_BD_SHORT_FLAGS_LHINT_LT2K        (UINT32_C(0x2) << 13)
2758 	/* indicates packet length >= 2KB */
2759 	#define TX_BD_SHORT_FLAGS_LHINT_GTE2K       (UINT32_C(0x3) << 13)
2760 	#define TX_BD_SHORT_FLAGS_LHINT_LAST \
2761 		TX_BD_SHORT_FLAGS_LHINT_GTE2K
2762 	/*
2763 	 * If set to 1, the device immediately updates the Send Consumer
2764 	 * Index after the buffer associated with this descriptor has
2765 	 * been transferred via DMA to NIC memory from host memory. An
2766 	 * interrupt may or may not be generated according to the state
2767 	 * of the interrupt avoidance mechanisms. If this bit
2768 	 * is set to 0, then the Consumer Index is only updated as soon
2769 	 * as one of the host interrupt coalescing conditions has been met.
2770 	 *
2771 	 * This bit must be valid on the first BD of a packet.
2772 	 */
2773 	#define TX_BD_SHORT_FLAGS_COAL_NOW        UINT32_C(0x8000)
2774 	/*
2775 	 * This is the length of the host physical buffer this BD describes
2776 	 * in bytes.
2777 	 *
2778 	 * This field must be valid on all BDs of a packet.
2779 	 */
2780 	uint16_t	len;
2781 	/*
2782 	 * The opaque data field is pass through to the completion and can be
2783 	 * used for any data that the driver wants to associate with the
2784 	 * transmit BD.
2785 	 *
2786 	 * This field must be valid on the first BD of a packet. If completion
2787 	 * coalescing is enabled on the TX ring, it is suggested that the driver
2788 	 * populate the opaque field to indicate the specific TX ring with which
2789 	 * the completion is associated, then utilize the opaque and sq_cons_idx
2790 	 * fields in the coalesced completion record to determine the specific
2791 	 * packets that are to be completed on that ring.
2792 	 */
2793 	uint32_t	opaque;
2794 	/*
2795 	 * This is the host physical address for the portion of the packet
2796 	 * described by this TX BD.
2797 	 *
2798 	 * This value must be valid on all BDs of a packet.
2799 	 */
2800 	uint64_t	address;
2801 } __rte_packed_end;
2802 
2803 /* tx_bd_long (size:128b/16B) */
2804 struct __rte_packed_begin tx_bd_long {
2805 	/* This value identifies the type of buffer descriptor. */
2806 	uint16_t	flags_type;
2807 	/*
2808 	 * This value indicates the type of buffer descriptor.
2809 	 * packet.
2810 	 */
2811 	#define TX_BD_LONG_TYPE_MASK            UINT32_C(0x3f)
2812 	#define TX_BD_LONG_TYPE_SFT             0
2813 	/*
2814 	 * Indicates that this BD is 32B long and is used for
2815 	 * normal L2 packet transmission.
2816 	 */
2817 	#define TX_BD_LONG_TYPE_TX_BD_LONG        UINT32_C(0x10)
2818 	#define TX_BD_LONG_TYPE_LAST             TX_BD_LONG_TYPE_TX_BD_LONG
2819 	/*
2820 	 * All bits in this field must be valid on the first BD of a packet.
2821 	 * Only the packet_end bit must be valid for the remaining BDs
2822 	 * of a packet.
2823 	 */
2824 	#define TX_BD_LONG_FLAGS_MASK           UINT32_C(0xffc0)
2825 	#define TX_BD_LONG_FLAGS_SFT            6
2826 	/*
2827 	 * If set to 1, the packet ends with the data in the buffer
2828 	 * pointed to by this descriptor. This flag must be
2829 	 * valid on every BD.
2830 	 */
2831 	#define TX_BD_LONG_FLAGS_PACKET_END      UINT32_C(0x40)
2832 	/*
2833 	 * If set to 1, the device will not generate a completion for
2834 	 * this transmit packet unless there is an error in it's
2835 	 * processing.
2836 	 * If this bit
2837 	 * is set to 0, then the packet will be completed normally.
2838 	 *
2839 	 * This bit must be valid only on the first BD of a packet.
2840 	 */
2841 	#define TX_BD_LONG_FLAGS_NO_CMPL         UINT32_C(0x80)
2842 	/*
2843 	 * This value indicates how many 16B BD locations are consumed
2844 	 * in the ring by this packet.
2845 	 * A value of 1 indicates that this BD is the only BD (and that
2846 	 * it is a short BD). A value
2847 	 * of 3 indicates either 3 short BDs or 1 long BD and one short
2848 	 * BD in the packet. A value of 0 indicates
2849 	 * that there are 32 BD locations in the packet (the maximum).
2850 	 *
2851 	 * This field is valid only on the first BD of a packet.
2852 	 */
2853 	#define TX_BD_LONG_FLAGS_BD_CNT_MASK     UINT32_C(0x1f00)
2854 	#define TX_BD_LONG_FLAGS_BD_CNT_SFT      8
2855 	/*
2856 	 * This value is a hint for the length of the entire packet.
2857 	 * It is used by the chip to optimize internal processing.
2858 	 *
2859 	 * The packet will be dropped if the hint is too short.
2860 	 *
2861 	 * This field is valid only on the first BD of a packet.
2862 	 */
2863 	#define TX_BD_LONG_FLAGS_LHINT_MASK      UINT32_C(0x6000)
2864 	#define TX_BD_LONG_FLAGS_LHINT_SFT       13
2865 	/* indicates packet length < 512B */
2866 	#define TX_BD_LONG_FLAGS_LHINT_LT512       (UINT32_C(0x0) << 13)
2867 	/* indicates 512 <= packet length < 1KB */
2868 	#define TX_BD_LONG_FLAGS_LHINT_LT1K        (UINT32_C(0x1) << 13)
2869 	/* indicates 1KB <= packet length < 2KB */
2870 	#define TX_BD_LONG_FLAGS_LHINT_LT2K        (UINT32_C(0x2) << 13)
2871 	/* indicates packet length >= 2KB */
2872 	#define TX_BD_LONG_FLAGS_LHINT_GTE2K       (UINT32_C(0x3) << 13)
2873 	#define TX_BD_LONG_FLAGS_LHINT_LAST       TX_BD_LONG_FLAGS_LHINT_GTE2K
2874 	/*
2875 	 * If set to 1, the device immediately updates the Send Consumer
2876 	 * Index after the buffer associated with this descriptor has
2877 	 * been transferred via DMA to NIC memory from host memory. An
2878 	 * interrupt may or may not be generated according to the state
2879 	 * of the interrupt avoidance mechanisms. If this bit
2880 	 * is set to 0, then the Consumer Index is only updated as soon
2881 	 * as one of the host interrupt coalescing conditions has been met.
2882 	 *
2883 	 * This bit must be valid on the first BD of a packet.
2884 	 */
2885 	#define TX_BD_LONG_FLAGS_COAL_NOW        UINT32_C(0x8000)
2886 	/*
2887 	 * This is the length of the host physical buffer this BD describes
2888 	 * in bytes.
2889 	 *
2890 	 * This field must be valid on all BDs of a packet.
2891 	 */
2892 	uint16_t	len;
2893 	/*
2894 	 * The opaque data field is passed through to the completion and can be
2895 	 * used for any data that the driver wants to associate with the
2896 	 * transmit BD.
2897 	 *
2898 	 * This field must be valid on the first BD of a packet. If completion
2899 	 * coalescing is enabled on the TX ring, it is suggested that the driver
2900 	 * populate the opaque field to indicate the specific TX ring with which
2901 	 * the completion is associated, then utilize the opaque and sq_cons_idx
2902 	 * fields in the coalesced completion record to determine the specific
2903 	 * packets that are to be completed on that ring.
2904 	 */
2905 	uint32_t	opaque;
2906 	/*
2907 	 * This is the host physical address for the portion of the packet
2908 	 * described by this TX BD.
2909 	 *
2910 	 * This value must be valid on all BDs of a packet.
2911 	 */
2912 	uint64_t	address;
2913 } __rte_packed_end;
2914 
2915 /* Last 16 bytes of tx_bd_long. */
2916 /* tx_bd_long_hi (size:128b/16B) */
2917 struct __rte_packed_begin tx_bd_long_hi {
2918 	/*
2919 	 * All bits in this field must be valid on the first BD of a packet.
2920 	 * Their value on other BDs of the packet will be ignored.
2921 	 */
2922 	uint16_t	lflags;
2923 	/*
2924 	 * If set to 1, the controller replaces the TCP/UPD checksum
2925 	 * fields of normal TCP/UPD checksum, or the inner TCP/UDP
2926 	 * checksum field of the encapsulated TCP/UDP packets with the
2927 	 * hardware calculated TCP/UDP checksum for the packet associated
2928 	 * with this descriptor. The flag is ignored if the LSO flag is set.
2929 	 *
2930 	 * This bit must be valid on the first BD of a packet.
2931 	 */
2932 	#define TX_BD_LONG_LFLAGS_TCP_UDP_CHKSUM     UINT32_C(0x1)
2933 	/*
2934 	 * If set to 1, the controller replaces the IP checksum of the
2935 	 * normal packets, or the inner IP checksum of the encapsulated
2936 	 * packets with the hardware calculated IP checksum for the
2937 	 * packet associated with this descriptor.
2938 	 *
2939 	 * This bit must be valid on the first BD of a packet.
2940 	 */
2941 	#define TX_BD_LONG_LFLAGS_IP_CHKSUM          UINT32_C(0x2)
2942 	/*
2943 	 * If set to 1, the controller will not append an Ethernet CRC
2944 	 * to the end of the frame.
2945 	 *
2946 	 * This bit must be valid on the first BD of a packet.
2947 	 *
2948 	 * Packet must be 64B or longer when this flag is set. It is not
2949 	 * useful to use this bit with any form of TX offload such as
2950 	 * CSO or LSO. The intent is that the packet from the host already
2951 	 * has a valid Ethernet CRC on the packet.
2952 	 */
2953 	#define TX_BD_LONG_LFLAGS_NOCRC              UINT32_C(0x4)
2954 	/*
2955 	 * This bit, in conjunction with the stamp_1step bit, controls whether
2956 	 * a TX packet timestamp is collected and the type of timestamp that
2957 	 * is collected.
2958 	 *
2959 	 * This bit must be valid on the first BD of a packet.
2960 	 *
2961 	 * Enumerations of the concatenation { stamp, stamp_1step } are
2962 	 * as follows:
2963 	 *
2964 	 * - 2'b00: ts_none - no timestamp
2965 	 * - 2'b01: ts_ptp_1step - 1-step PTP
2966 	 * - 2'b10: ts_2cmpl - 2-step PTP timestamp or PA timestamp
2967 	 * - 2'b11: ts_rsvd - reserved, same behavior as ts_none
2968 	 * For the ts_2cmpl enumeration, an additional completion is returned.
2969 	 * This additional completion may carry a 2-step PTP timestamp or a PA
2970 	 * timestamp, depending on parsing of the transmitted packet.
2971 	 */
2972 	#define TX_BD_LONG_LFLAGS_STAMP              UINT32_C(0x8)
2973 	/*
2974 	 * If set to 1, The controller replaces the tunnel IP checksum
2975 	 * field with hardware calculated IP checksum for the IP header
2976 	 * of the packet associated with this descriptor.
2977 	 *
2978 	 * For outer UDP checksum, global outer UDP checksum TE_NIC register
2979 	 * needs to be enabled. If the global outer UDP checksum TE_NIC
2980 	 * register bit is set, outer UDP checksum will be calculated for
2981 	 * the following cases:
2982 	 * 1. Packets with tcp_udp_chksum flag set to offload checksum for
2983 	 * inner packet AND the inner packet is TCP/UDP. If the inner packet
2984 	 * is ICMP for example (non-TCP/UDP), even if the tcp_udp_chksum is
2985 	 * set, the outer UDP checksum will not be calculated.
2986 	 * 2. Packets with lso flag set which implies inner TCP checksum
2987 	 * calculation as part of LSO operation.
2988 	 */
2989 	#define TX_BD_LONG_LFLAGS_T_IP_CHKSUM        UINT32_C(0x10)
2990 	/*
2991 	 * If set to 1, the device will treat this packet with LSO(Large
2992 	 * Send Offload) processing for both normal or encapsulated
2993 	 * packets, which is a form of TCP segmentation. When this bit
2994 	 * is 1, the hdr_size and mss fields must be valid. The driver
2995 	 * doesn't need to set ot_ip_chksum, t_ip_chksum, ip_chksum, and
2996 	 * tcp_udp_chksum flags since the controller will replace the
2997 	 * appropriate checksum fields for segmented packets.
2998 	 *
2999 	 * When this bit is 1, the hdr_size and mss fields must be valid.
3000 	 */
3001 	#define TX_BD_LONG_LFLAGS_LSO                UINT32_C(0x20)
3002 	/*
3003 	 * If set to zero when LSO is '1', then the IPID will be treated
3004 	 * as a 16b number and will be wrapped if it exceeds a value of
3005 	 * 0xffff.
3006 	 *
3007 	 * If set to one when LSO is '1', then the IPID will be treated
3008 	 * as a 15b number and will be wrapped if it exceeds a value of
3009 	 * 0x7fff.
3010 	 */
3011 	#define TX_BD_LONG_LFLAGS_IPID_FMT           UINT32_C(0x40)
3012 	/*
3013 	 * If set to zero when LSO is '1', then the IPID of the tunnel
3014 	 * IP header will not be modified during LSO operations.
3015 	 *
3016 	 * If set to one when LSO is '1', then the IPID of the tunnel
3017 	 * IP header will be incremented for each subsequent segment of an
3018 	 * LSO operation.
3019 	 *
3020 	 * The flag is ignored if the LSO packet is a normal (non-tunneled)
3021 	 * TCP packet.
3022 	 */
3023 	#define TX_BD_LONG_LFLAGS_T_IPID             UINT32_C(0x80)
3024 	/*
3025 	 * If set to '1', then the RoCE ICRC will be appended to the
3026 	 * packet. Packet must be a valid RoCE format packet.
3027 	 */
3028 	#define TX_BD_LONG_LFLAGS_ROCE_CRC           UINT32_C(0x100)
3029 	/*
3030 	 * If set to '1', then the FCoE CRC will be appended to the
3031 	 * packet. Packet must be a valid FCoE format packet.
3032 	 */
3033 	#define TX_BD_LONG_LFLAGS_FCOE_CRC           UINT32_C(0x200)
3034 	/*
3035 	 * If set to '1', then the timestamp from the BD is used. If cleared
3036 	 * to 0, then TWE provides the timestamp.
3037 	 */
3038 	#define TX_BD_LONG_LFLAGS_BD_TS_EN           UINT32_C(0x400)
3039 	/*
3040 	 * If set to '1', this operation will cause a trace capture in each
3041 	 * block it passes through.
3042 	 */
3043 	#define TX_BD_LONG_LFLAGS_DEBUG_TRACE        UINT32_C(0x800)
3044 	/*
3045 	 * This bit, in conjunction with the stamp bit, controls whether a
3046 	 * TX packet timestamp is collected and the type of timestamp that
3047 	 * is collected.
3048 	 *
3049 	 * See the stamp field for a description of the valid combinations of
3050 	 * stamp and stamp_1step.
3051 	 *
3052 	 * This bit must be valid on the first BD of a packet.
3053 	 */
3054 	#define TX_BD_LONG_LFLAGS_STAMP_1STEP        UINT32_C(0x1000)
3055 	/*
3056 	 * If set to '1', the controller replaces the Outer-tunnel IP checksum
3057 	 * field with hardware calculated IP checksum for the IP header of the
3058 	 * packet associated with this descriptor. For outer UDP checksum, it
3059 	 * will be the following behavior for all cases independent of
3060 	 * settings of inner LSO and checksum offload BD flags.
3061 	 * If outer UDP checksum is 0, then do not update it.
3062 	 * If outer UDP checksum is non zero, then the hardware should
3063 	 * compute and update it.
3064 	 */
3065 	#define TX_BD_LONG_LFLAGS_OT_IP_CHKSUM       UINT32_C(0x2000)
3066 	/*
3067 	 * If set to zero when LSO is '1', then the IPID of the Outer-tunnel
3068 	 * IP header will not be modified during LSO operations. If set to one
3069 	 * when LSO is '1', then the IPID of the Outer-tunnel IP header will
3070 	 * be incremented for each subsequent segment of an LSO operation. The
3071 	 * flag is ignored if the LSO packet is a normal (non-tunneled) TCP
3072 	 * packet.
3073 	 */
3074 	#define TX_BD_LONG_LFLAGS_OT_IPID            UINT32_C(0x4000)
3075 	/*
3076 	 * If set to '1', When set to 1, KTLS encryption will be enabled for
3077 	 * the packet.
3078 	 */
3079 	#define TX_BD_LONG_LFLAGS_CRYPTO_EN          UINT32_C(0x8000)
3080 	uint16_t	kid_or_ts_low_hdr_size;
3081 	/*
3082 	 * When LSO is '1', this field must contain the offset of the
3083 	 * TCP payload from the beginning of the packet in as
3084 	 * 16b words. In case of encapsulated/tunneling packet, this field
3085 	 * contains the offset of the inner TCP payload from beginning of the
3086 	 * packet as 16-bit words.
3087 	 *
3088 	 * This value must be valid on the first BD of a packet.
3089 	 */
3090 	#define TX_BD_LONG_HDR_SIZE_MASK     UINT32_C(0x1ff)
3091 	#define TX_BD_LONG_HDR_SIZE_SFT      0
3092 	/*
3093 	 * If lflags.bd_ts_en is 1, this is the lower 7 bits of the 24-bit
3094 	 * timestamp. If lflags.crypto_en is 1, this is the lower 7 bits of
3095 	 * the 20-bit KID.
3096 	 */
3097 	#define TX_BD_LONG_KID_OR_TS_LOW_MASK UINT32_C(0xfe00)
3098 	#define TX_BD_LONG_KID_OR_TS_LOW_SFT 9
3099 	uint32_t	kid_or_ts_high_mss;
3100 	/*
3101 	 * This is the MSS value that will be used to do the LSO processing.
3102 	 * The value is the length in bytes of the TCP payload for each
3103 	 * segment generated by the LSO operation.
3104 	 *
3105 	 * This value must be valid on the first BD of a packet.
3106 	 */
3107 	#define TX_BD_LONG_MSS_MASK           UINT32_C(0x7fff)
3108 	#define TX_BD_LONG_MSS_SFT            0
3109 	/*
3110 	 * If lflags.bd_ts_en is 1, this is the upper 17 bits of the 24-bit
3111 	 * timestamp. If lflags.crypto_en is 1, the least significant 13 bits
3112 	 * of this field contain the upper 13 bits of the 20-bit KID.
3113 	 */
3114 	#define TX_BD_LONG_KID_OR_TS_HIGH_MASK UINT32_C(0xffff8000)
3115 	#define TX_BD_LONG_KID_OR_TS_HIGH_SFT 15
3116 	/*
3117 	 * This value selects bits 25:16 of the CFA action to perform on the
3118 	 * packet. See the cfa_action field for more information.
3119 	 */
3120 	uint16_t	cfa_action_high;
3121 	#define TX_BD_LONG_CFA_ACTION_HIGH_MASK UINT32_C(0x3ff)
3122 	#define TX_BD_LONG_CFA_ACTION_HIGH_SFT 0
3123 	/*
3124 	 * This value selects a CFA action to perform on the packet.
3125 	 * Set this value to zero if no CFA action is desired.
3126 	 *
3127 	 * This value must be valid on the first BD of a packet.
3128 	 */
3129 	uint16_t	cfa_action;
3130 	/*
3131 	 * This value is action meta-data that defines CFA edit operations
3132 	 * that are done in addition to any action editing.
3133 	 */
3134 	uint32_t	cfa_meta;
3135 	/* When key=1, This is the VLAN tag VID value. */
3136 	#define TX_BD_LONG_CFA_META_VLAN_VID_MASK        UINT32_C(0xfff)
3137 	#define TX_BD_LONG_CFA_META_VLAN_VID_SFT         0
3138 	/* When key=1, This is the VLAN tag DE value. */
3139 	#define TX_BD_LONG_CFA_META_VLAN_DE              UINT32_C(0x1000)
3140 	/* When key=1, This is the VLAN tag PRI value. */
3141 	#define TX_BD_LONG_CFA_META_VLAN_PRI_MASK        UINT32_C(0xe000)
3142 	#define TX_BD_LONG_CFA_META_VLAN_PRI_SFT         13
3143 	/* When key=1, This is the VLAN tag TPID select value. */
3144 	#define TX_BD_LONG_CFA_META_VLAN_TPID_MASK       UINT32_C(0x70000)
3145 	#define TX_BD_LONG_CFA_META_VLAN_TPID_SFT        16
3146 	/* 0x88a8 */
3147 	#define TX_BD_LONG_CFA_META_VLAN_TPID_TPID88A8 \
3148 		(UINT32_C(0x0) << 16)
3149 	/* 0x8100 */
3150 	#define TX_BD_LONG_CFA_META_VLAN_TPID_TPID8100 \
3151 		(UINT32_C(0x1) << 16)
3152 	/* 0x9100 */
3153 	#define TX_BD_LONG_CFA_META_VLAN_TPID_TPID9100 \
3154 		(UINT32_C(0x2) << 16)
3155 	/* 0x9200 */
3156 	#define TX_BD_LONG_CFA_META_VLAN_TPID_TPID9200 \
3157 		(UINT32_C(0x3) << 16)
3158 	/* 0x9300 */
3159 	#define TX_BD_LONG_CFA_META_VLAN_TPID_TPID9300 \
3160 		(UINT32_C(0x4) << 16)
3161 	/* Value programmed in CFA VLANTPID register. */
3162 	#define TX_BD_LONG_CFA_META_VLAN_TPID_TPIDCFG \
3163 		(UINT32_C(0x5) << 16)
3164 	#define TX_BD_LONG_CFA_META_VLAN_TPID_LAST \
3165 		TX_BD_LONG_CFA_META_VLAN_TPID_TPIDCFG
3166 	/* When key=1, This is the VLAN tag TPID select value. */
3167 	#define TX_BD_LONG_CFA_META_VLAN_RESERVED_MASK   UINT32_C(0xff80000)
3168 	#define TX_BD_LONG_CFA_META_VLAN_RESERVED_SFT    19
3169 	/*
3170 	 * This field identifies the type of edit to be performed
3171 	 * on the packet.
3172 	 *
3173 	 * This value must be valid on the first BD of a packet.
3174 	 */
3175 	#define TX_BD_LONG_CFA_META_KEY_MASK             UINT32_C(0xf0000000)
3176 	#define TX_BD_LONG_CFA_META_KEY_SFT              28
3177 	/* No editing */
3178 	#define TX_BD_LONG_CFA_META_KEY_NONE \
3179 		(UINT32_C(0x0) << 28)
3180 	/*
3181 	 * - meta[17:16] - TPID select value (0 = 0x8100).
3182 	 * - meta[15:12] - PRI/DE value.
3183 	 * - meta[11:0] - VID value.
3184 	 */
3185 	#define TX_BD_LONG_CFA_META_KEY_VLAN_TAG \
3186 		(UINT32_C(0x1) << 28)
3187 	/*
3188 	 * Provide metadata
3189 	 * - Wh+/SR - this option is not supported.
3190 	 * - Thor - cfa_meta[15:0] is used for metadata output if en_bd_meta
3191 	 *   is set in the Lookup Table.
3192 	 * - SR2 - {4'd0, cfa_meta[27:0]} is used for metadata output if
3193 	 *   en_bd_meta is set in the Lookup Table.
3194 	 */
3195 	#define TX_BD_LONG_CFA_META_KEY_METADATA_TRANSFER \
3196 		(UINT32_C(0x2) << 28)
3197 	#define TX_BD_LONG_CFA_META_KEY_LAST \
3198 		TX_BD_LONG_CFA_META_KEY_METADATA_TRANSFER
3199 } __rte_packed_end;
3200 
3201 /*
3202  * This structure is used to inform the NIC of packet data that needs to
3203  * be transmitted with additional processing that requires extra data
3204  * such as VLAN insertion plus attached inline data.
3205  * This BD type may be used to improve latency for small packets needing
3206  * the additional extended features supported by long BDs.
3207  */
3208 /* tx_bd_long_inline (size:256b/32B) */
3209 struct __rte_packed_begin tx_bd_long_inline {
3210 	uint16_t	flags_type;
3211 	/* This value identifies the type of buffer descriptor. */
3212 	#define TX_BD_LONG_INLINE_TYPE_MASK             UINT32_C(0x3f)
3213 	#define TX_BD_LONG_INLINE_TYPE_SFT              0
3214 	/*
3215 	 * This type of BD is 32B long and is used for inline L2 packet
3216 	 * transmission.
3217 	 */
3218 	#define TX_BD_LONG_INLINE_TYPE_TX_BD_LONG_INLINE  UINT32_C(0x11)
3219 	#define TX_BD_LONG_INLINE_TYPE_LAST \
3220 		TX_BD_LONG_INLINE_TYPE_TX_BD_LONG_INLINE
3221 	/*
3222 	 * All bits in this field may be set on the first BD of a packet.
3223 	 * Only the packet_end bit may be set in non-first BDs.
3224 	 */
3225 	#define TX_BD_LONG_INLINE_FLAGS_MASK            UINT32_C(0xffc0)
3226 	#define TX_BD_LONG_INLINE_FLAGS_SFT             6
3227 	/*
3228 	 * If set to 1, the packet ends with the data in the buffer
3229 	 * pointed to by this descriptor. This flag must be
3230 	 * valid on every BD.
3231 	 */
3232 	#define TX_BD_LONG_INLINE_FLAGS_PACKET_END       UINT32_C(0x40)
3233 	/*
3234 	 * If set to 1, the device will not generate a completion for
3235 	 * this transmit packet unless there is an error in its processing.
3236 	 * If this bit is set to 0, then the packet will be completed
3237 	 * normally.
3238 	 *
3239 	 * This bit may be set only on the first BD of a packet.
3240 	 */
3241 	#define TX_BD_LONG_INLINE_FLAGS_NO_CMPL          UINT32_C(0x80)
3242 	/*
3243 	 * This value indicates how many 16B BD locations are consumed
3244 	 * in the ring by this packet, including the BD and inline
3245 	 * data.
3246 	 */
3247 	#define TX_BD_LONG_INLINE_FLAGS_BD_CNT_MASK      UINT32_C(0x1f00)
3248 	#define TX_BD_LONG_INLINE_FLAGS_BD_CNT_SFT       8
3249 	/* This field is deprecated. */
3250 	#define TX_BD_LONG_INLINE_FLAGS_LHINT_MASK       UINT32_C(0x6000)
3251 	#define TX_BD_LONG_INLINE_FLAGS_LHINT_SFT        13
3252 	/*
3253 	 * If set to 1, the device immediately updates the Send Consumer
3254 	 * Index after the buffer associated with this descriptor has
3255 	 * been transferred via DMA to NIC memory from host memory. An
3256 	 * interrupt may or may not be generated according to the state
3257 	 * of the interrupt avoidance mechanisms. If this bit
3258 	 * is set to 0, then the Consumer Index is only updated as soon
3259 	 * as one of the host interrupt coalescing conditions has been met.
3260 	 *
3261 	 * This bit must be valid on the first BD of a packet.
3262 	 */
3263 	#define TX_BD_LONG_INLINE_FLAGS_COAL_NOW         UINT32_C(0x8000)
3264 	/*
3265 	 * This is the length of the inline data, not including BD length, in
3266 	 * bytes.
3267 	 * The maximum value is 480.
3268 	 *
3269 	 * This field must be valid on all BDs of a packet.
3270 	 */
3271 	uint16_t	len;
3272 	/*
3273 	 * The opaque data field is passed through to the completion and can be
3274 	 * used for any data that the driver wants to associate with the
3275 	 * transmit BD. This field must be valid on the first BD of a packet.
3276 	 * If completion coalescing is enabled on the TX ring, it is suggested
3277 	 * that the driver populate the opaque field to indicate the specific
3278 	 * TX ring with which the completion is associated, then utilize the
3279 	 * opaque and sq_cons_idx fields in the coalesced completion record to
3280 	 * determine the specific packets that are to be completed on that ring.
3281 	 *
3282 	 * This field must be valid on the first BD of a packet.
3283 	 */
3284 	uint32_t	opaque;
3285 	uint64_t	unused1;
3286 	/*
3287 	 * All bits in this field must be valid on the first BD of a packet.
3288 	 * Their value on other BDs of the packet is ignored.
3289 	 */
3290 	uint16_t	lflags;
3291 	/*
3292 	 * If set to 1, the controller replaces the TCP/UPD checksum
3293 	 * fields of normal TCP/UPD checksum, or the inner TCP/UDP
3294 	 * checksum field of the encapsulated TCP/UDP packets with the
3295 	 * hardware calculated TCP/UDP checksum for the packet associated
3296 	 * with this descriptor. The flag is ignored if the LSO flag is set.
3297 	 */
3298 	#define TX_BD_LONG_INLINE_LFLAGS_TCP_UDP_CHKSUM     UINT32_C(0x1)
3299 	/*
3300 	 * If set to 1, the controller replaces the IP checksum of the
3301 	 * normal packets, or the inner IP checksum of the encapsulated
3302 	 * packets with the hardware calculated IP checksum for the
3303 	 * packet associated with this descriptor.
3304 	 */
3305 	#define TX_BD_LONG_INLINE_LFLAGS_IP_CHKSUM          UINT32_C(0x2)
3306 	/*
3307 	 * If set to 1, the controller will not append an Ethernet CRC
3308 	 * to the end of the frame.
3309 	 *
3310 	 * Packet must be 64B or longer when this flag is set. It is not
3311 	 * useful to use this bit with any form of TX offload such as
3312 	 * CSO or LSO. The intent is that the packet from the host already
3313 	 * has a valid Ethernet CRC on the packet.
3314 	 */
3315 	#define TX_BD_LONG_INLINE_LFLAGS_NOCRC              UINT32_C(0x4)
3316 	/*
3317 	 * If set to 1, the device will record the time at which the packet
3318 	 * was actually transmitted at the TX MAC for 2-step time sync. This
3319 	 * bit must be valid on the first BD of a packet.
3320 	 */
3321 	#define TX_BD_LONG_INLINE_LFLAGS_STAMP              UINT32_C(0x8)
3322 	/*
3323 	 * If set to 1, the controller replaces the tunnel IP checksum
3324 	 * field with hardware calculated IP checksum for the IP header
3325 	 * of the packet associated with this descriptor. The hardware
3326 	 * updates an outer UDP checksum if it is non-zero.
3327 	 */
3328 	#define TX_BD_LONG_INLINE_LFLAGS_T_IP_CHKSUM        UINT32_C(0x10)
3329 	/*
3330 	 * This bit must be 0 for BDs of this type. LSO is not supported with
3331 	 * inline BDs.
3332 	 */
3333 	#define TX_BD_LONG_INLINE_LFLAGS_LSO                UINT32_C(0x20)
3334 	/* Since LSO is not supported with inline BDs, this bit is not used. */
3335 	#define TX_BD_LONG_INLINE_LFLAGS_IPID_FMT           UINT32_C(0x40)
3336 	/* Since LSO is not supported with inline BDs, this bit is not used. */
3337 	#define TX_BD_LONG_INLINE_LFLAGS_T_IPID             UINT32_C(0x80)
3338 	/*
3339 	 * If set to '1', then the RoCE ICRC will be appended to the
3340 	 * packet. Packet must be a valid RoCE format packet.
3341 	 */
3342 	#define TX_BD_LONG_INLINE_LFLAGS_ROCE_CRC           UINT32_C(0x100)
3343 	/*
3344 	 * If set to '1', then the FCoE CRC will be appended to the
3345 	 * packet. Packet must be a valid FCoE format packet.
3346 	 */
3347 	#define TX_BD_LONG_INLINE_LFLAGS_FCOE_CRC           UINT32_C(0x200)
3348 	/*
3349 	 * If set to '1', then the timestamp from the BD is used. If cleared
3350 	 * to 0, then TWE provides the timestamp.
3351 	 */
3352 	#define TX_BD_LONG_INLINE_LFLAGS_BD_TS_EN           UINT32_C(0x400)
3353 	/*
3354 	 * If set to '1', this operation will cause a trace capture in each
3355 	 * block it passes through.
3356 	 */
3357 	#define TX_BD_LONG_INLINE_LFLAGS_DEBUG_TRACE        UINT32_C(0x800)
3358 	/*
3359 	 * If set to '1', the device will record the time at which the packet
3360 	 * was actually transmitted at the TX MAC for 1-step time sync. This
3361 	 * bit must be valid on the first BD of a packet.
3362 	 */
3363 	#define TX_BD_LONG_INLINE_LFLAGS_STAMP_1STEP        UINT32_C(0x1000)
3364 	/*
3365 	 * If set to '1', the controller replaces the Outer-tunnel IP checksum
3366 	 * field with hardware calculated IP checksum for the IP header of the
3367 	 * packet associated with this descriptor. For outer UDP checksum, it
3368 	 * will be the following behavior for all cases independent of settings
3369 	 * of inner LSO and checksum offload BD flags. If outer UDP checksum
3370 	 * is 0, then do not update it. If outer UDP checksum is non zero, then
3371 	 * the hardware should compute and update it.
3372 	 */
3373 	#define TX_BD_LONG_INLINE_LFLAGS_OT_IP_CHKSUM       UINT32_C(0x2000)
3374 	/*
3375 	 * If set to zero when LSO is '1', then the IPID of the Outer-tunnel IP
3376 	 * header will not be modified during LSO operations. If set to one
3377 	 * when LSO is '1', then the IPID of the Outer-tunnel IP header will be
3378 	 * incremented for each subsequent segment of an LSO operation. The
3379 	 * flag is ignored if the LSO packet is a normal (non-tunneled) TCP
3380 	 * packet.
3381 	 */
3382 	#define TX_BD_LONG_INLINE_LFLAGS_OT_IPID            UINT32_C(0x4000)
3383 	/*
3384 	 * If set to '1', When set to 1, KTLS encryption will be enabled for
3385 	 * the packet.
3386 	 */
3387 	#define TX_BD_LONG_INLINE_LFLAGS_CRYPTO_EN          UINT32_C(0x8000)
3388 	uint8_t	unused2;
3389 	uint8_t	kid_or_ts_low;
3390 	#define TX_BD_LONG_INLINE_UNUSED            UINT32_C(0x1)
3391 	/*
3392 	 * If lflags.bd_ts_en is 1, this is the lower 7 bits of the 24-bit
3393 	 * timestamp. If lflags.crypto_en is 1, this is the lower 7 bits of
3394 	 * the 20-bit KID.
3395 	 */
3396 	#define TX_BD_LONG_INLINE_KID_OR_TS_LOW_MASK UINT32_C(0xfe)
3397 	#define TX_BD_LONG_INLINE_KID_OR_TS_LOW_SFT 1
3398 	uint32_t	kid_or_ts_high;
3399 	#define TX_BD_LONG_INLINE_UNUSED_MASK        UINT32_C(0x7fff)
3400 	#define TX_BD_LONG_INLINE_UNUSED_SFT         0
3401 	/*
3402 	 * If lflags.bd_ts_en is 1, this is the upper 17 bits of the 24-bit
3403 	 * timestamp. If lflags.crypto_en is 1, the least significant 13 bits
3404 	 * of this field contain the upper 13 bits of the 20-bit KID.
3405 	 */
3406 	#define TX_BD_LONG_INLINE_KID_OR_TS_HIGH_MASK UINT32_C(0xffff8000)
3407 	#define TX_BD_LONG_INLINE_KID_OR_TS_HIGH_SFT 15
3408 	/*
3409 	 * This value selects bits 25:16 of the CFA action to perform on the
3410 	 * packet. See the cfa_action field for more information.
3411 	 */
3412 	uint16_t	cfa_action_high;
3413 	#define TX_BD_LONG_INLINE_CFA_ACTION_HIGH_MASK UINT32_C(0x3ff)
3414 	#define TX_BD_LONG_INLINE_CFA_ACTION_HIGH_SFT 0
3415 	/*
3416 	 * This value selects a CFA action to perform on the packet.
3417 	 * Set this value to zero if no CFA action is desired.
3418 	 *
3419 	 * This value must be valid on the first BD of a packet.
3420 	 */
3421 	uint16_t	cfa_action;
3422 	/*
3423 	 * This value is action meta-data that defines CFA edit operations
3424 	 * that are done in addition to any action editing.
3425 	 */
3426 	uint32_t	cfa_meta;
3427 	/* When key = 1, this is the VLAN tag VID value. */
3428 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_VID_MASK        UINT32_C(0xfff)
3429 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_VID_SFT         0
3430 	/* When key = 1, this is the VLAN tag DE value. */
3431 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_DE \
3432 		UINT32_C(0x1000)
3433 	/* When key = 1, this is the VLAN tag PRI value. */
3434 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_PRI_MASK \
3435 		UINT32_C(0xe000)
3436 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_PRI_SFT         13
3437 	/* When key = 1, this is the VLAN tag TPID select value. */
3438 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_MASK \
3439 		UINT32_C(0x70000)
3440 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_SFT        16
3441 	/* 0x88a8 */
3442 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPID88A8 \
3443 		(UINT32_C(0x0) << 16)
3444 	/* 0x8100 */
3445 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPID8100 \
3446 		(UINT32_C(0x1) << 16)
3447 	/* 0x9100 */
3448 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPID9100 \
3449 		(UINT32_C(0x2) << 16)
3450 	/* 0x9200 */
3451 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPID9200 \
3452 		(UINT32_C(0x3) << 16)
3453 	/* 0x9300 */
3454 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPID9300 \
3455 		(UINT32_C(0x4) << 16)
3456 	/* Value programmed in CFA VLANTPID register. */
3457 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPIDCFG \
3458 		(UINT32_C(0x5) << 16)
3459 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_LAST \
3460 		TX_BD_LONG_INLINE_CFA_META_VLAN_TPID_TPIDCFG
3461 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_RESERVED_MASK \
3462 		UINT32_C(0xff80000)
3463 	#define TX_BD_LONG_INLINE_CFA_META_VLAN_RESERVED_SFT    19
3464 	/*
3465 	 * This field identifies the type of edit to be performed
3466 	 * on the packet.
3467 	 *
3468 	 * This value must be valid on the first BD of a packet.
3469 	 */
3470 	#define TX_BD_LONG_INLINE_CFA_META_KEY_MASK \
3471 		UINT32_C(0xf0000000)
3472 	#define TX_BD_LONG_INLINE_CFA_META_KEY_SFT              28
3473 	/* No editing */
3474 	#define TX_BD_LONG_INLINE_CFA_META_KEY_NONE \
3475 		(UINT32_C(0x0) << 28)
3476 	/*
3477 	 * - meta[17:16] - TPID select value (0 = 0x8100).
3478 	 * - meta[15:12] - PRI/DE value.
3479 	 * - meta[11:0] - VID value.
3480 	 */
3481 	#define TX_BD_LONG_INLINE_CFA_META_KEY_VLAN_TAG \
3482 		(UINT32_C(0x1) << 28)
3483 	/*
3484 	 * Provide metadata
3485 	 * - Wh+/SR - this option is not supported.
3486 	 * - Thor - cfa_meta[15:0] is used for metadata output if en_bd_meta
3487 	 *   is set in the Lookup Table.
3488 	 * - SR2 - {4'd0, cfa_meta[27:0]} is used for metadata output if
3489 	 *   en_bd_meta is set in the Lookup Table.
3490 	 */
3491 	#define TX_BD_LONG_INLINE_CFA_META_KEY_METADATA_TRANSFER \
3492 		(UINT32_C(0x2) << 28)
3493 	#define TX_BD_LONG_INLINE_CFA_META_KEY_LAST \
3494 		TX_BD_LONG_INLINE_CFA_META_KEY_METADATA_TRANSFER
3495 } __rte_packed_end;
3496 
3497 /* tx_bd_empty (size:128b/16B) */
3498 struct __rte_packed_begin tx_bd_empty {
3499 	/* This value identifies the type of buffer descriptor. */
3500 	uint8_t	type;
3501 	#define TX_BD_EMPTY_TYPE_MASK       UINT32_C(0x3f)
3502 	#define TX_BD_EMPTY_TYPE_SFT        0
3503 	/*
3504 	 * Indicates that this BD is 1BB long and is an empty
3505 	 * TX BD. Not valid for use by the driver.
3506 	 */
3507 	#define TX_BD_EMPTY_TYPE_TX_BD_EMPTY  UINT32_C(0x1)
3508 	#define TX_BD_EMPTY_TYPE_LAST        TX_BD_EMPTY_TYPE_TX_BD_EMPTY
3509 	uint8_t	unused_1[3];
3510 	uint8_t	unused_2;
3511 	uint8_t	unused_3[3];
3512 	uint8_t	unused_4[8];
3513 } __rte_packed_end;
3514 
3515 /* tx_bd_mp_cmd (size:128b/16B) */
3516 struct __rte_packed_begin tx_bd_mp_cmd {
3517 	/* Unless otherwise stated, sub-fields of this field are always valid. */
3518 	uint16_t	flags_type;
3519 	/* This value identifies the type of buffer descriptor. */
3520 	#define TX_BD_MP_CMD_TYPE_MASK        UINT32_C(0x3f)
3521 	#define TX_BD_MP_CMD_TYPE_SFT         0
3522 	/*
3523 	 * Indicates that this BD is used to issue a command to one of
3524 	 * the mid-path destinations.
3525 	 */
3526 	#define TX_BD_MP_CMD_TYPE_TX_BD_MP_CMD  UINT32_C(0x8)
3527 	#define TX_BD_MP_CMD_TYPE_LAST         TX_BD_MP_CMD_TYPE_TX_BD_MP_CMD
3528 	#define TX_BD_MP_CMD_FLAGS_MASK       UINT32_C(0xffc0)
3529 	#define TX_BD_MP_CMD_FLAGS_SFT        6
3530 	/*  */
3531 	#define TX_BD_MP_CMD_FLAGS_UNUSED_MASK UINT32_C(0xc0)
3532 	#define TX_BD_MP_CMD_FLAGS_UNUSED_SFT  6
3533 	/*
3534 	 * This value indicates the number of 16B BD locations (slots)
3535 	 * consumed in the ring by this mid-path command BD, including the
3536 	 * BD header and the command field.
3537 	 */
3538 	#define TX_BD_MP_CMD_FLAGS_BD_CNT_MASK UINT32_C(0x1f00)
3539 	#define TX_BD_MP_CMD_FLAGS_BD_CNT_SFT  8
3540 	/*
3541 	 * This value defines the length of command field in bytes. The maximum
3542 	 * value shall be 496.
3543 	 */
3544 	uint16_t	len;
3545 	/*
3546 	 * The opaque data field is pass through to the completion and can be
3547 	 * used for any data that the driver wants to associate with this
3548 	 * Tx mid-path command.
3549 	 */
3550 	uint32_t	opaque;
3551 	uint64_t	unused1;
3552 } __rte_packed_end;
3553 
3554 /* tx_bd_presync_cmd (size:128b/16B) */
3555 struct __rte_packed_begin tx_bd_presync_cmd {
3556 	/* Unless otherwise stated, sub-fields of this field are always valid. */
3557 	uint16_t	flags_type;
3558 	/* This value identifies the type of buffer descriptor. */
3559 	#define TX_BD_PRESYNC_CMD_TYPE_MASK             UINT32_C(0x3f)
3560 	#define TX_BD_PRESYNC_CMD_TYPE_SFT              0
3561 	/*
3562 	 * Indicates that this BD is used to issue a cryptographic pre-
3563 	 * sync command through the fast path and destined for TCE.
3564 	 */
3565 	#define TX_BD_PRESYNC_CMD_TYPE_TX_BD_PRESYNC_CMD  UINT32_C(0x9)
3566 	#define TX_BD_PRESYNC_CMD_TYPE_LAST \
3567 		TX_BD_PRESYNC_CMD_TYPE_TX_BD_PRESYNC_CMD
3568 	#define TX_BD_PRESYNC_CMD_FLAGS_MASK            UINT32_C(0xffc0)
3569 	#define TX_BD_PRESYNC_CMD_FLAGS_SFT             6
3570 	/*  */
3571 	#define TX_BD_PRESYNC_CMD_FLAGS_UNUSED_MASK      UINT32_C(0xc0)
3572 	#define TX_BD_PRESYNC_CMD_FLAGS_UNUSED_SFT       6
3573 	/*
3574 	 * This value indicates the number of 16B BD locations (slots)
3575 	 * consumed in the ring by this pre-sync command BD, including the
3576 	 * BD header and the command field.
3577 	 */
3578 	#define TX_BD_PRESYNC_CMD_FLAGS_BD_CNT_MASK      UINT32_C(0x1f00)
3579 	#define TX_BD_PRESYNC_CMD_FLAGS_BD_CNT_SFT       8
3580 	/*
3581 	 * This value defines the length of command field in bytes. The maximum
3582 	 * value shall be 496.
3583 	 */
3584 	uint16_t	len;
3585 	/*
3586 	 * The opaque data field is pass through to TCE and can be used for
3587 	 * debug.
3588 	 */
3589 	uint32_t	opaque;
3590 	/*
3591 	 * This field is the Crypto Context ID to which the retransmit packet is
3592 	 * applied. The KID references the context fields used by the
3593 	 * associated kTLS offloaded connection.
3594 	 */
3595 	uint32_t	kid;
3596 	/*
3597 	 * The KID value of all-ones is reserved for non-KTLS packets, which
3598 	 * only implies that this value must not be used when filling this
3599 	 * field for crypto packets.
3600 	 */
3601 	#define TX_BD_PRESYNC_CMD_KID_VAL_MASK UINT32_C(0xfffff)
3602 	#define TX_BD_PRESYNC_CMD_KID_VAL_SFT 0
3603 	uint32_t	unused_1;
3604 } __rte_packed_end;
3605 
3606 /*
3607  * This structure is used to send additional information for transmitting
3608  * packets using timed transmit scheduling. It must only to be applied as
3609  * the second BD of a BD chain that represents a packet. Any subsequent
3610  * BDs will follow the timed transmit BD.
3611  */
3612 /* tx_bd_timedtx (size:128b/16B) */
3613 struct __rte_packed_begin tx_bd_timedtx {
3614 	uint16_t	flags_type;
3615 	/* This value identifies the type of buffer descriptor. */
3616 	#define TX_BD_TIMEDTX_TYPE_MASK           UINT32_C(0x3f)
3617 	#define TX_BD_TIMEDTX_TYPE_SFT            0
3618 	/*
3619 	 * Indicates a timed transmit BD. This is a 16b BD that is inserted
3620 	 * into a packet BD chain immediately after the first BD. It is used
3621 	 * to control the flow in a timed transmit operation.
3622 	 */
3623 	#define TX_BD_TIMEDTX_TYPE_TX_BD_TIMEDTX    UINT32_C(0xa)
3624 	#define TX_BD_TIMEDTX_TYPE_LAST \
3625 		TX_BD_TIMEDTX_TYPE_TX_BD_TIMEDTX
3626 	/* Unless otherwise stated, sub-fields of this field are always valid. */
3627 	#define TX_BD_TIMEDTX_FLAGS_MASK          UINT32_C(0xffc0)
3628 	#define TX_BD_TIMEDTX_FLAGS_SFT           6
3629 	/*
3630 	 * This value identifies the kind of buffer timed transmit mode that
3631 	 * is to be enabled for the packet.
3632 	 */
3633 	#define TX_BD_TIMEDTX_FLAGS_KIND_MASK      UINT32_C(0x1c0)
3634 	#define TX_BD_TIMEDTX_FLAGS_KIND_SFT       6
3635 	/*
3636 	 * This timed transmit mode indicates that the packet will be
3637 	 * scheduled and send immediately (or as soon as possible), once
3638 	 * it is scheduled in the transmitter.
3639 	 * Note: This mode is similar to regular (non-timed transmit)
3640 	 * operation. Its main purpose is to cancel pace mode timed
3641 	 * transmit.
3642 	 */
3643 	#define TX_BD_TIMEDTX_FLAGS_KIND_ASAP        (UINT32_C(0x0) << 6)
3644 	/*
3645 	 * This timed transmit mode is used to schedule transmission of
3646 	 * the packet no earlier than the time given in the tx_time
3647 	 * field of the BD.
3648 	 * Note: In case subsequent packets don't include a timed transmit
3649 	 * BD, they will be scheduled subsequently for transmission
3650 	 * without any timed transmit constraint.
3651 	 */
3652 	#define TX_BD_TIMEDTX_FLAGS_KIND_SO_TXTIME   (UINT32_C(0x1) << 6)
3653 	/*
3654 	 * This timed transmit mode is used to enable rate control for the
3655 	 * flow (QP) at a rate as defined by the rate field of this BD.
3656 	 * Note: In case subsequent, adjacent packets on the same flow
3657 	 * don't include a timed transmit BD, they will continue to be
3658 	 * paced by the transmitter at the same rate as given in this BD.
3659 	 */
3660 	#define TX_BD_TIMEDTX_FLAGS_KIND_PACE        (UINT32_C(0x2) << 6)
3661 	#define TX_BD_TIMEDTX_FLAGS_KIND_LAST \
3662 		TX_BD_TIMEDTX_FLAGS_KIND_PACE
3663 	/*
3664 	 * This field exists in all Tx BDs. It doesn't apply to this particular
3665 	 * BD type since the BD never represents an SGL or inline data; i.e. it
3666 	 * is only a command. This field must be zero.
3667 	 */
3668 	uint16_t	len;
3669 	/*
3670 	 * This field represents the rate of the flow (QP) in terms of KB/s.
3671 	 * This applies to pace mode timed transmit.
3672 	 */
3673 	uint32_t	rate;
3674 	/*
3675 	 * Applying this rate to a QP will result in this and all subsequent
3676 	 * packets of the flow being paced at the given rate, until such time
3677 	 * that the timed transmit mode is either changed or the rate is
3678 	 * updated in a future packet on the flow.
3679 	 * This field is applicable only if flags.kind is pace.
3680 	 */
3681 	#define TX_BD_TIMEDTX_RATE_VAL_MASK UINT32_C(0x1ffffff)
3682 	#define TX_BD_TIMEDTX_RATE_VAL_SFT 0
3683 	/*
3684 	 * This field represents the nano-second time to transmit the
3685 	 * corresponding packet using SO_TXTIME mode of timed transmit.
3686 	 * This field is applicable only if flags.kind is so_txtime.
3687 	 */
3688 	uint64_t	tx_time;
3689 } __rte_packed_end;
3690 
3691 /* rx_prod_pkt_bd (size:128b/16B) */
3692 struct __rte_packed_begin rx_prod_pkt_bd {
3693 	/* This value identifies the type of buffer descriptor. */
3694 	uint16_t	flags_type;
3695 	/* This value identifies the type of buffer descriptor. */
3696 	#define RX_PROD_PKT_BD_TYPE_MASK         UINT32_C(0x3f)
3697 	#define RX_PROD_PKT_BD_TYPE_SFT          0
3698 	/*
3699 	 * Indicates that this BD is 16B long and is an RX Producer
3700 	 * (i.e. empty) buffer descriptor.
3701 	 */
3702 	#define RX_PROD_PKT_BD_TYPE_RX_PROD_PKT    UINT32_C(0x4)
3703 	#define RX_PROD_PKT_BD_TYPE_LAST \
3704 		RX_PROD_PKT_BD_TYPE_RX_PROD_PKT
3705 	#define RX_PROD_PKT_BD_FLAGS_MASK        UINT32_C(0xffc0)
3706 	#define RX_PROD_PKT_BD_FLAGS_SFT         6
3707 	/*
3708 	 * If set to 1, the packet will be placed at the address plus
3709 	 * 2B. The 2 Bytes of padding will be written as zero.
3710 	 */
3711 	#define RX_PROD_PKT_BD_FLAGS_SOP_PAD      UINT32_C(0x40)
3712 	/*
3713 	 * If set to 1, the packet write will be padded out to the
3714 	 * nearest cache-line with zero value padding.
3715 	 */
3716 	#define RX_PROD_PKT_BD_FLAGS_EOP_PAD      UINT32_C(0x80)
3717 	/*
3718 	 * This field has been deprecated. There can be no additional
3719 	 * BDs for this packet from this ring.
3720 	 *
3721 	 * Old definition:
3722 	 * This value is the number of additional buffers in the ring that
3723 	 * describe the buffer space to be consumed for this packet.
3724 	 * If the value is zero, then the packet must fit within the
3725 	 * space described by this BD. If this value is 1 or more, it
3726 	 * indicates how many additional "buffer" BDs are in the ring
3727 	 * immediately following this BD to be used for the same
3728 	 * network packet. Even if the packet to be placed does not need
3729 	 * all the additional buffers, they will be consumed anyway.
3730 	 */
3731 	#define RX_PROD_PKT_BD_FLAGS_BUFFERS_MASK UINT32_C(0x300)
3732 	#define RX_PROD_PKT_BD_FLAGS_BUFFERS_SFT  8
3733 	/*
3734 	 * This is the length in Bytes of the host physical buffer where
3735 	 * data for the packet may be placed in host memory.
3736 	 */
3737 	uint16_t	len;
3738 	/*
3739 	 * The opaque data field is pass through to the completion and can be
3740 	 * used for any data that the driver wants to associate with this
3741 	 * receive buffer set.
3742 	 */
3743 	uint32_t	opaque;
3744 	/*
3745 	 * This is the host physical address where data for the packet may
3746 	 * be placed in host memory.
3747 	 */
3748 	uint64_t	address;
3749 } __rte_packed_end;
3750 
3751 /* rx_prod_bfr_bd (size:128b/16B) */
3752 struct __rte_packed_begin rx_prod_bfr_bd {
3753 	/* This value identifies the type of buffer descriptor. */
3754 	uint16_t	flags_type;
3755 	/* This value identifies the type of buffer descriptor. */
3756 	#define RX_PROD_BFR_BD_TYPE_MASK       UINT32_C(0x3f)
3757 	#define RX_PROD_BFR_BD_TYPE_SFT        0
3758 	/*
3759 	 * Indicates that this BD is 16B long and is an RX
3760 	 * Producer Buffer BD.
3761 	 */
3762 	#define RX_PROD_BFR_BD_TYPE_RX_PROD_BFR  UINT32_C(0x5)
3763 	#define RX_PROD_BFR_BD_TYPE_LAST        RX_PROD_BFR_BD_TYPE_RX_PROD_BFR
3764 	#define RX_PROD_BFR_BD_FLAGS_MASK      UINT32_C(0xffc0)
3765 	#define RX_PROD_BFR_BD_FLAGS_SFT       6
3766 	/*
3767 	 * This is the length in Bytes of the host physical buffer where
3768 	 * data for the packet may be placed in host memory.
3769 	 */
3770 	uint16_t	len;
3771 	/* This field is not used. */
3772 	uint32_t	opaque;
3773 	/*
3774 	 * This is the host physical address where data for the packet may
3775 	 * be placed in host memory.
3776 	 */
3777 	uint64_t	address;
3778 } __rte_packed_end;
3779 
3780 /* rx_prod_agg_bd (size:128b/16B) */
3781 struct __rte_packed_begin rx_prod_agg_bd {
3782 	/* This value identifies the type of buffer descriptor. */
3783 	uint16_t	flags_type;
3784 	/* This value identifies the type of buffer descriptor. */
3785 	#define RX_PROD_AGG_BD_TYPE_MASK         UINT32_C(0x3f)
3786 	#define RX_PROD_AGG_BD_TYPE_SFT          0
3787 	/*
3788 	 * Indicates that this BD is 16B long and is an
3789 	 * RX Producer Assembly Buffer Descriptor.
3790 	 */
3791 	#define RX_PROD_AGG_BD_TYPE_RX_PROD_AGG    UINT32_C(0x6)
3792 	#define RX_PROD_AGG_BD_TYPE_LAST \
3793 		RX_PROD_AGG_BD_TYPE_RX_PROD_AGG
3794 	#define RX_PROD_AGG_BD_FLAGS_MASK        UINT32_C(0xffc0)
3795 	#define RX_PROD_AGG_BD_FLAGS_SFT         6
3796 	/*
3797 	 * If set to 1, the packet write will be padded out to the
3798 	 * nearest cache-line with zero value padding.
3799 	 */
3800 	#define RX_PROD_AGG_BD_FLAGS_EOP_PAD      UINT32_C(0x40)
3801 	/*
3802 	 * This is the length in Bytes of the host physical buffer where
3803 	 * data for the packet may be placed in host memory.
3804 	 */
3805 	uint16_t	len;
3806 	/*
3807 	 * The opaque data field is pass through to the completion and can be
3808 	 * used for any data that the driver wants to associate with this
3809 	 * receive assembly buffer.
3810 	 */
3811 	uint32_t	opaque;
3812 	/*
3813 	 * This is the host physical address where data for the packet may
3814 	 * be placed in host memory.
3815 	 */
3816 	uint64_t	address;
3817 } __rte_packed_end;
3818 
3819 /* cfa_cmpls_cmp_data_msg (size:128b/16B) */
3820 struct __rte_packed_begin cfa_cmpls_cmp_data_msg {
3821 	uint32_t	mp_client_dma_length_opcode_status_type;
3822 	/*
3823 	 * This field represents the Mid-Path client that generated the
3824 	 * completion.
3825 	 */
3826 	#define CFA_CMPLS_CMP_DATA_MSG_TYPE_MASK                UINT32_C(0x3f)
3827 	#define CFA_CMPLS_CMP_DATA_MSG_TYPE_SFT                 0
3828 	/* Mid Path Short Completion with length = 16B. */
3829 	#define CFA_CMPLS_CMP_DATA_MSG_TYPE_MID_PATH_SHORT \
3830 		UINT32_C(0x1e)
3831 	#define CFA_CMPLS_CMP_DATA_MSG_TYPE_LAST \
3832 		CFA_CMPLS_CMP_DATA_MSG_TYPE_MID_PATH_SHORT
3833 	/* This value indicates the status for the command. */
3834 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_MASK              UINT32_C(0x3c0)
3835 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_SFT               6
3836 	/* Completed without error. */
3837 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_OK \
3838 		(UINT32_C(0x0) << 6)
3839 	/* Indicates an unsupported CFA opcode in the command. */
3840 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_UNSPRT_ERR \
3841 		(UINT32_C(0x1) << 6)
3842 	/*
3843 	 * Indicates a CFA command formatting error. This error can occur on
3844 	 * any of the supported CFA commands.
3845 	 */
3846 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_FMT_ERR \
3847 		(UINT32_C(0x2) << 6)
3848 	/*
3849 	 * Indicates an SVIF-Table scope error. This error can occur on any
3850 	 * of the supported CFA commands.
3851 	 */
3852 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_SCOPE_ERR \
3853 		(UINT32_C(0x3) << 6)
3854 	/*
3855 	 * Indicates that the table_index is either outside of the
3856 	 * table_scope range set by its EM_SIZE or, for EM Insert, it is in
3857 	 * the static bucket range. This error can occur on EM Insert
3858 	 * commands. It can also occur on Read, Read Clear, Write, and
3859 	 * Invalidate commands if the table_type is EM.
3860 	 */
3861 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_ADDR_ERR \
3862 		(UINT32_C(0x4) << 6)
3863 	/*
3864 	 * Cache operation responded with an error. This error can occur on
3865 	 * Read, Read Clear, Write, EM Insert, and EM Delete commands.
3866 	 */
3867 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_CACHE_ERR \
3868 		(UINT32_C(0x5) << 6)
3869 	/*
3870 	 * Indicates failure on EM Insert or EM Delete Command. Hash index
3871 	 * and hash msb are returned in table_index and hash_msb fields.
3872 	 * Dma_length is set to 1 if the bucket is also returned (as dma
3873 	 * data).
3874 	 */
3875 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_EM_FAIL \
3876 		(UINT32_C(0x6) << 6)
3877 	/*
3878 	 * Indicates no notifications were available on an Event Collection
3879 	 * command.
3880 	 */
3881 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_EVENT_COLLECT_FAIL \
3882 		(UINT32_C(0x7) << 6)
3883 	#define CFA_CMPLS_CMP_DATA_MSG_STATUS_LAST \
3884 		CFA_CMPLS_CMP_DATA_MSG_STATUS_EVENT_COLLECT_FAIL
3885 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED0_MASK             UINT32_C(0xc00)
3886 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED0_SFT              10
3887 	/* This is the opcode from the command. */
3888 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_MASK \
3889 		UINT32_C(0xff000)
3890 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_SFT               12
3891 	/*
3892 	 * This is read command. From 32 to 128B can be read from a table
3893 	 * using this command.
3894 	 */
3895 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_READ \
3896 		(UINT32_C(0x0) << 12)
3897 	/*
3898 	 * This is write command. From 32 to 128B can be written to a table
3899 	 * using this command.
3900 	 */
3901 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_WRITE \
3902 		(UINT32_C(0x1) << 12)
3903 	/*
3904 	 * This is read-clear command. 32B can be read from a table and a 16b
3905 	 * mask can be used to clear specific 16b units after the read as an
3906 	 * atomic operation.
3907 	 */
3908 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_READ_CLR \
3909 		(UINT32_C(0x2) << 12)
3910 	/*
3911 	 * An exact match table insert will be attempted into the table. If
3912 	 * there is a free location in the bucket, the payload will be
3913 	 * written to the bucket.
3914 	 */
3915 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_EM_INSERT \
3916 		(UINT32_C(0x3) << 12)
3917 	/* An exact match table delete will be attempted. */
3918 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_EM_DELETE \
3919 		(UINT32_C(0x4) << 12)
3920 	/*
3921 	 * The specified table area will be invalidated. If it is needed
3922 	 * again, it will be read from the backing store.
3923 	 */
3924 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_INVALIDATE \
3925 		(UINT32_C(0x5) << 12)
3926 	/* Reads notification messages from the Host Notification Queue. */
3927 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_EVENT_COLLECT \
3928 		(UINT32_C(0x6) << 12)
3929 	#define CFA_CMPLS_CMP_DATA_MSG_OPCODE_LAST \
3930 		CFA_CMPLS_CMP_DATA_MSG_OPCODE_EVENT_COLLECT
3931 	/*
3932 	 * This field indicates the length of the DMA that accompanies the
3933 	 * completion. Specified in units of DWords (32b). Valid values are
3934 	 * between 0 and 128. A value of zero indicates that there is no DMA
3935 	 * that accompanies the completion.
3936 	 */
3937 	#define CFA_CMPLS_CMP_DATA_MSG_DMA_LENGTH_MASK \
3938 		UINT32_C(0xff00000)
3939 	#define CFA_CMPLS_CMP_DATA_MSG_DMA_LENGTH_SFT           20
3940 	/*
3941 	 * This field represents the Mid-Path client that generated the
3942 	 * completion.
3943 	 */
3944 	#define CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_MASK \
3945 		UINT32_C(0xf0000000)
3946 	#define CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_SFT            28
3947 	/* TX configurable flow processing block. */
3948 	#define CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_TE_CFA \
3949 		(UINT32_C(0x2) << 28)
3950 	/* RX configurable flow processing block. */
3951 	#define CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_RE_CFA \
3952 		(UINT32_C(0x3) << 28)
3953 	#define CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_LAST \
3954 		CFA_CMPLS_CMP_DATA_MSG_MP_CLIENT_RE_CFA
3955 	/*
3956 	 * This is a copy of the opaque field from the mid path BD of this
3957 	 * command.
3958 	 */
3959 	uint32_t	opaque;
3960 	uint16_t	hash_msb_v;
3961 	/*
3962 	 * This value is written by the NIC such that it will be different for
3963 	 * each pass through the completion queue. The even passes will
3964 	 * write 1. The odd passes will write 0.
3965 	 */
3966 	#define CFA_CMPLS_CMP_DATA_MSG_V            UINT32_C(0x1)
3967 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED1_MASK UINT32_C(0xe)
3968 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED1_SFT  1
3969 	/*
3970 	 * This is the upper 12b of the hash, returned on Exact Match
3971 	 * Insertion/Deletion Commands.
3972 	 */
3973 	#define CFA_CMPLS_CMP_DATA_MSG_HASH_MSB_MASK UINT32_C(0xfff0)
3974 	#define CFA_CMPLS_CMP_DATA_MSG_HASH_MSB_SFT 4
3975 	/* This is the table type from the command. */
3976 	uint8_t	table_type;
3977 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED2_MASK     UINT32_C(0xf)
3978 	#define CFA_CMPLS_CMP_DATA_MSG_UNUSED2_SFT      0
3979 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_MASK  UINT32_C(0xf0)
3980 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_SFT   4
3981 	/* This command acts on the action table of the specified scope. */
3982 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_ACTION  (UINT32_C(0x0) << 4)
3983 	/* This command acts on the exact match table of the specified scope. */
3984 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_EM      (UINT32_C(0x1) << 4)
3985 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_LAST \
3986 		CFA_CMPLS_CMP_DATA_MSG_TABLE_TYPE_EM
3987 	uint8_t	table_scope;
3988 	/* This is the table scope from the command. */
3989 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_SCOPE_MASK UINT32_C(0x1f)
3990 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_SCOPE_SFT 0
3991 	uint32_t	table_index;
3992 	/*
3993 	 * This is the table index from the command (if it exists). However, if
3994 	 * an Exact Match Insertion/Deletion command failed, then this is the
3995 	 * table index of the calculated static hash bucket.
3996 	 */
3997 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_INDEX_MASK UINT32_C(0x3ffffff)
3998 	#define CFA_CMPLS_CMP_DATA_MSG_TABLE_INDEX_SFT 0
3999 } __rte_packed_end;
4000 
4001 /* CFA Mid-Path 32B DMA Message */
4002 /* cfa_dma32b_data_msg (size:256b/32B) */
4003 struct __rte_packed_begin cfa_dma32b_data_msg {
4004 	/* DMA data value. */
4005 	uint32_t	dta[8];
4006 } __rte_packed_end;
4007 
4008 /* CFA Mid-Path 64B DMA Message */
4009 /* cfa_dma64b_data_msg (size:512b/64B) */
4010 struct __rte_packed_begin cfa_dma64b_data_msg {
4011 	/* DMA data value. */
4012 	uint32_t	dta[16];
4013 } __rte_packed_end;
4014 
4015 /* CFA Mid-Path 96B DMA Message */
4016 /* cfa_dma96b_data_msg (size:768b/96B) */
4017 struct __rte_packed_begin cfa_dma96b_data_msg {
4018 	/* DMA data value. */
4019 	uint32_t	dta[24];
4020 } __rte_packed_end;
4021 
4022 /* CFA Mid-Path 128B DMA Message */
4023 /* cfa_dma128b_data_msg (size:1024b/128B) */
4024 struct __rte_packed_begin cfa_dma128b_data_msg {
4025 	/* DMA data value. */
4026 	uint32_t	dta[32];
4027 } __rte_packed_end;
4028 
4029 /* ce_cmpls_cmp_data_msg (size:128b/16B) */
4030 struct __rte_packed_begin ce_cmpls_cmp_data_msg {
4031 	uint16_t	client_subtype_type;
4032 	/*
4033 	 * This field indicates the exact type of the completion. By
4034 	 * convention, the LSB identifies the length of the record in 16B
4035 	 * units. Even values indicate 16B records. Odd values indicate 32B
4036 	 * records.
4037 	 */
4038 	#define CE_CMPLS_CMP_DATA_MSG_TYPE_MASK          UINT32_C(0x3f)
4039 	#define CE_CMPLS_CMP_DATA_MSG_TYPE_SFT           0
4040 	/* Completion of a Mid Path Command. Length = 16B */
4041 	#define CE_CMPLS_CMP_DATA_MSG_TYPE_MID_PATH_SHORT  UINT32_C(0x1e)
4042 	#define CE_CMPLS_CMP_DATA_MSG_TYPE_LAST \
4043 		CE_CMPLS_CMP_DATA_MSG_TYPE_MID_PATH_SHORT
4044 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED0_MASK       UINT32_C(0xc0)
4045 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED0_SFT        6
4046 	/*
4047 	 * This value indicates the CE sub-type operation that is being
4048 	 * completed.
4049 	 */
4050 	#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_MASK       UINT32_C(0xf00)
4051 	#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_SFT        8
4052 	/* Completion Response for a Solicited Command. */
4053 	#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_SOLICITED    (UINT32_C(0x0) << 8)
4054 	/* Error Completion (Unsolicited). */
4055 	#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_ERR          (UINT32_C(0x1) << 8)
4056 	/* Re-Sync Completion (Unsolicited) */
4057 	#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_RESYNC       (UINT32_C(0x2) << 8)
4058 	#define CE_CMPLS_CMP_DATA_MSG_SUBTYPE_LAST \
4059 		CE_CMPLS_CMP_DATA_MSG_SUBTYPE_RESYNC
4060 	/*
4061 	 * This field represents the Mid-Path client that generated the
4062 	 * completion.
4063 	 */
4064 	#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_MASK     UINT32_C(0xf000)
4065 	#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_SFT      12
4066 	/* TX crypto engine block. */
4067 	#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_TCE \
4068 		(UINT32_C(0x0) << 12)
4069 	/* RX crypto engine block. */
4070 	#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_RCE \
4071 		(UINT32_C(0x1) << 12)
4072 	#define CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_LAST \
4073 		CE_CMPLS_CMP_DATA_MSG_MP_CLIENT_RCE
4074 	uint16_t	status;
4075 	/* This value indicates the status for the command. */
4076 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_MASK       UINT32_C(0xf)
4077 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_SFT        0
4078 	/* Completed without error. */
4079 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_OK           UINT32_C(0x0)
4080 	/* CFCK load error. */
4081 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_CTX_LD_ERR   UINT32_C(0x1)
4082 	/* FID check error. */
4083 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_FID_CHK_ERR  UINT32_C(0x2)
4084 	/* Context kind / MP version mismatch error. */
4085 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_CTX_VER_ERR  UINT32_C(0x3)
4086 	/* Unsupported Destination Connection ID Length. */
4087 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_DST_ID_ERR   UINT32_C(0x4)
4088 	/*
4089 	 * Invalid MP Command [anything other than ADD or DELETE
4090 	 * triggers this for QUIC].
4091 	 */
4092 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_MP_CMD_ERR   UINT32_C(0x5)
4093 	#define CE_CMPLS_CMP_DATA_MSG_STATUS_LAST \
4094 		CE_CMPLS_CMP_DATA_MSG_STATUS_MP_CMD_ERR
4095 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED1_MASK      UINT32_C(0xfff0)
4096 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED1_SFT       4
4097 	/*
4098 	 * This is a copy of the opaque field from the mid path BD of this
4099 	 * command.
4100 	 */
4101 	uint32_t	opaque;
4102 	uint32_t	v;
4103 	/*
4104 	 * This value is written by the NIC such that it will be different
4105 	 * for each pass through the completion queue. The even passes will
4106 	 * write 1. The odd passes will write 0.
4107 	 */
4108 	#define CE_CMPLS_CMP_DATA_MSG_V           UINT32_C(0x1)
4109 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED2_MASK UINT32_C(0xfffffffe)
4110 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED2_SFT 1
4111 	uint32_t	kid;
4112 	/*
4113 	 * This field is the Crypto Context ID. The KID is used to store
4114 	 * information used by the associated kTLS offloaded connection.
4115 	 */
4116 	#define CE_CMPLS_CMP_DATA_MSG_KID_MASK    UINT32_C(0xfffff)
4117 	#define CE_CMPLS_CMP_DATA_MSG_KID_SFT     0
4118 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED3_MASK UINT32_C(0xfff00000)
4119 	#define CE_CMPLS_CMP_DATA_MSG_UNUSED3_SFT 20
4120 } __rte_packed_end;
4121 
4122 /* cmpl_base (size:128b/16B) */
4123 struct __rte_packed_begin cmpl_base {
4124 	uint16_t	type;
4125 	/*
4126 	 * This field indicates the exact type of the completion.
4127 	 * By convention, the LSB identifies the length of the
4128 	 * record in 16B units. Even values indicate 16B
4129 	 * records. Odd values indicate 32B
4130 	 * records.
4131 	 */
4132 	#define CMPL_BASE_TYPE_MASK            UINT32_C(0x3f)
4133 	#define CMPL_BASE_TYPE_SFT             0
4134 	/*
4135 	 * TX L2 completion:
4136 	 * Completion of TX packet. Length = 16B
4137 	 */
4138 	#define CMPL_BASE_TYPE_TX_L2             UINT32_C(0x0)
4139 	/*
4140 	 * NO-OP completion:
4141 	 * Completion of NO-OP. Length = 16B
4142 	 */
4143 	#define CMPL_BASE_TYPE_NO_OP             UINT32_C(0x1)
4144 	/*
4145 	 * TX L2 coalesced completion:
4146 	 * Completion of coalesced TX packet. Length = 16B
4147 	 */
4148 	#define CMPL_BASE_TYPE_TX_L2_COAL        UINT32_C(0x2)
4149 	/*
4150 	 * TX L2 Packet Timestamp completion:
4151 	 * Completion of an L2 Packet Timestamp Packet. Length = 16B
4152 	 */
4153 	#define CMPL_BASE_TYPE_TX_L2_PKT_TS      UINT32_C(0x4)
4154 	/*
4155 	 * RX L2 TPA Start V2 Completion:
4156 	 * Completion of and L2 RX packet. Length = 32B
4157 	 * This is the new version of the RX_TPA_START completion used
4158 	 * in SR2 and later chips.
4159 	 */
4160 	#define CMPL_BASE_TYPE_RX_TPA_START_V2   UINT32_C(0xd)
4161 	/*
4162 	 * RX L2 V2 completion:
4163 	 * Completion of and L2 RX packet. Length = 32B
4164 	 * This is the new version of the RX_L2 completion used in SR2
4165 	 * and later chips.
4166 	 */
4167 	#define CMPL_BASE_TYPE_RX_L2_V2          UINT32_C(0xf)
4168 	/*
4169 	 * RX L2 completion:
4170 	 * This is the compressed version of Rx Completion for performance
4171 	 * applications. Length = 16B
4172 	 */
4173 	#define CMPL_BASE_TYPE_RX_L2_COMPRESS    UINT32_C(0x10)
4174 	/*
4175 	 * RX L2 completion:
4176 	 * Completion of and L2 RX packet. Length = 32B
4177 	 */
4178 	#define CMPL_BASE_TYPE_RX_L2             UINT32_C(0x11)
4179 	/*
4180 	 * RX Aggregation Buffer completion:
4181 	 * Completion of an L2 aggregation buffer in support of
4182 	 * TPA, HDS, or Jumbo packet completion. Length = 16B
4183 	 */
4184 	#define CMPL_BASE_TYPE_RX_AGG            UINT32_C(0x12)
4185 	/*
4186 	 * RX L2 TPA Start Completion:
4187 	 * Completion at the beginning of a TPA operation.
4188 	 * Length = 32B
4189 	 */
4190 	#define CMPL_BASE_TYPE_RX_TPA_START      UINT32_C(0x13)
4191 	/*
4192 	 * RX L2 TPA End Completion:
4193 	 * Completion at the end of a TPA operation.
4194 	 * Length = 32B
4195 	 */
4196 	#define CMPL_BASE_TYPE_RX_TPA_END        UINT32_C(0x15)
4197 	/*
4198 	 * RX TPA Aggregation Buffer Completion:
4199 	 * Completion of an L2 aggregation buffer in support of TPA packet
4200 	 * completion.
4201 	 * Length = 16B
4202 	 */
4203 	#define CMPL_BASE_TYPE_RX_TPA_AGG        UINT32_C(0x16)
4204 	/*
4205 	 * RX L2 completion: Completion of and L2 RX packet.
4206 	 * Length = 32B
4207 	 */
4208 	#define CMPL_BASE_TYPE_RX_L2_V3          UINT32_C(0x17)
4209 	/*
4210 	 * RX L2 TPA Start completion: Completion at the beginning of a TPA
4211 	 * operation.
4212 	 * Length = 32B
4213 	 */
4214 	#define CMPL_BASE_TYPE_RX_TPA_START_V3   UINT32_C(0x19)
4215 	/*
4216 	 * Statistics Ejection Completion:
4217 	 * Completion of statistics data ejection buffer.
4218 	 * Length = 16B
4219 	 */
4220 	#define CMPL_BASE_TYPE_STAT_EJECT        UINT32_C(0x1a)
4221 	/*
4222 	 * VEE Flush Completion:
4223 	 * This completion is inserted manually by
4224 	 * the Primate and processed by the VEE hardware to ensure that
4225 	 * all completions on a VEE function have been processed by the
4226 	 * VEE hardware before FLR process is completed.
4227 	 */
4228 	#define CMPL_BASE_TYPE_VEE_FLUSH         UINT32_C(0x1c)
4229 	/*
4230 	 * Mid Path Short Completion :
4231 	 * Completion of a Mid Path Command. Length = 16B
4232 	 */
4233 	#define CMPL_BASE_TYPE_MID_PATH_SHORT    UINT32_C(0x1e)
4234 	/*
4235 	 * Mid Path Long Completion :
4236 	 * Completion of a Mid Path Command. Length = 32B
4237 	 */
4238 	#define CMPL_BASE_TYPE_MID_PATH_LONG     UINT32_C(0x1f)
4239 	/*
4240 	 * HWRM Command Completion:
4241 	 * Completion of an HWRM command.
4242 	 */
4243 	#define CMPL_BASE_TYPE_HWRM_DONE         UINT32_C(0x20)
4244 	/* Forwarded HWRM Request */
4245 	#define CMPL_BASE_TYPE_HWRM_FWD_REQ      UINT32_C(0x22)
4246 	/* Forwarded HWRM Response */
4247 	#define CMPL_BASE_TYPE_HWRM_FWD_RESP     UINT32_C(0x24)
4248 	/* HWRM Asynchronous Event Information */
4249 	#define CMPL_BASE_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
4250 	/* CQ Notification */
4251 	#define CMPL_BASE_TYPE_CQ_NOTIFICATION   UINT32_C(0x30)
4252 	/* SRQ Threshold Event */
4253 	#define CMPL_BASE_TYPE_SRQ_EVENT         UINT32_C(0x32)
4254 	/* DBQ Threshold Event */
4255 	#define CMPL_BASE_TYPE_DBQ_EVENT         UINT32_C(0x34)
4256 	/* QP Async Notification */
4257 	#define CMPL_BASE_TYPE_QP_EVENT          UINT32_C(0x38)
4258 	/* Function Async Notification */
4259 	#define CMPL_BASE_TYPE_FUNC_EVENT        UINT32_C(0x3a)
4260 	#define CMPL_BASE_TYPE_LAST             CMPL_BASE_TYPE_FUNC_EVENT
4261 	/* info1 is 16 b */
4262 	uint16_t	info1;
4263 	/* info2 is 32 b */
4264 	uint32_t	info2;
4265 	/*
4266 	 * This value is written by the NIC such that it will be different
4267 	 * for each pass through the completion queue. The even passes
4268 	 * will write 1. The odd passes will write 0.
4269 	 */
4270 	uint32_t	info3_v;
4271 	#define CMPL_BASE_V         UINT32_C(0x1)
4272 	#define CMPL_BASE_INFO3_MASK UINT32_C(0xfffffffe)
4273 	#define CMPL_BASE_INFO3_SFT 1
4274 	/* info4 is 32 b */
4275 	uint32_t	info4;
4276 } __rte_packed_end;
4277 
4278 /* tx_cmpl (size:128b/16B) */
4279 struct __rte_packed_begin tx_cmpl {
4280 	uint16_t	flags_type;
4281 	/*
4282 	 * This field indicates the exact type of the completion.
4283 	 * By convention, the LSB identifies the length of the
4284 	 * record in 16B units. Even values indicate 16B
4285 	 * records. Odd values indicate 32B
4286 	 * records.
4287 	 */
4288 	#define TX_CMPL_TYPE_MASK       UINT32_C(0x3f)
4289 	#define TX_CMPL_TYPE_SFT        0
4290 	/*
4291 	 * TX L2 completion:
4292 	 * Completion of TX packet. Length = 16B
4293 	 */
4294 	#define TX_CMPL_TYPE_TX_L2        UINT32_C(0x0)
4295 	#define TX_CMPL_TYPE_LAST        TX_CMPL_TYPE_TX_L2
4296 	#define TX_CMPL_FLAGS_MASK      UINT32_C(0xffc0)
4297 	#define TX_CMPL_FLAGS_SFT       6
4298 	/*
4299 	 * When this bit is '1', it indicates a packet that has an
4300 	 * error of some type. Type of error is indicated in
4301 	 * error_flags.
4302 	 */
4303 	#define TX_CMPL_FLAGS_ERROR      UINT32_C(0x40)
4304 	/*
4305 	 * When this bit is '1', it indicates that the packet completed
4306 	 * was transmitted using the push acceleration data provided
4307 	 * by the driver. When this bit is '0', it indicates that the
4308 	 * packet had not push acceleration data written or was executed
4309 	 * as a normal packet even though push data was provided.
4310 	 */
4311 	#define TX_CMPL_FLAGS_PUSH       UINT32_C(0x80)
4312 	/* unused1 is 16 b */
4313 	uint16_t	unused_0;
4314 	/*
4315 	 * This is a copy of the opaque field from the first TX BD of this
4316 	 * transmitted packet. Note that, if the packet was described by a short
4317 	 * CSO or short CSO inline BD, then the 16-bit opaque field from the
4318 	 * short CSO BD will appear in the bottom 16 bits of this field.
4319 	 */
4320 	uint32_t	opaque;
4321 	uint16_t	errors_v;
4322 	/*
4323 	 * This value is written by the NIC such that it will be different
4324 	 * for each pass through the completion queue. The even passes
4325 	 * will write 1. The odd passes will write 0.
4326 	 */
4327 	#define TX_CMPL_V                                  UINT32_C(0x1)
4328 	#define TX_CMPL_ERRORS_MASK                        UINT32_C(0xfffe)
4329 	#define TX_CMPL_ERRORS_SFT                         1
4330 	/*
4331 	 * This error indicates that there was some sort of problem
4332 	 * with the BDs for the packet.
4333 	 */
4334 	#define TX_CMPL_ERRORS_BUFFER_ERROR_MASK            UINT32_C(0xe)
4335 	#define TX_CMPL_ERRORS_BUFFER_ERROR_SFT             1
4336 	/* No error */
4337 	#define TX_CMPL_ERRORS_BUFFER_ERROR_NO_ERROR \
4338 		(UINT32_C(0x0) << 1)
4339 	/*
4340 	 * Bad Format:
4341 	 * BDs were not formatted correctly.
4342 	 */
4343 	#define TX_CMPL_ERRORS_BUFFER_ERROR_BAD_FMT \
4344 		(UINT32_C(0x2) << 1)
4345 	#define TX_CMPL_ERRORS_BUFFER_ERROR_LAST \
4346 		TX_CMPL_ERRORS_BUFFER_ERROR_BAD_FMT
4347 	/*
4348 	 * When this bit is '1', it indicates that the length of
4349 	 * the packet was zero. No packet was transmitted.
4350 	 */
4351 	#define TX_CMPL_ERRORS_ZERO_LENGTH_PKT              UINT32_C(0x10)
4352 	/*
4353 	 * When this bit is '1', it indicates that the packet
4354 	 * was longer than the programmed limit in TDI. No
4355 	 * packet was transmitted.
4356 	 */
4357 	#define TX_CMPL_ERRORS_EXCESSIVE_BD_LENGTH          UINT32_C(0x20)
4358 	/*
4359 	 * When this bit is '1', it indicates that one or more of the
4360 	 * BDs associated with this packet generated a PCI error.
4361 	 * This probably means the address was not valid.
4362 	 */
4363 	#define TX_CMPL_ERRORS_DMA_ERROR                    UINT32_C(0x40)
4364 	/*
4365 	 * When this bit is '1', it indicates that the packet was longer
4366 	 * than indicated by the hint. No packet was transmitted.
4367 	 */
4368 	#define TX_CMPL_ERRORS_HINT_TOO_SHORT               UINT32_C(0x80)
4369 	/*
4370 	 * When this bit is '1', it indicates that the packet was
4371 	 * dropped due to Poison TLP error on one or more of the
4372 	 * TLPs in the PXP completion.
4373 	 */
4374 	#define TX_CMPL_ERRORS_POISON_TLP_ERROR             UINT32_C(0x100)
4375 	/*
4376 	 * When this bit is '1', it indicates that the packet was dropped
4377 	 * due to a transient internal error in TDC. The packet or LSO can
4378 	 * be retried and may transmit successfully on a subsequent attempt.
4379 	 */
4380 	#define TX_CMPL_ERRORS_INTERNAL_ERROR               UINT32_C(0x200)
4381 	/*
4382 	 * When this bit is '1', it was not possible to collect a timestamp
4383 	 * for a PTP completion, in which case the timestamp_hi and
4384 	 * timestamp_lo fields are invalid. When this bit is '0' for a PTP
4385 	 * completion, the timestamp_hi and timestamp_lo fields are valid.
4386 	 * RJRN will copy the value of this bit into the field of the same
4387 	 * name in all TX completions, regardless of whether such completions
4388 	 * are PTP completions or other TX completions.
4389 	 */
4390 	#define TX_CMPL_ERRORS_TIMESTAMP_INVALID_ERROR      UINT32_C(0x400)
4391 	/* unused2 is 16 b */
4392 	uint16_t	unused_1;
4393 	/* unused3 is 32 b */
4394 	uint32_t	unused_2;
4395 } __rte_packed_end;
4396 
4397 /* tx_cmpl_coal (size:128b/16B) */
4398 struct __rte_packed_begin tx_cmpl_coal {
4399 	uint16_t	flags_type;
4400 	/*
4401 	 * This field indicates the exact type of the completion.
4402 	 * By convention, the LSB identifies the length of the
4403 	 * record in 16B units. Even values indicate 16B
4404 	 * records. Odd values indicate 32B
4405 	 * records.
4406 	 */
4407 	#define TX_CMPL_COAL_TYPE_MASK       UINT32_C(0x3f)
4408 	#define TX_CMPL_COAL_TYPE_SFT        0
4409 	/*
4410 	 * TX L2 coalesced completion:
4411 	 * Completion of TX packet. Length = 16B
4412 	 */
4413 	#define TX_CMPL_COAL_TYPE_TX_L2_COAL   UINT32_C(0x2)
4414 	#define TX_CMPL_COAL_TYPE_LAST        TX_CMPL_COAL_TYPE_TX_L2_COAL
4415 	#define TX_CMPL_COAL_FLAGS_MASK      UINT32_C(0xffc0)
4416 	#define TX_CMPL_COAL_FLAGS_SFT       6
4417 	/*
4418 	 * When this bit is '1', it indicates a packet that has an
4419 	 * error of some type. Type of error is indicated in
4420 	 * error_flags.
4421 	 */
4422 	#define TX_CMPL_COAL_FLAGS_ERROR      UINT32_C(0x40)
4423 	/*
4424 	 * When this bit is '1', it indicates that the packet completed
4425 	 * was transmitted using the push acceleration data provided
4426 	 * by the driver. When this bit is '0', it indicates that the
4427 	 * packet had not push acceleration data written or was executed
4428 	 * as a normal packet even though push data was provided.
4429 	 */
4430 	#define TX_CMPL_COAL_FLAGS_PUSH       UINT32_C(0x80)
4431 	/* unused1 is 16 b */
4432 	uint16_t	unused_0;
4433 	/*
4434 	 * This is a copy of the opaque field from the first TX BD of the packet
4435 	 * which corresponds with the reported sq_cons_idx. Note that, with
4436 	 * coalesced completions, completions are generated for only some of the
4437 	 * packets. The driver will see the opaque field for only those packets.
4438 	 * Note that, if the packet was described by a short CSO or short CSO
4439 	 * inline BD, then the 16-bit opaque field from the short CSO BD will
4440 	 * appear in the bottom 16 bits of this field. For TX rings with
4441 	 * completion coalescing enabled (which would use the coalesced
4442 	 * completion record), it is suggested that the driver populate the
4443 	 * opaque field to indicate the specific TX ring with which the
4444 	 * completion is associated, then utilize the opaque and sq_cons_idx
4445 	 * fields in the coalesced completion record to determine the specific
4446 	 * packets that are to be completed on that ring.
4447 	 */
4448 	uint32_t	opaque;
4449 	uint16_t	errors_v;
4450 	/*
4451 	 * This value is written by the NIC such that it will be different
4452 	 * for each pass through the completion queue. The even passes
4453 	 * will write 1. The odd passes will write 0.
4454 	 */
4455 	#define TX_CMPL_COAL_V                                  UINT32_C(0x1)
4456 	#define TX_CMPL_COAL_ERRORS_MASK \
4457 		UINT32_C(0xfffe)
4458 	#define TX_CMPL_COAL_ERRORS_SFT                         1
4459 	/*
4460 	 * This error indicates that there was some sort of problem
4461 	 * with the BDs for the packet.
4462 	 */
4463 	#define TX_CMPL_COAL_ERRORS_BUFFER_ERROR_MASK            UINT32_C(0xe)
4464 	#define TX_CMPL_COAL_ERRORS_BUFFER_ERROR_SFT             1
4465 	/* No error */
4466 	#define TX_CMPL_COAL_ERRORS_BUFFER_ERROR_NO_ERROR \
4467 		(UINT32_C(0x0) << 1)
4468 	/*
4469 	 * Bad Format:
4470 	 * BDs were not formatted correctly.
4471 	 */
4472 	#define TX_CMPL_COAL_ERRORS_BUFFER_ERROR_BAD_FMT \
4473 		(UINT32_C(0x2) << 1)
4474 	#define TX_CMPL_COAL_ERRORS_BUFFER_ERROR_LAST \
4475 		TX_CMPL_COAL_ERRORS_BUFFER_ERROR_BAD_FMT
4476 	/*
4477 	 * When this bit is '1', it indicates that the length of
4478 	 * the packet was zero. No packet was transmitted.
4479 	 */
4480 	#define TX_CMPL_COAL_ERRORS_ZERO_LENGTH_PKT              UINT32_C(0x10)
4481 	/*
4482 	 * When this bit is '1', it indicates that the packet
4483 	 * was longer than the programmed limit in TDI. No
4484 	 * packet was transmitted.
4485 	 */
4486 	#define TX_CMPL_COAL_ERRORS_EXCESSIVE_BD_LENGTH          UINT32_C(0x20)
4487 	/*
4488 	 * When this bit is '1', it indicates that one or more of the
4489 	 * BDs associated with this packet generated a PCI error.
4490 	 * This probably means the address was not valid.
4491 	 */
4492 	#define TX_CMPL_COAL_ERRORS_DMA_ERROR                    UINT32_C(0x40)
4493 	/*
4494 	 * When this bit is '1', it indicates that the packet was longer
4495 	 * than indicated by the hint. No packet was transmitted.
4496 	 */
4497 	#define TX_CMPL_COAL_ERRORS_HINT_TOO_SHORT               UINT32_C(0x80)
4498 	/*
4499 	 * When this bit is '1', it indicates that the packet was
4500 	 * dropped due to Poison TLP error on one or more of the
4501 	 * TLPs in the PXP completion.
4502 	 */
4503 	#define TX_CMPL_COAL_ERRORS_POISON_TLP_ERROR \
4504 		UINT32_C(0x100)
4505 	/*
4506 	 * When this bit is '1', it indicates that the packet was dropped
4507 	 * due to a transient internal error in TDC. The packet or LSO can
4508 	 * be retried and may transmit successfully on a subsequent attempt.
4509 	 */
4510 	#define TX_CMPL_COAL_ERRORS_INTERNAL_ERROR \
4511 		UINT32_C(0x200)
4512 	/*
4513 	 * When this bit is '1', it was not possible to collect a a timestamp
4514 	 * for a PTP completion, in which case the timestamp_hi and
4515 	 * timestamp_lo fields are invalid. When this bit is '0' for a PTP
4516 	 * completion, the timestamp_hi and timestamp_lo fields are valid.
4517 	 * RJRN will copy the value of this bit into the field of the same
4518 	 * name in all TX completions, regardless of whether such
4519 	 * completions are PTP completions or other TX completions.
4520 	 */
4521 	#define TX_CMPL_COAL_ERRORS_TIMESTAMP_INVALID_ERROR \
4522 		UINT32_C(0x400)
4523 	/* unused2 is 16 b */
4524 	uint16_t	unused_1;
4525 	uint32_t	sq_cons_idx;
4526 	/*
4527 	 * This value is SQ index for the start of the packet following the
4528 	 * last completed packet.
4529 	 */
4530 	#define TX_CMPL_COAL_SQ_CONS_IDX_MASK UINT32_C(0xffffff)
4531 	#define TX_CMPL_COAL_SQ_CONS_IDX_SFT 0
4532 } __rte_packed_end;
4533 
4534 /* tx_cmpl_packet_timestamp (size:128b/16B) */
4535 struct __rte_packed_begin tx_cmpl_packet_timestamp {
4536 	uint16_t	ts_sub_ns_flags_type;
4537 	/*
4538 	 * This field indicates the exact type of the completion. By
4539 	 * convention, the LSB identifies the length of the record in 16B
4540 	 * units. Even values indicate 16B records. Odd values indicate
4541 	 * 32B records.
4542 	 */
4543 	#define TX_CMPL_PACKET_TIMESTAMP_TYPE_MASK             UINT32_C(0x3f)
4544 	#define TX_CMPL_PACKET_TIMESTAMP_TYPE_SFT              0
4545 	/*
4546 	 * TX L2 Packet Timestamp completion:
4547 	 * Completion of an L2 Packet Timestamp Packet. Length = 16B
4548 	 */
4549 	#define TX_CMPL_PACKET_TIMESTAMP_TYPE_TX_L2_PKT_TS       UINT32_C(0x4)
4550 	#define TX_CMPL_PACKET_TIMESTAMP_TYPE_LAST \
4551 		TX_CMPL_PACKET_TIMESTAMP_TYPE_TX_L2_PKT_TS
4552 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_MASK            UINT32_C(0xfc0)
4553 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_SFT             6
4554 	/*
4555 	 * When this bit is '1', it indicates a packet that has an error
4556 	 * of some type. Type of error is indicated in error_flags.
4557 	 */
4558 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_ERROR            UINT32_C(0x40)
4559 	/*
4560 	 * This field indicates the TX packet timestamp type that is
4561 	 * represented by a TX Packet Timestamp Completion. Note that
4562 	 * this field is invalid if the timestamp_invalid_error flag
4563 	 * is set.
4564 	 */
4565 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE          UINT32_C(0x80)
4566 	/* The packet timestamp came from PM. */
4567 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_TS_PM \
4568 		(UINT32_C(0x0) << 7)
4569 	/* The packet timestamp came from PA. */
4570 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_TS_PA \
4571 		(UINT32_C(0x1) << 7)
4572 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_LAST \
4573 		TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_TYPE_TS_PA
4574 	/*
4575 	 * This flag indicates that the timestamp should have come from PM,
4576 	 * but came instead from PA because all PM timestamp resources were
4577 	 * in use. This can occur in the following circumstances:
4578 	 * 1. The BD specified ts_2cmpl_auto and the packet was a PTP packet
4579 	 *    but PA could not request a PM timestamp
4580 	 * 2. The BD specified ts_2cmpl_pm, but PA could not request a PM
4581 	 *    timestamp
4582 	 */
4583 	#define TX_CMPL_PACKET_TIMESTAMP_FLAGS_TS_FALLBACK      UINT32_C(0x100)
4584 	/*
4585 	 * For 2-step PTP timestamps, bits[3:0] of this field represent the
4586 	 * sub-nanosecond portion of the packet timestamp, returned from PM
4587 	 * for 2-step PTP timestamps. For PA timestamps, this field also
4588 	 * represents the sub-nanosecond portion of the packet timestamp;
4589 	 * however, due to synchronization uncertainties, the accuracy of
4590 	 * PA timestamps is limited to approximately +/- 4 ns. Therefore
4591 	 * this field is of dubious value for PA timestamps.
4592 	 */
4593 	#define TX_CMPL_PACKET_TIMESTAMP_TS_SUB_NS_MASK        UINT32_C(0xf000)
4594 	#define TX_CMPL_PACKET_TIMESTAMP_TS_SUB_NS_SFT         12
4595 	/*
4596 	 * This is bits [47:32] of the nanoseconds portion of the packet
4597 	 * timestamp, returned from PM for 2-step PTP timestamps or from
4598 	 * PA for PA timestamps. This field is in units of 2^32 ns.
4599 	 */
4600 	uint16_t	ts_ns_mid;
4601 	/*
4602 	 * This is a copy of the opaque field from the first TX BD of this
4603 	 * transmitted packet. Note that, if the packet was described by a
4604 	 * short CSO or short CSO inline BD, then the 16-bit opaque field
4605 	 * from the short CSO BD will appear in the bottom 16 bits of this
4606 	 * field.
4607 	 */
4608 	uint32_t	opaque;
4609 	uint16_t	errors_v;
4610 	/*
4611 	 * This value is written by the NIC such that it will be different
4612 	 * for each pass through the completion queue. The even passes
4613 	 * will write 1. The odd passes will write 0.
4614 	 */
4615 	#define TX_CMPL_PACKET_TIMESTAMP_V \
4616 		UINT32_C(0x1)
4617 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_MASK \
4618 		UINT32_C(0xfffe)
4619 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_SFT                         1
4620 	/*
4621 	 * This field was previously used to indicate fatal errors, which
4622 	 * now result in aborting and bringing down the ring. This field
4623 	 * is deprecated.
4624 	 */
4625 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_MASK \
4626 		UINT32_C(0xe)
4627 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_SFT             1
4628 	/* No error. */
4629 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_NO_ERROR \
4630 		(UINT32_C(0x0) << 1)
4631 	/* Deprecated. */
4632 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_BAD_FMT \
4633 		(UINT32_C(0x2) << 1)
4634 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_LAST \
4635 		TX_CMPL_PACKET_TIMESTAMP_ERRORS_BUFFER_ERROR_BAD_FMT
4636 	/*
4637 	 * This error is fatal and results in aborting and bringing down the
4638 	 * ring, thus is deprecated.
4639 	 */
4640 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_ZERO_LENGTH_PKT \
4641 		UINT32_C(0x10)
4642 	/*
4643 	 * This error is fatal and results in aborting and bringing down the
4644 	 * ring, thus is deprecated.
4645 	 */
4646 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_EXCESSIVE_BD_LENGTH \
4647 		UINT32_C(0x20)
4648 	/*
4649 	 * When this bit is '1', it indicates that one or more of the BDs
4650 	 * associated with this packet generated a PCI error when accessing
4651 	 * header/payload data from host memory. It most likely indicates
4652 	 * that the address was not valid. Note that this bit has no meaning
4653 	 * for the timestamp completion and will always be '0'.
4654 	 */
4655 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_DMA_ERROR \
4656 		UINT32_C(0x40)
4657 	/*
4658 	 * This error is fatal and results in aborting and bringing down the
4659 	 * ring, thus is deprecated.
4660 	 */
4661 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_HINT_TOO_SHORT \
4662 		UINT32_C(0x80)
4663 	/*
4664 	 * When this bit is '1', it indicates that the packet was dropped
4665 	 * due to Poison TLP error on one or more of the TLPs in one or more
4666 	 * of the associated PXP completion(s) when accessing header/payload
4667 	 * data from host memory. Note that this bit has no meaning for the
4668 	 * timestamp completion, and will always be '0'.
4669 	 */
4670 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_POISON_TLP_ERROR \
4671 		UINT32_C(0x100)
4672 	/*
4673 	 * When this bit is '1', it indicates that the packet was dropped
4674 	 * due to a transient internal error in TDC. The packet or LSO can
4675 	 * be retried and may transmit successfully on a subsequent attempt.
4676 	 * Note that this bit has no meaning for the timestamp completion
4677 	 * and will always be '0'.
4678 	 */
4679 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_INTERNAL_ERROR \
4680 		UINT32_C(0x200)
4681 	/*
4682 	 * When this bit is '1', it was not possible to collect a timestamp
4683 	 * for a timestamp completion, in which case the ts_ns and ts_sub_ns
4684 	 * fields are invalid. When this bit is '0' in a timestamp
4685 	 * completion record, the ts_sub_ns, ts_ns_lo, and ts_ns_mid fields
4686 	 * are valid. Note that this bit has meaning only for the timestamp
4687 	 * completion. For types other than the timestamp completion, this
4688 	 * bit will always be '0'.
4689 	 */
4690 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_TIMESTAMP_INVALID_ERROR \
4691 		UINT32_C(0x400)
4692 	/*
4693 	 * When this bit is '1', it indicates that a Timed Transmit
4694 	 * SO-TXTIME packet violated the max_ttx_overtime constraint i.e.,
4695 	 * the time the packet was processed for transmission in TWE was
4696 	 * later than the time given by (TimedTx_BD.tx_time +
4697 	 * max_ttx_overtime) and as result, the packet was dropped.
4698 	 * Note that max_ttx_overtime is a global configuration in TWE.
4699 	 * Note that this bit has no meaning in a timestamp completion,
4700 	 * and will always be '0'.
4701 	 */
4702 	#define TX_CMPL_PACKET_TIMESTAMP_ERRORS_TTX_OVERTIME_ERROR \
4703 		UINT32_C(0x800)
4704 	/* unused2 is 16 b */
4705 	uint16_t	unused_2;
4706 	/*
4707 	 * This is bits [31:0] of the nanoseconds portion of the packet
4708 	 * timestamp, returned from PM for 2-step PTP timestamp or from
4709 	 * PA for PA timestamps. This field is in units of ns.
4710 	 */
4711 	uint32_t	ts_ns_lo;
4712 } __rte_packed_end;
4713 
4714 /* rx_pkt_cmpl (size:128b/16B) */
4715 struct __rte_packed_begin rx_pkt_cmpl {
4716 	uint16_t	flags_type;
4717 	/*
4718 	 * This field indicates the exact type of the completion.
4719 	 * By convention, the LSB identifies the length of the
4720 	 * record in 16B units. Even values indicate 16B
4721 	 * records. Odd values indicate 32B
4722 	 * records.
4723 	 */
4724 	#define RX_PKT_CMPL_TYPE_MASK                      UINT32_C(0x3f)
4725 	#define RX_PKT_CMPL_TYPE_SFT                       0
4726 	/*
4727 	 * RX L2 completion:
4728 	 * Completion of and L2 RX packet. Length = 32B
4729 	 */
4730 	#define RX_PKT_CMPL_TYPE_RX_L2                       UINT32_C(0x11)
4731 	#define RX_PKT_CMPL_TYPE_LAST \
4732 		RX_PKT_CMPL_TYPE_RX_L2
4733 	#define RX_PKT_CMPL_FLAGS_MASK                     UINT32_C(0xffc0)
4734 	#define RX_PKT_CMPL_FLAGS_SFT                      6
4735 	/*
4736 	 * When this bit is '1', it indicates a packet that has an
4737 	 * error of some type. Type of error is indicated in
4738 	 * error_flags.
4739 	 */
4740 	#define RX_PKT_CMPL_FLAGS_ERROR                     UINT32_C(0x40)
4741 	/* This field indicates how the packet was placed in the buffer. */
4742 	#define RX_PKT_CMPL_FLAGS_PLACEMENT_MASK            UINT32_C(0x380)
4743 	#define RX_PKT_CMPL_FLAGS_PLACEMENT_SFT             7
4744 	/*
4745 	 * Normal:
4746 	 * Packet was placed using normal algorithm.
4747 	 */
4748 	#define RX_PKT_CMPL_FLAGS_PLACEMENT_NORMAL \
4749 		(UINT32_C(0x0) << 7)
4750 	/*
4751 	 * Jumbo:
4752 	 * Packet was placed using jumbo algorithm.
4753 	 */
4754 	#define RX_PKT_CMPL_FLAGS_PLACEMENT_JUMBO \
4755 		(UINT32_C(0x1) << 7)
4756 	/*
4757 	 * Header/Data Separation:
4758 	 * Packet was placed using Header/Data separation algorithm.
4759 	 * The separation location is indicated by the itype field.
4760 	 */
4761 	#define RX_PKT_CMPL_FLAGS_PLACEMENT_HDS \
4762 		(UINT32_C(0x2) << 7)
4763 	#define RX_PKT_CMPL_FLAGS_PLACEMENT_LAST \
4764 		RX_PKT_CMPL_FLAGS_PLACEMENT_HDS
4765 	/* This bit is '1' if the RSS field in this completion is valid. */
4766 	#define RX_PKT_CMPL_FLAGS_RSS_VALID                 UINT32_C(0x400)
4767 	/*
4768 	 * This bit is '1' if metadata has been added to the end of the
4769 	 * packet in host memory.
4770 	 */
4771 	#define RX_PKT_CMPL_FLAGS_PKT_METADATA_PRESENT      UINT32_C(0x800)
4772 	/*
4773 	 * This value indicates what the inner packet determined for the
4774 	 * packet was.
4775 	 */
4776 	#define RX_PKT_CMPL_FLAGS_ITYPE_MASK                UINT32_C(0xf000)
4777 	#define RX_PKT_CMPL_FLAGS_ITYPE_SFT                 12
4778 	/*
4779 	 * Not Known:
4780 	 * Indicates that the packet type was not known.
4781 	 */
4782 	#define RX_PKT_CMPL_FLAGS_ITYPE_NOT_KNOWN \
4783 		(UINT32_C(0x0) << 12)
4784 	/*
4785 	 * IP Packet:
4786 	 * Indicates that the packet was an IP packet, but further
4787 	 * classification was not possible.
4788 	 */
4789 	#define RX_PKT_CMPL_FLAGS_ITYPE_IP \
4790 		(UINT32_C(0x1) << 12)
4791 	/*
4792 	 * TCP Packet:
4793 	 * Indicates that the packet was IP and TCP.
4794 	 * This indicates that the payload_offset field is valid.
4795 	 */
4796 	#define RX_PKT_CMPL_FLAGS_ITYPE_TCP \
4797 		(UINT32_C(0x2) << 12)
4798 	/*
4799 	 * UDP Packet:
4800 	 * Indicates that the packet was IP and UDP.
4801 	 * This indicates that the payload_offset field is valid.
4802 	 */
4803 	#define RX_PKT_CMPL_FLAGS_ITYPE_UDP \
4804 		(UINT32_C(0x3) << 12)
4805 	/*
4806 	 * FCoE Packet:
4807 	 * Indicates that the packet was recognized as a FCoE.
4808 	 * This also indicates that the payload_offset field is valid.
4809 	 */
4810 	#define RX_PKT_CMPL_FLAGS_ITYPE_FCOE \
4811 		(UINT32_C(0x4) << 12)
4812 	/*
4813 	 * RoCE Packet:
4814 	 * Indicates that the packet was recognized as a RoCE.
4815 	 * This also indicates that the payload_offset field is valid.
4816 	 */
4817 	#define RX_PKT_CMPL_FLAGS_ITYPE_ROCE \
4818 		(UINT32_C(0x5) << 12)
4819 	/*
4820 	 * ICMP Packet:
4821 	 * Indicates that the packet was recognized as ICMP.
4822 	 * This indicates that the payload_offset field is valid.
4823 	 */
4824 	#define RX_PKT_CMPL_FLAGS_ITYPE_ICMP \
4825 		(UINT32_C(0x7) << 12)
4826 	/*
4827 	 * PTP packet wo/timestamp:
4828 	 * Indicates that the packet was recognized as a PTP
4829 	 * packet.
4830 	 */
4831 	#define RX_PKT_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP \
4832 		(UINT32_C(0x8) << 12)
4833 	/*
4834 	 * PTP packet w/timestamp:
4835 	 * Indicates that the packet was recognized as a PTP
4836 	 * packet and that a timestamp was taken for the packet.
4837 	 */
4838 	#define RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP \
4839 		(UINT32_C(0x9) << 12)
4840 	#define RX_PKT_CMPL_FLAGS_ITYPE_LAST \
4841 		RX_PKT_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP
4842 	/*
4843 	 * This is the length of the data for the packet stored in the
4844 	 * buffer(s) identified by the opaque value. This includes
4845 	 * the packet BD and any associated buffer BDs. This does not include
4846 	 * the length of any data places in aggregation BDs.
4847 	 */
4848 	uint16_t	len;
4849 	/*
4850 	 * This is a copy of the opaque field from the RX BD this completion
4851 	 * corresponds to.
4852 	 */
4853 	uint32_t	opaque;
4854 	uint8_t	agg_bufs_v1;
4855 	/*
4856 	 * This value is written by the NIC such that it will be different
4857 	 * for each pass through the completion queue. The even passes
4858 	 * will write 1. The odd passes will write 0.
4859 	 */
4860 	#define RX_PKT_CMPL_V1           UINT32_C(0x1)
4861 	/*
4862 	 * This value is the number of aggregation buffers that follow this
4863 	 * entry in the completion ring that are a part of this packet.
4864 	 * If the value is zero, then the packet is completely contained
4865 	 * in the buffer space provided for the packet in the RX ring.
4866 	 */
4867 	#define RX_PKT_CMPL_AGG_BUFS_MASK UINT32_C(0x3e)
4868 	#define RX_PKT_CMPL_AGG_BUFS_SFT 1
4869 	/* unused1 is 2 b */
4870 	#define RX_PKT_CMPL_UNUSED1_MASK UINT32_C(0xc0)
4871 	#define RX_PKT_CMPL_UNUSED1_SFT  6
4872 	/*
4873 	 * This is the RSS hash type for the packet. The value is packed
4874 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
4875 	 * The value of tuple_extrac_op provides the information about
4876 	 * what fields the hash was computed on.
4877 	 * Note that 4-tuples values listed below are applicable
4878 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
4879 	 * HWRM firmware, and drivers. For example, if RSS hash is supported and
4880 	 * enabled for TCP traffic only, then the values of tuple_extract_op
4881 	 * corresponding to 4-tuples are only valid for TCP traffic.
4882 	 */
4883 	uint8_t	rss_hash_type;
4884 	/*
4885 	 * The RSS hash was computed over source IP address,
4886 	 * destination IP address, source port, and destination port of inner
4887 	 * IP and TCP or UDP headers. Note: For non-tunneled packets,
4888 	 * the packet headers are considered inner packet headers for the RSS
4889 	 * hash computation purpose.
4890 	 */
4891 	#define RX_PKT_CMPL_RSS_HASH_TYPE_ENUM_0 UINT32_C(0x0)
4892 	/*
4893 	 * The RSS hash was computed over source IP address and destination
4894 	 * IP address of inner IP header. Note: For non-tunneled packets,
4895 	 * the packet headers are considered inner packet headers for the RSS
4896 	 * hash computation purpose.
4897 	 */
4898 	#define RX_PKT_CMPL_RSS_HASH_TYPE_ENUM_1 UINT32_C(0x1)
4899 	/*
4900 	 * The RSS hash was computed over source IP address,
4901 	 * destination IP address, source port, and destination port of
4902 	 * IP and TCP or UDP headers of outer tunnel headers.
4903 	 * Note: For non-tunneled packets, this value is not applicable.
4904 	 */
4905 	#define RX_PKT_CMPL_RSS_HASH_TYPE_ENUM_2 UINT32_C(0x2)
4906 	/*
4907 	 * The RSS hash was computed over source IP address and
4908 	 * destination IP address of IP header of outer tunnel headers.
4909 	 * Note: For non-tunneled packets, this value is not applicable.
4910 	 */
4911 	#define RX_PKT_CMPL_RSS_HASH_TYPE_ENUM_3 UINT32_C(0x3)
4912 	#define RX_PKT_CMPL_RSS_HASH_TYPE_LAST \
4913 		RX_PKT_CMPL_RSS_HASH_TYPE_ENUM_3
4914 	/*
4915 	 * This value indicates the offset in bytes from the beginning of the
4916 	 * packet where the inner payload starts. This value is valid for TCP,
4917 	 * UDP, FCoE, and RoCE packets.
4918 	 *
4919 	 * A value of zero indicates that header is 256B into the packet.
4920 	 */
4921 	uint8_t	payload_offset;
4922 	/* unused2 is 8 b */
4923 	uint8_t	unused1;
4924 	/*
4925 	 * This value is the RSS hash value calculated for the packet
4926 	 * based on the mode bits and key value in the VNIC.
4927 	 */
4928 	uint32_t	rss_hash;
4929 } __rte_packed_end;
4930 
4931 /* Last 16 bytes of rx_pkt_cmpl. */
4932 /* rx_pkt_cmpl_hi (size:128b/16B) */
4933 struct __rte_packed_begin rx_pkt_cmpl_hi {
4934 	uint32_t	flags2;
4935 	/*
4936 	 * This indicates that the ip checksum was calculated for the
4937 	 * inner packet and that the ip_cs_error field indicates if there
4938 	 * was an error.
4939 	 */
4940 	#define RX_PKT_CMPL_FLAGS2_IP_CS_CALC                 UINT32_C(0x1)
4941 	/*
4942 	 * This indicates that the TCP, UDP or ICMP checksum was
4943 	 * calculated for the inner packet and that the l4_cs_error field
4944 	 * indicates if there was an error.
4945 	 */
4946 	#define RX_PKT_CMPL_FLAGS2_L4_CS_CALC                 UINT32_C(0x2)
4947 	/*
4948 	 * This indicates that the ip checksum was calculated for the
4949 	 * tunnel header and that the t_ip_cs_error field indicates if there
4950 	 * was an error.
4951 	 */
4952 	#define RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC               UINT32_C(0x4)
4953 	/*
4954 	 * This indicates that the UDP checksum was
4955 	 * calculated for the tunnel packet and that the t_l4_cs_error field
4956 	 * indicates if there was an error.
4957 	 */
4958 	#define RX_PKT_CMPL_FLAGS2_T_L4_CS_CALC               UINT32_C(0x8)
4959 	/* This value indicates what format the metadata field is. */
4960 	#define RX_PKT_CMPL_FLAGS2_META_FORMAT_MASK           UINT32_C(0xf0)
4961 	#define RX_PKT_CMPL_FLAGS2_META_FORMAT_SFT            4
4962 	/* No metadata information. Value is zero. */
4963 	#define RX_PKT_CMPL_FLAGS2_META_FORMAT_NONE \
4964 		(UINT32_C(0x0) << 4)
4965 	/*
4966 	 * The metadata field contains the VLAN tag and TPID value.
4967 	 * - metadata[11:0] contains the vlan VID value.
4968 	 * - metadata[12] contains the vlan DE value.
4969 	 * - metadata[15:13] contains the vlan PRI value.
4970 	 * - metadata[31:16] contains the vlan TPID value.
4971 	 */
4972 	#define RX_PKT_CMPL_FLAGS2_META_FORMAT_VLAN \
4973 		(UINT32_C(0x1) << 4)
4974 	/*
4975 	 * If ext_meta_format is equal to 1, the metadata field
4976 	 * contains the lower 16b of the tunnel ID value, justified
4977 	 * to LSB
4978 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
4979 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier.
4980 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
4981 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K = 0
4982 	 * - IPV4 = 0 (not populated)
4983 	 * - IPV6 = Flow Label[19:0]
4984 	 * - PPPoE = sessionID[15:0]
4985 	 * - MPLs = Outer label[19:0]
4986 	 * - UPAR = Selected[31:0] with bit mask
4987 	 */
4988 	#define RX_PKT_CMPL_FLAGS2_META_FORMAT_TUNNEL_ID \
4989 		(UINT32_C(0x2) << 4)
4990 	/*
4991 	 * if ext_meta_format is equal to 1, metadata field contains
4992 	 * 16b metadata from the prepended header (chdr_data).
4993 	 */
4994 	#define RX_PKT_CMPL_FLAGS2_META_FORMAT_CHDR_DATA \
4995 		(UINT32_C(0x3) << 4)
4996 	/*
4997 	 * If ext_meta_format is equal to 1, the metadata field contains
4998 	 * the outer_l3_offset, inner_l2_offset, inner_l3_offset and
4999 	 * inner_l4_size.
5000 	 * - metadata[8:0] contains the outer_l3_offset.
5001 	 * - metadata[17:9] contains the inner_l2_offset.
5002 	 * - metadata[26:18] contains the inner_l3_offset.
5003 	 * - metadata[31:27] contains the inner_l4_size.
5004 	 */
5005 	#define RX_PKT_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET \
5006 		(UINT32_C(0x4) << 4)
5007 	#define RX_PKT_CMPL_FLAGS2_META_FORMAT_LAST \
5008 		RX_PKT_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET
5009 	/*
5010 	 * This field indicates the IP type for the inner-most IP header.
5011 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
5012 	 * This value is only valid if itype indicates a packet
5013 	 * with an IP header.
5014 	 */
5015 	#define RX_PKT_CMPL_FLAGS2_IP_TYPE                    UINT32_C(0x100)
5016 	/*
5017 	 * This indicates that the complete 1's complement checksum was
5018 	 * calculated for the packet.
5019 	 */
5020 	#define RX_PKT_CMPL_FLAGS2_COMPLETE_CHECKSUM_CALC     UINT32_C(0x200)
5021 	/*
5022 	 * The combination of this value and meta_format indicated what
5023 	 * format the metadata field is.
5024 	 */
5025 	#define RX_PKT_CMPL_FLAGS2_EXT_META_FORMAT_MASK       UINT32_C(0xc00)
5026 	#define RX_PKT_CMPL_FLAGS2_EXT_META_FORMAT_SFT        10
5027 	/*
5028 	 * This value is the complete 1's complement checksum calculated from
5029 	 * the start of the outer L3 header to the end of the packet (not
5030 	 * including the ethernet crc). It is valid when the
5031 	 * 'complete_checksum_calc' flag is set.
5032 	 */
5033 	#define RX_PKT_CMPL_FLAGS2_COMPLETE_CHECKSUM_MASK \
5034 		UINT32_C(0xffff0000)
5035 	#define RX_PKT_CMPL_FLAGS2_COMPLETE_CHECKSUM_SFT      16
5036 	/*
5037 	 * This is data from the CFA block as indicated by the meta_format
5038 	 * field.
5039 	 */
5040 	uint32_t	metadata;
5041 	/* When meta_format=1, this value is the VLAN VID. */
5042 	#define RX_PKT_CMPL_METADATA_VID_MASK UINT32_C(0xfff)
5043 	#define RX_PKT_CMPL_METADATA_VID_SFT  0
5044 	/* When meta_format=1, this value is the VLAN DE. */
5045 	#define RX_PKT_CMPL_METADATA_DE       UINT32_C(0x1000)
5046 	/* When meta_format=1, this value is the VLAN PRI. */
5047 	#define RX_PKT_CMPL_METADATA_PRI_MASK UINT32_C(0xe000)
5048 	#define RX_PKT_CMPL_METADATA_PRI_SFT  13
5049 	/* When meta_format=1, this value is the VLAN TPID. */
5050 	#define RX_PKT_CMPL_METADATA_TPID_MASK UINT32_C(0xffff0000)
5051 	#define RX_PKT_CMPL_METADATA_TPID_SFT 16
5052 	uint16_t	errors_v2;
5053 	/*
5054 	 * This value is written by the NIC such that it will be different
5055 	 * for each pass through the completion queue. The even passes
5056 	 * will write 1. The odd passes will write 0.
5057 	 */
5058 	#define RX_PKT_CMPL_V2 \
5059 		UINT32_C(0x1)
5060 	#define RX_PKT_CMPL_ERRORS_MASK \
5061 		UINT32_C(0xfffe)
5062 	#define RX_PKT_CMPL_ERRORS_SFT                               1
5063 	/*
5064 	 * This error indicates that there was some sort of problem with
5065 	 * the BDs for the packet that was found after part of the
5066 	 * packet was already placed. The packet should be treated as
5067 	 * invalid.
5068 	 */
5069 	#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_MASK \
5070 		UINT32_C(0xe)
5071 	#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_SFT                   1
5072 	/* No buffer error */
5073 	#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER \
5074 		(UINT32_C(0x0) << 1)
5075 	/*
5076 	 * Did Not Fit:
5077 	 * Packet did not fit into packet buffer provided.
5078 	 * For regular placement, this means the packet did not fit
5079 	 * in the buffer provided. For HDS and jumbo placement, this
5080 	 * means that the packet could not be placed into 7 physical
5081 	 * buffers or less.
5082 	 */
5083 	#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_DID_NOT_FIT \
5084 		(UINT32_C(0x1) << 1)
5085 	/*
5086 	 * Not On Chip:
5087 	 * All BDs needed for the packet were not on-chip when
5088 	 * the packet arrived.
5089 	 */
5090 	#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_NOT_ON_CHIP \
5091 		(UINT32_C(0x2) << 1)
5092 	/*
5093 	 * Bad Format:
5094 	 * BDs were not formatted correctly.
5095 	 */
5096 	#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT \
5097 		(UINT32_C(0x3) << 1)
5098 	/*
5099 	 * Flush:
5100 	 * There was a bad_format error on the previous operation
5101 	 */
5102 	#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_FLUSH \
5103 		(UINT32_C(0x5) << 1)
5104 	#define RX_PKT_CMPL_ERRORS_BUFFER_ERROR_LAST \
5105 		RX_PKT_CMPL_ERRORS_BUFFER_ERROR_FLUSH
5106 	/*
5107 	 * This indicates that there was an error in the IP header
5108 	 * checksum.
5109 	 */
5110 	#define RX_PKT_CMPL_ERRORS_IP_CS_ERROR \
5111 		UINT32_C(0x10)
5112 	/*
5113 	 * This indicates that there was an error in the TCP, UDP
5114 	 * or ICMP checksum.
5115 	 */
5116 	#define RX_PKT_CMPL_ERRORS_L4_CS_ERROR \
5117 		UINT32_C(0x20)
5118 	/*
5119 	 * This indicates that there was an error in the tunnel
5120 	 * IP header checksum.
5121 	 */
5122 	#define RX_PKT_CMPL_ERRORS_T_IP_CS_ERROR \
5123 		UINT32_C(0x40)
5124 	/*
5125 	 * This indicates that there was an error in the tunnel
5126 	 * UDP checksum.
5127 	 */
5128 	#define RX_PKT_CMPL_ERRORS_T_L4_CS_ERROR \
5129 		UINT32_C(0x80)
5130 	/*
5131 	 * This indicates that there was a CRC error on either an FCoE
5132 	 * or RoCE packet. The itype indicates the packet type.
5133 	 */
5134 	#define RX_PKT_CMPL_ERRORS_CRC_ERROR \
5135 		UINT32_C(0x100)
5136 	/*
5137 	 * This indicates that there was an error in the tunnel
5138 	 * portion of the packet when this
5139 	 * field is non-zero.
5140 	 */
5141 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_MASK \
5142 		UINT32_C(0xe00)
5143 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_SFT                    9
5144 	/*
5145 	 * No additional error occurred on the tunnel portion
5146 	 * or the packet of the packet does not have a tunnel.
5147 	 */
5148 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_NO_ERROR \
5149 		(UINT32_C(0x0) << 9)
5150 	/*
5151 	 * Indicates that IP header version does not match
5152 	 * expectation from L2 Ethertype for IPv4 and IPv6
5153 	 * in the tunnel header.
5154 	 */
5155 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION \
5156 		(UINT32_C(0x1) << 9)
5157 	/*
5158 	 * Indicates that header length is out of range in the
5159 	 * tunnel header. Valid for
5160 	 * IPv4.
5161 	 */
5162 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN \
5163 		(UINT32_C(0x2) << 9)
5164 	/*
5165 	 * Indicates that the physical packet is shorter than that
5166 	 * claimed by the PPPoE header length for a tunnel PPPoE
5167 	 * packet.
5168 	 */
5169 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_TUNNEL_TOTAL_ERROR \
5170 		(UINT32_C(0x3) << 9)
5171 	/*
5172 	 * Indicates that physical packet is shorter than that claimed
5173 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6
5174 	 * tunnel packet packets.
5175 	 */
5176 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR \
5177 		(UINT32_C(0x4) << 9)
5178 	/*
5179 	 * Indicates that the physical packet is shorter than that
5180 	 * claimed by the tunnel UDP header length for a tunnel
5181 	 * UDP packet that is not fragmented.
5182 	 */
5183 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR \
5184 		(UINT32_C(0x5) << 9)
5185 	/*
5186 	 * indicates that the IPv4 TTL or IPv6 hop limit check
5187 	 * have failed (e.g. TTL = 0) in the tunnel header. Valid
5188 	 * for IPv4, and IPv6.
5189 	 */
5190 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL \
5191 		(UINT32_C(0x6) << 9)
5192 	#define RX_PKT_CMPL_ERRORS_T_PKT_ERROR_LAST \
5193 		RX_PKT_CMPL_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL
5194 	/*
5195 	 * This indicates that there was an error in the inner
5196 	 * portion of the packet when this
5197 	 * field is non-zero.
5198 	 */
5199 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_MASK \
5200 		UINT32_C(0xf000)
5201 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_SFT                      12
5202 	/*
5203 	 * No additional error occurred on the tunnel portion
5204 	 * or the packet of the packet does not have a tunnel.
5205 	 */
5206 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_NO_ERROR \
5207 		(UINT32_C(0x0) << 12)
5208 	/*
5209 	 * Indicates that IP header version does not match
5210 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
5211 	 * option other than VFT was parsed on
5212 	 * FCoE packet.
5213 	 */
5214 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L3_BAD_VERSION \
5215 		(UINT32_C(0x1) << 12)
5216 	/*
5217 	 * indicates that header length is out of range. Valid for
5218 	 * IPv4 and RoCE
5219 	 */
5220 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN \
5221 		(UINT32_C(0x2) << 12)
5222 	/*
5223 	 * indicates that the IPv4 TTL or IPv6 hop limit check
5224 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
5225 	 */
5226 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L3_BAD_TTL \
5227 		(UINT32_C(0x3) << 12)
5228 	/*
5229 	 * Indicates that physical packet is shorter than that
5230 	 * claimed by the l3 header length. Valid for IPv4,
5231 	 * IPv6 packet or RoCE packets.
5232 	 */
5233 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_IP_TOTAL_ERROR \
5234 		(UINT32_C(0x4) << 12)
5235 	/*
5236 	 * Indicates that the physical packet is shorter than that
5237 	 * claimed by the UDP header length for a UDP packet that is
5238 	 * not fragmented.
5239 	 */
5240 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR \
5241 		(UINT32_C(0x5) << 12)
5242 	/*
5243 	 * Indicates that TCP header length > IP payload. Valid for
5244 	 * TCP packets only.
5245 	 */
5246 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN \
5247 		(UINT32_C(0x6) << 12)
5248 	/* Indicates that TCP header length < 5. Valid for TCP. */
5249 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL \
5250 		(UINT32_C(0x7) << 12)
5251 	/*
5252 	 * Indicates that TCP option headers result in a TCP header
5253 	 * size that does not match data offset in TCP header. Valid
5254 	 * for TCP.
5255 	 */
5256 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN \
5257 		(UINT32_C(0x8) << 12)
5258 	#define RX_PKT_CMPL_ERRORS_PKT_ERROR_LAST \
5259 		RX_PKT_CMPL_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
5260 	/*
5261 	 * This field identifies the CFA action rule that was used for this
5262 	 * packet.
5263 	 */
5264 	uint16_t	cfa_code;
5265 	uint32_t	reorder;
5266 	/*
5267 	 * This value holds the reordering sequence number for the packet.
5268 	 * If the reordering sequence is not valid, then this value is zero.
5269 	 * The reordering domain for the packet is in the bottom 8 to 10b of
5270 	 * the rss_hash value. The bottom 20b of this value contain the
5271 	 * ordering domain value for the packet.
5272 	 */
5273 	#define RX_PKT_CMPL_REORDER_MASK UINT32_C(0xffffff)
5274 	#define RX_PKT_CMPL_REORDER_SFT 0
5275 } __rte_packed_end;
5276 
5277 /* rx_pkt_v2_cmpl (size:128b/16B) */
5278 struct __rte_packed_begin rx_pkt_v2_cmpl {
5279 	uint16_t	flags_type;
5280 	/*
5281 	 * This field indicates the exact type of the completion.
5282 	 * By convention, the LSB identifies the length of the
5283 	 * record in 16B units. Even values indicate 16B
5284 	 * records. Odd values indicate 32B
5285 	 * records.
5286 	 */
5287 	#define RX_PKT_V2_CMPL_TYPE_MASK                      UINT32_C(0x3f)
5288 	#define RX_PKT_V2_CMPL_TYPE_SFT                       0
5289 	/*
5290 	 * RX L2 V2 completion:
5291 	 * Completion of and L2 RX packet. Length = 32B
5292 	 * This is the new version of the RX_L2 completion used in SR2
5293 	 * and later chips.
5294 	 */
5295 	#define RX_PKT_V2_CMPL_TYPE_RX_L2_V2                    UINT32_C(0xf)
5296 	#define RX_PKT_V2_CMPL_TYPE_LAST \
5297 		RX_PKT_V2_CMPL_TYPE_RX_L2_V2
5298 	#define RX_PKT_V2_CMPL_FLAGS_MASK                     UINT32_C(0xffc0)
5299 	#define RX_PKT_V2_CMPL_FLAGS_SFT                      6
5300 	/*
5301 	 * When this bit is '1', it indicates a packet that has an
5302 	 * error of some type. Type of error is indicated in
5303 	 * error_flags.
5304 	 */
5305 	#define RX_PKT_V2_CMPL_FLAGS_ERROR                     UINT32_C(0x40)
5306 	/* This field indicates how the packet was placed in the buffer. */
5307 	#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_MASK            UINT32_C(0x380)
5308 	#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_SFT             7
5309 	/*
5310 	 * Normal:
5311 	 * Packet was placed using normal algorithm.
5312 	 */
5313 	#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_NORMAL \
5314 		(UINT32_C(0x0) << 7)
5315 	/*
5316 	 * Jumbo:
5317 	 * Packet was placed using jumbo algorithm.
5318 	 */
5319 	#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_JUMBO \
5320 		(UINT32_C(0x1) << 7)
5321 	/*
5322 	 * Header/Data Separation:
5323 	 * Packet was placed using Header/Data separation algorithm.
5324 	 * The separation location is indicated by the itype field.
5325 	 */
5326 	#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_HDS \
5327 		(UINT32_C(0x2) << 7)
5328 	/*
5329 	 * Truncation:
5330 	 * Packet was placed using truncation algorithm. The
5331 	 * placed (truncated) length is indicated in the payload_offset
5332 	 * field. The original length is indicated in the len field.
5333 	 */
5334 	#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_TRUNCATION \
5335 		(UINT32_C(0x3) << 7)
5336 	#define RX_PKT_V2_CMPL_FLAGS_PLACEMENT_LAST \
5337 		RX_PKT_V2_CMPL_FLAGS_PLACEMENT_TRUNCATION
5338 	/* This bit is '1' if the RSS field in this completion is valid. */
5339 	#define RX_PKT_V2_CMPL_FLAGS_RSS_VALID                 UINT32_C(0x400)
5340 	/*
5341 	 * This bit is '1' if metadata has been added to the end of the
5342 	 * packet in host memory. Metadata starts at the first 32B boundary
5343 	 * after the end of the packet for regular and jumbo placement.
5344 	 * It starts at the first 32B boundary after the end of the header
5345 	 * for HDS placement. The length of the metadata is indicated in the
5346 	 * metadata itself.
5347 	 */
5348 	#define RX_PKT_V2_CMPL_FLAGS_PKT_METADATA_PRESENT      UINT32_C(0x800)
5349 	/*
5350 	 * This value indicates what the inner packet determined for the
5351 	 * packet was.
5352 	 */
5353 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_MASK                UINT32_C(0xf000)
5354 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_SFT                 12
5355 	/*
5356 	 * Not Known:
5357 	 * Indicates that the packet type was not known.
5358 	 */
5359 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_NOT_KNOWN \
5360 		(UINT32_C(0x0) << 12)
5361 	/*
5362 	 * IP Packet:
5363 	 * Indicates that the packet was an IP packet, but further
5364 	 * classification was not possible.
5365 	 */
5366 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_IP \
5367 		(UINT32_C(0x1) << 12)
5368 	/*
5369 	 * TCP Packet:
5370 	 * Indicates that the packet was IP and TCP.
5371 	 * This indicates that the payload_offset field is valid.
5372 	 */
5373 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_TCP \
5374 		(UINT32_C(0x2) << 12)
5375 	/*
5376 	 * UDP Packet:
5377 	 * Indicates that the packet was IP and UDP.
5378 	 * This indicates that the payload_offset field is valid.
5379 	 */
5380 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_UDP \
5381 		(UINT32_C(0x3) << 12)
5382 	/*
5383 	 * FCoE Packet:
5384 	 * Indicates that the packet was recognized as a FCoE.
5385 	 * This also indicates that the payload_offset field is valid.
5386 	 */
5387 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_FCOE \
5388 		(UINT32_C(0x4) << 12)
5389 	/*
5390 	 * RoCE Packet:
5391 	 * Indicates that the packet was recognized as a RoCE.
5392 	 * This also indicates that the payload_offset field is valid.
5393 	 */
5394 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_ROCE \
5395 		(UINT32_C(0x5) << 12)
5396 	/*
5397 	 * ICMP Packet:
5398 	 * Indicates that the packet was recognized as ICMP.
5399 	 * This indicates that the payload_offset field is valid.
5400 	 */
5401 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_ICMP \
5402 		(UINT32_C(0x7) << 12)
5403 	/*
5404 	 * PTP packet wo/timestamp:
5405 	 * Indicates that the packet was recognized as a PTP
5406 	 * packet.
5407 	 */
5408 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP \
5409 		(UINT32_C(0x8) << 12)
5410 	/*
5411 	 * PTP packet w/timestamp:
5412 	 * Indicates that the packet was recognized as a PTP
5413 	 * packet and that a timestamp was taken for the packet.
5414 	 */
5415 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP \
5416 		(UINT32_C(0x9) << 12)
5417 	#define RX_PKT_V2_CMPL_FLAGS_ITYPE_LAST \
5418 		RX_PKT_V2_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP
5419 	/*
5420 	 * This is the length of the data for the packet stored in the
5421 	 * buffer(s) identified by the opaque value. This includes
5422 	 * the packet BD and any associated buffer BDs. This does not include
5423 	 * the length of any data places in aggregation BDs.
5424 	 */
5425 	uint16_t	len;
5426 	/*
5427 	 * This is a copy of the opaque field from the RX BD this completion
5428 	 * corresponds to.
5429 	 */
5430 	uint32_t	opaque;
5431 	uint8_t	agg_bufs_v1;
5432 	/*
5433 	 * This value is written by the NIC such that it will be different
5434 	 * for each pass through the completion queue. The even passes
5435 	 * will write 1. The odd passes will write 0.
5436 	 */
5437 	#define RX_PKT_V2_CMPL_V1           UINT32_C(0x1)
5438 	/*
5439 	 * This value is the number of aggregation buffers that follow this
5440 	 * entry in the completion ring that are a part of this packet.
5441 	 * If the value is zero, then the packet is completely contained
5442 	 * in the buffer space provided for the packet in the RX ring.
5443 	 */
5444 	#define RX_PKT_V2_CMPL_AGG_BUFS_MASK UINT32_C(0x3e)
5445 	#define RX_PKT_V2_CMPL_AGG_BUFS_SFT 1
5446 	/* unused1 is 2 b */
5447 	#define RX_PKT_V2_CMPL_UNUSED1_MASK UINT32_C(0xc0)
5448 	#define RX_PKT_V2_CMPL_UNUSED1_SFT  6
5449 	/*
5450 	 * This is the RSS hash type for the packet. The value is packed
5451 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
5452 	 * The value of tuple_extrac_op provides the information about
5453 	 * what fields the hash was computed on.
5454 	 * Note that 4-tuples values listed below are applicable
5455 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
5456 	 * HWRM firmware, and drivers. For example, if RSS hash is supported and
5457 	 * enabled for TCP traffic only, then the values of tuple_extract_op
5458 	 * corresponding to 4-tuples are only valid for TCP traffic.
5459 	 */
5460 	uint8_t	rss_hash_type;
5461 	/*
5462 	 * The RSS hash was computed over source IP address,
5463 	 * destination IP address, source port, and destination port of inner
5464 	 * IP and TCP or UDP headers. Note: For non-tunneled packets,
5465 	 * the packet headers are considered inner packet headers for the RSS
5466 	 * hash computation purpose.
5467 	 */
5468 	#define RX_PKT_V2_CMPL_RSS_HASH_TYPE_ENUM_0 UINT32_C(0x0)
5469 	/*
5470 	 * The RSS hash was computed over source IP address and destination
5471 	 * IP address of inner IP header. Note: For non-tunneled packets,
5472 	 * the packet headers are considered inner packet headers for the RSS
5473 	 * hash computation purpose.
5474 	 */
5475 	#define RX_PKT_V2_CMPL_RSS_HASH_TYPE_ENUM_1 UINT32_C(0x1)
5476 	/*
5477 	 * The RSS hash was computed over source IP address,
5478 	 * destination IP address, source port, and destination port of
5479 	 * IP and TCP or UDP headers of outer tunnel headers.
5480 	 * Note: For non-tunneled packets, this value is not applicable.
5481 	 */
5482 	#define RX_PKT_V2_CMPL_RSS_HASH_TYPE_ENUM_2 UINT32_C(0x2)
5483 	/*
5484 	 * The RSS hash was computed over source IP address and
5485 	 * destination IP address of IP header of outer tunnel headers.
5486 	 * Note: For non-tunneled packets, this value is not applicable.
5487 	 */
5488 	#define RX_PKT_V2_CMPL_RSS_HASH_TYPE_ENUM_3 UINT32_C(0x3)
5489 	#define RX_PKT_V2_CMPL_RSS_HASH_TYPE_LAST \
5490 		RX_PKT_V2_CMPL_RSS_HASH_TYPE_ENUM_3
5491 	uint16_t	metadata1_payload_offset;
5492 	/*
5493 	 * This is data from the CFA as indicated by the meta_format field.
5494 	 * If truncation placement is not used, this value indicates the offset
5495 	 * in bytes from the beginning of the packet where the inner payload
5496 	 * starts. This value is valid for TCP, UDP, FCoE, and RoCE packets. If
5497 	 * truncation placement is used, this value represents the placed
5498 	 * (truncated) length of the packet.
5499 	 */
5500 	#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_MASK        UINT32_C(0x1ff)
5501 	#define RX_PKT_V2_CMPL_PAYLOAD_OFFSET_SFT         0
5502 	/* This is data from the CFA as indicated by the meta_format field. */
5503 	#define RX_PKT_V2_CMPL_METADATA1_MASK             UINT32_C(0xf000)
5504 	#define RX_PKT_V2_CMPL_METADATA1_SFT              12
5505 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
5506 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_MASK     UINT32_C(0x7000)
5507 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_SFT      12
5508 	/* 0x88a8 */
5509 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID88A8 \
5510 		(UINT32_C(0x0) << 12)
5511 	/* 0x8100 */
5512 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID8100 \
5513 		(UINT32_C(0x1) << 12)
5514 	/* 0x9100 */
5515 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9100 \
5516 		(UINT32_C(0x2) << 12)
5517 	/* 0x9200 */
5518 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9200 \
5519 		(UINT32_C(0x3) << 12)
5520 	/* 0x9300 */
5521 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPID9300 \
5522 		(UINT32_C(0x4) << 12)
5523 	/* Value programmed in CFA VLANTPID register. */
5524 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG \
5525 		(UINT32_C(0x5) << 12)
5526 	#define RX_PKT_V2_CMPL_METADATA1_TPID_SEL_LAST \
5527 		RX_PKT_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG
5528 	/* When meta_format != 0, this value is the VLAN valid. */
5529 	#define RX_PKT_V2_CMPL_METADATA1_VALID             UINT32_C(0x8000)
5530 	/*
5531 	 * This value is the RSS hash value calculated for the packet
5532 	 * based on the mode bits and key value in the VNIC. When vee_cmpl_mode
5533 	 * is set in VNIC context, this is the lower 32b of the host address
5534 	 * from the first BD used to place the packet.
5535 	 */
5536 	uint32_t	rss_hash;
5537 } __rte_packed_end;
5538 
5539 /* Last 16 bytes of RX Packet V2 Completion Record */
5540 /* rx_pkt_v2_cmpl_hi (size:128b/16B) */
5541 struct __rte_packed_begin rx_pkt_v2_cmpl_hi {
5542 	uint32_t	flags2;
5543 	/*
5544 	 * When this bit is '0', the cs_ok field has the following definition:-
5545 	 * ip_cs_ok[2:0] = The number of header groups with a valid IP checksum
5546 	 * in the delivered packet, counted from the outer-most header group to
5547 	 * the inner-most header group, stopping at the first error. -
5548 	 * l4_cs_ok[5:3] = The number of header groups with a valid L4 checksum
5549 	 * in the delivered packet, counted from the outer-most header group to
5550 	 * the inner-most header group, stopping at the first error. When this
5551 	 * bit is '1', the cs_ok field has the following definition: -
5552 	 * hdr_cnt[2:0] = The number of header groups that were parsed by the
5553 	 * chip and passed in the delivered packet. - ip_cs_all_ok[3] =This bit
5554 	 * will be '1' if all the parsed header groups with an IP checksum are
5555 	 * valid. - l4_cs_all_ok[4] = This bit will be '1' if all the parsed
5556 	 * header groups with an L4 checksum are valid.
5557 	 */
5558 	#define RX_PKT_V2_CMPL_HI_FLAGS2_CS_ALL_OK_MODE \
5559 		UINT32_C(0x8)
5560 	/* This value indicates what format the metadata field is. */
5561 	#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_MASK \
5562 		UINT32_C(0xf0)
5563 	#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_SFT            4
5564 	/* There is no metadata information. Values are zero. */
5565 	#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_NONE \
5566 		(UINT32_C(0x0) << 4)
5567 	/*
5568 	 * The {metadata1, metadata0} fields contain the vtag
5569 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
5570 	 * de, vid[11:0]} The metadata2 field contains the table scope
5571 	 * and action record pointer. - metadata2[25:0] contains the
5572 	 * action record pointer. - metadata2[31:26] contains the table
5573 	 * scope.
5574 	 */
5575 	#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_ACT_REC_PTR \
5576 		(UINT32_C(0x1) << 4)
5577 	/*
5578 	 * The {metadata1, metadata0} fields contain the vtag
5579 	 * information:
5580 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
5581 	 * The metadata2 field contains the Tunnel ID
5582 	 * value, justified to LSB.
5583 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
5584 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
5585 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
5586 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
5587 	 * - IPv4 = 0 (not populated)
5588 	 * - IPv6 = Flow Label[19:0]
5589 	 * - PPPoE = sessionID[15:0]
5590 	 * - MPLs = Outer label[19:0]
5591 	 * - UPAR = Selected[31:0] with bit mask
5592 	 */
5593 	#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_TUNNEL_ID \
5594 		(UINT32_C(0x2) << 4)
5595 	/*
5596 	 * The {metadata1, metadata0} fields contain the vtag
5597 	 * information:
5598 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
5599 	 * The metadata2 field contains the 32b metadata from the prepended
5600 	 * header (chdr_data).
5601 	 */
5602 	#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_CHDR_DATA \
5603 		(UINT32_C(0x3) << 4)
5604 	/*
5605 	 * The {metadata1, metadata0} fields contain the vtag
5606 	 * information:
5607 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
5608 	 * The metadata2 field contains the outer_l3_offset,
5609 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
5610 	 * - metadata2[8:0] contains the outer_l3_offset.
5611 	 * - metadata2[17:9] contains the inner_l2_offset.
5612 	 * - metadata2[26:18] contains the inner_l3_offset.
5613 	 * - metadata2[31:27] contains the inner_l4_size.
5614 	 */
5615 	#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_HDR_OFFSET \
5616 		(UINT32_C(0x4) << 4)
5617 	#define RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_LAST \
5618 		RX_PKT_V2_CMPL_HI_FLAGS2_META_FORMAT_HDR_OFFSET
5619 	/*
5620 	 * This field indicates the IP type for the inner-most IP header.
5621 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
5622 	 * This value is only valid if itype indicates a packet
5623 	 * with an IP header.
5624 	 */
5625 	#define RX_PKT_V2_CMPL_HI_FLAGS2_IP_TYPE \
5626 		UINT32_C(0x100)
5627 	/*
5628 	 * This indicates that the complete 1's complement checksum was
5629 	 * calculated for the packet.
5630 	 */
5631 	#define RX_PKT_V2_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_CALC \
5632 		UINT32_C(0x200)
5633 	/*
5634 	 * This field indicates the status of IP and L4 CS calculations done
5635 	 * by the chip. The format of this field is indicated by the
5636 	 * cs_all_ok_mode bit.
5637 	 */
5638 	#define RX_PKT_V2_CMPL_HI_FLAGS2_CS_OK_MASK \
5639 		UINT32_C(0xfc00)
5640 	#define RX_PKT_V2_CMPL_HI_FLAGS2_CS_OK_SFT                  10
5641 	/*
5642 	 * This value is the complete 1's complement checksum calculated from
5643 	 * the start of the outer L3 header to the end of the packet (not
5644 	 * including the ethernet crc). It is valid when the
5645 	 * 'complete_checksum_calc' flag is set.
5646 	 */
5647 	#define RX_PKT_V2_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_MASK \
5648 		UINT32_C(0xffff0000)
5649 	#define RX_PKT_V2_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_SFT      16
5650 	/*
5651 	 * This is data from the CFA block as indicated by the meta_format
5652 	 * field.
5653 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
5654 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
5655 	 *   act_rec_ptr[25:0]}
5656 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
5657 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
5658 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
5659 	 * When vee_cmpl_mode is set in VNIC context, this is the upper 32b
5660 	 * of the host address from the first BD used to place the packet.
5661 	 */
5662 	uint32_t	metadata2;
5663 	uint16_t	errors_v2;
5664 	/*
5665 	 * This value is written by the NIC such that it will be different
5666 	 * for each pass through the completion queue. The even passes
5667 	 * will write 1. The odd passes will write 0.
5668 	 */
5669 	#define RX_PKT_V2_CMPL_HI_V2 \
5670 		UINT32_C(0x1)
5671 	#define RX_PKT_V2_CMPL_HI_ERRORS_MASK \
5672 		UINT32_C(0xfffe)
5673 	#define RX_PKT_V2_CMPL_HI_ERRORS_SFT                               1
5674 	/*
5675 	 * This error indicates that there was some sort of problem with
5676 	 * the BDs for the packet that was found after part of the
5677 	 * packet was already placed. The packet should be treated as
5678 	 * invalid.
5679 	 */
5680 	#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_MASK \
5681 		UINT32_C(0xe)
5682 	#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_SFT                   1
5683 	/* No buffer error */
5684 	#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_NO_BUFFER \
5685 		(UINT32_C(0x0) << 1)
5686 	/*
5687 	 * Did Not Fit: Packet did not fit into packet buffer provided.
5688 	 * For regular placement, this means the packet did not fit in
5689 	 * the buffer provided. For HDS and jumbo placement, this means
5690 	 * that the packet could not be placed into 8 physical buffers
5691 	 * (if fixed-size buffers are used), or that the packet could
5692 	 * not be placed in the number of physical buffers configured
5693 	 * for the VNIC (if variable-size buffers are used)
5694 	 */
5695 	#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_DID_NOT_FIT \
5696 		(UINT32_C(0x1) << 1)
5697 	/*
5698 	 * Not On Chip: All BDs needed for the packet were not on-chip
5699 	 * when the packet arrived. For regular placement, this error is
5700 	 * not valid. For HDS and jumbo placement, this means that not
5701 	 * enough agg BDs were posted to place the packet.
5702 	 */
5703 	#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_NOT_ON_CHIP \
5704 		(UINT32_C(0x2) << 1)
5705 	/*
5706 	 * Bad Format:
5707 	 * BDs were not formatted correctly.
5708 	 */
5709 	#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_BAD_FORMAT \
5710 		(UINT32_C(0x3) << 1)
5711 	/*
5712 	 * Flush:
5713 	 * There was a bad_format error on the previous operation
5714 	 */
5715 	#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_FLUSH \
5716 		(UINT32_C(0x5) << 1)
5717 	#define RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_LAST \
5718 		RX_PKT_V2_CMPL_HI_ERRORS_BUFFER_ERROR_FLUSH
5719 	/*
5720 	 * This indicates that there was an error in the outer tunnel
5721 	 * portion of the packet when this field is non-zero.
5722 	 */
5723 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_MASK \
5724 		UINT32_C(0x70)
5725 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_SFT                   4
5726 	/*
5727 	 * No additional error occurred on the outer tunnel portion
5728 	 * of the packet or the packet does not have a outer tunnel.
5729 	 */
5730 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_NO_ERROR \
5731 		(UINT32_C(0x0) << 4)
5732 	/*
5733 	 * Indicates that IP header version does not match expectation
5734 	 * from L2 Ethertype for IPv4 and IPv6 in the outer tunnel header.
5735 	 */
5736 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_L3_BAD_VERSION \
5737 		(UINT32_C(0x1) << 4)
5738 	/*
5739 	 * Indicates that header length is out of range in the outer
5740 	 * tunnel header. Valid for IPv4.
5741 	 */
5742 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_L3_BAD_HDR_LEN \
5743 		(UINT32_C(0x2) << 4)
5744 	/*
5745 	 * Indicates that physical packet is shorter than that claimed
5746 	 * by the outer tunnel l3 header length. Valid for IPv4, or
5747 	 * IPv6 outer tunnel packets.
5748 	 */
5749 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_IP_TOTAL_ERROR \
5750 		(UINT32_C(0x3) << 4)
5751 	/*
5752 	 * Indicates that the physical packet is shorter than that
5753 	 * claimed by the outer tunnel UDP header length for a outer
5754 	 * tunnel UDP packet that is not fragmented.
5755 	 */
5756 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_UDP_TOTAL_ERROR \
5757 		(UINT32_C(0x4) << 4)
5758 	/*
5759 	 * Indicates that the IPv4 TTL or IPv6 hop limit check have
5760 	 * failed (e.g. TTL = 0) in the outer tunnel header. Valid for
5761 	 * IPv4, and IPv6.
5762 	 */
5763 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_L3_BAD_TTL \
5764 		(UINT32_C(0x5) << 4)
5765 	/*
5766 	 * Indicates that the IP checksum failed its check in the outer
5767 	 * tunnel header.
5768 	 */
5769 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_IP_CS_ERROR \
5770 		(UINT32_C(0x6) << 4)
5771 	/*
5772 	 * Indicates that the L4 checksum failed its check in the outer
5773 	 * tunnel header.
5774 	 */
5775 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_L4_CS_ERROR \
5776 		(UINT32_C(0x7) << 4)
5777 	#define RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_LAST \
5778 		RX_PKT_V2_CMPL_HI_ERRORS_OT_PKT_ERROR_OT_L4_CS_ERROR
5779 	/*
5780 	 * This indicates that there was a CRC error on either an FCoE
5781 	 * or RoCE packet. The itype indicates the packet type.
5782 	 */
5783 	#define RX_PKT_V2_CMPL_HI_ERRORS_CRC_ERROR \
5784 		UINT32_C(0x100)
5785 	/*
5786 	 * This indicates that there was an error in the tunnel portion
5787 	 * of the packet when this field is non-zero.
5788 	 */
5789 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_MASK \
5790 		UINT32_C(0xe00)
5791 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_SFT                    9
5792 	/*
5793 	 * No additional error occurred on the tunnel portion
5794 	 * of the packet or the packet does not have a tunnel.
5795 	 */
5796 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_NO_ERROR \
5797 		(UINT32_C(0x0) << 9)
5798 	/*
5799 	 * Indicates that IP header version does not match expectation
5800 	 * from L2 Ethertype for IPv4 and IPv6 in the tunnel header.
5801 	 */
5802 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION \
5803 		(UINT32_C(0x1) << 9)
5804 	/*
5805 	 * Indicates that header length is out of range in the tunnel
5806 	 * header. Valid for IPv4.
5807 	 */
5808 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN \
5809 		(UINT32_C(0x2) << 9)
5810 	/*
5811 	 * Indicates that physical packet is shorter than that claimed
5812 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6 tunnel
5813 	 * packet packets.
5814 	 */
5815 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR \
5816 		(UINT32_C(0x3) << 9)
5817 	/*
5818 	 * Indicates that the physical packet is shorter than that claimed
5819 	 * by the tunnel UDP header length for a tunnel UDP packet that is
5820 	 * not fragmented.
5821 	 */
5822 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR \
5823 		(UINT32_C(0x4) << 9)
5824 	/*
5825 	 * Indicates that the IPv4 TTL or IPv6 hop limit check have failed
5826 	 * (e.g. TTL = 0) in the tunnel header. Valid for IPv4, and IPv6.
5827 	 */
5828 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL \
5829 		(UINT32_C(0x5) << 9)
5830 	/*
5831 	 * Indicates that the IP checksum failed its check in the tunnel
5832 	 * header.
5833 	 */
5834 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_IP_CS_ERROR \
5835 		(UINT32_C(0x6) << 9)
5836 	/*
5837 	 * Indicates that the L4 checksum failed its check in the tunnel
5838 	 * header.
5839 	 */
5840 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_L4_CS_ERROR \
5841 		(UINT32_C(0x7) << 9)
5842 	#define RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_LAST \
5843 		RX_PKT_V2_CMPL_HI_ERRORS_T_PKT_ERROR_T_L4_CS_ERROR
5844 	/*
5845 	 * This indicates that there was an error in the inner
5846 	 * portion of the packet when this
5847 	 * field is non-zero.
5848 	 */
5849 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_MASK \
5850 		UINT32_C(0xf000)
5851 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_SFT                      12
5852 	/*
5853 	 * No additional error occurred on the tunnel portion
5854 	 * or the packet of the packet does not have a tunnel.
5855 	 */
5856 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_NO_ERROR \
5857 		(UINT32_C(0x0) << 12)
5858 	/*
5859 	 * Indicates that IP header version does not match
5860 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
5861 	 * option other than VFT was parsed on
5862 	 * FCoE packet.
5863 	 */
5864 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_VERSION \
5865 		(UINT32_C(0x1) << 12)
5866 	/*
5867 	 * indicates that header length is out of range. Valid for
5868 	 * IPv4 and RoCE
5869 	 */
5870 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN \
5871 		(UINT32_C(0x2) << 12)
5872 	/*
5873 	 * indicates that the IPv4 TTL or IPv6 hop limit check
5874 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
5875 	 */
5876 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_TTL \
5877 		(UINT32_C(0x3) << 12)
5878 	/*
5879 	 * Indicates that physical packet is shorter than that
5880 	 * claimed by the l3 header length. Valid for IPv4,
5881 	 * IPv6 packet or RoCE packets.
5882 	 */
5883 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_IP_TOTAL_ERROR \
5884 		(UINT32_C(0x4) << 12)
5885 	/*
5886 	 * Indicates that the physical packet is shorter than that
5887 	 * claimed by the UDP header length for a UDP packet that is
5888 	 * not fragmented.
5889 	 */
5890 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR \
5891 		(UINT32_C(0x5) << 12)
5892 	/*
5893 	 * Indicates that TCP header length > IP payload. Valid for
5894 	 * TCP packets only.
5895 	 */
5896 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN \
5897 		(UINT32_C(0x6) << 12)
5898 	/* Indicates that TCP header length < 5. Valid for TCP. */
5899 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL \
5900 		(UINT32_C(0x7) << 12)
5901 	/*
5902 	 * Indicates that TCP option headers result in a TCP header
5903 	 * size that does not match data offset in TCP header. Valid
5904 	 * for TCP.
5905 	 */
5906 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN \
5907 		(UINT32_C(0x8) << 12)
5908 	/*
5909 	 * Indicates that the IP checksum failed its check in the
5910 	 * inner header.
5911 	 */
5912 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_IP_CS_ERROR \
5913 		(UINT32_C(0x9) << 12)
5914 	/*
5915 	 * Indicates that the L4 checksum failed its check in the
5916 	 * inner header.
5917 	 */
5918 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L4_CS_ERROR \
5919 		(UINT32_C(0xa) << 12)
5920 	#define RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_LAST \
5921 		RX_PKT_V2_CMPL_HI_ERRORS_PKT_ERROR_L4_CS_ERROR
5922 	/*
5923 	 * This is data from the CFA block as indicated by the meta_format
5924 	 * field.
5925 	 */
5926 	uint16_t	metadata0;
5927 	/* When meta_format=1, this value is the VLAN VID. */
5928 	#define RX_PKT_V2_CMPL_HI_METADATA0_VID_MASK UINT32_C(0xfff)
5929 	#define RX_PKT_V2_CMPL_HI_METADATA0_VID_SFT 0
5930 	/* When meta_format=1, this value is the VLAN DE. */
5931 	#define RX_PKT_V2_CMPL_HI_METADATA0_DE      UINT32_C(0x1000)
5932 	/* When meta_format=1, this value is the VLAN PRI. */
5933 	#define RX_PKT_V2_CMPL_HI_METADATA0_PRI_MASK UINT32_C(0xe000)
5934 	#define RX_PKT_V2_CMPL_HI_METADATA0_PRI_SFT 13
5935 	/*
5936 	 * The timestamp field contains the 32b timestamp for the packet from
5937 	 * the MAC.
5938 	 */
5939 	uint32_t	timestamp;
5940 } __rte_packed_end;
5941 
5942 /* rx_pkt_v3_cmpl (size:128b/16B) */
5943 struct __rte_packed_begin rx_pkt_v3_cmpl {
5944 	uint16_t	flags_type;
5945 	/*
5946 	 * This field indicates the exact type of the completion.
5947 	 * By convention, the LSB identifies the length of the
5948 	 * record in 16B units. Even values indicate 16B
5949 	 * records. Odd values indicate 32B
5950 	 * records.
5951 	 */
5952 	#define RX_PKT_V3_CMPL_TYPE_MASK                      UINT32_C(0x3f)
5953 	#define RX_PKT_V3_CMPL_TYPE_SFT                       0
5954 	/*
5955 	 * RX L2 V3 completion:
5956 	 * Completion of and L2 RX packet. Length = 32B
5957 	 * This is the new version of the RX_L2 completion used in Thor2
5958 	 * and later chips.
5959 	 */
5960 	#define RX_PKT_V3_CMPL_TYPE_RX_L2_V3                    UINT32_C(0x17)
5961 	#define RX_PKT_V3_CMPL_TYPE_LAST \
5962 		RX_PKT_V3_CMPL_TYPE_RX_L2_V3
5963 	#define RX_PKT_V3_CMPL_FLAGS_MASK                     UINT32_C(0xffc0)
5964 	#define RX_PKT_V3_CMPL_FLAGS_SFT                      6
5965 	/*
5966 	 * When this bit is '1', it indicates a packet that has an
5967 	 * error of some type. Type of error is indicated in
5968 	 * error_flags.
5969 	 */
5970 	#define RX_PKT_V3_CMPL_FLAGS_ERROR                     UINT32_C(0x40)
5971 	/* This field indicates how the packet was placed in the buffer. */
5972 	#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_MASK            UINT32_C(0x380)
5973 	#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_SFT             7
5974 	/*
5975 	 * Normal:
5976 	 * Packet was placed using normal algorithm.
5977 	 */
5978 	#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_NORMAL \
5979 		(UINT32_C(0x0) << 7)
5980 	/*
5981 	 * Jumbo:
5982 	 * Packet was placed using jumbo algorithm.
5983 	 */
5984 	#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_JUMBO \
5985 		(UINT32_C(0x1) << 7)
5986 	/*
5987 	 * Header/Data Separation:
5988 	 * Packet was placed using Header/Data separation algorithm.
5989 	 * The separation location is indicated by the itype field.
5990 	 */
5991 	#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_HDS \
5992 		(UINT32_C(0x2) << 7)
5993 	/*
5994 	 * Truncation:
5995 	 * Packet was placed using truncation algorithm. The
5996 	 * placed (truncated) length is indicated in the payload_offset
5997 	 * field. The original length is indicated in the len field.
5998 	 */
5999 	#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_TRUNCATION \
6000 		(UINT32_C(0x3) << 7)
6001 	#define RX_PKT_V3_CMPL_FLAGS_PLACEMENT_LAST \
6002 		RX_PKT_V3_CMPL_FLAGS_PLACEMENT_TRUNCATION
6003 	/* This bit is '1' if the RSS field in this completion is valid. */
6004 	#define RX_PKT_V3_CMPL_FLAGS_RSS_VALID                 UINT32_C(0x400)
6005 	/*
6006 	 * This bit is '1' if metadata has been added to the end of the
6007 	 * packet in host memory. Metadata starts at the first 32B boundary
6008 	 * after the end of the packet for regular and jumbo placement.
6009 	 * It starts at the first 32B boundary after the end of the header
6010 	 * for HDS placement. The length of the metadata is indicated in the
6011 	 * metadata itself.
6012 	 */
6013 	#define RX_PKT_V3_CMPL_FLAGS_PKT_METADATA_PRESENT      UINT32_C(0x800)
6014 	/*
6015 	 * This value indicates what the inner packet determined for the
6016 	 * packet was.
6017 	 */
6018 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_MASK                UINT32_C(0xf000)
6019 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_SFT                 12
6020 	/*
6021 	 * Not Known:
6022 	 * Indicates that the packet type was not known.
6023 	 */
6024 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_NOT_KNOWN \
6025 		(UINT32_C(0x0) << 12)
6026 	/*
6027 	 * IP Packet:
6028 	 * Indicates that the packet was an IP packet, but further
6029 	 * classification was not possible.
6030 	 */
6031 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_IP \
6032 		(UINT32_C(0x1) << 12)
6033 	/*
6034 	 * TCP Packet:
6035 	 * Indicates that the packet was IP and TCP.
6036 	 * This indicates that the payload_offset field is valid.
6037 	 */
6038 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_TCP \
6039 		(UINT32_C(0x2) << 12)
6040 	/*
6041 	 * UDP Packet:
6042 	 * Indicates that the packet was IP and UDP.
6043 	 * This indicates that the payload_offset field is valid.
6044 	 */
6045 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_UDP \
6046 		(UINT32_C(0x3) << 12)
6047 	/*
6048 	 * FCoE Packet:
6049 	 * Indicates that the packet was recognized as a FCoE.
6050 	 * This also indicates that the payload_offset field is valid.
6051 	 */
6052 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_FCOE \
6053 		(UINT32_C(0x4) << 12)
6054 	/*
6055 	 * RoCE Packet:
6056 	 * Indicates that the packet was recognized as a RoCE.
6057 	 * This also indicates that the payload_offset field is valid.
6058 	 */
6059 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_ROCE \
6060 		(UINT32_C(0x5) << 12)
6061 	/*
6062 	 * ICMP Packet:
6063 	 * Indicates that the packet was recognized as ICMP.
6064 	 * This indicates that the payload_offset field is valid.
6065 	 */
6066 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_ICMP \
6067 		(UINT32_C(0x7) << 12)
6068 	/*
6069 	 * PTP packet wo/timestamp:
6070 	 * Indicates that the packet was recognized as a PTP
6071 	 * packet.
6072 	 */
6073 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP \
6074 		(UINT32_C(0x8) << 12)
6075 	/*
6076 	 * PTP packet w/timestamp:
6077 	 * Indicates that the packet was recognized as a PTP
6078 	 * packet and that a timestamp was taken for the packet.
6079 	 * The 4b sub-nanosecond portion of the timestamp is in
6080 	 * the payload_offset field.
6081 	 */
6082 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP \
6083 		(UINT32_C(0x9) << 12)
6084 	#define RX_PKT_V3_CMPL_FLAGS_ITYPE_LAST \
6085 		RX_PKT_V3_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP
6086 	/*
6087 	 * This is the length of the data for the packet stored in the
6088 	 * buffer(s) identified by the opaque value. This includes
6089 	 * the packet BD and any associated buffer BDs. This does not include
6090 	 * the length of any data places in aggregation BDs.
6091 	 */
6092 	uint16_t	len;
6093 	/*
6094 	 * This is a copy of the opaque field from the RX BD this completion
6095 	 * corresponds to.
6096 	 */
6097 	uint32_t	opaque;
6098 	uint16_t	rss_hash_type_agg_bufs_v1;
6099 	/*
6100 	 * This value is written by the NIC such that it will be different
6101 	 * for each pass through the completion queue. The even passes
6102 	 * will write 1. The odd passes will write 0.
6103 	 */
6104 	#define RX_PKT_V3_CMPL_V1                   UINT32_C(0x1)
6105 	/*
6106 	 * This value is the number of aggregation buffers that follow this
6107 	 * entry in the completion ring that are a part of this packet.
6108 	 * If the value is zero, then the packet is completely contained
6109 	 * in the buffer space provided for the packet in the RX ring.
6110 	 */
6111 	#define RX_PKT_V3_CMPL_AGG_BUFS_MASK        UINT32_C(0x3e)
6112 	#define RX_PKT_V3_CMPL_AGG_BUFS_SFT         1
6113 	/* unused1 is 1 b */
6114 	#define RX_PKT_V3_CMPL_UNUSED1              UINT32_C(0x40)
6115 	/*
6116 	 * This is the RSS hash type for the packet. The value is packed
6117 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
6118 	 * The value of tuple_extrac_op provides the information about
6119 	 * what fields the hash was computed on.
6120 	 * Note that 4-tuples values listed below are applicable
6121 	 * for layer 4 protocols supported and enabled for RSS in the
6122 	 * hardware, HWRM firmware, and drivers. For example, if RSS hash
6123 	 * is supported and enabled for TCP traffic only, then the values of
6124 	 * tuple_extract_op corresponding to 4-tuples are only valid for
6125 	 * TCP traffic.
6126 	 */
6127 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_MASK   UINT32_C(0xff80)
6128 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_SFT    7
6129 	/*
6130 	 * The RSS hash was computed over source IP address,
6131 	 * destination IP address, source port, and destination port of
6132 	 * inner IP and TCP or UDP headers.
6133 	 */
6134 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_0   (UINT32_C(0x0) << 7)
6135 	/*
6136 	 * The RSS hash was computed over source IP address and
6137 	 * destination IP address of inner IP header.
6138 	 */
6139 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_1   (UINT32_C(0x1) << 7)
6140 	/*
6141 	 * The RSS hash was computed over source IP address,
6142 	 * destination IP address, source port, and destination port of
6143 	 * IP and TCP or UDP headers of outer tunnel headers.
6144 	 * Note: For non-tunneled packets, this value is not applicable.
6145 	 */
6146 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_2   (UINT32_C(0x2) << 7)
6147 	/*
6148 	 * The RSS hash was computed over source IP address and
6149 	 * destination IP address of IP header of outer tunnel headers.
6150 	 * Note: For non-tunneled packets, this value is not applicable.
6151 	 */
6152 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_3   (UINT32_C(0x3) << 7)
6153 	/*
6154 	 * The RSS hash was computed over source IP address of the inner
6155 	 * IP header.
6156 	 */
6157 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_4   (UINT32_C(0x4) << 7)
6158 	/*
6159 	 * The RSS hash was computed over destination IP address of the
6160 	 * inner IP header.
6161 	 */
6162 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_5   (UINT32_C(0x5) << 7)
6163 	/*
6164 	 * The RSS hash was computed over source IP address of the outer
6165 	 * IP header.
6166 	 * Note: For non-tunneled packets, this value is not applicable.
6167 	 */
6168 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_6   (UINT32_C(0x6) << 7)
6169 	/*
6170 	 * The RSS hash was computed over destination IP address of the
6171 	 * outer IP header.
6172 	 * Note: For non-tunneled packets, this value is not applicable.
6173 	 */
6174 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_7   (UINT32_C(0x7) << 7)
6175 	/*
6176 	 * The RSS hash was computed over source IP address, destination
6177 	 * IP address, and flow label of the inner IP header.
6178 	 * Note: For packets without an inner IPv6 header, this value is not
6179 	 * this value is not applicable.
6180 	 */
6181 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_8   (UINT32_C(0x8) << 7)
6182 	/*
6183 	 * The RSS hash was computed over the flow label of the inner
6184 	 * IP header.
6185 	 * Note: For packets without an inner IPv6 header, this value
6186 	 * is not applicable.
6187 	 */
6188 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_9   (UINT32_C(0x9) << 7)
6189 	/*
6190 	 * The RSS hash was computed over source IP address, destination
6191 	 * IP address, and flow label of the outer IP header.
6192 	 * Note: For packets without an outer IPv6 header, this value is not
6193 	 * applicable.
6194 	 */
6195 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_10  (UINT32_C(0xa) << 7)
6196 	/*
6197 	 * The RSS hash was computed over the flow label of the outer
6198 	 * IP header.
6199 	 * Note: For packets without an outer IPv6 header, this value
6200 	 * is not applicable.
6201 	 */
6202 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_11  (UINT32_C(0xb) << 7)
6203 	/* The RSS hash was computed over tunnel context and tunnel ID field. */
6204 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_12  (UINT32_C(0xc) << 7)
6205 	/*
6206 	 * The RSS hash was computed over tunnel source IP address, tunnel
6207 	 * destination IP address, and tunnel ID field.
6208 	 */
6209 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_13  (UINT32_C(0xd) << 7)
6210 	/*
6211 	 * The RSS hash was computed over tunnel source IP address, tunnel
6212 	 * destination IP address, tunnel context, and tunnel ID field.
6213 	 */
6214 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_14  (UINT32_C(0xe) << 7)
6215 	#define RX_PKT_V3_CMPL_RSS_HASH_TYPE_LAST \
6216 		RX_PKT_V3_CMPL_RSS_HASH_TYPE_ENUM_14
6217 	uint16_t	metadata1_payload_offset;
6218 	/*
6219 	 * If truncation placement is not used, this value indicates the offset
6220 	 * in bytes from the beginning of the packet where the inner payload
6221 	 * starts. This value is valid for TCP, UDP, FCoE, and RoCE packets.
6222 	 * For PTP packets with timestamp (as indicated by the flags_itype
6223 	 * field), this field contains the 4b sub-nanosecond portion of the
6224 	 * timestamp.
6225 	 *
6226 	 * If truncation placement is used, this value represents the placed
6227 	 * (truncated) length of the packet.
6228 	 */
6229 	#define RX_PKT_V3_CMPL_PAYLOAD_OFFSET_MASK        UINT32_C(0x1ff)
6230 	#define RX_PKT_V3_CMPL_PAYLOAD_OFFSET_SFT         0
6231 	/* This is data from the CFA as indicated by the meta_format field. */
6232 	#define RX_PKT_V3_CMPL_METADATA1_MASK             UINT32_C(0xf000)
6233 	#define RX_PKT_V3_CMPL_METADATA1_SFT              12
6234 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
6235 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_MASK     UINT32_C(0x7000)
6236 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_SFT      12
6237 	/* 0x88a8 */
6238 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPID88A8 \
6239 		(UINT32_C(0x0) << 12)
6240 	/* 0x8100 */
6241 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPID8100 \
6242 		(UINT32_C(0x1) << 12)
6243 	/* 0x9100 */
6244 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPID9100 \
6245 		(UINT32_C(0x2) << 12)
6246 	/* 0x9200 */
6247 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPID9200 \
6248 		(UINT32_C(0x3) << 12)
6249 	/* 0x9300 */
6250 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPID9300 \
6251 		(UINT32_C(0x4) << 12)
6252 	/* Value programmed in CFA VLANTPID register. */
6253 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPIDCFG \
6254 		(UINT32_C(0x5) << 12)
6255 	#define RX_PKT_V3_CMPL_METADATA1_TPID_SEL_LAST \
6256 		RX_PKT_V3_CMPL_METADATA1_TPID_SEL_TPIDCFG
6257 	/* When meta_format != 0, this value is the VLAN valid. */
6258 	#define RX_PKT_V3_CMPL_METADATA1_VALID             UINT32_C(0x8000)
6259 	/*
6260 	 * This value is the RSS hash value calculated for the packet
6261 	 * based on the mode bits and key value in the VNIC. When hairpin_en
6262 	 * is set in VNIC context, this is the lower 32b of the host address
6263 	 * from the first BD used to place the packet.
6264 	 */
6265 	uint32_t	rss_hash;
6266 } __rte_packed_end;
6267 
6268 /* Last 16 bytes of RX Packet V3 Completion Record */
6269 /* rx_pkt_v3_cmpl_hi (size:128b/16B) */
6270 struct __rte_packed_begin rx_pkt_v3_cmpl_hi {
6271 	uint32_t	flags2;
6272 	/*
6273 	 * This indicates that the ip checksum was calculated for the inner
6274 	 * packet and that the ip_cs_error field indicates if there was an
6275 	 * error.
6276 	 */
6277 	#define RX_PKT_V3_CMPL_HI_FLAGS2_IP_CS_CALC \
6278 		UINT32_C(0x1)
6279 	/*
6280 	 * This indicates that the TCP, UDP or ICMP checksum was calculated
6281 	 * for the inner packet and that the l4_cs_error field indicates if
6282 	 * there was an error.
6283 	 */
6284 	#define RX_PKT_V3_CMPL_HI_FLAGS2_L4_CS_CALC \
6285 		UINT32_C(0x2)
6286 	/*
6287 	 * This indicates that the ip checksum was calculated for the tunnel
6288 	 * header and that the t_ip_cs_error field indicates if there was an
6289 	 * error.
6290 	 */
6291 	#define RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_CS_CALC \
6292 		UINT32_C(0x4)
6293 	/*
6294 	 * This indicates that the UDP checksum was calculated for the tunnel
6295 	 * packet and that the t_l4_cs_error field indicates if there was an
6296 	 * error.
6297 	 */
6298 	#define RX_PKT_V3_CMPL_HI_FLAGS2_T_L4_CS_CALC \
6299 		UINT32_C(0x8)
6300 	/* This value indicates what format the metadata field is. */
6301 	#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_MASK \
6302 		UINT32_C(0xf0)
6303 	#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_SFT            4
6304 	/* There is no metadata information. Values are zero. */
6305 	#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_NONE \
6306 		(UINT32_C(0x0) << 4)
6307 	/*
6308 	 * The {metadata1, metadata0} fields contain the vtag
6309 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
6310 	 * de, vid[11:0]} The metadata2 field contains the table scope
6311 	 * and action record pointer. - metadata2[25:0] contains the
6312 	 * action record pointer. - metadata2[31:26] contains the table
6313 	 * scope.
6314 	 */
6315 	#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_ACT_REC_PTR \
6316 		(UINT32_C(0x1) << 4)
6317 	/*
6318 	 * The {metadata1, metadata0} fields contain the vtag
6319 	 * information:
6320 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
6321 	 * The metadata2 field contains the Tunnel ID
6322 	 * value, justified to LSB.
6323 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
6324 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
6325 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
6326 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
6327 	 * - IPv4 = 0 (not populated)
6328 	 * - IPv6 = Flow Label[19:0]
6329 	 * - PPPoE = sessionID[15:0]
6330 	 * - MPLs = Outer label[19:0]
6331 	 * - UPAR = Selected[31:0] with bit mask
6332 	 */
6333 	#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_TUNNEL_ID \
6334 		(UINT32_C(0x2) << 4)
6335 	/*
6336 	 * The {metadata1, metadata0} fields contain the vtag
6337 	 * information:
6338 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
6339 	 * The metadata2 field contains the 32b metadata from the prepended
6340 	 * header (chdr_data).
6341 	 */
6342 	#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_CHDR_DATA \
6343 		(UINT32_C(0x3) << 4)
6344 	/*
6345 	 * The {metadata1, metadata0} fields contain the vtag
6346 	 * information:
6347 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
6348 	 * The metadata2 field contains the outer_l3_offset,
6349 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
6350 	 * - metadata2[8:0] contains the outer_l3_offset.
6351 	 * - metadata2[17:9] contains the inner_l2_offset.
6352 	 * - metadata2[26:18] contains the inner_l3_offset.
6353 	 * - metadata2[31:27] contains the inner_l4_size.
6354 	 */
6355 	#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_HDR_OFFSET \
6356 		(UINT32_C(0x4) << 4)
6357 	#define RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_LAST \
6358 		RX_PKT_V3_CMPL_HI_FLAGS2_META_FORMAT_HDR_OFFSET
6359 	/*
6360 	 * This field indicates the IP type for the inner-most IP header.
6361 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
6362 	 * This value is only valid if itype indicates a packet
6363 	 * with an IP header.
6364 	 */
6365 	#define RX_PKT_V3_CMPL_HI_FLAGS2_IP_TYPE \
6366 		UINT32_C(0x100)
6367 	/*
6368 	 * This indicates that the complete 1's complement checksum was
6369 	 * calculated for the packet.
6370 	 */
6371 	#define RX_PKT_V3_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_CALC \
6372 		UINT32_C(0x200)
6373 	/*
6374 	 * This field indicates the status of IP and L4 CS calculations done
6375 	 * by the chip. The format of this field is indicated by the
6376 	 * cs_all_ok_mode bit.
6377 	 */
6378 	#define RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_TYPE \
6379 		UINT32_C(0x400)
6380 	/* Indicates that the Tunnel IP type was IPv4 */
6381 	#define RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_TYPE_IPV4 \
6382 		(UINT32_C(0x0) << 10)
6383 	/* Indicates that the Tunnel IP type was IPv6 */
6384 	#define RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_TYPE_IPV6 \
6385 		(UINT32_C(0x1) << 10)
6386 	#define RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_TYPE_LAST \
6387 		RX_PKT_V3_CMPL_HI_FLAGS2_T_IP_TYPE_IPV6
6388 	/*
6389 	 * This value is the complete 1's complement checksum calculated from
6390 	 * the start of the outer L3 header to the end of the packet (not
6391 	 * including the ethernet crc). It is valid when the
6392 	 * 'complete_checksum_calc' flag is set.
6393 	 */
6394 	#define RX_PKT_V3_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_MASK \
6395 		UINT32_C(0xffff0000)
6396 	#define RX_PKT_V3_CMPL_HI_FLAGS2_COMPLETE_CHECKSUM_SFT      16
6397 	/*
6398 	 * This is data from the CFA block as indicated by the meta_format
6399 	 * field.
6400 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
6401 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
6402 	 *   act_rec_ptr[25:0]}
6403 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
6404 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
6405 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
6406 	 */
6407 	uint32_t	metadata2;
6408 	uint16_t	errors_v2;
6409 	/*
6410 	 * This value is written by the NIC such that it will be different
6411 	 * for each pass through the completion queue. The even passes
6412 	 * will write 1. The odd passes will write 0.
6413 	 */
6414 	#define RX_PKT_V3_CMPL_HI_V2 \
6415 		UINT32_C(0x1)
6416 	#define RX_PKT_V3_CMPL_HI_ERRORS_MASK \
6417 		UINT32_C(0xfffe)
6418 	#define RX_PKT_V3_CMPL_HI_ERRORS_SFT                               1
6419 	/*
6420 	 * This error indicates that there was some sort of problem with
6421 	 * the BDs for the packet that was found after part of the
6422 	 * packet was already placed. The packet should be treated as
6423 	 * invalid.
6424 	 */
6425 	#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_MASK \
6426 		UINT32_C(0xe)
6427 	#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_SFT                   1
6428 	/* No buffer error */
6429 	#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_NO_BUFFER \
6430 		(UINT32_C(0x0) << 1)
6431 	/*
6432 	 * Did Not Fit: Packet did not fit into packet buffer provided.
6433 	 * For regular placement, this means the packet did not fit in
6434 	 * the buffer provided. For HDS and jumbo placement, this means
6435 	 * that the packet could not be placed into 8 physical buffers.
6436 	 */
6437 	#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_DID_NOT_FIT \
6438 		(UINT32_C(0x1) << 1)
6439 	/*
6440 	 * Not On Chip: All BDs needed for the packet were not on-chip
6441 	 * when the packet arrived. For regular placement, this error is
6442 	 * not valid. For HDS and jumbo placement, this means that not
6443 	 * enough agg BDs were posted to place the packet.
6444 	 */
6445 	#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_NOT_ON_CHIP \
6446 		(UINT32_C(0x2) << 1)
6447 	/*
6448 	 * Bad Format:
6449 	 * BDs were not formatted correctly.
6450 	 */
6451 	#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_BAD_FORMAT \
6452 		(UINT32_C(0x3) << 1)
6453 	/*
6454 	 * Flush:
6455 	 * There was a bad_format error on the previous operation
6456 	 */
6457 	#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_FLUSH \
6458 		(UINT32_C(0x5) << 1)
6459 	#define RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_LAST \
6460 		RX_PKT_V3_CMPL_HI_ERRORS_BUFFER_ERROR_FLUSH
6461 	/* This indicates that there was an error in the IP header checksum. */
6462 	#define RX_PKT_V3_CMPL_HI_ERRORS_IP_CS_ERROR \
6463 		UINT32_C(0x10)
6464 	/*
6465 	 * This indicates that there was an error in the TCP, UDP or ICMP
6466 	 * checksum.
6467 	 */
6468 	#define RX_PKT_V3_CMPL_HI_ERRORS_L4_CS_ERROR \
6469 		UINT32_C(0x20)
6470 	/*
6471 	 * This indicates that there was an error in the tunnel IP header
6472 	 * checksum.
6473 	 */
6474 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_IP_CS_ERROR \
6475 		UINT32_C(0x40)
6476 	/* This indicates that there was an error in the tunnel UDP checksum. */
6477 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_L4_CS_ERROR \
6478 		UINT32_C(0x80)
6479 	/*
6480 	 * This indicates that there was a CRC error on either an FCoE
6481 	 * or RoCE packet. The itype indicates the packet type.
6482 	 */
6483 	#define RX_PKT_V3_CMPL_HI_ERRORS_CRC_ERROR \
6484 		UINT32_C(0x100)
6485 	/*
6486 	 * This indicates that there was an error in the tunnel portion
6487 	 * of the packet when this field is non-zero.
6488 	 */
6489 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_MASK \
6490 		UINT32_C(0xe00)
6491 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_SFT                    9
6492 	/*
6493 	 * No additional error occurred on the tunnel portion
6494 	 * of the packet or the packet does not have a tunnel.
6495 	 */
6496 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_NO_ERROR \
6497 		(UINT32_C(0x0) << 9)
6498 	/*
6499 	 * Indicates that IP header version does not match expectation
6500 	 * from L2 Ethertype for IPv4 and IPv6 in the tunnel header.
6501 	 */
6502 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION \
6503 		(UINT32_C(0x1) << 9)
6504 	/*
6505 	 * Indicates that header length is out of range in the tunnel
6506 	 * header. Valid for IPv4.
6507 	 */
6508 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN \
6509 		(UINT32_C(0x2) << 9)
6510 	/*
6511 	 * Indicates that physical packet is shorter than that claimed
6512 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6 tunnel
6513 	 * packet packets.
6514 	 */
6515 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR \
6516 		(UINT32_C(0x3) << 9)
6517 	/*
6518 	 * Indicates that the physical packet is shorter than that claimed
6519 	 * by the tunnel UDP header length for a tunnel UDP packet that is
6520 	 * not fragmented.
6521 	 */
6522 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR \
6523 		(UINT32_C(0x4) << 9)
6524 	/*
6525 	 * Indicates that the IPv4 TTL or IPv6 hop limit check have failed
6526 	 * (e.g. TTL = 0) in the tunnel header. Valid for IPv4, and IPv6.
6527 	 */
6528 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL \
6529 		(UINT32_C(0x5) << 9)
6530 	/*
6531 	 * Indicates that the physical packet is shorter than that claimed
6532 	 * by the tunnel header length. Valid for GTPv1-U packets.
6533 	 * header.
6534 	 */
6535 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_TOTAL_ERROR \
6536 		(UINT32_C(0x6) << 9)
6537 	#define RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_LAST \
6538 		RX_PKT_V3_CMPL_HI_ERRORS_T_PKT_ERROR_T_TOTAL_ERROR
6539 	/*
6540 	 * This indicates that there was an error in the inner
6541 	 * portion of the packet when this
6542 	 * field is non-zero.
6543 	 */
6544 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_MASK \
6545 		UINT32_C(0xf000)
6546 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_SFT                      12
6547 	/*
6548 	 * No additional error occurred on the tunnel portion
6549 	 * or the packet of the packet does not have a tunnel.
6550 	 */
6551 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_NO_ERROR \
6552 		(UINT32_C(0x0) << 12)
6553 	/*
6554 	 * Indicates that IP header version does not match
6555 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
6556 	 * option other than VFT was parsed on
6557 	 * FCoE packet.
6558 	 */
6559 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_VERSION \
6560 		(UINT32_C(0x1) << 12)
6561 	/*
6562 	 * indicates that header length is out of range. Valid for
6563 	 * IPv4 and RoCE
6564 	 */
6565 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN \
6566 		(UINT32_C(0x2) << 12)
6567 	/*
6568 	 * indicates that the IPv4 TTL or IPv6 hop limit check
6569 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
6570 	 */
6571 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L3_BAD_TTL \
6572 		(UINT32_C(0x3) << 12)
6573 	/*
6574 	 * Indicates that physical packet is shorter than that
6575 	 * claimed by the l3 header length. Valid for IPv4,
6576 	 * IPv6 packet or RoCE packets.
6577 	 */
6578 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_IP_TOTAL_ERROR \
6579 		(UINT32_C(0x4) << 12)
6580 	/*
6581 	 * Indicates that the physical packet is shorter than that
6582 	 * claimed by the UDP header length for a UDP packet that is
6583 	 * not fragmented.
6584 	 */
6585 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR \
6586 		(UINT32_C(0x5) << 12)
6587 	/*
6588 	 * Indicates that TCP header length > IP payload. Valid for
6589 	 * TCP packets only.
6590 	 */
6591 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN \
6592 		(UINT32_C(0x6) << 12)
6593 	/* Indicates that TCP header length < 5. Valid for TCP. */
6594 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL \
6595 		(UINT32_C(0x7) << 12)
6596 	/*
6597 	 * Indicates that TCP option headers result in a TCP header
6598 	 * size that does not match data offset in TCP header. Valid
6599 	 * for TCP.
6600 	 */
6601 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN \
6602 		(UINT32_C(0x8) << 12)
6603 	#define RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_LAST \
6604 		RX_PKT_V3_CMPL_HI_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
6605 	/*
6606 	 * This is data from the CFA block as indicated by the meta_format
6607 	 * field.
6608 	 */
6609 	uint16_t	metadata0;
6610 	/* When meta_format=1, this value is the VLAN VID. */
6611 	#define RX_PKT_V3_CMPL_HI_METADATA0_VID_MASK UINT32_C(0xfff)
6612 	#define RX_PKT_V3_CMPL_HI_METADATA0_VID_SFT 0
6613 	/* When meta_format=1, this value is the VLAN DE. */
6614 	#define RX_PKT_V3_CMPL_HI_METADATA0_DE      UINT32_C(0x1000)
6615 	/* When meta_format=1, this value is the VLAN PRI. */
6616 	#define RX_PKT_V3_CMPL_HI_METADATA0_PRI_MASK UINT32_C(0xe000)
6617 	#define RX_PKT_V3_CMPL_HI_METADATA0_PRI_SFT 13
6618 	/*
6619 	 * The timestamp field contains the 32b timestamp for the packet from
6620 	 * the MAC.
6621 	 *
6622 	 * When hairpin_en is set in VNIC context, this is the upper 32b of the
6623 	 * host address from the first BD used to place the packet.
6624 	 */
6625 	uint32_t	timestamp;
6626 } __rte_packed_end;
6627 
6628 /* rx_pkt_compress_cmpl (size:128b/16B) */
6629 struct __rte_packed_begin rx_pkt_compress_cmpl {
6630 	uint16_t	flags_type;
6631 	/*
6632 	 * This field indicates the exact type of the completion.
6633 	 * By convention, the LSB identifies the length of the
6634 	 * record in 16B units. Even values indicate 16B
6635 	 * records. Odd values indicate 32B
6636 	 * records.
6637 	 */
6638 	#define RX_PKT_COMPRESS_CMPL_TYPE_MASK                   UINT32_C(0x3f)
6639 	#define RX_PKT_COMPRESS_CMPL_TYPE_SFT                    0
6640 	/*
6641 	 * RX L2 completion:
6642 	 * This is the compressed version of Rx Completion for performance
6643 	 * applications. Length = 16B
6644 	 * This version of the completion record is used in Thor2 and later
6645 	 * chips.
6646 	 */
6647 	#define RX_PKT_COMPRESS_CMPL_TYPE_RX_L2_COMPRESS \
6648 		UINT32_C(0x10)
6649 	#define RX_PKT_COMPRESS_CMPL_TYPE_LAST \
6650 		RX_PKT_COMPRESS_CMPL_TYPE_RX_L2_COMPRESS
6651 	#define RX_PKT_COMPRESS_CMPL_FLAGS_MASK \
6652 		UINT32_C(0xffc0)
6653 	#define RX_PKT_COMPRESS_CMPL_FLAGS_SFT                   6
6654 	/*
6655 	 * When this bit is '1', it indicates a packet that has an
6656 	 * error of some type. Type of error is indicated in
6657 	 * error_flags.
6658 	 */
6659 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ERROR \
6660 		UINT32_C(0x40)
6661 	/*
6662 	 * This field indicates the status of IP and L4 CS calculations done
6663 	 * by the chip. The format of this field is indicated by the
6664 	 * cs_all_ok_mode bit.
6665 	 */
6666 	#define RX_PKT_COMPRESS_CMPL_FLAGS_T_IP_TYPE \
6667 		UINT32_C(0x100)
6668 	/* Indicates that the Tunnel IP type was IPv4 */
6669 	#define RX_PKT_COMPRESS_CMPL_FLAGS_T_IP_TYPE_IPV4 \
6670 		(UINT32_C(0x0) << 8)
6671 	/* Indicates that the Tunnel IP type was IPv6 */
6672 	#define RX_PKT_COMPRESS_CMPL_FLAGS_T_IP_TYPE_IPV6 \
6673 		(UINT32_C(0x1) << 8)
6674 	#define RX_PKT_COMPRESS_CMPL_FLAGS_T_IP_TYPE_LAST \
6675 		RX_PKT_COMPRESS_CMPL_FLAGS_T_IP_TYPE_IPV6
6676 	/*
6677 	 * This field indicates the IP type for the inner-most IP header.
6678 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
6679 	 * This value is only valid if itype indicates a packet
6680 	 * with an IP header.
6681 	 */
6682 	#define RX_PKT_COMPRESS_CMPL_FLAGS_IP_TYPE \
6683 		UINT32_C(0x200)
6684 	/* This bit is '1' if the RSS field in this completion is valid. */
6685 	#define RX_PKT_COMPRESS_CMPL_FLAGS_RSS_VALID \
6686 		UINT32_C(0x400)
6687 	/*
6688 	 * This value indicates what the inner packet determined for the
6689 	 * packet was.
6690 	 */
6691 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_MASK \
6692 		UINT32_C(0xf000)
6693 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_SFT              12
6694 	/*
6695 	 * Not Known:
6696 	 * Indicates that the packet type was not known.
6697 	 */
6698 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_NOT_KNOWN \
6699 		(UINT32_C(0x0) << 12)
6700 	/*
6701 	 * IP Packet:
6702 	 * Indicates that the packet was an IP packet, but further
6703 	 * classification was not possible.
6704 	 */
6705 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_IP \
6706 		(UINT32_C(0x1) << 12)
6707 	/*
6708 	 * TCP Packet:
6709 	 * Indicates that the packet was IP and TCP.
6710 	 * This indicates that the payload_offset field is valid.
6711 	 */
6712 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_TCP \
6713 		(UINT32_C(0x2) << 12)
6714 	/*
6715 	 * UDP Packet:
6716 	 * Indicates that the packet was IP and UDP.
6717 	 * This indicates that the payload_offset field is valid.
6718 	 */
6719 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_UDP \
6720 		(UINT32_C(0x3) << 12)
6721 	/*
6722 	 * FCoE Packet:
6723 	 * Indicates that the packet was recognized as a FCoE.
6724 	 * This also indicates that the payload_offset field is valid.
6725 	 */
6726 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_FCOE \
6727 		(UINT32_C(0x4) << 12)
6728 	/*
6729 	 * RoCE Packet:
6730 	 * Indicates that the packet was recognized as a RoCE.
6731 	 * This also indicates that the payload_offset field is valid.
6732 	 */
6733 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_ROCE \
6734 		(UINT32_C(0x5) << 12)
6735 	/*
6736 	 * ICMP Packet:
6737 	 * Indicates that the packet was recognized as ICMP.
6738 	 * This indicates that the payload_offset field is valid.
6739 	 */
6740 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_ICMP \
6741 		(UINT32_C(0x7) << 12)
6742 	/*
6743 	 * PTP packet wo/timestamp:
6744 	 * Indicates that the packet was recognized as a PTP
6745 	 * packet.
6746 	 */
6747 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_PTP_WO_TIMESTAMP \
6748 		(UINT32_C(0x8) << 12)
6749 	/*
6750 	 * PTP packet w/timestamp:
6751 	 * Indicates that the packet was recognized as a PTP
6752 	 * packet and that a timestamp was taken for the packet.
6753 	 * The 4b sub-nanosecond portion of the timestamp is in
6754 	 * the payload_offset field.
6755 	 */
6756 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP \
6757 		(UINT32_C(0x9) << 12)
6758 	#define RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_LAST \
6759 		RX_PKT_COMPRESS_CMPL_FLAGS_ITYPE_PTP_W_TIMESTAMP
6760 	/*
6761 	 * This is the length of the data for the packet stored in the
6762 	 * buffer(s) identified by the opaque value. This includes
6763 	 * the packet BD and any associated buffer BDs. This does not include
6764 	 * the length of any data places in aggregation BDs.
6765 	 */
6766 	uint16_t	len;
6767 	/*
6768 	 * This value is the RSS hash value calculated for the packet
6769 	 * based on the mode bits and key value in the VNIC. When hairpin_en
6770 	 * is set in VNIC context, this is the lower 32b of the host address
6771 	 * from the first BD used to place the packet.
6772 	 */
6773 	uint32_t	rss_hash;
6774 	uint16_t	metadata1_cs_error_calc_v1;
6775 	/*
6776 	 * This value is written by the NIC such that it will be different
6777 	 * for each pass through the completion queue. The even passes
6778 	 * will write 1. The odd passes will write 0.
6779 	 */
6780 	#define RX_PKT_COMPRESS_CMPL_V1 \
6781 		UINT32_C(0x1)
6782 	/* unused is 3 b */
6783 	#define RX_PKT_COMPRESS_CMPL_UNUSED_MASK \
6784 		UINT32_C(0xe)
6785 	#define RX_PKT_COMPRESS_CMPL_UNUSED_SFT                      1
6786 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_MASK \
6787 		UINT32_C(0xff0)
6788 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_SFT               4
6789 	/* This indicates that there was an error in the IP header checksum. */
6790 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_IP_CS_ERROR \
6791 		UINT32_C(0x10)
6792 	/*
6793 	 * This indicates that there was an error in the TCP, UDP or ICMP
6794 	 * checksum.
6795 	 */
6796 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_L4_CS_ERROR \
6797 		UINT32_C(0x20)
6798 	/*
6799 	 * This indicates that there was an error in the tunnel IP header
6800 	 * checksum.
6801 	 */
6802 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_T_IP_CS_ERROR \
6803 		UINT32_C(0x40)
6804 	/* This indicates that there was an error in the tunnel UDP checksum. */
6805 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_T_L4_CS_ERROR \
6806 		UINT32_C(0x80)
6807 	/*
6808 	 * This indicates that the ip checksum was calculated for the inner
6809 	 * packet and that the ip_cs_error field indicates if there was an
6810 	 * error.
6811 	 */
6812 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_IP_CS_CALC \
6813 		UINT32_C(0x100)
6814 	/*
6815 	 * This indicates that the TCP, UDP or ICMP checksum was calculated
6816 	 * for the inner packet and that the l4_cs_error field indicates if
6817 	 * there was an error.
6818 	 */
6819 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_L4_CS_CALC \
6820 		UINT32_C(0x200)
6821 	/*
6822 	 * This indicates that the ip checksum was calculated for the tunnel
6823 	 * header and that the t_ip_cs_error field indicates if there was an
6824 	 * error.
6825 	 */
6826 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_T_IP_CS_CALC \
6827 		UINT32_C(0x400)
6828 	/*
6829 	 * This indicates that the UDP checksum was calculated for the tunnel
6830 	 * packet and that the t_l4_cs_error field indicates if there was an
6831 	 * error.
6832 	 */
6833 	#define RX_PKT_COMPRESS_CMPL_CS_ERROR_CALC_T_L4_CS_CALC \
6834 		UINT32_C(0x800)
6835 	/* This is data from the CFA as indicated by the meta_format field. */
6836 	#define RX_PKT_COMPRESS_CMPL_METADATA1_MASK \
6837 		UINT32_C(0xf000)
6838 	#define RX_PKT_COMPRESS_CMPL_METADATA1_SFT                   12
6839 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
6840 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_MASK \
6841 		UINT32_C(0x7000)
6842 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_SFT           12
6843 	/* 0x88a8 */
6844 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPID88A8 \
6845 		(UINT32_C(0x0) << 12)
6846 	/* 0x8100 */
6847 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPID8100 \
6848 		(UINT32_C(0x1) << 12)
6849 	/* 0x9100 */
6850 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPID9100 \
6851 		(UINT32_C(0x2) << 12)
6852 	/* 0x9200 */
6853 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPID9200 \
6854 		(UINT32_C(0x3) << 12)
6855 	/* 0x9300 */
6856 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPID9300 \
6857 		(UINT32_C(0x4) << 12)
6858 	/* Value programmed in CFA VLANTPID register. */
6859 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPIDCFG \
6860 		(UINT32_C(0x5) << 12)
6861 	#define RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_LAST \
6862 		RX_PKT_COMPRESS_CMPL_METADATA1_TPID_SEL_TPIDCFG
6863 	/* When meta_format != 0, this value is the VLAN valid. */
6864 	#define RX_PKT_COMPRESS_CMPL_METADATA1_VALID \
6865 		UINT32_C(0x8000)
6866 	/* This is data from the CFA as indicated by the meta_format field. */
6867 	uint16_t	vlanc_tcid;
6868 	/* When meta_format!=0, this value is the VLAN VID. */
6869 	#define RX_PKT_COMPRESS_CMPL_VLANC_TCID_VID_MASK UINT32_C(0xfff)
6870 	#define RX_PKT_COMPRESS_CMPL_VLANC_TCID_VID_SFT 0
6871 	/* When meta_format!=0, this value is the VLAN DE. */
6872 	#define RX_PKT_COMPRESS_CMPL_VLANC_TCID_DE      UINT32_C(0x1000)
6873 	/* When meta_format!=0, this value is the VLAN PRI. */
6874 	#define RX_PKT_COMPRESS_CMPL_VLANC_TCID_PRI_MASK UINT32_C(0xe000)
6875 	#define RX_PKT_COMPRESS_CMPL_VLANC_TCID_PRI_SFT 13
6876 	uint32_t	errors_agg_bufs_opaque;
6877 	/* Lower 16bits of the Opaque field provided in the Rx BD. */
6878 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_OPAQUE_MASK \
6879 		UINT32_C(0xffff)
6880 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_OPAQUE_SFT \
6881 		0
6882 	/*
6883 	 * This value is the number of aggregation buffers that follow this
6884 	 * entry in the completion ring that are a part of this packet.
6885 	 * If the value is zero, then the packet is completely contained
6886 	 * in the buffer space provided for the packet in the RX ring.
6887 	 */
6888 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_AGG_BUFS_MASK \
6889 		UINT32_C(0x1f0000)
6890 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_AGG_BUFS_SFT \
6891 		16
6892 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_MASK \
6893 		UINT32_C(0x1fe00000)
6894 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_SFT \
6895 		21
6896 	/*
6897 	 * This indicates that there was an error in the inner
6898 	 * portion of the packet when this
6899 	 * field is non-zero.
6900 	 */
6901 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_MASK \
6902 		UINT32_C(0x1e00000)
6903 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_SFT \
6904 		21
6905 	/*
6906 	 * No additional error occurred on the tunnel portion
6907 	 * or the packet of the packet does not have a tunnel.
6908 	 */
6909 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_NO_ERROR \
6910 		(UINT32_C(0x0) << 21)
6911 	/*
6912 	 * Indicates that IP header version does not match
6913 	 * expectation from L2 Ethertype for IPv4 and IPv6 or that
6914 	 * option other than VFT was parsed on
6915 	 * FCoE packet.
6916 	 */
6917 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L3_BAD_VERSION \
6918 		(UINT32_C(0x1) << 21)
6919 	/*
6920 	 * indicates that header length is out of range. Valid for
6921 	 * IPv4 and RoCE
6922 	 */
6923 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN \
6924 		(UINT32_C(0x2) << 21)
6925 	/*
6926 	 * indicates that the IPv4 TTL or IPv6 hop limit check
6927 	 * have failed (e.g. TTL = 0). Valid for IPv4, and IPv6
6928 	 */
6929 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L3_BAD_TTL \
6930 		(UINT32_C(0x3) << 21)
6931 	/*
6932 	 * Indicates that physical packet is shorter than that
6933 	 * claimed by the l3 header length. Valid for IPv4,
6934 	 * IPv6 packet or RoCE packets.
6935 	 */
6936 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_IP_TOTAL_ERROR \
6937 		(UINT32_C(0x4) << 21)
6938 	/*
6939 	 * Indicates that the physical packet is shorter than that
6940 	 * claimed by the UDP header length for a UDP packet that is
6941 	 * not fragmented.
6942 	 */
6943 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR \
6944 		(UINT32_C(0x5) << 21)
6945 	/*
6946 	 * Indicates that TCP header length > IP payload. Valid for
6947 	 * TCP packets only.
6948 	 */
6949 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN \
6950 		(UINT32_C(0x6) << 21)
6951 	/* Indicates that TCP header length < 5. Valid for TCP. */
6952 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL \
6953 		(UINT32_C(0x7) << 21)
6954 	/*
6955 	 * Indicates that TCP option headers result in a TCP header
6956 	 * size that does not match data offset in TCP header. Valid
6957 	 * for TCP.
6958 	 */
6959 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN \
6960 		(UINT32_C(0x8) << 21)
6961 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_LAST \
6962 		RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
6963 	/*
6964 	 * This indicates that there was an error in the tunnel portion
6965 	 * of the packet when this field is non-zero.
6966 	 */
6967 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_MASK \
6968 		UINT32_C(0xe000000)
6969 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_SFT \
6970 		25
6971 	/*
6972 	 * No additional error occurred on the tunnel portion
6973 	 * of the packet or the packet does not have a tunnel.
6974 	 */
6975 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_NO_ERROR \
6976 		(UINT32_C(0x0) << 25)
6977 	/*
6978 	 * Indicates that IP header version does not match expectation
6979 	 * from L2 Ethertype for IPv4 and IPv6 in the tunnel header.
6980 	 */
6981 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION \
6982 		(UINT32_C(0x1) << 25)
6983 	/*
6984 	 * Indicates that header length is out of range in the tunnel
6985 	 * header. Valid for IPv4.
6986 	 */
6987 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN \
6988 		(UINT32_C(0x2) << 25)
6989 	/*
6990 	 * Indicates that physical packet is shorter than that claimed
6991 	 * by the tunnel l3 header length. Valid for IPv4, or IPv6 tunnel
6992 	 * packet packets.
6993 	 */
6994 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR \
6995 		(UINT32_C(0x3) << 25)
6996 	/*
6997 	 * Indicates that the physical packet is shorter than that claimed
6998 	 * by the tunnel UDP header length for a tunnel UDP packet that is
6999 	 * not fragmented.
7000 	 */
7001 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR \
7002 		(UINT32_C(0x4) << 25)
7003 	/*
7004 	 * Indicates that the IPv4 TTL or IPv6 hop limit check have failed
7005 	 * (e.g. TTL = 0) in the tunnel header. Valid for IPv4, and IPv6.
7006 	 */
7007 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL \
7008 		(UINT32_C(0x5) << 25)
7009 	/*
7010 	 * Indicates that the IP checksum failed its check in the tunnel
7011 	 * header.
7012 	 */
7013 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_IP_CS_ERROR \
7014 		(UINT32_C(0x6) << 25)
7015 	/*
7016 	 * Indicates that the L4 checksum failed its check in the tunnel
7017 	 * header.
7018 	 */
7019 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_L4_CS_ERROR \
7020 		(UINT32_C(0x7) << 25)
7021 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_LAST \
7022 		RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_T_PKT_ERROR_T_L4_CS_ERROR
7023 	/*
7024 	 * This indicates that there was a CRC error on either an FCoE
7025 	 * or RoCE packet. The itype indicates the packet type.
7026 	 */
7027 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_ERRORS_CRC_ERROR \
7028 		UINT32_C(0x10000000)
7029 	/* unused1 is 3 b */
7030 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_UNUSED1_MASK \
7031 		UINT32_C(0xe0000000)
7032 	#define RX_PKT_COMPRESS_CMPL_ERRORS_AGG_BUFS_OPAQUE_UNUSED1_SFT \
7033 		29
7034 } __rte_packed_end;
7035 
7036 /*
7037  * This TPA completion structure is used on devices where the
7038  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
7039  */
7040 /* rx_tpa_start_cmpl (size:128b/16B) */
7041 struct __rte_packed_begin rx_tpa_start_cmpl {
7042 	uint16_t	flags_type;
7043 	/*
7044 	 * This field indicates the exact type of the completion.
7045 	 * By convention, the LSB identifies the length of the
7046 	 * record in 16B units. Even values indicate 16B
7047 	 * records. Odd values indicate 32B
7048 	 * records.
7049 	 */
7050 	#define RX_TPA_START_CMPL_TYPE_MASK                UINT32_C(0x3f)
7051 	#define RX_TPA_START_CMPL_TYPE_SFT                 0
7052 	/*
7053 	 * RX L2 TPA Start Completion:
7054 	 * Completion at the beginning of a TPA operation.
7055 	 * Length = 32B
7056 	 */
7057 	#define RX_TPA_START_CMPL_TYPE_RX_TPA_START          UINT32_C(0x13)
7058 	#define RX_TPA_START_CMPL_TYPE_LAST \
7059 		RX_TPA_START_CMPL_TYPE_RX_TPA_START
7060 	#define RX_TPA_START_CMPL_FLAGS_MASK               UINT32_C(0xffc0)
7061 	#define RX_TPA_START_CMPL_FLAGS_SFT                6
7062 	/* This bit will always be '0' for TPA start completions. */
7063 	#define RX_TPA_START_CMPL_FLAGS_ERROR               UINT32_C(0x40)
7064 	/* This field indicates how the packet was placed in the buffer. */
7065 	#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_MASK      UINT32_C(0x380)
7066 	#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_SFT       7
7067 	/*
7068 	 * Jumbo:
7069 	 * TPA Packet was placed using jumbo algorithm. This means
7070 	 * that the first buffer will be filled with data before
7071 	 * moving to aggregation buffers. Each aggregation buffer
7072 	 * will be filled before moving to the next aggregation
7073 	 * buffer.
7074 	 */
7075 	#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_JUMBO \
7076 		(UINT32_C(0x1) << 7)
7077 	/*
7078 	 * Header/Data Separation:
7079 	 * Packet was placed using Header/Data separation algorithm.
7080 	 * The separation location is indicated by the itype field.
7081 	 */
7082 	#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_HDS \
7083 		(UINT32_C(0x2) << 7)
7084 	/*
7085 	 * GRO/Jumbo:
7086 	 * Packet will be placed using GRO/Jumbo where the first
7087 	 * packet is filled with data. Subsequent packets will be
7088 	 * placed such that any one packet does not span two
7089 	 * aggregation buffers unless it starts at the beginning of
7090 	 * an aggregation buffer.
7091 	 */
7092 	#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_GRO_JUMBO \
7093 		(UINT32_C(0x5) << 7)
7094 	/*
7095 	 * GRO/Header-Data Separation:
7096 	 * Packet will be placed using GRO/HDS where the header
7097 	 * is in the first packet.
7098 	 * Payload of each packet will be
7099 	 * placed such that any one packet does not span two
7100 	 * aggregation buffers unless it starts at the beginning of
7101 	 * an aggregation buffer.
7102 	 */
7103 	#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_GRO_HDS \
7104 		(UINT32_C(0x6) << 7)
7105 	#define RX_TPA_START_CMPL_FLAGS_PLACEMENT_LAST \
7106 		RX_TPA_START_CMPL_FLAGS_PLACEMENT_GRO_HDS
7107 	/* This bit is '1' if the RSS field in this completion is valid. */
7108 	#define RX_TPA_START_CMPL_FLAGS_RSS_VALID           UINT32_C(0x400)
7109 	/* unused is 1 b */
7110 	#define RX_TPA_START_CMPL_FLAGS_UNUSED              UINT32_C(0x800)
7111 	/*
7112 	 * This value indicates what the inner packet determined for the
7113 	 * packet was.
7114 	 */
7115 	#define RX_TPA_START_CMPL_FLAGS_ITYPE_MASK          UINT32_C(0xf000)
7116 	#define RX_TPA_START_CMPL_FLAGS_ITYPE_SFT           12
7117 	/*
7118 	 * TCP Packet:
7119 	 * Indicates that the packet was IP and TCP.
7120 	 */
7121 	#define RX_TPA_START_CMPL_FLAGS_ITYPE_TCP \
7122 		(UINT32_C(0x2) << 12)
7123 	#define RX_TPA_START_CMPL_FLAGS_ITYPE_LAST \
7124 		RX_TPA_START_CMPL_FLAGS_ITYPE_TCP
7125 	/*
7126 	 * This value indicates the amount of packet data written to the
7127 	 * buffer the opaque field in this completion corresponds to.
7128 	 */
7129 	uint16_t	len;
7130 	/*
7131 	 * This is a copy of the opaque field from the RX BD this completion
7132 	 * corresponds to.
7133 	 */
7134 	uint32_t	opaque;
7135 	/*
7136 	 * This value is written by the NIC such that it will be different
7137 	 * for each pass through the completion queue. The even passes
7138 	 * will write 1. The odd passes will write 0.
7139 	 */
7140 	uint8_t	v1;
7141 	/*
7142 	 * This value is written by the NIC such that it will be different
7143 	 * for each pass through the completion queue. The even passes
7144 	 * will write 1. The odd passes will write 0.
7145 	 */
7146 	#define RX_TPA_START_CMPL_V1 UINT32_C(0x1)
7147 	#define RX_TPA_START_CMPL_LAST RX_TPA_START_CMPL_V1
7148 	/*
7149 	 * This is the RSS hash type for the packet. The value is packed
7150 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
7151 	 *
7152 	 * The value of tuple_extrac_op provides the information about
7153 	 * what fields the hash was computed on.
7154 	 * * 0: The RSS hash was computed over source IP address,
7155 	 * destination IP address, source port, and destination port of inner
7156 	 * IP and TCP or UDP headers. Note: For non-tunneled packets,
7157 	 * the packet headers are considered inner packet headers for the RSS
7158 	 * hash computation purpose.
7159 	 * * 1: The RSS hash was computed over source IP address and destination
7160 	 * IP address of inner IP header. Note: For non-tunneled packets,
7161 	 * the packet headers are considered inner packet headers for the RSS
7162 	 * hash computation purpose.
7163 	 * * 2: The RSS hash was computed over source IP address,
7164 	 * destination IP address, source port, and destination port of
7165 	 * IP and TCP or UDP headers of outer tunnel headers.
7166 	 * Note: For non-tunneled packets, this value is not applicable.
7167 	 * * 3: The RSS hash was computed over source IP address and
7168 	 * destination IP address of IP header of outer tunnel headers.
7169 	 * Note: For non-tunneled packets, this value is not applicable.
7170 	 *
7171 	 * Note that 4-tuples values listed above are applicable
7172 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
7173 	 * HWRM firmware, and drivers. For example, if RSS hash is supported and
7174 	 * enabled for TCP traffic only, then the values of tuple_extract_op
7175 	 * corresponding to 4-tuples are only valid for TCP traffic.
7176 	 */
7177 	uint8_t	rss_hash_type;
7178 	/*
7179 	 * This is the aggregation ID that the completion is associated
7180 	 * with. Use this number to correlate the TPA start completion
7181 	 * with the TPA end completion.
7182 	 */
7183 	uint16_t	agg_id;
7184 	/* unused2 is 9 b */
7185 	#define RX_TPA_START_CMPL_UNUSED2_MASK UINT32_C(0x1ff)
7186 	#define RX_TPA_START_CMPL_UNUSED2_SFT 0
7187 	/*
7188 	 * This is the aggregation ID that the completion is associated
7189 	 * with. Use this number to correlate the TPA start completion
7190 	 * with the TPA end completion.
7191 	 */
7192 	#define RX_TPA_START_CMPL_AGG_ID_MASK UINT32_C(0xfe00)
7193 	#define RX_TPA_START_CMPL_AGG_ID_SFT  9
7194 	/*
7195 	 * This value is the RSS hash value calculated for the packet
7196 	 * based on the mode bits and key value in the VNIC.
7197 	 */
7198 	uint32_t	rss_hash;
7199 } __rte_packed_end;
7200 
7201 /*
7202  * Last 16 bytes of rx_tpa_start_cmpl.
7203  *
7204  * This TPA completion structure is used on devices where the
7205  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
7206  */
7207 /* rx_tpa_start_cmpl_hi (size:128b/16B) */
7208 struct __rte_packed_begin rx_tpa_start_cmpl_hi {
7209 	uint32_t	flags2;
7210 	/*
7211 	 * This indicates that the ip checksum was calculated for the
7212 	 * inner packet and that the sum passed for all segments
7213 	 * included in the aggregation.
7214 	 */
7215 	#define RX_TPA_START_CMPL_FLAGS2_IP_CS_CALC       UINT32_C(0x1)
7216 	/*
7217 	 * This indicates that the TCP, UDP or ICMP checksum was
7218 	 * calculated for the inner packet and that the sum passed
7219 	 * for all segments included in the aggregation.
7220 	 */
7221 	#define RX_TPA_START_CMPL_FLAGS2_L4_CS_CALC       UINT32_C(0x2)
7222 	/*
7223 	 * This indicates that the ip checksum was calculated for the
7224 	 * tunnel header and that the sum passed for all segments
7225 	 * included in the aggregation.
7226 	 */
7227 	#define RX_TPA_START_CMPL_FLAGS2_T_IP_CS_CALC     UINT32_C(0x4)
7228 	/*
7229 	 * This indicates that the UDP checksum was
7230 	 * calculated for the tunnel packet and that the sum passed for
7231 	 * all segments included in the aggregation.
7232 	 */
7233 	#define RX_TPA_START_CMPL_FLAGS2_T_L4_CS_CALC     UINT32_C(0x8)
7234 	/* This value indicates what format the metadata field is. */
7235 	#define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_MASK UINT32_C(0xf0)
7236 	#define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_SFT  4
7237 	/* No metadata information. Value is zero. */
7238 	#define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_NONE \
7239 		(UINT32_C(0x0) << 4)
7240 	/*
7241 	 * The metadata field contains the VLAN tag and TPID value.
7242 	 * - metadata[11:0] contains the vlan VID value.
7243 	 * - metadata[12] contains the vlan DE value.
7244 	 * - metadata[15:13] contains the vlan PRI value.
7245 	 * - metadata[31:16] contains the vlan TPID value.
7246 	 */
7247 	#define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN \
7248 		(UINT32_C(0x1) << 4)
7249 	#define RX_TPA_START_CMPL_FLAGS2_META_FORMAT_LAST \
7250 		RX_TPA_START_CMPL_FLAGS2_META_FORMAT_VLAN
7251 	/*
7252 	 * This field indicates the IP type for the inner-most IP header.
7253 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
7254 	 */
7255 	#define RX_TPA_START_CMPL_FLAGS2_IP_TYPE          UINT32_C(0x100)
7256 	/*
7257 	 * This is data from the CFA block as indicated by the meta_format
7258 	 * field.
7259 	 */
7260 	uint32_t	metadata;
7261 	/* When meta_format=1, this value is the VLAN VID. */
7262 	#define RX_TPA_START_CMPL_METADATA_VID_MASK UINT32_C(0xfff)
7263 	#define RX_TPA_START_CMPL_METADATA_VID_SFT  0
7264 	/* When meta_format=1, this value is the VLAN DE. */
7265 	#define RX_TPA_START_CMPL_METADATA_DE       UINT32_C(0x1000)
7266 	/* When meta_format=1, this value is the VLAN PRI. */
7267 	#define RX_TPA_START_CMPL_METADATA_PRI_MASK UINT32_C(0xe000)
7268 	#define RX_TPA_START_CMPL_METADATA_PRI_SFT  13
7269 	/* When meta_format=1, this value is the VLAN TPID. */
7270 	#define RX_TPA_START_CMPL_METADATA_TPID_MASK UINT32_C(0xffff0000)
7271 	#define RX_TPA_START_CMPL_METADATA_TPID_SFT 16
7272 	uint16_t	v2;
7273 	/*
7274 	 * This value is written by the NIC such that it will be different
7275 	 * for each pass through the completion queue. The even passes
7276 	 * will write 1. The odd passes will write 0.
7277 	 */
7278 	#define RX_TPA_START_CMPL_V2     UINT32_C(0x1)
7279 	/*
7280 	 * This field identifies the CFA action rule that was used for this
7281 	 * packet.
7282 	 */
7283 	uint16_t	cfa_code;
7284 	/*
7285 	 * This is the size in bytes of the inner most L4 header.
7286 	 * This can be subtracted from the payload_offset to determine
7287 	 * the start of the inner most L4 header.
7288 	 */
7289 	uint32_t	inner_l4_size_inner_l3_offset_inner_l2_offset_outer_l3_offset;
7290 	/*
7291 	 * This is the offset from the beginning of the packet in bytes for
7292 	 * the outer L3 header. If there is no outer L3 header, then this
7293 	 * value is zero.
7294 	 */
7295 	#define RX_TPA_START_CMPL_OUTER_L3_OFFSET_MASK UINT32_C(0x1ff)
7296 	#define RX_TPA_START_CMPL_OUTER_L3_OFFSET_SFT 0
7297 	/*
7298 	 * This is the offset from the beginning of the packet in bytes for
7299 	 * the inner most L2 header.
7300 	 */
7301 	#define RX_TPA_START_CMPL_INNER_L2_OFFSET_MASK UINT32_C(0x3fe00)
7302 	#define RX_TPA_START_CMPL_INNER_L2_OFFSET_SFT 9
7303 	/*
7304 	 * This is the offset from the beginning of the packet in bytes for
7305 	 * the inner most L3 header.
7306 	 */
7307 	#define RX_TPA_START_CMPL_INNER_L3_OFFSET_MASK UINT32_C(0x7fc0000)
7308 	#define RX_TPA_START_CMPL_INNER_L3_OFFSET_SFT 18
7309 	/*
7310 	 * This is the size in bytes of the inner most L4 header.
7311 	 * This can be subtracted from the payload_offset to determine
7312 	 * the start of the inner most L4 header.
7313 	 */
7314 	#define RX_TPA_START_CMPL_INNER_L4_SIZE_MASK  UINT32_C(0xf8000000)
7315 	#define RX_TPA_START_CMPL_INNER_L4_SIZE_SFT   27
7316 } __rte_packed_end;
7317 
7318 /*
7319  * This TPA completion structure is used on devices where the
7320  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
7321  * RX L2 TPA Start V2 Completion Record (32 bytes split to 2 16-byte
7322  * struct)
7323  */
7324 /* rx_tpa_start_v2_cmpl (size:128b/16B) */
7325 struct __rte_packed_begin rx_tpa_start_v2_cmpl {
7326 	uint16_t	flags_type;
7327 	/*
7328 	 * This field indicates the exact type of the completion.
7329 	 * By convention, the LSB identifies the length of the
7330 	 * record in 16B units. Even values indicate 16B
7331 	 * records. Odd values indicate 32B
7332 	 * records.
7333 	 */
7334 	#define RX_TPA_START_V2_CMPL_TYPE_MASK \
7335 		UINT32_C(0x3f)
7336 	#define RX_TPA_START_V2_CMPL_TYPE_SFT                       0
7337 	/*
7338 	 * RX L2 TPA Start V2 Completion:
7339 	 * Completion at the beginning of a TPA operation.
7340 	 * Length = 32B
7341 	 * This is the new version of the RX_TPA_START completion used
7342 	 * in SR2 and later chips.
7343 	 */
7344 	#define RX_TPA_START_V2_CMPL_TYPE_RX_TPA_START_V2 \
7345 		UINT32_C(0xd)
7346 	#define RX_TPA_START_V2_CMPL_TYPE_LAST \
7347 		RX_TPA_START_V2_CMPL_TYPE_RX_TPA_START_V2
7348 	#define RX_TPA_START_V2_CMPL_FLAGS_MASK \
7349 		UINT32_C(0xffc0)
7350 	#define RX_TPA_START_V2_CMPL_FLAGS_SFT                      6
7351 	/*
7352 	 * When this bit is '1', it indicates a packet that has an error
7353 	 * of some type. Type of error is indicated in error_flags.
7354 	 */
7355 	#define RX_TPA_START_V2_CMPL_FLAGS_ERROR \
7356 		UINT32_C(0x40)
7357 	/* This field indicates how the packet was placed in the buffer. */
7358 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_MASK \
7359 		UINT32_C(0x380)
7360 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_SFT             7
7361 	/*
7362 	 * Jumbo:
7363 	 * TPA Packet was placed using jumbo algorithm. This means
7364 	 * that the first buffer will be filled with data before
7365 	 * moving to aggregation buffers. Each aggregation buffer
7366 	 * will be filled before moving to the next aggregation
7367 	 * buffer.
7368 	 */
7369 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_JUMBO \
7370 		(UINT32_C(0x1) << 7)
7371 	/*
7372 	 * Header/Data Separation:
7373 	 * Packet was placed using Header/Data separation algorithm.
7374 	 * The separation location is indicated by the itype field.
7375 	 */
7376 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_HDS \
7377 		(UINT32_C(0x2) << 7)
7378 	/*
7379 	 * IOC/Jumbo:
7380 	 * Packet will be placed using In-Order Completion/Jumbo where
7381 	 * the first packet of the aggregation is placed using Jumbo
7382 	 * Placement. Subsequent packets will be placed such that each
7383 	 * packet starts at the beginning of an aggregation buffer.
7384 	 */
7385 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_IOC_JUMBO \
7386 		(UINT32_C(0x4) << 7)
7387 	/*
7388 	 * GRO/Jumbo:
7389 	 * Packet will be placed using GRO/Jumbo where the first
7390 	 * packet is filled with data. Subsequent packets will be
7391 	 * placed such that any one packet does not span two
7392 	 * aggregation buffers unless it starts at the beginning of
7393 	 * an aggregation buffer.
7394 	 */
7395 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_GRO_JUMBO \
7396 		(UINT32_C(0x5) << 7)
7397 	/*
7398 	 * GRO/Header-Data Separation:
7399 	 * Packet will be placed using GRO/HDS where the header
7400 	 * is in the first packet.
7401 	 * Payload of each packet will be
7402 	 * placed such that any one packet does not span two
7403 	 * aggregation buffers unless it starts at the beginning of
7404 	 * an aggregation buffer.
7405 	 */
7406 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_GRO_HDS \
7407 		(UINT32_C(0x6) << 7)
7408 	/*
7409 	 * IOC/Header-Data Separation:
7410 	 * Packet will be placed using In-Order Completion/HDS where
7411 	 * the header is in the first packet buffer. Payload of each
7412 	 * packet will be placed such that each packet starts at the
7413 	 * beginning of an aggregation buffer.
7414 	 */
7415 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_IOC_HDS \
7416 		(UINT32_C(0x7) << 7)
7417 	#define RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_LAST \
7418 		RX_TPA_START_V2_CMPL_FLAGS_PLACEMENT_IOC_HDS
7419 	/* This bit is '1' if the RSS field in this completion is valid. */
7420 	#define RX_TPA_START_V2_CMPL_FLAGS_RSS_VALID \
7421 		UINT32_C(0x400)
7422 	/*
7423 	 * This bit is '1' if metadata has been added to the end of the
7424 	 * packet in host memory. Metadata starts at the first 32B boundary
7425 	 * after the end of the packet for regular and jumbo placement. It
7426 	 * starts at the first 32B boundary after the end of the header for
7427 	 * HDS placement. The length of the metadata is indicated in the
7428 	 * metadata itself.
7429 	 */
7430 	#define RX_TPA_START_V2_CMPL_FLAGS_PKT_METADATA_PRESENT \
7431 		UINT32_C(0x800)
7432 	/*
7433 	 * This value indicates what the inner packet determined for the
7434 	 * packet was.
7435 	 */
7436 	#define RX_TPA_START_V2_CMPL_FLAGS_ITYPE_MASK \
7437 		UINT32_C(0xf000)
7438 	#define RX_TPA_START_V2_CMPL_FLAGS_ITYPE_SFT                 12
7439 	/*
7440 	 * TCP Packet:
7441 	 * Indicates that the packet was IP and TCP.
7442 	 */
7443 	#define RX_TPA_START_V2_CMPL_FLAGS_ITYPE_TCP \
7444 		(UINT32_C(0x2) << 12)
7445 	#define RX_TPA_START_V2_CMPL_FLAGS_ITYPE_LAST \
7446 		RX_TPA_START_V2_CMPL_FLAGS_ITYPE_TCP
7447 	/*
7448 	 * This value indicates the amount of packet data written to the
7449 	 * buffer the opaque field in this completion corresponds to.
7450 	 */
7451 	uint16_t	len;
7452 	/*
7453 	 * This is a copy of the opaque field from the RX BD this completion
7454 	 * corresponds to. If the VNIC is configured to not use an Rx BD for
7455 	 * the TPA Start completion, then this is a copy of the opaque field
7456 	 * from the first BD used to place the TPA Start packet.
7457 	 */
7458 	uint32_t	opaque;
7459 	/*
7460 	 * This value is written by the NIC such that it will be different
7461 	 * for each pass through the completion queue. The even passes
7462 	 * will write 1. The odd passes will write 0.
7463 	 */
7464 	uint8_t	v1;
7465 	/*
7466 	 * This value is written by the NIC such that it will be different
7467 	 * for each pass through the completion queue. The even passes
7468 	 * will write 1. The odd passes will write 0.
7469 	 */
7470 	#define RX_TPA_START_V2_CMPL_V1 UINT32_C(0x1)
7471 	#define RX_TPA_START_V2_CMPL_LAST RX_TPA_START_V2_CMPL_V1
7472 	/*
7473 	 * This is the RSS hash type for the packet. The value is packed
7474 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
7475 	 *
7476 	 * The value of tuple_extrac_op provides the information about
7477 	 * what fields the hash was computed on.
7478 	 * * 0: The RSS hash was computed over source IP address,
7479 	 * destination IP address, source port, and destination port of inner
7480 	 * IP and TCP or UDP headers. Note: For non-tunneled packets,
7481 	 * the packet headers are considered inner packet headers for the RSS
7482 	 * hash computation purpose.
7483 	 * * 1: The RSS hash was computed over source IP address and destination
7484 	 * IP address of inner IP header. Note: For non-tunneled packets,
7485 	 * the packet headers are considered inner packet headers for the RSS
7486 	 * hash computation purpose.
7487 	 * * 2: The RSS hash was computed over source IP address,
7488 	 * destination IP address, source port, and destination port of
7489 	 * IP and TCP or UDP headers of outer tunnel headers.
7490 	 * Note: For non-tunneled packets, this value is not applicable.
7491 	 * * 3: The RSS hash was computed over source IP address and
7492 	 * destination IP address of IP header of outer tunnel headers.
7493 	 * Note: For non-tunneled packets, this value is not applicable.
7494 	 *
7495 	 * Note that 4-tuples values listed above are applicable
7496 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
7497 	 * HWRM firmware, and drivers. For example, if RSS hash is supported and
7498 	 * enabled for TCP traffic only, then the values of tuple_extract_op
7499 	 * corresponding to 4-tuples are only valid for TCP traffic.
7500 	 */
7501 	uint8_t	rss_hash_type;
7502 	/*
7503 	 * This is the aggregation ID that the completion is associated
7504 	 * with. Use this number to correlate the TPA start completion
7505 	 * with the TPA end completion.
7506 	 */
7507 	uint16_t	agg_id;
7508 	/*
7509 	 * This is the aggregation ID that the completion is associated
7510 	 * with. Use this number to correlate the TPA start completion
7511 	 * with the TPA end completion.
7512 	 */
7513 	#define RX_TPA_START_V2_CMPL_AGG_ID_MASK                UINT32_C(0xfff)
7514 	#define RX_TPA_START_V2_CMPL_AGG_ID_SFT                 0
7515 	#define RX_TPA_START_V2_CMPL_METADATA1_MASK \
7516 		UINT32_C(0xf000)
7517 	#define RX_TPA_START_V2_CMPL_METADATA1_SFT              12
7518 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
7519 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_MASK \
7520 		UINT32_C(0x7000)
7521 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_SFT      12
7522 	/* 0x88a8 */
7523 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID88A8 \
7524 		(UINT32_C(0x0) << 12)
7525 	/* 0x8100 */
7526 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID8100 \
7527 		(UINT32_C(0x1) << 12)
7528 	/* 0x9100 */
7529 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9100 \
7530 		(UINT32_C(0x2) << 12)
7531 	/* 0x9200 */
7532 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9200 \
7533 		(UINT32_C(0x3) << 12)
7534 	/* 0x9300 */
7535 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPID9300 \
7536 		(UINT32_C(0x4) << 12)
7537 	/* Value programmed in CFA VLANTPID register. */
7538 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG \
7539 		(UINT32_C(0x5) << 12)
7540 	#define RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_LAST \
7541 		RX_TPA_START_V2_CMPL_METADATA1_TPID_SEL_TPIDCFG
7542 	/* When meta_format != 0, this value is the VLAN valid. */
7543 	#define RX_TPA_START_V2_CMPL_METADATA1_VALID \
7544 		UINT32_C(0x8000)
7545 	/*
7546 	 * This value is the RSS hash value calculated for the packet
7547 	 * based on the mode bits and key value in the VNIC.
7548 	 * When vee_cmpl_mode is set in VNIC context, this is the lower
7549 	 * 32b of the host address from the first BD used to place the packet.
7550 	 */
7551 	uint32_t	rss_hash;
7552 } __rte_packed_end;
7553 
7554 /*
7555  * Last 16 bytes of RX L2 TPA Start V2 Completion Record
7556  *
7557  * This TPA completion structure is used on devices where the
7558  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
7559  */
7560 /* rx_tpa_start_v2_cmpl_hi (size:128b/16B) */
7561 struct __rte_packed_begin rx_tpa_start_v2_cmpl_hi {
7562 	uint32_t	flags2;
7563 	/* This indicates that the aggregation was done using GRO rules. */
7564 	#define RX_TPA_START_V2_CMPL_FLAGS2_AGG_GRO \
7565 		UINT32_C(0x4)
7566 	/*
7567 	 * When this bit is '0', the cs_ok field has the following definition:-
7568 	 * ip_cs_ok[2:0] = The number of header groups with a valid IP checksum
7569 	 * in the delivered packet, counted from the outer-most header group to
7570 	 * the inner-most header group, stopping at the first error. -
7571 	 * l4_cs_ok[5:3] = The number of header groups with a valid L4 checksum
7572 	 * in the delivered packet, counted from the outer-most header group to
7573 	 * the inner-most header group, stopping at the first error. When this
7574 	 * bit is '1', the cs_ok field has the following definition: -
7575 	 * hdr_cnt[2:0] = The number of header groups that were parsed by the
7576 	 * chip and passed in the delivered packet. - ip_cs_all_ok[3] =This bit
7577 	 * will be '1' if all the parsed header groups with an IP checksum are
7578 	 * valid. - l4_cs_all_ok[4] = This bit will be '1' if all the parsed
7579 	 * header groups with an L4 checksum are valid.
7580 	 */
7581 	#define RX_TPA_START_V2_CMPL_FLAGS2_CS_ALL_OK_MODE \
7582 		UINT32_C(0x8)
7583 	/* This value indicates what format the metadata field is. */
7584 	#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_MASK \
7585 		UINT32_C(0xf0)
7586 	#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_SFT            4
7587 	/* There is no metadata information. Values are zero. */
7588 	#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_NONE \
7589 		(UINT32_C(0x0) << 4)
7590 	/*
7591 	 * The {metadata1, metadata0} fields contain the vtag
7592 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
7593 	 * de, vid[11:0]} The metadata2 field contains the table scope
7594 	 * and action record pointer. - metadata2[25:0] contains the
7595 	 * action record pointer. - metadata2[31:26] contains the table
7596 	 * scope.
7597 	 */
7598 	#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_ACT_REC_PTR \
7599 		(UINT32_C(0x1) << 4)
7600 	/*
7601 	 * The {metadata1, metadata0} fields contain the vtag
7602 	 * information:
7603 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
7604 	 * The metadata2 field contains the Tunnel ID
7605 	 * value, justified to LSB.
7606 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
7607 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
7608 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
7609 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
7610 	 * - IPv4 = 0 (not populated)
7611 	 * - IPv6 = Flow Label[19:0]
7612 	 * - PPPoE = sessionID[15:0]
7613 	 * - MPLs = Outer label[19:0]
7614 	 * - UPAR = Selected[31:0] with bit mask
7615 	 */
7616 	#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_TUNNEL_ID \
7617 		(UINT32_C(0x2) << 4)
7618 	/*
7619 	 * The {metadata1, metadata0} fields contain the vtag
7620 	 * information:
7621 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
7622 	 * The metadata2 field contains the 32b metadata from the prepended
7623 	 * header (chdr_data).
7624 	 */
7625 	#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_CHDR_DATA \
7626 		(UINT32_C(0x3) << 4)
7627 	/*
7628 	 * The {metadata1, metadata0} fields contain the vtag
7629 	 * information:
7630 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
7631 	 * The metadata2 field contains the outer_l3_offset,
7632 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
7633 	 * - metadata2[8:0] contains the outer_l3_offset.
7634 	 * - metadata2[17:9] contains the inner_l2_offset.
7635 	 * - metadata2[26:18] contains the inner_l3_offset.
7636 	 * - metadata2[31:27] contains the inner_l4_size.
7637 	 */
7638 	#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET \
7639 		(UINT32_C(0x4) << 4)
7640 	#define RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_LAST \
7641 		RX_TPA_START_V2_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET
7642 	/*
7643 	 * This field indicates the IP type for the inner-most IP header.
7644 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
7645 	 * This value is only valid if itype indicates a packet
7646 	 * with an IP header.
7647 	 */
7648 	#define RX_TPA_START_V2_CMPL_FLAGS2_IP_TYPE \
7649 		UINT32_C(0x100)
7650 	/*
7651 	 * This indicates that the complete 1's complement checksum was
7652 	 * calculated for the packet in the aggregation.
7653 	 */
7654 	#define RX_TPA_START_V2_CMPL_FLAGS2_COMPLETE_CHECKSUM_CALC \
7655 		UINT32_C(0x200)
7656 	/*
7657 	 * This field indicates the status of IP and L4 CS calculations done
7658 	 * by the chip. The format of this field is indicated by the
7659 	 * cs_all_ok_mode bit.
7660 	 * CS status for TPA packets is always valid. This means that "all_ok"
7661 	 * status will always be set. The ok count status will be set
7662 	 * appropriately for the packet header, such that all existing CS
7663 	 * values are ok.
7664 	 */
7665 	#define RX_TPA_START_V2_CMPL_FLAGS2_CS_OK_MASK \
7666 		UINT32_C(0xfc00)
7667 	#define RX_TPA_START_V2_CMPL_FLAGS2_CS_OK_SFT                  10
7668 	/*
7669 	 * This value is the complete 1's complement checksum calculated from
7670 	 * the start of the outer L3 header to the end of the packet (not
7671 	 * including the ethernet crc). It is valid when the
7672 	 * 'complete_checksum_calc' flag is set. For TPA Start completions,
7673 	 * the complete checksum is calculated for the first packet in the
7674 	 * aggregation only.
7675 	 */
7676 	#define RX_TPA_START_V2_CMPL_FLAGS2_COMPLETE_CHECKSUM_MASK \
7677 		UINT32_C(0xffff0000)
7678 	#define RX_TPA_START_V2_CMPL_FLAGS2_COMPLETE_CHECKSUM_SFT      16
7679 	/*
7680 	 * This is data from the CFA block as indicated by the meta_format
7681 	 * field.
7682 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
7683 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
7684 	 *   act_rec_ptr[25:0]}
7685 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
7686 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
7687 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
7688 	 * When vee_cmpl_mode is set in VNIC context, this is the upper 32b
7689 	 * of the host address from the first BD used to place the packet.
7690 	 */
7691 	uint32_t	metadata2;
7692 	uint16_t	errors_v2;
7693 	/*
7694 	 * This value is written by the NIC such that it will be different
7695 	 * for each pass through the completion queue. The even passes
7696 	 * will write 1. The odd passes will write 0.
7697 	 */
7698 	#define RX_TPA_START_V2_CMPL_V2 \
7699 		UINT32_C(0x1)
7700 	#define RX_TPA_START_V2_CMPL_ERRORS_MASK \
7701 		UINT32_C(0xfffe)
7702 	#define RX_TPA_START_V2_CMPL_ERRORS_SFT                     1
7703 	/*
7704 	 * This error indicates that there was some sort of problem with
7705 	 * the BDs for the packetThe packet should be treated as
7706 	 * invalid.
7707 	 */
7708 	#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_MASK \
7709 		UINT32_C(0xe)
7710 	#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_SFT         1
7711 	/* No buffer error */
7712 	#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER \
7713 		(UINT32_C(0x0) << 1)
7714 	/*
7715 	 * Did Not Fit:
7716 	 * Packet did not fit into packet buffer provided. This means
7717 	 * that the TPA Start packet was too big to be placed into the
7718 	 * per-packet maximum number of physical buffers configured for
7719 	 * the VNIC, or that it was too big to be placed into the
7720 	 * per-aggregation maximum number of physical buffers configured
7721 	 * for the VNIC. This error only occurs when the VNIC is
7722 	 * configured for variable size receive buffers.
7723 	 */
7724 	#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_DID_NOT_FIT \
7725 		(UINT32_C(0x1) << 1)
7726 	/*
7727 	 * Bad Format:
7728 	 * BDs were not formatted correctly.
7729 	 */
7730 	#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT \
7731 		(UINT32_C(0x3) << 1)
7732 	/*
7733 	 * Flush:
7734 	 * There was a bad_format error on the previous operation
7735 	 */
7736 	#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_FLUSH \
7737 		(UINT32_C(0x5) << 1)
7738 	#define RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_LAST \
7739 		RX_TPA_START_V2_CMPL_ERRORS_BUFFER_ERROR_FLUSH
7740 	/*
7741 	 * This is data from the CFA block as indicated by the meta_format
7742 	 * field.
7743 	 */
7744 	uint16_t	metadata0;
7745 	/* When meta_format != 0, this value is the VLAN VID. */
7746 	#define RX_TPA_START_V2_CMPL_METADATA0_VID_MASK UINT32_C(0xfff)
7747 	#define RX_TPA_START_V2_CMPL_METADATA0_VID_SFT 0
7748 	/* When meta_format != 0, this value is the VLAN DE. */
7749 	#define RX_TPA_START_V2_CMPL_METADATA0_DE      UINT32_C(0x1000)
7750 	/* When meta_format != 0, this value is the VLAN PRI. */
7751 	#define RX_TPA_START_V2_CMPL_METADATA0_PRI_MASK UINT32_C(0xe000)
7752 	#define RX_TPA_START_V2_CMPL_METADATA0_PRI_SFT 13
7753 	/*
7754 	 * This field contains the outer_l3_offset, inner_l2_offset,
7755 	 * inner_l3_offset, and inner_l4_size.
7756 	 *
7757 	 * hdr_offsets[8:0] contains the outer_l3_offset.
7758 	 * hdr_offsets[17:9] contains the inner_l2_offset.
7759 	 * hdr_offsets[26:18] contains the inner_l3_offset.
7760 	 * hdr_offsets[31:27] contains the inner_l4_size.
7761 	 */
7762 	uint32_t	hdr_offsets;
7763 } __rte_packed_end;
7764 
7765 /*
7766  * This TPA completion structure is used on devices where the
7767  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
7768  * RX L2 TPA Start V3 Completion Record (32 bytes split to 2 16-byte
7769  * struct)
7770  */
7771 /* rx_tpa_start_v3_cmpl (size:128b/16B) */
7772 struct __rte_packed_begin rx_tpa_start_v3_cmpl {
7773 	uint16_t	flags_type;
7774 	/*
7775 	 * This field indicates the exact type of the completion.
7776 	 * By convention, the LSB identifies the length of the
7777 	 * record in 16B units. Even values indicate 16B
7778 	 * records. Odd values indicate 32B
7779 	 * records.
7780 	 */
7781 	#define RX_TPA_START_V3_CMPL_TYPE_MASK \
7782 		UINT32_C(0x3f)
7783 	#define RX_TPA_START_V3_CMPL_TYPE_SFT                       0
7784 	/*
7785 	 * RX L2 TPA Start V3 completion:
7786 	 * Completion at the beginning of a TPA operation.
7787 	 * Length = 32B
7788 	 * This is the new version of the RX_TPA_START completion used
7789 	 * in Thor2 and later chips.
7790 	 */
7791 	#define RX_TPA_START_V3_CMPL_TYPE_RX_TPA_START_V3 \
7792 		UINT32_C(0x19)
7793 	#define RX_TPA_START_V3_CMPL_TYPE_LAST \
7794 		RX_TPA_START_V3_CMPL_TYPE_RX_TPA_START_V3
7795 	#define RX_TPA_START_V3_CMPL_FLAGS_MASK \
7796 		UINT32_C(0xffc0)
7797 	#define RX_TPA_START_V3_CMPL_FLAGS_SFT                      6
7798 	/*
7799 	 * When this bit is '1', it indicates a packet that has an error
7800 	 * of some type. Type of error is indicated in error_flags.
7801 	 */
7802 	#define RX_TPA_START_V3_CMPL_FLAGS_ERROR \
7803 		UINT32_C(0x40)
7804 	/* This field indicates how the packet was placed in the buffer. */
7805 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_MASK \
7806 		UINT32_C(0x380)
7807 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_SFT             7
7808 	/*
7809 	 * Jumbo:
7810 	 * TPA Packet was placed using jumbo algorithm. This means
7811 	 * that the first buffer will be filled with data before
7812 	 * moving to aggregation buffers. Each aggregation buffer
7813 	 * will be filled before moving to the next aggregation
7814 	 * buffer.
7815 	 */
7816 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_JUMBO \
7817 		(UINT32_C(0x1) << 7)
7818 	/*
7819 	 * Header/Data Separation:
7820 	 * Packet was placed using Header/Data separation algorithm.
7821 	 * The separation location is indicated by the itype field.
7822 	 */
7823 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_HDS \
7824 		(UINT32_C(0x2) << 7)
7825 	/*
7826 	 * IOC/Jumbo:
7827 	 * Packet will be placed using In-Order Completion/Jumbo where
7828 	 * the first packet of the aggregation is placed using Jumbo
7829 	 * Placement. Subsequent packets will be placed such that each
7830 	 * packet starts at the beginning of an aggregation buffer.
7831 	 */
7832 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_IOC_JUMBO \
7833 		(UINT32_C(0x4) << 7)
7834 	/*
7835 	 * GRO/Jumbo:
7836 	 * Packet will be placed using GRO/Jumbo where the first
7837 	 * packet is filled with data. Subsequent packets will be
7838 	 * placed such that any one packet does not span two
7839 	 * aggregation buffers unless it starts at the beginning of
7840 	 * an aggregation buffer.
7841 	 */
7842 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_GRO_JUMBO \
7843 		(UINT32_C(0x5) << 7)
7844 	/*
7845 	 * GRO/Header-Data Separation:
7846 	 * Packet will be placed using GRO/HDS where the header
7847 	 * is in the first packet.
7848 	 * Payload of each packet will be
7849 	 * placed such that any one packet does not span two
7850 	 * aggregation buffers unless it starts at the beginning of
7851 	 * an aggregation buffer.
7852 	 */
7853 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_GRO_HDS \
7854 		(UINT32_C(0x6) << 7)
7855 	/*
7856 	 * IOC/Header-Data Separation:
7857 	 * Packet will be placed using In-Order Completion/HDS where
7858 	 * the header is in the first packet buffer. Payload of each
7859 	 * packet will be placed such that each packet starts at the
7860 	 * beginning of an aggregation buffer.
7861 	 */
7862 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_IOC_HDS \
7863 		(UINT32_C(0x7) << 7)
7864 	#define RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_LAST \
7865 		RX_TPA_START_V3_CMPL_FLAGS_PLACEMENT_IOC_HDS
7866 	/* This bit is '1' if the RSS field in this completion is valid. */
7867 	#define RX_TPA_START_V3_CMPL_FLAGS_RSS_VALID \
7868 		UINT32_C(0x400)
7869 	/*
7870 	 * This bit is '1' if metadata has been added to the end of the
7871 	 * packet in host memory. Metadata starts at the first 32B boundary
7872 	 * after the end of the packet for regular and jumbo placement. It
7873 	 * starts at the first 32B boundary after the end of the header for
7874 	 * HDS placement. The length of the metadata is indicated in the
7875 	 * metadata itself.
7876 	 */
7877 	#define RX_TPA_START_V3_CMPL_FLAGS_PKT_METADATA_PRESENT \
7878 		UINT32_C(0x800)
7879 	/*
7880 	 * This value indicates what the inner packet determined for the
7881 	 * packet was.
7882 	 */
7883 	#define RX_TPA_START_V3_CMPL_FLAGS_ITYPE_MASK \
7884 		UINT32_C(0xf000)
7885 	#define RX_TPA_START_V3_CMPL_FLAGS_ITYPE_SFT                 12
7886 	/*
7887 	 * TCP Packet:
7888 	 * Indicates that the packet was IP and TCP.
7889 	 */
7890 	#define RX_TPA_START_V3_CMPL_FLAGS_ITYPE_TCP \
7891 		(UINT32_C(0x2) << 12)
7892 	#define RX_TPA_START_V3_CMPL_FLAGS_ITYPE_LAST \
7893 		RX_TPA_START_V3_CMPL_FLAGS_ITYPE_TCP
7894 	/*
7895 	 * This value indicates the amount of packet data written to the
7896 	 * buffer the opaque field in this completion corresponds to.
7897 	 */
7898 	uint16_t	len;
7899 	/*
7900 	 * This is a copy of the opaque field from the RX BD this completion
7901 	 * corresponds to. If the VNIC is configured to not use an Rx BD for
7902 	 * the TPA Start completion, then this is a copy of the opaque field
7903 	 * from the first BD used to place the TPA Start packet.
7904 	 */
7905 	uint32_t	opaque;
7906 	uint16_t	rss_hash_type_v1;
7907 	/*
7908 	 * This value is written by the NIC such that it will be different
7909 	 * for each pass through the completion queue. The even passes
7910 	 * will write 1. The odd passes will write 0.
7911 	 */
7912 	#define RX_TPA_START_V3_CMPL_V1                UINT32_C(0x1)
7913 	/* unused1 is 6 b. */
7914 	#define RX_TPA_START_V3_CMPL_UNUSED1_MASK      UINT32_C(0x7e)
7915 	#define RX_TPA_START_V3_CMPL_UNUSED1_SFT       1
7916 	/*
7917 	 * This is the RSS hash type for the packet. The value is packed
7918 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
7919 	 *
7920 	 * The value of tuple_extrac_op provides the information about
7921 	 * what fields the hash was computed on.
7922 	 * * 0: The RSS hash was computed over source IP address,
7923 	 * destination IP address, source port, and destination port of inner
7924 	 * IP and TCP or UDP headers.
7925 	 * * 1: The RSS hash was computed over source IP address and
7926 	 * destination IP address of inner IP header.
7927 	 * * 2: The RSS hash was computed over source IP address,
7928 	 * destination IP address, source port, and destination port of
7929 	 * IP and TCP or UDP headers of outer tunnel headers.
7930 	 * Note: For non-tunneled packets, this value is not applicable.
7931 	 * * 3: The RSS hash was computed over source IP address and
7932 	 * destination IP address of IP header of outer tunnel headers.
7933 	 * Note: For non-tunneled packets, this value is not applicable.
7934 	 * * 4: The RSS hash was computed over source IP address of the inner
7935 	 * IP header.
7936 	 * * 5: The RSS hash was computed over destination IP address of the
7937 	 * inner IP header.
7938 	 * * 6: The RSS hash was computed over source IP address of the outer
7939 	 * IP header. Note: For non-tunneled packets, this value is not
7940 	 * applicable
7941 	 * * 7: The RSS hash was computed over destination IP address of the
7942 	 * outer IP header.
7943 	 * Note: For non-tunneled packets, this value is not applicable.
7944 	 * * 8: The RSS hash was computed over source IP address, destination
7945 	 * IP address, and flow label of the inner IP header.
7946 	 * Note: For packets without an inner IPv6 header, this value is not
7947 	 * applicable.
7948 	 * * 9: The RSS hash was computed over the flow label of the inner
7949 	 * IP header.
7950 	 * Note: For packets without an inner IPv6 header, this value
7951 	 * is not applicable.
7952 	 * * 10: The RSS hash was computed over source IP address, destination
7953 	 * IP address, and flow label of the outer IP header.
7954 	 * Note: For packets without an outer IPv6 header, this value is not
7955 	 * applicable.
7956 	 * * 11: The RSS hash was computed over the flow label of the outer
7957 	 * IP header. Note: For packets without an outer IPv6 header, this
7958 	 * value is not applicable.
7959 	 *
7960 	 * Note that 4-tuples values listed above are applicable
7961 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
7962 	 * HWRM firmware, and drivers. For example, if RSS hash is supported
7963 	 * and enabled for TCP traffic only, then the values of
7964 	 * tuple_extract_op corresponding to 4-tuples are only valid for TCP
7965 	 * traffic
7966 	 */
7967 	#define RX_TPA_START_V3_CMPL_RSS_HASH_TYPE_MASK UINT32_C(0xff80)
7968 	#define RX_TPA_START_V3_CMPL_RSS_HASH_TYPE_SFT 7
7969 	/*
7970 	 * This is the aggregation ID that the completion is associated
7971 	 * with. Use this number to correlate the TPA start completion
7972 	 * with the TPA end completion.
7973 	 */
7974 	uint16_t	agg_id;
7975 	/*
7976 	 * This is the aggregation ID that the completion is associated
7977 	 * with. Use this number to correlate the TPA start completion
7978 	 * with the TPA end completion.
7979 	 */
7980 	#define RX_TPA_START_V3_CMPL_AGG_ID_MASK                UINT32_C(0xfff)
7981 	#define RX_TPA_START_V3_CMPL_AGG_ID_SFT                 0
7982 	#define RX_TPA_START_V3_CMPL_METADATA1_MASK \
7983 		UINT32_C(0xf000)
7984 	#define RX_TPA_START_V3_CMPL_METADATA1_SFT              12
7985 	/* When meta_format != 0, this value is the VLAN TPID_SEL. */
7986 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_MASK \
7987 		UINT32_C(0x7000)
7988 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_SFT      12
7989 	/* 0x88a8 */
7990 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPID88A8 \
7991 		(UINT32_C(0x0) << 12)
7992 	/* 0x8100 */
7993 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPID8100 \
7994 		(UINT32_C(0x1) << 12)
7995 	/* 0x9100 */
7996 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPID9100 \
7997 		(UINT32_C(0x2) << 12)
7998 	/* 0x9200 */
7999 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPID9200 \
8000 		(UINT32_C(0x3) << 12)
8001 	/* 0x9300 */
8002 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPID9300 \
8003 		(UINT32_C(0x4) << 12)
8004 	/* Value programmed in CFA VLANTPID register. */
8005 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPIDCFG \
8006 		(UINT32_C(0x5) << 12)
8007 	#define RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_LAST \
8008 		RX_TPA_START_V3_CMPL_METADATA1_TPID_SEL_TPIDCFG
8009 	/* When meta_format != 0, this value is the VLAN valid. */
8010 	#define RX_TPA_START_V3_CMPL_METADATA1_VALID \
8011 		UINT32_C(0x8000)
8012 	/*
8013 	 * This value is the RSS hash value calculated for the packet
8014 	 * based on the mode bits and key value in the VNIC.
8015 	 * When vee_cmpl_mode is set in VNIC context, this is the lower
8016 	 * 32b of the host address from the first BD used to place the packet.
8017 	 */
8018 	uint32_t	rss_hash;
8019 } __rte_packed_end;
8020 
8021 /*
8022  * Last 16 bytes of RX L2 TPA Start V3 Completion Record
8023  *
8024  * This TPA completion structure is used on devices where the
8025  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
8026  */
8027 /* rx_tpa_start_v3_cmpl_hi (size:128b/16B) */
8028 struct __rte_packed_begin rx_tpa_start_v3_cmpl_hi {
8029 	uint32_t	flags2;
8030 	/*
8031 	 * This indicates that the ip checksum was calculated for the inner
8032 	 * packet and that the ip_cs_error field indicates if there was an
8033 	 * error.
8034 	 */
8035 	#define RX_TPA_START_V3_CMPL_FLAGS2_IP_CS_CALC \
8036 		UINT32_C(0x1)
8037 	/*
8038 	 * This indicates that the TCP, UDP or ICMP checksum was calculated
8039 	 * for the inner packet and that the l4_cs_error field indicates if
8040 	 * there was an error.
8041 	 */
8042 	#define RX_TPA_START_V3_CMPL_FLAGS2_L4_CS_CALC \
8043 		UINT32_C(0x2)
8044 	/*
8045 	 * This indicates that the ip checksum was calculated for the tunnel
8046 	 * header and that the t_ip_cs_error field indicates if there was an
8047 	 * error.
8048 	 */
8049 	#define RX_TPA_START_V3_CMPL_FLAGS2_T_IP_CS_CALC \
8050 		UINT32_C(0x4)
8051 	/*
8052 	 * This indicates that the UDP checksum was calculated for the tunnel
8053 	 * packet and that the t_l4_cs_error field indicates if there was an
8054 	 * error.
8055 	 */
8056 	#define RX_TPA_START_V3_CMPL_FLAGS2_T_L4_CS_CALC \
8057 		UINT32_C(0x8)
8058 	/* This value indicates what format the metadata field is. */
8059 	#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_MASK \
8060 		UINT32_C(0xf0)
8061 	#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_SFT            4
8062 	/* There is no metadata information. Values are zero. */
8063 	#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_NONE \
8064 		(UINT32_C(0x0) << 4)
8065 	/*
8066 	 * The {metadata1, metadata0} fields contain the vtag
8067 	 * information: - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],
8068 	 * de, vid[11:0]} The metadata2 field contains the table scope
8069 	 * and action record pointer. - metadata2[25:0] contains the
8070 	 * action record pointer. - metadata2[31:26] contains the table
8071 	 * scope.
8072 	 */
8073 	#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_ACT_REC_PTR \
8074 		(UINT32_C(0x1) << 4)
8075 	/*
8076 	 * The {metadata1, metadata0} fields contain the vtag
8077 	 * information:
8078 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
8079 	 * The metadata2 field contains the Tunnel ID
8080 	 * value, justified to LSB.
8081 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
8082 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier
8083 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
8084 	 * - GRE = KEY[31:0] -> key field with bit mask. zero if K=0
8085 	 * - IPv4 = 0 (not populated)
8086 	 * - IPv6 = Flow Label[19:0]
8087 	 * - PPPoE = sessionID[15:0]
8088 	 * - MPLs = Outer label[19:0]
8089 	 * - UPAR = Selected[31:0] with bit mask
8090 	 */
8091 	#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_TUNNEL_ID \
8092 		(UINT32_C(0x2) << 4)
8093 	/*
8094 	 * The {metadata1, metadata0} fields contain the vtag
8095 	 * information:
8096 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0],de, vid[11:0]}
8097 	 * The metadata2 field contains the 32b metadata from the prepended
8098 	 * header (chdr_data).
8099 	 */
8100 	#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_CHDR_DATA \
8101 		(UINT32_C(0x3) << 4)
8102 	/*
8103 	 * The {metadata1, metadata0} fields contain the vtag
8104 	 * information:
8105 	 * - vtag[19:0] = {valid, tpid_sel[2:0], pri[2:0], de, vid[11:0]}
8106 	 * The metadata2 field contains the outer_l3_offset,
8107 	 * inner_l2_offset, inner_l3_offset, and inner_l4_size.
8108 	 * - metadata2[8:0] contains the outer_l3_offset.
8109 	 * - metadata2[17:9] contains the inner_l2_offset.
8110 	 * - metadata2[26:18] contains the inner_l3_offset.
8111 	 * - metadata2[31:27] contains the inner_l4_size.
8112 	 */
8113 	#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET \
8114 		(UINT32_C(0x4) << 4)
8115 	#define RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_LAST \
8116 		RX_TPA_START_V3_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET
8117 	/*
8118 	 * This field indicates the IP type for the inner-most IP header.
8119 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
8120 	 * This value is only valid if itype indicates a packet
8121 	 * with an IP header.
8122 	 */
8123 	#define RX_TPA_START_V3_CMPL_FLAGS2_IP_TYPE \
8124 		UINT32_C(0x100)
8125 	/*
8126 	 * This indicates that the complete 1's complement checksum was
8127 	 * calculated for the packet.
8128 	 */
8129 	#define RX_TPA_START_V3_CMPL_FLAGS2_COMPLETE_CHECKSUM_CALC \
8130 		UINT32_C(0x200)
8131 	/*
8132 	 * This field indicates the status of IP and L4 CS calculations done
8133 	 * by the chip. The format of this field is indicated by the
8134 	 * cs_all_ok_mode bit.
8135 	 */
8136 	#define RX_TPA_START_V3_CMPL_FLAGS2_T_IP_TYPE \
8137 		UINT32_C(0x400)
8138 	/* Indicates that the Tunnel IP type was IPv4 */
8139 	#define RX_TPA_START_V3_CMPL_FLAGS2_T_IP_TYPE_IPV4 \
8140 		(UINT32_C(0x0) << 10)
8141 	/* Indicates that the Tunnel IP type was IPv6 */
8142 	#define RX_TPA_START_V3_CMPL_FLAGS2_T_IP_TYPE_IPV6 \
8143 		(UINT32_C(0x1) << 10)
8144 	#define RX_TPA_START_V3_CMPL_FLAGS2_T_IP_TYPE_LAST \
8145 		RX_TPA_START_V3_CMPL_FLAGS2_T_IP_TYPE_IPV6
8146 	/* This indicates that the aggregation was done using GRO rules. */
8147 	#define RX_TPA_START_V3_CMPL_FLAGS2_AGG_GRO \
8148 		UINT32_C(0x800)
8149 	/*
8150 	 * This value is the complete 1's complement checksum calculated from
8151 	 * the start of the outer L3 header to the end of the packet (not
8152 	 * including the ethernet crc). It is valid when the
8153 	 * 'complete_checksum_calc' flag is set. For TPA Start completions,
8154 	 * the complete checksum is calculated for the first packet in the
8155 	 * aggregation only.
8156 	 */
8157 	#define RX_TPA_START_V3_CMPL_FLAGS2_COMPLETE_CHECKSUM_MASK \
8158 		UINT32_C(0xffff0000)
8159 	#define RX_TPA_START_V3_CMPL_FLAGS2_COMPLETE_CHECKSUM_SFT      16
8160 	/*
8161 	 * This is data from the CFA block as indicated by the meta_format
8162 	 * field.
8163 	 * - meta_format 0 - none - metadata2 = 0 - not valid/not stripped
8164 	 * - meta_format 1 - act_rec_ptr - metadata2 = {table_scope[5:0],
8165 	 *   act_rec_ptr[25:0]}
8166 	 * - meta_format 2 - tunnel_id - metadata2 = tunnel_id[31:0]
8167 	 * - meta_format 3 - chdr_data - metadata2 = updated_chdr_data[31:0]
8168 	 * - meta_format 4 - hdr_offsets - metadata2 = hdr_offsets[31:0]
8169 	 * When vee_cmpl_mode is set in VNIC context, this is the upper 32b
8170 	 * of the host address from the first BD used to place the packet.
8171 	 */
8172 	uint32_t	metadata2;
8173 	uint16_t	errors_v2;
8174 	/*
8175 	 * This value is written by the NIC such that it will be different
8176 	 * for each pass through the completion queue. The even passes
8177 	 * will write 1. The odd passes will write 0.
8178 	 */
8179 	#define RX_TPA_START_V3_CMPL_V2 \
8180 		UINT32_C(0x1)
8181 	#define RX_TPA_START_V3_CMPL_ERRORS_MASK \
8182 		UINT32_C(0xfffe)
8183 	#define RX_TPA_START_V3_CMPL_ERRORS_SFT                     1
8184 	/*
8185 	 * This error indicates that there was some sort of problem with
8186 	 * the BDs for the packetThe packet should be treated as
8187 	 * invalid.
8188 	 */
8189 	#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_MASK \
8190 		UINT32_C(0xe)
8191 	#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_SFT         1
8192 	/* No buffer error */
8193 	#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER \
8194 		(UINT32_C(0x0) << 1)
8195 	/*
8196 	 * Did Not Fit:
8197 	 * Packet did not fit into packet buffer provided. This means
8198 	 * that the TPA Start packet was too big to be placed into the
8199 	 * per-packet maximum number of physical buffers configured for
8200 	 * the VNIC, or that it was too big to be placed into the
8201 	 * per-aggregation maximum number of physical buffers configured
8202 	 * for the VNIC. This error only occurs when the VNIC is
8203 	 * configured for variable size receive buffers.
8204 	 */
8205 	#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_DID_NOT_FIT \
8206 		(UINT32_C(0x1) << 1)
8207 	/*
8208 	 * Bad Format:
8209 	 * BDs were not formatted correctly.
8210 	 */
8211 	#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT \
8212 		(UINT32_C(0x3) << 1)
8213 	/*
8214 	 * Flush:
8215 	 * There was a bad_format error on the previous operation
8216 	 */
8217 	#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_FLUSH \
8218 		(UINT32_C(0x5) << 1)
8219 	#define RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_LAST \
8220 		RX_TPA_START_V3_CMPL_ERRORS_BUFFER_ERROR_FLUSH
8221 	/*
8222 	 * This is data from the CFA block as indicated by the meta_format
8223 	 * field.
8224 	 */
8225 	uint16_t	metadata0;
8226 	/* When meta_format != 0, this value is the VLAN VID. */
8227 	#define RX_TPA_START_V3_CMPL_METADATA0_VID_MASK UINT32_C(0xfff)
8228 	#define RX_TPA_START_V3_CMPL_METADATA0_VID_SFT 0
8229 	/* When meta_format != 0, this value is the VLAN DE. */
8230 	#define RX_TPA_START_V3_CMPL_METADATA0_DE      UINT32_C(0x1000)
8231 	/* When meta_format != 0, this value is the VLAN PRI. */
8232 	#define RX_TPA_START_V3_CMPL_METADATA0_PRI_MASK UINT32_C(0xe000)
8233 	#define RX_TPA_START_V3_CMPL_METADATA0_PRI_SFT 13
8234 	/*
8235 	 * This field contains the outer_l3_offset, inner_l2_offset,
8236 	 * inner_l3_offset, and inner_l4_size.
8237 	 *
8238 	 * hdr_offsets[8:0] contains the outer_l3_offset.
8239 	 * hdr_offsets[17:9] contains the inner_l2_offset.
8240 	 * hdr_offsets[26:18] contains the inner_l3_offset.
8241 	 * hdr_offsets[31:27] contains the inner_l4_size.
8242 	 */
8243 	uint32_t	hdr_offsets;
8244 } __rte_packed_end;
8245 
8246 /*
8247  * This TPA completion structure is used on devices where the
8248  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
8249  */
8250 /* rx_tpa_end_cmpl (size:128b/16B) */
8251 struct __rte_packed_begin rx_tpa_end_cmpl {
8252 	uint16_t	flags_type;
8253 	/*
8254 	 * This field indicates the exact type of the completion.
8255 	 * By convention, the LSB identifies the length of the
8256 	 * record in 16B units. Even values indicate 16B
8257 	 * records. Odd values indicate 32B
8258 	 * records.
8259 	 */
8260 	#define RX_TPA_END_CMPL_TYPE_MASK                      UINT32_C(0x3f)
8261 	#define RX_TPA_END_CMPL_TYPE_SFT                       0
8262 	/*
8263 	 * RX L2 TPA End Completion:
8264 	 * Completion at the end of a TPA operation.
8265 	 * Length = 32B
8266 	 */
8267 	#define RX_TPA_END_CMPL_TYPE_RX_TPA_END                  UINT32_C(0x15)
8268 	#define RX_TPA_END_CMPL_TYPE_LAST \
8269 		RX_TPA_END_CMPL_TYPE_RX_TPA_END
8270 	#define RX_TPA_END_CMPL_FLAGS_MASK                     UINT32_C(0xffc0)
8271 	#define RX_TPA_END_CMPL_FLAGS_SFT                      6
8272 	/*
8273 	 * When this bit is '1', it indicates a packet that has an
8274 	 * error of some type. Type of error is indicated in
8275 	 * error_flags.
8276 	 */
8277 	#define RX_TPA_END_CMPL_FLAGS_ERROR                     UINT32_C(0x40)
8278 	/* This field indicates how the packet was placed in the buffer. */
8279 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_MASK            UINT32_C(0x380)
8280 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_SFT             7
8281 	/*
8282 	 * Jumbo:
8283 	 * TPA Packet was placed using jumbo algorithm. This means
8284 	 * that the first buffer will be filled with data before
8285 	 * moving to aggregation buffers. Each aggregation buffer
8286 	 * will be filled before moving to the next aggregation
8287 	 * buffer.
8288 	 */
8289 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_JUMBO \
8290 		(UINT32_C(0x1) << 7)
8291 	/*
8292 	 * Header/Data Separation:
8293 	 * Packet was placed using Header/Data separation algorithm.
8294 	 * The separation location is indicated by the itype field.
8295 	 */
8296 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_HDS \
8297 		(UINT32_C(0x2) << 7)
8298 	/*
8299 	 * IOC/Jumbo:
8300 	 * Packet will be placed using In-Order Completion/Jumbo where
8301 	 * the first packet of the aggregation is placed using Jumbo
8302 	 * Placement. Subsequent packets will be placed such that each
8303 	 * packet starts at the beginning of an aggregation buffer.
8304 	 */
8305 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_IOC_JUMBO \
8306 		(UINT32_C(0x4) << 7)
8307 	/*
8308 	 * GRO/Jumbo:
8309 	 * Packet will be placed using GRO/Jumbo where the first
8310 	 * packet is filled with data. Subsequent packets will be
8311 	 * placed such that any one packet does not span two
8312 	 * aggregation buffers unless it starts at the beginning of
8313 	 * an aggregation buffer.
8314 	 */
8315 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_GRO_JUMBO \
8316 		(UINT32_C(0x5) << 7)
8317 	/*
8318 	 * GRO/Header-Data Separation:
8319 	 * Packet will be placed using GRO/HDS where the header
8320 	 * is in the first packet.
8321 	 * Payload of each packet will be
8322 	 * placed such that any one packet does not span two
8323 	 * aggregation buffers unless it starts at the beginning of
8324 	 * an aggregation buffer.
8325 	 */
8326 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_GRO_HDS \
8327 		(UINT32_C(0x6) << 7)
8328 	/*
8329 	 * IOC/Header-Data Separation:
8330 	 * Packet will be placed using In-Order Completion/HDS where
8331 	 * the header is in the first packet buffer. Payload of each
8332 	 * packet will be placed such that each packet starts at the
8333 	 * beginning of an aggregation buffer.
8334 	 */
8335 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_IOC_HDS \
8336 		(UINT32_C(0x7) << 7)
8337 	#define RX_TPA_END_CMPL_FLAGS_PLACEMENT_LAST \
8338 		RX_TPA_END_CMPL_FLAGS_PLACEMENT_IOC_HDS
8339 	/* When set, this bit indicates that the timestamp field is valid. */
8340 	#define RX_TPA_END_CMPL_FLAGS_TIMESTAMP_VALID           UINT32_C(0x400)
8341 	/*
8342 	 * This bit is '1' if metadata has been added to the end of the
8343 	 * packet in host memory. Metadata starts at the first 32B boundary
8344 	 * after the end of the packet for regular and jumbo placement.
8345 	 * It starts at the first 32B boundary after the end of the header
8346 	 * for HDS placement. The length of the metadata is indicated in the
8347 	 * metadata itself.
8348 	 */
8349 	#define RX_TPA_END_CMPL_FLAGS_PKT_METADATA_PRESENT      UINT32_C(0x800)
8350 	/*
8351 	 * This value indicates what the inner packet determined for the
8352 	 * packet was.
8353 	 * - 2 TCP Packet
8354 	 *     Indicates that the packet was IP and TCP. This indicates
8355 	 *     that the ip_cs field is valid and that the tcp_udp_cs
8356 	 *     field is valid and contains the TCP checksum.
8357 	 *     This also indicates that the payload_offset field is valid.
8358 	 */
8359 	#define RX_TPA_END_CMPL_FLAGS_ITYPE_MASK \
8360 		UINT32_C(0xf000)
8361 	#define RX_TPA_END_CMPL_FLAGS_ITYPE_SFT                 12
8362 	/*
8363 	 * This value is zero for TPA End completions.
8364 	 * There is no data in the buffer that corresponds to the opaque
8365 	 * value in this completion.
8366 	 */
8367 	uint16_t	len;
8368 	/*
8369 	 * This is a copy of the opaque field from the RX BD this completion
8370 	 * corresponds to.
8371 	 */
8372 	uint32_t	opaque;
8373 	/*
8374 	 * This value is written by the NIC such that it will be different
8375 	 * for each pass through the completion queue. The even passes
8376 	 * will write 1. The odd passes will write 0.
8377 	 */
8378 	uint8_t	agg_bufs_v1;
8379 	/*
8380 	 * This value is written by the NIC such that it will be different
8381 	 * for each pass through the completion queue. The even passes
8382 	 * will write 1. The odd passes will write 0.
8383 	 */
8384 	#define RX_TPA_END_CMPL_V1           UINT32_C(0x1)
8385 	/*
8386 	 * This value is the number of aggregation buffers that follow this
8387 	 * entry in the completion ring that are a part of this aggregation
8388 	 * packet.
8389 	 * If the value is zero, then the packet is completely contained
8390 	 * in the buffer space provided in the aggregation start completion.
8391 	 */
8392 	#define RX_TPA_END_CMPL_AGG_BUFS_MASK UINT32_C(0x7e)
8393 	#define RX_TPA_END_CMPL_AGG_BUFS_SFT 1
8394 	/* This value is the number of segments in the TPA operation. */
8395 	uint8_t	tpa_segs;
8396 	/*
8397 	 * This value indicates the offset in bytes from the beginning of the
8398 	 * packet where the inner payload starts. This value is valid for TCP,
8399 	 * UDP, FCoE, and RoCE packets.
8400 	 *
8401 	 * A value of zero indicates an offset of 256 bytes.
8402 	 */
8403 	uint8_t	payload_offset;
8404 	uint8_t	agg_id;
8405 	/* unused2 is 1 b */
8406 	#define RX_TPA_END_CMPL_UNUSED2     UINT32_C(0x1)
8407 	/*
8408 	 * This is the aggregation ID that the completion is associated
8409 	 * with. Use this number to correlate the TPA start completion
8410 	 * with the TPA end completion.
8411 	 */
8412 	#define RX_TPA_END_CMPL_AGG_ID_MASK UINT32_C(0xfe)
8413 	#define RX_TPA_END_CMPL_AGG_ID_SFT  1
8414 	/*
8415 	 * For non-GRO packets, this value is the
8416 	 * timestamp delta between earliest and latest timestamp values for
8417 	 * TPA packet. If packets were not time stamped, then delta will be
8418 	 * zero.
8419 	 *
8420 	 * For GRO packets, this field is zero except for the following
8421 	 * sub-fields.
8422 	 * - tsdelta[31]
8423 	 *     Timestamp present indication. When '0', no Timestamp
8424 	 *     option is in the packet. When '1', then a Timestamp
8425 	 *     option is present in the packet.
8426 	 */
8427 	uint32_t	tsdelta;
8428 } __rte_packed_end;
8429 
8430 /*
8431  * Last 16 bytes of rx_tpa_end_cmpl.
8432  *
8433  * This TPA completion structure is used on devices where the
8434  * `hwrm_vnic_qcaps.max_aggs_supported` value is 0.
8435  */
8436 /* rx_tpa_end_cmpl_hi (size:128b/16B) */
8437 struct __rte_packed_begin rx_tpa_end_cmpl_hi {
8438 	uint32_t	tpa_dup_acks;
8439 	/*
8440 	 * This value is the number of duplicate ACKs that have been
8441 	 * received as part of the TPA operation.
8442 	 */
8443 	#define RX_TPA_END_CMPL_TPA_DUP_ACKS_MASK UINT32_C(0xf)
8444 	#define RX_TPA_END_CMPL_TPA_DUP_ACKS_SFT 0
8445 	/*
8446 	 * This value is the valid when TPA completion is active. It
8447 	 * indicates the length of the longest segment of the TPA operation
8448 	 * for LRO mode and the length of the first segment in GRO mode.
8449 	 *
8450 	 * This value may be used by GRO software to re-construct the original
8451 	 * packet stream from the TPA packet. This is the length of all
8452 	 * but the last segment for GRO. In LRO mode this value may be used
8453 	 * to indicate MSS size to the stack.
8454 	 */
8455 	uint16_t	tpa_seg_len;
8456 	/*
8457 	 * The lower 16b of the timestamp of the last packet added to the
8458 	 * aggregation. Only valid when flags.timestamp_valid is set.
8459 	 */
8460 	uint16_t	timestamp_lower;
8461 	uint16_t	errors_v2;
8462 	/*
8463 	 * This value is written by the NIC such that it will be different
8464 	 * for each pass through the completion queue. The even passes
8465 	 * will write 1. The odd passes will write 0.
8466 	 */
8467 	#define RX_TPA_END_CMPL_V2                             UINT32_C(0x1)
8468 	#define RX_TPA_END_CMPL_ERRORS_MASK                    UINT32_C(0xfffe)
8469 	#define RX_TPA_END_CMPL_ERRORS_SFT                     1
8470 	/*
8471 	 * This error indicates that there was some sort of problem with
8472 	 * the BDs for the packet that was found after part of the
8473 	 * packet was already placed. The packet should be treated as
8474 	 * invalid.
8475 	 */
8476 	#define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_MASK        UINT32_C(0xe)
8477 	#define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_SFT         1
8478 	/*
8479 	 * This error occurs when there is a fatal HW problem in
8480 	 * the chip only. It indicates that there were not
8481 	 * BDs on chip but that there was adequate reservation.
8482 	 * provided by the TPA block.
8483 	 */
8484 	#define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_NOT_ON_CHIP \
8485 		(UINT32_C(0x2) << 1)
8486 	/*
8487 	 * This error occurs when TPA block was not configured to
8488 	 * reserve adequate BDs for TPA operations on this RX
8489 	 * ring. All data for the TPA operation was not placed.
8490 	 *
8491 	 * This error can also be generated when the number of
8492 	 * segments is not programmed correctly in TPA and the
8493 	 * 33 total aggregation buffers allowed for the TPA
8494 	 * operation has been exceeded.
8495 	 */
8496 	#define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_RSV_ERROR \
8497 		(UINT32_C(0x4) << 1)
8498 	#define RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_LAST \
8499 		RX_TPA_END_CMPL_ERRORS_BUFFER_ERROR_RSV_ERROR
8500 	/*
8501 	 * The upper 16b of the timestamp of the last packet added to the
8502 	 * aggregation. Only valid when flags.timestamp_valid is set.
8503 	 */
8504 	uint16_t	timestamp_upper;
8505 	/*
8506 	 * This is the opaque value that was completed for the TPA start
8507 	 * completion that corresponds to this TPA end completion.
8508 	 */
8509 	uint32_t	start_opaque;
8510 } __rte_packed_end;
8511 
8512 /*
8513  * This TPA completion structure is used on devices where the
8514  * `hwrm_vnic_qcaps.max_aggs_supported` value is greater than 0.
8515  */
8516 /* rx_tpa_v2_start_cmpl (size:128b/16B) */
8517 struct __rte_packed_begin rx_tpa_v2_start_cmpl {
8518 	uint16_t	flags_type;
8519 	/*
8520 	 * This field indicates the exact type of the completion.
8521 	 * By convention, the LSB identifies the length of the
8522 	 * record in 16B units. Even values indicate 16B
8523 	 * records. Odd values indicate 32B
8524 	 * records.
8525 	 */
8526 	#define RX_TPA_V2_START_CMPL_TYPE_MASK \
8527 		UINT32_C(0x3f)
8528 	#define RX_TPA_V2_START_CMPL_TYPE_SFT                       0
8529 	/*
8530 	 * RX L2 TPA Start Completion:
8531 	 * Completion at the beginning of a TPA operation.
8532 	 * Length = 32B
8533 	 */
8534 	#define RX_TPA_V2_START_CMPL_TYPE_RX_TPA_START \
8535 		UINT32_C(0x13)
8536 	#define RX_TPA_V2_START_CMPL_TYPE_LAST \
8537 		RX_TPA_V2_START_CMPL_TYPE_RX_TPA_START
8538 	#define RX_TPA_V2_START_CMPL_FLAGS_MASK \
8539 		UINT32_C(0xffc0)
8540 	#define RX_TPA_V2_START_CMPL_FLAGS_SFT                      6
8541 	/* This bit will always be '0' for TPA start completions. */
8542 	#define RX_TPA_V2_START_CMPL_FLAGS_ERROR \
8543 		UINT32_C(0x40)
8544 	/* This field indicates how the packet was placed in the buffer. */
8545 	#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_MASK \
8546 		UINT32_C(0x380)
8547 	#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_SFT             7
8548 	/*
8549 	 * Jumbo:
8550 	 * TPA Packet was placed using jumbo algorithm. This means
8551 	 * that the first buffer will be filled with data before
8552 	 * moving to aggregation buffers. Each aggregation buffer
8553 	 * will be filled before moving to the next aggregation
8554 	 * buffer.
8555 	 */
8556 	#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_JUMBO \
8557 		(UINT32_C(0x1) << 7)
8558 	/*
8559 	 * Header/Data Separation:
8560 	 * Packet was placed using Header/Data separation algorithm.
8561 	 * The separation location is indicated by the itype field.
8562 	 */
8563 	#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_HDS \
8564 		(UINT32_C(0x2) << 7)
8565 	/*
8566 	 * GRO/Jumbo:
8567 	 * Packet will be placed using GRO/Jumbo where the first
8568 	 * packet is filled with data. Subsequent packets will be
8569 	 * placed such that any one packet does not span two
8570 	 * aggregation buffers unless it starts at the beginning of
8571 	 * an aggregation buffer.
8572 	 */
8573 	#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_GRO_JUMBO \
8574 		(UINT32_C(0x5) << 7)
8575 	/*
8576 	 * GRO/Header-Data Separation:
8577 	 * Packet will be placed using GRO/HDS where the header
8578 	 * is in the first packet.
8579 	 * Payload of each packet will be
8580 	 * placed such that any one packet does not span two
8581 	 * aggregation buffers unless it starts at the beginning of
8582 	 * an aggregation buffer.
8583 	 */
8584 	#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_GRO_HDS \
8585 		(UINT32_C(0x6) << 7)
8586 	#define RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_LAST \
8587 		RX_TPA_V2_START_CMPL_FLAGS_PLACEMENT_GRO_HDS
8588 	/* This bit is '1' if the RSS field in this completion is valid. */
8589 	#define RX_TPA_V2_START_CMPL_FLAGS_RSS_VALID \
8590 		UINT32_C(0x400)
8591 	/*
8592 	 * For devices that support timestamps, when this bit is cleared the
8593 	 * `inner_l4_size_inner_l3_offset_inner_l2_offset_outer_l3_offset`
8594 	 * field contains the 32b timestamp for
8595 	 * the packet from the MAC. When this bit is set, the
8596 	 * `inner_l4_size_inner_l3_offset_inner_l2_offset_outer_l3_offset`
8597 	 * field contains the outer_l3_offset, inner_l2_offset,
8598 	 * inner_l3_offset, and inner_l4_size.
8599 	 */
8600 	#define RX_TPA_V2_START_CMPL_FLAGS_TIMESTAMP_FLD_FORMAT \
8601 		UINT32_C(0x800)
8602 	/*
8603 	 * This value indicates what the inner packet determined for the
8604 	 * packet was.
8605 	 */
8606 	#define RX_TPA_V2_START_CMPL_FLAGS_ITYPE_MASK \
8607 		UINT32_C(0xf000)
8608 	#define RX_TPA_V2_START_CMPL_FLAGS_ITYPE_SFT                 12
8609 	/*
8610 	 * TCP Packet:
8611 	 * Indicates that the packet was IP and TCP.
8612 	 */
8613 	#define RX_TPA_V2_START_CMPL_FLAGS_ITYPE_TCP \
8614 		(UINT32_C(0x2) << 12)
8615 	#define RX_TPA_V2_START_CMPL_FLAGS_ITYPE_LAST \
8616 		RX_TPA_V2_START_CMPL_FLAGS_ITYPE_TCP
8617 	/*
8618 	 * This value indicates the amount of packet data written to the
8619 	 * buffer the opaque field in this completion corresponds to.
8620 	 */
8621 	uint16_t	len;
8622 	/*
8623 	 * This is a copy of the opaque field from the RX BD this completion
8624 	 * corresponds to.
8625 	 */
8626 	uint32_t	opaque;
8627 	/*
8628 	 * This value is written by the NIC such that it will be different
8629 	 * for each pass through the completion queue. The even passes
8630 	 * will write 1. The odd passes will write 0.
8631 	 */
8632 	uint8_t	v1;
8633 	/*
8634 	 * This value is written by the NIC such that it will be different
8635 	 * for each pass through the completion queue. The even passes
8636 	 * will write 1. The odd passes will write 0.
8637 	 */
8638 	#define RX_TPA_V2_START_CMPL_V1 UINT32_C(0x1)
8639 	#define RX_TPA_V2_START_CMPL_LAST RX_TPA_V2_START_CMPL_V1
8640 	/*
8641 	 * This is the RSS hash type for the packet. The value is packed
8642 	 * {tuple_extrac_op[1:0],rss_profile_id[4:0],tuple_extrac_op[2]}.
8643 	 *
8644 	 * The value of tuple_extrac_op provides the information about
8645 	 * what fields the hash was computed on.
8646 	 * * 0: The RSS hash was computed over source IP address,
8647 	 * destination IP address, source port, and destination port of inner
8648 	 * IP and TCP or UDP headers. Note: For non-tunneled packets,
8649 	 * the packet headers are considered inner packet headers for the RSS
8650 	 * hash computation purpose.
8651 	 * * 1: The RSS hash was computed over source IP address and destination
8652 	 * IP address of inner IP header. Note: For non-tunneled packets,
8653 	 * the packet headers are considered inner packet headers for the RSS
8654 	 * hash computation purpose.
8655 	 * * 2: The RSS hash was computed over source IP address,
8656 	 * destination IP address, source port, and destination port of
8657 	 * IP and TCP or UDP headers of outer tunnel headers.
8658 	 * Note: For non-tunneled packets, this value is not applicable.
8659 	 * * 3: The RSS hash was computed over source IP address and
8660 	 * destination IP address of IP header of outer tunnel headers.
8661 	 * Note: For non-tunneled packets, this value is not applicable.
8662 	 *
8663 	 * Note that 4-tuples values listed above are applicable
8664 	 * for layer 4 protocols supported and enabled for RSS in the hardware,
8665 	 * HWRM firmware, and drivers. For example, if RSS hash is supported and
8666 	 * enabled for TCP traffic only, then the values of tuple_extract_op
8667 	 * corresponding to 4-tuples are only valid for TCP traffic.
8668 	 */
8669 	uint8_t	rss_hash_type;
8670 	/*
8671 	 * This is the aggregation ID that the completion is associated
8672 	 * with. Use this number to correlate the TPA start completion
8673 	 * with the TPA end completion.
8674 	 */
8675 	uint16_t	agg_id;
8676 	/*
8677 	 * This value is the RSS hash value calculated for the packet
8678 	 * based on the mode bits and key value in the VNIC.
8679 	 */
8680 	uint32_t	rss_hash;
8681 } __rte_packed_end;
8682 
8683 /*
8684  * Last 16 bytes of rx_tpa_v2_start_cmpl.
8685  *
8686  * This TPA completion structure is used on devices where the
8687  * `hwrm_vnic_qcaps.max_aggs_supported` value is greater than 0.
8688  */
8689 /* rx_tpa_v2_start_cmpl_hi (size:128b/16B) */
8690 struct __rte_packed_begin rx_tpa_v2_start_cmpl_hi {
8691 	uint32_t	flags2;
8692 	/*
8693 	 * This indicates that the ip checksum was calculated for the
8694 	 * inner packet and that the sum passed for all segments
8695 	 * included in the aggregation.
8696 	 */
8697 	#define RX_TPA_V2_START_CMPL_FLAGS2_IP_CS_CALC \
8698 		UINT32_C(0x1)
8699 	/*
8700 	 * This indicates that the TCP, UDP or ICMP checksum was
8701 	 * calculated for the inner packet and that the sum passed
8702 	 * for all segments included in the aggregation.
8703 	 */
8704 	#define RX_TPA_V2_START_CMPL_FLAGS2_L4_CS_CALC \
8705 		UINT32_C(0x2)
8706 	/*
8707 	 * This indicates that the ip checksum was calculated for the
8708 	 * tunnel header and that the sum passed for all segments
8709 	 * included in the aggregation.
8710 	 */
8711 	#define RX_TPA_V2_START_CMPL_FLAGS2_T_IP_CS_CALC \
8712 		UINT32_C(0x4)
8713 	/*
8714 	 * This indicates that the UDP checksum was
8715 	 * calculated for the tunnel packet and that the sum passed for
8716 	 * all segments included in the aggregation.
8717 	 */
8718 	#define RX_TPA_V2_START_CMPL_FLAGS2_T_L4_CS_CALC \
8719 		UINT32_C(0x8)
8720 	/* This value indicates what format the metadata field is. */
8721 	#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_MASK \
8722 		UINT32_C(0xf0)
8723 	#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_SFT            4
8724 	/* No metadata information. Value is zero. */
8725 	#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_NONE \
8726 		(UINT32_C(0x0) << 4)
8727 	/*
8728 	 * The metadata field contains the VLAN tag and TPID value.
8729 	 * - metadata[11:0] contains the vlan VID value.
8730 	 * - metadata[12] contains the vlan DE value.
8731 	 * - metadata[15:13] contains the vlan PRI value.
8732 	 * - metadata[31:16] contains the vlan TPID value.
8733 	 */
8734 	#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_VLAN \
8735 		(UINT32_C(0x1) << 4)
8736 	/*
8737 	 * If ext_meta_format is equal to 1, the metadata field
8738 	 * contains the lower 16b of the tunnel ID value, justified
8739 	 * to LSB
8740 	 * - VXLAN = VNI[23:0] -> VXLAN Network ID
8741 	 * - Geneve (NGE) = VNI[23:0] a-> Virtual Network Identifier.
8742 	 * - NVGRE = TNI[23:0] -> Tenant Network ID
8743 	 * - GRE = KEY[31:0] -> key field with bit mask. Zero if K = 0
8744 	 * - IPV4 = 0 (not populated)
8745 	 * - IPV6 = Flow Label[19:0]
8746 	 * - PPPoE = sessionID[15:0]
8747 	 * - MPLs = Outer label[19:0]
8748 	 * - UPAR = Selected[31:0] with bit mask
8749 	 */
8750 	#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_TUNNEL_ID \
8751 		(UINT32_C(0x2) << 4)
8752 	/*
8753 	 * if ext_meta_format is equal to 1, metadata field contains
8754 	 * 16b metadata from the prepended header (chdr_data).
8755 	 */
8756 	#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_CHDR_DATA \
8757 		(UINT32_C(0x3) << 4)
8758 	/*
8759 	 * If ext_meta_format is equal to 1, the metadata field contains
8760 	 * the outer_l3_offset, inner_l2_offset, inner_l3_offset and
8761 	 * inner_l4_size.
8762 	 * - metadata[8:0] contains the outer_l3_offset.
8763 	 * - metadata[17:9] contains the inner_l2_offset.
8764 	 * - metadata[26:18] contains the inner_l3_offset.
8765 	 * - metadata[31:27] contains the inner_l4_size.
8766 	 */
8767 	#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET \
8768 		(UINT32_C(0x4) << 4)
8769 	#define RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_LAST \
8770 		RX_TPA_V2_START_CMPL_FLAGS2_META_FORMAT_HDR_OFFSET
8771 	/*
8772 	 * This field indicates the IP type for the inner-most IP header.
8773 	 * A value of '0' indicates IPv4. A value of '1' indicates IPv6.
8774 	 */
8775 	#define RX_TPA_V2_START_CMPL_FLAGS2_IP_TYPE \
8776 		UINT32_C(0x100)
8777 	/*
8778 	 * This indicates that the complete 1's complement checksum was
8779 	 * calculated for the packet.
8780 	 */
8781 	#define RX_TPA_V2_START_CMPL_FLAGS2_COMPLETE_CHECKSUM_CALC \
8782 		UINT32_C(0x200)
8783 	/*
8784 	 * The combination of this value and meta_format indicated what
8785 	 * format the metadata field is.
8786 	 */
8787 	#define RX_TPA_V2_START_CMPL_FLAGS2_EXT_META_FORMAT_MASK \
8788 		UINT32_C(0xc00)
8789 	#define RX_TPA_V2_START_CMPL_FLAGS2_EXT_META_FORMAT_SFT        10
8790 	/*
8791 	 * This value is the complete 1's complement checksum calculated from
8792 	 * the start of the outer L3 header to the end of the packet (not
8793 	 * including the ethernet crc). It is valid when the
8794 	 * 'complete_checksum_calc' flag is set. For TPA Start completions,
8795 	 * the complete checksum is calculated for the first packet in the
8796 	 * aggregation only.
8797 	 */
8798 	#define RX_TPA_V2_START_CMPL_FLAGS2_COMPLETE_CHECKSUM_MASK \
8799 		UINT32_C(0xffff0000)
8800 	#define RX_TPA_V2_START_CMPL_FLAGS2_COMPLETE_CHECKSUM_SFT      16
8801 	/*
8802 	 * This is data from the CFA block as indicated by the meta_format
8803 	 * field.
8804 	 */
8805 	uint32_t	metadata;
8806 	/* When {ext_meta_format,meta_format}=1, this value is the VLAN VID. */
8807 	#define RX_TPA_V2_START_CMPL_METADATA_VID_MASK UINT32_C(0xfff)
8808 	#define RX_TPA_V2_START_CMPL_METADATA_VID_SFT  0
8809 	/* When {ext_meta_format,meta_format}=1, this value is the VLAN DE. */
8810 	#define RX_TPA_V2_START_CMPL_METADATA_DE       UINT32_C(0x1000)
8811 	/* When {ext_meta_format,meta_format}=1, this value is the VLAN PRI. */
8812 	#define RX_TPA_V2_START_CMPL_METADATA_PRI_MASK UINT32_C(0xe000)
8813 	#define RX_TPA_V2_START_CMPL_METADATA_PRI_SFT  13
8814 	/* When {ext_meta_format,meta_format}=1, this value is the VLAN TPID. */
8815 	#define RX_TPA_V2_START_CMPL_METADATA_TPID_MASK UINT32_C(0xffff0000)
8816 	#define RX_TPA_V2_START_CMPL_METADATA_TPID_SFT 16
8817 	uint16_t	errors_v2;
8818 	/*
8819 	 * This value is written by the NIC such that it will be different
8820 	 * for each pass through the completion queue. The even passes
8821 	 * will write 1. The odd passes will write 0.
8822 	 */
8823 	#define RX_TPA_V2_START_CMPL_V2 \
8824 		UINT32_C(0x1)
8825 	#define RX_TPA_V2_START_CMPL_ERRORS_MASK \
8826 		UINT32_C(0xfffe)
8827 	#define RX_TPA_V2_START_CMPL_ERRORS_SFT                    1
8828 	/*
8829 	 * This error indicates that there was some sort of problem with
8830 	 * the BDs for the packet that was found after part of the
8831 	 * packet was already placed. The packet should be treated as
8832 	 * invalid.
8833 	 */
8834 	#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_MASK \
8835 		UINT32_C(0xe)
8836 	#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_SFT        1
8837 	/* No buffer error */
8838 	#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER \
8839 		(UINT32_C(0x0) << 1)
8840 	/*
8841 	 * Bad Format:
8842 	 * BDs were not formatted correctly.
8843 	 */
8844 	#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT \
8845 		(UINT32_C(0x3) << 1)
8846 	/*
8847 	 * Flush:
8848 	 * There was a bad_format error on the previous operation
8849 	 */
8850 	#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_FLUSH \
8851 		(UINT32_C(0x5) << 1)
8852 	#define RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_LAST \
8853 		RX_TPA_V2_START_CMPL_ERRORS_BUFFER_ERROR_FLUSH
8854 	/*
8855 	 * This field identifies the CFA action rule that was used for this
8856 	 * packet.
8857 	 */
8858 	uint16_t	cfa_code;
8859 	/*
8860 	 * For devices that support timestamps this field is overridden
8861 	 * with the timestamp value. When `flags.timestamp_fld_format` is
8862 	 * cleared, this field contains the 32b timestamp for the packet from the
8863 	 * MAC.
8864 	 *
8865 	 * When `flags.timestamp_fld_format` is set, this field contains the
8866 	 * outer_l3_offset, inner_l2_offset, inner_l3_offset, and inner_l4_size
8867 	 * as defined below.
8868 	 */
8869 	uint32_t	inner_l4_size_inner_l3_offset_inner_l2_offset_outer_l3_offset;
8870 	/*
8871 	 * This is the offset from the beginning of the packet in bytes for
8872 	 * the outer L3 header. If there is no outer L3 header, then this
8873 	 * value is zero.
8874 	 */
8875 	#define RX_TPA_V2_START_CMPL_OUTER_L3_OFFSET_MASK UINT32_C(0x1ff)
8876 	#define RX_TPA_V2_START_CMPL_OUTER_L3_OFFSET_SFT 0
8877 	/*
8878 	 * This is the offset from the beginning of the packet in bytes for
8879 	 * the inner most L2 header.
8880 	 */
8881 	#define RX_TPA_V2_START_CMPL_INNER_L2_OFFSET_MASK UINT32_C(0x3fe00)
8882 	#define RX_TPA_V2_START_CMPL_INNER_L2_OFFSET_SFT 9
8883 	/*
8884 	 * This is the offset from the beginning of the packet in bytes for
8885 	 * the inner most L3 header.
8886 	 */
8887 	#define RX_TPA_V2_START_CMPL_INNER_L3_OFFSET_MASK UINT32_C(0x7fc0000)
8888 	#define RX_TPA_V2_START_CMPL_INNER_L3_OFFSET_SFT 18
8889 	/*
8890 	 * This is the size in bytes of the inner most L4 header.
8891 	 * This can be subtracted from the payload_offset to determine
8892 	 * the start of the inner most L4 header.
8893 	 */
8894 	#define RX_TPA_V2_START_CMPL_INNER_L4_SIZE_MASK  UINT32_C(0xf8000000)
8895 	#define RX_TPA_V2_START_CMPL_INNER_L4_SIZE_SFT   27
8896 } __rte_packed_end;
8897 
8898 /*
8899  * This TPA completion structure is used on devices where the
8900  * `hwrm_vnic_qcaps.max_aggs_supported` value is greater than 0.
8901  */
8902 /* rx_tpa_v2_end_cmpl (size:128b/16B) */
8903 struct __rte_packed_begin rx_tpa_v2_end_cmpl {
8904 	uint16_t	flags_type;
8905 	/*
8906 	 * This field indicates the exact type of the completion.
8907 	 * By convention, the LSB identifies the length of the
8908 	 * record in 16B units. Even values indicate 16B
8909 	 * records. Odd values indicate 32B
8910 	 * records.
8911 	 */
8912 	#define RX_TPA_V2_END_CMPL_TYPE_MASK \
8913 		UINT32_C(0x3f)
8914 	#define RX_TPA_V2_END_CMPL_TYPE_SFT                       0
8915 	/*
8916 	 * RX L2 TPA End Completion:
8917 	 * Completion at the end of a TPA operation.
8918 	 * Length = 32B
8919 	 */
8920 	#define RX_TPA_V2_END_CMPL_TYPE_RX_TPA_END \
8921 		UINT32_C(0x15)
8922 	#define RX_TPA_V2_END_CMPL_TYPE_LAST \
8923 		RX_TPA_V2_END_CMPL_TYPE_RX_TPA_END
8924 	#define RX_TPA_V2_END_CMPL_FLAGS_MASK \
8925 		UINT32_C(0xffc0)
8926 	#define RX_TPA_V2_END_CMPL_FLAGS_SFT                      6
8927 	/*
8928 	 * When this bit is '1', it indicates a packet that has an
8929 	 * error of some type. Type of error is indicated in
8930 	 * error_flags.
8931 	 */
8932 	#define RX_TPA_V2_END_CMPL_FLAGS_ERROR \
8933 		UINT32_C(0x40)
8934 	/* This field indicates how the packet was placed in the buffer. */
8935 	#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_MASK \
8936 		UINT32_C(0x380)
8937 	#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_SFT             7
8938 	/*
8939 	 * Jumbo:
8940 	 * TPA Packet was placed using jumbo algorithm. This means
8941 	 * that the first buffer will be filled with data before
8942 	 * moving to aggregation buffers. Each aggregation buffer
8943 	 * will be filled before moving to the next aggregation
8944 	 * buffer.
8945 	 */
8946 	#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_JUMBO \
8947 		(UINT32_C(0x1) << 7)
8948 	/*
8949 	 * Header/Data Separation:
8950 	 * Packet was placed using Header/Data separation algorithm.
8951 	 * The separation location is indicated by the itype field.
8952 	 */
8953 	#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_HDS \
8954 		(UINT32_C(0x2) << 7)
8955 	/*
8956 	 * GRO/Jumbo:
8957 	 * Packet will be placed using GRO/Jumbo where the first
8958 	 * packet is filled with data. Subsequent packets will be
8959 	 * placed such that any one packet does not span two
8960 	 * aggregation buffers unless it starts at the beginning of
8961 	 * an aggregation buffer.
8962 	 */
8963 	#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_GRO_JUMBO \
8964 		(UINT32_C(0x5) << 7)
8965 	/*
8966 	 * GRO/Header-Data Separation:
8967 	 * Packet will be placed using GRO/HDS where the header
8968 	 * is in the first packet.
8969 	 * Payload of each packet will be
8970 	 * placed such that any one packet does not span two
8971 	 * aggregation buffers unless it starts at the beginning of
8972 	 * an aggregation buffer.
8973 	 */
8974 	#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_GRO_HDS \
8975 		(UINT32_C(0x6) << 7)
8976 	/*
8977 	 * IOC/Header-Data Separation:
8978 	 * Packet will be placed using In-Order Completion/HDS where
8979 	 * the header is in the first packet buffer. Payload of each
8980 	 * packet will be placed such that each packet starts at the
8981 	 * beginning of an aggregation buffer.
8982 	 */
8983 	#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_IOC_HDS \
8984 		(UINT32_C(0x7) << 7)
8985 	#define RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_LAST \
8986 		RX_TPA_V2_END_CMPL_FLAGS_PLACEMENT_IOC_HDS
8987 	/* unused is 1 b */
8988 	#define RX_TPA_V2_END_CMPL_FLAGS_UNUSED \
8989 		UINT32_C(0x400)
8990 	/*
8991 	 * This bit is '1' if metadata has been added to the end of the
8992 	 * packet in host memory. Metadata starts at the first 32B boundary
8993 	 * after the end of the packet for regular and jumbo placement.
8994 	 * It starts at the first 32B boundary after the end of the header
8995 	 * for HDS placement. The length of the metadata is indicated in the
8996 	 * metadata itself.
8997 	 */
8998 	#define RX_TPA_V2_END_CMPL_FLAGS_PKT_METADATA_PRESENT \
8999 		UINT32_C(0x800)
9000 	/*
9001 	 * This value indicates what the inner packet determined for the
9002 	 * packet was.
9003 	 * - 2 TCP Packet
9004 	 *     Indicates that the packet was IP and TCP. This indicates
9005 	 *     that the ip_cs field is valid and that the tcp_udp_cs
9006 	 *     field is valid and contains the TCP checksum.
9007 	 *     This also indicates that the payload_offset field is valid.
9008 	 */
9009 	#define RX_TPA_V2_END_CMPL_FLAGS_ITYPE_MASK \
9010 		UINT32_C(0xf000)
9011 	#define RX_TPA_V2_END_CMPL_FLAGS_ITYPE_SFT                 12
9012 	/*
9013 	 * This value is zero for TPA End completions.
9014 	 * There is no data in the buffer that corresponds to the opaque
9015 	 * value in this completion.
9016 	 */
9017 	uint16_t	len;
9018 	/*
9019 	 * This is a copy of the opaque field from the RX BD this completion
9020 	 * corresponds to.
9021 	 */
9022 	uint32_t	opaque;
9023 	uint8_t	v1;
9024 	/*
9025 	 * This value is written by the NIC such that it will be different
9026 	 * for each pass through the completion queue. The even passes
9027 	 * will write 1. The odd passes will write 0.
9028 	 */
9029 	#define RX_TPA_V2_END_CMPL_V1     UINT32_C(0x1)
9030 	/* This value is the number of segments in the TPA operation. */
9031 	uint8_t	tpa_segs;
9032 	/*
9033 	 * This is the aggregation ID that the completion is associated
9034 	 * with. Use this number to correlate the TPA start completion
9035 	 * with the TPA end completion.
9036 	 */
9037 	uint16_t	agg_id;
9038 	/*
9039 	 * For non-GRO packets, this value is the
9040 	 * timestamp delta between earliest and latest timestamp values for
9041 	 * TPA packet. If packets were not time stamped, then delta will be
9042 	 * zero.
9043 	 *
9044 	 * For GRO packets, this field is zero except for the following
9045 	 * sub-fields.
9046 	 * - tsdelta[31]
9047 	 *     Timestamp present indication. When '0', no Timestamp
9048 	 *     option is in the packet. When '1', then a Timestamp
9049 	 *     option is present in the packet.
9050 	 */
9051 	uint32_t	tsdelta;
9052 } __rte_packed_end;
9053 
9054 /*
9055  * Last 16 bytes of rx_tpa_v2_end_cmpl.
9056  *
9057  * This TPA completion structure is used on devices where the
9058  * `hwrm_vnic_qcaps.max_aggs_supported` value is greater than 0.
9059  */
9060 /* rx_tpa_v2_end_cmpl_hi (size:128b/16B) */
9061 struct __rte_packed_begin rx_tpa_v2_end_cmpl_hi {
9062 	/*
9063 	 * This value is the number of duplicate ACKs that have been
9064 	 * received as part of the TPA operation.
9065 	 */
9066 	uint16_t	tpa_dup_acks;
9067 	/*
9068 	 * This value is the number of duplicate ACKs that have been
9069 	 * received as part of the TPA operation.
9070 	 */
9071 	#define RX_TPA_V2_END_CMPL_TPA_DUP_ACKS_MASK UINT32_C(0xf)
9072 	#define RX_TPA_V2_END_CMPL_TPA_DUP_ACKS_SFT 0
9073 	/*
9074 	 * This value indicated the offset in bytes from the beginning of
9075 	 * the packet where the inner payload starts. This value is valid
9076 	 * for TCP, UDP, FCoE and RoCE packets
9077 	 */
9078 	uint8_t	payload_offset;
9079 	/*
9080 	 * The value is the total number of aggregation buffers that were
9081 	 * used in the TPA operation. All TPA aggregation buffer completions
9082 	 * precede the TPA End completion. If the value is zero, then the
9083 	 * aggregation is completely contained in the buffer space provided
9084 	 * in the aggregation start completion.
9085 	 * Note that the field is simply provided as a cross check.
9086 	 */
9087 	uint8_t	tpa_agg_bufs;
9088 	/*
9089 	 * This value is the valid when TPA completion is active. It
9090 	 * indicates the length of the longest segment of the TPA operation
9091 	 * for LRO mode and the length of the first segment in GRO mode.
9092 	 *
9093 	 * This value may be used by GRO software to re-construct the original
9094 	 * packet stream from the TPA packet. This is the length of all
9095 	 * but the last segment for GRO. In LRO mode this value may be used
9096 	 * to indicate MSS size to the stack.
9097 	 */
9098 	uint16_t	tpa_seg_len;
9099 	uint16_t	unused_1;
9100 	uint16_t	errors_v2;
9101 	/*
9102 	 * This value is written by the NIC such that it will be different
9103 	 * for each pass through the completion queue. The even passes
9104 	 * will write 1. The odd passes will write 0.
9105 	 */
9106 	#define RX_TPA_V2_END_CMPL_V2                             UINT32_C(0x1)
9107 	#define RX_TPA_V2_END_CMPL_ERRORS_MASK \
9108 		UINT32_C(0xfffe)
9109 	#define RX_TPA_V2_END_CMPL_ERRORS_SFT                     1
9110 	/*
9111 	 * This error indicates that there was some sort of problem with
9112 	 * the BDs for the packet that was found after part of the
9113 	 * packet was already placed. The packet should be treated as
9114 	 * invalid.
9115 	 */
9116 	#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_MASK \
9117 		UINT32_C(0xe)
9118 	#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_SFT         1
9119 	/* No buffer error */
9120 	#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER \
9121 		(UINT32_C(0x0) << 1)
9122 	/*
9123 	 * This error occurs when there is a fatal HW problem in
9124 	 * the chip only. It indicates that there were not
9125 	 * BDs on chip but that there was adequate reservation.
9126 	 * provided by the TPA block.
9127 	 */
9128 	#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_NOT_ON_CHIP \
9129 		(UINT32_C(0x2) << 1)
9130 	/*
9131 	 * Bad Format:
9132 	 * BDs were not formatted correctly.
9133 	 */
9134 	#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT \
9135 		(UINT32_C(0x3) << 1)
9136 	/*
9137 	 * This error occurs when TPA block was not configured to
9138 	 * reserve adequate BDs for TPA operations on this RX
9139 	 * ring. All data for the TPA operation was not placed.
9140 	 *
9141 	 * This error can also be generated when the number of
9142 	 * segments is not programmed correctly in TPA and the
9143 	 * 33 total aggregation buffers allowed for the TPA
9144 	 * operation has been exceeded.
9145 	 */
9146 	#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_RSV_ERROR \
9147 		(UINT32_C(0x4) << 1)
9148 	/*
9149 	 * Flush:
9150 	 * There was a bad_format error on the previous operation
9151 	 */
9152 	#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_FLUSH \
9153 		(UINT32_C(0x5) << 1)
9154 	#define RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_LAST \
9155 		RX_TPA_V2_END_CMPL_ERRORS_BUFFER_ERROR_FLUSH
9156 	uint16_t	unused_2;
9157 	/*
9158 	 * This is the opaque value that was completed for the TPA start
9159 	 * completion that corresponds to this TPA end completion.
9160 	 */
9161 	uint32_t	start_opaque;
9162 } __rte_packed_end;
9163 
9164 /*
9165  * This TPA completion structure is used on devices where the
9166  * `hwrm_vnic_qcaps.max_aggs_supported` value is greater than 0.
9167  */
9168 /* rx_tpa_v2_abuf_cmpl (size:128b/16B) */
9169 struct __rte_packed_begin rx_tpa_v2_abuf_cmpl {
9170 	uint16_t	type;
9171 	/*
9172 	 * This field indicates the exact type of the completion.
9173 	 * By convention, the LSB identifies the length of the
9174 	 * record in 16B units. Even values indicate 16B
9175 	 * records. Odd values indicate 32B
9176 	 * records.
9177 	 */
9178 	#define RX_TPA_V2_ABUF_CMPL_TYPE_MASK      UINT32_C(0x3f)
9179 	#define RX_TPA_V2_ABUF_CMPL_TYPE_SFT       0
9180 	/*
9181 	 * RX TPA Aggregation Buffer completion:
9182 	 * Completion of an L2 aggregation buffer in support of
9183 	 * TPA packet completion. Length = 16B
9184 	 */
9185 	#define RX_TPA_V2_ABUF_CMPL_TYPE_RX_TPA_AGG  UINT32_C(0x16)
9186 	#define RX_TPA_V2_ABUF_CMPL_TYPE_LAST \
9187 		RX_TPA_V2_ABUF_CMPL_TYPE_RX_TPA_AGG
9188 	/*
9189 	 * This is the length of the data for the packet stored in this
9190 	 * aggregation buffer identified by the opaque value. This does not
9191 	 * include the length of any
9192 	 * data placed in other aggregation BDs or in the packet or buffer
9193 	 * BDs. This length does not include any space added due to
9194 	 * hdr_offset register during HDS placement mode.
9195 	 */
9196 	uint16_t	len;
9197 	/*
9198 	 * This is a copy of the opaque field from the RX BD this aggregation
9199 	 * buffer corresponds to.
9200 	 */
9201 	uint32_t	opaque;
9202 	uint16_t	v;
9203 	/*
9204 	 * This value is written by the NIC such that it will be different
9205 	 * for each pass through the completion queue. The even passes
9206 	 * will write 1. The odd passes will write 0.
9207 	 */
9208 	#define RX_TPA_V2_ABUF_CMPL_V     UINT32_C(0x1)
9209 	/*
9210 	 * This is the aggregation ID that the completion is associated with. Use
9211 	 * this number to correlate the TPA agg completion with the TPA start
9212 	 * completion and the TPA end completion.
9213 	 */
9214 	uint16_t	agg_id;
9215 	uint32_t	unused_1;
9216 } __rte_packed_end;
9217 
9218 /* rx_abuf_cmpl (size:128b/16B) */
9219 struct __rte_packed_begin rx_abuf_cmpl {
9220 	uint16_t	type;
9221 	/*
9222 	 * This field indicates the exact type of the completion.
9223 	 * By convention, the LSB identifies the length of the
9224 	 * record in 16B units. Even values indicate 16B
9225 	 * records. Odd values indicate 32B
9226 	 * records.
9227 	 */
9228 	#define RX_ABUF_CMPL_TYPE_MASK  UINT32_C(0x3f)
9229 	#define RX_ABUF_CMPL_TYPE_SFT   0
9230 	/*
9231 	 * RX Aggregation Buffer completion:
9232 	 * Completion of an L2 aggregation buffer in support of
9233 	 * TPA, HDS, or Jumbo packet completion. Length = 16B
9234 	 */
9235 	#define RX_ABUF_CMPL_TYPE_RX_AGG  UINT32_C(0x12)
9236 	#define RX_ABUF_CMPL_TYPE_LAST   RX_ABUF_CMPL_TYPE_RX_AGG
9237 	/*
9238 	 * This is the length of the data for the packet stored in this
9239 	 * aggregation buffer identified by the opaque value. This does not
9240 	 * include the length of any
9241 	 * data placed in other aggregation BDs or in the packet or buffer
9242 	 * BDs. This length does not include any space added due to
9243 	 * hdr_offset register during HDS placement mode.
9244 	 */
9245 	uint16_t	len;
9246 	/*
9247 	 * This is a copy of the opaque field from the RX BD this aggregation
9248 	 * buffer corresponds to.
9249 	 */
9250 	uint32_t	opaque;
9251 	uint32_t	v;
9252 	/*
9253 	 * This value is written by the NIC such that it will be different
9254 	 * for each pass through the completion queue. The even passes
9255 	 * will write 1. The odd passes will write 0.
9256 	 */
9257 	#define RX_ABUF_CMPL_V     UINT32_C(0x1)
9258 	/* unused3 is 32 b */
9259 	uint32_t	unused_2;
9260 } __rte_packed_end;
9261 
9262 /* VEE FLUSH Completion Record (16 bytes) */
9263 /* vee_flush (size:128b/16B) */
9264 struct __rte_packed_begin vee_flush {
9265 	uint32_t	downstream_path_type;
9266 	/*
9267 	 * This field indicates the exact type of the completion.
9268 	 * By convention, the LSB identifies the length of the
9269 	 * record in 16B units. Even values indicate 16B
9270 	 * records. Odd values indicate 32B
9271 	 * records.
9272 	 */
9273 	#define VEE_FLUSH_TYPE_MASK           UINT32_C(0x3f)
9274 	#define VEE_FLUSH_TYPE_SFT            0
9275 	/*
9276 	 * VEE Flush Completion:
9277 	 * This completion is inserted manually by the Primate and processed
9278 	 * by the VEE hardware to ensure that all completions on a VEE
9279 	 * function have been processed by the VEE hardware before FLR
9280 	 * process is completed.
9281 	 */
9282 	#define VEE_FLUSH_TYPE_VEE_FLUSH        UINT32_C(0x1c)
9283 	#define VEE_FLUSH_TYPE_LAST            VEE_FLUSH_TYPE_VEE_FLUSH
9284 	/* downstream_path is 1 b */
9285 	#define VEE_FLUSH_DOWNSTREAM_PATH     UINT32_C(0x40)
9286 	/* This completion is associated with VEE Transmit */
9287 	#define VEE_FLUSH_DOWNSTREAM_PATH_TX    (UINT32_C(0x0) << 6)
9288 	/* This completion is associated with VEE Receive */
9289 	#define VEE_FLUSH_DOWNSTREAM_PATH_RX    (UINT32_C(0x1) << 6)
9290 	#define VEE_FLUSH_DOWNSTREAM_PATH_LAST VEE_FLUSH_DOWNSTREAM_PATH_RX
9291 	/*
9292 	 * This is an opaque value that is passed through the completion
9293 	 * to the VEE handler SW and is used to indicate what VEE VQ or
9294 	 * function has completed FLR processing.
9295 	 */
9296 	uint32_t	opaque;
9297 	uint32_t	v;
9298 	/*
9299 	 * This value is written by the NIC such that it will be different
9300 	 * for each pass through the completion queue. The even passes will
9301 	 * write 1. The odd passes will write 0.
9302 	 */
9303 	#define VEE_FLUSH_V     UINT32_C(0x1)
9304 	/* unused3 is 32 b */
9305 	uint32_t	unused_3;
9306 } __rte_packed_end;
9307 
9308 /* eject_cmpl (size:128b/16B) */
9309 struct __rte_packed_begin eject_cmpl {
9310 	uint16_t	type;
9311 	/*
9312 	 * This field indicates the exact type of the completion.
9313 	 * By convention, the LSB identifies the length of the
9314 	 * record in 16B units. Even values indicate 16B
9315 	 * records. Odd values indicate 32B
9316 	 * records.
9317 	 */
9318 	#define EJECT_CMPL_TYPE_MASK       UINT32_C(0x3f)
9319 	#define EJECT_CMPL_TYPE_SFT        0
9320 	/*
9321 	 * Statistics Ejection Completion:
9322 	 * Completion of statistics data ejection buffer.
9323 	 * Length = 16B
9324 	 */
9325 	#define EJECT_CMPL_TYPE_STAT_EJECT   UINT32_C(0x1a)
9326 	#define EJECT_CMPL_TYPE_LAST        EJECT_CMPL_TYPE_STAT_EJECT
9327 	#define EJECT_CMPL_FLAGS_MASK      UINT32_C(0xffc0)
9328 	#define EJECT_CMPL_FLAGS_SFT       6
9329 	/*
9330 	 * When this bit is '1', it indicates a packet that has an
9331 	 * error of some type. Type of error is indicated in
9332 	 * error_flags.
9333 	 */
9334 	#define EJECT_CMPL_FLAGS_ERROR      UINT32_C(0x40)
9335 	/*
9336 	 * This is the length of the statistics data stored in this
9337 	 * buffer.
9338 	 */
9339 	uint16_t	len;
9340 	/*
9341 	 * This is a copy of the opaque field from the RX BD this ejection
9342 	 * buffer corresponds to.
9343 	 */
9344 	uint32_t	opaque;
9345 	uint16_t	v;
9346 	/*
9347 	 * This value is written by the NIC such that it will be different
9348 	 * for each pass through the completion queue. The even passes
9349 	 * will write 1. The odd passes will write 0.
9350 	 */
9351 	#define EJECT_CMPL_V                              UINT32_C(0x1)
9352 	#define EJECT_CMPL_ERRORS_MASK                    UINT32_C(0xfffe)
9353 	#define EJECT_CMPL_ERRORS_SFT                     1
9354 	/*
9355 	 * This error indicates that there was some sort of problem with
9356 	 * the BDs for statistics ejection. The statistics ejection should
9357 	 * be treated as invalid
9358 	 */
9359 	#define EJECT_CMPL_ERRORS_BUFFER_ERROR_MASK        UINT32_C(0xe)
9360 	#define EJECT_CMPL_ERRORS_BUFFER_ERROR_SFT         1
9361 	/* No buffer error */
9362 	#define EJECT_CMPL_ERRORS_BUFFER_ERROR_NO_BUFFER \
9363 		(UINT32_C(0x0) << 1)
9364 	/*
9365 	 * Did Not Fit:
9366 	 * Statistics did not fit into aggregation buffer provided.
9367 	 */
9368 	#define EJECT_CMPL_ERRORS_BUFFER_ERROR_DID_NOT_FIT \
9369 		(UINT32_C(0x1) << 1)
9370 	/*
9371 	 * Bad Format:
9372 	 * BDs were not formatted correctly.
9373 	 */
9374 	#define EJECT_CMPL_ERRORS_BUFFER_ERROR_BAD_FORMAT \
9375 		(UINT32_C(0x3) << 1)
9376 	/*
9377 	 * Flush:
9378 	 * There was a bad_format error on the previous operation
9379 	 */
9380 	#define EJECT_CMPL_ERRORS_BUFFER_ERROR_FLUSH \
9381 		(UINT32_C(0x5) << 1)
9382 	#define EJECT_CMPL_ERRORS_BUFFER_ERROR_LAST \
9383 		EJECT_CMPL_ERRORS_BUFFER_ERROR_FLUSH
9384 	/* reserved16 is 16 b */
9385 	uint16_t	reserved16;
9386 	/* unused3 is 32 b */
9387 	uint32_t	unused_2;
9388 } __rte_packed_end;
9389 
9390 /* hwrm_cmpl (size:128b/16B) */
9391 struct __rte_packed_begin hwrm_cmpl {
9392 	uint16_t	type;
9393 	/*
9394 	 * This field indicates the exact type of the completion.
9395 	 * By convention, the LSB identifies the length of the
9396 	 * record in 16B units. Even values indicate 16B
9397 	 * records. Odd values indicate 32B
9398 	 * records.
9399 	 */
9400 	#define HWRM_CMPL_TYPE_MASK     UINT32_C(0x3f)
9401 	#define HWRM_CMPL_TYPE_SFT      0
9402 	/*
9403 	 * HWRM Command Completion:
9404 	 * Completion of an HWRM command.
9405 	 */
9406 	#define HWRM_CMPL_TYPE_HWRM_DONE  UINT32_C(0x20)
9407 	#define HWRM_CMPL_TYPE_LAST      HWRM_CMPL_TYPE_HWRM_DONE
9408 	/* This is the sequence_id of the HWRM command that has completed. */
9409 	uint16_t	sequence_id;
9410 	/* unused2 is 32 b */
9411 	uint32_t	unused_1;
9412 	uint32_t	v;
9413 	/*
9414 	 * This value is written by the NIC such that it will be different
9415 	 * for each pass through the completion queue. The even passes
9416 	 * will write 1. The odd passes will write 0.
9417 	 */
9418 	#define HWRM_CMPL_V     UINT32_C(0x1)
9419 	/* unused4 is 32 b */
9420 	uint32_t	unused_3;
9421 } __rte_packed_end;
9422 
9423 /* hwrm_fwd_req_cmpl (size:128b/16B) */
9424 struct __rte_packed_begin hwrm_fwd_req_cmpl {
9425 	/*
9426 	 * This field indicates the exact type of the completion.
9427 	 * By convention, the LSB identifies the length of the
9428 	 * record in 16B units. Even values indicate 16B
9429 	 * records. Odd values indicate 32B
9430 	 * records.
9431 	 */
9432 	uint16_t	req_len_type;
9433 	/*
9434 	 * This field indicates the exact type of the completion.
9435 	 * By convention, the LSB identifies the length of the
9436 	 * record in 16B units. Even values indicate 16B
9437 	 * records. Odd values indicate 32B
9438 	 * records.
9439 	 */
9440 	#define HWRM_FWD_REQ_CMPL_TYPE_MASK        UINT32_C(0x3f)
9441 	#define HWRM_FWD_REQ_CMPL_TYPE_SFT         0
9442 	/* Forwarded HWRM Request */
9443 	#define HWRM_FWD_REQ_CMPL_TYPE_HWRM_FWD_REQ  UINT32_C(0x22)
9444 	#define HWRM_FWD_REQ_CMPL_TYPE_LAST \
9445 		HWRM_FWD_REQ_CMPL_TYPE_HWRM_FWD_REQ
9446 	/* Length of forwarded request in bytes. */
9447 	#define HWRM_FWD_REQ_CMPL_REQ_LEN_MASK     UINT32_C(0xffc0)
9448 	#define HWRM_FWD_REQ_CMPL_REQ_LEN_SFT      6
9449 	/*
9450 	 * Source ID of this request.
9451 	 * Typically used in forwarding requests and responses.
9452 	 * 0x0 - 0xFFF8 - Used for function ids
9453 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
9454 	 * 0xFFFF - HWRM
9455 	 */
9456 	uint16_t	source_id;
9457 	/* unused1 is 32 b */
9458 	uint32_t	unused0;
9459 	/* Address of forwarded request. */
9460 	uint32_t	req_buf_addr_v[2];
9461 	/*
9462 	 * This value is written by the NIC such that it will be different
9463 	 * for each pass through the completion queue. The even passes
9464 	 * will write 1. The odd passes will write 0.
9465 	 */
9466 	#define HWRM_FWD_REQ_CMPL_V                UINT32_C(0x1)
9467 	/* Address of forwarded request. */
9468 	#define HWRM_FWD_REQ_CMPL_REQ_BUF_ADDR_MASK UINT32_C(0xfffffffe)
9469 	#define HWRM_FWD_REQ_CMPL_REQ_BUF_ADDR_SFT 1
9470 } __rte_packed_end;
9471 
9472 /* hwrm_fwd_resp_cmpl (size:128b/16B) */
9473 struct __rte_packed_begin hwrm_fwd_resp_cmpl {
9474 	uint16_t	type;
9475 	/*
9476 	 * This field indicates the exact type of the completion.
9477 	 * By convention, the LSB identifies the length of the
9478 	 * record in 16B units. Even values indicate 16B
9479 	 * records. Odd values indicate 32B
9480 	 * records.
9481 	 */
9482 	#define HWRM_FWD_RESP_CMPL_TYPE_MASK         UINT32_C(0x3f)
9483 	#define HWRM_FWD_RESP_CMPL_TYPE_SFT          0
9484 	/* Forwarded HWRM Response */
9485 	#define HWRM_FWD_RESP_CMPL_TYPE_HWRM_FWD_RESP  UINT32_C(0x24)
9486 	#define HWRM_FWD_RESP_CMPL_TYPE_LAST \
9487 		HWRM_FWD_RESP_CMPL_TYPE_HWRM_FWD_RESP
9488 	/*
9489 	 * Source ID of this response.
9490 	 * Typically used in forwarding requests and responses.
9491 	 * 0x0 - 0xFFF8 - Used for function ids
9492 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
9493 	 * 0xFFFF - HWRM
9494 	 */
9495 	uint16_t	source_id;
9496 	/* Length of forwarded response in bytes. */
9497 	uint16_t	resp_len;
9498 	/* unused2 is 16 b */
9499 	uint16_t	unused_1;
9500 	/* Address of forwarded request. */
9501 	uint32_t	resp_buf_addr_v[2];
9502 	/*
9503 	 * This value is written by the NIC such that it will be different
9504 	 * for each pass through the completion queue. The even passes
9505 	 * will write 1. The odd passes will write 0.
9506 	 */
9507 	#define HWRM_FWD_RESP_CMPL_V                 UINT32_C(0x1)
9508 	/* Address of forwarded request. */
9509 	#define HWRM_FWD_RESP_CMPL_RESP_BUF_ADDR_MASK UINT32_C(0xfffffffe)
9510 	#define HWRM_FWD_RESP_CMPL_RESP_BUF_ADDR_SFT 1
9511 } __rte_packed_end;
9512 
9513 /* hwrm_async_event_cmpl (size:128b/16B) */
9514 struct __rte_packed_begin hwrm_async_event_cmpl {
9515 	uint16_t	type;
9516 	/*
9517 	 * This field indicates the exact type of the completion.
9518 	 * By convention, the LSB identifies the length of the
9519 	 * record in 16B units. Even values indicate 16B
9520 	 * records. Odd values indicate 32B
9521 	 * records.
9522 	 */
9523 	#define HWRM_ASYNC_EVENT_CMPL_TYPE_MASK            UINT32_C(0x3f)
9524 	#define HWRM_ASYNC_EVENT_CMPL_TYPE_SFT             0
9525 	/* HWRM Asynchronous Event Information */
9526 	#define HWRM_ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT  UINT32_C(0x2e)
9527 	#define HWRM_ASYNC_EVENT_CMPL_TYPE_LAST \
9528 		HWRM_ASYNC_EVENT_CMPL_TYPE_HWRM_ASYNC_EVENT
9529 	/* Identifiers of events. */
9530 	uint16_t	event_id;
9531 	/* Link status changed */
9532 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE \
9533 		UINT32_C(0x0)
9534 	/* Link MTU changed */
9535 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_MTU_CHANGE \
9536 		UINT32_C(0x1)
9537 	/* Link speed changed */
9538 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE \
9539 		UINT32_C(0x2)
9540 	/* DCB Configuration changed */
9541 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DCB_CONFIG_CHANGE \
9542 		UINT32_C(0x3)
9543 	/* Port connection not allowed */
9544 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_CONN_NOT_ALLOWED \
9545 		UINT32_C(0x4)
9546 	/* Link speed configuration was not allowed */
9547 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED \
9548 		UINT32_C(0x5)
9549 	/* Link speed configuration change */
9550 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CFG_CHANGE \
9551 		UINT32_C(0x6)
9552 	/* Port PHY configuration change */
9553 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PORT_PHY_CFG_CHANGE \
9554 		UINT32_C(0x7)
9555 	/* Reset notification to clients */
9556 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY \
9557 		UINT32_C(0x8)
9558 	/* Master function selection event */
9559 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ERROR_RECOVERY \
9560 		UINT32_C(0x9)
9561 	/*
9562 	 * An event signifying that a ring has been disabled by
9563 	 * hw due to error.
9564 	 */
9565 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RING_MONITOR_MSG \
9566 		UINT32_C(0xa)
9567 	/* Function driver unloaded */
9568 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_UNLOAD \
9569 		UINT32_C(0x10)
9570 	/* Function driver loaded */
9571 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_DRVR_LOAD \
9572 		UINT32_C(0x11)
9573 	/* Function FLR related processing has completed */
9574 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FUNC_FLR_PROC_CMPLT \
9575 		UINT32_C(0x12)
9576 	/* PF driver unloaded */
9577 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_UNLOAD \
9578 		UINT32_C(0x20)
9579 	/* PF driver loaded */
9580 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_DRVR_LOAD \
9581 		UINT32_C(0x21)
9582 	/* VF Function Level Reset (FLR) */
9583 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_FLR \
9584 		UINT32_C(0x30)
9585 	/* VF MAC Address Change */
9586 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_MAC_ADDR_CHANGE \
9587 		UINT32_C(0x31)
9588 	/* PF-VF communication channel status change. */
9589 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PF_VF_COMM_STATUS_CHANGE \
9590 		UINT32_C(0x32)
9591 	/* VF Configuration Change */
9592 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_VF_CFG_CHANGE \
9593 		UINT32_C(0x33)
9594 	/* LLFC/PFC Configuration Change */
9595 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LLFC_PFC_CHANGE \
9596 		UINT32_C(0x34)
9597 	/* Default VNIC Configuration Change */
9598 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEFAULT_VNIC_CHANGE \
9599 		UINT32_C(0x35)
9600 	/* HW flow aged */
9601 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HW_FLOW_AGED \
9602 		UINT32_C(0x36)
9603 	/*
9604 	 * A debug notification being posted to the driver. These
9605 	 * notifications are purely for diagnostic purpose and should not be
9606 	 * used for functional purpose. The driver is not supposed to act
9607 	 * on these messages except to log/record it.
9608 	 */
9609 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEBUG_NOTIFICATION \
9610 		UINT32_C(0x37)
9611 	/*
9612 	 * An EEM flow cached memory flush for all flows request event being
9613 	 * posted to the PF driver.
9614 	 */
9615 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_EEM_CACHE_FLUSH_REQ \
9616 		UINT32_C(0x38)
9617 	/*
9618 	 * An EEM flow cache memory flush completion event being posted to the
9619 	 * firmware by the PF driver. This is indication that host EEM flush
9620 	 * has completed by the PF.
9621 	 */
9622 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_EEM_CACHE_FLUSH_DONE \
9623 		UINT32_C(0x39)
9624 	/*
9625 	 * A tcp flag action change event being posted to the PF or trusted VF
9626 	 * driver by the firmware. The PF or trusted VF driver should query
9627 	 * the firmware for the new TCP flag action update after receiving
9628 	 * this async event.
9629 	 */
9630 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_TCP_FLAG_ACTION_CHANGE \
9631 		UINT32_C(0x3a)
9632 	/*
9633 	 * An EEM flow active event being posted to the PF or trusted VF driver
9634 	 * by the firmware. The PF or trusted VF driver should update the
9635 	 * flow's aging timer after receiving this async event.
9636 	 */
9637 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_EEM_FLOW_ACTIVE \
9638 		UINT32_C(0x3b)
9639 	/*
9640 	 * A eem cfg change event being posted to the trusted VF driver by the
9641 	 * firmware if the parent PF EEM configuration changed.
9642 	 */
9643 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_EEM_CFG_CHANGE \
9644 		UINT32_C(0x3c)
9645 	/*
9646 	 * Deprecated.
9647 	 * TFLIB unique default VNIC Configuration Change
9648 	 */
9649 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_TFLIB_DEFAULT_VNIC_CHANGE \
9650 		UINT32_C(0x3d)
9651 	/*
9652 	 * Deprecated.
9653 	 * TFLIB unique link status changed
9654 	 */
9655 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_TFLIB_LINK_STATUS_CHANGE \
9656 		UINT32_C(0x3e)
9657 	/*
9658 	 * An event signifying completion for HWRM_FW_STATE_QUIESCE
9659 	 * (completion, timeout, or error)
9660 	 */
9661 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_QUIESCE_DONE \
9662 		UINT32_C(0x3f)
9663 	/*
9664 	 * An event signifying a HWRM command is in progress and its
9665 	 * response will be deferred. This event is used on crypto controllers
9666 	 * only.
9667 	 */
9668 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEFERRED_RESPONSE \
9669 		UINT32_C(0x40)
9670 	/*
9671 	 * An event signifying that a PFC WatchDog configuration
9672 	 * has changed on any port / cos.
9673 	 */
9674 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PFC_WATCHDOG_CFG_CHANGE \
9675 		UINT32_C(0x41)
9676 	/*
9677 	 * An echo request from the firmware. An echo response is expected by
9678 	 * the firmware.
9679 	 */
9680 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ECHO_REQUEST \
9681 		UINT32_C(0x42)
9682 	/*
9683 	 * An event from firmware indicating who has been selected as the
9684 	 * PHC Master or secondary. Also indicates the last time a failover
9685 	 * happens. Event will also be sent when PHC rolls over.
9686 	 */
9687 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PHC_UPDATE \
9688 		UINT32_C(0x43)
9689 	/*
9690 	 * An event from firmware showing the last PPS timestamp that has been
9691 	 * latched.
9692 	 */
9693 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_PPS_TIMESTAMP \
9694 		UINT32_C(0x44)
9695 	/*
9696 	 * An event from firmware indicating that an error has occurred.
9697 	 * The driver should log the event so that an administrator can be
9698 	 * aware that a problem has occurred that may need attention.
9699 	 */
9700 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ERROR_REPORT \
9701 		UINT32_C(0x45)
9702 	/*
9703 	 * An event from firmware indicating that the programmed pacing
9704 	 * threshold for the doorbell global FIFO has been crossed. The driver
9705 	 * needs to take appropriate action to pace the doorbells when this
9706 	 * event is received from the firmware.
9707 	 */
9708 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DOORBELL_PACING_THRESHOLD \
9709 		UINT32_C(0x46)
9710 	/*
9711 	 * An event from firmware indicating that the RSS capabilities have
9712 	 * changed.
9713 	 */
9714 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RSS_CHANGE \
9715 		UINT32_C(0x47)
9716 	/*
9717 	 * An event from firmware indicating that list of nq ids used for
9718 	 * doorbell pacing DBQ event notification has been updated. The driver
9719 	 * needs to take appropriate action and retrieve the new list when this
9720 	 * event is received from the firmware.
9721 	 */
9722 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DOORBELL_PACING_NQ_UPDATE \
9723 		UINT32_C(0x48)
9724 	/*
9725 	 * An event from firmware indicating that hardware ran into an error
9726 	 * while trying to read the host based doorbell copy region. The driver
9727 	 * needs to take the appropriate action and maintain the corresponding
9728 	 * doorbell copy region.
9729 	 */
9730 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HW_DOORBELL_RECOVERY_READ_ERROR \
9731 		UINT32_C(0x49)
9732 	/*
9733 	 * An event from firmware indicating that the XID partition was not
9734 	 * allocated/freed by the FW successfully for the request that is
9735 	 * encapsulated in the HWRM_EXEC_FWD_RESP by the PF driver for VF.
9736 	 */
9737 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_CTX_ERROR \
9738 		UINT32_C(0x4a)
9739 	/*
9740 	 * A UDCC session has been modified in the FW. The session_id can be
9741 	 * used by the driver to retrieve information related to the UDCC
9742 	 * session.
9743 	 */
9744 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_UDCC_SESSION_CHANGE \
9745 		UINT32_C(0x4b)
9746 	/*
9747 	 * Used to notify the host that the firmware has DMA-ed additional
9748 	 * debug data to the host buffer. This is effectively a producer index
9749 	 * update. The host driver can utilize this information to determine
9750 	 * how much of its host buffer has been populated by the firmware.
9751 	 */
9752 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DBG_BUF_PRODUCER \
9753 		UINT32_C(0x4c)
9754 	/* Maximum Registrable event id. */
9755 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_MAX_RGTR_EVENT_ID \
9756 		UINT32_C(0x4d)
9757 	/*
9758 	 * A trace log message. This contains firmware trace logs string
9759 	 * embedded in the asynchronous message. This is an experimental
9760 	 * event, not meant for production use at this time.
9761 	 */
9762 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_FW_TRACE_MSG \
9763 		UINT32_C(0xfe)
9764 	/* HWRM Error */
9765 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR \
9766 		UINT32_C(0xff)
9767 	#define HWRM_ASYNC_EVENT_CMPL_EVENT_ID_LAST \
9768 		HWRM_ASYNC_EVENT_CMPL_EVENT_ID_HWRM_ERROR
9769 	/* Event specific data */
9770 	uint32_t	event_data2;
9771 	uint8_t	opaque_v;
9772 	/*
9773 	 * This value is written by the NIC such that it will be different
9774 	 * for each pass through the completion queue. The even passes
9775 	 * will write 1. The odd passes will write 0.
9776 	 */
9777 	#define HWRM_ASYNC_EVENT_CMPL_V          UINT32_C(0x1)
9778 	/* opaque is 7 b */
9779 	#define HWRM_ASYNC_EVENT_CMPL_OPAQUE_MASK UINT32_C(0xfe)
9780 	#define HWRM_ASYNC_EVENT_CMPL_OPAQUE_SFT 1
9781 	/* 8-lsb timestamp from POR (100-msec resolution) */
9782 	uint8_t	timestamp_lo;
9783 	/* 16-lsb timestamp from POR (100-msec resolution) */
9784 	uint16_t	timestamp_hi;
9785 	/* Event specific data */
9786 	uint32_t	event_data1;
9787 } __rte_packed_end;
9788 
9789 /* hwrm_async_event_cmpl_link_status_change (size:128b/16B) */
9790 struct __rte_packed_begin hwrm_async_event_cmpl_link_status_change {
9791 	uint16_t	type;
9792 	/*
9793 	 * This field indicates the exact type of the completion.
9794 	 * By convention, the LSB identifies the length of the
9795 	 * record in 16B units. Even values indicate 16B
9796 	 * records. Odd values indicate 32B
9797 	 * records.
9798 	 */
9799 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_MASK \
9800 		UINT32_C(0x3f)
9801 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_SFT             0
9802 	/* HWRM Asynchronous Event Information */
9803 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT \
9804 		UINT32_C(0x2e)
9805 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_LAST \
9806 		HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT
9807 	/* Identifiers of events. */
9808 	uint16_t	event_id;
9809 	/* Link status changed */
9810 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LINK_STATUS_CHANGE \
9811 		UINT32_C(0x0)
9812 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LAST \
9813 		HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_ID_LINK_STATUS_CHANGE
9814 	/* Event specific data */
9815 	uint32_t	event_data2;
9816 	uint8_t	opaque_v;
9817 	/*
9818 	 * This value is written by the NIC such that it will be different
9819 	 * for each pass through the completion queue. The even passes
9820 	 * will write 1. The odd passes will write 0.
9821 	 */
9822 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_V \
9823 		UINT32_C(0x1)
9824 	/* opaque is 7 b */
9825 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_OPAQUE_MASK \
9826 		UINT32_C(0xfe)
9827 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_OPAQUE_SFT 1
9828 	/* 8-lsb timestamp from POR (100-msec resolution) */
9829 	uint8_t	timestamp_lo;
9830 	/* 16-lsb timestamp from POR (100-msec resolution) */
9831 	uint16_t	timestamp_hi;
9832 	/* Event specific data */
9833 	uint32_t	event_data1;
9834 	/* Indicates link status change */
9835 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE \
9836 		UINT32_C(0x1)
9837 	/*
9838 	 * If this bit set to 0, then it indicates that the link
9839 	 * was up and it went down.
9840 	 */
9841 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_DOWN \
9842 		UINT32_C(0x0)
9843 	/*
9844 	 * If this bit is set to 1, then it indicates that the link
9845 	 * was down and it went up.
9846 	 */
9847 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_UP \
9848 		UINT32_C(0x1)
9849 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_LAST \
9850 		HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_LINK_CHANGE_UP
9851 	/* Indicates the physical port this link status change occur */
9852 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_MASK \
9853 		UINT32_C(0xe)
9854 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_SFT \
9855 		1
9856 	/* PORT ID */
9857 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_ID_MASK \
9858 		UINT32_C(0xffff0)
9859 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PORT_ID_SFT \
9860 		4
9861 	/* Indicates the physical function this event occurred on. */
9862 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PF_ID_MASK \
9863 		UINT32_C(0xff00000)
9864 	#define HWRM_ASYNC_EVENT_CMPL_LINK_STATUS_CHANGE_EVENT_DATA1_PF_ID_SFT \
9865 		20
9866 } __rte_packed_end;
9867 
9868 /* hwrm_async_event_cmpl_link_mtu_change (size:128b/16B) */
9869 struct __rte_packed_begin hwrm_async_event_cmpl_link_mtu_change {
9870 	uint16_t	type;
9871 	/*
9872 	 * This field indicates the exact type of the completion.
9873 	 * By convention, the LSB identifies the length of the
9874 	 * record in 16B units. Even values indicate 16B
9875 	 * records. Odd values indicate 32B
9876 	 * records.
9877 	 */
9878 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_MASK \
9879 		UINT32_C(0x3f)
9880 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_SFT             0
9881 	/* HWRM Asynchronous Event Information */
9882 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_HWRM_ASYNC_EVENT \
9883 		UINT32_C(0x2e)
9884 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_LAST \
9885 		HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_TYPE_HWRM_ASYNC_EVENT
9886 	/* Identifiers of events. */
9887 	uint16_t	event_id;
9888 	/* Link MTU changed */
9889 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_ID_LINK_MTU_CHANGE \
9890 		UINT32_C(0x1)
9891 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_ID_LAST \
9892 		HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_ID_LINK_MTU_CHANGE
9893 	/* Event specific data */
9894 	uint32_t	event_data2;
9895 	uint8_t	opaque_v;
9896 	/*
9897 	 * This value is written by the NIC such that it will be different
9898 	 * for each pass through the completion queue. The even passes
9899 	 * will write 1. The odd passes will write 0.
9900 	 */
9901 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_V          UINT32_C(0x1)
9902 	/* opaque is 7 b */
9903 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_OPAQUE_MASK \
9904 		UINT32_C(0xfe)
9905 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_OPAQUE_SFT 1
9906 	/* 8-lsb timestamp from POR (100-msec resolution) */
9907 	uint8_t	timestamp_lo;
9908 	/* 16-lsb timestamp from POR (100-msec resolution) */
9909 	uint16_t	timestamp_hi;
9910 	/* Event specific data */
9911 	uint32_t	event_data1;
9912 	/* The new MTU of the link in bytes. */
9913 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_DATA1_NEW_MTU_MASK \
9914 		UINT32_C(0xffff)
9915 	#define HWRM_ASYNC_EVENT_CMPL_LINK_MTU_CHANGE_EVENT_DATA1_NEW_MTU_SFT 0
9916 } __rte_packed_end;
9917 
9918 /* hwrm_async_event_cmpl_link_speed_change (size:128b/16B) */
9919 struct __rte_packed_begin hwrm_async_event_cmpl_link_speed_change {
9920 	uint16_t	type;
9921 	/*
9922 	 * This field indicates the exact type of the completion.
9923 	 * By convention, the LSB identifies the length of the
9924 	 * record in 16B units. Even values indicate 16B
9925 	 * records. Odd values indicate 32B
9926 	 * records.
9927 	 */
9928 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_MASK \
9929 		UINT32_C(0x3f)
9930 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_SFT             0
9931 	/* HWRM Asynchronous Event Information */
9932 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_HWRM_ASYNC_EVENT \
9933 		UINT32_C(0x2e)
9934 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_LAST \
9935 		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_TYPE_HWRM_ASYNC_EVENT
9936 	/* Identifiers of events. */
9937 	uint16_t	event_id;
9938 	/* Link speed changed */
9939 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_ID_LINK_SPEED_CHANGE \
9940 		UINT32_C(0x2)
9941 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_ID_LAST \
9942 		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_ID_LINK_SPEED_CHANGE
9943 	/* Event specific data */
9944 	uint32_t	event_data2;
9945 	uint8_t	opaque_v;
9946 	/*
9947 	 * This value is written by the NIC such that it will be different
9948 	 * for each pass through the completion queue. The even passes
9949 	 * will write 1. The odd passes will write 0.
9950 	 */
9951 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_V \
9952 		UINT32_C(0x1)
9953 	/* opaque is 7 b */
9954 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_OPAQUE_MASK \
9955 		UINT32_C(0xfe)
9956 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_OPAQUE_SFT 1
9957 	/* 8-lsb timestamp from POR (100-msec resolution) */
9958 	uint8_t	timestamp_lo;
9959 	/* 16-lsb timestamp from POR (100-msec resolution) */
9960 	uint16_t	timestamp_hi;
9961 	/* Event specific data */
9962 	uint32_t	event_data1;
9963 	/*
9964 	 * When this bit is '1', the link was forced to the
9965 	 * force_link_speed value.
9966 	 */
9967 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_FORCE \
9968 		UINT32_C(0x1)
9969 	/* The new link speed in 100 Mbps units. */
9970 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_MASK \
9971 		UINT32_C(0xfffe)
9972 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_SFT \
9973 		1
9974 	/* 100Mb link speed */
9975 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100MB \
9976 		(UINT32_C(0x1) << 1)
9977 	/* 1Gb link speed */
9978 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_1GB \
9979 		(UINT32_C(0xa) << 1)
9980 	/* 2Gb link speed */
9981 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_2GB \
9982 		(UINT32_C(0x14) << 1)
9983 	/* 25Gb link speed */
9984 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_2_5GB \
9985 		(UINT32_C(0x19) << 1)
9986 	/* 10Gb link speed */
9987 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_10GB \
9988 		(UINT32_C(0x64) << 1)
9989 	/* 20Mb link speed */
9990 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_20GB \
9991 		(UINT32_C(0xc8) << 1)
9992 	/* 25Gb link speed */
9993 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_25GB \
9994 		(UINT32_C(0xfa) << 1)
9995 	/* 40Gb link speed */
9996 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_40GB \
9997 		(UINT32_C(0x190) << 1)
9998 	/* 50Gb link speed */
9999 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_50GB \
10000 		(UINT32_C(0x1f4) << 1)
10001 	/* 100Gb link speed */
10002 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100GB \
10003 		(UINT32_C(0x3e8) << 1)
10004 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_LAST \
10005 		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_NEW_LINK_SPEED_100MBPS_100GB
10006 	/* PORT ID */
10007 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_PORT_ID_MASK \
10008 		UINT32_C(0xffff0000)
10009 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CHANGE_EVENT_DATA1_PORT_ID_SFT \
10010 		16
10011 } __rte_packed_end;
10012 
10013 /* hwrm_async_event_cmpl_dcb_config_change (size:128b/16B) */
10014 struct __rte_packed_begin hwrm_async_event_cmpl_dcb_config_change {
10015 	uint16_t	type;
10016 	/*
10017 	 * This field indicates the exact type of the completion.
10018 	 * By convention, the LSB identifies the length of the
10019 	 * record in 16B units. Even values indicate 16B
10020 	 * records. Odd values indicate 32B
10021 	 * records.
10022 	 */
10023 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_MASK \
10024 		UINT32_C(0x3f)
10025 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_SFT             0
10026 	/* HWRM Asynchronous Event Information */
10027 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_HWRM_ASYNC_EVENT \
10028 		UINT32_C(0x2e)
10029 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_LAST \
10030 		HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_TYPE_HWRM_ASYNC_EVENT
10031 	/* Identifiers of events. */
10032 	uint16_t	event_id;
10033 	/* DCB Configuration changed */
10034 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_ID_DCB_CONFIG_CHANGE \
10035 		UINT32_C(0x3)
10036 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_ID_LAST \
10037 		HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_ID_DCB_CONFIG_CHANGE
10038 	/* Event specific data */
10039 	uint32_t	event_data2;
10040 	/* ETS configuration change */
10041 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA2_ETS \
10042 		UINT32_C(0x1)
10043 	/* PFC configuration change */
10044 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA2_PFC \
10045 		UINT32_C(0x2)
10046 	/* APP configuration change */
10047 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA2_APP \
10048 		UINT32_C(0x4)
10049 	/* DSCP configuration change */
10050 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA2_DSCP \
10051 		UINT32_C(0x8)
10052 	uint8_t	opaque_v;
10053 	/*
10054 	 * This value is written by the NIC such that it will be different
10055 	 * for each pass through the completion queue. The even passes
10056 	 * will write 1. The odd passes will write 0.
10057 	 */
10058 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_V \
10059 		UINT32_C(0x1)
10060 	/* opaque is 7 b */
10061 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_OPAQUE_MASK \
10062 		UINT32_C(0xfe)
10063 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_OPAQUE_SFT 1
10064 	/* 8-lsb timestamp from POR (100-msec resolution) */
10065 	uint8_t	timestamp_lo;
10066 	/* 16-lsb timestamp from POR (100-msec resolution) */
10067 	uint16_t	timestamp_hi;
10068 	/* Event specific data */
10069 	uint32_t	event_data1;
10070 	/* PORT ID */
10071 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_PORT_ID_MASK \
10072 		UINT32_C(0xffff)
10073 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_PORT_ID_SFT \
10074 		0
10075 	/* Priority recommended for RoCE traffic */
10076 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_ROCE_PRIORITY_MASK \
10077 		UINT32_C(0xff0000)
10078 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_ROCE_PRIORITY_SFT \
10079 		16
10080 	/* none is 255 */
10081 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_ROCE_PRIORITY_NONE \
10082 		(UINT32_C(0xff) << 16)
10083 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_ROCE_PRIORITY_LAST \
10084 		HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_ROCE_PRIORITY_NONE
10085 	/* Priority recommended for L2 traffic */
10086 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_L2_PRIORITY_MASK \
10087 		UINT32_C(0xff000000)
10088 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_L2_PRIORITY_SFT \
10089 		24
10090 	/* none is 255 */
10091 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_L2_PRIORITY_NONE \
10092 		(UINT32_C(0xff) << 24)
10093 	#define HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_L2_PRIORITY_LAST \
10094 		HWRM_ASYNC_EVENT_CMPL_DCB_CONFIG_CHANGE_EVENT_DATA1_RECOMMEND_L2_PRIORITY_NONE
10095 } __rte_packed_end;
10096 
10097 /* hwrm_async_event_cmpl_port_conn_not_allowed (size:128b/16B) */
10098 struct __rte_packed_begin hwrm_async_event_cmpl_port_conn_not_allowed {
10099 	uint16_t	type;
10100 	/*
10101 	 * This field indicates the exact type of the completion.
10102 	 * By convention, the LSB identifies the length of the
10103 	 * record in 16B units. Even values indicate 16B
10104 	 * records. Odd values indicate 32B
10105 	 * records.
10106 	 */
10107 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_MASK \
10108 		UINT32_C(0x3f)
10109 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_SFT \
10110 		0
10111 	/* HWRM Asynchronous Event Information */
10112 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT \
10113 		UINT32_C(0x2e)
10114 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_LAST \
10115 		HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT
10116 	/* Identifiers of events. */
10117 	uint16_t	event_id;
10118 	/* Port connection not allowed */
10119 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_PORT_CONN_NOT_ALLOWED \
10120 		UINT32_C(0x4)
10121 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_LAST \
10122 		HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_ID_PORT_CONN_NOT_ALLOWED
10123 	/* Event specific data */
10124 	uint32_t	event_data2;
10125 	uint8_t	opaque_v;
10126 	/*
10127 	 * This value is written by the NIC such that it will be different
10128 	 * for each pass through the completion queue. The even passes
10129 	 * will write 1. The odd passes will write 0.
10130 	 */
10131 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_V \
10132 		UINT32_C(0x1)
10133 	/* opaque is 7 b */
10134 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_OPAQUE_MASK \
10135 		UINT32_C(0xfe)
10136 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_OPAQUE_SFT 1
10137 	/* 8-lsb timestamp from POR (100-msec resolution) */
10138 	uint8_t	timestamp_lo;
10139 	/* 16-lsb timestamp from POR (100-msec resolution) */
10140 	uint16_t	timestamp_hi;
10141 	/* Event specific data */
10142 	uint32_t	event_data1;
10143 	/* PORT ID */
10144 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK \
10145 		UINT32_C(0xffff)
10146 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_PORT_ID_SFT \
10147 		0
10148 	/*
10149 	 * This value indicates the current port level enforcement policy
10150 	 * for the optics module when there is an optical module mismatch
10151 	 * and port is not connected.
10152 	 */
10153 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_MASK \
10154 		UINT32_C(0xff0000)
10155 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_SFT \
10156 		16
10157 	/* No enforcement */
10158 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_NONE \
10159 		(UINT32_C(0x0) << 16)
10160 	/* Disable Transmit side Laser. */
10161 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_DISABLETX \
10162 		(UINT32_C(0x1) << 16)
10163 	/* Raise a warning message. */
10164 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_WARNINGMSG \
10165 		(UINT32_C(0x2) << 16)
10166 	/* Power down the module. */
10167 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_PWRDOWN \
10168 		(UINT32_C(0x3) << 16)
10169 	#define HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_LAST \
10170 		HWRM_ASYNC_EVENT_CMPL_PORT_CONN_NOT_ALLOWED_EVENT_DATA1_ENFORCEMENT_POLICY_PWRDOWN
10171 } __rte_packed_end;
10172 
10173 /* hwrm_async_event_cmpl_link_speed_cfg_not_allowed (size:128b/16B) */
10174 struct __rte_packed_begin hwrm_async_event_cmpl_link_speed_cfg_not_allowed {
10175 	uint16_t	type;
10176 	/*
10177 	 * This field indicates the exact type of the completion.
10178 	 * By convention, the LSB identifies the length of the
10179 	 * record in 16B units. Even values indicate 16B
10180 	 * records. Odd values indicate 32B
10181 	 * records.
10182 	 */
10183 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_MASK \
10184 		UINT32_C(0x3f)
10185 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_SFT \
10186 		0
10187 	/* HWRM Asynchronous Event Information */
10188 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT \
10189 		UINT32_C(0x2e)
10190 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_LAST \
10191 		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_TYPE_HWRM_ASYNC_EVENT
10192 	/* Identifiers of events. */
10193 	uint16_t	event_id;
10194 	/* Link speed configuration was not allowed */
10195 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED \
10196 		UINT32_C(0x5)
10197 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_ID_LAST \
10198 		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_ID_LINK_SPEED_CFG_NOT_ALLOWED
10199 	/* Event specific data */
10200 	uint32_t	event_data2;
10201 	uint8_t	opaque_v;
10202 	/*
10203 	 * This value is written by the NIC such that it will be different
10204 	 * for each pass through the completion queue. The even passes
10205 	 * will write 1. The odd passes will write 0.
10206 	 */
10207 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_V \
10208 		UINT32_C(0x1)
10209 	/* opaque is 7 b */
10210 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_OPAQUE_MASK \
10211 		UINT32_C(0xfe)
10212 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_OPAQUE_SFT 1
10213 	/* 8-lsb timestamp from POR (100-msec resolution) */
10214 	uint8_t	timestamp_lo;
10215 	/* 16-lsb timestamp from POR (100-msec resolution) */
10216 	uint16_t	timestamp_hi;
10217 	/* Event specific data */
10218 	uint32_t	event_data1;
10219 	/* PORT ID */
10220 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_DATA1_PORT_ID_MASK \
10221 		UINT32_C(0xffff)
10222 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_NOT_ALLOWED_EVENT_DATA1_PORT_ID_SFT \
10223 		0
10224 } __rte_packed_end;
10225 
10226 /* hwrm_async_event_cmpl_link_speed_cfg_change (size:128b/16B) */
10227 struct __rte_packed_begin hwrm_async_event_cmpl_link_speed_cfg_change {
10228 	uint16_t	type;
10229 	/*
10230 	 * This field indicates the exact type of the completion.
10231 	 * By convention, the LSB identifies the length of the
10232 	 * record in 16B units. Even values indicate 16B
10233 	 * records. Odd values indicate 32B
10234 	 * records.
10235 	 */
10236 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_MASK \
10237 		UINT32_C(0x3f)
10238 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_SFT \
10239 		0
10240 	/* HWRM Asynchronous Event Information */
10241 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT \
10242 		UINT32_C(0x2e)
10243 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_LAST \
10244 		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
10245 	/* Identifiers of events. */
10246 	uint16_t	event_id;
10247 	/* Link speed configuration change */
10248 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LINK_SPEED_CFG_CHANGE \
10249 		UINT32_C(0x6)
10250 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LAST \
10251 		HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_ID_LINK_SPEED_CFG_CHANGE
10252 	/* Event specific data */
10253 	uint32_t	event_data2;
10254 	uint8_t	opaque_v;
10255 	/*
10256 	 * This value is written by the NIC such that it will be different
10257 	 * for each pass through the completion queue. The even passes
10258 	 * will write 1. The odd passes will write 0.
10259 	 */
10260 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_V \
10261 		UINT32_C(0x1)
10262 	/* opaque is 7 b */
10263 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_OPAQUE_MASK \
10264 		UINT32_C(0xfe)
10265 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_OPAQUE_SFT 1
10266 	/* 8-lsb timestamp from POR (100-msec resolution) */
10267 	uint8_t	timestamp_lo;
10268 	/* 16-lsb timestamp from POR (100-msec resolution) */
10269 	uint16_t	timestamp_hi;
10270 	/* Event specific data */
10271 	uint32_t	event_data1;
10272 	/* PORT ID */
10273 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_PORT_ID_MASK \
10274 		UINT32_C(0xffff)
10275 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_PORT_ID_SFT \
10276 		0
10277 	/*
10278 	 * If set to 1, it indicates that the supported link speeds
10279 	 * configuration on the port has changed.
10280 	 * If set to 0, then there is no change in supported link speeds
10281 	 * configuration.
10282 	 */
10283 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_SUPPORTED_LINK_SPEEDS_CHANGE \
10284 		UINT32_C(0x10000)
10285 	/*
10286 	 * If set to 1, it indicates that the link speed configuration
10287 	 * on the port has become illegal or invalid.
10288 	 * If set to 0, then the link speed configuration on the port is
10289 	 * legal or valid.
10290 	 */
10291 	#define HWRM_ASYNC_EVENT_CMPL_LINK_SPEED_CFG_CHANGE_EVENT_DATA1_ILLEGAL_LINK_SPEED_CFG \
10292 		UINT32_C(0x20000)
10293 } __rte_packed_end;
10294 
10295 /* hwrm_async_event_cmpl_port_phy_cfg_change (size:128b/16B) */
10296 struct __rte_packed_begin hwrm_async_event_cmpl_port_phy_cfg_change {
10297 	uint16_t	type;
10298 	/*
10299 	 * This field indicates the exact type of the completion.
10300 	 * By convention, the LSB identifies the length of the
10301 	 * record in 16B units. Even values indicate 16B
10302 	 * records. Odd values indicate 32B
10303 	 * records.
10304 	 */
10305 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_MASK \
10306 		UINT32_C(0x3f)
10307 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_SFT \
10308 		0
10309 	/* HWRM Asynchronous Event Information */
10310 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT \
10311 		UINT32_C(0x2e)
10312 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_LAST \
10313 		HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
10314 	/* Identifiers of events. */
10315 	uint16_t	event_id;
10316 	/* Port PHY configuration change */
10317 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_ID_PORT_PHY_CFG_CHANGE \
10318 		UINT32_C(0x7)
10319 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_ID_LAST \
10320 		HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_ID_PORT_PHY_CFG_CHANGE
10321 	/* Event specific data */
10322 	uint32_t	event_data2;
10323 	uint8_t	opaque_v;
10324 	/*
10325 	 * This value is written by the NIC such that it will be different
10326 	 * for each pass through the completion queue. The even passes
10327 	 * will write 1. The odd passes will write 0.
10328 	 */
10329 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_V \
10330 		UINT32_C(0x1)
10331 	/* opaque is 7 b */
10332 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_OPAQUE_MASK \
10333 		UINT32_C(0xfe)
10334 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_OPAQUE_SFT 1
10335 	/* 8-lsb timestamp from POR (100-msec resolution) */
10336 	uint8_t	timestamp_lo;
10337 	/* 16-lsb timestamp from POR (100-msec resolution) */
10338 	uint16_t	timestamp_hi;
10339 	/* Event specific data */
10340 	uint32_t	event_data1;
10341 	/* PORT ID */
10342 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_PORT_ID_MASK \
10343 		UINT32_C(0xffff)
10344 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_PORT_ID_SFT \
10345 		0
10346 	/*
10347 	 * If set to 1, it indicates that the FEC
10348 	 * configuration on the port has changed.
10349 	 * If set to 0, then there is no change in FEC configuration.
10350 	 */
10351 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_FEC_CFG_CHANGE \
10352 		UINT32_C(0x10000)
10353 	/*
10354 	 * If set to 1, it indicates that the EEE configuration
10355 	 * on the port has changed.
10356 	 * If set to 0, then there is no change in EEE configuration
10357 	 * on the port.
10358 	 */
10359 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_EEE_CFG_CHANGE \
10360 		UINT32_C(0x20000)
10361 	/*
10362 	 * If set to 1, it indicates that the pause configuration
10363 	 * on the PHY has changed.
10364 	 * If set to 0, then there is no change in the pause
10365 	 * configuration on the PHY.
10366 	 */
10367 	#define HWRM_ASYNC_EVENT_CMPL_PORT_PHY_CFG_CHANGE_EVENT_DATA1_PAUSE_CFG_CHANGE \
10368 		UINT32_C(0x40000)
10369 } __rte_packed_end;
10370 
10371 /* hwrm_async_event_cmpl_reset_notify (size:128b/16B) */
10372 struct __rte_packed_begin hwrm_async_event_cmpl_reset_notify {
10373 	uint16_t	type;
10374 	/*
10375 	 * This field indicates the exact type of the completion.
10376 	 * By convention, the LSB identifies the length of the
10377 	 * record in 16B units. Even values indicate 16B
10378 	 * records. Odd values indicate 32B
10379 	 * records.
10380 	 */
10381 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_TYPE_MASK \
10382 		UINT32_C(0x3f)
10383 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_TYPE_SFT             0
10384 	/* HWRM Asynchronous Event Information */
10385 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_TYPE_HWRM_ASYNC_EVENT \
10386 		UINT32_C(0x2e)
10387 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_TYPE_LAST \
10388 		HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_TYPE_HWRM_ASYNC_EVENT
10389 	/* Identifiers of events. */
10390 	uint16_t	event_id;
10391 	/* Notify clients of imminent reset. */
10392 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_ID_RESET_NOTIFY \
10393 		UINT32_C(0x8)
10394 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_ID_LAST \
10395 		HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_ID_RESET_NOTIFY
10396 	/* Event specific data. The data is for internal debug use only. */
10397 	uint32_t	event_data2;
10398 	/*
10399 	 * These bits indicate the status as being reported by the firmware.
10400 	 * This value is exactly the same as status code in fw_status register.
10401 	 * If the status code is equal to 0x8000, then the reset is initiated
10402 	 * by the Host using the FW_RESET command when the FW is in a healthy
10403 	 * state. If the status code is not equal to 0x8000, then the reset is
10404 	 * initiated by the FW to recover from the error or FATAL state.
10405 	 */
10406 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA2_FW_STATUS_CODE_MASK \
10407 		UINT32_C(0xffff)
10408 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA2_FW_STATUS_CODE_SFT \
10409 		0
10410 	uint8_t	opaque_v;
10411 	/*
10412 	 * This value is written by the NIC such that it will be different
10413 	 * for each pass through the completion queue. The even passes
10414 	 * will write 1. The odd passes will write 0.
10415 	 */
10416 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_V          UINT32_C(0x1)
10417 	/* opaque is 7 b */
10418 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_OPAQUE_MASK UINT32_C(0xfe)
10419 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_OPAQUE_SFT 1
10420 	/*
10421 	 * 8-lsb timestamp (100-msec resolution)
10422 	 * The Minimum time required for the Firmware readiness after sending
10423 	 * this notification to the driver instances.
10424 	 */
10425 	uint8_t	timestamp_lo;
10426 	/*
10427 	 * 16-lsb timestamp (100-msec resolution)
10428 	 * The Maximum Firmware Reset bail out value in the order of 100
10429 	 * milliseconds. The driver instances will use this value to reinitiate
10430 	 * the registration process again if the core firmware didn't set the
10431 	 * state bit.
10432 	 */
10433 	uint16_t	timestamp_hi;
10434 	/* Event specific data */
10435 	uint32_t	event_data1;
10436 	/* Indicates driver action requested */
10437 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_MASK \
10438 		UINT32_C(0xff)
10439 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_SFT \
10440 		0
10441 	/*
10442 	 * If set to 1, it indicates that the l2 client should
10443 	 * stop sending in band traffic to Nitro.
10444 	 * if set to 0, there is no change in L2 client behavior.
10445 	 */
10446 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_DRIVER_STOP_TX_QUEUE \
10447 		UINT32_C(0x1)
10448 	/*
10449 	 * If set to 1, it indicates that the L2 client should
10450 	 * bring down the interface.
10451 	 * If set to 0, then there is no change in L2 client behavior.
10452 	 */
10453 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_DRIVER_IFDOWN \
10454 		UINT32_C(0x2)
10455 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_LAST \
10456 		HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DRIVER_ACTION_DRIVER_IFDOWN
10457 	/* Indicates reason for reset. */
10458 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_MASK \
10459 		UINT32_C(0xff00)
10460 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_SFT \
10461 		8
10462 	/* A management client has requested reset. */
10463 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_MANAGEMENT_RESET_REQUEST \
10464 		(UINT32_C(0x1) << 8)
10465 	/* A fatal firmware exception has occurred. */
10466 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FW_EXCEPTION_FATAL \
10467 		(UINT32_C(0x2) << 8)
10468 	/* A non-fatal firmware exception has occurred. */
10469 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FW_EXCEPTION_NON_FATAL \
10470 		(UINT32_C(0x3) << 8)
10471 	/* Fast reset */
10472 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FAST_RESET \
10473 		(UINT32_C(0x4) << 8)
10474 	/*
10475 	 * Reset was a result of a firmware activation. That is, the
10476 	 * fw_activation flag was set in a FW_RESET operation.
10477 	 */
10478 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FW_ACTIVATION \
10479 		(UINT32_C(0x5) << 8)
10480 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_LAST \
10481 		HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_REASON_CODE_FW_ACTIVATION
10482 	/*
10483 	 * Minimum time before driver should attempt access - units 100ms
10484 	 * ticks.
10485 	 * Range 0-65535
10486 	 */
10487 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DELAY_IN_100MS_TICKS_MASK \
10488 		UINT32_C(0xffff0000)
10489 	#define HWRM_ASYNC_EVENT_CMPL_RESET_NOTIFY_EVENT_DATA1_DELAY_IN_100MS_TICKS_SFT \
10490 		16
10491 } __rte_packed_end;
10492 
10493 /* hwrm_async_event_cmpl_error_recovery (size:128b/16B) */
10494 struct __rte_packed_begin hwrm_async_event_cmpl_error_recovery {
10495 	uint16_t	type;
10496 	/*
10497 	 * This field indicates the exact type of the completion.
10498 	 * By convention, the LSB identifies the length of the
10499 	 * record in 16B units. Even values indicate 16B
10500 	 * records. Odd values indicate 32B
10501 	 * records.
10502 	 */
10503 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_TYPE_MASK \
10504 		UINT32_C(0x3f)
10505 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_TYPE_SFT             0
10506 	/* HWRM Asynchronous Event Information */
10507 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_TYPE_HWRM_ASYNC_EVENT \
10508 		UINT32_C(0x2e)
10509 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_TYPE_LAST \
10510 		HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_TYPE_HWRM_ASYNC_EVENT
10511 	/* Identifiers of events. */
10512 	uint16_t	event_id;
10513 	/*
10514 	 * This async notification message can be used for selecting or
10515 	 * deselecting master function for error recovery,
10516 	 * and to communicate to all the functions whether error recovery
10517 	 * was enabled/disabled.
10518 	 */
10519 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_ID_ERROR_RECOVERY \
10520 		UINT32_C(0x9)
10521 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_ID_LAST \
10522 		HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_ID_ERROR_RECOVERY
10523 	/* Event specific data */
10524 	uint32_t	event_data2;
10525 	uint8_t	opaque_v;
10526 	/*
10527 	 * This value is written by the NIC such that it will be different
10528 	 * for each pass through the completion queue. The even passes
10529 	 * will write 1. The odd passes will write 0.
10530 	 */
10531 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_V          UINT32_C(0x1)
10532 	/* opaque is 7 b */
10533 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_OPAQUE_MASK UINT32_C(0xfe)
10534 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_OPAQUE_SFT 1
10535 	/* 8-lsb timestamp (100-msec resolution) */
10536 	uint8_t	timestamp_lo;
10537 	/* 16-lsb timestamp (100-msec resolution) */
10538 	uint16_t	timestamp_hi;
10539 	/* Event specific data */
10540 	uint32_t	event_data1;
10541 	/* Indicates driver action requested */
10542 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_MASK \
10543 		UINT32_C(0xff)
10544 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_SFT \
10545 		0
10546 	/*
10547 	 * If set to 1, this function is selected as Master function.
10548 	 * This function has responsibility to do 'chip reset' when it
10549 	 * detects a fatal error. If set to 0, master function functionality
10550 	 * is disabled on this function.
10551 	 */
10552 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_MASTER_FUNC \
10553 		UINT32_C(0x1)
10554 	/*
10555 	 * If set to 1, error recovery is enabled.
10556 	 * If set to 0, error recovery is disabled.
10557 	 */
10558 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_RECOVERY_EVENT_DATA1_FLAGS_RECOVERY_ENABLED \
10559 		UINT32_C(0x2)
10560 } __rte_packed_end;
10561 
10562 /* hwrm_async_event_cmpl_ring_monitor_msg (size:128b/16B) */
10563 struct __rte_packed_begin hwrm_async_event_cmpl_ring_monitor_msg {
10564 	uint16_t	type;
10565 	/*
10566 	 * This field indicates the exact type of the completion.
10567 	 * By convention, the LSB identifies the length of the
10568 	 * record in 16B units. Even values indicate 16B
10569 	 * records. Odd values indicate 32B
10570 	 * records.
10571 	 */
10572 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_TYPE_MASK \
10573 		UINT32_C(0x3f)
10574 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_TYPE_SFT             0
10575 	/* HWRM Asynchronous Event Information */
10576 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_TYPE_HWRM_ASYNC_EVENT \
10577 		UINT32_C(0x2e)
10578 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_TYPE_LAST \
10579 		HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_TYPE_HWRM_ASYNC_EVENT
10580 	/* Identifiers of events. */
10581 	uint16_t	event_id;
10582 	/* Ring Monitor Message. */
10583 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_ID_RING_MONITOR_MSG \
10584 		UINT32_C(0xa)
10585 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_ID_LAST \
10586 		HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_ID_RING_MONITOR_MSG
10587 	/* Event specific data */
10588 	uint32_t	event_data2;
10589 	/* Type of Ring disabled. */
10590 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_MASK \
10591 		UINT32_C(0xff)
10592 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_SFT \
10593 		0
10594 	/* tx ring disabled. */
10595 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_TX \
10596 		UINT32_C(0x0)
10597 	/* rx ring disabled. */
10598 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_RX \
10599 		UINT32_C(0x1)
10600 	/* cmpl ring disabled. */
10601 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_CMPL \
10602 		UINT32_C(0x2)
10603 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_LAST \
10604 		HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_EVENT_DATA2_DISABLE_RING_TYPE_CMPL
10605 	uint8_t	opaque_v;
10606 	/*
10607 	 * This value is written by the NIC such that it will be different
10608 	 * for each pass through the completion queue. The even passes
10609 	 * will write 1. The odd passes will write 0.
10610 	 */
10611 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_V          UINT32_C(0x1)
10612 	/* opaque is 7 b */
10613 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_OPAQUE_MASK \
10614 		UINT32_C(0xfe)
10615 	#define HWRM_ASYNC_EVENT_CMPL_RING_MONITOR_MSG_OPAQUE_SFT 1
10616 	/* 8-lsb timestamp from POR (100-msec resolution) */
10617 	uint8_t	timestamp_lo;
10618 	/* 16-lsb timestamp from POR (100-msec resolution) */
10619 	uint16_t	timestamp_hi;
10620 	/*
10621 	 * Event specific data. If ring_type_disabled indicates a tx, rx or cmpl
10622 	 * then this field will indicate the ring id.
10623 	 */
10624 	uint32_t	event_data1;
10625 } __rte_packed_end;
10626 
10627 /* hwrm_async_event_cmpl_func_drvr_unload (size:128b/16B) */
10628 struct __rte_packed_begin hwrm_async_event_cmpl_func_drvr_unload {
10629 	uint16_t	type;
10630 	/*
10631 	 * This field indicates the exact type of the completion.
10632 	 * By convention, the LSB identifies the length of the
10633 	 * record in 16B units. Even values indicate 16B
10634 	 * records. Odd values indicate 32B
10635 	 * records.
10636 	 */
10637 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_MASK \
10638 		UINT32_C(0x3f)
10639 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_SFT             0
10640 	/* HWRM Asynchronous Event Information */
10641 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT \
10642 		UINT32_C(0x2e)
10643 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_LAST \
10644 		HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT
10645 	/* Identifiers of events. */
10646 	uint16_t	event_id;
10647 	/* Function driver unloaded */
10648 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_ID_FUNC_DRVR_UNLOAD \
10649 		UINT32_C(0x10)
10650 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_ID_LAST \
10651 		HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_ID_FUNC_DRVR_UNLOAD
10652 	/* Event specific data */
10653 	uint32_t	event_data2;
10654 	uint8_t	opaque_v;
10655 	/*
10656 	 * This value is written by the NIC such that it will be different
10657 	 * for each pass through the completion queue. The even passes
10658 	 * will write 1. The odd passes will write 0.
10659 	 */
10660 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_V          UINT32_C(0x1)
10661 	/* opaque is 7 b */
10662 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_OPAQUE_MASK \
10663 		UINT32_C(0xfe)
10664 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_OPAQUE_SFT 1
10665 	/* 8-lsb timestamp from POR (100-msec resolution) */
10666 	uint8_t	timestamp_lo;
10667 	/* 16-lsb timestamp from POR (100-msec resolution) */
10668 	uint16_t	timestamp_hi;
10669 	/* Event specific data */
10670 	uint32_t	event_data1;
10671 	/* Function ID */
10672 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_MASK \
10673 		UINT32_C(0xffff)
10674 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_SFT \
10675 		0
10676 } __rte_packed_end;
10677 
10678 /* hwrm_async_event_cmpl_func_drvr_load (size:128b/16B) */
10679 struct __rte_packed_begin hwrm_async_event_cmpl_func_drvr_load {
10680 	uint16_t	type;
10681 	/*
10682 	 * This field indicates the exact type of the completion.
10683 	 * By convention, the LSB identifies the length of the
10684 	 * record in 16B units. Even values indicate 16B
10685 	 * records. Odd values indicate 32B
10686 	 * records.
10687 	 */
10688 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_MASK \
10689 		UINT32_C(0x3f)
10690 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_SFT             0
10691 	/* HWRM Asynchronous Event Information */
10692 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT \
10693 		UINT32_C(0x2e)
10694 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_LAST \
10695 		HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT
10696 	/* Identifiers of events. */
10697 	uint16_t	event_id;
10698 	/* Function driver loaded */
10699 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_ID_FUNC_DRVR_LOAD \
10700 		UINT32_C(0x11)
10701 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_ID_LAST \
10702 		HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_ID_FUNC_DRVR_LOAD
10703 	/* Event specific data */
10704 	uint32_t	event_data2;
10705 	uint8_t	opaque_v;
10706 	/*
10707 	 * This value is written by the NIC such that it will be different
10708 	 * for each pass through the completion queue. The even passes
10709 	 * will write 1. The odd passes will write 0.
10710 	 */
10711 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_V          UINT32_C(0x1)
10712 	/* opaque is 7 b */
10713 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_OPAQUE_MASK UINT32_C(0xfe)
10714 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_OPAQUE_SFT 1
10715 	/* 8-lsb timestamp from POR (100-msec resolution) */
10716 	uint8_t	timestamp_lo;
10717 	/* 16-lsb timestamp from POR (100-msec resolution) */
10718 	uint16_t	timestamp_hi;
10719 	/* Event specific data */
10720 	uint32_t	event_data1;
10721 	/* Function ID */
10722 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_DATA1_FUNC_ID_MASK \
10723 		UINT32_C(0xffff)
10724 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_DRVR_LOAD_EVENT_DATA1_FUNC_ID_SFT 0
10725 } __rte_packed_end;
10726 
10727 /* hwrm_async_event_cmpl_func_flr_proc_cmplt (size:128b/16B) */
10728 struct __rte_packed_begin hwrm_async_event_cmpl_func_flr_proc_cmplt {
10729 	uint16_t	type;
10730 	/*
10731 	 * This field indicates the exact type of the completion.
10732 	 * By convention, the LSB identifies the length of the
10733 	 * record in 16B units. Even values indicate 16B
10734 	 * records. Odd values indicate 32B
10735 	 * records.
10736 	 */
10737 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_MASK \
10738 		UINT32_C(0x3f)
10739 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_SFT \
10740 		0
10741 	/* HWRM Asynchronous Event Information */
10742 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_HWRM_ASYNC_EVENT \
10743 		UINT32_C(0x2e)
10744 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_LAST \
10745 		HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_TYPE_HWRM_ASYNC_EVENT
10746 	/* Identifiers of events. */
10747 	uint16_t	event_id;
10748 	/* Function FLR related processing has completed */
10749 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_ID_FUNC_FLR_PROC_CMPLT \
10750 		UINT32_C(0x12)
10751 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_ID_LAST \
10752 		HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_ID_FUNC_FLR_PROC_CMPLT
10753 	/* Event specific data */
10754 	uint32_t	event_data2;
10755 	uint8_t	opaque_v;
10756 	/*
10757 	 * This value is written by the NIC such that it will be different
10758 	 * for each pass through the completion queue. The even passes
10759 	 * will write 1. The odd passes will write 0.
10760 	 */
10761 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_V \
10762 		UINT32_C(0x1)
10763 	/* opaque is 7 b */
10764 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_OPAQUE_MASK \
10765 		UINT32_C(0xfe)
10766 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_OPAQUE_SFT 1
10767 	/* 8-lsb timestamp from POR (100-msec resolution) */
10768 	uint8_t	timestamp_lo;
10769 	/* 16-lsb timestamp from POR (100-msec resolution) */
10770 	uint16_t	timestamp_hi;
10771 	/* Event specific data */
10772 	uint32_t	event_data1;
10773 	/* Function ID */
10774 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_DATA1_FUNC_ID_MASK \
10775 		UINT32_C(0xffff)
10776 	#define HWRM_ASYNC_EVENT_CMPL_FUNC_FLR_PROC_CMPLT_EVENT_DATA1_FUNC_ID_SFT \
10777 		0
10778 } __rte_packed_end;
10779 
10780 /* hwrm_async_event_cmpl_pf_drvr_unload (size:128b/16B) */
10781 struct __rte_packed_begin hwrm_async_event_cmpl_pf_drvr_unload {
10782 	uint16_t	type;
10783 	/*
10784 	 * This field indicates the exact type of the completion.
10785 	 * By convention, the LSB identifies the length of the
10786 	 * record in 16B units. Even values indicate 16B
10787 	 * records. Odd values indicate 32B
10788 	 * records.
10789 	 */
10790 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_MASK \
10791 		UINT32_C(0x3f)
10792 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_SFT             0
10793 	/* HWRM Asynchronous Event Information */
10794 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT \
10795 		UINT32_C(0x2e)
10796 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_LAST \
10797 		HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_TYPE_HWRM_ASYNC_EVENT
10798 	/* Identifiers of events. */
10799 	uint16_t	event_id;
10800 	/* PF driver unloaded */
10801 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_ID_PF_DRVR_UNLOAD \
10802 		UINT32_C(0x20)
10803 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_ID_LAST \
10804 		HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_ID_PF_DRVR_UNLOAD
10805 	/* Event specific data */
10806 	uint32_t	event_data2;
10807 	uint8_t	opaque_v;
10808 	/*
10809 	 * This value is written by the NIC such that it will be different
10810 	 * for each pass through the completion queue. The even passes
10811 	 * will write 1. The odd passes will write 0.
10812 	 */
10813 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_V          UINT32_C(0x1)
10814 	/* opaque is 7 b */
10815 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_OPAQUE_MASK UINT32_C(0xfe)
10816 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_OPAQUE_SFT 1
10817 	/* 8-lsb timestamp from POR (100-msec resolution) */
10818 	uint8_t	timestamp_lo;
10819 	/* 16-lsb timestamp from POR (100-msec resolution) */
10820 	uint16_t	timestamp_hi;
10821 	/* Event specific data */
10822 	uint32_t	event_data1;
10823 	/* PF ID */
10824 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_MASK \
10825 		UINT32_C(0xffff)
10826 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_FUNC_ID_SFT 0
10827 	/* Indicates the physical port this pf belongs to */
10828 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_PORT_MASK \
10829 		UINT32_C(0x70000)
10830 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_UNLOAD_EVENT_DATA1_PORT_SFT    16
10831 } __rte_packed_end;
10832 
10833 /* hwrm_async_event_cmpl_pf_drvr_load (size:128b/16B) */
10834 struct __rte_packed_begin hwrm_async_event_cmpl_pf_drvr_load {
10835 	uint16_t	type;
10836 	/*
10837 	 * This field indicates the exact type of the completion.
10838 	 * By convention, the LSB identifies the length of the
10839 	 * record in 16B units. Even values indicate 16B
10840 	 * records. Odd values indicate 32B
10841 	 * records.
10842 	 */
10843 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_MASK \
10844 		UINT32_C(0x3f)
10845 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_SFT             0
10846 	/* HWRM Asynchronous Event Information */
10847 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT \
10848 		UINT32_C(0x2e)
10849 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_LAST \
10850 		HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_TYPE_HWRM_ASYNC_EVENT
10851 	/* Identifiers of events. */
10852 	uint16_t	event_id;
10853 	/* PF driver loaded */
10854 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_ID_PF_DRVR_LOAD \
10855 		UINT32_C(0x21)
10856 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_ID_LAST \
10857 		HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_ID_PF_DRVR_LOAD
10858 	/* Event specific data */
10859 	uint32_t	event_data2;
10860 	uint8_t	opaque_v;
10861 	/*
10862 	 * This value is written by the NIC such that it will be different
10863 	 * for each pass through the completion queue. The even passes
10864 	 * will write 1. The odd passes will write 0.
10865 	 */
10866 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_V          UINT32_C(0x1)
10867 	/* opaque is 7 b */
10868 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_OPAQUE_MASK UINT32_C(0xfe)
10869 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_OPAQUE_SFT 1
10870 	/* 8-lsb timestamp from POR (100-msec resolution) */
10871 	uint8_t	timestamp_lo;
10872 	/* 16-lsb timestamp from POR (100-msec resolution) */
10873 	uint16_t	timestamp_hi;
10874 	/* Event specific data */
10875 	uint32_t	event_data1;
10876 	/* PF ID */
10877 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_FUNC_ID_MASK \
10878 		UINT32_C(0xffff)
10879 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_FUNC_ID_SFT 0
10880 	/* Indicates the physical port this pf belongs to */
10881 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_PORT_MASK \
10882 		UINT32_C(0x70000)
10883 	#define HWRM_ASYNC_EVENT_CMPL_PF_DRVR_LOAD_EVENT_DATA1_PORT_SFT    16
10884 } __rte_packed_end;
10885 
10886 /* hwrm_async_event_cmpl_vf_flr (size:128b/16B) */
10887 struct __rte_packed_begin hwrm_async_event_cmpl_vf_flr {
10888 	uint16_t	type;
10889 	/*
10890 	 * This field indicates the exact type of the completion.
10891 	 * By convention, the LSB identifies the length of the
10892 	 * record in 16B units. Even values indicate 16B
10893 	 * records. Odd values indicate 32B
10894 	 * records.
10895 	 */
10896 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_MASK \
10897 		UINT32_C(0x3f)
10898 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_SFT             0
10899 	/* HWRM Asynchronous Event Information */
10900 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_HWRM_ASYNC_EVENT \
10901 		UINT32_C(0x2e)
10902 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_LAST \
10903 		HWRM_ASYNC_EVENT_CMPL_VF_FLR_TYPE_HWRM_ASYNC_EVENT
10904 	/* Identifiers of events. */
10905 	uint16_t	event_id;
10906 	/* VF Function Level Reset (FLR) */
10907 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_ID_VF_FLR UINT32_C(0x30)
10908 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_ID_LAST \
10909 		HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_ID_VF_FLR
10910 	/* Event specific data */
10911 	uint32_t	event_data2;
10912 	uint8_t	opaque_v;
10913 	/*
10914 	 * This value is written by the NIC such that it will be different
10915 	 * for each pass through the completion queue. The even passes
10916 	 * will write 1. The odd passes will write 0.
10917 	 */
10918 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_V          UINT32_C(0x1)
10919 	/* opaque is 7 b */
10920 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_OPAQUE_MASK UINT32_C(0xfe)
10921 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_OPAQUE_SFT 1
10922 	/* 8-lsb timestamp from POR (100-msec resolution) */
10923 	uint8_t	timestamp_lo;
10924 	/* 16-lsb timestamp from POR (100-msec resolution) */
10925 	uint16_t	timestamp_hi;
10926 	/* Event specific data */
10927 	uint32_t	event_data1;
10928 	/* VF ID */
10929 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_MASK \
10930 		UINT32_C(0xffff)
10931 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_VF_ID_SFT 0
10932 	/* Indicates the physical function this event occurred on. */
10933 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_PF_ID_MASK \
10934 		UINT32_C(0xff0000)
10935 	#define HWRM_ASYNC_EVENT_CMPL_VF_FLR_EVENT_DATA1_PF_ID_SFT 16
10936 } __rte_packed_end;
10937 
10938 /* hwrm_async_event_cmpl_vf_mac_addr_change (size:128b/16B) */
10939 struct __rte_packed_begin hwrm_async_event_cmpl_vf_mac_addr_change {
10940 	uint16_t	type;
10941 	/*
10942 	 * This field indicates the exact type of the completion.
10943 	 * By convention, the LSB identifies the length of the
10944 	 * record in 16B units. Even values indicate 16B
10945 	 * records. Odd values indicate 32B
10946 	 * records.
10947 	 */
10948 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_MASK \
10949 		UINT32_C(0x3f)
10950 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_SFT             0
10951 	/* HWRM Asynchronous Event Information */
10952 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_HWRM_ASYNC_EVENT \
10953 		UINT32_C(0x2e)
10954 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_LAST \
10955 		HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_TYPE_HWRM_ASYNC_EVENT
10956 	/* Identifiers of events. */
10957 	uint16_t	event_id;
10958 	/* VF MAC Address Change */
10959 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_ID_VF_MAC_ADDR_CHANGE \
10960 		UINT32_C(0x31)
10961 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_ID_LAST \
10962 		HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_ID_VF_MAC_ADDR_CHANGE
10963 	/* Event specific data */
10964 	uint32_t	event_data2;
10965 	uint8_t	opaque_v;
10966 	/*
10967 	 * This value is written by the NIC such that it will be different
10968 	 * for each pass through the completion queue. The even passes
10969 	 * will write 1. The odd passes will write 0.
10970 	 */
10971 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_V \
10972 		UINT32_C(0x1)
10973 	/* opaque is 7 b */
10974 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_OPAQUE_MASK \
10975 		UINT32_C(0xfe)
10976 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_OPAQUE_SFT 1
10977 	/* 8-lsb timestamp from POR (100-msec resolution) */
10978 	uint8_t	timestamp_lo;
10979 	/* 16-lsb timestamp from POR (100-msec resolution) */
10980 	uint16_t	timestamp_hi;
10981 	/* Event specific data */
10982 	uint32_t	event_data1;
10983 	/* VF ID */
10984 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_DATA1_VF_ID_MASK \
10985 		UINT32_C(0xffff)
10986 	#define HWRM_ASYNC_EVENT_CMPL_VF_MAC_ADDR_CHANGE_EVENT_DATA1_VF_ID_SFT \
10987 		0
10988 } __rte_packed_end;
10989 
10990 /* hwrm_async_event_cmpl_pf_vf_comm_status_change (size:128b/16B) */
10991 struct __rte_packed_begin hwrm_async_event_cmpl_pf_vf_comm_status_change {
10992 	uint16_t	type;
10993 	/*
10994 	 * This field indicates the exact type of the completion.
10995 	 * By convention, the LSB identifies the length of the
10996 	 * record in 16B units. Even values indicate 16B
10997 	 * records. Odd values indicate 32B
10998 	 * records.
10999 	 */
11000 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_MASK \
11001 		UINT32_C(0x3f)
11002 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_SFT \
11003 		0
11004 	/* HWRM Asynchronous Event Information */
11005 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT \
11006 		UINT32_C(0x2e)
11007 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_LAST \
11008 		HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_TYPE_HWRM_ASYNC_EVENT
11009 	/* Identifiers of events. */
11010 	uint16_t	event_id;
11011 	/* PF-VF communication channel status change. */
11012 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_ID_PF_VF_COMM_STATUS_CHANGE \
11013 		UINT32_C(0x32)
11014 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_ID_LAST \
11015 		HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_ID_PF_VF_COMM_STATUS_CHANGE
11016 	/* Event specific data */
11017 	uint32_t	event_data2;
11018 	uint8_t	opaque_v;
11019 	/*
11020 	 * This value is written by the NIC such that it will be different
11021 	 * for each pass through the completion queue. The even passes
11022 	 * will write 1. The odd passes will write 0.
11023 	 */
11024 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_V \
11025 		UINT32_C(0x1)
11026 	/* opaque is 7 b */
11027 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_OPAQUE_MASK \
11028 		UINT32_C(0xfe)
11029 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_OPAQUE_SFT 1
11030 	/* 8-lsb timestamp from POR (100-msec resolution) */
11031 	uint8_t	timestamp_lo;
11032 	/* 16-lsb timestamp from POR (100-msec resolution) */
11033 	uint16_t	timestamp_hi;
11034 	/* Event specific data */
11035 	uint32_t	event_data1;
11036 	/*
11037 	 * If this bit is set to 1, then it indicates that the PF-VF
11038 	 * communication was lost and it is established.
11039 	 * If this bit set to 0, then it indicates that the PF-VF
11040 	 * communication was established and it is lost.
11041 	 */
11042 	#define HWRM_ASYNC_EVENT_CMPL_PF_VF_COMM_STATUS_CHANGE_EVENT_DATA1_COMM_ESTABLISHED \
11043 		UINT32_C(0x1)
11044 } __rte_packed_end;
11045 
11046 /* hwrm_async_event_cmpl_vf_cfg_change (size:128b/16B) */
11047 struct __rte_packed_begin hwrm_async_event_cmpl_vf_cfg_change {
11048 	uint16_t	type;
11049 	/*
11050 	 * This field indicates the exact type of the completion.
11051 	 * By convention, the LSB identifies the length of the
11052 	 * record in 16B units. Even values indicate 16B
11053 	 * records. Odd values indicate 32B
11054 	 * records.
11055 	 */
11056 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_MASK \
11057 		UINT32_C(0x3f)
11058 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_SFT             0
11059 	/* HWRM Asynchronous Event Information */
11060 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT \
11061 		UINT32_C(0x2e)
11062 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_LAST \
11063 		HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
11064 	/* Identifiers of events. */
11065 	uint16_t	event_id;
11066 	/* VF Configuration Change */
11067 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_VF_CFG_CHANGE \
11068 		UINT32_C(0x33)
11069 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_LAST \
11070 		HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_ID_VF_CFG_CHANGE
11071 	/* Event specific data */
11072 	uint32_t	event_data2;
11073 	/*
11074 	 * This value indicates the VF ID of the VF whose configuration
11075 	 * is changing if this async. event is sent to the parent PF.
11076 	 * The firmware supports sending this to the parent PF if the
11077 	 * `hwrm_func_qcaps.vf_cfg_async_for_pf_supported` value is 1.
11078 	 * This value is undefined when the async. event is sent to the
11079 	 * VF.
11080 	 */
11081 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA2_VF_ID_MASK \
11082 		UINT32_C(0xffff)
11083 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA2_VF_ID_SFT 0
11084 	uint8_t	opaque_v;
11085 	/*
11086 	 * This value is written by the NIC such that it will be different
11087 	 * for each pass through the completion queue. The even passes
11088 	 * will write 1. The odd passes will write 0.
11089 	 */
11090 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_V          UINT32_C(0x1)
11091 	/* opaque is 7 b */
11092 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
11093 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_OPAQUE_SFT 1
11094 	/* 8-lsb timestamp from POR (100-msec resolution) */
11095 	uint8_t	timestamp_lo;
11096 	/* 16-lsb timestamp from POR (100-msec resolution) */
11097 	uint16_t	timestamp_hi;
11098 	/*
11099 	 * Each flag provided in this field indicates a specific VF
11100 	 * configuration change. At least one of these flags shall be set to 1
11101 	 * when an asynchronous event completion of this type is provided
11102 	 * by the HWRM.
11103 	 */
11104 	uint32_t	event_data1;
11105 	/*
11106 	 * If this bit is set to 1, then the value of MTU
11107 	 * was changed on this VF.
11108 	 * If set to 0, then this bit should be ignored.
11109 	 */
11110 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_MTU_CHANGE \
11111 		UINT32_C(0x1)
11112 	/*
11113 	 * If this bit is set to 1, then the value of MRU
11114 	 * was changed on this VF.
11115 	 * If set to 0, then this bit should be ignored.
11116 	 */
11117 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_MRU_CHANGE \
11118 		UINT32_C(0x2)
11119 	/*
11120 	 * If this bit is set to 1, then the value of default MAC
11121 	 * address was changed on this VF.
11122 	 * If set to 0, then this bit should be ignored.
11123 	 */
11124 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_DFLT_MAC_ADDR_CHANGE \
11125 		UINT32_C(0x4)
11126 	/*
11127 	 * If this bit is set to 1, then the value of default VLAN
11128 	 * was changed on this VF.
11129 	 * If set to 0, then this bit should be ignored.
11130 	 */
11131 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_DFLT_VLAN_CHANGE \
11132 		UINT32_C(0x8)
11133 	/*
11134 	 * If this bit is set to 1, then the value of trusted VF enable
11135 	 * was changed on this VF.
11136 	 * If set to 0, then this bit should be ignored.
11137 	 */
11138 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_TRUSTED_VF_CFG_CHANGE \
11139 		UINT32_C(0x10)
11140 	/*
11141 	 * If this bit is set to 1, then the control of VF was relinquished
11142 	 * back to the firmware flow manager following the function takeover
11143 	 * by TruFlow.
11144 	 * If set to 0, then this bit should be ignored.
11145 	 */
11146 	#define HWRM_ASYNC_EVENT_CMPL_VF_CFG_CHANGE_EVENT_DATA1_TF_OWNERSHIP_RELEASE \
11147 		UINT32_C(0x20)
11148 } __rte_packed_end;
11149 
11150 /* hwrm_async_event_cmpl_llfc_pfc_change (size:128b/16B) */
11151 struct __rte_packed_begin hwrm_async_event_cmpl_llfc_pfc_change {
11152 	uint16_t	type;
11153 	/*
11154 	 * This field indicates the exact type of the completion.
11155 	 * By convention, the LSB identifies the length of the
11156 	 * record in 16B units. Even values indicate 16B
11157 	 * records. Odd values indicate 32B
11158 	 * records.
11159 	 */
11160 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_TYPE_MASK \
11161 		UINT32_C(0x3f)
11162 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_TYPE_SFT             0
11163 	/* HWRM Asynchronous Event Information */
11164 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_TYPE_HWRM_ASYNC_EVENT \
11165 		UINT32_C(0x2e)
11166 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_TYPE_LAST \
11167 		HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_TYPE_HWRM_ASYNC_EVENT
11168 	/* unused1 is 10 b */
11169 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_UNUSED1_MASK \
11170 		UINT32_C(0xffc0)
11171 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_UNUSED1_SFT          6
11172 	/* Identifiers of events. */
11173 	uint16_t	event_id;
11174 	/* LLFC/PFC Configuration Change */
11175 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_ID_LLFC_PFC_CHANGE \
11176 		UINT32_C(0x34)
11177 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_ID_LAST \
11178 		HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_ID_LLFC_PFC_CHANGE
11179 	/* Event specific data */
11180 	uint32_t	event_data2;
11181 	uint8_t	opaque_v;
11182 	/*
11183 	 * This value is written by the NIC such that it will be different
11184 	 * for each pass through the completion queue. The even passes
11185 	 * will write 1. The odd passes will write 0.
11186 	 */
11187 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_V          UINT32_C(0x1)
11188 	/* opaque is 7 b */
11189 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_OPAQUE_MASK \
11190 		UINT32_C(0xfe)
11191 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_OPAQUE_SFT 1
11192 	/* 8-lsb timestamp from POR (100-msec resolution) */
11193 	uint8_t	timestamp_lo;
11194 	/* 16-lsb timestamp from POR (100-msec resolution) */
11195 	uint16_t	timestamp_hi;
11196 	/* Event specific data */
11197 	uint32_t	event_data1;
11198 	/* Indicates llfc pfc status change */
11199 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_MASK \
11200 		UINT32_C(0x3)
11201 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_SFT \
11202 		0
11203 	/*
11204 	 * If this field set to 1, then it indicates that llfc is
11205 	 * enabled.
11206 	 */
11207 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_LLFC \
11208 		UINT32_C(0x1)
11209 	/*
11210 	 * If this field is set to 2, then it indicates that pfc
11211 	 * is enabled.
11212 	 */
11213 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_PFC \
11214 		UINT32_C(0x2)
11215 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_LAST \
11216 		HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_LLFC_PFC_PFC
11217 	/* Indicates the physical port this llfc pfc change occur */
11218 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_PORT_MASK \
11219 		UINT32_C(0x1c)
11220 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_PORT_SFT \
11221 		2
11222 	/* PORT ID */
11223 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_PORT_ID_MASK \
11224 		UINT32_C(0x1fffe0)
11225 	#define HWRM_ASYNC_EVENT_CMPL_LLFC_PFC_CHANGE_EVENT_DATA1_PORT_ID_SFT \
11226 		5
11227 } __rte_packed_end;
11228 
11229 /* hwrm_async_event_cmpl_default_vnic_change (size:128b/16B) */
11230 struct __rte_packed_begin hwrm_async_event_cmpl_default_vnic_change {
11231 	uint16_t	type;
11232 	/*
11233 	 * This field indicates the exact type of the completion.
11234 	 * By convention, the LSB identifies the length of the
11235 	 * record in 16B units. Even values indicate 16B
11236 	 * records. Odd values indicate 32B
11237 	 * records.
11238 	 */
11239 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_TYPE_MASK \
11240 		UINT32_C(0x3f)
11241 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_TYPE_SFT \
11242 		0
11243 	/* HWRM Asynchronous Event Information */
11244 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_TYPE_HWRM_ASYNC_EVENT \
11245 		UINT32_C(0x2e)
11246 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_TYPE_LAST \
11247 		HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_TYPE_HWRM_ASYNC_EVENT
11248 	/* unused1 is 10 b */
11249 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_UNUSED1_MASK \
11250 		UINT32_C(0xffc0)
11251 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_UNUSED1_SFT \
11252 		6
11253 	/* Identifiers of events. */
11254 	uint16_t	event_id;
11255 	/* Notification of a default vnic allocation or free */
11256 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_ID_ALLOC_FREE_NOTIFICATION \
11257 		UINT32_C(0x35)
11258 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_ID_LAST \
11259 		HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_ID_ALLOC_FREE_NOTIFICATION
11260 	/* Event specific data */
11261 	uint32_t	event_data2;
11262 	uint8_t	opaque_v;
11263 	/*
11264 	 * This value is written by the NIC such that it will be different
11265 	 * for each pass through the completion queue. The even passes
11266 	 * will write 1. The odd passes will write 0.
11267 	 */
11268 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_V \
11269 		UINT32_C(0x1)
11270 	/* opaque is 7 b */
11271 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_OPAQUE_MASK \
11272 		UINT32_C(0xfe)
11273 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_OPAQUE_SFT 1
11274 	/* 8-lsb timestamp from POR (100-msec resolution) */
11275 	uint8_t	timestamp_lo;
11276 	/* 16-lsb timestamp from POR (100-msec resolution) */
11277 	uint16_t	timestamp_hi;
11278 	/* Event specific data */
11279 	uint32_t	event_data1;
11280 	/* Indicates default vnic configuration change */
11281 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_MASK \
11282 		UINT32_C(0x3)
11283 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_SFT \
11284 		0
11285 	/*
11286 	 * If this field is set to 1, then it indicates that
11287 	 * a default VNIC has been allocate.
11288 	 */
11289 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_DEF_VNIC_ALLOC \
11290 		UINT32_C(0x1)
11291 	/*
11292 	 * If this field is set to 2, then it indicates that
11293 	 * a default VNIC has been freed.
11294 	 */
11295 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_DEF_VNIC_FREE \
11296 		UINT32_C(0x2)
11297 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_LAST \
11298 		HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_DEF_VNIC_STATE_DEF_VNIC_FREE
11299 	/* Indicates the physical function this event occurred on. */
11300 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_PF_ID_MASK \
11301 		UINT32_C(0x3fc)
11302 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_PF_ID_SFT \
11303 		2
11304 	/* Indicates the virtual function this event occurred on */
11305 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_VF_ID_MASK \
11306 		UINT32_C(0x3fffc00)
11307 	#define HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_VF_ID_SFT \
11308 		10
11309 } __rte_packed_end;
11310 
11311 /* hwrm_async_event_cmpl_hw_flow_aged (size:128b/16B) */
11312 struct __rte_packed_begin hwrm_async_event_cmpl_hw_flow_aged {
11313 	uint16_t	type;
11314 	/*
11315 	 * This field indicates the exact type of the completion.
11316 	 * By convention, the LSB identifies the length of the
11317 	 * record in 16B units. Even values indicate 16B
11318 	 * records. Odd values indicate 32B
11319 	 * records.
11320 	 */
11321 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_TYPE_MASK \
11322 		UINT32_C(0x3f)
11323 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_TYPE_SFT             0
11324 	/* HWRM Asynchronous Event Information */
11325 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_TYPE_HWRM_ASYNC_EVENT \
11326 		UINT32_C(0x2e)
11327 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_TYPE_LAST \
11328 		HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_TYPE_HWRM_ASYNC_EVENT
11329 	/* Identifiers of events. */
11330 	uint16_t	event_id;
11331 	/* Notification of a hw flow aged */
11332 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_ID_HW_FLOW_AGED \
11333 		UINT32_C(0x36)
11334 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_ID_LAST \
11335 		HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_ID_HW_FLOW_AGED
11336 	/* Event specific data */
11337 	uint32_t	event_data2;
11338 	uint8_t	opaque_v;
11339 	/*
11340 	 * This value is written by the NIC such that it will be different
11341 	 * for each pass through the completion queue. The even passes
11342 	 * will write 1. The odd passes will write 0.
11343 	 */
11344 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_V          UINT32_C(0x1)
11345 	/* opaque is 7 b */
11346 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_OPAQUE_MASK UINT32_C(0xfe)
11347 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_OPAQUE_SFT 1
11348 	/* 8-lsb timestamp from POR (100-msec resolution) */
11349 	uint8_t	timestamp_lo;
11350 	/* 16-lsb timestamp from POR (100-msec resolution) */
11351 	uint16_t	timestamp_hi;
11352 	/* Event specific data */
11353 	uint32_t	event_data1;
11354 	/* Indicates flow ID this event occurred on. */
11355 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_ID_MASK \
11356 		UINT32_C(0x7fffffff)
11357 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_ID_SFT \
11358 		0
11359 	/* Indicates flow direction this event occurred on. */
11360 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_DIRECTION \
11361 		UINT32_C(0x80000000)
11362 	/*
11363 	 * If this bit set to 0, then it indicates that the aged
11364 	 * event was rx flow.
11365 	 */
11366 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_DIRECTION_RX \
11367 		(UINT32_C(0x0) << 31)
11368 	/*
11369 	 * If this bit is set to 1, then it indicates that the aged
11370 	 * event was tx flow.
11371 	 */
11372 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_DIRECTION_TX \
11373 		(UINT32_C(0x1) << 31)
11374 	#define HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_DIRECTION_LAST \
11375 		HWRM_ASYNC_EVENT_CMPL_HW_FLOW_AGED_EVENT_DATA1_FLOW_DIRECTION_TX
11376 } __rte_packed_end;
11377 
11378 /* hwrm_async_event_cmpl_eem_cache_flush_req (size:128b/16B) */
11379 struct __rte_packed_begin hwrm_async_event_cmpl_eem_cache_flush_req {
11380 	uint16_t	type;
11381 	/*
11382 	 * This field indicates the exact type of the completion.
11383 	 * By convention, the LSB identifies the length of the
11384 	 * record in 16B units. Even values indicate 16B
11385 	 * records. Odd values indicate 32B
11386 	 * records.
11387 	 */
11388 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_TYPE_MASK \
11389 		UINT32_C(0x3f)
11390 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_TYPE_SFT \
11391 		0
11392 	/* HWRM Asynchronous Event Information */
11393 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_TYPE_HWRM_ASYNC_EVENT \
11394 		UINT32_C(0x2e)
11395 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_TYPE_LAST \
11396 		HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_TYPE_HWRM_ASYNC_EVENT
11397 	/* Identifiers of events. */
11398 	uint16_t	event_id;
11399 	/* Notification of a eem_cache_flush request */
11400 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_EVENT_ID_EEM_CACHE_FLUSH_REQ \
11401 		UINT32_C(0x38)
11402 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_EVENT_ID_LAST \
11403 		HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_EVENT_ID_EEM_CACHE_FLUSH_REQ
11404 	/* Event specific data */
11405 	uint32_t	event_data2;
11406 	uint8_t	opaque_v;
11407 	/*
11408 	 * This value is written by the NIC such that it will be different
11409 	 * for each pass through the completion queue. The even passes
11410 	 * will write 1. The odd passes will write 0.
11411 	 */
11412 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_V \
11413 		UINT32_C(0x1)
11414 	/* opaque is 7 b */
11415 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_OPAQUE_MASK \
11416 		UINT32_C(0xfe)
11417 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_REQ_OPAQUE_SFT 1
11418 	/* 8-lsb timestamp from POR (100-msec resolution) */
11419 	uint8_t	timestamp_lo;
11420 	/* 16-lsb timestamp from POR (100-msec resolution) */
11421 	uint16_t	timestamp_hi;
11422 	/* Event specific data */
11423 	uint32_t	event_data1;
11424 } __rte_packed_end;
11425 
11426 /* hwrm_async_event_cmpl_eem_cache_flush_done (size:128b/16B) */
11427 struct __rte_packed_begin hwrm_async_event_cmpl_eem_cache_flush_done {
11428 	uint16_t	type;
11429 	/*
11430 	 * This field indicates the exact type of the completion.
11431 	 * By convention, the LSB identifies the length of the
11432 	 * record in 16B units. Even values indicate 16B
11433 	 * records. Odd values indicate 32B
11434 	 * records.
11435 	 */
11436 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_TYPE_MASK \
11437 		UINT32_C(0x3f)
11438 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_TYPE_SFT \
11439 		0
11440 	/* HWRM Asynchronous Event Information */
11441 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_TYPE_HWRM_ASYNC_EVENT \
11442 		UINT32_C(0x2e)
11443 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_TYPE_LAST \
11444 		HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_TYPE_HWRM_ASYNC_EVENT
11445 	/* Identifiers of events. */
11446 	uint16_t	event_id;
11447 	/*
11448 	 * Notification of a host eem_cache_flush has completed. This event
11449 	 * is generated by the host driver.
11450 	 */
11451 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_EVENT_ID_EEM_CACHE_FLUSH_DONE \
11452 		UINT32_C(0x39)
11453 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_EVENT_ID_LAST \
11454 		HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_EVENT_ID_EEM_CACHE_FLUSH_DONE
11455 	/* Event specific data */
11456 	uint32_t	event_data2;
11457 	uint8_t	opaque_v;
11458 	/*
11459 	 * This value is written by the NIC such that it will be different
11460 	 * for each pass through the completion queue. The even passes
11461 	 * will write 1. The odd passes will write 0.
11462 	 */
11463 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_V \
11464 		UINT32_C(0x1)
11465 	/* opaque is 7 b */
11466 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_OPAQUE_MASK \
11467 		UINT32_C(0xfe)
11468 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_OPAQUE_SFT 1
11469 	/* 8-lsb timestamp from POR (100-msec resolution) */
11470 	uint8_t	timestamp_lo;
11471 	/* 16-lsb timestamp from POR (100-msec resolution) */
11472 	uint16_t	timestamp_hi;
11473 	/* Event specific data */
11474 	uint32_t	event_data1;
11475 	/* Indicates function ID that this event occurred on. */
11476 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_EVENT_DATA1_FID_MASK \
11477 		UINT32_C(0xffff)
11478 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CACHE_FLUSH_DONE_EVENT_DATA1_FID_SFT \
11479 		0
11480 } __rte_packed_end;
11481 
11482 /* hwrm_async_event_cmpl_tcp_flag_action_change (size:128b/16B) */
11483 struct __rte_packed_begin hwrm_async_event_cmpl_tcp_flag_action_change {
11484 	uint16_t	type;
11485 	/*
11486 	 * This field indicates the exact type of the completion.
11487 	 * By convention, the LSB identifies the length of the
11488 	 * record in 16B units. Even values indicate 16B
11489 	 * records. Odd values indicate 32B
11490 	 * records.
11491 	 */
11492 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_TYPE_MASK \
11493 		UINT32_C(0x3f)
11494 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_TYPE_SFT \
11495 		0
11496 	/* HWRM Asynchronous Event Information */
11497 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_TYPE_HWRM_ASYNC_EVENT \
11498 		UINT32_C(0x2e)
11499 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_TYPE_LAST \
11500 		HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_TYPE_HWRM_ASYNC_EVENT
11501 	/* Identifiers of events. */
11502 	uint16_t	event_id;
11503 	/* Notification of tcp flag action change */
11504 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_EVENT_ID_TCP_FLAG_ACTION_CHANGE \
11505 		UINT32_C(0x3a)
11506 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_EVENT_ID_LAST \
11507 		HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_EVENT_ID_TCP_FLAG_ACTION_CHANGE
11508 	/* Event specific data */
11509 	uint32_t	event_data2;
11510 	uint8_t	opaque_v;
11511 	/*
11512 	 * This value is written by the NIC such that it will be different
11513 	 * for each pass through the completion queue. The even passes
11514 	 * will write 1. The odd passes will write 0.
11515 	 */
11516 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_V \
11517 		UINT32_C(0x1)
11518 	/* opaque is 7 b */
11519 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_OPAQUE_MASK \
11520 		UINT32_C(0xfe)
11521 	#define HWRM_ASYNC_EVENT_CMPL_TCP_FLAG_ACTION_CHANGE_OPAQUE_SFT 1
11522 	/* 8-lsb timestamp from POR (100-msec resolution) */
11523 	uint8_t	timestamp_lo;
11524 	/* 16-lsb timestamp from POR (100-msec resolution) */
11525 	uint16_t	timestamp_hi;
11526 	/* Event specific data */
11527 	uint32_t	event_data1;
11528 } __rte_packed_end;
11529 
11530 /* hwrm_async_event_cmpl_eem_flow_active (size:128b/16B) */
11531 struct __rte_packed_begin hwrm_async_event_cmpl_eem_flow_active {
11532 	uint16_t	type;
11533 	/*
11534 	 * This field indicates the exact type of the completion.
11535 	 * By convention, the LSB identifies the length of the
11536 	 * record in 16B units. Even values indicate 16B
11537 	 * records. Odd values indicate 32B
11538 	 * records.
11539 	 */
11540 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_TYPE_MASK \
11541 		UINT32_C(0x3f)
11542 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_TYPE_SFT             0
11543 	/* HWRM Asynchronous Event Information */
11544 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_TYPE_HWRM_ASYNC_EVENT \
11545 		UINT32_C(0x2e)
11546 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_TYPE_LAST \
11547 		HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_TYPE_HWRM_ASYNC_EVENT
11548 	/* Identifiers of events. */
11549 	uint16_t	event_id;
11550 	/* Notification of an active eem flow */
11551 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_ID_EEM_FLOW_ACTIVE \
11552 		UINT32_C(0x3b)
11553 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_ID_LAST \
11554 		HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_ID_EEM_FLOW_ACTIVE
11555 	/* Event specific data */
11556 	uint32_t	event_data2;
11557 	/* Indicates the 2nd global id this event occurred on. */
11558 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_GLOBAL_ID_2_MASK \
11559 		UINT32_C(0x3fffffff)
11560 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_GLOBAL_ID_2_SFT \
11561 		0
11562 	/*
11563 	 * Indicates flow direction of the flow identified by
11564 	 * the global_id_2.
11565 	 */
11566 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_FLOW_DIRECTION \
11567 		UINT32_C(0x40000000)
11568 	/* If this bit is set to 0, then it indicates that this rx flow. */
11569 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_FLOW_DIRECTION_RX \
11570 		(UINT32_C(0x0) << 30)
11571 	/* If this bit is set to 1, then it indicates that this tx flow. */
11572 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_FLOW_DIRECTION_TX \
11573 		(UINT32_C(0x1) << 30)
11574 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_FLOW_DIRECTION_LAST \
11575 		HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA2_FLOW_DIRECTION_TX
11576 	uint8_t	opaque_v;
11577 	/*
11578 	 * This value is written by the NIC such that it will be different
11579 	 * for each pass through the completion queue. The even passes
11580 	 * will write 1. The odd passes will write 0.
11581 	 */
11582 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_V          UINT32_C(0x1)
11583 	/* opaque is 7 b */
11584 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_OPAQUE_MASK \
11585 		UINT32_C(0xfe)
11586 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_OPAQUE_SFT 1
11587 	/* 8-lsb timestamp from POR (100-msec resolution) */
11588 	uint8_t	timestamp_lo;
11589 	/* 16-lsb timestamp from POR (100-msec resolution) */
11590 	uint16_t	timestamp_hi;
11591 	/* Event specific data */
11592 	uint32_t	event_data1;
11593 	/* Indicates the 1st global id this event occurred on. */
11594 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_GLOBAL_ID_1_MASK \
11595 		UINT32_C(0x3fffffff)
11596 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_GLOBAL_ID_1_SFT \
11597 		0
11598 	/*
11599 	 * Indicates flow direction of the flow identified by the
11600 	 * global_id_1.
11601 	 */
11602 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_FLOW_DIRECTION \
11603 		UINT32_C(0x40000000)
11604 	/* If this bit is set to 0, then it indicates that this is rx flow. */
11605 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_FLOW_DIRECTION_RX \
11606 		(UINT32_C(0x0) << 30)
11607 	/* If this bit is set to 1, then it indicates that this is tx flow. */
11608 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_FLOW_DIRECTION_TX \
11609 		(UINT32_C(0x1) << 30)
11610 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_FLOW_DIRECTION_LAST \
11611 		HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_FLOW_DIRECTION_TX
11612 	/*
11613 	 * Indicates EEM flow aging mode this event occurred on. If
11614 	 * this bit is set to 0, the event_data1 is the EEM global
11615 	 * ID. If this bit is set to 1, the event_data1 is the number
11616 	 * of global ID in the context memory.
11617 	 */
11618 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_MODE \
11619 		UINT32_C(0x80000000)
11620 	/* EEM flow aging mode 0. */
11621 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_MODE_0 \
11622 		(UINT32_C(0x0) << 31)
11623 	/* EEM flow aging mode 1. */
11624 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_MODE_1 \
11625 		(UINT32_C(0x1) << 31)
11626 	#define HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_MODE_LAST \
11627 		HWRM_ASYNC_EVENT_CMPL_EEM_FLOW_ACTIVE_EVENT_DATA1_MODE_1
11628 } __rte_packed_end;
11629 
11630 /* hwrm_async_event_cmpl_eem_cfg_change (size:128b/16B) */
11631 struct __rte_packed_begin hwrm_async_event_cmpl_eem_cfg_change {
11632 	uint16_t	type;
11633 	/*
11634 	 * This field indicates the exact type of the completion.
11635 	 * By convention, the LSB identifies the length of the
11636 	 * record in 16B units. Even values indicate 16B
11637 	 * records. Odd values indicate 32B
11638 	 * records.
11639 	 */
11640 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_TYPE_MASK \
11641 		UINT32_C(0x3f)
11642 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_TYPE_SFT             0
11643 	/* HWRM Asynchronous Event Information */
11644 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT \
11645 		UINT32_C(0x2e)
11646 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_TYPE_LAST \
11647 		HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
11648 	/* Identifiers of events. */
11649 	uint16_t	event_id;
11650 	/* Notification of EEM configuration change */
11651 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_EVENT_ID_EEM_CFG_CHANGE \
11652 		UINT32_C(0x3c)
11653 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_EVENT_ID_LAST \
11654 		HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_EVENT_ID_EEM_CFG_CHANGE
11655 	/* Event specific data */
11656 	uint32_t	event_data2;
11657 	uint8_t	opaque_v;
11658 	/*
11659 	 * This value is written by the NIC such that it will be different
11660 	 * for each pass through the completion queue. The even passes
11661 	 * will write 1. The odd passes will write 0.
11662 	 */
11663 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_V          UINT32_C(0x1)
11664 	/* opaque is 7 b */
11665 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
11666 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_OPAQUE_SFT 1
11667 	/* 8-lsb timestamp from POR (100-msec resolution) */
11668 	uint8_t	timestamp_lo;
11669 	/* 16-lsb timestamp from POR (100-msec resolution) */
11670 	uint16_t	timestamp_hi;
11671 	/* Event specific data */
11672 	uint32_t	event_data1;
11673 	/*
11674 	 * Value of 1 to indicate EEM TX configuration is enabled. Value of
11675 	 * 0 to indicate the EEM TX configuration is disabled.
11676 	 */
11677 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_EVENT_DATA1_EEM_TX_ENABLE \
11678 		UINT32_C(0x1)
11679 	/*
11680 	 * Value of 1 to indicate EEM RX configuration is enabled. Value of 0
11681 	 * to indicate the EEM RX configuration is disabled.
11682 	 */
11683 	#define HWRM_ASYNC_EVENT_CMPL_EEM_CFG_CHANGE_EVENT_DATA1_EEM_RX_ENABLE \
11684 		UINT32_C(0x2)
11685 } __rte_packed_end;
11686 
11687 /* hwrm_async_event_cmpl_quiesce_done (size:128b/16B) */
11688 struct __rte_packed_begin hwrm_async_event_cmpl_quiesce_done {
11689 	uint16_t	type;
11690 	/*
11691 	 * This field indicates the exact type of the completion.
11692 	 * By convention, the LSB identifies the length of the
11693 	 * record in 16B units. Even values indicate 16B
11694 	 * records. Odd values indicate 32B
11695 	 * records.
11696 	 */
11697 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_TYPE_MASK \
11698 		UINT32_C(0x3f)
11699 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_TYPE_SFT             0
11700 	/* HWRM Asynchronous Event Information */
11701 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_TYPE_HWRM_ASYNC_EVENT \
11702 		UINT32_C(0x2e)
11703 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_TYPE_LAST \
11704 		HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_TYPE_HWRM_ASYNC_EVENT
11705 	/* Identifiers of events. */
11706 	uint16_t	event_id;
11707 	/* An event signifying completion of HWRM_FW_STATE_QUIESCE */
11708 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_ID_QUIESCE_DONE \
11709 		UINT32_C(0x3f)
11710 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_ID_LAST \
11711 		HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_ID_QUIESCE_DONE
11712 	/* Event specific data */
11713 	uint32_t	event_data2;
11714 	/* Status of HWRM_FW_STATE_QUIESCE completion */
11715 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_MASK \
11716 		UINT32_C(0xff)
11717 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_SFT \
11718 		0
11719 	/*
11720 	 * The quiesce operation started by HWRM_FW_STATE_QUIESCE
11721 	 * completed successfully.
11722 	 */
11723 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_SUCCESS \
11724 		UINT32_C(0x0)
11725 	/*
11726 	 * The quiesce operation started by HWRM_FW_STATE_QUIESCE timed
11727 	 * out.
11728 	 */
11729 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_TIMEOUT \
11730 		UINT32_C(0x1)
11731 	/*
11732 	 * The quiesce operation started by HWRM_FW_STATE_QUIESCE
11733 	 * encountered an error.
11734 	 */
11735 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_ERROR \
11736 		UINT32_C(0x2)
11737 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_LAST \
11738 		HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_QUIESCE_STATUS_ERROR
11739 	/* opaque is 8 b */
11740 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_OPAQUE_MASK \
11741 		UINT32_C(0xff00)
11742 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_OPAQUE_SFT \
11743 		8
11744 	/*
11745 	 * Additional information about internal hardware state related to
11746 	 * idle/quiesce state. QUIESCE may succeed per quiesce_status
11747 	 * regardless of idle_state_flags. If QUIESCE fails, the host may
11748 	 * inspect idle_state_flags to determine whether a retry is warranted.
11749 	 */
11750 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_MASK \
11751 		UINT32_C(0xff0000)
11752 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_SFT \
11753 		16
11754 	/*
11755 	 * Failure to quiesce is caused by host not updating the NQ consumer
11756 	 * index.
11757 	 */
11758 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_INCOMPLETE_NQ \
11759 		UINT32_C(0x10000)
11760 	/* Flag 1 indicating partial non-idle state. */
11761 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_IDLE_STATUS_1 \
11762 		UINT32_C(0x20000)
11763 	/* Flag 2 indicating partial non-idle state. */
11764 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_IDLE_STATUS_2 \
11765 		UINT32_C(0x40000)
11766 	/* Flag 3 indicating partial non-idle state. */
11767 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA2_IDLE_STATE_FLAGS_IDLE_STATUS_3 \
11768 		UINT32_C(0x80000)
11769 	uint8_t	opaque_v;
11770 	/*
11771 	 * This value is written by the NIC such that it will be different
11772 	 * for each pass through the completion queue. The even passes
11773 	 * will write 1. The odd passes will write 0.
11774 	 */
11775 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_V          UINT32_C(0x1)
11776 	/* opaque is 7 b */
11777 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_OPAQUE_MASK UINT32_C(0xfe)
11778 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_OPAQUE_SFT 1
11779 	/* 8-lsb timestamp from POR (100-msec resolution) */
11780 	uint8_t	timestamp_lo;
11781 	/* 16-lsb timestamp from POR (100-msec resolution) */
11782 	uint16_t	timestamp_hi;
11783 	/* Event specific data */
11784 	uint32_t	event_data1;
11785 	/* Time stamp for error event */
11786 	#define HWRM_ASYNC_EVENT_CMPL_QUIESCE_DONE_EVENT_DATA1_TIMESTAMP \
11787 		UINT32_C(0x1)
11788 } __rte_packed_end;
11789 
11790 /* hwrm_async_event_cmpl_deferred_response (size:128b/16B) */
11791 struct __rte_packed_begin hwrm_async_event_cmpl_deferred_response {
11792 	uint16_t	type;
11793 	/*
11794 	 * This field indicates the exact type of the completion.
11795 	 * By convention, the LSB identifies the length of the
11796 	 * record in 16B units. Even values indicate 16B
11797 	 * records. Odd values indicate 32B
11798 	 * records.
11799 	 */
11800 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_TYPE_MASK \
11801 		UINT32_C(0x3f)
11802 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_TYPE_SFT             0
11803 	/* HWRM Asynchronous Event Information */
11804 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_TYPE_HWRM_ASYNC_EVENT \
11805 		UINT32_C(0x2e)
11806 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_TYPE_LAST \
11807 		HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_TYPE_HWRM_ASYNC_EVENT
11808 	/* Identifiers of events. */
11809 	uint16_t	event_id;
11810 	/*
11811 	 * An event signifying a HWRM command is in progress and its
11812 	 * response will be deferred
11813 	 */
11814 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_EVENT_ID_DEFERRED_RESPONSE \
11815 		UINT32_C(0x40)
11816 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_EVENT_ID_LAST \
11817 		HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_EVENT_ID_DEFERRED_RESPONSE
11818 	/* Event specific data */
11819 	uint32_t	event_data2;
11820 	/*
11821 	 * The PF's mailbox is clear to issue another command.
11822 	 * A command with this seq_id is still in progress
11823 	 * and will return a regular HWRM completion when done.
11824 	 * 'event_data1' field, if non-zero, contains the estimated
11825 	 * execution time for the command.
11826 	 */
11827 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_EVENT_DATA2_SEQ_ID_MASK \
11828 		UINT32_C(0xffff)
11829 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_EVENT_DATA2_SEQ_ID_SFT \
11830 		0
11831 	uint8_t	opaque_v;
11832 	/*
11833 	 * This value is written by the NIC such that it will be different
11834 	 * for each pass through the completion queue. The even passes
11835 	 * will write 1. The odd passes will write 0.
11836 	 */
11837 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_V \
11838 		UINT32_C(0x1)
11839 	/* opaque is 7 b */
11840 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_OPAQUE_MASK \
11841 		UINT32_C(0xfe)
11842 	#define HWRM_ASYNC_EVENT_CMPL_DEFERRED_RESPONSE_OPAQUE_SFT 1
11843 	/* 8-lsb timestamp from POR (100-msec resolution) */
11844 	uint8_t	timestamp_lo;
11845 	/* 16-lsb timestamp from POR (100-msec resolution) */
11846 	uint16_t	timestamp_hi;
11847 	/* Estimated remaining time of command execution in ms (if not zero) */
11848 	uint32_t	event_data1;
11849 } __rte_packed_end;
11850 
11851 /* hwrm_async_event_cmpl_pfc_watchdog_cfg_change (size:128b/16B) */
11852 struct __rte_packed_begin hwrm_async_event_cmpl_pfc_watchdog_cfg_change {
11853 	uint16_t	type;
11854 	/*
11855 	 * This field indicates the exact type of the completion.
11856 	 * By convention, the LSB identifies the length of the
11857 	 * record in 16B units. Even values indicate 16B
11858 	 * records. Odd values indicate 32B
11859 	 * records.
11860 	 */
11861 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_TYPE_MASK \
11862 		UINT32_C(0x3f)
11863 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_TYPE_SFT \
11864 		0
11865 	/* HWRM Asynchronous Event Information */
11866 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT \
11867 		UINT32_C(0x2e)
11868 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_TYPE_LAST \
11869 		HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_TYPE_HWRM_ASYNC_EVENT
11870 	/* Identifiers of events. */
11871 	uint16_t	event_id;
11872 	/* PFC watchdog configuration change for given port/cos */
11873 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_ID_PFC_WATCHDOG_CFG_CHANGE \
11874 		UINT32_C(0x41)
11875 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_ID_LAST \
11876 		HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_ID_PFC_WATCHDOG_CFG_CHANGE
11877 	/* Event specific data */
11878 	uint32_t	event_data2;
11879 	uint8_t	opaque_v;
11880 	/*
11881 	 * This value is written by the NIC such that it will be different
11882 	 * for each pass through the completion queue. The even passes
11883 	 * will write 1. The odd passes will write 0.
11884 	 */
11885 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_V \
11886 		UINT32_C(0x1)
11887 	/* opaque is 7 b */
11888 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_OPAQUE_MASK \
11889 		UINT32_C(0xfe)
11890 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_OPAQUE_SFT 1
11891 	/* 8-lsb timestamp from POR (100-msec resolution) */
11892 	uint8_t	timestamp_lo;
11893 	/* 16-lsb timestamp from POR (100-msec resolution) */
11894 	uint16_t	timestamp_hi;
11895 	/* Event specific data */
11896 	uint32_t	event_data1;
11897 	/*
11898 	 * 1 in bit position X indicates PFC watchdog should
11899 	 * be on for COSX
11900 	 */
11901 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_MASK \
11902 		UINT32_C(0xff)
11903 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_SFT \
11904 		0
11905 	/* 1 means PFC WD for COS0 is on, 0 - off. */
11906 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS0 \
11907 		UINT32_C(0x1)
11908 	/* 1 means PFC WD for COS1 is on, 0 - off. */
11909 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS1 \
11910 		UINT32_C(0x2)
11911 	/* 1 means PFC WD for COS2 is on, 0 - off. */
11912 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS2 \
11913 		UINT32_C(0x4)
11914 	/* 1 means PFC WD for COS3 is on, 0 - off. */
11915 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS3 \
11916 		UINT32_C(0x8)
11917 	/* 1 means PFC WD for COS4 is on, 0 - off. */
11918 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS4 \
11919 		UINT32_C(0x10)
11920 	/* 1 means PFC WD for COS5 is on, 0 - off. */
11921 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS5 \
11922 		UINT32_C(0x20)
11923 	/* 1 means PFC WD for COS6 is on, 0 - off. */
11924 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS6 \
11925 		UINT32_C(0x40)
11926 	/* 1 means PFC WD for COS7 is on, 0 - off. */
11927 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PFC_WD_COS_PFC_WD_COS7 \
11928 		UINT32_C(0x80)
11929 	/* PORT ID */
11930 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PORT_ID_MASK \
11931 		UINT32_C(0xffff00)
11932 	#define HWRM_ASYNC_EVENT_CMPL_PFC_WATCHDOG_CFG_CHANGE_EVENT_DATA1_PORT_ID_SFT \
11933 		8
11934 } __rte_packed_end;
11935 
11936 /* hwrm_async_event_cmpl_echo_request (size:128b/16B) */
11937 struct __rte_packed_begin hwrm_async_event_cmpl_echo_request {
11938 	uint16_t	type;
11939 	/*
11940 	 * This field indicates the exact type of the completion.
11941 	 * By convention, the LSB identifies the length of the
11942 	 * record in 16B units. Even values indicate 16B
11943 	 * records. Odd values indicate 32B
11944 	 * records.
11945 	 */
11946 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_TYPE_MASK \
11947 		UINT32_C(0x3f)
11948 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_TYPE_SFT             0
11949 	/* HWRM Asynchronous Event Information */
11950 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_TYPE_HWRM_ASYNC_EVENT \
11951 		UINT32_C(0x2e)
11952 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_TYPE_LAST \
11953 		HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_TYPE_HWRM_ASYNC_EVENT
11954 	/* Identifiers of events. */
11955 	uint16_t	event_id;
11956 	/*
11957 	 * An echo request from the firmware. An echo response is expected by
11958 	 * the firmware.
11959 	 */
11960 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_EVENT_ID_ECHO_REQUEST \
11961 		UINT32_C(0x42)
11962 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_EVENT_ID_LAST \
11963 		HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_EVENT_ID_ECHO_REQUEST
11964 	/* Event specific data that should be provided in the echo response */
11965 	uint32_t	event_data2;
11966 	uint8_t	opaque_v;
11967 	/*
11968 	 * This value is written by the NIC such that it will be different
11969 	 * for each pass through the completion queue. The even passes
11970 	 * will write 1. The odd passes will write 0.
11971 	 */
11972 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_V          UINT32_C(0x1)
11973 	/* opaque is 7 b */
11974 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_OPAQUE_MASK UINT32_C(0xfe)
11975 	#define HWRM_ASYNC_EVENT_CMPL_ECHO_REQUEST_OPAQUE_SFT 1
11976 	/* 8-lsb timestamp from POR (100-msec resolution) */
11977 	uint8_t	timestamp_lo;
11978 	/* 16-lsb timestamp from POR (100-msec resolution) */
11979 	uint16_t	timestamp_hi;
11980 	/* Event specific data that should be provided in the echo response */
11981 	uint32_t	event_data1;
11982 } __rte_packed_end;
11983 
11984 /* hwrm_async_event_cmpl_phc_update (size:128b/16B) */
11985 struct __rte_packed_begin hwrm_async_event_cmpl_phc_update {
11986 	uint16_t	type;
11987 	/*
11988 	 * This field indicates the exact type of the completion.
11989 	 * By convention, the LSB identifies the length of the
11990 	 * record in 16B units. Even values indicate 16B
11991 	 * records. Odd values indicate 32B
11992 	 * records.
11993 	 */
11994 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_TYPE_MASK \
11995 		UINT32_C(0x3f)
11996 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_TYPE_SFT             0
11997 	/* HWRM Asynchronous Event Information */
11998 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_TYPE_HWRM_ASYNC_EVENT \
11999 		UINT32_C(0x2e)
12000 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_TYPE_LAST \
12001 		HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_TYPE_HWRM_ASYNC_EVENT
12002 	/* Identifiers of events. */
12003 	uint16_t	event_id;
12004 	/*
12005 	 * This async event is used to notify driver of changes
12006 	 * in PHC master. Only one master function can configure
12007 	 * PHC.
12008 	 */
12009 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_ID_PHC_UPDATE \
12010 		UINT32_C(0x43)
12011 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_ID_LAST \
12012 		HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_ID_PHC_UPDATE
12013 	/* Event specific data */
12014 	uint32_t	event_data2;
12015 	/* This field provides the current master function. */
12016 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA2_PHC_MASTER_FID_MASK \
12017 		UINT32_C(0xffff)
12018 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA2_PHC_MASTER_FID_SFT \
12019 		0
12020 	/* This field provides the current secondary function. */
12021 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA2_PHC_SEC_FID_MASK \
12022 		UINT32_C(0xffff0000)
12023 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA2_PHC_SEC_FID_SFT \
12024 		16
12025 	uint8_t	opaque_v;
12026 	/*
12027 	 * This value is written by the NIC such that it will be different
12028 	 * for each pass through the completion queue. The even passes
12029 	 * will write 1. The odd passes will write 0.
12030 	 */
12031 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_V          UINT32_C(0x1)
12032 	/* opaque is 7 b */
12033 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_OPAQUE_MASK UINT32_C(0xfe)
12034 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_OPAQUE_SFT 1
12035 	/* 8-lsb timestamp (100-msec resolution) */
12036 	uint8_t	timestamp_lo;
12037 	/* 16-lsb timestamp (100-msec resolution) */
12038 	uint16_t	timestamp_hi;
12039 	/* Event specific data */
12040 	uint32_t	event_data1;
12041 	/* Indicates to the driver the type of PHC event. */
12042 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_MASK \
12043 		UINT32_C(0xf)
12044 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_SFT \
12045 		0
12046 	/*
12047 	 * Indicates PHC Master selection event. The master fid is
12048 	 * specified in event_data2.phc_master_fid.
12049 	 */
12050 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_MASTER \
12051 		UINT32_C(0x1)
12052 	/*
12053 	 * Indicates PHC Secondary selection event. The secondary fid is
12054 	 * specified in event_data2.phc_sec_fid.
12055 	 */
12056 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_SECONDARY \
12057 		UINT32_C(0x2)
12058 	/*
12059 	 * Indicates PHC failover event. Failover happens from
12060 	 * event_data2.phc_master_fid to event_data2.phc_sec_fid.
12061 	 */
12062 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_FAILOVER \
12063 		UINT32_C(0x3)
12064 	/*
12065 	 * Indicates that the 64bit Real time clock upper 16bits
12066 	 * have been updated due to PHC rollover. The updated
12067 	 * upper 16bits is in event_data1.phc_time_msb
12068 	 */
12069 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_RTC_UPDATE \
12070 		UINT32_C(0x4)
12071 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_LAST \
12072 		HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_FLAGS_PHC_RTC_UPDATE
12073 	/*
12074 	 * This field provides the upper 16bits of the 64bit real
12075 	 * time clock.
12076 	 */
12077 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_PHC_TIME_MSB_MASK \
12078 		UINT32_C(0xffff0)
12079 	#define HWRM_ASYNC_EVENT_CMPL_PHC_UPDATE_EVENT_DATA1_PHC_TIME_MSB_SFT \
12080 		4
12081 } __rte_packed_end;
12082 
12083 /* hwrm_async_event_cmpl_pps_timestamp (size:128b/16B) */
12084 struct __rte_packed_begin hwrm_async_event_cmpl_pps_timestamp {
12085 	uint16_t	type;
12086 	/*
12087 	 * This field indicates the exact type of the completion.
12088 	 * By convention, the LSB identifies the length of the
12089 	 * record in 16B units. Even values indicate 16B
12090 	 * records. Odd values indicate 32B
12091 	 * records.
12092 	 */
12093 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_TYPE_MASK \
12094 		UINT32_C(0x3f)
12095 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_TYPE_SFT             0
12096 	/* HWRM Asynchronous Event Information */
12097 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_TYPE_HWRM_ASYNC_EVENT \
12098 		UINT32_C(0x2e)
12099 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_TYPE_LAST \
12100 		HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_TYPE_HWRM_ASYNC_EVENT
12101 	/* Identifiers of events. */
12102 	uint16_t	event_id;
12103 	/*
12104 	 * This async notification message can be used to inform
12105 	 * driver of the latest PPS timestamp that has been latched.
12106 	 * When driver enables PPS event, Firmware will generate
12107 	 * PPS timestamps every second, Firmware informs driver
12108 	 * of this timestamp through the async event.
12109 	 */
12110 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_ID_PPS_TIMESTAMP \
12111 		UINT32_C(0x44)
12112 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_ID_LAST \
12113 		HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_ID_PPS_TIMESTAMP
12114 	/* Event specific data */
12115 	uint32_t	event_data2;
12116 	/* Indicates the PPS event type */
12117 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_EVENT_TYPE \
12118 		UINT32_C(0x1)
12119 	/* This is an internal event. */
12120 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_EVENT_TYPE_INTERNAL \
12121 		UINT32_C(0x0)
12122 	/* This is an external event. */
12123 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_EVENT_TYPE_EXTERNAL \
12124 		UINT32_C(0x1)
12125 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_EVENT_TYPE_LAST \
12126 		HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_EVENT_TYPE_EXTERNAL
12127 	/*
12128 	 * Indicates the pin number on which the event is
12129 	 * received.
12130 	 */
12131 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_PIN_NUMBER_MASK \
12132 		UINT32_C(0xe)
12133 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_PIN_NUMBER_SFT \
12134 		1
12135 	/*
12136 	 * Contains bits[47:32] of the upper PPS timestamp.
12137 	 * Lower 32 bits are in event_data1. Together they
12138 	 * provide the 48 bit PPS timestamp.
12139 	 */
12140 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_PPS_TIMESTAMP_UPPER_MASK \
12141 		UINT32_C(0xffff0)
12142 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA2_PPS_TIMESTAMP_UPPER_SFT \
12143 		4
12144 	uint8_t	opaque_v;
12145 	/*
12146 	 * This value is written by the NIC such that it will be different
12147 	 * for each pass through the completion queue. The even passes
12148 	 * will write 1. The odd passes will write 0.
12149 	 */
12150 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_V          UINT32_C(0x1)
12151 	/* opaque is 7 b */
12152 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_OPAQUE_MASK UINT32_C(0xfe)
12153 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_OPAQUE_SFT 1
12154 	/* 8-lsb timestamp (100-msec resolution) */
12155 	uint8_t	timestamp_lo;
12156 	/* 16-lsb timestamp (100-msec resolution) */
12157 	uint16_t	timestamp_hi;
12158 	/* Contains the lower 32 bits of the PPS timestamp. */
12159 	uint32_t	event_data1;
12160 	/* Contains the lower 32 bit PPS timestamp */
12161 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA1_PPS_TIMESTAMP_LOWER_MASK \
12162 		UINT32_C(0xffffffff)
12163 	#define HWRM_ASYNC_EVENT_CMPL_PPS_TIMESTAMP_EVENT_DATA1_PPS_TIMESTAMP_LOWER_SFT \
12164 		0
12165 } __rte_packed_end;
12166 
12167 /* hwrm_async_event_cmpl_error_report (size:128b/16B) */
12168 struct __rte_packed_begin hwrm_async_event_cmpl_error_report {
12169 	uint16_t	type;
12170 	/*
12171 	 * This field indicates the exact type of the completion.
12172 	 * By convention, the LSB identifies the length of the
12173 	 * record in 16B units. Even values indicate 16B
12174 	 * records. Odd values indicate 32B
12175 	 * records.
12176 	 */
12177 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_TYPE_MASK \
12178 		UINT32_C(0x3f)
12179 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_TYPE_SFT             0
12180 	/* HWRM Asynchronous Event Information */
12181 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_TYPE_HWRM_ASYNC_EVENT \
12182 		UINT32_C(0x2e)
12183 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_TYPE_LAST \
12184 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_TYPE_HWRM_ASYNC_EVENT
12185 	/* Identifiers of events. */
12186 	uint16_t	event_id;
12187 	/*
12188 	 * This async notification message is used to inform
12189 	 * the driver that an error has occurred which may need
12190 	 * the attention of the administrator.
12191 	 */
12192 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_EVENT_ID_ERROR_REPORT \
12193 		UINT32_C(0x45)
12194 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_EVENT_ID_LAST \
12195 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_EVENT_ID_ERROR_REPORT
12196 	/* Event specific data. */
12197 	uint32_t	event_data2;
12198 	uint8_t	opaque_v;
12199 	/*
12200 	 * This value is written by the NIC such that it will be different
12201 	 * for each pass through the completion queue. The even passes
12202 	 * will write 1. The odd passes will write 0.
12203 	 */
12204 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_V          UINT32_C(0x1)
12205 	/* opaque is 7 b */
12206 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_OPAQUE_MASK UINT32_C(0xfe)
12207 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_OPAQUE_SFT 1
12208 	/* 8-lsb timestamp (100-msec resolution) */
12209 	uint8_t	timestamp_lo;
12210 	/* 16-lsb timestamp (100-msec resolution) */
12211 	uint16_t	timestamp_hi;
12212 	/* Event specific data */
12213 	uint32_t	event_data1;
12214 	/*
12215 	 * Indicates the type of error being reported. See section on Error
12216 	 * Report event error_types for details on each error.
12217 	 */
12218 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_EVENT_DATA1_ERROR_TYPE_MASK \
12219 		UINT32_C(0xff)
12220 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_EVENT_DATA1_ERROR_TYPE_SFT 0
12221 } __rte_packed_end;
12222 
12223 /* hwrm_async_event_cmpl_doorbell_pacing_threshold (size:128b/16B) */
12224 struct __rte_packed_begin hwrm_async_event_cmpl_doorbell_pacing_threshold {
12225 	uint16_t	type;
12226 	/*
12227 	 * This field indicates the exact type of the completion.
12228 	 * By convention, the LSB identifies the length of the
12229 	 * record in 16B units. Even values indicate 16B
12230 	 * records. Odd values indicate 32B
12231 	 * records.
12232 	 */
12233 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_TYPE_MASK \
12234 		UINT32_C(0x3f)
12235 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_TYPE_SFT \
12236 		0
12237 	/* HWRM Asynchronous Event Information */
12238 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_TYPE_HWRM_ASYNC_EVENT \
12239 		UINT32_C(0x2e)
12240 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_TYPE_LAST \
12241 		HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_TYPE_HWRM_ASYNC_EVENT
12242 	/* Identifiers of events. */
12243 	uint16_t	event_id;
12244 	/*
12245 	 * This async notification message is used to inform the driver
12246 	 * that the programmable pacing threshold for the doorbell FIFO is
12247 	 * reached. The driver will take appropriate action to pace the
12248 	 * doorbells when this async event is received from the firmware.
12249 	 */
12250 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_EVENT_ID_DOORBELL_PACING_THRESHOLD \
12251 		UINT32_C(0x46)
12252 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_EVENT_ID_LAST \
12253 		HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_EVENT_ID_DOORBELL_PACING_THRESHOLD
12254 	/* Event specific data. */
12255 	uint32_t	event_data2;
12256 	uint8_t	opaque_v;
12257 	/*
12258 	 * This value is written by the NIC such that it will be different
12259 	 * for each pass through the completion queue. The even passes
12260 	 * will write 1. The odd passes will write 0.
12261 	 */
12262 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_V \
12263 		UINT32_C(0x1)
12264 	/* opaque is 7 b */
12265 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_OPAQUE_MASK \
12266 		UINT32_C(0xfe)
12267 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_THRESHOLD_OPAQUE_SFT 1
12268 	/* 8-lsb timestamp (100-msec resolution) */
12269 	uint8_t	timestamp_lo;
12270 	/* 16-lsb timestamp (100-msec resolution) */
12271 	uint16_t	timestamp_hi;
12272 	/* Event specific data */
12273 	uint32_t	event_data1;
12274 } __rte_packed_end;
12275 
12276 /* hwrm_async_event_cmpl_rss_change (size:128b/16B) */
12277 struct __rte_packed_begin hwrm_async_event_cmpl_rss_change {
12278 	uint16_t	type;
12279 	/*
12280 	 * This field indicates the exact type of the completion.
12281 	 * By convention, the LSB identifies the length of the
12282 	 * record in 16B units. Even values indicate 16B
12283 	 * records. Odd values indicate 32B
12284 	 * records.
12285 	 */
12286 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_MASK \
12287 		UINT32_C(0x3f)
12288 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_SFT             0
12289 	/* HWRM Asynchronous Event Information */
12290 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_HWRM_ASYNC_EVENT \
12291 		UINT32_C(0x2e)
12292 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_LAST \
12293 		HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_TYPE_HWRM_ASYNC_EVENT
12294 	/* Identifiers of events. */
12295 	uint16_t	event_id;
12296 	/*
12297 	 * This async notification message is used to inform the driver
12298 	 * that the RSS capabilities have changed. The driver will need
12299 	 * to query hwrm_vnic_qcaps.
12300 	 */
12301 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_EVENT_ID_RSS_CHANGE \
12302 		UINT32_C(0x47)
12303 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_EVENT_ID_LAST \
12304 		HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_EVENT_ID_RSS_CHANGE
12305 	/* Event specific data. */
12306 	uint32_t	event_data2;
12307 	uint8_t	opaque_v;
12308 	/*
12309 	 * This value is written by the NIC such that it will be different
12310 	 * for each pass through the completion queue. The even passes
12311 	 * will write 1. The odd passes will write 0.
12312 	 */
12313 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_V          UINT32_C(0x1)
12314 	/* opaque is 7 b */
12315 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
12316 	#define HWRM_ASYNC_EVENT_CMPL_RSS_CHANGE_OPAQUE_SFT 1
12317 	/* 8-lsb timestamp (100-msec resolution) */
12318 	uint8_t	timestamp_lo;
12319 	/* 16-lsb timestamp (100-msec resolution) */
12320 	uint16_t	timestamp_hi;
12321 	/* Event specific data */
12322 	uint32_t	event_data1;
12323 } __rte_packed_end;
12324 
12325 /* hwrm_async_event_cmpl_doorbell_pacing_nq_update (size:128b/16B) */
12326 struct __rte_packed_begin hwrm_async_event_cmpl_doorbell_pacing_nq_update {
12327 	uint16_t	type;
12328 	/*
12329 	 * This field indicates the exact type of the completion.
12330 	 * By convention, the LSB identifies the length of the
12331 	 * record in 16B units. Even values indicate 16B
12332 	 * records. Odd values indicate 32B
12333 	 * records.
12334 	 */
12335 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_MASK \
12336 		UINT32_C(0x3f)
12337 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_SFT \
12338 		0
12339 	/* HWRM Asynchronous Event Information */
12340 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_HWRM_ASYNC_EVENT \
12341 		UINT32_C(0x2e)
12342 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_LAST \
12343 		HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_TYPE_HWRM_ASYNC_EVENT
12344 	/* Identifiers of events. */
12345 	uint16_t	event_id;
12346 	/*
12347 	 * An event from firmware indicating that list of nq ids used for
12348 	 * doorbell pacing DBQ event notification has been updated. The driver
12349 	 * needs to take appropriate action and retrieve the new list when this
12350 	 * event is received from the firmware.
12351 	 */
12352 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_EVENT_ID_DOORBELL_PACING_NQ_UPDATE \
12353 		UINT32_C(0x48)
12354 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_EVENT_ID_LAST \
12355 		HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_EVENT_ID_DOORBELL_PACING_NQ_UPDATE
12356 	/* Event specific data. */
12357 	uint32_t	event_data2;
12358 	uint8_t	opaque_v;
12359 	/*
12360 	 * This value is written by the NIC such that it will be different
12361 	 * for each pass through the completion queue. The even passes
12362 	 * will write 1. The odd passes will write 0.
12363 	 */
12364 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_V \
12365 		UINT32_C(0x1)
12366 	/* opaque is 7 b */
12367 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_OPAQUE_MASK \
12368 		UINT32_C(0xfe)
12369 	#define HWRM_ASYNC_EVENT_CMPL_DOORBELL_PACING_NQ_UPDATE_OPAQUE_SFT 1
12370 	/* 8-lsb timestamp (100-msec resolution) */
12371 	uint8_t	timestamp_lo;
12372 	/* 16-lsb timestamp (100-msec resolution) */
12373 	uint16_t	timestamp_hi;
12374 	/* Event specific data */
12375 	uint32_t	event_data1;
12376 } __rte_packed_end;
12377 
12378 /* hwrm_async_event_cmpl_hw_doorbell_recovery_read_error (size:128b/16B) */
12379 struct __rte_packed_begin hwrm_async_event_cmpl_hw_doorbell_recovery_read_error {
12380 	uint16_t	type;
12381 	/*
12382 	 * This field indicates the exact type of the completion.
12383 	 * By convention, the LSB identifies the length of the
12384 	 * record in 16B units. Even values indicate 16B
12385 	 * records. Odd values indicate 32B
12386 	 * records.
12387 	 */
12388 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_MASK \
12389 		UINT32_C(0x3f)
12390 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_SFT \
12391 		0
12392 	/* HWRM Asynchronous Event Information */
12393 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_HWRM_ASYNC_EVENT \
12394 		UINT32_C(0x2e)
12395 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_LAST \
12396 		HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_TYPE_HWRM_ASYNC_EVENT
12397 	/* Identifiers of events. */
12398 	uint16_t	event_id;
12399 	/*
12400 	 * This async notification message is used to inform the driver
12401 	 * that hardware ran into an error while trying to read the host
12402 	 * based doorbell copy region. The driver will take the appropriate
12403 	 * action to maintain the corresponding functions doorbell copy
12404 	 * region in the correct format.
12405 	 */
12406 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_ID_HW_DOORBELL_RECOVERY_READ_ERROR \
12407 		UINT32_C(0x49)
12408 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_ID_LAST \
12409 		HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_ID_HW_DOORBELL_RECOVERY_READ_ERROR
12410 	/* Event specific data. */
12411 	uint32_t	event_data2;
12412 	uint8_t	opaque_v;
12413 	/*
12414 	 * This value is written by the NIC such that it will be different
12415 	 * for each pass through the completion queue. The even passes
12416 	 * will write 1. The odd passes will write 0.
12417 	 */
12418 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_V \
12419 		UINT32_C(0x1)
12420 	/* opaque is 7 b */
12421 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_OPAQUE_MASK \
12422 		UINT32_C(0xfe)
12423 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_OPAQUE_SFT \
12424 		1
12425 	/* 8-lsb timestamp (100-msec resolution) */
12426 	uint8_t	timestamp_lo;
12427 	/* 16-lsb timestamp (100-msec resolution) */
12428 	uint16_t	timestamp_hi;
12429 	/* Event specific data */
12430 	uint32_t	event_data1;
12431 	/*
12432 	 * Indicates that there is an error while reading the doorbell copy
12433 	 * regions.
12434 	 */
12435 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_MASK \
12436 		UINT32_C(0xf)
12437 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_SFT \
12438 		0
12439 	/*
12440 	 * If set to 1, indicates that there is an error while reading the
12441 	 * SQ doorbell copy region for this function.
12442 	 */
12443 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_SQ_ERR \
12444 		UINT32_C(0x1)
12445 	/*
12446 	 * If set to 1, indicates that there is an error while reading the
12447 	 * RQ doorbell copy region for this function.
12448 	 */
12449 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_RQ_ERR \
12450 		UINT32_C(0x2)
12451 	/*
12452 	 * If set to 1, indicates that there is an error while reading the
12453 	 * SRQ doorbell copy region for this function.
12454 	 */
12455 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_SRQ_ERR \
12456 		UINT32_C(0x4)
12457 	/*
12458 	 * If set to 1, indicates that there is an error while reading the
12459 	 * CQ doorbell copy region for this function.
12460 	 */
12461 	#define HWRM_ASYNC_EVENT_CMPL_HW_DOORBELL_RECOVERY_READ_ERROR_EVENT_DATA1_READ_ERROR_FLAGS_CQ_ERR \
12462 		UINT32_C(0x8)
12463 } __rte_packed_end;
12464 
12465 /* hwrm_async_event_cmpl_ctx_error (size:128b/16B) */
12466 struct __rte_packed_begin hwrm_async_event_cmpl_ctx_error {
12467 	uint16_t	type;
12468 	/*
12469 	 * This field indicates the exact type of the completion.
12470 	 * By convention, the LSB identifies the length of the
12471 	 * record in 16B units. Even values indicate 16B
12472 	 * records. Odd values indicate 32B
12473 	 * records.
12474 	 */
12475 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_TYPE_MASK \
12476 		UINT32_C(0x3f)
12477 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_TYPE_SFT             0
12478 	/* HWRM Asynchronous Event Information */
12479 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_TYPE_HWRM_ASYNC_EVENT \
12480 		UINT32_C(0x2e)
12481 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_TYPE_LAST \
12482 		HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_TYPE_HWRM_ASYNC_EVENT
12483 	/* Identifiers of events. */
12484 	uint16_t	event_id;
12485 	/*
12486 	 * This async notification message is used to inform the PF driver
12487 	 * that firmware fails to allocate/free the contexts requested. This
12488 	 * message is only valid in the XID partition scheme. Given the start
12489 	 * xid and the number of contexts in error, the PF driver will figure
12490 	 * out the corresponding XID partition(s) in error.
12491 	 */
12492 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_ID_CTX_ERROR \
12493 		UINT32_C(0x4a)
12494 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_ID_LAST \
12495 		HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_ID_CTX_ERROR
12496 	/* Event specific data */
12497 	uint32_t	event_data2;
12498 	/* Context operation code */
12499 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_CTX_OP_CODE \
12500 		UINT32_C(0x1)
12501 	/* Context alloc failure */
12502 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_CTX_OP_CODE_ALLOC \
12503 		UINT32_C(0x0)
12504 	/* Context free failure */
12505 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_CTX_OP_CODE_FREE \
12506 		UINT32_C(0x1)
12507 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_CTX_OP_CODE_LAST \
12508 		HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_CTX_OP_CODE_FREE
12509 	/* Number of contexts in error */
12510 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_NUM_CTXS_MASK \
12511 		UINT32_C(0xfffe)
12512 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_NUM_CTXS_SFT     1
12513 	/* Function ID which the XID partitions are associated with */
12514 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_FID_MASK \
12515 		UINT32_C(0xffff0000)
12516 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA2_FID_SFT          16
12517 	uint8_t	opaque_v;
12518 	/*
12519 	 * This value is written by the NIC such that it will be different
12520 	 * for each pass through the completion queue. The even passes
12521 	 * will write 1. The odd passes will write 0.
12522 	 */
12523 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_V          UINT32_C(0x1)
12524 	/* opaque is 7 b */
12525 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_OPAQUE_MASK UINT32_C(0xfe)
12526 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_OPAQUE_SFT 1
12527 	/* 8-lsb timestamp (100-msec resolution) */
12528 	uint8_t	timestamp_lo;
12529 	/* 16-lsb timestamp (100-msec resolution) */
12530 	uint16_t	timestamp_hi;
12531 	/* Event specific data */
12532 	uint32_t	event_data1;
12533 	/* Starting XID that has error */
12534 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA1_START_XID_MASK \
12535 		UINT32_C(0xffffffff)
12536 	#define HWRM_ASYNC_EVENT_CMPL_CTX_ERROR_EVENT_DATA1_START_XID_SFT 0
12537 } __rte_packed_end;
12538 
12539 /* hwrm_async_event_udcc_session_change (size:128b/16B) */
12540 struct __rte_packed_begin hwrm_async_event_udcc_session_change {
12541 	uint16_t	type;
12542 	/*
12543 	 * This field indicates the exact type of the completion.
12544 	 * By convention, the LSB identifies the length of the
12545 	 * record in 16B units. Even values indicate 16B
12546 	 * records. Odd values indicate 32B
12547 	 * records.
12548 	 */
12549 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_TYPE_MASK \
12550 		UINT32_C(0x3f)
12551 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_TYPE_SFT             0
12552 	/* HWRM Asynchronous Event Information */
12553 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_TYPE_HWRM_ASYNC_EVENT \
12554 		UINT32_C(0x2e)
12555 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_TYPE_LAST \
12556 		HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_TYPE_HWRM_ASYNC_EVENT
12557 	/* Identifiers of events. */
12558 	uint16_t	event_id;
12559 	/*
12560 	 * This async notification message is used to inform the PF driver
12561 	 * that firmware has modified a UDCC session.
12562 	 */
12563 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_ID_UDCC_SESSION_CHANGE \
12564 		UINT32_C(0x4b)
12565 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_ID_LAST \
12566 		HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_ID_UDCC_SESSION_CHANGE
12567 	/* Event specific data */
12568 	uint32_t	event_data2;
12569 	/* UDCC Session id operation code */
12570 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_MASK \
12571 		UINT32_C(0xff)
12572 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_SFT \
12573 		0
12574 	/* session_id has been created */
12575 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_CREATED \
12576 		UINT32_C(0x0)
12577 	/* session_id has been freed */
12578 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_FREED \
12579 		UINT32_C(0x1)
12580 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_LAST \
12581 		HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA2_SESSION_ID_OP_CODE_FREED
12582 	uint8_t	opaque_v;
12583 	/*
12584 	 * This value is written by the NIC such that it will be different
12585 	 * for each pass through the completion queue. The even passes
12586 	 * will write 1. The odd passes will write 0.
12587 	 */
12588 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_V          UINT32_C(0x1)
12589 	/* opaque is 7 b */
12590 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_OPAQUE_MASK UINT32_C(0xfe)
12591 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_OPAQUE_SFT 1
12592 	/* 8-lsb timestamp (100-msec resolution) */
12593 	uint8_t	timestamp_lo;
12594 	/* 16-lsb timestamp (100-msec resolution) */
12595 	uint16_t	timestamp_hi;
12596 	/* Event specific data */
12597 	uint32_t	event_data1;
12598 	/* UDCC session id which was modified */
12599 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA1_UDCC_SESSION_ID_MASK \
12600 		UINT32_C(0xffff)
12601 	#define HWRM_ASYNC_EVENT_UDCC_SESSION_CHANGE_EVENT_DATA1_UDCC_SESSION_ID_SFT \
12602 		0
12603 } __rte_packed_end;
12604 
12605 /* hwrm_async_event_cmpl_dbg_buf_producer (size:128b/16B) */
12606 struct __rte_packed_begin hwrm_async_event_cmpl_dbg_buf_producer {
12607 	uint16_t	type;
12608 	/*
12609 	 * This field indicates the exact type of the completion.
12610 	 * By convention, the LSB identifies the length of the
12611 	 * record in 16B units. Even values indicate 16B
12612 	 * records. Odd values indicate 32B
12613 	 * records.
12614 	 */
12615 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_TYPE_MASK \
12616 		UINT32_C(0x3f)
12617 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_TYPE_SFT             0
12618 	/* HWRM Asynchronous Event Information */
12619 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_TYPE_HWRM_ASYNC_EVENT \
12620 		UINT32_C(0x2e)
12621 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_TYPE_LAST \
12622 		HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_TYPE_HWRM_ASYNC_EVENT
12623 	/* Identifiers of events. */
12624 	uint16_t	event_id;
12625 	/*
12626 	 * Used to notify the host that the firmware has DMA-ed additional
12627 	 * debug data to the host buffer. This is effectively a producer index
12628 	 * update. The host driver can utilize this information to determine
12629 	 * how much of its host buffer has been populated by the firmware.
12630 	 */
12631 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_ID_DBG_BUF_PRODUCER \
12632 		UINT32_C(0x4c)
12633 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_ID_LAST \
12634 		HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_ID_DBG_BUF_PRODUCER
12635 	/* Event specific data */
12636 	uint32_t	event_data2;
12637 	/*
12638 	 * Specifies the current host buffer offset. Data up to this offset
12639 	 * has been populated by the firmware. For example, if the firmware
12640 	 * has DMA-ed 8192 bytes to the host buffer, then this field has a
12641 	 * value of 8192. This field rolls over to zero once the firmware
12642 	 * writes the last page of the host buffer
12643 	 */
12644 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA2_CURRENT_BUFFER_OFFSET_MASK \
12645 		UINT32_C(0xffffffff)
12646 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA2_CURRENT_BUFFER_OFFSET_SFT \
12647 		0
12648 	uint8_t	opaque_v;
12649 	/*
12650 	 * This value is written by the NIC such that it will be different
12651 	 * for each pass through the completion queue. The even passes
12652 	 * will write 1. The odd passes will write 0.
12653 	 */
12654 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_V          UINT32_C(0x1)
12655 	/* opaque is 7 b */
12656 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_OPAQUE_MASK \
12657 		UINT32_C(0xfe)
12658 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_OPAQUE_SFT 1
12659 	/* 8-lsb timestamp from POR (100-msec resolution) */
12660 	uint8_t	timestamp_lo;
12661 	/* 16-lsb timestamp from POR (100-msec resolution) */
12662 	uint16_t	timestamp_hi;
12663 	/* Event specific data */
12664 	uint32_t	event_data1;
12665 	/* Type of trace buffer that has been updated. */
12666 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_MASK \
12667 		UINT32_C(0xffff)
12668 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_SFT \
12669 		0
12670 	/* SRT trace. */
12671 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_SRT_TRACE \
12672 		UINT32_C(0x0)
12673 	/* SRT2 trace. */
12674 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_SRT2_TRACE \
12675 		UINT32_C(0x1)
12676 	/* CRT trace. */
12677 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CRT_TRACE \
12678 		UINT32_C(0x2)
12679 	/* CRT2 trace. */
12680 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_CRT2_TRACE \
12681 		UINT32_C(0x3)
12682 	/* RIGP0 trace. */
12683 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_RIGP0_TRACE \
12684 		UINT32_C(0x4)
12685 	/* L2 HWRM trace. */
12686 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_L2_HWRM_TRACE \
12687 		UINT32_C(0x5)
12688 	/* RoCE HWRM trace. */
12689 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_ROCE_HWRM_TRACE \
12690 		UINT32_C(0x6)
12691 	#define HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_LAST \
12692 		HWRM_ASYNC_EVENT_CMPL_DBG_BUF_PRODUCER_EVENT_DATA1_TYPE_ROCE_HWRM_TRACE
12693 } __rte_packed_end;
12694 
12695 /* hwrm_async_event_cmpl_fw_trace_msg (size:128b/16B) */
12696 struct __rte_packed_begin hwrm_async_event_cmpl_fw_trace_msg {
12697 	uint16_t	type;
12698 	/*
12699 	 * This field indicates the exact type of the completion.
12700 	 * By convention, the LSB identifies the length of the
12701 	 * record in 16B units. Even values indicate 16B
12702 	 * records. Odd values indicate 32B
12703 	 * records.
12704 	 */
12705 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TYPE_MASK \
12706 		UINT32_C(0x3f)
12707 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TYPE_SFT             0
12708 	/* HWRM Asynchronous Event Information */
12709 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TYPE_HWRM_ASYNC_EVENT \
12710 		UINT32_C(0x2e)
12711 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TYPE_LAST \
12712 		HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TYPE_HWRM_ASYNC_EVENT
12713 	/* Identifiers of events. */
12714 	uint16_t	event_id;
12715 	/* Firmware trace log message */
12716 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_ID_FW_TRACE_MSG \
12717 		UINT32_C(0xfe)
12718 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_ID_LAST \
12719 		HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_ID_FW_TRACE_MSG
12720 	/* Trace byte 0 to 3 */
12721 	uint32_t	event_data2;
12722 	/* Trace byte0 */
12723 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE0_MASK \
12724 		UINT32_C(0xff)
12725 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE0_SFT 0
12726 	/* Trace byte1 */
12727 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE1_MASK \
12728 		UINT32_C(0xff00)
12729 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE1_SFT 8
12730 	/* Trace byte2 */
12731 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE2_MASK \
12732 		UINT32_C(0xff0000)
12733 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE2_SFT 16
12734 	/* Trace byte3 */
12735 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE3_MASK \
12736 		UINT32_C(0xff000000)
12737 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA2_BYTE3_SFT 24
12738 	uint8_t	opaque_v;
12739 	/*
12740 	 * This value is written by the NIC such that it will be different
12741 	 * for each pass through the completion queue. The even passes
12742 	 * will write 1. The odd passes will write 0.
12743 	 */
12744 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_V          UINT32_C(0x1)
12745 	/* opaque is 7 b */
12746 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_OPAQUE_MASK UINT32_C(0xfe)
12747 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_OPAQUE_SFT 1
12748 	/* Trace flags */
12749 	uint8_t	timestamp_lo;
12750 	/* Indicates if the string is partial or complete. */
12751 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_STRING \
12752 		UINT32_C(0x1)
12753 	/* Complete string */
12754 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_STRING_COMPLETE \
12755 		UINT32_C(0x0)
12756 	/* Partial string */
12757 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_STRING_PARTIAL \
12758 		UINT32_C(0x1)
12759 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_STRING_LAST \
12760 		HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_STRING_PARTIAL
12761 	/* Indicates the firmware that sent the trace message. */
12762 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_FIRMWARE \
12763 		UINT32_C(0x2)
12764 	/* Primary firmware */
12765 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_FIRMWARE_PRIMARY \
12766 		(UINT32_C(0x0) << 1)
12767 	/* Secondary firmware */
12768 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_FIRMWARE_SECONDARY \
12769 		(UINT32_C(0x1) << 1)
12770 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_FIRMWARE_LAST \
12771 		HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_LO_FIRMWARE_SECONDARY
12772 	/* Trace byte 4 to 5 */
12773 	uint16_t	timestamp_hi;
12774 	/* Trace byte4 */
12775 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_HI_BYTE4_MASK \
12776 		UINT32_C(0xff)
12777 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_HI_BYTE4_SFT 0
12778 	/* Trace byte5 */
12779 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_HI_BYTE5_MASK \
12780 		UINT32_C(0xff00)
12781 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_TIMESTAMP_HI_BYTE5_SFT 8
12782 	/* Trace byte 6 to 9 */
12783 	uint32_t	event_data1;
12784 	/* Trace byte6 */
12785 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE6_MASK \
12786 		UINT32_C(0xff)
12787 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE6_SFT 0
12788 	/* Trace byte7 */
12789 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE7_MASK \
12790 		UINT32_C(0xff00)
12791 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE7_SFT 8
12792 	/* Trace byte8 */
12793 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE8_MASK \
12794 		UINT32_C(0xff0000)
12795 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE8_SFT 16
12796 	/* Trace byte9 */
12797 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE9_MASK \
12798 		UINT32_C(0xff000000)
12799 	#define HWRM_ASYNC_EVENT_CMPL_FW_TRACE_MSG_EVENT_DATA1_BYTE9_SFT 24
12800 } __rte_packed_end;
12801 
12802 /* hwrm_async_event_cmpl_hwrm_error (size:128b/16B) */
12803 struct __rte_packed_begin hwrm_async_event_cmpl_hwrm_error {
12804 	uint16_t	type;
12805 	/*
12806 	 * This field indicates the exact type of the completion.
12807 	 * By convention, the LSB identifies the length of the
12808 	 * record in 16B units. Even values indicate 16B
12809 	 * records. Odd values indicate 32B
12810 	 * records.
12811 	 */
12812 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_MASK \
12813 		UINT32_C(0x3f)
12814 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_SFT             0
12815 	/* HWRM Asynchronous Event Information */
12816 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_HWRM_ASYNC_EVENT \
12817 		UINT32_C(0x2e)
12818 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_LAST \
12819 		HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_TYPE_HWRM_ASYNC_EVENT
12820 	/* Identifiers of events. */
12821 	uint16_t	event_id;
12822 	/* HWRM Error */
12823 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_ID_HWRM_ERROR \
12824 		UINT32_C(0xff)
12825 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_ID_LAST \
12826 		HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_ID_HWRM_ERROR
12827 	/* Event specific data */
12828 	uint32_t	event_data2;
12829 	/* Severity of HWRM Error */
12830 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_MASK \
12831 		UINT32_C(0xff)
12832 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_SFT     0
12833 	/* Warning */
12834 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_WARNING \
12835 		UINT32_C(0x0)
12836 	/* Non-fatal Error */
12837 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_NONFATAL \
12838 		UINT32_C(0x1)
12839 	/* Fatal Error */
12840 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_FATAL \
12841 		UINT32_C(0x2)
12842 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_LAST \
12843 		HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA2_SEVERITY_FATAL
12844 	uint8_t	opaque_v;
12845 	/*
12846 	 * This value is written by the NIC such that it will be different
12847 	 * for each pass through the completion queue. The even passes
12848 	 * will write 1. The odd passes will write 0.
12849 	 */
12850 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_V          UINT32_C(0x1)
12851 	/* opaque is 7 b */
12852 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_OPAQUE_MASK UINT32_C(0xfe)
12853 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_OPAQUE_SFT 1
12854 	/* 8-lsb timestamp from POR (100-msec resolution) */
12855 	uint8_t	timestamp_lo;
12856 	/* 16-lsb timestamp from POR (100-msec resolution) */
12857 	uint16_t	timestamp_hi;
12858 	/* Event specific data */
12859 	uint32_t	event_data1;
12860 	/* Time stamp for error event */
12861 	#define HWRM_ASYNC_EVENT_CMPL_HWRM_ERROR_EVENT_DATA1_TIMESTAMP \
12862 		UINT32_C(0x1)
12863 } __rte_packed_end;
12864 
12865 /* hwrm_async_event_cmpl_error_report_base (size:128b/16B) */
12866 struct __rte_packed_begin hwrm_async_event_cmpl_error_report_base {
12867 	uint16_t	type;
12868 	/*
12869 	 * This field indicates the exact type of the completion.
12870 	 * By convention, the LSB identifies the length of the
12871 	 * record in 16B units. Even values indicate 16B
12872 	 * records. Odd values indicate 32B
12873 	 * records.
12874 	 */
12875 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_TYPE_MASK \
12876 		UINT32_C(0x3f)
12877 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_TYPE_SFT             0
12878 	/* HWRM Asynchronous Event Information */
12879 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_TYPE_HWRM_ASYNC_EVENT \
12880 		UINT32_C(0x2e)
12881 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_TYPE_LAST \
12882 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_TYPE_HWRM_ASYNC_EVENT
12883 	/* Identifiers of events. */
12884 	uint16_t	event_id;
12885 	/*
12886 	 * This async notification message is used to inform
12887 	 * the driver that an error has occurred which may need
12888 	 * the attention of the administrator.
12889 	 */
12890 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_ID_ERROR_REPORT \
12891 		UINT32_C(0x45)
12892 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_ID_LAST \
12893 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_ID_ERROR_REPORT
12894 	/* Event specific data. */
12895 	uint32_t	event_data2;
12896 	uint8_t	opaque_v;
12897 	/*
12898 	 * This value is written by the NIC such that it will be different
12899 	 * for each pass through the completion queue. The even passes
12900 	 * will write 1. The odd passes will write 0.
12901 	 */
12902 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_V \
12903 		UINT32_C(0x1)
12904 	/* opaque is 7 b */
12905 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_OPAQUE_MASK \
12906 		UINT32_C(0xfe)
12907 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_OPAQUE_SFT 1
12908 	/* 8-lsb timestamp (100-msec resolution) */
12909 	uint8_t	timestamp_lo;
12910 	/* 16-lsb timestamp (100-msec resolution) */
12911 	uint16_t	timestamp_hi;
12912 	/* Event specific data */
12913 	uint32_t	event_data1;
12914 	/* Indicates the type of error being reported. */
12915 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_MASK \
12916 		UINT32_C(0xff)
12917 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_SFT \
12918 		0
12919 	/* Reserved */
12920 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_RESERVED \
12921 		UINT32_C(0x0)
12922 	/*
12923 	 * The NIC was subjected to an extended pause storm which caused it
12924 	 * to disable flow control in order to avoid stalling the Tx path.
12925 	 */
12926 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_PAUSE_STORM \
12927 		UINT32_C(0x1)
12928 	/*
12929 	 * The NIC received an interrupt storm on a TSIO pin being used as
12930 	 * PPS_IN which caused it to disable the interrupt. The signal
12931 	 * should be fixed to be a proper 1 PPS signal before re-enabling
12932 	 * it. The pin number on which this signal was received is stored
12933 	 * in event_data2 as pin_id.
12934 	 */
12935 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_INVALID_SIGNAL \
12936 		UINT32_C(0x2)
12937 	/*
12938 	 * There was a low level error with an NVM write or erase.
12939 	 * See nvm_err_type for more details.
12940 	 */
12941 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_NVM \
12942 		UINT32_C(0x3)
12943 	/*
12944 	 * This indicates doorbell drop threshold was hit. When this
12945 	 * threshold is crossed, it indicates one or more doorbells for
12946 	 * the function were dropped by hardware.
12947 	 */
12948 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DOORBELL_DROP_THRESHOLD \
12949 		UINT32_C(0x4)
12950 	/*
12951 	 * Indicates the NIC's temperature has crossed one of the thermal
12952 	 * thresholds.
12953 	 */
12954 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_THERMAL_THRESHOLD \
12955 		UINT32_C(0x5)
12956 	/*
12957 	 * Speed change not supported with dual rate transceivers
12958 	 * on this board.
12959 	 */
12960 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED \
12961 		UINT32_C(0x6)
12962 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_LAST \
12963 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED
12964 } __rte_packed_end;
12965 
12966 /* hwrm_async_event_cmpl_error_report_pause_storm (size:128b/16B) */
12967 struct __rte_packed_begin hwrm_async_event_cmpl_error_report_pause_storm {
12968 	uint16_t	type;
12969 	/*
12970 	 * This field indicates the exact type of the completion.
12971 	 * By convention, the LSB identifies the length of the
12972 	 * record in 16B units. Even values indicate 16B
12973 	 * records. Odd values indicate 32B
12974 	 * records.
12975 	 */
12976 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_TYPE_MASK \
12977 		UINT32_C(0x3f)
12978 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_TYPE_SFT \
12979 		0
12980 	/* HWRM Asynchronous Event Information */
12981 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_TYPE_HWRM_ASYNC_EVENT \
12982 		UINT32_C(0x2e)
12983 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_TYPE_LAST \
12984 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_TYPE_HWRM_ASYNC_EVENT
12985 	/* Identifiers of events. */
12986 	uint16_t	event_id;
12987 	/*
12988 	 * This async notification message is used to inform
12989 	 * the driver that an error has occurred which may need
12990 	 * the attention of the administrator.
12991 	 */
12992 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_ID_ERROR_REPORT \
12993 		UINT32_C(0x45)
12994 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_ID_LAST \
12995 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_ID_ERROR_REPORT
12996 	/* Event specific data. */
12997 	uint32_t	event_data2;
12998 	uint8_t	opaque_v;
12999 	/*
13000 	 * This value is written by the NIC such that it will be different
13001 	 * for each pass through the completion queue. The even passes
13002 	 * will write 1. The odd passes will write 0.
13003 	 */
13004 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_V \
13005 		UINT32_C(0x1)
13006 	/* opaque is 7 b */
13007 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_OPAQUE_MASK \
13008 		UINT32_C(0xfe)
13009 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_OPAQUE_SFT 1
13010 	/* 8-lsb timestamp (100-msec resolution) */
13011 	uint8_t	timestamp_lo;
13012 	/* 16-lsb timestamp (100-msec resolution) */
13013 	uint16_t	timestamp_hi;
13014 	/* Event specific data */
13015 	uint32_t	event_data1;
13016 	/* Indicates the type of error being reported. */
13017 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_DATA1_ERROR_TYPE_MASK \
13018 		UINT32_C(0xff)
13019 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_DATA1_ERROR_TYPE_SFT \
13020 		0
13021 	/*
13022 	 * The NIC was subjected to an extended pause storm which caused it
13023 	 * to disable flow control in order to avoid stalling the Tx path.
13024 	 */
13025 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_DATA1_ERROR_TYPE_PAUSE_STORM \
13026 		UINT32_C(0x1)
13027 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_DATA1_ERROR_TYPE_LAST \
13028 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_PAUSE_STORM_EVENT_DATA1_ERROR_TYPE_PAUSE_STORM
13029 } __rte_packed_end;
13030 
13031 /* hwrm_async_event_cmpl_error_report_invalid_signal (size:128b/16B) */
13032 struct __rte_packed_begin hwrm_async_event_cmpl_error_report_invalid_signal {
13033 	uint16_t	type;
13034 	/*
13035 	 * This field indicates the exact type of the completion.
13036 	 * By convention, the LSB identifies the length of the
13037 	 * record in 16B units. Even values indicate 16B
13038 	 * records. Odd values indicate 32B
13039 	 * records.
13040 	 */
13041 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_TYPE_MASK \
13042 		UINT32_C(0x3f)
13043 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_TYPE_SFT \
13044 		0
13045 	/* HWRM Asynchronous Event Information */
13046 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_TYPE_HWRM_ASYNC_EVENT \
13047 		UINT32_C(0x2e)
13048 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_TYPE_LAST \
13049 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_TYPE_HWRM_ASYNC_EVENT
13050 	/* Identifiers of events. */
13051 	uint16_t	event_id;
13052 	/*
13053 	 * This async notification message is used to inform
13054 	 * the driver that an error has occurred which may need
13055 	 * the attention of the administrator.
13056 	 */
13057 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_ID_ERROR_REPORT \
13058 		UINT32_C(0x45)
13059 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_ID_LAST \
13060 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_ID_ERROR_REPORT
13061 	/* Event specific data. */
13062 	uint32_t	event_data2;
13063 	/* Indicates the TSIO pin on which invalid signal is detected. */
13064 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA2_PIN_ID_MASK \
13065 		UINT32_C(0xff)
13066 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA2_PIN_ID_SFT \
13067 		0
13068 	uint8_t	opaque_v;
13069 	/*
13070 	 * This value is written by the NIC such that it will be different
13071 	 * for each pass through the completion queue. The even passes
13072 	 * will write 1. The odd passes will write 0.
13073 	 */
13074 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_V \
13075 		UINT32_C(0x1)
13076 	/* opaque is 7 b */
13077 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_OPAQUE_MASK \
13078 		UINT32_C(0xfe)
13079 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_OPAQUE_SFT 1
13080 	/* 8-lsb timestamp (100-msec resolution) */
13081 	uint8_t	timestamp_lo;
13082 	/* 16-lsb timestamp (100-msec resolution) */
13083 	uint16_t	timestamp_hi;
13084 	/* Event specific data */
13085 	uint32_t	event_data1;
13086 	/* Indicates the type of error being reported. */
13087 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA1_ERROR_TYPE_MASK \
13088 		UINT32_C(0xff)
13089 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA1_ERROR_TYPE_SFT \
13090 		0
13091 	/*
13092 	 * The NIC received an interrupt storm on a TSIO pin being used as
13093 	 * PPS_IN which caused it to disable the interrupt. The signal
13094 	 * should be fixed to be a proper 1 PPS signal before re-enabling
13095 	 * it. The pin number on which this signal was received is stored
13096 	 * in event_data2 as pin_id.
13097 	 */
13098 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA1_ERROR_TYPE_INVALID_SIGNAL \
13099 		UINT32_C(0x2)
13100 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA1_ERROR_TYPE_LAST \
13101 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_INVALID_SIGNAL_EVENT_DATA1_ERROR_TYPE_INVALID_SIGNAL
13102 } __rte_packed_end;
13103 
13104 /* hwrm_async_event_cmpl_error_report_nvm (size:128b/16B) */
13105 struct __rte_packed_begin hwrm_async_event_cmpl_error_report_nvm {
13106 	uint16_t	type;
13107 	/*
13108 	 * This field indicates the exact type of the completion.
13109 	 * By convention, the LSB identifies the length of the
13110 	 * record in 16B units. Even values indicate 16B
13111 	 * records. Odd values indicate 32B
13112 	 * records.
13113 	 */
13114 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_TYPE_MASK \
13115 		UINT32_C(0x3f)
13116 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_TYPE_SFT             0
13117 	/* HWRM Asynchronous Event Information */
13118 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_TYPE_HWRM_ASYNC_EVENT \
13119 		UINT32_C(0x2e)
13120 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_TYPE_LAST \
13121 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_TYPE_HWRM_ASYNC_EVENT
13122 	/* Identifiers of events. */
13123 	uint16_t	event_id;
13124 	/*
13125 	 * This async notification message is used to inform
13126 	 * the driver that an error has occurred which may need
13127 	 * the attention of the administrator.
13128 	 */
13129 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_ID_ERROR_REPORT \
13130 		UINT32_C(0x45)
13131 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_ID_LAST \
13132 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_ID_ERROR_REPORT
13133 	/* Event specific data. */
13134 	uint32_t	event_data2;
13135 	/* Indicates the address where error was detected */
13136 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA2_ERR_ADDR_MASK \
13137 		UINT32_C(0xffffffff)
13138 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA2_ERR_ADDR_SFT \
13139 		0
13140 	uint8_t	opaque_v;
13141 	/*
13142 	 * This value is written by the NIC such that it will be different
13143 	 * for each pass through the completion queue. The even passes
13144 	 * will write 1. The odd passes will write 0.
13145 	 */
13146 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_V          UINT32_C(0x1)
13147 	/* opaque is 7 b */
13148 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_OPAQUE_MASK \
13149 		UINT32_C(0xfe)
13150 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_OPAQUE_SFT 1
13151 	/* 8-lsb timestamp (100-msec resolution) */
13152 	uint8_t	timestamp_lo;
13153 	/* 16-lsb timestamp (100-msec resolution) */
13154 	uint16_t	timestamp_hi;
13155 	/* Event specific data */
13156 	uint32_t	event_data1;
13157 	/* Indicates the type of error being reported. */
13158 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_ERROR_TYPE_MASK \
13159 		UINT32_C(0xff)
13160 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_ERROR_TYPE_SFT \
13161 		0
13162 	/*
13163 	 * There was a low level error with an NVM operation.
13164 	 * See nvm_err_type for more details.
13165 	 */
13166 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_ERROR_TYPE_NVM_ERROR \
13167 		UINT32_C(0x3)
13168 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_ERROR_TYPE_LAST \
13169 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_ERROR_TYPE_NVM_ERROR
13170 	/* The specific type of NVM error */
13171 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_MASK \
13172 		UINT32_C(0xff00)
13173 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_SFT \
13174 		8
13175 	/*
13176 	 * There was a low level error with an NVM write operation.
13177 	 * Verification of written data did not match.
13178 	 * event_data2 will be the failing address.
13179 	 */
13180 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_WRITE \
13181 		(UINT32_C(0x1) << 8)
13182 	/*
13183 	 * There was a low level error with an NVM erase operation.
13184 	 * All the bits were not erased.
13185 	 * event_data2 will be the failing address.
13186 	 */
13187 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_ERASE \
13188 		(UINT32_C(0x2) << 8)
13189 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_LAST \
13190 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_NVM_EVENT_DATA1_NVM_ERR_TYPE_ERASE
13191 } __rte_packed_end;
13192 
13193 /* hwrm_async_event_cmpl_error_report_doorbell_drop_threshold (size:128b/16B) */
13194 struct __rte_packed_begin hwrm_async_event_cmpl_error_report_doorbell_drop_threshold {
13195 	uint16_t	type;
13196 	/*
13197 	 * This field indicates the exact type of the completion.
13198 	 * By convention, the LSB identifies the length of the
13199 	 * record in 16B units. Even values indicate 16B
13200 	 * records. Odd values indicate 32B
13201 	 * records.
13202 	 */
13203 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_TYPE_MASK \
13204 		UINT32_C(0x3f)
13205 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_TYPE_SFT \
13206 		0
13207 	/* HWRM Asynchronous Event Information */
13208 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_TYPE_HWRM_ASYNC_EVENT \
13209 		UINT32_C(0x2e)
13210 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_TYPE_LAST \
13211 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_TYPE_HWRM_ASYNC_EVENT
13212 	/* Identifiers of events. */
13213 	uint16_t	event_id;
13214 	/*
13215 	 * This async notification message is used to inform
13216 	 * the driver that an error has occurred which may need
13217 	 * the attention of the administrator.
13218 	 */
13219 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_ID_ERROR_REPORT \
13220 		UINT32_C(0x45)
13221 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_ID_LAST \
13222 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_ID_ERROR_REPORT
13223 	/* Event specific data. */
13224 	uint32_t	event_data2;
13225 	uint8_t	opaque_v;
13226 	/*
13227 	 * This value is written by the NIC such that it will be different
13228 	 * for each pass through the completion queue. The even passes
13229 	 * will write 1. The odd passes will write 0.
13230 	 */
13231 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_V \
13232 		UINT32_C(0x1)
13233 	/* opaque is 7 b */
13234 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_OPAQUE_MASK \
13235 		UINT32_C(0xfe)
13236 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_OPAQUE_SFT \
13237 		1
13238 	/* 8-lsb timestamp (100-msec resolution) */
13239 	uint8_t	timestamp_lo;
13240 	/* 16-lsb timestamp (100-msec resolution) */
13241 	uint16_t	timestamp_hi;
13242 	/* Event specific data */
13243 	uint32_t	event_data1;
13244 	/* Indicates the type of error being reported. */
13245 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_MASK \
13246 		UINT32_C(0xff)
13247 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_SFT \
13248 		0
13249 	/*
13250 	 * This indicates doorbell drop threshold was hit. When this
13251 	 * threshold is crossed, it indicates one or more doorbells for
13252 	 * the function were dropped by hardware.
13253 	 */
13254 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_DOORBELL_DROP_THRESHOLD \
13255 		UINT32_C(0x4)
13256 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_LAST \
13257 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_ERROR_TYPE_DOORBELL_DROP_THRESHOLD
13258 	/*
13259 	 * The epoch value to be sent from firmware to the driver to track
13260 	 * a doorbell recovery cycle.
13261 	 */
13262 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_EPOCH_MASK \
13263 		UINT32_C(0xffffff00)
13264 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DOORBELL_DROP_THRESHOLD_EVENT_DATA1_EPOCH_SFT \
13265 		8
13266 } __rte_packed_end;
13267 
13268 /* hwrm_async_event_cmpl_error_report_thermal (size:128b/16B) */
13269 struct __rte_packed_begin hwrm_async_event_cmpl_error_report_thermal {
13270 	uint16_t	type;
13271 	/*
13272 	 * This field indicates the exact type of the completion.
13273 	 * By convention, the LSB identifies the length of the
13274 	 * record in 16B units. Even values indicate 16B
13275 	 * records. Odd values indicate 32B
13276 	 * records.
13277 	 */
13278 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_TYPE_MASK \
13279 		UINT32_C(0x3f)
13280 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_TYPE_SFT \
13281 		0
13282 	/* HWRM Asynchronous Event Information */
13283 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_TYPE_HWRM_ASYNC_EVENT \
13284 		UINT32_C(0x2e)
13285 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_TYPE_LAST \
13286 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_TYPE_HWRM_ASYNC_EVENT
13287 	/* Identifiers of events. */
13288 	uint16_t	event_id;
13289 	/*
13290 	 * This async notification message is used to inform
13291 	 * the driver that an error has occurred which may need
13292 	 * the attention of the administrator.
13293 	 */
13294 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_ID_ERROR_REPORT \
13295 		UINT32_C(0x45)
13296 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_ID_LAST \
13297 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_ID_ERROR_REPORT
13298 	/* Event specific data. */
13299 	uint32_t	event_data2;
13300 	/* Current temperature. In Celsius */
13301 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA2_CURRENT_TEMP_MASK \
13302 		UINT32_C(0xff)
13303 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA2_CURRENT_TEMP_SFT \
13304 		0
13305 	/*
13306 	 * The temperature setting of the threshold that was just crossed.
13307 	 * In Celsius
13308 	 */
13309 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA2_THRESHOLD_TEMP_MASK \
13310 		UINT32_C(0xff00)
13311 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA2_THRESHOLD_TEMP_SFT \
13312 		8
13313 	uint8_t	opaque_v;
13314 	/*
13315 	 * This value is written by the NIC such that it will be different
13316 	 * for each pass through the completion queue. The even passes
13317 	 * will write 1. The odd passes will write 0.
13318 	 */
13319 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_V \
13320 		UINT32_C(0x1)
13321 	/* opaque is 7 b */
13322 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_OPAQUE_MASK \
13323 		UINT32_C(0xfe)
13324 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_OPAQUE_SFT 1
13325 	/* 8-lsb timestamp (100-msec resolution) */
13326 	uint8_t	timestamp_lo;
13327 	/* 16-lsb timestamp (100-msec resolution) */
13328 	uint16_t	timestamp_hi;
13329 	/* Event specific data */
13330 	uint32_t	event_data1;
13331 	/* Indicates the type of error being reported. */
13332 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_ERROR_TYPE_MASK \
13333 		UINT32_C(0xff)
13334 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_ERROR_TYPE_SFT \
13335 		0
13336 	/*
13337 	 * There was thermal event. The type will be specified in the
13338 	 * field threshold_type. event_data2 will contain the current
13339 	 * temperature and the configured value for the threshold that
13340 	 * was just crossed. The threshold values are lower thresholds,
13341 	 * so the event will trigger with an active flag when the
13342 	 * temperature is on an increasing trajectory.
13343 	 */
13344 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_ERROR_TYPE_THERMAL_EVENT \
13345 		UINT32_C(0x5)
13346 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_ERROR_TYPE_LAST \
13347 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_ERROR_TYPE_THERMAL_EVENT
13348 	/* The specific type of thermal threshold error */
13349 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_MASK \
13350 		UINT32_C(0x700)
13351 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_SFT \
13352 		8
13353 	/* Warning thermal threshold was crossed */
13354 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_WARN \
13355 		(UINT32_C(0x0) << 8)
13356 	/* Critical thermal threshold was crossed */
13357 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_CRITICAL \
13358 		(UINT32_C(0x1) << 8)
13359 	/* Fatal thermal threshold was crossed */
13360 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_FATAL \
13361 		(UINT32_C(0x2) << 8)
13362 	/*
13363 	 * Thermal shutdown threshold was crossed and a shutdown is
13364 	 * imminent. This event will not occur if self shutdown
13365 	 * is disabled.
13366 	 */
13367 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_SHUTDOWN \
13368 		(UINT32_C(0x3) << 8)
13369 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_LAST \
13370 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_THRESHOLD_TYPE_SHUTDOWN
13371 	/*
13372 	 * Indicates if the thermal crossing occurs while the temperature is
13373 	 * increasing or decreasing.
13374 	 */
13375 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_TRANSITION_DIR \
13376 		UINT32_C(0x800)
13377 	/* Threshold is crossed while the temperature is falling. */
13378 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_TRANSITION_DIR_DECREASING \
13379 		(UINT32_C(0x0) << 11)
13380 	/* Threshold is crossed while the temperature is rising. */
13381 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_TRANSITION_DIR_INCREASING \
13382 		(UINT32_C(0x1) << 11)
13383 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_TRANSITION_DIR_LAST \
13384 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_THERMAL_EVENT_DATA1_TRANSITION_DIR_INCREASING
13385 } __rte_packed_end;
13386 
13387 /* hwrm_async_event_cmpl_error_report_dual_data_rate_not_supported (size:128b/16B) */
13388 struct __rte_packed_begin hwrm_async_event_cmpl_error_report_dual_data_rate_not_supported {
13389 	uint16_t	type;
13390 	/*
13391 	 * This field indicates the exact type of the completion.
13392 	 * By convention, the LSB identifies the length of the
13393 	 * record in 16B units. Even values indicate 16B
13394 	 * records. Odd values indicate 32B
13395 	 * records.
13396 	 */
13397 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_TYPE_MASK \
13398 		UINT32_C(0x3f)
13399 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_TYPE_SFT \
13400 		0
13401 	/* HWRM Asynchronous Event Information */
13402 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_TYPE_HWRM_ASYNC_EVENT \
13403 		UINT32_C(0x2e)
13404 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_TYPE_LAST \
13405 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_TYPE_HWRM_ASYNC_EVENT
13406 	/* Identifiers of events. */
13407 	uint16_t	event_id;
13408 	/*
13409 	 * This async notification message is used to inform
13410 	 * the driver that an error has occurred which may need
13411 	 * the attention of the administrator.
13412 	 */
13413 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_ID_ERROR_REPORT \
13414 		UINT32_C(0x45)
13415 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_ID_LAST \
13416 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_ID_ERROR_REPORT
13417 	/* Event specific data. */
13418 	uint32_t	event_data2;
13419 	uint8_t	opaque_v;
13420 	/*
13421 	 * This value is written by the NIC such that it will be different
13422 	 * for each pass through the completion queue. The even passes
13423 	 * will write 1. The odd passes will write 0.
13424 	 */
13425 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_V \
13426 		UINT32_C(0x1)
13427 	/* opaque is 7 b */
13428 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_OPAQUE_MASK \
13429 		UINT32_C(0xfe)
13430 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_OPAQUE_SFT \
13431 		1
13432 	/* 8-lsb timestamp (100-msec resolution) */
13433 	uint8_t	timestamp_lo;
13434 	/* 16-lsb timestamp (100-msec resolution) */
13435 	uint16_t	timestamp_hi;
13436 	/* Event specific data */
13437 	uint32_t	event_data1;
13438 	/* Indicates the type of error being reported. */
13439 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_MASK \
13440 		UINT32_C(0xff)
13441 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_SFT \
13442 		0
13443 	/*
13444 	 * Speed change not supported with dual rate transceivers
13445 	 * on this board.
13446 	 */
13447 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED \
13448 		UINT32_C(0x6)
13449 	#define HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_LAST \
13450 		HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_DUAL_DATA_RATE_NOT_SUPPORTED_EVENT_DATA1_ERROR_TYPE_DUAL_DATA_RATE_NOT_SUPPORTED
13451 } __rte_packed_end;
13452 
13453 /* metadata_base_msg (size:64b/8B) */
13454 struct __rte_packed_begin metadata_base_msg {
13455 	uint16_t	md_type_link;
13456 	/* This field classifies the data present in the meta-data. */
13457 	#define METADATA_BASE_MSG_MD_TYPE_MASK      UINT32_C(0x1f)
13458 	#define METADATA_BASE_MSG_MD_TYPE_SFT       0
13459 	/* Meta data fields are not valid */
13460 	#define METADATA_BASE_MSG_MD_TYPE_NONE        UINT32_C(0x0)
13461 	/*
13462 	 * This setting is used when packets are coming in-order. Depending on
13463 	 * the state of the receive context, the meta-data will carry
13464 	 * different information.
13465 	 */
13466 	#define METADATA_BASE_MSG_MD_TYPE_TLS_INSYNC  UINT32_C(0x1)
13467 	/*
13468 	 * With this setting HW passes the TCP sequence number of the TLS
13469 	 * record that it is requesting a resync on in the meta data.
13470 	 */
13471 	#define METADATA_BASE_MSG_MD_TYPE_TLS_RESYNC  UINT32_C(0x2)
13472 	/* This setting is used for QUIC packets. */
13473 	#define METADATA_BASE_MSG_MD_TYPE_QUIC        UINT32_C(0x3)
13474 	/*
13475 	 * This setting is used for crypto packets with an unsupported
13476 	 * protocol.
13477 	 */
13478 	#define METADATA_BASE_MSG_MD_TYPE_ILLEGAL     UINT32_C(0x1f)
13479 	#define METADATA_BASE_MSG_MD_TYPE_LAST \
13480 		METADATA_BASE_MSG_MD_TYPE_ILLEGAL
13481 	/*
13482 	 * This field indicates where the next metadata block starts, relative
13483 	 * to the current metadata block. It is the offset to the next metadata
13484 	 * header, counted in 16B units. A value of zero indicates that there is
13485 	 * no additional metadata, and that the current metadata block is the
13486 	 * last one.
13487 	 */
13488 	#define METADATA_BASE_MSG_LINK_MASK         UINT32_C(0x1e0)
13489 	#define METADATA_BASE_MSG_LINK_SFT          5
13490 	uint16_t	unused0;
13491 	uint32_t	unused1;
13492 } __rte_packed_end;
13493 
13494 /* tls_metadata_base_msg (size:64b/8B) */
13495 struct __rte_packed_begin tls_metadata_base_msg {
13496 	uint32_t	md_type_link_flags_kid_lo;
13497 	/* This field classifies the data present in the meta-data. */
13498 	#define TLS_METADATA_BASE_MSG_MD_TYPE_MASK \
13499 		UINT32_C(0x1f)
13500 	#define TLS_METADATA_BASE_MSG_MD_TYPE_SFT \
13501 		0
13502 	/*
13503 	 * This setting is used when packets are coming in-order. Depending
13504 	 * on the state of the receive context, the meta-data will carry
13505 	 * different information.
13506 	 */
13507 	#define TLS_METADATA_BASE_MSG_MD_TYPE_TLS_INSYNC \
13508 		UINT32_C(0x1)
13509 	/*
13510 	 * With this setting HW passes the TCP sequence number of the TLS
13511 	 * record that it is requesting a resync on in the meta data.
13512 	 */
13513 	#define TLS_METADATA_BASE_MSG_MD_TYPE_TLS_RESYNC \
13514 		UINT32_C(0x2)
13515 	#define TLS_METADATA_BASE_MSG_MD_TYPE_LAST \
13516 		TLS_METADATA_BASE_MSG_MD_TYPE_TLS_RESYNC
13517 	/*
13518 	 * This field indicates where the next metadata block starts. It is
13519 	 * counted in 16B units. A value of zero indicates that there is no
13520 	 * metadata.
13521 	 */
13522 	#define TLS_METADATA_BASE_MSG_LINK_MASK \
13523 		UINT32_C(0x1e0)
13524 	#define TLS_METADATA_BASE_MSG_LINK_SFT \
13525 		5
13526 	/* These are flags present in the metadata. */
13527 	#define TLS_METADATA_BASE_MSG_FLAGS_MASK \
13528 		UINT32_C(0x1fffe00)
13529 	#define TLS_METADATA_BASE_MSG_FLAGS_SFT \
13530 		9
13531 	/*
13532 	 * A value of 1 implies that the packet was decrypted by HW. Otherwise
13533 	 * the packet is passed on as it came in on the wire.
13534 	 */
13535 	#define TLS_METADATA_BASE_MSG_FLAGS_DECRYPTED \
13536 		UINT32_C(0x200)
13537 	/*
13538 	 * This field indicates the state of the ghash field passed in the
13539 	 * meta-data.
13540 	 */
13541 	#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_MASK \
13542 		UINT32_C(0xc00)
13543 	#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_SFT \
13544 		10
13545 	/*
13546 	 * This enumeration states that the ghash is not valid in the
13547 	 * meta-data.
13548 	 */
13549 	#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_NOT_VALID \
13550 		(UINT32_C(0x0) << 10)
13551 	/*
13552 	 * This enumeration indicates that this pkt contains the record's
13553 	 * tag and this pkt was received ooo, the partial_ghash field
13554 	 * contains the ghash.
13555 	 */
13556 	#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_CUR_REC \
13557 		(UINT32_C(0x1) << 10)
13558 	/*
13559 	 * This enumeration indicates that the current record's tag wasn't
13560 	 * seen and the chip is moving on to the next record, the
13561 	 * partial_ghash field contains the ghash.
13562 	 */
13563 	#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_PRIOR_REC \
13564 		(UINT32_C(0x2) << 10)
13565 	#define TLS_METADATA_BASE_MSG_FLAGS_GHASH_LAST \
13566 		TLS_METADATA_BASE_MSG_FLAGS_GHASH_PRIOR_REC
13567 	/* This field indicates the status of tag authentication. */
13568 	#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_MASK \
13569 		UINT32_C(0x3000)
13570 	#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_SFT \
13571 		12
13572 	/*
13573 	 * This enumeration is set when HW was not able to authenticate a
13574 	 * TAG.
13575 	 */
13576 	#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED \
13577 		(UINT32_C(0x0) << 12)
13578 	/*
13579 	 * This enumeration states that there is at least one tag in the
13580 	 * packet and every tag is valid.
13581 	 */
13582 	#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_SUCCESS \
13583 		(UINT32_C(0x1) << 12)
13584 	/*
13585 	 * This enumeration states that there is at least one tag in the
13586 	 * packet and at least one of the tag is invalid. The entire packet
13587 	 * is sent decrypted to the host.
13588 	 */
13589 	#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_FAILURE \
13590 		(UINT32_C(0x2) << 12)
13591 	#define TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_LAST \
13592 		TLS_METADATA_BASE_MSG_FLAGS_TAG_AUTH_STATUS_FAILURE
13593 	/*
13594 	 * A value of 1 indicates that this packet contains a record that
13595 	 * starts in the packet and extends beyond the packet.
13596 	 */
13597 	#define TLS_METADATA_BASE_MSG_FLAGS_HEADER_FLDS_VALID \
13598 		UINT32_C(0x4000)
13599 	/*
13600 	 * A value of 1 indicates that the packet experienced a context load
13601 	 * error. In this case, the packet is sent to the host without the
13602 	 * header or payload decrypted and the context is not updated.
13603 	 */
13604 	#define TLS_METADATA_BASE_MSG_FLAGS_CTX_LOAD_ERR \
13605 		UINT32_C(0x8000)
13606 	/* This field indicates the packet operation state. */
13607 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_MASK \
13608 		UINT32_C(0x70000)
13609 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_SFT \
13610 		16
13611 	/* Packet is in order. */
13612 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_IN_ORDER \
13613 		(UINT32_C(0x0) << 16)
13614 	/* Packet is out of order, no header loss. */
13615 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_OUT_OF_ORDER \
13616 		(UINT32_C(0x1) << 16)
13617 	/* Packet is header search (out of order with header loss). */
13618 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_HEADER_SEARCH \
13619 		(UINT32_C(0x2) << 16)
13620 	/* Packet is resync (resync record ongoing). */
13621 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC \
13622 		(UINT32_C(0x3) << 16)
13623 	/*
13624 	 * Packet is resync wait (resync record completes, waiting for
13625 	 * result).
13626 	 */
13627 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT \
13628 		(UINT32_C(0x4) << 16)
13629 	/*
13630 	 * Packet is resync wait for partial tag (waiting for resync record
13631 	 * tag).
13632 	 */
13633 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT_PARTIAL \
13634 		(UINT32_C(0x5) << 16)
13635 	/* Packet is resync success (got resync record success). */
13636 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS \
13637 		(UINT32_C(0x6) << 16)
13638 	/*
13639 	 * Packet is resync success wait (got midpath ACK, waiting for
13640 	 * resync record success).
13641 	 */
13642 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT \
13643 		(UINT32_C(0x7) << 16)
13644 	#define TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_LAST \
13645 		TLS_METADATA_BASE_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT
13646 	/*
13647 	 * This value indicates the lower 7-bit of the Crypto Key ID
13648 	 * associated with this operation.
13649 	 */
13650 	#define TLS_METADATA_BASE_MSG_KID_LO_MASK \
13651 		UINT32_C(0xfe000000)
13652 	#define TLS_METADATA_BASE_MSG_KID_LO_SFT \
13653 		25
13654 	uint16_t	kid_hi;
13655 	/*
13656 	 * This value indicates the upper 13-bit of the Crypto Key ID
13657 	 * associated with this operation.
13658 	 */
13659 	#define TLS_METADATA_BASE_MSG_KID_HI_MASK UINT32_C(0x1fff)
13660 	#define TLS_METADATA_BASE_MSG_KID_HI_SFT 0
13661 	uint16_t	unused0;
13662 } __rte_packed_end;
13663 
13664 /* tls_metadata_insync_msg (size:192b/24B) */
13665 struct __rte_packed_begin tls_metadata_insync_msg {
13666 	uint32_t	md_type_link_flags_kid_lo;
13667 	/* This field classifies the data present in the meta-data. */
13668 	#define TLS_METADATA_INSYNC_MSG_MD_TYPE_MASK \
13669 		UINT32_C(0x1f)
13670 	#define TLS_METADATA_INSYNC_MSG_MD_TYPE_SFT \
13671 		0
13672 	/*
13673 	 * This setting is used when packets are coming in-order. Depending on
13674 	 * the state of the receive context, the meta-data will carry
13675 	 * different information.
13676 	 */
13677 	#define TLS_METADATA_INSYNC_MSG_MD_TYPE_TLS_INSYNC \
13678 		UINT32_C(0x1)
13679 	#define TLS_METADATA_INSYNC_MSG_MD_TYPE_LAST \
13680 		TLS_METADATA_INSYNC_MSG_MD_TYPE_TLS_INSYNC
13681 	/*
13682 	 * This field indicates where the next metadata block starts. It is
13683 	 * counted in 16B units. A value of zero indicates that there is no
13684 	 * metadata.
13685 	 */
13686 	#define TLS_METADATA_INSYNC_MSG_LINK_MASK \
13687 		UINT32_C(0x1e0)
13688 	#define TLS_METADATA_INSYNC_MSG_LINK_SFT \
13689 		5
13690 	/* These are flags present in the metadata. */
13691 	#define TLS_METADATA_INSYNC_MSG_FLAGS_MASK \
13692 		UINT32_C(0x1fffe00)
13693 	#define TLS_METADATA_INSYNC_MSG_FLAGS_SFT \
13694 		9
13695 	/*
13696 	 * A value of 1 implies that the packet was decrypted by HW. Otherwise
13697 	 * the packet is passed on as it came in on the wire.
13698 	 */
13699 	#define TLS_METADATA_INSYNC_MSG_FLAGS_DECRYPTED \
13700 		UINT32_C(0x200)
13701 	/*
13702 	 * This field indicates the state of the ghash field passed in the
13703 	 * meta-data.
13704 	 */
13705 	#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_MASK \
13706 		UINT32_C(0xc00)
13707 	#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_SFT \
13708 		10
13709 	/*
13710 	 * This enumeration states that the ghash is not valid in the
13711 	 * meta-data.
13712 	 */
13713 	#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_NOT_VALID \
13714 		(UINT32_C(0x0) << 10)
13715 	/*
13716 	 * This enumeration indicates that this pkt contains the record's
13717 	 * tag and this pkt was received ooo, the partial_ghash field
13718 	 * contains the ghash.
13719 	 */
13720 	#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_CUR_REC \
13721 		(UINT32_C(0x1) << 10)
13722 	/*
13723 	 * This enumeration indicates that the current record's tag wasn't
13724 	 * seen and the chip is moving on to the next record, the
13725 	 * partial_ghash field contains the ghash.
13726 	 */
13727 	#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_PRIOR_REC \
13728 		(UINT32_C(0x2) << 10)
13729 	#define TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_LAST \
13730 		TLS_METADATA_INSYNC_MSG_FLAGS_GHASH_PRIOR_REC
13731 	/* This field indicates the status of tag authentication. */
13732 	#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_MASK \
13733 		UINT32_C(0x3000)
13734 	#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_SFT \
13735 		12
13736 	/*
13737 	 * This enumeration is set when HW was not able to authenticate a
13738 	 * TAG.
13739 	 */
13740 	#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED \
13741 		(UINT32_C(0x0) << 12)
13742 	/*
13743 	 * This enumeration states that there is at least one tag in the
13744 	 * packet and every tag is valid.
13745 	 */
13746 	#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_SUCCESS \
13747 		(UINT32_C(0x1) << 12)
13748 	/*
13749 	 * This enumeration states that there is at least one tag in the
13750 	 * packet and at least one of the tag is invalid. The entire packet
13751 	 * is sent decrypted to the host.
13752 	 */
13753 	#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_FAILURE \
13754 		(UINT32_C(0x2) << 12)
13755 	#define TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_LAST \
13756 		TLS_METADATA_INSYNC_MSG_FLAGS_TAG_AUTH_STATUS_FAILURE
13757 	/*
13758 	 * A value of 1 indicates that this packet contains a record that
13759 	 * starts in the packet and extends beyond the packet.
13760 	 */
13761 	#define TLS_METADATA_INSYNC_MSG_FLAGS_HEADER_FLDS_VALID \
13762 		UINT32_C(0x4000)
13763 	/*
13764 	 * A value of 1 indicates that the packet experienced a context load
13765 	 * error. In this case, the packet is sent to the host without the
13766 	 * header or payload decrypted and the context is not updated.
13767 	 */
13768 	#define TLS_METADATA_INSYNC_MSG_FLAGS_CTX_LOAD_ERR \
13769 		UINT32_C(0x8000)
13770 	/* This field indicates the packet operation state. */
13771 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_MASK \
13772 		UINT32_C(0x70000)
13773 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_SFT \
13774 		16
13775 	/* Packet is in order. */
13776 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_IN_ORDER \
13777 		(UINT32_C(0x0) << 16)
13778 	/* Packet is out of order, no header loss. */
13779 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_OUT_OF_ORDER \
13780 		(UINT32_C(0x1) << 16)
13781 	/* Packet is header search (out of order with header loss). */
13782 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_HEADER_SEARCH \
13783 		(UINT32_C(0x2) << 16)
13784 	/* Packet is resync (resync record ongoing). */
13785 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC \
13786 		(UINT32_C(0x3) << 16)
13787 	/*
13788 	 * Packet is resync wait (resync record completes, waiting for
13789 	 * result).
13790 	 */
13791 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT \
13792 		(UINT32_C(0x4) << 16)
13793 	/*
13794 	 * Packet is resync wait for partial tag (waiting for resync record
13795 	 * tag).
13796 	 */
13797 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT_PARTIAL \
13798 		(UINT32_C(0x5) << 16)
13799 	/* Packet is resync success (got resync record success). */
13800 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS \
13801 		(UINT32_C(0x6) << 16)
13802 	/*
13803 	 * Packet is resync success wait (got midpath ACK, waiting for
13804 	 * resync record success).
13805 	 */
13806 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT \
13807 		(UINT32_C(0x7) << 16)
13808 	#define TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_LAST \
13809 		TLS_METADATA_INSYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT
13810 	/*
13811 	 * This value indicates the lower 7-bit of the Crypto Key ID
13812 	 * associated with this operation.
13813 	 */
13814 	#define TLS_METADATA_INSYNC_MSG_KID_LO_MASK \
13815 		UINT32_C(0xfe000000)
13816 	#define TLS_METADATA_INSYNC_MSG_KID_LO_SFT \
13817 		25
13818 	uint16_t	kid_hi;
13819 	/*
13820 	 * This value indicates the upper 13-bit of the Crypto Key ID
13821 	 * associated with this operation.
13822 	 */
13823 	#define TLS_METADATA_INSYNC_MSG_KID_HI_MASK UINT32_C(0x1fff)
13824 	#define TLS_METADATA_INSYNC_MSG_KID_HI_SFT 0
13825 	/*
13826 	 * This field is only valid when md_type is set to tls_insync. This
13827 	 * field indicates the offset within the current TCP packet where the
13828 	 * TLS header starts. If there are multiple TLS headers in the packet,
13829 	 * this provides the offset of the last TLS header.
13830 	 *
13831 	 * The field is calculated by subtracting TCP sequence number of the
13832 	 * first byte of the TCP payload of the packet from the TCP sequence
13833 	 * number of the last TLS header in the packet.
13834 	 */
13835 	uint16_t	tls_header_offset;
13836 	/*
13837 	 * This is the sequence Number of the record that was processed by the HW.
13838 	 * If there are multiple records in a packet, this would be the sequence
13839 	 * number of the last record.
13840 	 */
13841 	uint64_t	record_seq_num;
13842 	/*
13843 	 * This field contains cumulative partial GHASH value of all the packets
13844 	 * decrypted by the HW associated with a TLS record. This field is valid
13845 	 * on when packets belonging to have arrived out-of-order and HW could
13846 	 * not decrypt every packet and authenticate the record. Partial GHASH is
13847 	 * only sent out with packet having the TAG field.
13848 	 */
13849 	uint8_t	partial_ghash[8];
13850 } __rte_packed_end;
13851 
13852 /* tls_metadata_resync_msg (size:256b/32B) */
13853 struct __rte_packed_begin tls_metadata_resync_msg {
13854 	uint32_t	md_type_link_flags_kid_lo;
13855 	/* This field classifies the data present in the meta-data. */
13856 	#define TLS_METADATA_RESYNC_MSG_MD_TYPE_MASK \
13857 		UINT32_C(0x1f)
13858 	#define TLS_METADATA_RESYNC_MSG_MD_TYPE_SFT \
13859 		0
13860 	/*
13861 	 * With this setting HW passes the TCP sequence number of the TLS
13862 	 * record that it is requesting a resync on in the meta data.
13863 	 */
13864 	#define TLS_METADATA_RESYNC_MSG_MD_TYPE_TLS_RESYNC \
13865 		UINT32_C(0x2)
13866 	#define TLS_METADATA_RESYNC_MSG_MD_TYPE_LAST \
13867 		TLS_METADATA_RESYNC_MSG_MD_TYPE_TLS_RESYNC
13868 	/*
13869 	 * This field indicates where the next metadata block starts. It is
13870 	 * counted in 16B units. A value of zero indicates that there is no
13871 	 * metadata.
13872 	 */
13873 	#define TLS_METADATA_RESYNC_MSG_LINK_MASK \
13874 		UINT32_C(0x1e0)
13875 	#define TLS_METADATA_RESYNC_MSG_LINK_SFT \
13876 		5
13877 	/* These are flags present in the metadata. */
13878 	#define TLS_METADATA_RESYNC_MSG_FLAGS_MASK \
13879 		UINT32_C(0x1fffe00)
13880 	#define TLS_METADATA_RESYNC_MSG_FLAGS_SFT \
13881 		9
13882 	/*
13883 	 * A value of 1 implies that the packet was decrypted by HW. Otherwise
13884 	 * the packet is passed on as it came in on the wire.
13885 	 */
13886 	#define TLS_METADATA_RESYNC_MSG_FLAGS_DECRYPTED \
13887 		UINT32_C(0x200)
13888 	/*
13889 	 * This field indicates the state of the ghash field passed in the
13890 	 * meta-data.
13891 	 */
13892 	#define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_MASK \
13893 		UINT32_C(0xc00)
13894 	#define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_SFT \
13895 		10
13896 	/*
13897 	 * This enumeration states that the ghash is not valid in the
13898 	 * meta-data.
13899 	 */
13900 	#define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_NOT_VALID \
13901 		(UINT32_C(0x0) << 10)
13902 	#define TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_LAST \
13903 		TLS_METADATA_RESYNC_MSG_FLAGS_GHASH_NOT_VALID
13904 	/* This field indicates the status of tag authentication. */
13905 	#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_MASK \
13906 		UINT32_C(0x3000)
13907 	#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_SFT \
13908 		12
13909 	/*
13910 	 * This enumeration is set when HW was not able to authenticate a
13911 	 * TAG.
13912 	 */
13913 	#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED \
13914 		(UINT32_C(0x0) << 12)
13915 	#define TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_LAST \
13916 		TLS_METADATA_RESYNC_MSG_FLAGS_TAG_AUTH_STATUS_NOT_CHECKED
13917 	/*
13918 	 * A value of 1 indicates that this packet contains a record that
13919 	 * starts in the packet and extends beyond the packet.
13920 	 */
13921 	#define TLS_METADATA_RESYNC_MSG_FLAGS_HEADER_FLDS_VALID \
13922 		UINT32_C(0x4000)
13923 	/*
13924 	 * A value of 1 indicates that the packet experienced a context load
13925 	 * error. In this case, the packet is sent to the host without the
13926 	 * header or payload decrypted and the context is not updated.
13927 	 */
13928 	#define TLS_METADATA_RESYNC_MSG_FLAGS_CTX_LOAD_ERR \
13929 		UINT32_C(0x8000)
13930 	/* This field indicates the packet operation state. */
13931 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_MASK \
13932 		UINT32_C(0x70000)
13933 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_SFT \
13934 		16
13935 	/* Packet is in order. */
13936 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_IN_ORDER \
13937 		(UINT32_C(0x0) << 16)
13938 	/* Packet is out of order, no header loss. */
13939 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_OUT_OF_ORDER \
13940 		(UINT32_C(0x1) << 16)
13941 	/* Packet is header search (out of order with header loss). */
13942 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_HEADER_SEARCH \
13943 		(UINT32_C(0x2) << 16)
13944 	/* Packet is resync (resync record ongoing). */
13945 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC \
13946 		(UINT32_C(0x3) << 16)
13947 	/*
13948 	 * Packet is resync wait (resync record completes, waiting for
13949 	 * result).
13950 	 */
13951 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT \
13952 		(UINT32_C(0x4) << 16)
13953 	/*
13954 	 * Packet is resync wait for partial tag (waiting for resync record
13955 	 * tag).
13956 	 */
13957 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_WAIT_PARTIAL \
13958 		(UINT32_C(0x5) << 16)
13959 	/* Packet is resync success (got resync record success). */
13960 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS \
13961 		(UINT32_C(0x6) << 16)
13962 	/*
13963 	 * Packet is resync success wait (got midpath ACK, waiting for
13964 	 * resync record success).
13965 	 */
13966 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT \
13967 		(UINT32_C(0x7) << 16)
13968 	#define TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_LAST \
13969 		TLS_METADATA_RESYNC_MSG_FLAGS_PKT_OPERATION_STATE_RESYNC_SUCCESS_WAIT
13970 	/*
13971 	 * This value indicates the lower 7-bit of the Crypto Key ID
13972 	 * associated with this operation.
13973 	 */
13974 	#define TLS_METADATA_RESYNC_MSG_KID_LO_MASK \
13975 		UINT32_C(0xfe000000)
13976 	#define TLS_METADATA_RESYNC_MSG_KID_LO_SFT \
13977 		25
13978 	uint16_t	kid_hi;
13979 	/*
13980 	 * This value indicates the upper 13-bit of the Crypto Key ID
13981 	 * associated with this operation.
13982 	 */
13983 	#define TLS_METADATA_RESYNC_MSG_KID_HI_MASK UINT32_C(0x1fff)
13984 	#define TLS_METADATA_RESYNC_MSG_KID_HI_SFT 0
13985 	/* This field is unused in this context. */
13986 	uint16_t	metadata_0;
13987 	/*
13988 	 * This field indicates the TCP sequence number of the TLS record that HW
13989 	 * is requesting a resync on from the Driver. HW will keep a count of the
13990 	 * TLS records it found after this record (delta_records). Driver will
13991 	 * provide the TLS Record Sequence Number associated with the record. HW
13992 	 * will add the delta_records to the Record Sequence Number provided by
13993 	 * the driver and get back on sync.
13994 	 */
13995 	uint32_t	resync_record_tcp_seq_num;
13996 	uint32_t	unused0;
13997 	/* This field is unused in this context. */
13998 	uint64_t	metadata_2;
13999 	/* This field is unused in this context. */
14000 	uint64_t	metadata_3;
14001 } __rte_packed_end;
14002 
14003 /*******************
14004  * hwrm_func_reset *
14005  *******************/
14006 
14007 
14008 /* hwrm_func_reset_input (size:192b/24B) */
14009 struct __rte_packed_begin hwrm_func_reset_input {
14010 	/* The HWRM command request type. */
14011 	uint16_t	req_type;
14012 	/*
14013 	 * The completion ring to send the completion event on. This should
14014 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
14015 	 */
14016 	uint16_t	cmpl_ring;
14017 	/*
14018 	 * The sequence ID is used by the driver for tracking multiple
14019 	 * commands. This ID is treated as opaque data by the firmware and
14020 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
14021 	 */
14022 	uint16_t	seq_id;
14023 	/*
14024 	 * The target ID of the command:
14025 	 * * 0x0-0xFFF8 - The function ID
14026 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
14027 	 * * 0xFFFD - Reserved for user-space HWRM interface
14028 	 * * 0xFFFF - HWRM
14029 	 */
14030 	uint16_t	target_id;
14031 	/*
14032 	 * A physical address pointer pointing to a host buffer that the
14033 	 * command's response data will be written. This can be either a host
14034 	 * physical address (HPA) or a guest physical address (GPA) and must
14035 	 * point to a physically contiguous block of memory.
14036 	 */
14037 	uint64_t	resp_addr;
14038 	uint32_t	enables;
14039 	/*
14040 	 * This bit must be '1' for the vf_id_valid field to be
14041 	 * configured.
14042 	 */
14043 	#define HWRM_FUNC_RESET_INPUT_ENABLES_VF_ID_VALID     UINT32_C(0x1)
14044 	/*
14045 	 * The ID of the VF that this PF is trying to reset.
14046 	 * Only the parent PF shall be allowed to reset a child VF.
14047 	 *
14048 	 * A parent PF driver shall use this field only when a specific child
14049 	 * VF is requested to be reset.
14050 	 */
14051 	uint16_t	vf_id;
14052 	/* This value indicates the level of a function reset. */
14053 	uint8_t	func_reset_level;
14054 	/*
14055 	 * Reset the caller function and its children VFs (if any). If no
14056 	 * children functions exist, then reset the caller function only.
14057 	 */
14058 	#define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETALL \
14059 		UINT32_C(0x0)
14060 	/* Reset the caller function only */
14061 	#define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETME \
14062 		UINT32_C(0x1)
14063 	/*
14064 	 * Reset all children VFs of the caller function driver if the
14065 	 * caller is a PF driver.
14066 	 * It is an error to specify this level by a VF driver.
14067 	 * It is an error to specify this level by a PF driver with
14068 	 * no children VFs.
14069 	 */
14070 	#define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETCHILDREN \
14071 		UINT32_C(0x2)
14072 	/*
14073 	 * Reset a specific VF of the caller function driver if the caller
14074 	 * is the parent PF driver.
14075 	 * It is an error to specify this level by a VF driver.
14076 	 * It is an error to specify this level by a PF driver that is not
14077 	 * the parent of the VF that is being requested to reset.
14078 	 */
14079 	#define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETVF \
14080 		UINT32_C(0x3)
14081 	#define HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_LAST \
14082 		HWRM_FUNC_RESET_INPUT_FUNC_RESET_LEVEL_RESETVF
14083 	uint8_t	unused_0;
14084 } __rte_packed_end;
14085 
14086 /* hwrm_func_reset_output (size:128b/16B) */
14087 struct __rte_packed_begin hwrm_func_reset_output {
14088 	/* The specific error status for the command. */
14089 	uint16_t	error_code;
14090 	/* The HWRM command request type. */
14091 	uint16_t	req_type;
14092 	/* The sequence ID from the original command. */
14093 	uint16_t	seq_id;
14094 	/* The length of the response data in number of bytes. */
14095 	uint16_t	resp_len;
14096 	uint8_t	unused_0[7];
14097 	/*
14098 	 * This field is used in Output records to indicate that the output
14099 	 * is completely written to RAM. This field should be read as '1'
14100 	 * to indicate that the output has been completely written. When
14101 	 * writing a command completion or response to an internal processor,
14102 	 * the order of writes has to be such that this field is written last.
14103 	 */
14104 	uint8_t	valid;
14105 } __rte_packed_end;
14106 
14107 /********************
14108  * hwrm_func_getfid *
14109  ********************/
14110 
14111 
14112 /* hwrm_func_getfid_input (size:192b/24B) */
14113 struct __rte_packed_begin hwrm_func_getfid_input {
14114 	/* The HWRM command request type. */
14115 	uint16_t	req_type;
14116 	/*
14117 	 * The completion ring to send the completion event on. This should
14118 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
14119 	 */
14120 	uint16_t	cmpl_ring;
14121 	/*
14122 	 * The sequence ID is used by the driver for tracking multiple
14123 	 * commands. This ID is treated as opaque data by the firmware and
14124 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
14125 	 */
14126 	uint16_t	seq_id;
14127 	/*
14128 	 * The target ID of the command:
14129 	 * * 0x0-0xFFF8 - The function ID
14130 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
14131 	 * * 0xFFFD - Reserved for user-space HWRM interface
14132 	 * * 0xFFFF - HWRM
14133 	 */
14134 	uint16_t	target_id;
14135 	/*
14136 	 * A physical address pointer pointing to a host buffer that the
14137 	 * command's response data will be written. This can be either a host
14138 	 * physical address (HPA) or a guest physical address (GPA) and must
14139 	 * point to a physically contiguous block of memory.
14140 	 */
14141 	uint64_t	resp_addr;
14142 	uint32_t	enables;
14143 	/*
14144 	 * This bit must be '1' for the pci_id field to be
14145 	 * configured.
14146 	 */
14147 	#define HWRM_FUNC_GETFID_INPUT_ENABLES_PCI_ID     UINT32_C(0x1)
14148 	/*
14149 	 * This value is the PCI ID of the queried function.
14150 	 * If ARI is enabled, then it is
14151 	 * Bus Number (8b):Function Number(8b). Otherwise, it is
14152 	 * Bus Number (8b):Device Number (5b):Function Number(3b).
14153 	 */
14154 	uint16_t	pci_id;
14155 	uint8_t	unused_0[2];
14156 } __rte_packed_end;
14157 
14158 /* hwrm_func_getfid_output (size:128b/16B) */
14159 struct __rte_packed_begin hwrm_func_getfid_output {
14160 	/* The specific error status for the command. */
14161 	uint16_t	error_code;
14162 	/* The HWRM command request type. */
14163 	uint16_t	req_type;
14164 	/* The sequence ID from the original command. */
14165 	uint16_t	seq_id;
14166 	/* The length of the response data in number of bytes. */
14167 	uint16_t	resp_len;
14168 	/*
14169 	 * FID value. This value is used to identify operations on the PCI
14170 	 * bus as belonging to a particular PCI function.
14171 	 */
14172 	uint16_t	fid;
14173 	uint8_t	unused_0[5];
14174 	/*
14175 	 * This field is used in Output records to indicate that the output
14176 	 * is completely written to RAM. This field should be read as '1'
14177 	 * to indicate that the output has been completely written. When
14178 	 * writing a command completion or response to an internal processor,
14179 	 * the order of writes has to be such that this field is written last.
14180 	 */
14181 	uint8_t	valid;
14182 } __rte_packed_end;
14183 
14184 /**********************
14185  * hwrm_func_vf_alloc *
14186  **********************/
14187 
14188 
14189 /* hwrm_func_vf_alloc_input (size:192b/24B) */
14190 struct __rte_packed_begin hwrm_func_vf_alloc_input {
14191 	/* The HWRM command request type. */
14192 	uint16_t	req_type;
14193 	/*
14194 	 * The completion ring to send the completion event on. This should
14195 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
14196 	 */
14197 	uint16_t	cmpl_ring;
14198 	/*
14199 	 * The sequence ID is used by the driver for tracking multiple
14200 	 * commands. This ID is treated as opaque data by the firmware and
14201 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
14202 	 */
14203 	uint16_t	seq_id;
14204 	/*
14205 	 * The target ID of the command:
14206 	 * * 0x0-0xFFF8 - The function ID
14207 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
14208 	 * * 0xFFFD - Reserved for user-space HWRM interface
14209 	 * * 0xFFFF - HWRM
14210 	 */
14211 	uint16_t	target_id;
14212 	/*
14213 	 * A physical address pointer pointing to a host buffer that the
14214 	 * command's response data will be written. This can be either a host
14215 	 * physical address (HPA) or a guest physical address (GPA) and must
14216 	 * point to a physically contiguous block of memory.
14217 	 */
14218 	uint64_t	resp_addr;
14219 	uint32_t	enables;
14220 	/*
14221 	 * This bit must be '1' for the first_vf_id field to be
14222 	 * configured.
14223 	 */
14224 	#define HWRM_FUNC_VF_ALLOC_INPUT_ENABLES_FIRST_VF_ID     UINT32_C(0x1)
14225 	/*
14226 	 * This value is used to identify a Virtual Function (VF).
14227 	 * The scope of VF ID is local within a PF.
14228 	 */
14229 	uint16_t	first_vf_id;
14230 	/* The number of virtual functions requested. */
14231 	uint16_t	num_vfs;
14232 } __rte_packed_end;
14233 
14234 /* hwrm_func_vf_alloc_output (size:128b/16B) */
14235 struct __rte_packed_begin hwrm_func_vf_alloc_output {
14236 	/* The specific error status for the command. */
14237 	uint16_t	error_code;
14238 	/* The HWRM command request type. */
14239 	uint16_t	req_type;
14240 	/* The sequence ID from the original command. */
14241 	uint16_t	seq_id;
14242 	/* The length of the response data in number of bytes. */
14243 	uint16_t	resp_len;
14244 	/* The ID of the first VF allocated. */
14245 	uint16_t	first_vf_id;
14246 	uint8_t	unused_0[5];
14247 	/*
14248 	 * This field is used in Output records to indicate that the output
14249 	 * is completely written to RAM. This field should be read as '1'
14250 	 * to indicate that the output has been completely written. When
14251 	 * writing a command completion or response to an internal processor,
14252 	 * the order of writes has to be such that this field is written last.
14253 	 */
14254 	uint8_t	valid;
14255 } __rte_packed_end;
14256 
14257 /*********************
14258  * hwrm_func_vf_free *
14259  *********************/
14260 
14261 
14262 /* hwrm_func_vf_free_input (size:192b/24B) */
14263 struct __rte_packed_begin hwrm_func_vf_free_input {
14264 	/* The HWRM command request type. */
14265 	uint16_t	req_type;
14266 	/*
14267 	 * The completion ring to send the completion event on. This should
14268 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
14269 	 */
14270 	uint16_t	cmpl_ring;
14271 	/*
14272 	 * The sequence ID is used by the driver for tracking multiple
14273 	 * commands. This ID is treated as opaque data by the firmware and
14274 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
14275 	 */
14276 	uint16_t	seq_id;
14277 	/*
14278 	 * The target ID of the command:
14279 	 * * 0x0-0xFFF8 - The function ID
14280 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
14281 	 * * 0xFFFD - Reserved for user-space HWRM interface
14282 	 * * 0xFFFF - HWRM
14283 	 */
14284 	uint16_t	target_id;
14285 	/*
14286 	 * A physical address pointer pointing to a host buffer that the
14287 	 * command's response data will be written. This can be either a host
14288 	 * physical address (HPA) or a guest physical address (GPA) and must
14289 	 * point to a physically contiguous block of memory.
14290 	 */
14291 	uint64_t	resp_addr;
14292 	uint32_t	enables;
14293 	/*
14294 	 * This bit must be '1' for the first_vf_id field to be
14295 	 * configured.
14296 	 */
14297 	#define HWRM_FUNC_VF_FREE_INPUT_ENABLES_FIRST_VF_ID     UINT32_C(0x1)
14298 	/*
14299 	 * This value is used to identify a Virtual Function (VF).
14300 	 * The scope of VF ID is local within a PF.
14301 	 */
14302 	uint16_t	first_vf_id;
14303 	/*
14304 	 * The number of virtual functions requested.
14305 	 * 0xFFFF - Cleanup all children of this PF.
14306 	 */
14307 	uint16_t	num_vfs;
14308 } __rte_packed_end;
14309 
14310 /* hwrm_func_vf_free_output (size:128b/16B) */
14311 struct __rte_packed_begin hwrm_func_vf_free_output {
14312 	/* The specific error status for the command. */
14313 	uint16_t	error_code;
14314 	/* The HWRM command request type. */
14315 	uint16_t	req_type;
14316 	/* The sequence ID from the original command. */
14317 	uint16_t	seq_id;
14318 	/* The length of the response data in number of bytes. */
14319 	uint16_t	resp_len;
14320 	uint8_t	unused_0[7];
14321 	/*
14322 	 * This field is used in Output records to indicate that the output
14323 	 * is completely written to RAM. This field should be read as '1'
14324 	 * to indicate that the output has been completely written. When
14325 	 * writing a command completion or response to an internal processor,
14326 	 * the order of writes has to be such that this field is written last.
14327 	 */
14328 	uint8_t	valid;
14329 } __rte_packed_end;
14330 
14331 /********************
14332  * hwrm_func_vf_cfg *
14333  ********************/
14334 
14335 
14336 /* hwrm_func_vf_cfg_input (size:576b/72B) */
14337 struct __rte_packed_begin hwrm_func_vf_cfg_input {
14338 	/* The HWRM command request type. */
14339 	uint16_t	req_type;
14340 	/*
14341 	 * The completion ring to send the completion event on. This should
14342 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
14343 	 */
14344 	uint16_t	cmpl_ring;
14345 	/*
14346 	 * The sequence ID is used by the driver for tracking multiple
14347 	 * commands. This ID is treated as opaque data by the firmware and
14348 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
14349 	 */
14350 	uint16_t	seq_id;
14351 	/*
14352 	 * The target ID of the command:
14353 	 * * 0x0-0xFFF8 - The function ID
14354 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
14355 	 * * 0xFFFD - Reserved for user-space HWRM interface
14356 	 * * 0xFFFF - HWRM
14357 	 */
14358 	uint16_t	target_id;
14359 	/*
14360 	 * A physical address pointer pointing to a host buffer that the
14361 	 * command's response data will be written. This can be either a host
14362 	 * physical address (HPA) or a guest physical address (GPA) and must
14363 	 * point to a physically contiguous block of memory.
14364 	 */
14365 	uint64_t	resp_addr;
14366 	uint32_t	enables;
14367 	/*
14368 	 * This bit must be '1' for the mtu field to be
14369 	 * configured.
14370 	 */
14371 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_MTU \
14372 		UINT32_C(0x1)
14373 	/*
14374 	 * This bit must be '1' for the guest_vlan field to be
14375 	 * configured.
14376 	 */
14377 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_GUEST_VLAN \
14378 		UINT32_C(0x2)
14379 	/*
14380 	 * This bit must be '1' for the async_event_cr field to be
14381 	 * configured.
14382 	 */
14383 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_ASYNC_EVENT_CR \
14384 		UINT32_C(0x4)
14385 	/*
14386 	 * This bit must be '1' for the dflt_mac_addr field to be
14387 	 * configured.
14388 	 */
14389 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_DFLT_MAC_ADDR \
14390 		UINT32_C(0x8)
14391 	/*
14392 	 * This bit must be '1' for the num_rsscos_ctxs field to be
14393 	 * configured.
14394 	 */
14395 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS \
14396 		UINT32_C(0x10)
14397 	/*
14398 	 * This bit must be '1' for the num_cmpl_rings field to be
14399 	 * configured.
14400 	 */
14401 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_CMPL_RINGS \
14402 		UINT32_C(0x20)
14403 	/*
14404 	 * This bit must be '1' for the num_tx_rings field to be
14405 	 * configured.
14406 	 */
14407 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_TX_RINGS \
14408 		UINT32_C(0x40)
14409 	/*
14410 	 * This bit must be '1' for the num_rx_rings field to be
14411 	 * configured.
14412 	 */
14413 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_RX_RINGS \
14414 		UINT32_C(0x80)
14415 	/*
14416 	 * This bit must be '1' for the num_l2_ctxs field to be
14417 	 * configured.
14418 	 */
14419 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_L2_CTXS \
14420 		UINT32_C(0x100)
14421 	/*
14422 	 * This bit must be '1' for the num_vnics field to be
14423 	 * configured.
14424 	 */
14425 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_VNICS \
14426 		UINT32_C(0x200)
14427 	/*
14428 	 * This bit must be '1' for the num_stat_ctxs field to be
14429 	 * configured.
14430 	 */
14431 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_STAT_CTXS \
14432 		UINT32_C(0x400)
14433 	/*
14434 	 * This bit must be '1' for the num_hw_ring_grps field to be
14435 	 * configured.
14436 	 */
14437 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_HW_RING_GRPS \
14438 		UINT32_C(0x800)
14439 	/*
14440 	 * This bit must be '1' for the num_ktls_tx_key_ctxs field to
14441 	 * be configured.
14442 	 */
14443 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_KTLS_TX_KEY_CTXS \
14444 		UINT32_C(0x1000)
14445 	/*
14446 	 * This bit must be '1' for the num_ktls_rx_key_ctxs field to
14447 	 * be configured.
14448 	 */
14449 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_KTLS_RX_KEY_CTXS \
14450 		UINT32_C(0x2000)
14451 	/*
14452 	 * This bit must be '1' for the num_quic_tx_key_ctxs field to
14453 	 * be configured.
14454 	 */
14455 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_QUIC_TX_KEY_CTXS \
14456 		UINT32_C(0x4000)
14457 	/*
14458 	 * This bit must be '1' for the num_quic_rx_key_ctxs field to
14459 	 * be configured.
14460 	 */
14461 	#define HWRM_FUNC_VF_CFG_INPUT_ENABLES_NUM_QUIC_RX_KEY_CTXS \
14462 		UINT32_C(0x8000)
14463 	/*
14464 	 * The maximum transmission unit requested on the function.
14465 	 * The HWRM should make sure that the mtu of
14466 	 * the function does not exceed the mtu of the physical
14467 	 * port that this function is associated with.
14468 	 *
14469 	 * In addition to requesting mtu per function, it is
14470 	 * possible to configure mtu per transmit ring.
14471 	 * By default, the mtu of each transmit ring associated
14472 	 * with a function is equal to the mtu of the function.
14473 	 * The HWRM should make sure that the mtu of each transmit
14474 	 * ring that is assigned to a function has a valid mtu.
14475 	 */
14476 	uint16_t	mtu;
14477 	/*
14478 	 * The guest VLAN for the function being configured.
14479 	 * This field's format is same as 802.1Q Tag's
14480 	 * Tag Control Information (TCI) format that includes both
14481 	 * Priority Code Point (PCP) and VLAN Identifier (VID).
14482 	 */
14483 	uint16_t	guest_vlan;
14484 	/*
14485 	 * ID of the target completion ring for receiving asynchronous
14486 	 * event completions. If this field is not valid, then the
14487 	 * HWRM shall use the default completion ring of the function
14488 	 * that is being configured as the target completion ring for
14489 	 * providing any asynchronous event completions for that
14490 	 * function.
14491 	 * If this field is valid, then the HWRM shall use the
14492 	 * completion ring identified by this ID as the target
14493 	 * completion ring for providing any asynchronous event
14494 	 * completions for the function that is being configured.
14495 	 */
14496 	uint16_t	async_event_cr;
14497 	/*
14498 	 * This value is the current MAC address requested by the VF
14499 	 * driver to be configured on this VF. A value of
14500 	 * 00-00-00-00-00-00 indicates no MAC address configuration
14501 	 * is requested by the VF driver.
14502 	 * The parent PF driver may reject or overwrite this
14503 	 * MAC address.
14504 	 */
14505 	uint8_t	dflt_mac_addr[6];
14506 	uint32_t	flags;
14507 	/*
14508 	 * This bit requests that the firmware test to see if all the assets
14509 	 * requested in this command (i.e. number of TX rings) are available.
14510 	 * The firmware will return an error if the requested assets are
14511 	 * not available. The firmware will NOT reserve the assets if they
14512 	 * are available.
14513 	 */
14514 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_TX_ASSETS_TEST \
14515 		UINT32_C(0x1)
14516 	/*
14517 	 * This bit requests that the firmware test to see if all the assets
14518 	 * requested in this command (i.e. number of RX rings) are available.
14519 	 * The firmware will return an error if the requested assets are
14520 	 * not available. The firmware will NOT reserve the assets if they
14521 	 * are available.
14522 	 */
14523 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_RX_ASSETS_TEST \
14524 		UINT32_C(0x2)
14525 	/*
14526 	 * This bit requests that the firmware test to see if all the assets
14527 	 * requested in this command (i.e. number of CMPL rings) are
14528 	 * available. The firmware will return an error if the requested
14529 	 * assets are not available. The firmware will NOT reserve the assets
14530 	 * if they are available.
14531 	 */
14532 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_CMPL_ASSETS_TEST \
14533 		UINT32_C(0x4)
14534 	/*
14535 	 * This bit requests that the firmware test to see if all the assets
14536 	 * requested in this command (i.e. number of RSS ctx) are available.
14537 	 * The firmware will return an error if the requested assets are
14538 	 * not available. The firmware will NOT reserve the assets if they
14539 	 * are available.
14540 	 */
14541 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_RSSCOS_CTX_ASSETS_TEST \
14542 		UINT32_C(0x8)
14543 	/*
14544 	 * This bit requests that the firmware test to see if all the assets
14545 	 * requested in this command (i.e. number of ring groups) are
14546 	 * available. The firmware will return an error if the requested
14547 	 * assets are not available. The firmware will NOT reserve the assets
14548 	 * if they are available.
14549 	 */
14550 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_RING_GRP_ASSETS_TEST \
14551 		UINT32_C(0x10)
14552 	/*
14553 	 * This bit requests that the firmware test to see if all the assets
14554 	 * requested in this command (i.e. number of stat ctx) are available.
14555 	 * The firmware will return an error if the requested assets are
14556 	 * not available. The firmware will NOT reserve the assets if they
14557 	 * are available.
14558 	 */
14559 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_STAT_CTX_ASSETS_TEST \
14560 		UINT32_C(0x20)
14561 	/*
14562 	 * This bit requests that the firmware test to see if all the assets
14563 	 * requested in this command (i.e. number of VNICs) are available.
14564 	 * The firmware will return an error if the requested assets are
14565 	 * not available. The firmware will NOT reserve the assets if they
14566 	 * are available.
14567 	 */
14568 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_VNIC_ASSETS_TEST \
14569 		UINT32_C(0x40)
14570 	/*
14571 	 * This bit requests that the firmware test to see if all the assets
14572 	 * requested in this command (i.e. number of L2 ctx) are available.
14573 	 * The firmware will return an error if the requested assets are
14574 	 * not available. The firmware will NOT reserve the assets if they
14575 	 * are available.
14576 	 */
14577 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_L2_CTX_ASSETS_TEST \
14578 		UINT32_C(0x80)
14579 	/*
14580 	 * If this bit is set to 1, the VF driver is requesting FW to enable
14581 	 * PPP TX PUSH feature on all the TX rings specified in the
14582 	 * num_tx_rings field. By default, the PPP TX push feature is
14583 	 * disabled for all the TX rings of the VF. This flag is ignored if
14584 	 * the num_tx_rings field is not specified or the VF doesn't support
14585 	 * PPP tx push feature.
14586 	 */
14587 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_PPP_PUSH_MODE_ENABLE \
14588 		UINT32_C(0x100)
14589 	/*
14590 	 * If this bit is set to 1, the VF driver is requesting FW to disable
14591 	 * PPP TX PUSH feature on all the TX rings of the VF. This flag is
14592 	 * ignored if the VF doesn't support PPP tx push feature.
14593 	 */
14594 	#define HWRM_FUNC_VF_CFG_INPUT_FLAGS_PPP_PUSH_MODE_DISABLE \
14595 		UINT32_C(0x200)
14596 	/* The number of RSS/COS contexts requested for the VF. */
14597 	uint16_t	num_rsscos_ctxs;
14598 	/* The number of completion rings requested for the VF. */
14599 	uint16_t	num_cmpl_rings;
14600 	/* The number of transmit rings requested for the VF. */
14601 	uint16_t	num_tx_rings;
14602 	/* The number of receive rings requested for the VF. */
14603 	uint16_t	num_rx_rings;
14604 	/* The number of L2 contexts requested for the VF. */
14605 	uint16_t	num_l2_ctxs;
14606 	/* The number of vnics requested for the VF. */
14607 	uint16_t	num_vnics;
14608 	/* The number of statistic contexts requested for the VF. */
14609 	uint16_t	num_stat_ctxs;
14610 	/* The number of HW ring groups requested for the VF. */
14611 	uint16_t	num_hw_ring_grps;
14612 	/* Number of KTLS Tx Key Contexts requested. */
14613 	uint32_t	num_ktls_tx_key_ctxs;
14614 	/* Number of KTLS Rx Key Contexts requested. */
14615 	uint32_t	num_ktls_rx_key_ctxs;
14616 	/* The number of MSI-X vectors requested for the VF. */
14617 	uint16_t	num_msix;
14618 	uint8_t	unused[2];
14619 	/* Number of QUIC Tx Key Contexts requested. */
14620 	uint32_t	num_quic_tx_key_ctxs;
14621 	/* Number of QUIC Rx Key Contexts requested. */
14622 	uint32_t	num_quic_rx_key_ctxs;
14623 } __rte_packed_end;
14624 
14625 /* hwrm_func_vf_cfg_output (size:128b/16B) */
14626 struct __rte_packed_begin hwrm_func_vf_cfg_output {
14627 	/* The specific error status for the command. */
14628 	uint16_t	error_code;
14629 	/* The HWRM command request type. */
14630 	uint16_t	req_type;
14631 	/* The sequence ID from the original command. */
14632 	uint16_t	seq_id;
14633 	/* The length of the response data in number of bytes. */
14634 	uint16_t	resp_len;
14635 	uint8_t	unused_0[7];
14636 	/*
14637 	 * This field is used in Output records to indicate that the output
14638 	 * is completely written to RAM. This field should be read as '1'
14639 	 * to indicate that the output has been completely written. When
14640 	 * writing a command completion or response to an internal processor,
14641 	 * the order of writes has to be such that this field is written last.
14642 	 */
14643 	uint8_t	valid;
14644 } __rte_packed_end;
14645 
14646 /*******************
14647  * hwrm_func_qcaps *
14648  *******************/
14649 
14650 
14651 /* hwrm_func_qcaps_input (size:192b/24B) */
14652 struct __rte_packed_begin hwrm_func_qcaps_input {
14653 	/* The HWRM command request type. */
14654 	uint16_t	req_type;
14655 	/*
14656 	 * The completion ring to send the completion event on. This should
14657 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
14658 	 */
14659 	uint16_t	cmpl_ring;
14660 	/*
14661 	 * The sequence ID is used by the driver for tracking multiple
14662 	 * commands. This ID is treated as opaque data by the firmware and
14663 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
14664 	 */
14665 	uint16_t	seq_id;
14666 	/*
14667 	 * The target ID of the command:
14668 	 * * 0x0-0xFFF8 - The function ID
14669 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
14670 	 * * 0xFFFD - Reserved for user-space HWRM interface
14671 	 * * 0xFFFF - HWRM
14672 	 */
14673 	uint16_t	target_id;
14674 	/*
14675 	 * A physical address pointer pointing to a host buffer that the
14676 	 * command's response data will be written. This can be either a host
14677 	 * physical address (HPA) or a guest physical address (GPA) and must
14678 	 * point to a physically contiguous block of memory.
14679 	 */
14680 	uint64_t	resp_addr;
14681 	/*
14682 	 * Function ID of the function that is being queried.
14683 	 * 0xFF... (All Fs) if the query is for the requesting
14684 	 * function.
14685 	 * 0xFFFE (REQUESTING_PARENT_FID) This is a special FID
14686 	 * to be used by a trusted VF to query its parent PF.
14687 	 */
14688 	uint16_t	fid;
14689 	uint8_t	unused_0[6];
14690 } __rte_packed_end;
14691 
14692 /* hwrm_func_qcaps_output (size:1088b/136B) */
14693 struct __rte_packed_begin hwrm_func_qcaps_output {
14694 	/* The specific error status for the command. */
14695 	uint16_t	error_code;
14696 	/* The HWRM command request type. */
14697 	uint16_t	req_type;
14698 	/* The sequence ID from the original command. */
14699 	uint16_t	seq_id;
14700 	/* The length of the response data in number of bytes. */
14701 	uint16_t	resp_len;
14702 	/*
14703 	 * FID value. This value is used to identify operations on the PCI
14704 	 * bus as belonging to a particular PCI function.
14705 	 */
14706 	uint16_t	fid;
14707 	/*
14708 	 * Port ID of port that this function is associated with.
14709 	 * Valid only for the PF.
14710 	 * 0xFF... (All Fs) if this function is not associated with
14711 	 * any port.
14712 	 * 0xFF... (All Fs) if this function is called from a VF.
14713 	 */
14714 	uint16_t	port_id;
14715 	uint32_t	flags;
14716 	/* If 1, then Push mode is supported on this function. */
14717 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PUSH_MODE_SUPPORTED \
14718 		UINT32_C(0x1)
14719 	/*
14720 	 * If 1, then the global MSI-X auto-masking is enabled for the
14721 	 * device.
14722 	 */
14723 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_GLOBAL_MSIX_AUTOMASKING \
14724 		UINT32_C(0x2)
14725 	/*
14726 	 * If 1, then the Precision Time Protocol (PTP) processing
14727 	 * is supported on this function.
14728 	 * The HWRM should enable PTP on only a single Physical
14729 	 * Function (PF) per port.
14730 	 */
14731 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PTP_SUPPORTED \
14732 		UINT32_C(0x4)
14733 	/*
14734 	 * If 1, then RDMA over Converged Ethernet (RoCE) v1
14735 	 * is supported on this function.
14736 	 */
14737 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ROCE_V1_SUPPORTED \
14738 		UINT32_C(0x8)
14739 	/*
14740 	 * If 1, then RDMA over Converged Ethernet (RoCE) v2
14741 	 * is supported on this function.
14742 	 */
14743 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ROCE_V2_SUPPORTED \
14744 		UINT32_C(0x10)
14745 	/*
14746 	 * If 1, then control and configuration of WoL magic packet
14747 	 * are supported on this function.
14748 	 */
14749 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_WOL_MAGICPKT_SUPPORTED \
14750 		UINT32_C(0x20)
14751 	/*
14752 	 * If 1, then control and configuration of bitmap pattern
14753 	 * packet are supported on this function.
14754 	 */
14755 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_WOL_BMP_SUPPORTED \
14756 		UINT32_C(0x40)
14757 	/*
14758 	 * If set to 1, then the control and configuration of rate limit
14759 	 * of an allocated TX ring on the queried function is supported.
14760 	 */
14761 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_TX_RING_RL_SUPPORTED \
14762 		UINT32_C(0x80)
14763 	/*
14764 	 * If 1, then control and configuration of minimum and
14765 	 * maximum bandwidths are supported on the queried function.
14766 	 */
14767 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_TX_BW_CFG_SUPPORTED \
14768 		UINT32_C(0x100)
14769 	/*
14770 	 * If the query is for a VF, then this flag shall be ignored.
14771 	 * If this query is for a PF and this flag is set to 1,
14772 	 * then the PF has the capability to set the rate limits
14773 	 * on the TX rings of its children VFs.
14774 	 * If this query is for a PF and this flag is set to 0, then
14775 	 * the PF does not have the capability to set the rate limits
14776 	 * on the TX rings of its children VFs.
14777 	 */
14778 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VF_TX_RING_RL_SUPPORTED \
14779 		UINT32_C(0x200)
14780 	/*
14781 	 * If the query is for a VF, then this flag shall be ignored.
14782 	 * If this query is for a PF and this flag is set to 1,
14783 	 * then the PF has the capability to set the minimum and/or
14784 	 * maximum bandwidths for its children VFs.
14785 	 * If this query is for a PF and this flag is set to 0, then
14786 	 * the PF does not have the capability to set the minimum or
14787 	 * maximum bandwidths for its children VFs.
14788 	 */
14789 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VF_BW_CFG_SUPPORTED \
14790 		UINT32_C(0x400)
14791 	/*
14792 	 * Standard TX Ring mode is used for the allocation of TX ring
14793 	 * and underlying scheduling resources that allow bandwidth
14794 	 * reservation and limit settings on the queried function.
14795 	 * If set to 1, then standard TX ring mode is supported
14796 	 * on the queried function.
14797 	 * If set to 0, then standard TX ring mode is not available
14798 	 * on the queried function.
14799 	 */
14800 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_STD_TX_RING_MODE_SUPPORTED \
14801 		UINT32_C(0x800)
14802 	/*
14803 	 * If the query is for a VF, then this flag shall be ignored,
14804 	 * If this query is for a PF and this flag is set to 1,
14805 	 * then the PF has the capability to detect GENEVE tunnel
14806 	 * flags.
14807 	 */
14808 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_GENEVE_TUN_FLAGS_SUPPORTED \
14809 		UINT32_C(0x1000)
14810 	/*
14811 	 * If the query is for a VF, then this flag shall be ignored,
14812 	 * If this query is for a PF and this flag is set to 1,
14813 	 * then the PF has the capability to detect NVGRE tunnel
14814 	 * flags.
14815 	 */
14816 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_NVGRE_TUN_FLAGS_SUPPORTED \
14817 		UINT32_C(0x2000)
14818 	/*
14819 	 * If the query is for a VF, then this flag shall be ignored,
14820 	 * If this query is for a PF and this flag is set to 1,
14821 	 * then the PF has the capability to detect GRE tunnel
14822 	 * flags.
14823 	 */
14824 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_GRE_TUN_FLAGS_SUPPORTED \
14825 		UINT32_C(0x4000)
14826 	/*
14827 	 * If the query is for a VF, then this flag shall be ignored,
14828 	 * If this query is for a PF and this flag is set to 1,
14829 	 * then the PF has the capability to detect MPLS tunnel
14830 	 * flags.
14831 	 */
14832 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_MPLS_TUN_FLAGS_SUPPORTED \
14833 		UINT32_C(0x8000)
14834 	/*
14835 	 * If the query is for a VF, then this flag shall be ignored,
14836 	 * If this query is for a PF and this flag is set to 1,
14837 	 * then the PF has the capability to support pcie stats.
14838 	 */
14839 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PCIE_STATS_SUPPORTED \
14840 		UINT32_C(0x10000)
14841 	/*
14842 	 * If the query is for a VF, then this flag shall be ignored,
14843 	 * If this query is for a PF and this flag is set to 1,
14844 	 * then the PF has the capability to adopt the VF's belonging
14845 	 * to another PF.
14846 	 */
14847 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ADOPTED_PF_SUPPORTED \
14848 		UINT32_C(0x20000)
14849 	/*
14850 	 * If the query is for a VF, then this flag shall be ignored,
14851 	 * If this query is for a PF and this flag is set to 1,
14852 	 * then the PF has the administrative privilege to configure another
14853 	 * PF.
14854 	 */
14855 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ADMIN_PF_SUPPORTED \
14856 		UINT32_C(0x40000)
14857 	/*
14858 	 * If the query is for a VF, then this flag shall be ignored.
14859 	 * If this query is for a PF and this flag is set to 1, then
14860 	 * the PF will know that the firmware has the capability to track
14861 	 * the virtual link status.
14862 	 */
14863 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_LINK_ADMIN_STATUS_SUPPORTED \
14864 		UINT32_C(0x80000)
14865 	/*
14866 	 * If 1, then this function supports the push mode that uses
14867 	 * write combine buffers and the long inline tx buffer descriptor.
14868 	 */
14869 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_WCB_PUSH_MODE \
14870 		UINT32_C(0x100000)
14871 	/*
14872 	 * If 1, then FW has capability to allocate TX rings dynamically
14873 	 * in ring alloc even if PF reserved pool is zero.
14874 	 * This bit will be used only for PFs.
14875 	 */
14876 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_DYNAMIC_TX_RING_ALLOC \
14877 		UINT32_C(0x200000)
14878 	/*
14879 	 * When this bit is '1', it indicates that core firmware is
14880 	 * capable of Hot Reset.
14881 	 */
14882 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_HOT_RESET_CAPABLE \
14883 		UINT32_C(0x400000)
14884 	/*
14885 	 * This flag will be set to 1 by the FW if FW supports adapter error
14886 	 * recovery.
14887 	 */
14888 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ERROR_RECOVERY_CAPABLE \
14889 		UINT32_C(0x800000)
14890 	/*
14891 	 * If the query is for a VF, then this flag shall be ignored.
14892 	 * If this query is for a PF and this flag is set to 1, then
14893 	 * the PF has the capability to support extended stats.
14894 	 */
14895 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_STATS_SUPPORTED \
14896 		UINT32_C(0x1000000)
14897 	/*
14898 	 * If the query is for a VF, then this flag shall be ignored.
14899 	 * If this query is for a PF and this flag is set to 1, then host
14900 	 * must initiate reset or reload (or fastboot) the firmware image
14901 	 * upon detection of device shutdown state.
14902 	 */
14903 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_ERR_RECOVER_RELOAD \
14904 		UINT32_C(0x2000000)
14905 	/*
14906 	 * If the query is for a VF, then this flag (always set to 0) shall
14907 	 * be ignored. If this query is for a PF and this flag is set to 1,
14908 	 * host, when registered for the default vnic change async event,
14909 	 * receives async notification whenever a default vnic state is
14910 	 * changed for any of child or adopted VFs.
14911 	 */
14912 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_NOTIFY_VF_DEF_VNIC_CHNG_SUPPORTED \
14913 		UINT32_C(0x4000000)
14914 	/* If set to 1, then the vlan acceleration for TX is disabled. */
14915 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_VLAN_ACCELERATION_TX_DISABLED \
14916 		UINT32_C(0x8000000)
14917 	/*
14918 	 * When this bit is '1', it indicates that core firmware supports
14919 	 * DBG_COREDUMP_XXX commands.
14920 	 */
14921 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_COREDUMP_CMD_SUPPORTED \
14922 		UINT32_C(0x10000000)
14923 	/*
14924 	 * When this bit is '1', it indicates that core firmware supports
14925 	 * DBG_CRASHDUMP_XXX commands.
14926 	 */
14927 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_CRASHDUMP_CMD_SUPPORTED \
14928 		UINT32_C(0x20000000)
14929 	/*
14930 	 * If the query is for a VF, then this flag should be ignored.
14931 	 * If the query is for a PF and this flag is set to 1, then
14932 	 * the PF has the capability to support retrieval of
14933 	 * rx_port_stats_ext_pfc_wd statistics (supported by the PFC
14934 	 * WatchDog feature) via the hwrm_port_qstats_ext_pfc_wd command.
14935 	 * If this flag is set to 1, only that (supported) command should
14936 	 * be used for retrieval of PFC related statistics (rather than
14937 	 * hwrm_port_qstats_ext command, which could previously be used).
14938 	 */
14939 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_PFC_WD_STATS_SUPPORTED \
14940 		UINT32_C(0x40000000)
14941 	/*
14942 	 * When this bit is '1', it indicates that core firmware supports
14943 	 * DBG_QCAPS command
14944 	 */
14945 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_DBG_QCAPS_CMD_SUPPORTED \
14946 		UINT32_C(0x80000000)
14947 	/*
14948 	 * This value is current MAC address configured for this
14949 	 * function. A value of 00-00-00-00-00-00 indicates no
14950 	 * MAC address is currently configured.
14951 	 */
14952 	uint8_t	mac_address[6];
14953 	/*
14954 	 * The maximum number of RSS/COS contexts that can be
14955 	 * allocated to the function.
14956 	 */
14957 	uint16_t	max_rsscos_ctx;
14958 	/*
14959 	 * The maximum number of completion rings that can be
14960 	 * allocated to the function.
14961 	 */
14962 	uint16_t	max_cmpl_rings;
14963 	/*
14964 	 * The maximum number of transmit rings that can be
14965 	 * allocated to the function.
14966 	 */
14967 	uint16_t	max_tx_rings;
14968 	/*
14969 	 * The maximum number of receive rings that can be
14970 	 * allocated to the function.
14971 	 */
14972 	uint16_t	max_rx_rings;
14973 	/*
14974 	 * The maximum number of L2 contexts that can be
14975 	 * allocated to the function.
14976 	 */
14977 	uint16_t	max_l2_ctxs;
14978 	/*
14979 	 * The maximum number of VNICs that can be
14980 	 * allocated to the function.
14981 	 */
14982 	uint16_t	max_vnics;
14983 	/*
14984 	 * The identifier for the first VF enabled on a PF. This
14985 	 * is valid only on the PF with SR-IOV enabled.
14986 	 * 0xFF... (All Fs) if this command is called on a PF with
14987 	 * SR-IOV disabled or on a VF.
14988 	 */
14989 	uint16_t	first_vf_id;
14990 	/*
14991 	 * The maximum number of VFs that can be
14992 	 * allocated to the function. This is valid only on the
14993 	 * PF with SR-IOV enabled. 0xFF... (All Fs) if this
14994 	 * command is called on a PF with SR-IOV disabled or
14995 	 * on a VF.
14996 	 */
14997 	uint16_t	max_vfs;
14998 	/*
14999 	 * The maximum number of statistic contexts that can be
15000 	 * allocated to the function.
15001 	 */
15002 	uint16_t	max_stat_ctx;
15003 	/*
15004 	 * The maximum number of Encapsulation records that can be
15005 	 * offloaded by this function.
15006 	 */
15007 	uint32_t	max_encap_records;
15008 	/*
15009 	 * The maximum number of decapsulation records that can
15010 	 * be offloaded by this function.
15011 	 */
15012 	uint32_t	max_decap_records;
15013 	/*
15014 	 * The maximum number of Exact Match (EM) flows that can be
15015 	 * offloaded by this function on the TX side.
15016 	 */
15017 	uint32_t	max_tx_em_flows;
15018 	/*
15019 	 * The maximum number of Wildcard Match (WM) flows that can
15020 	 * be offloaded by this function on the TX side.
15021 	 */
15022 	uint32_t	max_tx_wm_flows;
15023 	/*
15024 	 * The maximum number of Exact Match (EM) flows that can be
15025 	 * offloaded by this function on the RX side.
15026 	 */
15027 	uint32_t	max_rx_em_flows;
15028 	/*
15029 	 * The maximum number of Wildcard Match (WM) flows that can
15030 	 * be offloaded by this function on the RX side.
15031 	 */
15032 	uint32_t	max_rx_wm_flows;
15033 	/*
15034 	 * The maximum number of multicast filters that can
15035 	 * be supported by this function on the RX side.
15036 	 */
15037 	uint32_t	max_mcast_filters;
15038 	/*
15039 	 * The maximum value of flow_id that can be supported
15040 	 * in completion records.
15041 	 */
15042 	uint32_t	max_flow_id;
15043 	/*
15044 	 * The maximum number of HW ring groups that can be
15045 	 * supported on this function.
15046 	 */
15047 	uint32_t	max_hw_ring_grps;
15048 	/*
15049 	 * The maximum number of strict priority transmit rings
15050 	 * that can be allocated to the function.
15051 	 * This number indicates the maximum number of TX rings
15052 	 * that can be assigned strict priorities out of the
15053 	 * maximum number of TX rings that can be allocated
15054 	 * (max_tx_rings) to the function.
15055 	 */
15056 	uint16_t	max_sp_tx_rings;
15057 	/*
15058 	 * The maximum number of MSI-X vectors that may be allocated across
15059 	 * all VFs for the function. This is valid only on the PF with SR-IOV
15060 	 * enabled. Returns zero if this command is called on a PF with
15061 	 * SR-IOV disabled or on a VF.
15062 	 */
15063 	uint16_t	max_msix_vfs;
15064 	uint32_t	flags_ext;
15065 	/*
15066 	 * If 1, the device can be configured to set the ECN bits in the
15067 	 * IP header of received packets if the receive queue length
15068 	 * exceeds a given threshold.
15069 	 */
15070 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_ECN_MARK_SUPPORTED \
15071 		UINT32_C(0x1)
15072 	/*
15073 	 * If 1, the device can report the number of received packets
15074 	 * that it marked as having experienced congestion.
15075 	 */
15076 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_ECN_STATS_SUPPORTED \
15077 		UINT32_C(0x2)
15078 	/*
15079 	 * If 1, the device can report extended hw statistics (including
15080 	 * additional tpa statistics).
15081 	 */
15082 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_EXT_HW_STATS_SUPPORTED \
15083 		UINT32_C(0x4)
15084 	/*
15085 	 * If set to 1, then the core firmware has support to enable/
15086 	 * disable hot reset support for interface dynamically through
15087 	 * HWRM_FUNC_CFG.
15088 	 */
15089 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_HOT_RESET_IF_SUPPORT \
15090 		UINT32_C(0x8)
15091 	/* If 1, the proxy mode is supported on this function */
15092 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PROXY_MODE_SUPPORT \
15093 		UINT32_C(0x10)
15094 	/*
15095 	 * If 1, the tx rings source interface override feature is supported
15096 	 * on this function.
15097 	 */
15098 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_TX_PROXY_SRC_INTF_OVERRIDE_SUPPORT \
15099 		UINT32_C(0x20)
15100 	/*
15101 	 * If 1, the device supports scheduler queues. SCHQs can be managed
15102 	 * using RING_SCHQ_ALLOC/CFG/FREE commands.
15103 	 */
15104 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_SCHQ_SUPPORTED \
15105 		UINT32_C(0x40)
15106 	/*
15107 	 * If set to 1, then this function supports the TX push mode that
15108 	 * uses ping-pong buffers from the push pages.
15109 	 */
15110 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PPP_PUSH_MODE_SUPPORTED \
15111 		UINT32_C(0x80)
15112 	/*
15113 	 * If set to 1, then this function doesn't have the privilege to
15114 	 * configure the EVB mode of the port it uses.
15115 	 */
15116 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_EVB_MODE_CFG_NOT_SUPPORTED \
15117 		UINT32_C(0x100)
15118 	/*
15119 	 * If set to 1, then the HW and FW support the SoC packet DMA
15120 	 * datapath between SoC and NIC. This function can act as the
15121 	 * HWRM communication transport agent on behalf of the SoC SPD
15122 	 * software module. This capability is only advertised to the
15123 	 * SoC PFs.
15124 	 */
15125 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_SOC_SPD_SUPPORTED \
15126 		UINT32_C(0x200)
15127 	/*
15128 	 * If set to 1, then this function supports FW_LIVEPATCH for
15129 	 * firmware livepatch commands.
15130 	 */
15131 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_FW_LIVEPATCH_SUPPORTED \
15132 		UINT32_C(0x400)
15133 	/*
15134 	 * When this bit is '1', it indicates that core firmware is
15135 	 * capable of fast Reset.
15136 	 */
15137 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_FAST_RESET_CAPABLE \
15138 		UINT32_C(0x800)
15139 	/*
15140 	 * When this bit is '1', it indicates that firmware and hardware
15141 	 * are capable of updating tx_metadata via hwrm_ring_cfg command.
15142 	 */
15143 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_TX_METADATA_CFG_CAPABLE \
15144 		UINT32_C(0x1000)
15145 	/*
15146 	 * If set to 1, then the device can report the action
15147 	 * needed to activate set nvm options.
15148 	 */
15149 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_NVM_OPTION_ACTION_SUPPORTED \
15150 		UINT32_C(0x2000)
15151 	/*
15152 	 * When this bit is '1', it indicates that the BD metadata feature
15153 	 * is supported for this function.
15154 	 */
15155 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_BD_METADATA_SUPPORTED \
15156 		UINT32_C(0x4000)
15157 	/*
15158 	 * When this bit is '1', it indicates that the echo request feature
15159 	 * is supported for this function. If the driver registers for the
15160 	 * echo request asynchronous event, then the firmware can send an
15161 	 * unsolicited echo request to the driver and expect an echo
15162 	 * response.
15163 	 */
15164 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_ECHO_REQUEST_SUPPORTED \
15165 		UINT32_C(0x8000)
15166 	/*
15167 	 * When this bit is '1', it indicates that core firmware supports
15168 	 * NPAR 1.2 on this function.
15169 	 */
15170 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_NPAR_1_2_SUPPORTED \
15171 		UINT32_C(0x10000)
15172 	/* When this bit is '1', it indicates that PTM feature is supported. */
15173 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PTP_PTM_SUPPORTED \
15174 		UINT32_C(0x20000)
15175 	/* When this bit is '1', it indicates that PPS feature is supported. */
15176 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PTP_PPS_SUPPORTED \
15177 		UINT32_C(0x40000)
15178 	/*
15179 	 * When this bit is '1', it indicates that VF config. change
15180 	 * async event is supported on the parent PF if the async.
15181 	 * event is registered by the PF.
15182 	 */
15183 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_VF_CFG_ASYNC_FOR_PF_SUPPORTED \
15184 		UINT32_C(0x80000)
15185 	/*
15186 	 * When this bit is '1', the NIC supports configuration of
15187 	 * partition_min_bw and partition_max_bw. Configuration of a
15188 	 * minimum guaranteed bandwidth is only supported if the
15189 	 * min_bw_supported flag is also set.
15190 	 */
15191 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PARTITION_BW_SUPPORTED \
15192 		UINT32_C(0x100000)
15193 	/*
15194 	 * When this bit is '1', the FW supports configuration of
15195 	 * PCP and TPID values of the default VLAN.
15196 	 */
15197 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_DFLT_VLAN_TPID_PCP_SUPPORTED \
15198 		UINT32_C(0x200000)
15199 	/* When this bit is '1', it indicates that HW and FW support KTLS. */
15200 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_KTLS_SUPPORTED \
15201 		UINT32_C(0x400000)
15202 	/*
15203 	 * When this bit is '1', the firmware supports HWRM_PORT_EP_TX_CFG
15204 	 * and HWRM_PORT_EP_TX_QCFG for endpoint rate control, and additions
15205 	 * to HWRM_QUEUE_GLOBAL_CFG and HWRM_QUEUE_GLOBAL_QCFG for receive
15206 	 * rate control. Configuration of a minimum guaranteed bandwidth
15207 	 * is only supported if the min_bw_supported flag is also set.
15208 	 */
15209 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_EP_RATE_CONTROL \
15210 		UINT32_C(0x800000)
15211 	/*
15212 	 * When this bit is '1', the firmware supports enforcement of
15213 	 * minimum guaranteed bandwidth. A minimum guaranteed bandwidth
15214 	 * could be configured for a partition or for an endpoint. Firmware
15215 	 * only sets this flag if one or both of the ep_rate_control and
15216 	 * partition_bw_supported flags are set.
15217 	 */
15218 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_MIN_BW_SUPPORTED \
15219 		UINT32_C(0x1000000)
15220 	/*
15221 	 * When this bit is '1', HW supports TX coalesced completion
15222 	 * records.
15223 	 */
15224 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_TX_COAL_CMPL_CAP \
15225 		UINT32_C(0x2000000)
15226 	/*
15227 	 * When this bit is '1', it indicates the FW has full support
15228 	 * for all backing store types with the BACKING_STORE_CFG/QCFG
15229 	 * V2 APIs.
15230 	 */
15231 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_BS_V2_SUPPORTED \
15232 		UINT32_C(0x4000000)
15233 	/*
15234 	 * When this bit is '1', it indicates the FW forces to use the
15235 	 * BACKING_STORE_CFG/QCFG V2 APIs.
15236 	 */
15237 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_BS_V2_REQUIRED \
15238 		UINT32_C(0x8000000)
15239 	/*
15240 	 * When this bit is '1', it indicates that FW will support a single
15241 	 * 64bit real time clock for PTP.
15242 	 */
15243 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_PTP_64BIT_RTC_SUPPORTED \
15244 		UINT32_C(0x10000000)
15245 	/*
15246 	 * When this bit is '1', it indicates the FW is capable of
15247 	 * supporting Doorbell Pacing.
15248 	 */
15249 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_DBR_PACING_SUPPORTED \
15250 		UINT32_C(0x20000000)
15251 	/*
15252 	 * When this bit is '1', it indicates the FW is capable of
15253 	 * supporting HW based doorbell drop recovery.
15254 	 */
15255 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_HW_DBR_DROP_RECOV_SUPPORTED \
15256 		UINT32_C(0x40000000)
15257 	/*
15258 	 * When this bit is '1', it indicates the driver can disable the CQ
15259 	 * overflow detection and can also skip the index updates for CQ.
15260 	 */
15261 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_DISABLE_CQ_OVERFLOW_DETECTION_SUPPORTED \
15262 		UINT32_C(0x80000000)
15263 	/* The maximum number of SCHQs supported by this device. */
15264 	uint8_t	max_schqs;
15265 	uint8_t	mpc_chnls_cap;
15266 	/*
15267 	 * When this bit is '1', it indicates that HW and firmware
15268 	 * supports the use of a MPC channel with destination set
15269 	 * to the TX crypto engine block.
15270 	 */
15271 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_TCE         UINT32_C(0x1)
15272 	/*
15273 	 * When this bit is '1', it indicates that HW and firmware
15274 	 * supports the use of a MPC channel with destination set
15275 	 * to the RX crypto engine block.
15276 	 */
15277 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_RCE         UINT32_C(0x2)
15278 	/*
15279 	 * When this bit is '1', it indicates that HW and firmware
15280 	 * supports the use of a MPC channel with destination set
15281 	 * to the TX configurable flow processing block.
15282 	 */
15283 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_TE_CFA      UINT32_C(0x4)
15284 	/*
15285 	 * When this bit is '1', it indicates that HW and firmware
15286 	 * supports the use of a MPC channel with destination set
15287 	 * to the RX configurable flow processing block.
15288 	 */
15289 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_RE_CFA      UINT32_C(0x8)
15290 	/*
15291 	 * When this bit is '1', it indicates that HW and firmware
15292 	 * supports the use of a MPC channel with destination set
15293 	 * to the primate processor block.
15294 	 */
15295 	#define HWRM_FUNC_QCAPS_OUTPUT_MPC_CHNLS_CAP_PRIMATE     UINT32_C(0x10)
15296 	/*
15297 	 * Maximum number of Key Contexts supported per HWRM
15298 	 * function call for allocating Key Contexts.
15299 	 */
15300 	uint16_t	max_key_ctxs_alloc;
15301 	uint32_t	flags_ext2;
15302 	/*
15303 	 * When this bit is '1', it indicates that FW will support
15304 	 * timestamping on all RX packets, not just PTP type packets.
15305 	 */
15306 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_RX_ALL_PKTS_TIMESTAMPS_SUPPORTED \
15307 		UINT32_C(0x1)
15308 	/* When this bit is '1', it indicates that HW and FW support QUIC. */
15309 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_QUIC_SUPPORTED \
15310 		UINT32_C(0x2)
15311 	/*
15312 	 * When this bit is '1', it indicates that KDNet mode is
15313 	 * supported on the port for this function. This bit is
15314 	 * never set for a VF.
15315 	 */
15316 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_KDNET_SUPPORTED \
15317 		UINT32_C(0x4)
15318 	/*
15319 	 * When this bit is '1', it indicates the FW is capable of
15320 	 * supporting Enhanced Doorbell Pacing.
15321 	 */
15322 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_DBR_PACING_EXT_SUPPORTED \
15323 		UINT32_C(0x8)
15324 	/*
15325 	 * When this bit is '1', it indicates that FW is capable of
15326 	 * supporting software based doorbell drop recovery.
15327 	 */
15328 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SW_DBR_DROP_RECOVERY_SUPPORTED \
15329 		UINT32_C(0x10)
15330 	/*
15331 	 * When this bit is '1', it indicates the FW supports collection
15332 	 * and query of the generic statistics.
15333 	 */
15334 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_GENERIC_STATS_SUPPORTED \
15335 		UINT32_C(0x20)
15336 	/*
15337 	 * When this bit is '1', it indicates that the HW is capable of
15338 	 * supporting UDP GSO on the function.
15339 	 */
15340 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_UDP_GSO_SUPPORTED \
15341 		UINT32_C(0x40)
15342 	/*
15343 	 * When this bit is '1', it indicates that SyncE feature is
15344 	 * supported.
15345 	 */
15346 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SYNCE_SUPPORTED \
15347 		UINT32_C(0x80)
15348 	/*
15349 	 * When this bit is '1', it indicates the FW is capable of
15350 	 * supporting doorbell pacing version 0. As doorbell pacing
15351 	 * notification from hardware for Thor2 is completely different
15352 	 * from Thor1, this flag is used to differentiate the doorbell
15353 	 * pacing notification between Thor1 and Thor2. Thor1 uses
15354 	 * dbr_pacing_supported and dbr_pacing_ext_supported flags for
15355 	 * doorbell pacing whereas Thor2 uses dbr_pacing_v0_supported flag.
15356 	 * These flags will never be set at the same time for Thor2.
15357 	 * Based on this flag, host drivers assume doorbell pacing is needed
15358 	 * for Thor2.
15359 	 */
15360 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_DBR_PACING_V0_SUPPORTED \
15361 		UINT32_C(0x100)
15362 	/*
15363 	 * When this bit is '1', it indicates that the HW supports
15364 	 * two-completion TX packet timestamp feature, a second completion
15365 	 * carrying packet TX timestamp in addition to the standard
15366 	 * completion returned for packets. Host driver should not use
15367 	 * HWRM port timestamp query (HWRM_PORT_TS_QUERY) command for
15368 	 * TX timestamp read when two-completion timestamp feature is
15369 	 * supported.
15370 	 */
15371 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_TX_PKT_TS_CMPL_SUPPORTED \
15372 		UINT32_C(0x200)
15373 	/*
15374 	 * When this bit is '1', it indicates that the hardware based
15375 	 * link aggregation group (L2 and RoCE) feature is supported.
15376 	 * This LAG feature is only supported on the THOR2 or newer NIC
15377 	 * with multiple ports.
15378 	 */
15379 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_HW_LAG_SUPPORTED \
15380 		UINT32_C(0x400)
15381 	/*
15382 	 * When this bit is '1', it indicates all contexts can be stored
15383 	 * on chip instead of using host based backing store memory.
15384 	 */
15385 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_ON_CHIP_CTX_SUPPORTED \
15386 		UINT32_C(0x800)
15387 	/*
15388 	 * When this bit is '1', it indicates that the HW supports
15389 	 * using a steering tag in the memory transactions targeting
15390 	 * L2 or RoCE ring resources.
15391 	 * Steering Tags are system-specific values that must follow the
15392 	 * encoding requirements of the hardware platform. On devices that
15393 	 * support steering to multiple address domains, a value of 0 in
15394 	 * bit 0 of the steering tag specifies the address is associated
15395 	 * with the SOC address space, and a value of 1 indicates the
15396 	 * address is associated with the host address space.
15397 	 */
15398 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_STEERING_TAG_SUPPORTED \
15399 		UINT32_C(0x1000)
15400 	/*
15401 	 * When this bit is '1', it indicates that driver can enable
15402 	 * support for an enhanced VF scale.
15403 	 */
15404 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_ENHANCED_VF_SCALE_SUPPORTED \
15405 		UINT32_C(0x2000)
15406 	/*
15407 	 * When this bit is '1', it indicates that FW is capable of
15408 	 * supporting partition based XID management for KTLS/QUIC
15409 	 * Tx/Rx Key Context types.
15410 	 */
15411 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_KEY_XID_PARTITION_SUPPORTED \
15412 		UINT32_C(0x4000)
15413 	/*
15414 	 * This bit is only valid on the condition that both
15415 	 * 'ktls_supported' and 'quic_supported' flags are set. When this
15416 	 * bit is valid, it conveys information below:
15417 	 * 1. If it is set to '1', it indicates that the firmware allows the
15418 	 *    driver to run KTLS and QUIC concurrently;
15419 	 * 2. If it is cleared to '0', it indicates that the driver has to
15420 	 *    make sure all crypto connections on all functions are of the
15421 	 *    same type, i.e., either KTLS or QUIC.
15422 	 */
15423 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_CONCURRENT_KTLS_QUIC_SUPPORTED \
15424 		UINT32_C(0x8000)
15425 	/*
15426 	 * When this bit is '1', it indicates that the device supports
15427 	 * setting a cross TC cap on a scheduler queue.
15428 	 */
15429 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SCHQ_CROSS_TC_CAP_SUPPORTED \
15430 		UINT32_C(0x10000)
15431 	/*
15432 	 * When this bit is '1', it indicates that the device supports
15433 	 * setting a per TC cap on a scheduler queue.
15434 	 */
15435 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SCHQ_PER_TC_CAP_SUPPORTED \
15436 		UINT32_C(0x20000)
15437 	/*
15438 	 * When this bit is '1', it indicates that the device supports
15439 	 * setting a per TC reservation on a scheduler queues.
15440 	 */
15441 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SCHQ_PER_TC_RESERVATION_SUPPORTED \
15442 		UINT32_C(0x40000)
15443 	/*
15444 	 * When this bit is '1', it indicates that firmware supports query
15445 	 * for statistics related to invalid doorbell errors and drops.
15446 	 */
15447 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_DB_ERROR_STATS_SUPPORTED \
15448 		UINT32_C(0x80000)
15449 	/*
15450 	 * When this bit is '1', it indicates that the device supports
15451 	 * VF RoCE resource management.
15452 	 */
15453 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_ROCE_VF_RESOURCE_MGMT_SUPPORTED \
15454 		UINT32_C(0x100000)
15455 	/*
15456 	 * When this bit is '1', it indicates that the device supports
15457 	 * UDCC management.
15458 	 */
15459 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_UDCC_SUPPORTED \
15460 		UINT32_C(0x200000)
15461 	/*
15462 	 * When this bit is '1', it indicates that the device supports Timed
15463 	 * Transmit TxTime scheduling; this is applicable to L2 flows only.
15464 	 * It is expected that host software assigns each packet a transmit
15465 	 * time and posts packets for transmit in time order. NIC hardware
15466 	 * transmits the packet at time assigned by software.
15467 	 */
15468 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_TIMED_TX_SO_TXTIME_SUPPORTED \
15469 		UINT32_C(0x400000)
15470 	/*
15471 	 * This bit indicates the method used for the advertisement of the
15472 	 * max resource limit for the PF and its VFs.
15473 	 * When this bit is '1', it indicates that the maximum resource
15474 	 * limits for both RoCE and L2 are software defined. These limits
15475 	 * are queried using the HWRM backing store qcaps v1
15476 	 * and v2(max_num_entries). For RoCE, the resource limits are
15477 	 * derived from nvm options. For L2, the resources will continue
15478 	 * to use FW enforced SW limits based on chip config and per PF
15479 	 * function NVM resource parameters.
15480 	 * If this bit is '0', the FW will use to legacy behavior.
15481 	 * For RoCE, the maximum resource values supported by the chip will
15482 	 * be returned. For L2, the maximum resource values returned will
15483 	 * be the FW enforced SW limits based on chip config and per PF
15484 	 * function NVM resource parameters.
15485 	 */
15486 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SW_MAX_RESOURCE_LIMITS_SUPPORTED \
15487 		UINT32_C(0x800000)
15488 	/*
15489 	 * When this bit is '1', it indicates that the device supports
15490 	 * migrating ingress NIC flows to Truflow.
15491 	 */
15492 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_TF_INGRESS_NIC_FLOW_SUPPORTED \
15493 		UINT32_C(0x1000000)
15494 	/*
15495 	 * When this bit is '1', it indicates that the Firmware supports
15496 	 * query and clear of the port loopback statistics.
15497 	 */
15498 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_LPBK_STATS_SUPPORTED \
15499 		UINT32_C(0x2000000)
15500 	uint16_t	tunnel_disable_flag;
15501 	/*
15502 	 * When this bit is '1', it indicates that the VXLAN parsing
15503 	 * is disabled in hardware
15504 	 */
15505 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_VXLAN \
15506 		UINT32_C(0x1)
15507 	/*
15508 	 * When this bit is '1', it indicates that the NGE parsing
15509 	 * is disabled in hardware
15510 	 */
15511 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NGE \
15512 		UINT32_C(0x2)
15513 	/*
15514 	 * When this bit is '1', it indicates that the NVGRE parsing
15515 	 * is disabled in hardware
15516 	 */
15517 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_NVGRE \
15518 		UINT32_C(0x4)
15519 	/*
15520 	 * When this bit is '1', it indicates that the L2GRE parsing
15521 	 * is disabled in hardware
15522 	 */
15523 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_L2GRE \
15524 		UINT32_C(0x8)
15525 	/*
15526 	 * When this bit is '1', it indicates that the GRE parsing
15527 	 * is disabled in hardware
15528 	 */
15529 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_GRE \
15530 		UINT32_C(0x10)
15531 	/*
15532 	 * When this bit is '1', it indicates that the IPINIP parsing
15533 	 * is disabled in hardware
15534 	 */
15535 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_IPINIP \
15536 		UINT32_C(0x20)
15537 	/*
15538 	 * When this bit is '1', it indicates that the MPLS parsing
15539 	 * is disabled in hardware
15540 	 */
15541 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_MPLS \
15542 		UINT32_C(0x40)
15543 	/*
15544 	 * When this bit is '1', it indicates that the PPPOE parsing
15545 	 * is disabled in hardware
15546 	 */
15547 	#define HWRM_FUNC_QCAPS_OUTPUT_TUNNEL_DISABLE_FLAG_DISABLE_PPPOE \
15548 		UINT32_C(0x80)
15549 	uint16_t	xid_partition_cap;
15550 	/*
15551 	 * When this bit is '1', it indicates that FW is capable of
15552 	 * supporting partition based XID management for Tx crypto
15553 	 * key contexts.
15554 	 */
15555 	#define HWRM_FUNC_QCAPS_OUTPUT_XID_PARTITION_CAP_TX_CK \
15556 		UINT32_C(0x1)
15557 	/*
15558 	 * When this bit is '1', it indicates that FW is capable of
15559 	 * supporting partition based XID management for Rx crypto
15560 	 * key contexts.
15561 	 */
15562 	#define HWRM_FUNC_QCAPS_OUTPUT_XID_PARTITION_CAP_RX_CK \
15563 		UINT32_C(0x2)
15564 	/*
15565 	 * This value uniquely identifies the hardware NIC used by the
15566 	 * function. The value returned will be the same for all functions.
15567 	 * A value of 00-00-00-00-00-00-00-00 indicates no device serial number
15568 	 * is currently configured. This is the same value that is returned by
15569 	 * PCIe Capability Device Serial Number.
15570 	 */
15571 	uint8_t	device_serial_number[8];
15572 	/*
15573 	 * This field is only valid in the XID partition mode. It indicates
15574 	 * the number contexts per partition.
15575 	 */
15576 	uint16_t	ctxs_per_partition;
15577 	uint8_t	unused_2[2];
15578 	/*
15579 	 * The maximum number of address vectors that may be allocated across
15580 	 * all VFs for the function. This is valid only on the PF with VF RoCE
15581 	 * (SR-IOV) enabled. Returns zero if this command is called on a PF
15582 	 * with VF RoCE (SR-IOV) disabled or on a VF.
15583 	 */
15584 	uint32_t	roce_vf_max_av;
15585 	/*
15586 	 * The maximum number of completion queues that may be allocated across
15587 	 * all VFs for the function. This is valid only on the PF with VF RoCE
15588 	 * (SR-IOV) enabled. Returns zero if this command is called on a PF
15589 	 * with VF RoCE (SR-IOV) disabled or on a VF.
15590 	 */
15591 	uint32_t	roce_vf_max_cq;
15592 	/*
15593 	 * The maximum number of memory regions plus memory windows that may be
15594 	 * allocated across all VFs for the function. This is valid only on the
15595 	 * PF with VF RoCE (SR-IOV) enabled. Returns zero if this command is
15596 	 * called on a PF with VF RoCE (SR-IOV) disabled or on a VF.
15597 	 */
15598 	uint32_t	roce_vf_max_mrw;
15599 	/*
15600 	 * The maximum number of queue pairs that may be allocated across
15601 	 * all VFs for the function. This is valid only on the PF with VF RoCE
15602 	 * (SR-IOV) enabled. Returns zero if this command is called on a PF
15603 	 * with VF RoCE (SR-IOV) disabled or on a VF.
15604 	 */
15605 	uint32_t	roce_vf_max_qp;
15606 	/*
15607 	 * The maximum number of shared receive queues that may be allocated
15608 	 * across all VFs for the function. This is valid only on the PF with
15609 	 * VF RoCE (SR-IOV) enabled. Returns zero if this command is called on
15610 	 * a PF with VF RoCE (SR-IOV) disabled or on a VF.
15611 	 */
15612 	uint32_t	roce_vf_max_srq;
15613 	/*
15614 	 * The maximum number of GIDs that may be allocated across all VFs for
15615 	 * the function. This is valid only on the PF with VF RoCE (SR-IOV)
15616 	 * enabled. Returns zero if this command is called on a PF with VF RoCE
15617 	 * (SR-IOV) disabled or on a VF.
15618 	 */
15619 	uint32_t	roce_vf_max_gid;
15620 	uint32_t	flags_ext3;
15621 	/*
15622 	 * When this bit is '1', firmware supports the driver using
15623 	 * FUNC_CFG (or FUNC_VF_CFG) to decrease resource reservations
15624 	 * while some resources are still allocated. An error is returned
15625 	 * if the driver tries to set the reservation to be less than the
15626 	 * number of allocated resources.
15627 	 */
15628 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_RM_RSV_WHILE_ALLOC_CAP \
15629 		UINT32_C(0x1)
15630 	/*
15631 	 * When this bit is '1', the PF requires an L2 filter to be
15632 	 * allocated by the driver using HWRM_CFA_L2_FILTER_ALLOC after
15633 	 * bringing the interface up, before traffic is sent.
15634 	 */
15635 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_REQUIRE_L2_FILTER \
15636 		UINT32_C(0x2)
15637 	/*
15638 	 * When set to 1, indicates the field max_roce_vfs in the structure
15639 	 * is valid. If this bit is 0, the driver should not use the
15640 	 * 'max_roce_vfs' field.
15641 	 */
15642 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_MAX_ROCE_VFS_SUPPORTED \
15643 		UINT32_C(0x4)
15644 	/*
15645 	 * When set to 1, indicates the field 'rx_rate_profile_sel' in
15646 	 * RING_ALLOC can specify a valid RX rate profile when allocating
15647 	 * RX or RX aggregation rings. If this bit is 0, the driver
15648 	 * should not use the 'rx_rate_profile_sel' field.
15649 	 */
15650 	#define HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT3_RX_RATE_PROFILE_SEL_SUPPORTED \
15651 		UINT32_C(0x8)
15652 	/*
15653 	 * The number of VFs that can be used for RoCE on the function. If less
15654 	 * than max_vfs, roce vfs will be assigned to the first VF of the
15655 	 * function and be contiguous.
15656 	 * This is valid only on the PF with SR-IOV and RDMA enabled.
15657 	 */
15658 	uint16_t	max_roce_vfs;
15659 	uint8_t	unused_3[5];
15660 	/*
15661 	 * This field is used in Output records to indicate that the output
15662 	 * is completely written to RAM. This field should be read as '1'
15663 	 * to indicate that the output has been completely written.
15664 	 * When writing a command completion or response to an internal
15665 	 * processor, the order of writes has to be such that this field is
15666 	 * written last.
15667 	 */
15668 	uint8_t	valid;
15669 } __rte_packed_end;
15670 
15671 /******************
15672  * hwrm_func_qcfg *
15673  ******************/
15674 
15675 
15676 /* hwrm_func_qcfg_input (size:192b/24B) */
15677 struct __rte_packed_begin hwrm_func_qcfg_input {
15678 	/* The HWRM command request type. */
15679 	uint16_t	req_type;
15680 	/*
15681 	 * The completion ring to send the completion event on. This should
15682 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
15683 	 */
15684 	uint16_t	cmpl_ring;
15685 	/*
15686 	 * The sequence ID is used by the driver for tracking multiple
15687 	 * commands. This ID is treated as opaque data by the firmware and
15688 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
15689 	 */
15690 	uint16_t	seq_id;
15691 	/*
15692 	 * The target ID of the command:
15693 	 * * 0x0-0xFFF8 - The function ID
15694 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
15695 	 * * 0xFFFD - Reserved for user-space HWRM interface
15696 	 * * 0xFFFF - HWRM
15697 	 */
15698 	uint16_t	target_id;
15699 	/*
15700 	 * A physical address pointer pointing to a host buffer that the
15701 	 * command's response data will be written. This can be either a host
15702 	 * physical address (HPA) or a guest physical address (GPA) and must
15703 	 * point to a physically contiguous block of memory.
15704 	 */
15705 	uint64_t	resp_addr;
15706 	/*
15707 	 * Function ID of the function that is being queried.
15708 	 * 0xFF... (All Fs) if the query is for the requesting
15709 	 * function.
15710 	 * 0xFFFE (REQUESTING_PARENT_FID) This is a special FID
15711 	 * to be used by a trusted VF to query its parent PF.
15712 	 */
15713 	uint16_t	fid;
15714 	uint8_t	unused_0[6];
15715 } __rte_packed_end;
15716 
15717 /* hwrm_func_qcfg_output (size:1280b/160B) */
15718 struct __rte_packed_begin hwrm_func_qcfg_output {
15719 	/* The specific error status for the command. */
15720 	uint16_t	error_code;
15721 	/* The HWRM command request type. */
15722 	uint16_t	req_type;
15723 	/* The sequence ID from the original command. */
15724 	uint16_t	seq_id;
15725 	/* The length of the response data in number of bytes. */
15726 	uint16_t	resp_len;
15727 	/*
15728 	 * FID value. This value is used to identify operations on the PCI
15729 	 * bus as belonging to a particular PCI function.
15730 	 */
15731 	uint16_t	fid;
15732 	/*
15733 	 * Port ID of port that this function is associated with.
15734 	 * 0xFF... (All Fs) if this function is not associated with
15735 	 * any port.
15736 	 */
15737 	uint16_t	port_id;
15738 	/*
15739 	 * This value is the current VLAN setting for this
15740 	 * function. The value of 0 for this field indicates
15741 	 * no priority tagging or VLAN is used.
15742 	 * This field's format is same as 802.1Q Tag's
15743 	 * Tag Control Information (TCI) format that includes both
15744 	 * Priority Code Point (PCP) and VLAN Identifier (VID).
15745 	 */
15746 	uint16_t	vlan;
15747 	uint16_t	flags;
15748 	/*
15749 	 * If 1, then magic packet based Out-Of-Box WoL is enabled on
15750 	 * the port associated with this function.
15751 	 */
15752 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_OOB_WOL_MAGICPKT_ENABLED \
15753 		UINT32_C(0x1)
15754 	/*
15755 	 * If 1, then bitmap pattern based Out-Of-Box WoL packet is enabled
15756 	 * on the port associated with this function.
15757 	 */
15758 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_OOB_WOL_BMP_ENABLED \
15759 		UINT32_C(0x2)
15760 	/*
15761 	 * If set to 1, then FW based DCBX agent is enabled and running on
15762 	 * the port associated with this function.
15763 	 * If set to 0, then DCBX agent is not running in the firmware.
15764 	 */
15765 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_FW_DCBX_AGENT_ENABLED \
15766 		UINT32_C(0x4)
15767 	/*
15768 	 * Standard TX Ring mode is used for the allocation of TX ring
15769 	 * and underlying scheduling resources that allow bandwidth
15770 	 * reservation and limit settings on the queried function.
15771 	 * If set to 1, then standard TX ring mode is enabled
15772 	 * on the queried function.
15773 	 * If set to 0, then the standard TX ring mode is disabled
15774 	 * on the queried function. In this extended TX ring resource
15775 	 * mode, the minimum and maximum bandwidth settings are not
15776 	 * supported to allow the allocation of TX rings to span multiple
15777 	 * scheduler nodes.
15778 	 */
15779 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_STD_TX_RING_MODE_ENABLED \
15780 		UINT32_C(0x8)
15781 	/*
15782 	 * If set to 1 then FW based LLDP agent is enabled and running on
15783 	 * the port associated with this function.
15784 	 * If set to 0 then the LLDP agent is not running in the firmware.
15785 	 */
15786 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_FW_LLDP_AGENT_ENABLED \
15787 		UINT32_C(0x10)
15788 	/*
15789 	 * If set to 1, then multi-host mode is active for this function.
15790 	 * The NIC is attached to two or more independent host systems
15791 	 * through two or more PCIe endpoints.
15792 	 * If set to 0, then multi-host mode is inactive for this function
15793 	 * or not applicable for this device.
15794 	 */
15795 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_HOST \
15796 		UINT32_C(0x20)
15797 	/*
15798 	 * If the function that is being queried is a PF, then the HWRM shall
15799 	 * set this field to 0 and the HWRM client shall ignore this field.
15800 	 * If the function that is being queried is a VF, then the HWRM shall
15801 	 * set this field to 1 if the queried VF is trusted, otherwise the
15802 	 * HWRM shall set this field to 0.
15803 	 */
15804 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_TRUSTED_VF \
15805 		UINT32_C(0x40)
15806 	/*
15807 	 * If set to 1, then secure mode is enabled for this function or
15808 	 * device. If set to 0, then secure mode is disabled (or normal mode)
15809 	 * for this function or device.
15810 	 */
15811 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_SECURE_MODE_ENABLED \
15812 		UINT32_C(0x80)
15813 	/*
15814 	 * If set to 1, then this PF is enabled with a preboot driver that
15815 	 * requires access to the legacy L2 ring model and legacy 32b
15816 	 * doorbells. If set to 0, then this PF is not allowed to use
15817 	 * the legacy L2 rings. This feature is not allowed on VFs and
15818 	 * is only relevant for devices that require a context backing
15819 	 * store.
15820 	 */
15821 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_PREBOOT_LEGACY_L2_RINGS \
15822 		UINT32_C(0x100)
15823 	/*
15824 	 * If set to 1, then the firmware and all currently registered driver
15825 	 * instances support hot reset. The hot reset support will be updated
15826 	 * dynamically based on the driver interface advertisement.
15827 	 * If set to 0, then the adapter is not currently able to initiate
15828 	 * hot reset.
15829 	 */
15830 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_HOT_RESET_ALLOWED \
15831 		UINT32_C(0x200)
15832 	/*
15833 	 * If set to 1, then the PPP tx push mode is enabled for all the
15834 	 * reserved TX rings of this function. If set to 0, then PPP tx push
15835 	 * mode is disabled for all the reserved TX rings of this function.
15836 	 */
15837 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_PPP_PUSH_MODE_ENABLED \
15838 		UINT32_C(0x400)
15839 	/*
15840 	 * If set to 1, then the firmware will notify driver using async
15841 	 * event when a ring is disabled due to a Hardware error.
15842 	 */
15843 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_RING_MONITOR_ENABLED \
15844 		UINT32_C(0x800)
15845 	/*
15846 	 * If set to 1, then the firmware and all currently registered driver
15847 	 * instances support fast reset. The fast reset support will be
15848 	 * updated dynamically based on the driver interface advertisement.
15849 	 * If set to 0, then the adapter is not currently able to initiate
15850 	 * fast reset.
15851 	 */
15852 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_FAST_RESET_ALLOWED \
15853 		UINT32_C(0x1000)
15854 	/*
15855 	 * If set to 1, then multi-root mode is active for this function.
15856 	 * The NIC is attached to a single host with a single operating
15857 	 * system, but through two or more PCIe endpoints.
15858 	 * If set to 0, then multi-root mode is inactive for this function
15859 	 * or not applicable for this device.
15860 	 */
15861 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_MULTI_ROOT \
15862 		UINT32_C(0x2000)
15863 	/*
15864 	 * This flag indicates RDMA support for child VFS of
15865 	 * a physical function.
15866 	 * If set to 1, RoCE is supported on all child VFs.
15867 	 * If set to 0, RoCE is disabled on all child VFs.
15868 	 */
15869 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_ENABLE_RDMA_SRIOV \
15870 		UINT32_C(0x4000)
15871 	/*
15872 	 * When set to 1, indicates the field roce_vnic_id in the structure
15873 	 * is valid. If this bit is 0, the driver should not use the
15874 	 * 'roce_vnic_id' field.
15875 	 */
15876 	#define HWRM_FUNC_QCFG_OUTPUT_FLAGS_ROCE_VNIC_ID_VALID \
15877 		UINT32_C(0x8000)
15878 	/*
15879 	 * This value is current MAC address configured for this
15880 	 * function. A value of 00-00-00-00-00-00 indicates no
15881 	 * MAC address is currently configured.
15882 	 */
15883 	uint8_t	mac_address[6];
15884 	/*
15885 	 * This value is current PCI ID of this
15886 	 * function. If ARI is enabled, then it is
15887 	 * Bus Number (8b):Function Number(8b). Otherwise, it is
15888 	 * Bus Number (8b):Device Number (4b):Function Number(4b).
15889 	 * If multi-host mode is active, the 4 lsb will indicate
15890 	 * the PF index for this function.
15891 	 */
15892 	uint16_t	pci_id;
15893 	/*
15894 	 * The number of RSS/COS contexts currently
15895 	 * allocated to the function.
15896 	 */
15897 	uint16_t	alloc_rsscos_ctx;
15898 	/*
15899 	 * The number of completion rings currently allocated to
15900 	 * the function. This does not include the rings allocated
15901 	 * to any children functions if any.
15902 	 */
15903 	uint16_t	alloc_cmpl_rings;
15904 	/*
15905 	 * The number of transmit rings currently allocated to
15906 	 * the function. This does not include the rings allocated
15907 	 * to any children functions if any.
15908 	 */
15909 	uint16_t	alloc_tx_rings;
15910 	/*
15911 	 * The number of receive rings currently allocated to
15912 	 * the function. This does not include the rings allocated
15913 	 * to any children functions if any.
15914 	 */
15915 	uint16_t	alloc_rx_rings;
15916 	/* The allocated number of L2 contexts to the function. */
15917 	uint16_t	alloc_l2_ctx;
15918 	/* The allocated number of vnics to the function. */
15919 	uint16_t	alloc_vnics;
15920 	/*
15921 	 * The maximum transmission unit of the function
15922 	 * configured by the admin pf.
15923 	 * If the reported mtu value is non-zero then it will be used for the
15924 	 * rings allocated on this function, otherwise the default
15925 	 * value is used if ring MTU is not specified.
15926 	 * The driver cannot use any MTU bigger than this value
15927 	 * if it is non-zero.
15928 	 */
15929 	uint16_t	admin_mtu;
15930 	/*
15931 	 * The maximum receive unit of the function.
15932 	 * For vnics allocated on this function, this default
15933 	 * value is used if vnic MRU is not specified.
15934 	 */
15935 	uint16_t	mru;
15936 	/* The statistics context assigned to a function. */
15937 	uint16_t	stat_ctx_id;
15938 	/*
15939 	 * The HWRM shall return Unknown value for this field
15940 	 * when this command is used to query VF's configuration.
15941 	 */
15942 	uint8_t	port_partition_type;
15943 	/* Single physical function */
15944 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_SPF     UINT32_C(0x0)
15945 	/* Multiple physical functions */
15946 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_MPFS    UINT32_C(0x1)
15947 	/* Network Partitioning 1.0 */
15948 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_0 UINT32_C(0x2)
15949 	/* Network Partitioning 1.5 */
15950 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_5 UINT32_C(0x3)
15951 	/* Network Partitioning 2.0 */
15952 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR2_0 UINT32_C(0x4)
15953 	/* Network Partitioning 1.2 */
15954 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_NPAR1_2 UINT32_C(0x5)
15955 	/* Unknown */
15956 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_UNKNOWN \
15957 		UINT32_C(0xff)
15958 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_LAST \
15959 		HWRM_FUNC_QCFG_OUTPUT_PORT_PARTITION_TYPE_UNKNOWN
15960 	/*
15961 	 * This field will indicate number of physical functions on this
15962 	 * port_partition. HWRM shall return unavail (i.e. value of 0) for this
15963 	 * field when this command is used to query VF's configuration or from
15964 	 * older firmware that doesn't support this field.
15965 	 */
15966 	uint8_t	port_pf_cnt;
15967 	/* number of PFs is not available */
15968 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PF_CNT_UNAVAIL UINT32_C(0x0)
15969 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_PF_CNT_LAST \
15970 		HWRM_FUNC_QCFG_OUTPUT_PORT_PF_CNT_UNAVAIL
15971 	/*
15972 	 * The default VNIC ID assigned to a function that is
15973 	 * being queried.
15974 	 */
15975 	uint16_t	dflt_vnic_id;
15976 	uint16_t	max_mtu_configured;
15977 	/*
15978 	 * Minimum guaranteed transmit bandwidth for this function. When
15979 	 * specified for a PF, does not affect traffic from the PF's child VFs.
15980 	 * A value of 0 indicates the minimum bandwidth is not configured.
15981 	 */
15982 	uint32_t	min_bw;
15983 	/* The bandwidth value. */
15984 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_MASK \
15985 		UINT32_C(0xfffffff)
15986 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_SFT              0
15987 	/* The granularity of the value (bits or bytes). */
15988 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_SCALE \
15989 		UINT32_C(0x10000000)
15990 	/* Value is in bits. */
15991 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_SCALE_BITS \
15992 		(UINT32_C(0x0) << 28)
15993 	/* Value is in bytes. */
15994 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_SCALE_BYTES \
15995 		(UINT32_C(0x1) << 28)
15996 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_SCALE_LAST \
15997 		HWRM_FUNC_QCFG_OUTPUT_MIN_BW_SCALE_BYTES
15998 	/* bw_value_unit is 3 b */
15999 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_MASK \
16000 		UINT32_C(0xe0000000)
16001 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_SFT         29
16002 	/* Value is in Mb or MB (base 10). */
16003 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_MEGA \
16004 		(UINT32_C(0x0) << 29)
16005 	/* Value is in Kb or KB (base 10). */
16006 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_KILO \
16007 		(UINT32_C(0x2) << 29)
16008 	/* Value is in bits or bytes. */
16009 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_BASE \
16010 		(UINT32_C(0x4) << 29)
16011 	/* Value is in Gb or GB (base 10). */
16012 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_GIGA \
16013 		(UINT32_C(0x6) << 29)
16014 	/* Value is in 1/100th of a percentage of link bandwidth. */
16015 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
16016 		(UINT32_C(0x1) << 29)
16017 	/* Invalid unit */
16018 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_INVALID \
16019 		(UINT32_C(0x7) << 29)
16020 	#define HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_LAST \
16021 		HWRM_FUNC_QCFG_OUTPUT_MIN_BW_BW_VALUE_UNIT_INVALID
16022 	/*
16023 	 * Maximum transmit rate for this function. When specified for a PF,
16024 	 * does not affect traffic from the PF's child VFs.
16025 	 * A value of 0 indicates that the maximum bandwidth is not configured.
16026 	 */
16027 	uint32_t	max_bw;
16028 	/* The bandwidth value. */
16029 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_MASK \
16030 		UINT32_C(0xfffffff)
16031 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_SFT              0
16032 	/* The granularity of the value (bits or bytes). */
16033 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_SCALE \
16034 		UINT32_C(0x10000000)
16035 	/* Value is in bits. */
16036 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_SCALE_BITS \
16037 		(UINT32_C(0x0) << 28)
16038 	/* Value is in bytes. */
16039 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_SCALE_BYTES \
16040 		(UINT32_C(0x1) << 28)
16041 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_SCALE_LAST \
16042 		HWRM_FUNC_QCFG_OUTPUT_MAX_BW_SCALE_BYTES
16043 	/* bw_value_unit is 3 b */
16044 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_MASK \
16045 		UINT32_C(0xe0000000)
16046 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_SFT         29
16047 	/* Value is in Mb or MB (base 10). */
16048 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_MEGA \
16049 		(UINT32_C(0x0) << 29)
16050 	/* Value is in Kb or KB (base 10). */
16051 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_KILO \
16052 		(UINT32_C(0x2) << 29)
16053 	/* Value is in bits or bytes. */
16054 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_BASE \
16055 		(UINT32_C(0x4) << 29)
16056 	/* Value is in Gb or GB (base 10). */
16057 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_GIGA \
16058 		(UINT32_C(0x6) << 29)
16059 	/* Value is in 1/100th of a percentage of link bandwidth. */
16060 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
16061 		(UINT32_C(0x1) << 29)
16062 	/* Invalid unit */
16063 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_INVALID \
16064 		(UINT32_C(0x7) << 29)
16065 	#define HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_LAST \
16066 		HWRM_FUNC_QCFG_OUTPUT_MAX_BW_BW_VALUE_UNIT_INVALID
16067 	/*
16068 	 * This value indicates the Edge virtual bridge mode for the
16069 	 * domain that this function belongs to.
16070 	 */
16071 	uint8_t	evb_mode;
16072 	/* No Edge Virtual Bridging (EVB) */
16073 	#define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_NO_EVB UINT32_C(0x0)
16074 	/* Virtual Ethernet Bridge (VEB) */
16075 	#define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_VEB    UINT32_C(0x1)
16076 	/* Virtual Ethernet Port Aggregator (VEPA) */
16077 	#define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_VEPA   UINT32_C(0x2)
16078 	#define HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_LAST \
16079 		HWRM_FUNC_QCFG_OUTPUT_EVB_MODE_VEPA
16080 	uint8_t	options;
16081 	/*
16082 	 * This value indicates the PCIE device cache line size.
16083 	 * The cache line size allows the DMA writes to terminate and
16084 	 * start at the cache boundary.
16085 	 */
16086 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_MASK \
16087 		UINT32_C(0x3)
16088 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_SFT          0
16089 	/* Cache Line Size 64 bytes */
16090 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_SIZE_64 \
16091 		UINT32_C(0x0)
16092 	/* Cache Line Size 128 bytes */
16093 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_SIZE_128 \
16094 		UINT32_C(0x1)
16095 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_LAST \
16096 		HWRM_FUNC_QCFG_OUTPUT_OPTIONS_CACHE_LINESIZE_SIZE_128
16097 	/* This value is the virtual link admin state setting. */
16098 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_MASK \
16099 		UINT32_C(0xc)
16100 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_SFT        2
16101 	/* Admin link state is in forced down mode. */
16102 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_FORCED_DOWN \
16103 		(UINT32_C(0x0) << 2)
16104 	/* Admin link state is in forced up mode. */
16105 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_FORCED_UP \
16106 		(UINT32_C(0x1) << 2)
16107 	/*
16108 	 * Admin link state is in auto mode - follows the physical link
16109 	 * state.
16110 	 */
16111 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_AUTO \
16112 		(UINT32_C(0x2) << 2)
16113 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_LAST \
16114 		HWRM_FUNC_QCFG_OUTPUT_OPTIONS_LINK_ADMIN_STATE_AUTO
16115 	/* Reserved for future. */
16116 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_RSVD_MASK \
16117 		UINT32_C(0xf0)
16118 	#define HWRM_FUNC_QCFG_OUTPUT_OPTIONS_RSVD_SFT                    4
16119 	/*
16120 	 * The number of VFs that are allocated to the function.
16121 	 * This is valid only on the PF with SR-IOV enabled.
16122 	 * 0xFF... (All Fs) if this command is called on a PF with
16123 	 * SR-IOV disabled or on a VF.
16124 	 */
16125 	uint16_t	alloc_vfs;
16126 	/*
16127 	 * The number of allocated multicast filters for this
16128 	 * function on the RX side.
16129 	 */
16130 	uint32_t	alloc_mcast_filters;
16131 	/*
16132 	 * The number of allocated HW ring groups for this
16133 	 * function.
16134 	 */
16135 	uint32_t	alloc_hw_ring_grps;
16136 	/*
16137 	 * The number of strict priority transmit rings out of
16138 	 * currently allocated TX rings to the function
16139 	 * (alloc_tx_rings).
16140 	 */
16141 	uint16_t	alloc_sp_tx_rings;
16142 	/*
16143 	 * The number of statistics contexts
16144 	 * currently reserved for the function.
16145 	 */
16146 	uint16_t	alloc_stat_ctx;
16147 	/*
16148 	 * This field specifies how many NQs are reserved for the PF.
16149 	 * Remaining NQs that belong to the PF are available for VFs.
16150 	 * Once a PF has created VFs, it cannot change how many NQs are
16151 	 * reserved for itself (since the NQs must be contiguous in HW).
16152 	 */
16153 	uint16_t	alloc_msix;
16154 	/*
16155 	 * The number of registered VF's associated with the PF. This field
16156 	 * should be ignored when the request received on the VF interface.
16157 	 * This field will be updated on the PF interface to initiate
16158 	 * the unregister request on PF in the HOT Reset Process.
16159 	 */
16160 	uint16_t	registered_vfs;
16161 	/*
16162 	 * The size of the doorbell BAR in KBytes reserved for L2 including
16163 	 * any area that is shared between L2 and RoCE. The L2 driver
16164 	 * should only map the L2 portion of the doorbell BAR. Any rounding
16165 	 * of the BAR size to the native CPU page size should be performed
16166 	 * by the driver. If the value is zero, no special partitioning
16167 	 * of the doorbell BAR between L2 and RoCE is required.
16168 	 */
16169 	uint16_t	l2_doorbell_bar_size_kb;
16170 	/*
16171 	 * A bitmask indicating the active endpoints. Each bit represents a
16172 	 * specific endpoint, with bit 0 indicating EP 0 and bit 3 indicating
16173 	 * EP 3. For example:
16174 	 * - a single root system would return 0x1
16175 	 * - a 2x8 system (where EPs 0 and 2 are active) would return 0x5
16176 	 * - a 4x4 system (where EPs 0-3 are active) would return 0xF
16177 	 */
16178 	uint8_t	active_endpoints;
16179 	/*
16180 	 * For backward compatibility this field must be set to 1.
16181 	 * Older drivers might look for this field to be 1 before
16182 	 * processing the message.
16183 	 */
16184 	uint8_t	always_1;
16185 	/*
16186 	 * This GRC address location is used by the Host driver interfaces to
16187 	 * poll the adapter ready state to re-initiate the registration process
16188 	 * again after receiving the RESET Notify event.
16189 	 */
16190 	uint32_t	reset_addr_poll;
16191 	/*
16192 	 * This field specifies legacy L2 doorbell size in KBytes. Drivers
16193 	 * should use this value to find out the doorbell page offset from the
16194 	 * BAR.
16195 	 */
16196 	uint16_t	legacy_l2_db_size_kb;
16197 	uint16_t	svif_info;
16198 	/*
16199 	 * This field specifies the source virtual interface of the function
16200 	 * being queried. Drivers can use this to program svif field in the
16201 	 * L2 context table
16202 	 */
16203 	#define HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_MASK      UINT32_C(0x7fff)
16204 	#define HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_SFT       0
16205 	/* This field specifies whether svif is valid or not */
16206 	#define HWRM_FUNC_QCFG_OUTPUT_SVIF_INFO_SVIF_VALID     UINT32_C(0x8000)
16207 	uint8_t	mpc_chnls;
16208 	/*
16209 	 * When this bit is '1', it indicates that a MPC channel with
16210 	 * destination set to the TX crypto engine block is enabled.
16211 	 */
16212 	#define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_TCE_ENABLED \
16213 		UINT32_C(0x1)
16214 	/*
16215 	 * When this bit is '1', it indicates that a MPC channel with
16216 	 * destination set to the RX crypto engine block is enabled.
16217 	 */
16218 	#define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_RCE_ENABLED \
16219 		UINT32_C(0x2)
16220 	/*
16221 	 * When this bit is '1', it indicates that a MPC channel with
16222 	 * destination set to the TX configurable flow processing block is
16223 	 * enabled.
16224 	 */
16225 	#define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_TE_CFA_ENABLED \
16226 		UINT32_C(0x4)
16227 	/*
16228 	 * When this bit is '1', it indicates that a MPC channel with
16229 	 * destination set to the RX configurable flow processing block is
16230 	 * enabled.
16231 	 */
16232 	#define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_RE_CFA_ENABLED \
16233 		UINT32_C(0x8)
16234 	/*
16235 	 * When this bit is '1', it indicates that a MPC channel with
16236 	 * destination set to the primate processor block is enabled.
16237 	 */
16238 	#define HWRM_FUNC_QCFG_OUTPUT_MPC_CHNLS_PRIMATE_ENABLED \
16239 		UINT32_C(0x10)
16240 	/*
16241 	 * Configured doorbell page size for this function.
16242 	 * This field is valid for PF only.
16243 	 */
16244 	uint8_t	db_page_size;
16245 	/* DB page size is 4KB. */
16246 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_4KB   UINT32_C(0x0)
16247 	/* DB page size is 8KB. */
16248 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_8KB   UINT32_C(0x1)
16249 	/* DB page size is 16KB. */
16250 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_16KB  UINT32_C(0x2)
16251 	/* DB page size is 32KB. */
16252 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_32KB  UINT32_C(0x3)
16253 	/* DB page size is 64KB. */
16254 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_64KB  UINT32_C(0x4)
16255 	/* DB page size is 128KB. */
16256 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_128KB UINT32_C(0x5)
16257 	/* DB page size is 256KB. */
16258 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_256KB UINT32_C(0x6)
16259 	/* DB page size is 512KB. */
16260 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_512KB UINT32_C(0x7)
16261 	/* DB page size is 1MB. */
16262 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_1MB   UINT32_C(0x8)
16263 	/* DB page size is 2MB. */
16264 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_2MB   UINT32_C(0x9)
16265 	/* DB page size is 4MB. */
16266 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_4MB   UINT32_C(0xa)
16267 	#define HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_LAST \
16268 		HWRM_FUNC_QCFG_OUTPUT_DB_PAGE_SIZE_4MB
16269 	/*
16270 	 * RoCE VNIC ID for the function. If the function does not have a valid
16271 	 * RoCE vnic id, then the roce_vnic_id_valid bit in flags is set to 0.
16272 	 */
16273 	uint16_t	roce_vnic_id;
16274 	/*
16275 	 * Minimum guaranteed bandwidth for the network partition made up
16276 	 * of the caller physical function and all its child virtual
16277 	 * functions. The rate is specified as a percentage of the bandwidth
16278 	 * of the link the partition is associated with. A value of 0
16279 	 * indicates that no minimum bandwidth is configured.
16280 	 * The format of this field is defined to match min_bw, even though
16281 	 * the partition minimum rate is always specified as a percentage.
16282 	 */
16283 	uint32_t	partition_min_bw;
16284 	/* The bandwidth value. */
16285 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_MASK \
16286 		UINT32_C(0xfffffff)
16287 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_SFT \
16288 		0
16289 	/*
16290 	 * The granularity of the value (bits or bytes). Firmware never sets
16291 	 * this field.
16292 	 */
16293 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_SCALE \
16294 		UINT32_C(0x10000000)
16295 	/* Value is in bits. */
16296 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_SCALE_BITS \
16297 		(UINT32_C(0x0) << 28)
16298 	/* Value is in bytes. */
16299 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_SCALE_BYTES \
16300 		(UINT32_C(0x1) << 28)
16301 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_SCALE_LAST \
16302 		HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_SCALE_BYTES
16303 	/* Always percentage of link bandwidth. */
16304 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_MASK \
16305 		UINT32_C(0xe0000000)
16306 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_SFT \
16307 		29
16308 	/* Bandwidth value is in hundredths of a percent of link bandwidth. */
16309 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
16310 		(UINT32_C(0x1) << 29)
16311 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_LAST \
16312 		HWRM_FUNC_QCFG_OUTPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_PERCENT1_100
16313 	/*
16314 	 * The maximum bandwidth that may be used by the network partition
16315 	 * made up of the caller physical function and all its child virtual
16316 	 * functions. The rate is specified as a percentage of the bandwidth
16317 	 * of the link the partition is associated with. A value of 0
16318 	 * indicates that no maximum bandwidth is configured.
16319 	 * The format of this field is defined to match max_bw, even though
16320 	 * the partition bandwidth must be specified as a percentage.
16321 	 */
16322 	uint32_t	partition_max_bw;
16323 	/* The bandwidth value. */
16324 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_MASK \
16325 		UINT32_C(0xfffffff)
16326 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_SFT \
16327 		0
16328 	/*
16329 	 * The granularity of the value (bits or bytes). Firmware never sets
16330 	 * this field.
16331 	 */
16332 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_SCALE \
16333 		UINT32_C(0x10000000)
16334 	/* Value is in bits. */
16335 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_SCALE_BITS \
16336 		(UINT32_C(0x0) << 28)
16337 	/* Value is in bytes. */
16338 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_SCALE_BYTES \
16339 		(UINT32_C(0x1) << 28)
16340 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_SCALE_LAST \
16341 		HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_SCALE_BYTES
16342 	/* Always a percentage of link bandwidth. */
16343 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_MASK \
16344 		UINT32_C(0xe0000000)
16345 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_SFT \
16346 		29
16347 	/* Value is in hundredths of a percent of link bandwidth. */
16348 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
16349 		(UINT32_C(0x1) << 29)
16350 	#define HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_LAST \
16351 		HWRM_FUNC_QCFG_OUTPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_PERCENT1_100
16352 	/*
16353 	 * The maximum transmission unit of the function
16354 	 * configured by the host pf/vf.
16355 	 * If the reported mtu value is non-zero then it will be used for the
16356 	 * rings allocated on this function, otherwise the default
16357 	 * value is used if ring MTU is not specified.
16358 	 */
16359 	uint16_t	host_mtu;
16360 	uint8_t	unused_3[2];
16361 	uint8_t	unused_4[2];
16362 	/*
16363 	 * KDNet mode for the port for this function. If a VF, KDNet
16364 	 * mode is always disabled.
16365 	 */
16366 	uint8_t	port_kdnet_mode;
16367 	/* KDNet mode is not enabled on the port for this function. */
16368 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_DISABLED UINT32_C(0x0)
16369 	/* KDNet mode is enabled on the port for this function. */
16370 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_ENABLED  UINT32_C(0x1)
16371 	#define HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_LAST \
16372 		HWRM_FUNC_QCFG_OUTPUT_PORT_KDNET_MODE_ENABLED
16373 	/*
16374 	 * If KDNet mode is enabled, the PCI function number of the
16375 	 * KDNet partition.
16376 	 */
16377 	uint8_t	kdnet_pcie_function;
16378 	/*
16379 	 * Function ID of the KDNET function on this port. If the
16380 	 * KDNET partition does not exist and the FW supports this
16381 	 * feature, 0xffff will be returned.
16382 	 */
16383 	uint16_t	port_kdnet_fid;
16384 	uint8_t	unused_5[2];
16385 	/* Number of KTLS Tx Key Contexts allocated. */
16386 	uint32_t	num_ktls_tx_key_ctxs;
16387 	/* Number of KTLS Rx Key Contexts allocated. */
16388 	uint32_t	num_ktls_rx_key_ctxs;
16389 	/*
16390 	 * The LAG idx of this function. The lag_id is per port and the
16391 	 * valid lag_id is from 0 to 7, if there is no valid lag_id,
16392 	 * 0xff will be returned.
16393 	 * This HW lag id is used for Truflow programming only.
16394 	 */
16395 	uint8_t	lag_id;
16396 	/* Partition interface for this function. */
16397 	uint8_t	parif;
16398 	/*
16399 	 * The LAG ID of a hardware link aggregation group (LAG) whose
16400 	 * member ports include the port of this function. The LAG was
16401 	 * previously created using HWRM_FUNC_LAG_CREATE. If the port of this
16402 	 * function is not a member of any LAG, the fw_lag_id will be 0xff.
16403 	 */
16404 	uint8_t	fw_lag_id;
16405 	uint8_t	unused_6;
16406 	/* Number of QUIC Tx Key Contexts allocated. */
16407 	uint32_t	num_quic_tx_key_ctxs;
16408 	/* Number of QUIC Rx Key Contexts allocated. */
16409 	uint32_t	num_quic_rx_key_ctxs;
16410 	/*
16411 	 * Number of AVs per VF. Only valid for PF. This field is ignored
16412 	 * when the flag, l2_vf_resource_mgmt, is not set in RoCE
16413 	 * initialize_fw.
16414 	 */
16415 	uint32_t	roce_max_av_per_vf;
16416 	/*
16417 	 * Number of CQs per VF. Only valid for PF. This field is ignored when
16418 	 * the flag, l2_vf_resource_mgmt, is not set in RoCE initialize_fw.
16419 	 */
16420 	uint32_t	roce_max_cq_per_vf;
16421 	/*
16422 	 * Number of MR/MWs per VF. Only valid for PF. This field is ignored
16423 	 * when the flag, l2_vf_resource_mgmt, is not set in RoCE
16424 	 * initialize_fw.
16425 	 */
16426 	uint32_t	roce_max_mrw_per_vf;
16427 	/*
16428 	 * Number of QPs per VF. Only valid for PF. This field is ignored when
16429 	 * the flag, l2_vf_resource_mgmt, is not set in RoCE initialize_fw.
16430 	 */
16431 	uint32_t	roce_max_qp_per_vf;
16432 	/*
16433 	 * Number of SRQs per VF. Only valid for PF. This field is ignored
16434 	 * when the flag, l2_vf_resource_mgmt, is not set in RoCE
16435 	 * initialize_fw.
16436 	 */
16437 	uint32_t	roce_max_srq_per_vf;
16438 	/*
16439 	 * Number of GIDs per VF. Only valid for PF. This field is ignored
16440 	 * when the flag, l2_vf_resource_mgmt, is not set in RoCE
16441 	 * initialize_fw.
16442 	 */
16443 	uint32_t	roce_max_gid_per_vf;
16444 	/*
16445 	 * Bitmap of context types that have XID partition enabled.
16446 	 * Only valid for PF.
16447 	 */
16448 	uint16_t	xid_partition_cfg;
16449 	/*
16450 	 * When this bit is '1', it indicates that driver enables XID
16451 	 * partition on Tx crypto key contexts.
16452 	 */
16453 	#define HWRM_FUNC_QCFG_OUTPUT_XID_PARTITION_CFG_TX_CK     UINT32_C(0x1)
16454 	/*
16455 	 * When this bit is '1', it indicates that driver enables XID
16456 	 * partition on Rx crypto key contexts.
16457 	 */
16458 	#define HWRM_FUNC_QCFG_OUTPUT_XID_PARTITION_CFG_RX_CK     UINT32_C(0x2)
16459 	uint8_t	unused_7;
16460 	/*
16461 	 * This field is used in Output records to indicate that the output
16462 	 * is completely written to RAM. This field should be read as '1'
16463 	 * to indicate that the output has been completely written. When
16464 	 * writing a command completion or response to an internal processor,
16465 	 * the order of writes has to be such that this field is written last.
16466 	 */
16467 	uint8_t	valid;
16468 } __rte_packed_end;
16469 
16470 /*****************
16471  * hwrm_func_cfg *
16472  *****************/
16473 
16474 
16475 /* hwrm_func_cfg_input (size:1280b/160B) */
16476 struct __rte_packed_begin hwrm_func_cfg_input {
16477 	/* The HWRM command request type. */
16478 	uint16_t	req_type;
16479 	/*
16480 	 * The completion ring to send the completion event on. This should
16481 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
16482 	 */
16483 	uint16_t	cmpl_ring;
16484 	/*
16485 	 * The sequence ID is used by the driver for tracking multiple
16486 	 * commands. This ID is treated as opaque data by the firmware and
16487 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
16488 	 */
16489 	uint16_t	seq_id;
16490 	/*
16491 	 * The target ID of the command:
16492 	 * * 0x0-0xFFF8 - The function ID
16493 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
16494 	 * * 0xFFFD - Reserved for user-space HWRM interface
16495 	 * * 0xFFFF - HWRM
16496 	 */
16497 	uint16_t	target_id;
16498 	/*
16499 	 * A physical address pointer pointing to a host buffer that the
16500 	 * command's response data will be written. This can be either a host
16501 	 * physical address (HPA) or a guest physical address (GPA) and must
16502 	 * point to a physically contiguous block of memory.
16503 	 */
16504 	uint64_t	resp_addr;
16505 	/*
16506 	 * Function ID of the function that is being
16507 	 * configured.
16508 	 * If set to 0xFF... (All Fs), then the configuration is
16509 	 * for the requesting function.
16510 	 */
16511 	uint16_t	fid;
16512 	/*
16513 	 * This field specifies how many NQs will be reserved for the PF.
16514 	 * Remaining NQs that belong to the PF become available for VFs.
16515 	 * Once a PF has created VFs, it cannot change how many NQs are
16516 	 * reserved for itself (since the NQs must be contiguous in HW).
16517 	 */
16518 	uint16_t	num_msix;
16519 	uint32_t	flags;
16520 	/*
16521 	 * When this bit is '1', the function is disabled with
16522 	 * source MAC address check.
16523 	 * This is an anti-spoofing check. If this flag is set,
16524 	 * then the function shall be configured to disallow
16525 	 * transmission of frames with the source MAC address that
16526 	 * is configured for this function.
16527 	 */
16528 	#define HWRM_FUNC_CFG_INPUT_FLAGS_SRC_MAC_ADDR_CHECK_DISABLE \
16529 		UINT32_C(0x1)
16530 	/*
16531 	 * When this bit is '1', the function is enabled with
16532 	 * source MAC address check.
16533 	 * This is an anti-spoofing check. If this flag is set,
16534 	 * then the function shall be configured to allow
16535 	 * transmission of frames with the source MAC address that
16536 	 * is configured for this function.
16537 	 */
16538 	#define HWRM_FUNC_CFG_INPUT_FLAGS_SRC_MAC_ADDR_CHECK_ENABLE \
16539 		UINT32_C(0x2)
16540 	/* reserved. */
16541 	#define HWRM_FUNC_CFG_INPUT_FLAGS_RSVD_MASK \
16542 		UINT32_C(0x1fc)
16543 	#define HWRM_FUNC_CFG_INPUT_FLAGS_RSVD_SFT                       2
16544 	/*
16545 	 * Standard TX Ring mode is used for the allocation of TX ring
16546 	 * and underlying scheduling resources that allow bandwidth
16547 	 * reservation and limit settings on the queried function.
16548 	 * If set to 1, then standard TX ring mode is requested to be
16549 	 * enabled on the function being configured.
16550 	 */
16551 	#define HWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_ENABLE \
16552 		UINT32_C(0x200)
16553 	/*
16554 	 * Standard TX Ring mode is used for the allocation of TX ring
16555 	 * and underlying scheduling resources that allow bandwidth
16556 	 * reservation and limit settings on the queried function.
16557 	 * If set to 1, then the standard TX ring mode is requested to
16558 	 * be disabled on the function being configured. In this extended
16559 	 * TX ring resource mode, the minimum and maximum bandwidth settings
16560 	 * are not supported to allow the allocation of TX rings to
16561 	 * span multiple scheduler nodes.
16562 	 */
16563 	#define HWRM_FUNC_CFG_INPUT_FLAGS_STD_TX_RING_MODE_DISABLE \
16564 		UINT32_C(0x400)
16565 	/*
16566 	 * If this bit is set, virtual mac address configured
16567 	 * in this command will be persistent over warm boot.
16568 	 */
16569 	#define HWRM_FUNC_CFG_INPUT_FLAGS_VIRT_MAC_PERSIST \
16570 		UINT32_C(0x800)
16571 	/*
16572 	 * This bit only applies to the VF. If this bit is set, the statistic
16573 	 * context counters will not be cleared when the statistic context is
16574 	 * freed or a function reset is called on VF. This bit will be
16575 	 * cleared when the PF is unloaded or a function reset is called on
16576 	 * the PF.
16577 	 */
16578 	#define HWRM_FUNC_CFG_INPUT_FLAGS_NO_AUTOCLEAR_STATISTIC \
16579 		UINT32_C(0x1000)
16580 	/*
16581 	 * This bit requests that the firmware test to see if all the assets
16582 	 * requested in this command (i.e. number of TX rings) are available.
16583 	 * The firmware will return an error if the requested assets are
16584 	 * not available. The firmware will NOT reserve the assets if they
16585 	 * are available.
16586 	 */
16587 	#define HWRM_FUNC_CFG_INPUT_FLAGS_TX_ASSETS_TEST \
16588 		UINT32_C(0x2000)
16589 	/*
16590 	 * This bit requests that the firmware test to see if all the assets
16591 	 * requested in this command (i.e. number of RX rings) are available.
16592 	 * The firmware will return an error if the requested assets are
16593 	 * not available. The firmware will NOT reserve the assets if they
16594 	 * are available.
16595 	 */
16596 	#define HWRM_FUNC_CFG_INPUT_FLAGS_RX_ASSETS_TEST \
16597 		UINT32_C(0x4000)
16598 	/*
16599 	 * This bit requests that the firmware test to see if all the assets
16600 	 * requested in this command (i.e. number of CMPL rings) are
16601 	 * available. The firmware will return an error if the requested
16602 	 * assets are not available. The firmware will NOT reserve the assets
16603 	 * if they are available.
16604 	 */
16605 	#define HWRM_FUNC_CFG_INPUT_FLAGS_CMPL_ASSETS_TEST \
16606 		UINT32_C(0x8000)
16607 	/*
16608 	 * This bit requests that the firmware test to see if all the assets
16609 	 * requested in this command (i.e. number of RSS ctx) are available.
16610 	 * The firmware will return an error if the requested assets are
16611 	 * not available. The firmware will NOT reserve the assets if they
16612 	 * are available.
16613 	 */
16614 	#define HWRM_FUNC_CFG_INPUT_FLAGS_RSSCOS_CTX_ASSETS_TEST \
16615 		UINT32_C(0x10000)
16616 	/*
16617 	 * This bit requests that the firmware test to see if all the assets
16618 	 * requested in this command (i.e. number of ring groups) are
16619 	 * available. The firmware will return an error if the requested
16620 	 * assets are not available. The firmware will NOT reserve the assets
16621 	 * if they are available.
16622 	 */
16623 	#define HWRM_FUNC_CFG_INPUT_FLAGS_RING_GRP_ASSETS_TEST \
16624 		UINT32_C(0x20000)
16625 	/*
16626 	 * This bit requests that the firmware test to see if all the assets
16627 	 * requested in this command (i.e. number of stat ctx) are available.
16628 	 * The firmware will return an error if the requested assets are
16629 	 * not available. The firmware will NOT reserve the assets if they
16630 	 * are available.
16631 	 */
16632 	#define HWRM_FUNC_CFG_INPUT_FLAGS_STAT_CTX_ASSETS_TEST \
16633 		UINT32_C(0x40000)
16634 	/*
16635 	 * This bit requests that the firmware test to see if all the assets
16636 	 * requested in this command (i.e. number of VNICs) are available.
16637 	 * The firmware will return an error if the requested assets are
16638 	 * not available. The firmware will NOT reserve the assets if they
16639 	 * are available.
16640 	 */
16641 	#define HWRM_FUNC_CFG_INPUT_FLAGS_VNIC_ASSETS_TEST \
16642 		UINT32_C(0x80000)
16643 	/*
16644 	 * This bit requests that the firmware test to see if all the assets
16645 	 * requested in this command (i.e. number of L2 ctx) are available.
16646 	 * The firmware will return an error if the requested assets are
16647 	 * not available. The firmware will NOT reserve the assets if they
16648 	 * are available.
16649 	 */
16650 	#define HWRM_FUNC_CFG_INPUT_FLAGS_L2_CTX_ASSETS_TEST \
16651 		UINT32_C(0x100000)
16652 	/*
16653 	 * This configuration change can be initiated by a PF driver. This
16654 	 * configuration request shall be targeted to a VF. From local host
16655 	 * resident HWRM clients, only the parent PF driver shall be allowed
16656 	 * to initiate this change on one of its children VFs. If this bit is
16657 	 * set to 1, then the VF that is being configured is requested to be
16658 	 * trusted.
16659 	 */
16660 	#define HWRM_FUNC_CFG_INPUT_FLAGS_TRUSTED_VF_ENABLE \
16661 		UINT32_C(0x200000)
16662 	/*
16663 	 * When this bit it set, even if PF reserved pool size is zero,
16664 	 * FW will allow driver to create TX rings in ring alloc,
16665 	 * by reserving TX ring, S3 node dynamically.
16666 	 */
16667 	#define HWRM_FUNC_CFG_INPUT_FLAGS_DYNAMIC_TX_RING_ALLOC \
16668 		UINT32_C(0x400000)
16669 	/*
16670 	 * This bit requests that the firmware test to see if all the assets
16671 	 * requested in this command (i.e. number of NQ rings) are available.
16672 	 * The firmware will return an error if the requested assets are
16673 	 * not available. The firmware will NOT reserve the assets if they
16674 	 * are available.
16675 	 */
16676 	#define HWRM_FUNC_CFG_INPUT_FLAGS_NQ_ASSETS_TEST \
16677 		UINT32_C(0x800000)
16678 	/*
16679 	 * This configuration change can be initiated by a PF driver. This
16680 	 * configuration request shall be targeted to a VF. From local host
16681 	 * resident HWRM clients, only the parent PF driver shall be allowed
16682 	 * to initiate this change on one of its children VFs. If this bit is
16683 	 * set to 1, then the VF that is being configured is requested to be
16684 	 * untrusted.
16685 	 */
16686 	#define HWRM_FUNC_CFG_INPUT_FLAGS_TRUSTED_VF_DISABLE \
16687 		UINT32_C(0x1000000)
16688 	/*
16689 	 * This bit is used by preboot drivers on a PF that require access
16690 	 * to the legacy L2 ring model and legacy 32b doorbells. This
16691 	 * feature is not allowed on VFs and is only relevant for devices
16692 	 * that require a context backing store.
16693 	 */
16694 	#define HWRM_FUNC_CFG_INPUT_FLAGS_PREBOOT_LEGACY_L2_RINGS \
16695 		UINT32_C(0x2000000)
16696 	/*
16697 	 * If this bit is set to 0, then the interface does not support hot
16698 	 * reset capability which it advertised with the hot_reset_support
16699 	 * flag in HWRM_FUNC_DRV_RGTR. If any of the function has set this
16700 	 * flag to 0, adapter cannot do the hot reset. In this state, if the
16701 	 * firmware receives a hot reset request, firmware must fail the
16702 	 * request. If this bit is set to 1, then interface is renabling the
16703 	 * hot reset capability.
16704 	 */
16705 	#define HWRM_FUNC_CFG_INPUT_FLAGS_HOT_RESET_IF_EN_DIS \
16706 		UINT32_C(0x4000000)
16707 	/*
16708 	 * If this bit is set to 1, the PF driver is requesting FW
16709 	 * to enable PPP TX PUSH feature on all the TX rings specified in
16710 	 * the num_tx_rings field. By default, the PPP TX push feature is
16711 	 * disabled for all the TX rings of the function. This flag is
16712 	 * ignored if num_tx_rings field is not specified or the function
16713 	 * doesn't support PPP tx push feature.
16714 	 */
16715 	#define HWRM_FUNC_CFG_INPUT_FLAGS_PPP_PUSH_MODE_ENABLE \
16716 		UINT32_C(0x8000000)
16717 	/*
16718 	 * If this bit is set to 1, the PF driver is requesting FW
16719 	 * to disable PPP TX PUSH feature on all the TX rings specified in
16720 	 * the num_tx_rings field. This flag is ignored if num_tx_rings
16721 	 * field is not specified or the function doesn't support PPP tx
16722 	 * push feature.
16723 	 */
16724 	#define HWRM_FUNC_CFG_INPUT_FLAGS_PPP_PUSH_MODE_DISABLE \
16725 		UINT32_C(0x10000000)
16726 	/*
16727 	 * If this bit is set to 1, the driver is requesting FW to enable
16728 	 * the BD_METADATA feature for this function. The FW returns error
16729 	 * on this request if the TX_METADATA is enabled for this function.
16730 	 */
16731 	#define HWRM_FUNC_CFG_INPUT_FLAGS_BD_METADATA_ENABLE \
16732 		UINT32_C(0x20000000)
16733 	/*
16734 	 * If this bit is set to 1, the driver is requesting FW to disable
16735 	 * the BD_METADATA feature for this function. The FW returns error
16736 	 * on this request if the TX_METADATA is enabled for this function.
16737 	 */
16738 	#define HWRM_FUNC_CFG_INPUT_FLAGS_BD_METADATA_DISABLE \
16739 		UINT32_C(0x40000000)
16740 	uint32_t	enables;
16741 	/*
16742 	 * This bit must be '1' for the admin_mtu field to be
16743 	 * configured.
16744 	 */
16745 	#define HWRM_FUNC_CFG_INPUT_ENABLES_ADMIN_MTU \
16746 		UINT32_C(0x1)
16747 	/*
16748 	 * This bit must be '1' for the mru field to be
16749 	 * configured.
16750 	 */
16751 	#define HWRM_FUNC_CFG_INPUT_ENABLES_MRU \
16752 		UINT32_C(0x2)
16753 	/*
16754 	 * This bit must be '1' for the num_rsscos_ctxs field to be
16755 	 * configured.
16756 	 */
16757 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_RSSCOS_CTXS \
16758 		UINT32_C(0x4)
16759 	/*
16760 	 * This bit must be '1' for the num_cmpl_rings field to be
16761 	 * configured.
16762 	 */
16763 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_CMPL_RINGS \
16764 		UINT32_C(0x8)
16765 	/*
16766 	 * This bit must be '1' for the num_tx_rings field to be
16767 	 * configured.
16768 	 */
16769 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_TX_RINGS \
16770 		UINT32_C(0x10)
16771 	/*
16772 	 * This bit must be '1' for the num_rx_rings field to be
16773 	 * configured.
16774 	 */
16775 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_RX_RINGS \
16776 		UINT32_C(0x20)
16777 	/*
16778 	 * This bit must be '1' for the num_l2_ctxs field to be
16779 	 * configured.
16780 	 */
16781 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_L2_CTXS \
16782 		UINT32_C(0x40)
16783 	/*
16784 	 * This bit must be '1' for the num_vnics field to be
16785 	 * configured.
16786 	 */
16787 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_VNICS \
16788 		UINT32_C(0x80)
16789 	/*
16790 	 * This bit must be '1' for the num_stat_ctxs field to be
16791 	 * configured.
16792 	 */
16793 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_STAT_CTXS \
16794 		UINT32_C(0x100)
16795 	/*
16796 	 * This bit must be '1' for the dflt_mac_addr field to be
16797 	 * configured.
16798 	 */
16799 	#define HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_MAC_ADDR \
16800 		UINT32_C(0x200)
16801 	/*
16802 	 * This bit must be '1' for the dflt_vlan field to be
16803 	 * configured.
16804 	 */
16805 	#define HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_VLAN \
16806 		UINT32_C(0x400)
16807 	/*
16808 	 * This bit must be '1' for the dflt_ip_addr field to be
16809 	 * configured.
16810 	 */
16811 	#define HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_IP_ADDR \
16812 		UINT32_C(0x800)
16813 	/*
16814 	 * This bit must be '1' for the min_bw field to be
16815 	 * configured.
16816 	 */
16817 	#define HWRM_FUNC_CFG_INPUT_ENABLES_MIN_BW \
16818 		UINT32_C(0x1000)
16819 	/*
16820 	 * This bit must be '1' for the max_bw field to be
16821 	 * configured.
16822 	 */
16823 	#define HWRM_FUNC_CFG_INPUT_ENABLES_MAX_BW \
16824 		UINT32_C(0x2000)
16825 	/*
16826 	 * This bit must be '1' for the async_event_cr field to be
16827 	 * configured.
16828 	 */
16829 	#define HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR \
16830 		UINT32_C(0x4000)
16831 	/*
16832 	 * This bit must be '1' for the vlan_antispoof_mode field to be
16833 	 * configured.
16834 	 */
16835 	#define HWRM_FUNC_CFG_INPUT_ENABLES_VLAN_ANTISPOOF_MODE \
16836 		UINT32_C(0x8000)
16837 	/*
16838 	 * This bit must be '1' for the allowed_vlan_pris field to be
16839 	 * configured.
16840 	 */
16841 	#define HWRM_FUNC_CFG_INPUT_ENABLES_ALLOWED_VLAN_PRIS \
16842 		UINT32_C(0x10000)
16843 	/*
16844 	 * This bit must be '1' for the evb_mode field to be
16845 	 * configured.
16846 	 */
16847 	#define HWRM_FUNC_CFG_INPUT_ENABLES_EVB_MODE \
16848 		UINT32_C(0x20000)
16849 	/*
16850 	 * This bit must be '1' for the num_mcast_filters field to be
16851 	 * configured.
16852 	 */
16853 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_MCAST_FILTERS \
16854 		UINT32_C(0x40000)
16855 	/*
16856 	 * This bit must be '1' for the num_hw_ring_grps field to be
16857 	 * configured.
16858 	 */
16859 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_HW_RING_GRPS \
16860 		UINT32_C(0x80000)
16861 	/*
16862 	 * This bit must be '1' for the cache_linesize field to be
16863 	 * configured.
16864 	 */
16865 	#define HWRM_FUNC_CFG_INPUT_ENABLES_CACHE_LINESIZE \
16866 		UINT32_C(0x100000)
16867 	/*
16868 	 * This bit must be '1' for the num_msix field to be
16869 	 * configured.
16870 	 */
16871 	#define HWRM_FUNC_CFG_INPUT_ENABLES_NUM_MSIX \
16872 		UINT32_C(0x200000)
16873 	/*
16874 	 * This bit must be '1' for the link admin state field to be
16875 	 * configured.
16876 	 */
16877 	#define HWRM_FUNC_CFG_INPUT_ENABLES_ADMIN_LINK_STATE \
16878 		UINT32_C(0x400000)
16879 	/*
16880 	 * This bit must be '1' for the hot_reset_if_en_dis field to be
16881 	 * configured.
16882 	 */
16883 	#define HWRM_FUNC_CFG_INPUT_ENABLES_HOT_RESET_IF_SUPPORT \
16884 		UINT32_C(0x800000)
16885 	/*
16886 	 * This bit must be '1' for the schq_id field to be
16887 	 * configured.
16888 	 */
16889 	#define HWRM_FUNC_CFG_INPUT_ENABLES_SCHQ_ID \
16890 		UINT32_C(0x1000000)
16891 	/*
16892 	 * This bit must be '1' for the mpc_chnls field to be
16893 	 * configured.
16894 	 */
16895 	#define HWRM_FUNC_CFG_INPUT_ENABLES_MPC_CHNLS \
16896 		UINT32_C(0x2000000)
16897 	/*
16898 	 * This bit must be '1' for the partition_min_bw field to be
16899 	 * configured.
16900 	 */
16901 	#define HWRM_FUNC_CFG_INPUT_ENABLES_PARTITION_MIN_BW \
16902 		UINT32_C(0x4000000)
16903 	/*
16904 	 * This bit must be '1' for the partition_max_bw field to be
16905 	 * configured.
16906 	 */
16907 	#define HWRM_FUNC_CFG_INPUT_ENABLES_PARTITION_MAX_BW \
16908 		UINT32_C(0x8000000)
16909 	/*
16910 	 * This bit must be '1' for the tpid field to be
16911 	 * configured. This bit is only valid when dflt_vlan enable
16912 	 * bit is set.
16913 	 */
16914 	#define HWRM_FUNC_CFG_INPUT_ENABLES_TPID \
16915 		UINT32_C(0x10000000)
16916 	/*
16917 	 * This bit must be '1' for the host_mtu field to be
16918 	 * configured.
16919 	 */
16920 	#define HWRM_FUNC_CFG_INPUT_ENABLES_HOST_MTU \
16921 		UINT32_C(0x20000000)
16922 	/*
16923 	 * This bit must be '1' for the num_ktls_tx_key_ctxs field to be
16924 	 * configured.
16925 	 */
16926 	#define HWRM_FUNC_CFG_INPUT_ENABLES_KTLS_TX_KEY_CTXS \
16927 		UINT32_C(0x40000000)
16928 	/*
16929 	 * This bit must be '1' for the num_ktls_rx_key_ctxs field to be
16930 	 * configured.
16931 	 */
16932 	#define HWRM_FUNC_CFG_INPUT_ENABLES_KTLS_RX_KEY_CTXS \
16933 		UINT32_C(0x80000000)
16934 	/*
16935 	 * This field can be used by the admin PF to configure
16936 	 * mtu of foster PFs.
16937 	 * The maximum transmission unit of the function.
16938 	 * The HWRM should make sure that the mtu of
16939 	 * the function does not exceed the mtu of the physical
16940 	 * port that this function is associated with.
16941 	 *
16942 	 * In addition to configuring mtu per function, it is
16943 	 * possible to configure mtu per transmit ring.
16944 	 * By default, the mtu of each transmit ring associated
16945 	 * with a function is equal to the mtu of the function.
16946 	 * The HWRM should make sure that the mtu of each transmit
16947 	 * ring that is assigned to a function has a valid mtu.
16948 	 */
16949 	uint16_t	admin_mtu;
16950 	/*
16951 	 * The maximum receive unit of the function.
16952 	 * The HWRM should make sure that the mru of
16953 	 * the function does not exceed the mru of the physical
16954 	 * port that this function is associated with.
16955 	 *
16956 	 * In addition to configuring mru per function, it is
16957 	 * possible to configure mru per vnic.
16958 	 * By default, the mru of each vnic associated
16959 	 * with a function is equal to the mru of the function.
16960 	 * The HWRM should make sure that the mru of each vnic
16961 	 * that is assigned to a function has a valid mru.
16962 	 */
16963 	uint16_t	mru;
16964 	/*
16965 	 * The number of RSS/COS contexts requested for the
16966 	 * function.
16967 	 */
16968 	uint16_t	num_rsscos_ctxs;
16969 	/*
16970 	 * The number of completion rings requested for the
16971 	 * function. This does not include the rings allocated
16972 	 * to any children functions if any.
16973 	 */
16974 	uint16_t	num_cmpl_rings;
16975 	/*
16976 	 * The number of transmit rings requested for the function.
16977 	 * This does not include the rings allocated to any
16978 	 * children functions if any.
16979 	 */
16980 	uint16_t	num_tx_rings;
16981 	/*
16982 	 * The number of receive rings requested for the function.
16983 	 * This does not include the rings allocated
16984 	 * to any children functions if any.
16985 	 */
16986 	uint16_t	num_rx_rings;
16987 	/* The requested number of L2 contexts for the function. */
16988 	uint16_t	num_l2_ctxs;
16989 	/* The requested number of vnics for the function. */
16990 	uint16_t	num_vnics;
16991 	/* The requested number of statistic contexts for the function. */
16992 	uint16_t	num_stat_ctxs;
16993 	/*
16994 	 * The number of HW ring groups that should
16995 	 * be reserved for this function.
16996 	 */
16997 	uint16_t	num_hw_ring_grps;
16998 	/* The default MAC address for the function being configured. */
16999 	uint8_t	dflt_mac_addr[6];
17000 	/*
17001 	 * The default VLAN for the function being configured.
17002 	 * This field's format is same as 802.1Q Tag's
17003 	 * Tag Control Information (TCI) format that includes both
17004 	 * Priority Code Point (PCP) and VLAN Identifier (VID).
17005 	 */
17006 	uint16_t	dflt_vlan;
17007 	/*
17008 	 * The default IP address for the function being configured.
17009 	 * This address is only used in enabling source property check.
17010 	 */
17011 	uint32_t	dflt_ip_addr[4];
17012 	/*
17013 	 * Minimum guaranteed transmit bandwidth for this function. When
17014 	 * specified for a PF, does not affect traffic from the PF's child VFs.
17015 	 * A value of 0 indicates the minimum bandwidth is not configured.
17016 	 */
17017 	uint32_t	min_bw;
17018 	/* The bandwidth value. */
17019 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_MASK \
17020 		UINT32_C(0xfffffff)
17021 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_SFT              0
17022 	/* The granularity of the value (bits or bytes). */
17023 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_SCALE \
17024 		UINT32_C(0x10000000)
17025 	/* Value is in bits. */
17026 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_SCALE_BITS \
17027 		(UINT32_C(0x0) << 28)
17028 	/* Value is in bytes. */
17029 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_SCALE_BYTES \
17030 		(UINT32_C(0x1) << 28)
17031 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_SCALE_LAST \
17032 		HWRM_FUNC_CFG_INPUT_MIN_BW_SCALE_BYTES
17033 	/* bw_value_unit is 3 b */
17034 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_MASK \
17035 		UINT32_C(0xe0000000)
17036 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_SFT         29
17037 	/* Value is in Mb or MB (base 10). */
17038 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_MEGA \
17039 		(UINT32_C(0x0) << 29)
17040 	/* Value is in Kb or KB (base 10). */
17041 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_KILO \
17042 		(UINT32_C(0x2) << 29)
17043 	/* Value is in bits or bytes. */
17044 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_BASE \
17045 		(UINT32_C(0x4) << 29)
17046 	/* Value is in Gb or GB (base 10). */
17047 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_GIGA \
17048 		(UINT32_C(0x6) << 29)
17049 	/* Value is in 1/100th of a percentage of total bandwidth. */
17050 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
17051 		(UINT32_C(0x1) << 29)
17052 	/* Invalid unit */
17053 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_INVALID \
17054 		(UINT32_C(0x7) << 29)
17055 	#define HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_LAST \
17056 		HWRM_FUNC_CFG_INPUT_MIN_BW_BW_VALUE_UNIT_INVALID
17057 	/*
17058 	 * Maximum transmit rate for this function. When specified for a PF,
17059 	 * does not affect traffic from the PF's child VFs.
17060 	 * A value of 0 indicates that the maximum bandwidth is not configured.
17061 	 */
17062 	uint32_t	max_bw;
17063 	/* The bandwidth value. */
17064 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_MASK \
17065 		UINT32_C(0xfffffff)
17066 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_SFT              0
17067 	/* The granularity of the value (bits or bytes). */
17068 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_SCALE \
17069 		UINT32_C(0x10000000)
17070 	/* Value is in bits. */
17071 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_SCALE_BITS \
17072 		(UINT32_C(0x0) << 28)
17073 	/* Value is in bytes. */
17074 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_SCALE_BYTES \
17075 		(UINT32_C(0x1) << 28)
17076 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_SCALE_LAST \
17077 		HWRM_FUNC_CFG_INPUT_MAX_BW_SCALE_BYTES
17078 	/* bw_value_unit is 3 b */
17079 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_MASK \
17080 		UINT32_C(0xe0000000)
17081 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_SFT         29
17082 	/* Value is in Mb or MB (base 10). */
17083 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_MEGA \
17084 		(UINT32_C(0x0) << 29)
17085 	/* Value is in Kb or KB (base 10). */
17086 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_KILO \
17087 		(UINT32_C(0x2) << 29)
17088 	/* Value is in bits or bytes. */
17089 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_BASE \
17090 		(UINT32_C(0x4) << 29)
17091 	/* Value is in Gb or GB (base 10). */
17092 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_GIGA \
17093 		(UINT32_C(0x6) << 29)
17094 	/* Value is in 1/100th of a percentage of total bandwidth. */
17095 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
17096 		(UINT32_C(0x1) << 29)
17097 	/* Invalid unit */
17098 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_INVALID \
17099 		(UINT32_C(0x7) << 29)
17100 	#define HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_LAST \
17101 		HWRM_FUNC_CFG_INPUT_MAX_BW_BW_VALUE_UNIT_INVALID
17102 	/*
17103 	 * ID of the target completion ring for receiving asynchronous
17104 	 * event completions. If this field is not valid, then the
17105 	 * HWRM shall use the default completion ring of the function
17106 	 * that is being configured as the target completion ring for
17107 	 * providing any asynchronous event completions for that
17108 	 * function.
17109 	 * If this field is valid, then the HWRM shall use the
17110 	 * completion ring identified by this ID as the target
17111 	 * completion ring for providing any asynchronous event
17112 	 * completions for the function that is being configured.
17113 	 */
17114 	uint16_t	async_event_cr;
17115 	/* VLAN Anti-spoofing mode. */
17116 	uint8_t	vlan_antispoof_mode;
17117 	/* No VLAN anti-spoofing checks are enabled */
17118 	#define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_NOCHECK \
17119 		UINT32_C(0x0)
17120 	/* Validate VLAN against the configured VLAN(s) */
17121 	#define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_VALIDATE_VLAN \
17122 		UINT32_C(0x1)
17123 	/* Insert VLAN if it does not exist, otherwise discard */
17124 	#define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_INSERT_IF_VLANDNE \
17125 		UINT32_C(0x2)
17126 	/* Insert VLAN if it does not exist, override VLAN if it exists */
17127 	#define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_INSERT_OR_OVERRIDE_VLAN \
17128 		UINT32_C(0x3)
17129 	#define HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_LAST \
17130 		HWRM_FUNC_CFG_INPUT_VLAN_ANTISPOOF_MODE_INSERT_OR_OVERRIDE_VLAN
17131 	/*
17132 	 * This bit field defines VLAN PRIs that are allowed on
17133 	 * this function.
17134 	 * If nth bit is set, then VLAN PRI n is allowed on this
17135 	 * function.
17136 	 */
17137 	uint8_t	allowed_vlan_pris;
17138 	/*
17139 	 * The evb_mode is configured on a per port basis. The default evb_mode
17140 	 * is configured based on the NVM EVB mode setting upon firmware
17141 	 * initialization. The HWRM allows a PF driver to change EVB mode for a
17142 	 * port used by the PF only when one of the following conditions is
17143 	 * satisfied.
17144 	 * 1. The current operating mode is single function mode.
17145 	 *    (ie. one PF per port)
17146 	 * 2. For SmartNIC, any one of the PAXC PFs is permitted to change the
17147 	 *    EVB mode of the port used by the PAXC PF. None of the X86 PFs
17148 	 *    should have privileges.
17149 	 * The HWRM doesn't permit any PFs to change the underlying EVB mode
17150 	 * when running as MHB or NPAR mode in performance NIC configuration.
17151 	 * The HWRM doesn't permit a VF driver to change the EVB mode.
17152 	 * Once the HWRM determines a function doesn't meet the conditions
17153 	 * to configure the EVB mode, it sets the evb_mode_cfg_not_supported
17154 	 * flag in HWRM_FUNC_QCAPS command response for the function.
17155 	 * The HWRM takes into account the switching of EVB mode from one to
17156 	 * another and reconfigure hardware resources as required. The
17157 	 * switching from VEB to VEPA mode requires the disabling of the
17158 	 * loopback traffic. Additionally, source knockouts are handled
17159 	 * differently in VEB and VEPA modes.
17160 	 */
17161 	uint8_t	evb_mode;
17162 	/* No Edge Virtual Bridging (EVB) */
17163 	#define HWRM_FUNC_CFG_INPUT_EVB_MODE_NO_EVB UINT32_C(0x0)
17164 	/* Virtual Ethernet Bridge (VEB) */
17165 	#define HWRM_FUNC_CFG_INPUT_EVB_MODE_VEB    UINT32_C(0x1)
17166 	/* Virtual Ethernet Port Aggregator (VEPA) */
17167 	#define HWRM_FUNC_CFG_INPUT_EVB_MODE_VEPA   UINT32_C(0x2)
17168 	#define HWRM_FUNC_CFG_INPUT_EVB_MODE_LAST \
17169 		HWRM_FUNC_CFG_INPUT_EVB_MODE_VEPA
17170 	uint8_t	options;
17171 	/*
17172 	 * This value indicates the PCIE device cache line size.
17173 	 * The cache line size allows the DMA writes to terminate and
17174 	 * start at the cache boundary.
17175 	 */
17176 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_MASK \
17177 		UINT32_C(0x3)
17178 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_SFT          0
17179 	/* Cache Line Size 64 bytes */
17180 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_SIZE_64 \
17181 		UINT32_C(0x0)
17182 	/* Cache Line Size 128 bytes */
17183 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_SIZE_128 \
17184 		UINT32_C(0x1)
17185 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_LAST \
17186 		HWRM_FUNC_CFG_INPUT_OPTIONS_CACHE_LINESIZE_SIZE_128
17187 	/* This value is the virtual link admin state setting. */
17188 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_MASK \
17189 		UINT32_C(0xc)
17190 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_SFT        2
17191 	/* Admin state is forced down. */
17192 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_FORCED_DOWN \
17193 		(UINT32_C(0x0) << 2)
17194 	/* Admin state is forced up. */
17195 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_FORCED_UP \
17196 		(UINT32_C(0x1) << 2)
17197 	/*
17198 	 * Admin state is in auto mode - is to follow the physical link
17199 	 * state.
17200 	 */
17201 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_AUTO \
17202 		(UINT32_C(0x2) << 2)
17203 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_LAST \
17204 		HWRM_FUNC_CFG_INPUT_OPTIONS_LINK_ADMIN_STATE_AUTO
17205 	/* Reserved for future. */
17206 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_RSVD_MASK \
17207 		UINT32_C(0xf0)
17208 	#define HWRM_FUNC_CFG_INPUT_OPTIONS_RSVD_SFT                    4
17209 	/*
17210 	 * The number of multicast filters that should
17211 	 * be reserved for this function on the RX side.
17212 	 */
17213 	uint16_t	num_mcast_filters;
17214 	/* Used by a PF driver to associate a SCHQ with a VF. */
17215 	uint16_t	schq_id;
17216 	uint16_t	mpc_chnls;
17217 	/*
17218 	 * When this bit is '1', the caller requests to enable a MPC
17219 	 * channel with destination to the TX crypto engine block.
17220 	 * When this bit is '0', this flag has no effect.
17221 	 */
17222 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_TCE_ENABLE          UINT32_C(0x1)
17223 	/*
17224 	 * When this bit is '1', the caller requests to disable a MPC
17225 	 * channel with destination to the TX crypto engine block.
17226 	 * When this bit is '0', this flag has no effect.
17227 	 */
17228 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_TCE_DISABLE         UINT32_C(0x2)
17229 	/*
17230 	 * When this bit is '1', the caller requests to enable a MPC
17231 	 * channel with destination to the RX crypto engine block.
17232 	 * When this bit is '0', this flag has no effect.
17233 	 */
17234 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_RCE_ENABLE          UINT32_C(0x4)
17235 	/*
17236 	 * When this bit is '1', the caller requests to disable a MPC
17237 	 * channel with destination to the RX crypto engine block.
17238 	 * When this bit is '0', this flag has no effect.
17239 	 */
17240 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_RCE_DISABLE         UINT32_C(0x8)
17241 	/*
17242 	 * When this bit is '1', the caller requests to enable a MPC
17243 	 * channel with destination to the TX configurable flow processing
17244 	 * block. When this bit is '0', this flag has no effect.
17245 	 */
17246 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_TE_CFA_ENABLE \
17247 		UINT32_C(0x10)
17248 	/*
17249 	 * When this bit is '1', the caller requests to disable a MPC
17250 	 * channel with destination to the TX configurable flow processing
17251 	 * block. When this bit is '0', this flag has no effect.
17252 	 */
17253 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_TE_CFA_DISABLE \
17254 		UINT32_C(0x20)
17255 	/*
17256 	 * When this bit is '1', the caller requests to enable a MPC
17257 	 * channel with destination to the RX configurable flow processing
17258 	 * block. When this bit is '0', this flag has no effect.
17259 	 */
17260 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_RE_CFA_ENABLE \
17261 		UINT32_C(0x40)
17262 	/*
17263 	 * When this bit is '1', the caller requests to disable a MPC
17264 	 * channel with destination to the RX configurable flow processing
17265 	 * block. When this bit is '0', this flag has no effect.
17266 	 */
17267 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_RE_CFA_DISABLE \
17268 		UINT32_C(0x80)
17269 	/*
17270 	 * When this bit is '1', the caller requests to enable a MPC
17271 	 * channel with destination to the primate processor block.
17272 	 * When this bit is '0', this flag has no effect.
17273 	 */
17274 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_PRIMATE_ENABLE \
17275 		UINT32_C(0x100)
17276 	/*
17277 	 * When this bit is '1', the caller requests to disable a MPC
17278 	 * channel with destination to the primate processor block.
17279 	 * When this bit is '0', this flag has no effect.
17280 	 */
17281 	#define HWRM_FUNC_CFG_INPUT_MPC_CHNLS_PRIMATE_DISABLE \
17282 		UINT32_C(0x200)
17283 	/*
17284 	 * Minimum guaranteed bandwidth for the network partition made up
17285 	 * of the caller physical function and all its child virtual
17286 	 * functions. The rate is specified as a percentage of the bandwidth
17287 	 * of the link the partition is associated with. A value of 0
17288 	 * indicates that no minimum bandwidth is configured. The sum of the
17289 	 * minimum bandwidths for all partitions on a link must not exceed
17290 	 * 100%.
17291 	 * The format of this field is defined to match min_bw, even though
17292 	 * it does not allow all the options for min_bw at this time.
17293 	 */
17294 	uint32_t	partition_min_bw;
17295 	/* The bandwidth value. */
17296 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_MASK \
17297 		UINT32_C(0xfffffff)
17298 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_SFT \
17299 		0
17300 	/*
17301 	 * The granularity of the value (bits or bytes). Firmware ignores
17302 	 * this field.
17303 	 */
17304 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_SCALE \
17305 		UINT32_C(0x10000000)
17306 	/* Value is in bits. */
17307 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_SCALE_BITS \
17308 		(UINT32_C(0x0) << 28)
17309 	/* Value is in bytes. */
17310 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_SCALE_BYTES \
17311 		(UINT32_C(0x1) << 28)
17312 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_SCALE_LAST \
17313 		HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_SCALE_BYTES
17314 	/* Bandwidth units. Must be set to percent1_100. */
17315 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_MASK \
17316 		UINT32_C(0xe0000000)
17317 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_SFT \
17318 		29
17319 	/* Value is in hundredths of a percent of link bandwidth. */
17320 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
17321 		(UINT32_C(0x1) << 29)
17322 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_LAST \
17323 		HWRM_FUNC_CFG_INPUT_PARTITION_MIN_BW_BW_VALUE_UNIT_PERCENT1_100
17324 	/*
17325 	 * The maximum bandwidth that may be used by the network partition
17326 	 * made up of the caller physical function and all its child virtual
17327 	 * functions. The rate is specified as a percentage of the bandwidth
17328 	 * of the link the partition is associated with. A value of 0
17329 	 * indicates that no maximum bandwidth is configured.
17330 	 * The format of this field is defined to match max_bw, even though it
17331 	 * does not allow all the options for max_bw at this time.
17332 	 */
17333 	uint32_t	partition_max_bw;
17334 	/* The bandwidth value. */
17335 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_MASK \
17336 		UINT32_C(0xfffffff)
17337 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_SFT \
17338 		0
17339 	/*
17340 	 * The granularity of the value (bits or bytes). Firmware ignores
17341 	 * this field.
17342 	 */
17343 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_SCALE \
17344 		UINT32_C(0x10000000)
17345 	/* Value is in bits. */
17346 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_SCALE_BITS \
17347 		(UINT32_C(0x0) << 28)
17348 	/* Value is in bytes. */
17349 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_SCALE_BYTES \
17350 		(UINT32_C(0x1) << 28)
17351 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_SCALE_LAST \
17352 		HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_SCALE_BYTES
17353 	/* Bandwidth units. Must be set to percent1_100. */
17354 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_MASK \
17355 		UINT32_C(0xe0000000)
17356 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_SFT \
17357 		29
17358 	/* Value is in hundredths of a percent of link bandwidth. */
17359 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
17360 		(UINT32_C(0x1) << 29)
17361 	#define HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_LAST \
17362 		HWRM_FUNC_CFG_INPUT_PARTITION_MAX_BW_BW_VALUE_UNIT_PERCENT1_100
17363 	/*
17364 	 * The TPID for the function for which default VLAN
17365 	 * is configured. If the dflt_vlan is not specified
17366 	 * with the TPID, FW returns error. If the TPID is
17367 	 * not specified with dflt_vlan, the default TPID of
17368 	 * 0x8100 will be used. This field is specified in
17369 	 * network byte order.
17370 	 */
17371 	uint16_t	tpid;
17372 	/*
17373 	 * This field can be used by the host PF to configure
17374 	 * mtu value.
17375 	 * The maximum transmission unit of the function.
17376 	 * The HWRM should make sure that the mtu of
17377 	 * the function does not exceed the mtu of the physical
17378 	 * port that this function is associated with.
17379 	 *
17380 	 * In addition to configuring mtu per function, it is
17381 	 * possible to configure mtu per transmit ring.
17382 	 * By default, the mtu of each transmit ring associated
17383 	 * with a function is equal to the mtu of the function.
17384 	 * The HWRM should make sure that the mtu of each transmit
17385 	 * ring that is assigned to a function has a valid mtu.
17386 	 */
17387 	uint16_t	host_mtu;
17388 	uint32_t	flags2;
17389 	/*
17390 	 * If this bit is set to 1, the driver is requesting the firmware
17391 	 * to see if the assets (i.e., the number of KTLS key contexts)
17392 	 * requested in this command are available. The firmware will return
17393 	 * an error if the requested assets are not available. The firmware
17394 	 * will NOT reserve the assets if they are available.
17395 	 */
17396 	#define HWRM_FUNC_CFG_INPUT_FLAGS2_KTLS_KEY_CTX_ASSETS_TEST \
17397 		UINT32_C(0x1)
17398 	/*
17399 	 * If this bit is set to 1, the driver is requesting the firmware
17400 	 * to see if the assets (i.e., the number of QUIC key contexts)
17401 	 * requested in this command are available. The firmware will return
17402 	 * an error if the requested assets are not available. The firmware
17403 	 * will NOT reserve the assets if they are available.
17404 	 */
17405 	#define HWRM_FUNC_CFG_INPUT_FLAGS2_QUIC_KEY_CTX_ASSETS_TEST \
17406 		UINT32_C(0x2)
17407 	uint32_t	enables2;
17408 	/*
17409 	 * This bit must be '1' for the kdnet_mode field to be
17410 	 * configured.
17411 	 */
17412 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_KDNET \
17413 		UINT32_C(0x1)
17414 	/*
17415 	 * This bit must be '1' for the db_page_size field to be
17416 	 * configured. Legacy controller core FW may silently ignore
17417 	 * the db_page_size programming request through this command.
17418 	 */
17419 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_DB_PAGE_SIZE \
17420 		UINT32_C(0x2)
17421 	/*
17422 	 * This bit must be '1' for the num_quic_tx_key_ctxs field to be
17423 	 * configured.
17424 	 */
17425 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_QUIC_TX_KEY_CTXS \
17426 		UINT32_C(0x4)
17427 	/*
17428 	 * This bit must be '1' for the num_quic_rx_key_ctxs field to be
17429 	 * configured.
17430 	 */
17431 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_QUIC_RX_KEY_CTXS \
17432 		UINT32_C(0x8)
17433 	/*
17434 	 * This bit must be '1' for the roce_max_av_per_vf field to be
17435 	 * configured.
17436 	 */
17437 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_AV_PER_VF \
17438 		UINT32_C(0x10)
17439 	/*
17440 	 * This bit must be '1' for the roce_max_cq_per_vf field to be
17441 	 * configured. Only valid for PF.
17442 	 */
17443 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_CQ_PER_VF \
17444 		UINT32_C(0x20)
17445 	/*
17446 	 * This bit must be '1' for the roce_max_mrw_per_vf field to be
17447 	 * configured. Only valid for PF.
17448 	 */
17449 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_MRW_PER_VF \
17450 		UINT32_C(0x40)
17451 	/*
17452 	 * This bit must be '1' for the roce_max_qp_per_vf field to be
17453 	 * configured.
17454 	 */
17455 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_QP_PER_VF \
17456 		UINT32_C(0x80)
17457 	/*
17458 	 * This bit must be '1' for the roce_max_srq_per_vf field to be
17459 	 * configured. Only valid for PF.
17460 	 */
17461 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_SRQ_PER_VF \
17462 		UINT32_C(0x100)
17463 	/*
17464 	 * This bit must be '1' for the roce_max_gid_per_vf field to be
17465 	 * configured. Only valid for PF.
17466 	 */
17467 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_ROCE_MAX_GID_PER_VF \
17468 		UINT32_C(0x200)
17469 	/*
17470 	 * This bit must be '1' for the xid_partition_cfg field to be
17471 	 * configured. Only valid for PF.
17472 	 */
17473 	#define HWRM_FUNC_CFG_INPUT_ENABLES2_XID_PARTITION_CFG \
17474 		UINT32_C(0x400)
17475 	/*
17476 	 * KDNet mode for the port for this function. If NPAR is
17477 	 * also configured on this port, it takes precedence. KDNet
17478 	 * mode is ignored for a VF.
17479 	 */
17480 	uint8_t	port_kdnet_mode;
17481 	/* KDNet mode is not enabled. */
17482 	#define HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_DISABLED UINT32_C(0x0)
17483 	/* KDNet mode enabled. */
17484 	#define HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_ENABLED  UINT32_C(0x1)
17485 	#define HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_LAST \
17486 		HWRM_FUNC_CFG_INPUT_PORT_KDNET_MODE_ENABLED
17487 	/*
17488 	 * This field can be used by the PF driver to configure the doorbell
17489 	 * page size. L2 driver can use different pages to ring the doorbell
17490 	 * for L2 push operation. The doorbell page size should be configured
17491 	 * to match the native CPU page size for proper RoCE and L2 doorbell
17492 	 * operations. This value supersedes the older method of configuring
17493 	 * the doorbell page size by the RoCE driver using the command queue
17494 	 * method. The default is 4K.
17495 	 */
17496 	uint8_t	db_page_size;
17497 	/* DB page size is 4KB. */
17498 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_4KB   UINT32_C(0x0)
17499 	/* DB page size is 8KB. */
17500 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_8KB   UINT32_C(0x1)
17501 	/* DB page size is 16KB. */
17502 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_16KB  UINT32_C(0x2)
17503 	/* DB page size is 32KB. */
17504 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_32KB  UINT32_C(0x3)
17505 	/* DB page size is 64KB. */
17506 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_64KB  UINT32_C(0x4)
17507 	/* DB page size is 128KB. */
17508 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_128KB UINT32_C(0x5)
17509 	/* DB page size is 256KB. */
17510 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_256KB UINT32_C(0x6)
17511 	/* DB page size is 512KB. */
17512 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_512KB UINT32_C(0x7)
17513 	/* DB page size is 1MB. */
17514 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_1MB   UINT32_C(0x8)
17515 	/* DB page size is 2MB. */
17516 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_2MB   UINT32_C(0x9)
17517 	/* DB page size is 4MB. */
17518 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_4MB   UINT32_C(0xa)
17519 	#define HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_LAST \
17520 		HWRM_FUNC_CFG_INPUT_DB_PAGE_SIZE_4MB
17521 	uint8_t	unused_1[2];
17522 	/* Number of KTLS Tx Key Contexts requested. */
17523 	uint32_t	num_ktls_tx_key_ctxs;
17524 	/* Number of KTLS Rx Key Contexts requested. */
17525 	uint32_t	num_ktls_rx_key_ctxs;
17526 	/* Number of QUIC Tx Key Contexts requested. */
17527 	uint32_t	num_quic_tx_key_ctxs;
17528 	/* Number of QUIC Rx Key Contexts requested. */
17529 	uint32_t	num_quic_rx_key_ctxs;
17530 	/* Number of AVs per VF. Only valid for PF. */
17531 	uint32_t	roce_max_av_per_vf;
17532 	/* Number of CQs per VF. Only valid for PF. */
17533 	uint32_t	roce_max_cq_per_vf;
17534 	/* Number of MR/MWs per VF. Only valid for PF. */
17535 	uint32_t	roce_max_mrw_per_vf;
17536 	/* Number of QPs per VF. Only valid for PF. */
17537 	uint32_t	roce_max_qp_per_vf;
17538 	/* Number of SRQs per VF. Only valid for PF. */
17539 	uint32_t	roce_max_srq_per_vf;
17540 	/* Number of GIDs per VF. Only valid for PF. */
17541 	uint32_t	roce_max_gid_per_vf;
17542 	/*
17543 	 * Bitmap of context types that have XID partition enabled.
17544 	 * Only valid for PF.
17545 	 */
17546 	uint16_t	xid_partition_cfg;
17547 	/*
17548 	 * When this bit is '1', it indicates that driver enables XID
17549 	 * partition on Tx crypto key contexts.
17550 	 */
17551 	#define HWRM_FUNC_CFG_INPUT_XID_PARTITION_CFG_TX_CK     UINT32_C(0x1)
17552 	/*
17553 	 * When this bit is '1', it indicates that driver enables XID
17554 	 * partition on Rx crypto key contexts.
17555 	 */
17556 	#define HWRM_FUNC_CFG_INPUT_XID_PARTITION_CFG_RX_CK     UINT32_C(0x2)
17557 	uint16_t	unused_2;
17558 } __rte_packed_end;
17559 
17560 /* hwrm_func_cfg_output (size:128b/16B) */
17561 struct __rte_packed_begin hwrm_func_cfg_output {
17562 	/* The specific error status for the command. */
17563 	uint16_t	error_code;
17564 	/* The HWRM command request type. */
17565 	uint16_t	req_type;
17566 	/* The sequence ID from the original command. */
17567 	uint16_t	seq_id;
17568 	/* The length of the response data in number of bytes. */
17569 	uint16_t	resp_len;
17570 	uint8_t	unused_0[7];
17571 	/*
17572 	 * This field is used in Output records to indicate that the output
17573 	 * is completely written to RAM. This field should be read as '1'
17574 	 * to indicate that the output has been completely written. When
17575 	 * writing a command completion or response to an internal processor,
17576 	 * the order of writes has to be such that this field is written last.
17577 	 */
17578 	uint8_t	valid;
17579 } __rte_packed_end;
17580 
17581 /* hwrm_func_cfg_cmd_err (size:64b/8B) */
17582 struct __rte_packed_begin hwrm_func_cfg_cmd_err {
17583 	/* command specific error codes for the cmd_err field in hwrm_err_output */
17584 	uint8_t	code;
17585 	/* Unknown error. */
17586 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_UNKNOWN \
17587 		UINT32_C(0x0)
17588 	/* The partition minimum bandwidth is out of range. */
17589 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_PARTITION_MIN_BW_RANGE \
17590 		UINT32_C(0x1)
17591 	/* The minimum bandwidth is more than the maximum bandwidth. */
17592 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_PARTITION_MIN_MORE_THAN_MAX \
17593 		UINT32_C(0x2)
17594 	/*
17595 	 * The NIC does not support enforcement of a minimum guaranteed
17596 	 * bandwidth for a partition.
17597 	 */
17598 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_PARTITION_MIN_BW_UNSUPPORTED \
17599 		UINT32_C(0x3)
17600 	/* Partition bandwidths must be specified as a percentage. */
17601 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_PARTITION_BW_PERCENT \
17602 		UINT32_C(0x4)
17603 	#define HWRM_FUNC_CFG_CMD_ERR_CODE_LAST \
17604 		HWRM_FUNC_CFG_CMD_ERR_CODE_PARTITION_BW_PERCENT
17605 	uint8_t	unused_0[7];
17606 } __rte_packed_end;
17607 
17608 /********************
17609  * hwrm_func_qstats *
17610  ********************/
17611 
17612 
17613 /* hwrm_func_qstats_input (size:192b/24B) */
17614 struct __rte_packed_begin hwrm_func_qstats_input {
17615 	/* The HWRM command request type. */
17616 	uint16_t	req_type;
17617 	/*
17618 	 * The completion ring to send the completion event on. This should
17619 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17620 	 */
17621 	uint16_t	cmpl_ring;
17622 	/*
17623 	 * The sequence ID is used by the driver for tracking multiple
17624 	 * commands. This ID is treated as opaque data by the firmware and
17625 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17626 	 */
17627 	uint16_t	seq_id;
17628 	/*
17629 	 * The target ID of the command:
17630 	 * * 0x0-0xFFF8 - The function ID
17631 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17632 	 * * 0xFFFD - Reserved for user-space HWRM interface
17633 	 * * 0xFFFF - HWRM
17634 	 */
17635 	uint16_t	target_id;
17636 	/*
17637 	 * A physical address pointer pointing to a host buffer that the
17638 	 * command's response data will be written. This can be either a host
17639 	 * physical address (HPA) or a guest physical address (GPA) and must
17640 	 * point to a physically contiguous block of memory.
17641 	 */
17642 	uint64_t	resp_addr;
17643 	/*
17644 	 * Function ID of the function that is being queried.
17645 	 * 0xFF... (All Fs) if the query is for the requesting
17646 	 * function.
17647 	 * A privileged PF can query for other function's statistics.
17648 	 */
17649 	uint16_t	fid;
17650 	uint8_t	flags;
17651 	/*
17652 	 * This bit should be set to 1 when request is for only RoCE
17653 	 * statistics. This will be honored only if the caller_fid is
17654 	 * a privileged PF. In all other cases FID and caller_fid should
17655 	 * be the same.
17656 	 */
17657 	#define HWRM_FUNC_QSTATS_INPUT_FLAGS_ROCE_ONLY        UINT32_C(0x1)
17658 	/*
17659 	 * This bit should be set to 1 when request is for the counter mask,
17660 	 * representing the width of each of the stats counters, rather
17661 	 * than counters themselves.
17662 	 */
17663 	#define HWRM_FUNC_QSTATS_INPUT_FLAGS_COUNTER_MASK     UINT32_C(0x2)
17664 	/*
17665 	 * This bit should be set to 1 when request is for only L2
17666 	 * statistics. This will be honored only if the caller_fid is
17667 	 * a privileged PF. In all other cases FID and caller_fid should
17668 	 * be the same.
17669 	 */
17670 	#define HWRM_FUNC_QSTATS_INPUT_FLAGS_L2_ONLY          UINT32_C(0x4)
17671 	uint8_t	unused_0[5];
17672 } __rte_packed_end;
17673 
17674 /* hwrm_func_qstats_output (size:1408b/176B) */
17675 struct __rte_packed_begin hwrm_func_qstats_output {
17676 	/* The specific error status for the command. */
17677 	uint16_t	error_code;
17678 	/* The HWRM command request type. */
17679 	uint16_t	req_type;
17680 	/* The sequence ID from the original command. */
17681 	uint16_t	seq_id;
17682 	/* The length of the response data in number of bytes. */
17683 	uint16_t	resp_len;
17684 	/* Number of transmitted unicast packets on the function. */
17685 	uint64_t	tx_ucast_pkts;
17686 	/* Number of transmitted multicast packets on the function. */
17687 	uint64_t	tx_mcast_pkts;
17688 	/* Number of transmitted broadcast packets on the function. */
17689 	uint64_t	tx_bcast_pkts;
17690 	/*
17691 	 * Number of transmitted packets that were discarded due to
17692 	 * internal NIC resource problems. For transmit, this
17693 	 * can only happen if TMP is configured to allow dropping
17694 	 * in HOL blocking conditions, which is not a normal
17695 	 * configuration.
17696 	 */
17697 	uint64_t	tx_discard_pkts;
17698 	/*
17699 	 * Number of dropped packets on transmit path on the function.
17700 	 * These are packets that have been marked for drop by
17701 	 * the TE CFA block or are packets that exceeded the
17702 	 * transmit MTU limit for the function.
17703 	 */
17704 	uint64_t	tx_drop_pkts;
17705 	/* Number of transmitted bytes for unicast traffic on the function. */
17706 	uint64_t	tx_ucast_bytes;
17707 	/* Number of transmitted bytes for multicast traffic on the function. */
17708 	uint64_t	tx_mcast_bytes;
17709 	/* Number of transmitted bytes for broadcast traffic on the function. */
17710 	uint64_t	tx_bcast_bytes;
17711 	/* Number of received unicast packets on the function. */
17712 	uint64_t	rx_ucast_pkts;
17713 	/* Number of received multicast packets on the function. */
17714 	uint64_t	rx_mcast_pkts;
17715 	/* Number of received broadcast packets on the function. */
17716 	uint64_t	rx_bcast_pkts;
17717 	/*
17718 	 * Number of received packets that were discarded on the function
17719 	 * due to resource limitations. This can happen for 3 reasons.
17720 	 * # The BD used for the packet has a bad format.
17721 	 * # There were no BDs available in the ring for the packet.
17722 	 * # There were no BDs available on-chip for the packet.
17723 	 */
17724 	uint64_t	rx_discard_pkts;
17725 	/*
17726 	 * Number of dropped packets on received path on the function.
17727 	 * These are packets that have been marked for drop by the
17728 	 * RE CFA.
17729 	 */
17730 	uint64_t	rx_drop_pkts;
17731 	/* Number of received bytes for unicast traffic on the function. */
17732 	uint64_t	rx_ucast_bytes;
17733 	/* Number of received bytes for multicast traffic on the function. */
17734 	uint64_t	rx_mcast_bytes;
17735 	/* Number of received bytes for broadcast traffic on the function. */
17736 	uint64_t	rx_bcast_bytes;
17737 	/* Number of aggregated unicast packets on the function. */
17738 	uint64_t	rx_agg_pkts;
17739 	/* Number of aggregated unicast bytes on the function. */
17740 	uint64_t	rx_agg_bytes;
17741 	/* Number of aggregation events on the function. */
17742 	uint64_t	rx_agg_events;
17743 	/* Number of aborted aggregations on the function. */
17744 	uint64_t	rx_agg_aborts;
17745 	/*
17746 	 * This field is the sequence of the statistics of a function being
17747 	 * cleared. Firmware starts the sequence from zero. It increments
17748 	 * the sequence number every time the statistics of the function
17749 	 * are cleared, which can be triggered by a clear statistics request
17750 	 * or by freeing all statistics contexts of the function. If a user
17751 	 * is interested in knowing if the statistics have been cleared
17752 	 * since the last query, it can keep track of this sequence number
17753 	 * between queries.
17754 	 */
17755 	uint8_t	clear_seq;
17756 	uint8_t	unused_0[6];
17757 	/*
17758 	 * This field is used in Output records to indicate that the output
17759 	 * is completely written to RAM. This field should be read as '1'
17760 	 * to indicate that the output has been completely written. When
17761 	 * writing a command completion or response to an internal processor,
17762 	 * the order of writes has to be such that this field is written last.
17763 	 */
17764 	uint8_t	valid;
17765 } __rte_packed_end;
17766 
17767 /************************
17768  * hwrm_func_qstats_ext *
17769  ************************/
17770 
17771 
17772 /* hwrm_func_qstats_ext_input (size:256b/32B) */
17773 struct __rte_packed_begin hwrm_func_qstats_ext_input {
17774 	/* The HWRM command request type. */
17775 	uint16_t	req_type;
17776 	/*
17777 	 * The completion ring to send the completion event on. This should
17778 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17779 	 */
17780 	uint16_t	cmpl_ring;
17781 	/*
17782 	 * The sequence ID is used by the driver for tracking multiple
17783 	 * commands. This ID is treated as opaque data by the firmware and
17784 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17785 	 */
17786 	uint16_t	seq_id;
17787 	/*
17788 	 * The target ID of the command:
17789 	 * * 0x0-0xFFF8 - The function ID
17790 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17791 	 * * 0xFFFD - Reserved for user-space HWRM interface
17792 	 * * 0xFFFF - HWRM
17793 	 */
17794 	uint16_t	target_id;
17795 	/*
17796 	 * A physical address pointer pointing to a host buffer that the
17797 	 * command's response data will be written. This can be either a host
17798 	 * physical address (HPA) or a guest physical address (GPA) and must
17799 	 * point to a physically contiguous block of memory.
17800 	 */
17801 	uint64_t	resp_addr;
17802 	/*
17803 	 * Function ID of the function that is being queried.
17804 	 * 0xFF... (All Fs) if the query is for the requesting
17805 	 * function.
17806 	 * A privileged PF can query for other function's statistics.
17807 	 */
17808 	uint16_t	fid;
17809 	uint8_t	flags;
17810 	/*
17811 	 * This bit should be set to 1 when request is for only RoCE
17812 	 * statistics. This will be honored only if the caller_fid is
17813 	 * a privileged PF. In all other cases FID and caller_fid should
17814 	 * be the same.
17815 	 */
17816 	#define HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_ROCE_ONLY        UINT32_C(0x1)
17817 	/*
17818 	 * This bit should be set to 1 when request is for the counter mask
17819 	 * representing the width of each of the stats counters, rather
17820 	 * than counters themselves.
17821 	 */
17822 	#define HWRM_FUNC_QSTATS_EXT_INPUT_FLAGS_COUNTER_MASK     UINT32_C(0x2)
17823 	uint8_t	unused_0[1];
17824 	uint32_t	enables;
17825 	/*
17826 	 * This bit must be '1' for the schq_id and traffic_class fields to
17827 	 * be configured.
17828 	 */
17829 	#define HWRM_FUNC_QSTATS_EXT_INPUT_ENABLES_SCHQ_ID     UINT32_C(0x1)
17830 	/* Specifies the SCHQ for which to gather statistics */
17831 	uint16_t	schq_id;
17832 	/*
17833 	 * Specifies the traffic class for which to gather statistics. Valid
17834 	 * values are 0 through (max_configurable_queues - 1), where
17835 	 * max_configurable_queues is in the response of HWRM_QUEUE_QPORTCFG
17836 	 */
17837 	uint16_t	traffic_class;
17838 	uint8_t	unused_1[4];
17839 } __rte_packed_end;
17840 
17841 /* hwrm_func_qstats_ext_output (size:1536b/192B) */
17842 struct __rte_packed_begin hwrm_func_qstats_ext_output {
17843 	/* The specific error status for the command. */
17844 	uint16_t	error_code;
17845 	/* The HWRM command request type. */
17846 	uint16_t	req_type;
17847 	/* The sequence ID from the original command. */
17848 	uint16_t	seq_id;
17849 	/* The length of the response data in number of bytes. */
17850 	uint16_t	resp_len;
17851 	/* Number of received unicast packets */
17852 	uint64_t	rx_ucast_pkts;
17853 	/* Number of received multicast packets */
17854 	uint64_t	rx_mcast_pkts;
17855 	/* Number of received broadcast packets */
17856 	uint64_t	rx_bcast_pkts;
17857 	/* Number of discarded packets on received path */
17858 	uint64_t	rx_discard_pkts;
17859 	/* Number of packets on receive path with error */
17860 	uint64_t	rx_error_pkts;
17861 	/* Number of received bytes for unicast traffic */
17862 	uint64_t	rx_ucast_bytes;
17863 	/* Number of received bytes for multicast traffic */
17864 	uint64_t	rx_mcast_bytes;
17865 	/* Number of received bytes for broadcast traffic */
17866 	uint64_t	rx_bcast_bytes;
17867 	/* Number of transmitted unicast packets */
17868 	uint64_t	tx_ucast_pkts;
17869 	/* Number of transmitted multicast packets */
17870 	uint64_t	tx_mcast_pkts;
17871 	/* Number of transmitted broadcast packets */
17872 	uint64_t	tx_bcast_pkts;
17873 	/* Number of packets on transmit path with error */
17874 	uint64_t	tx_error_pkts;
17875 	/* Number of discarded packets on transmit path */
17876 	uint64_t	tx_discard_pkts;
17877 	/* Number of transmitted bytes for unicast traffic */
17878 	uint64_t	tx_ucast_bytes;
17879 	/* Number of transmitted bytes for multicast traffic */
17880 	uint64_t	tx_mcast_bytes;
17881 	/* Number of transmitted bytes for broadcast traffic */
17882 	uint64_t	tx_bcast_bytes;
17883 	/* Number of TPA eligible packets */
17884 	uint64_t	rx_tpa_eligible_pkt;
17885 	/* Number of TPA eligible bytes */
17886 	uint64_t	rx_tpa_eligible_bytes;
17887 	/* Number of TPA packets */
17888 	uint64_t	rx_tpa_pkt;
17889 	/* Number of TPA bytes */
17890 	uint64_t	rx_tpa_bytes;
17891 	/* Number of TPA errors */
17892 	uint64_t	rx_tpa_errors;
17893 	/* Number of TPA errors */
17894 	uint64_t	rx_tpa_events;
17895 	uint8_t	unused_0[7];
17896 	/*
17897 	 * This field is used in Output records to indicate that the output
17898 	 * is completely written to RAM. This field should be read as '1'
17899 	 * to indicate that the output has been completely written. When
17900 	 * writing a command completion or response to an internal processor,
17901 	 * the order of writes has to be such that this field is written last.
17902 	 */
17903 	uint8_t	valid;
17904 } __rte_packed_end;
17905 
17906 /***********************
17907  * hwrm_func_clr_stats *
17908  ***********************/
17909 
17910 
17911 /* hwrm_func_clr_stats_input (size:192b/24B) */
17912 struct __rte_packed_begin hwrm_func_clr_stats_input {
17913 	/* The HWRM command request type. */
17914 	uint16_t	req_type;
17915 	/*
17916 	 * The completion ring to send the completion event on. This should
17917 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17918 	 */
17919 	uint16_t	cmpl_ring;
17920 	/*
17921 	 * The sequence ID is used by the driver for tracking multiple
17922 	 * commands. This ID is treated as opaque data by the firmware and
17923 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17924 	 */
17925 	uint16_t	seq_id;
17926 	/*
17927 	 * The target ID of the command:
17928 	 * * 0x0-0xFFF8 - The function ID
17929 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17930 	 * * 0xFFFD - Reserved for user-space HWRM interface
17931 	 * * 0xFFFF - HWRM
17932 	 */
17933 	uint16_t	target_id;
17934 	/*
17935 	 * A physical address pointer pointing to a host buffer that the
17936 	 * command's response data will be written. This can be either a host
17937 	 * physical address (HPA) or a guest physical address (GPA) and must
17938 	 * point to a physically contiguous block of memory.
17939 	 */
17940 	uint64_t	resp_addr;
17941 	/*
17942 	 * Function ID of the function.
17943 	 * 0xFF... (All Fs) if the query is for the requesting
17944 	 * function.
17945 	 */
17946 	uint16_t	fid;
17947 	uint8_t	unused_0[6];
17948 } __rte_packed_end;
17949 
17950 /* hwrm_func_clr_stats_output (size:128b/16B) */
17951 struct __rte_packed_begin hwrm_func_clr_stats_output {
17952 	/* The specific error status for the command. */
17953 	uint16_t	error_code;
17954 	/* The HWRM command request type. */
17955 	uint16_t	req_type;
17956 	/* The sequence ID from the original command. */
17957 	uint16_t	seq_id;
17958 	/* The length of the response data in number of bytes. */
17959 	uint16_t	resp_len;
17960 	uint8_t	unused_0[7];
17961 	/*
17962 	 * This field is used in Output records to indicate that the output
17963 	 * is completely written to RAM. This field should be read as '1'
17964 	 * to indicate that the output has been completely written. When
17965 	 * writing a command completion or response to an internal processor,
17966 	 * the order of writes has to be such that this field is written last.
17967 	 */
17968 	uint8_t	valid;
17969 } __rte_packed_end;
17970 
17971 /**************************
17972  * hwrm_func_vf_resc_free *
17973  **************************/
17974 
17975 
17976 /* hwrm_func_vf_resc_free_input (size:192b/24B) */
17977 struct __rte_packed_begin hwrm_func_vf_resc_free_input {
17978 	/* The HWRM command request type. */
17979 	uint16_t	req_type;
17980 	/*
17981 	 * The completion ring to send the completion event on. This should
17982 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
17983 	 */
17984 	uint16_t	cmpl_ring;
17985 	/*
17986 	 * The sequence ID is used by the driver for tracking multiple
17987 	 * commands. This ID is treated as opaque data by the firmware and
17988 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
17989 	 */
17990 	uint16_t	seq_id;
17991 	/*
17992 	 * The target ID of the command:
17993 	 * * 0x0-0xFFF8 - The function ID
17994 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
17995 	 * * 0xFFFD - Reserved for user-space HWRM interface
17996 	 * * 0xFFFF - HWRM
17997 	 */
17998 	uint16_t	target_id;
17999 	/*
18000 	 * A physical address pointer pointing to a host buffer that the
18001 	 * command's response data will be written. This can be either a host
18002 	 * physical address (HPA) or a guest physical address (GPA) and must
18003 	 * point to a physically contiguous block of memory.
18004 	 */
18005 	uint64_t	resp_addr;
18006 	/*
18007 	 * This value is used to identify a Virtual Function (VF).
18008 	 * The scope of VF ID is local within a PF.
18009 	 */
18010 	uint16_t	vf_id;
18011 	uint8_t	unused_0[6];
18012 } __rte_packed_end;
18013 
18014 /* hwrm_func_vf_resc_free_output (size:128b/16B) */
18015 struct __rte_packed_begin hwrm_func_vf_resc_free_output {
18016 	/* The specific error status for the command. */
18017 	uint16_t	error_code;
18018 	/* The HWRM command request type. */
18019 	uint16_t	req_type;
18020 	/* The sequence ID from the original command. */
18021 	uint16_t	seq_id;
18022 	/* The length of the response data in number of bytes. */
18023 	uint16_t	resp_len;
18024 	uint8_t	unused_0[7];
18025 	/*
18026 	 * This field is used in Output records to indicate that the output
18027 	 * is completely written to RAM. This field should be read as '1'
18028 	 * to indicate that the output has been completely written. When
18029 	 * writing a command completion or response to an internal processor,
18030 	 * the order of writes has to be such that this field is written last.
18031 	 */
18032 	uint8_t	valid;
18033 } __rte_packed_end;
18034 
18035 /**********************
18036  * hwrm_func_drv_rgtr *
18037  **********************/
18038 
18039 
18040 /* hwrm_func_drv_rgtr_input (size:896b/112B) */
18041 struct __rte_packed_begin hwrm_func_drv_rgtr_input {
18042 	/* The HWRM command request type. */
18043 	uint16_t	req_type;
18044 	/*
18045 	 * The completion ring to send the completion event on. This should
18046 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18047 	 */
18048 	uint16_t	cmpl_ring;
18049 	/*
18050 	 * The sequence ID is used by the driver for tracking multiple
18051 	 * commands. This ID is treated as opaque data by the firmware and
18052 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18053 	 */
18054 	uint16_t	seq_id;
18055 	/*
18056 	 * The target ID of the command:
18057 	 * * 0x0-0xFFF8 - The function ID
18058 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18059 	 * * 0xFFFD - Reserved for user-space HWRM interface
18060 	 * * 0xFFFF - HWRM
18061 	 */
18062 	uint16_t	target_id;
18063 	/*
18064 	 * A physical address pointer pointing to a host buffer that the
18065 	 * command's response data will be written. This can be either a host
18066 	 * physical address (HPA) or a guest physical address (GPA) and must
18067 	 * point to a physically contiguous block of memory.
18068 	 */
18069 	uint64_t	resp_addr;
18070 	uint32_t	flags;
18071 	/*
18072 	 * When this bit is '1', the function driver is requesting
18073 	 * all requests from its children VF drivers to be
18074 	 * forwarded to itself.
18075 	 * This flag can only be set by the PF driver.
18076 	 * If a VF driver sets this flag, it should be ignored
18077 	 * by the HWRM.
18078 	 */
18079 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_FWD_ALL_MODE \
18080 		UINT32_C(0x1)
18081 	/*
18082 	 * When this bit is '1', the function is requesting none of
18083 	 * the requests from its children VF drivers to be
18084 	 * forwarded to itself.
18085 	 * This flag can only be set by the PF driver.
18086 	 * If a VF driver sets this flag, it should be ignored
18087 	 * by the HWRM.
18088 	 */
18089 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_FWD_NONE_MODE \
18090 		UINT32_C(0x2)
18091 	/*
18092 	 * When this bit is '1', then ver_maj_8b, ver_min_8b, ver_upd_8b
18093 	 * fields shall be ignored and ver_maj, ver_min, ver_upd
18094 	 * and ver_patch shall be used for the driver version information.
18095 	 * When this bit is '0', then ver_maj_8b, ver_min_8b, ver_upd_8b
18096 	 * fields shall be used for the driver version information and
18097 	 * ver_maj, ver_min, ver_upd and ver_patch shall be ignored.
18098 	 */
18099 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_16BIT_VER_MODE \
18100 		UINT32_C(0x4)
18101 	/*
18102 	 * When this bit is '1', the function is indicating support of
18103 	 * 64bit flow handle. The firmware that only supports 64bit flow
18104 	 * handle should check this bit before allowing processing of
18105 	 * HWRM_CFA_FLOW_XXX commands from the requesting function as
18106 	 * firmware with 64bit flow handle support can only be compatible
18107 	 * with drivers that support 64bit flow handle. The legacy drivers
18108 	 * that don't support 64bit flow handle won't be able to use
18109 	 * HWRM_CFA_FLOW_XXX commands when running with new firmware that
18110 	 * only supports 64bit flow handle. The new firmware support 64bit
18111 	 * flow handle returns HWRM_ERR_CODE_CMD_NOT_SUPPORTED
18112 	 * status to the legacy driver when encounters these commands.
18113 	 */
18114 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_FLOW_HANDLE_64BIT_MODE \
18115 		UINT32_C(0x8)
18116 	/*
18117 	 * When this bit is '1', the function is indicating support of
18118 	 * Hot Reset. The driver interface will destroy the resources,
18119 	 * unregister the function and register again up on receiving
18120 	 * the RESET_NOTIFY Async notification from the core firmware.
18121 	 * The core firmware will this use flag and trigger the Hot Reset
18122 	 * process only if all the registered driver instances are capable
18123 	 * of this support.
18124 	 */
18125 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_HOT_RESET_SUPPORT \
18126 		UINT32_C(0x10)
18127 	/*
18128 	 * When this bit is 1, the function is indicating the support of the
18129 	 * error recovery capability. Error recovery support will be used by
18130 	 * firmware only if all the driver instances support error recovery
18131 	 * process. By setting this bit, driver is indicating support for
18132 	 * corresponding async event completion message. These will be
18133 	 * delivered to the driver even if they did not register for it.
18134 	 * If supported, after receiving reset notify async event with fatal
18135 	 * flag set in event data1, then all the drivers have to tear down
18136 	 * their resources without sending any HWRM commands to FW.
18137 	 */
18138 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_ERROR_RECOVERY_SUPPORT \
18139 		UINT32_C(0x20)
18140 	/*
18141 	 * When this bit is 1, the function is indicating the support of the
18142 	 * Master capability. The Firmware will use this capability to select
18143 	 * the Master function. The master function will be used to initiate
18144 	 * designated functionality like error recovery etc. If none of the
18145 	 * registered PF's or trusted VF's indicate this support, then
18146 	 * firmware will select the 1st registered PF as Master capable
18147 	 * instance.
18148 	 */
18149 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_MASTER_SUPPORT \
18150 		UINT32_C(0x40)
18151 	/*
18152 	 * When this bit is 1, the function is indicating the support of the
18153 	 * fast reset capability. Fast reset support will be used by
18154 	 * firmware only if all the driver instances support fast reset
18155 	 * process. By setting this bit, driver is indicating support for
18156 	 * corresponding async event completion message. These will be
18157 	 * delivered to the driver even if they did not register for it.
18158 	 * If supported, after receiving reset notify async event with fast
18159 	 * reset flag set in event data1, then all the drivers have to tear
18160 	 * down their resources without sending any HWRM commands to FW.
18161 	 */
18162 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_FAST_RESET_SUPPORT \
18163 		UINT32_C(0x80)
18164 	/*
18165 	 * When this bit is 1, the function's driver is indicating the
18166 	 * support of handling the vnic_rss_cfg's INVALID_PARAM error
18167 	 * returned by firmware. Firmware returns error, if host driver
18168 	 * configures the invalid hash_types bit combination for a given
18169 	 * IP version.
18170 	 */
18171 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_RSS_STRICT_HASH_TYPE_SUPPORT \
18172 		UINT32_C(0x100)
18173 	/*
18174 	 * When this bit is 1, the function's driver is indicating the
18175 	 * support of handling the NPAR 1.2 feature where the s-tag may be
18176 	 * a value other than 0x8100 or 0x88a8.
18177 	 */
18178 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_NPAR_1_2_SUPPORT \
18179 		UINT32_C(0x200)
18180 	/*
18181 	 * When this bit is 1, the function's driver is indicating the
18182 	 * support for asymmetric queue configuration, such that queue
18183 	 * ids and service profiles on TX side are not the same as the
18184 	 * corresponding queue configuration on the RX side
18185 	 */
18186 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_ASYM_QUEUE_CFG_SUPPORT \
18187 		UINT32_C(0x400)
18188 	/*
18189 	 * When this bit is 1, the function's driver is indicating to the
18190 	 * firmware that the Ingress NIC flows will be programmed by the
18191 	 * TruFlow application and the firmware flow manager should reject
18192 	 * flow-create commands that programs ingress lookup flows for this
18193 	 * function.
18194 	 */
18195 	#define HWRM_FUNC_DRV_RGTR_INPUT_FLAGS_TF_INGRESS_NIC_FLOW_MODE \
18196 		UINT32_C(0x800)
18197 	uint32_t	enables;
18198 	/*
18199 	 * This bit must be '1' for the os_type field to be
18200 	 * configured.
18201 	 */
18202 	#define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_OS_TYPE \
18203 		UINT32_C(0x1)
18204 	/*
18205 	 * This bit must be '1' for the ver field to be
18206 	 * configured.
18207 	 */
18208 	#define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VER \
18209 		UINT32_C(0x2)
18210 	/*
18211 	 * This bit must be '1' for the timestamp field to be
18212 	 * configured.
18213 	 */
18214 	#define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_TIMESTAMP \
18215 		UINT32_C(0x4)
18216 	/*
18217 	 * This bit must be '1' for the vf_req_fwd field to be
18218 	 * configured.
18219 	 */
18220 	#define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VF_REQ_FWD \
18221 		UINT32_C(0x8)
18222 	/*
18223 	 * This bit must be '1' for the async_event_fwd field to be
18224 	 * configured.
18225 	 */
18226 	#define HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_ASYNC_EVENT_FWD \
18227 		UINT32_C(0x10)
18228 	/*
18229 	 * This value indicates the type of OS. The values are based on
18230 	 * CIM_OperatingSystem.mof file as published by the DMTF.
18231 	 */
18232 	uint16_t	os_type;
18233 	/* Unknown */
18234 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_UNKNOWN   UINT32_C(0x0)
18235 	/* Other OS not listed below. */
18236 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_OTHER     UINT32_C(0x1)
18237 	/* MSDOS OS. */
18238 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_MSDOS     UINT32_C(0xe)
18239 	/* Windows OS. */
18240 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_WINDOWS   UINT32_C(0x12)
18241 	/* Solaris OS. */
18242 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_SOLARIS   UINT32_C(0x1d)
18243 	/* Linux OS. */
18244 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_LINUX     UINT32_C(0x24)
18245 	/* FreeBSD OS. */
18246 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_FREEBSD   UINT32_C(0x2a)
18247 	/* VMware ESXi OS. */
18248 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_ESXI      UINT32_C(0x68)
18249 	/* Microsoft Windows 8 64-bit OS. */
18250 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_WIN864    UINT32_C(0x73)
18251 	/* Microsoft Windows Server 2012 R2 OS. */
18252 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_WIN2012R2 UINT32_C(0x74)
18253 	/* UEFI driver. */
18254 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_UEFI      UINT32_C(0x8000)
18255 	#define HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_LAST \
18256 		HWRM_FUNC_DRV_RGTR_INPUT_OS_TYPE_UEFI
18257 	/* This is the 8bit major version of the driver. */
18258 	uint8_t	ver_maj_8b;
18259 	/* This is the 8bit minor version of the driver. */
18260 	uint8_t	ver_min_8b;
18261 	/* This is the 8bit update version of the driver. */
18262 	uint8_t	ver_upd_8b;
18263 	uint8_t	unused_0[3];
18264 	/*
18265 	 * This is a 32-bit timestamp provided by the driver for
18266 	 * keep alive.
18267 	 * The timestamp is in multiples of 1ms.
18268 	 */
18269 	uint32_t	timestamp;
18270 	uint8_t	unused_1[4];
18271 	/*
18272 	 * This is a 256-bit bit mask provided by the PF driver for
18273 	 * letting the HWRM know what commands issued by the VF driver
18274 	 * to the HWRM should be forwarded to the PF driver.
18275 	 * Nth bit refers to the Nth req_type.
18276 	 *
18277 	 * Setting Nth bit to 1 indicates that requests from the
18278 	 * VF driver with req_type equal to N shall be forwarded to
18279 	 * the parent PF driver.
18280 	 *
18281 	 * This field is not valid for the VF driver.
18282 	 */
18283 	uint32_t	vf_req_fwd[8];
18284 	/*
18285 	 * This is a 256-bit bit mask provided by the function driver
18286 	 * (PF or VF driver) to indicate the list of asynchronous event
18287 	 * completions to be forwarded.
18288 	 *
18289 	 * Nth bit refers to the Nth event_id.
18290 	 *
18291 	 * Setting Nth bit to 1 by the function driver shall result in
18292 	 * the HWRM forwarding asynchronous event completion with
18293 	 * event_id equal to N.
18294 	 *
18295 	 * If all bits are set to 0 (value of 0), then the HWRM shall
18296 	 * not forward any asynchronous event completion to this
18297 	 * function driver.
18298 	 */
18299 	uint32_t	async_event_fwd[8];
18300 	/* This is the 16bit major version of the driver. */
18301 	uint16_t	ver_maj;
18302 	/* This is the 16bit minor version of the driver. */
18303 	uint16_t	ver_min;
18304 	/* This is the 16bit update version of the driver. */
18305 	uint16_t	ver_upd;
18306 	/* This is the 16bit patch version of the driver. */
18307 	uint16_t	ver_patch;
18308 } __rte_packed_end;
18309 
18310 /* hwrm_func_drv_rgtr_output (size:128b/16B) */
18311 struct __rte_packed_begin hwrm_func_drv_rgtr_output {
18312 	/* The specific error status for the command. */
18313 	uint16_t	error_code;
18314 	/* The HWRM command request type. */
18315 	uint16_t	req_type;
18316 	/* The sequence ID from the original command. */
18317 	uint16_t	seq_id;
18318 	/* The length of the response data in number of bytes. */
18319 	uint16_t	resp_len;
18320 	uint32_t	flags;
18321 	/*
18322 	 * When this bit is '1', it indicates that the
18323 	 * HWRM_FUNC_DRV_IF_CHANGE call is supported.
18324 	 */
18325 	#define HWRM_FUNC_DRV_RGTR_OUTPUT_FLAGS_IF_CHANGE_SUPPORTED \
18326 		UINT32_C(0x1)
18327 	uint8_t	unused_0[3];
18328 	/*
18329 	 * This field is used in Output records to indicate that the output
18330 	 * is completely written to RAM. This field should be read as '1'
18331 	 * to indicate that the output has been completely written. When
18332 	 * writing a command completion or response to an internal processor,
18333 	 * the order of writes has to be such that this field is written last.
18334 	 */
18335 	uint8_t	valid;
18336 } __rte_packed_end;
18337 
18338 /************************
18339  * hwrm_func_drv_unrgtr *
18340  ************************/
18341 
18342 
18343 /* hwrm_func_drv_unrgtr_input (size:192b/24B) */
18344 struct __rte_packed_begin hwrm_func_drv_unrgtr_input {
18345 	/* The HWRM command request type. */
18346 	uint16_t	req_type;
18347 	/*
18348 	 * The completion ring to send the completion event on. This should
18349 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18350 	 */
18351 	uint16_t	cmpl_ring;
18352 	/*
18353 	 * The sequence ID is used by the driver for tracking multiple
18354 	 * commands. This ID is treated as opaque data by the firmware and
18355 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18356 	 */
18357 	uint16_t	seq_id;
18358 	/*
18359 	 * The target ID of the command:
18360 	 * * 0x0-0xFFF8 - The function ID
18361 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18362 	 * * 0xFFFD - Reserved for user-space HWRM interface
18363 	 * * 0xFFFF - HWRM
18364 	 */
18365 	uint16_t	target_id;
18366 	/*
18367 	 * A physical address pointer pointing to a host buffer that the
18368 	 * command's response data will be written. This can be either a host
18369 	 * physical address (HPA) or a guest physical address (GPA) and must
18370 	 * point to a physically contiguous block of memory.
18371 	 */
18372 	uint64_t	resp_addr;
18373 	uint32_t	flags;
18374 	/*
18375 	 * When this bit is '1', the function driver is notifying
18376 	 * the HWRM to prepare for the shutdown.
18377 	 */
18378 	#define HWRM_FUNC_DRV_UNRGTR_INPUT_FLAGS_PREPARE_FOR_SHUTDOWN \
18379 		UINT32_C(0x1)
18380 	uint8_t	unused_0[4];
18381 } __rte_packed_end;
18382 
18383 /* hwrm_func_drv_unrgtr_output (size:128b/16B) */
18384 struct __rte_packed_begin hwrm_func_drv_unrgtr_output {
18385 	/* The specific error status for the command. */
18386 	uint16_t	error_code;
18387 	/* The HWRM command request type. */
18388 	uint16_t	req_type;
18389 	/* The sequence ID from the original command. */
18390 	uint16_t	seq_id;
18391 	/* The length of the response data in number of bytes. */
18392 	uint16_t	resp_len;
18393 	uint8_t	unused_0[7];
18394 	/*
18395 	 * This field is used in Output records to indicate that the output
18396 	 * is completely written to RAM. This field should be read as '1'
18397 	 * to indicate that the output has been completely written. When
18398 	 * writing a command completion or response to an internal processor,
18399 	 * the order of writes has to be such that this field is written last.
18400 	 */
18401 	uint8_t	valid;
18402 } __rte_packed_end;
18403 
18404 /**********************
18405  * hwrm_func_buf_rgtr *
18406  **********************/
18407 
18408 
18409 /* hwrm_func_buf_rgtr_input (size:1024b/128B) */
18410 struct __rte_packed_begin hwrm_func_buf_rgtr_input {
18411 	/* The HWRM command request type. */
18412 	uint16_t	req_type;
18413 	/*
18414 	 * The completion ring to send the completion event on. This should
18415 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18416 	 */
18417 	uint16_t	cmpl_ring;
18418 	/*
18419 	 * The sequence ID is used by the driver for tracking multiple
18420 	 * commands. This ID is treated as opaque data by the firmware and
18421 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18422 	 */
18423 	uint16_t	seq_id;
18424 	/*
18425 	 * The target ID of the command:
18426 	 * * 0x0-0xFFF8 - The function ID
18427 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18428 	 * * 0xFFFD - Reserved for user-space HWRM interface
18429 	 * * 0xFFFF - HWRM
18430 	 */
18431 	uint16_t	target_id;
18432 	/*
18433 	 * A physical address pointer pointing to a host buffer that the
18434 	 * command's response data will be written. This can be either a host
18435 	 * physical address (HPA) or a guest physical address (GPA) and must
18436 	 * point to a physically contiguous block of memory.
18437 	 */
18438 	uint64_t	resp_addr;
18439 	uint32_t	enables;
18440 	/*
18441 	 * This bit must be '1' for the vf_id field to be
18442 	 * configured.
18443 	 */
18444 	#define HWRM_FUNC_BUF_RGTR_INPUT_ENABLES_VF_ID            UINT32_C(0x1)
18445 	/*
18446 	 * This bit must be '1' for the err_buf_addr field to be
18447 	 * configured.
18448 	 */
18449 	#define HWRM_FUNC_BUF_RGTR_INPUT_ENABLES_ERR_BUF_ADDR     UINT32_C(0x2)
18450 	/*
18451 	 * This value is used to identify a Virtual Function (VF).
18452 	 * The scope of VF ID is local within a PF.
18453 	 */
18454 	uint16_t	vf_id;
18455 	/*
18456 	 * This field represents the number of pages used for request
18457 	 * buffer(s).
18458 	 */
18459 	uint16_t	req_buf_num_pages;
18460 	/*
18461 	 * This field represents the page size used for request
18462 	 * buffer(s).
18463 	 */
18464 	uint16_t	req_buf_page_size;
18465 	/* 16 bytes */
18466 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_16B UINT32_C(0x4)
18467 	/* 4 Kbytes */
18468 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_4K  UINT32_C(0xc)
18469 	/* 8 Kbytes */
18470 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_8K  UINT32_C(0xd)
18471 	/* 64 Kbytes */
18472 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_64K UINT32_C(0x10)
18473 	/* 2 Mbytes */
18474 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_2M  UINT32_C(0x15)
18475 	/* 4 Mbytes */
18476 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_4M  UINT32_C(0x16)
18477 	/* 1 Gbytes */
18478 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_1G  UINT32_C(0x1e)
18479 	#define HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_LAST \
18480 		HWRM_FUNC_BUF_RGTR_INPUT_REQ_BUF_PAGE_SIZE_1G
18481 	/* The length of the request buffer per VF in bytes. */
18482 	uint16_t	req_buf_len;
18483 	/* The length of the response buffer in bytes. */
18484 	uint16_t	resp_buf_len;
18485 	uint8_t	unused_0[2];
18486 	/* This field represents the page address of page #0. */
18487 	uint64_t	req_buf_page_addr0;
18488 	/* This field represents the page address of page #1. */
18489 	uint64_t	req_buf_page_addr1;
18490 	/* This field represents the page address of page #2. */
18491 	uint64_t	req_buf_page_addr2;
18492 	/* This field represents the page address of page #3. */
18493 	uint64_t	req_buf_page_addr3;
18494 	/* This field represents the page address of page #4. */
18495 	uint64_t	req_buf_page_addr4;
18496 	/* This field represents the page address of page #5. */
18497 	uint64_t	req_buf_page_addr5;
18498 	/* This field represents the page address of page #6. */
18499 	uint64_t	req_buf_page_addr6;
18500 	/* This field represents the page address of page #7. */
18501 	uint64_t	req_buf_page_addr7;
18502 	/* This field represents the page address of page #8. */
18503 	uint64_t	req_buf_page_addr8;
18504 	/* This field represents the page address of page #9. */
18505 	uint64_t	req_buf_page_addr9;
18506 	/*
18507 	 * This field is used to receive the error reporting from
18508 	 * the chipset. Only applicable for PFs.
18509 	 */
18510 	uint64_t	error_buf_addr;
18511 	/*
18512 	 * This field is used to receive the response forwarded by the
18513 	 * HWRM.
18514 	 */
18515 	uint64_t	resp_buf_addr;
18516 } __rte_packed_end;
18517 
18518 /* hwrm_func_buf_rgtr_output (size:128b/16B) */
18519 struct __rte_packed_begin hwrm_func_buf_rgtr_output {
18520 	/* The specific error status for the command. */
18521 	uint16_t	error_code;
18522 	/* The HWRM command request type. */
18523 	uint16_t	req_type;
18524 	/* The sequence ID from the original command. */
18525 	uint16_t	seq_id;
18526 	/* The length of the response data in number of bytes. */
18527 	uint16_t	resp_len;
18528 	uint8_t	unused_0[7];
18529 	/*
18530 	 * This field is used in Output records to indicate that the output
18531 	 * is completely written to RAM. This field should be read as '1'
18532 	 * to indicate that the output has been completely written. When
18533 	 * writing a command completion or response to an internal processor,
18534 	 * the order of writes has to be such that this field is written last.
18535 	 */
18536 	uint8_t	valid;
18537 } __rte_packed_end;
18538 
18539 /************************
18540  * hwrm_func_buf_unrgtr *
18541  ************************/
18542 
18543 
18544 /* hwrm_func_buf_unrgtr_input (size:192b/24B) */
18545 struct __rte_packed_begin hwrm_func_buf_unrgtr_input {
18546 	/* The HWRM command request type. */
18547 	uint16_t	req_type;
18548 	/*
18549 	 * The completion ring to send the completion event on. This should
18550 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18551 	 */
18552 	uint16_t	cmpl_ring;
18553 	/*
18554 	 * The sequence ID is used by the driver for tracking multiple
18555 	 * commands. This ID is treated as opaque data by the firmware and
18556 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18557 	 */
18558 	uint16_t	seq_id;
18559 	/*
18560 	 * The target ID of the command:
18561 	 * * 0x0-0xFFF8 - The function ID
18562 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18563 	 * * 0xFFFD - Reserved for user-space HWRM interface
18564 	 * * 0xFFFF - HWRM
18565 	 */
18566 	uint16_t	target_id;
18567 	/*
18568 	 * A physical address pointer pointing to a host buffer that the
18569 	 * command's response data will be written. This can be either a host
18570 	 * physical address (HPA) or a guest physical address (GPA) and must
18571 	 * point to a physically contiguous block of memory.
18572 	 */
18573 	uint64_t	resp_addr;
18574 	uint32_t	enables;
18575 	/*
18576 	 * This bit must be '1' for the vf_id field to be
18577 	 * configured.
18578 	 */
18579 	#define HWRM_FUNC_BUF_UNRGTR_INPUT_ENABLES_VF_ID     UINT32_C(0x1)
18580 	/*
18581 	 * This value is used to identify a Virtual Function (VF).
18582 	 * The scope of VF ID is local within a PF.
18583 	 */
18584 	uint16_t	vf_id;
18585 	uint8_t	unused_0[2];
18586 } __rte_packed_end;
18587 
18588 /* hwrm_func_buf_unrgtr_output (size:128b/16B) */
18589 struct __rte_packed_begin hwrm_func_buf_unrgtr_output {
18590 	/* The specific error status for the command. */
18591 	uint16_t	error_code;
18592 	/* The HWRM command request type. */
18593 	uint16_t	req_type;
18594 	/* The sequence ID from the original command. */
18595 	uint16_t	seq_id;
18596 	/* The length of the response data in number of bytes. */
18597 	uint16_t	resp_len;
18598 	uint8_t	unused_0[7];
18599 	/*
18600 	 * This field is used in Output records to indicate that the output
18601 	 * is completely written to RAM. This field should be read as '1'
18602 	 * to indicate that the output has been completely written. When
18603 	 * writing a command completion or response to an internal processor,
18604 	 * the order of writes has to be such that this field is written last.
18605 	 */
18606 	uint8_t	valid;
18607 } __rte_packed_end;
18608 
18609 /**********************
18610  * hwrm_func_drv_qver *
18611  **********************/
18612 
18613 
18614 /* hwrm_func_drv_qver_input (size:192b/24B) */
18615 struct __rte_packed_begin hwrm_func_drv_qver_input {
18616 	/* The HWRM command request type. */
18617 	uint16_t	req_type;
18618 	/*
18619 	 * The completion ring to send the completion event on. This should
18620 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18621 	 */
18622 	uint16_t	cmpl_ring;
18623 	/*
18624 	 * The sequence ID is used by the driver for tracking multiple
18625 	 * commands. This ID is treated as opaque data by the firmware and
18626 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18627 	 */
18628 	uint16_t	seq_id;
18629 	/*
18630 	 * The target ID of the command:
18631 	 * * 0x0-0xFFF8 - The function ID
18632 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18633 	 * * 0xFFFD - Reserved for user-space HWRM interface
18634 	 * * 0xFFFF - HWRM
18635 	 */
18636 	uint16_t	target_id;
18637 	/*
18638 	 * A physical address pointer pointing to a host buffer that the
18639 	 * command's response data will be written. This can be either a host
18640 	 * physical address (HPA) or a guest physical address (GPA) and must
18641 	 * point to a physically contiguous block of memory.
18642 	 */
18643 	uint64_t	resp_addr;
18644 	/* Reserved for future use. */
18645 	uint32_t	reserved;
18646 	/*
18647 	 * Function ID of the function that is being queried.
18648 	 * 0xFF... (All Fs) if the query is for the requesting
18649 	 * function.
18650 	 */
18651 	uint16_t	fid;
18652 	/*
18653 	 * This field is used to indicate the driver type.
18654 	 * L2 or RoCE
18655 	 */
18656 	uint8_t	driver_type;
18657 	/* L2 driver version */
18658 	#define HWRM_FUNC_DRV_QVER_INPUT_DRIVER_TYPE_L2   UINT32_C(0x0)
18659 	/* RoCE driver version */
18660 	#define HWRM_FUNC_DRV_QVER_INPUT_DRIVER_TYPE_ROCE UINT32_C(0x1)
18661 	#define HWRM_FUNC_DRV_QVER_INPUT_DRIVER_TYPE_LAST \
18662 		HWRM_FUNC_DRV_QVER_INPUT_DRIVER_TYPE_ROCE
18663 	uint8_t	unused_0;
18664 } __rte_packed_end;
18665 
18666 /* hwrm_func_drv_qver_output (size:256b/32B) */
18667 struct __rte_packed_begin hwrm_func_drv_qver_output {
18668 	/* The specific error status for the command. */
18669 	uint16_t	error_code;
18670 	/* The HWRM command request type. */
18671 	uint16_t	req_type;
18672 	/* The sequence ID from the original command. */
18673 	uint16_t	seq_id;
18674 	/* The length of the response data in number of bytes. */
18675 	uint16_t	resp_len;
18676 	/*
18677 	 * This value indicates the type of OS. The values are based on
18678 	 * CIM_OperatingSystem.mof file as published by the DMTF.
18679 	 */
18680 	uint16_t	os_type;
18681 	/* Unknown */
18682 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_UNKNOWN   UINT32_C(0x0)
18683 	/* Other OS not listed below. */
18684 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_OTHER     UINT32_C(0x1)
18685 	/* MSDOS OS. */
18686 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_MSDOS     UINT32_C(0xe)
18687 	/* Windows OS. */
18688 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_WINDOWS   UINT32_C(0x12)
18689 	/* Solaris OS. */
18690 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_SOLARIS   UINT32_C(0x1d)
18691 	/* Linux OS. */
18692 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_LINUX     UINT32_C(0x24)
18693 	/* FreeBSD OS. */
18694 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_FREEBSD   UINT32_C(0x2a)
18695 	/* VMware ESXi OS. */
18696 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_ESXI      UINT32_C(0x68)
18697 	/* Microsoft Windows 8 64-bit OS. */
18698 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_WIN864    UINT32_C(0x73)
18699 	/* Microsoft Windows Server 2012 R2 OS. */
18700 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_WIN2012R2 UINT32_C(0x74)
18701 	/* UEFI driver. */
18702 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_UEFI      UINT32_C(0x8000)
18703 	#define HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_LAST \
18704 		HWRM_FUNC_DRV_QVER_OUTPUT_OS_TYPE_UEFI
18705 	/* This is the 8bit major version of the driver. */
18706 	uint8_t	ver_maj_8b;
18707 	/* This is the 8bit minor version of the driver. */
18708 	uint8_t	ver_min_8b;
18709 	/* This is the 8bit update version of the driver. */
18710 	uint8_t	ver_upd_8b;
18711 	uint8_t	unused_0[3];
18712 	/* This is the 16bit major version of the driver. */
18713 	uint16_t	ver_maj;
18714 	/* This is the 16bit minor version of the driver. */
18715 	uint16_t	ver_min;
18716 	/* This is the 16bit update version of the driver. */
18717 	uint16_t	ver_upd;
18718 	/* This is the 16bit patch version of the driver. */
18719 	uint16_t	ver_patch;
18720 	uint8_t	unused_1[7];
18721 	/*
18722 	 * This field is used in Output records to indicate that the output
18723 	 * is completely written to RAM. This field should be read as '1'
18724 	 * to indicate that the output has been completely written. When
18725 	 * writing a command completion or response to an internal processor,
18726 	 * the order of writes has to be such that this field is written last.
18727 	 */
18728 	uint8_t	valid;
18729 } __rte_packed_end;
18730 
18731 /****************************
18732  * hwrm_func_resource_qcaps *
18733  ****************************/
18734 
18735 
18736 /* hwrm_func_resource_qcaps_input (size:192b/24B) */
18737 struct __rte_packed_begin hwrm_func_resource_qcaps_input {
18738 	/* The HWRM command request type. */
18739 	uint16_t	req_type;
18740 	/*
18741 	 * The completion ring to send the completion event on. This should
18742 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18743 	 */
18744 	uint16_t	cmpl_ring;
18745 	/*
18746 	 * The sequence ID is used by the driver for tracking multiple
18747 	 * commands. This ID is treated as opaque data by the firmware and
18748 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18749 	 */
18750 	uint16_t	seq_id;
18751 	/*
18752 	 * The target ID of the command:
18753 	 * * 0x0-0xFFF8 - The function ID
18754 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18755 	 * * 0xFFFD - Reserved for user-space HWRM interface
18756 	 * * 0xFFFF - HWRM
18757 	 */
18758 	uint16_t	target_id;
18759 	/*
18760 	 * A physical address pointer pointing to a host buffer that the
18761 	 * command's response data will be written. This can be either a host
18762 	 * physical address (HPA) or a guest physical address (GPA) and must
18763 	 * point to a physically contiguous block of memory.
18764 	 */
18765 	uint64_t	resp_addr;
18766 	/*
18767 	 * Function ID of the function that is being queried.
18768 	 * 0xFF... (All Fs) if the query is for the requesting
18769 	 * function.
18770 	 */
18771 	uint16_t	fid;
18772 	uint8_t	unused_0[6];
18773 } __rte_packed_end;
18774 
18775 /* hwrm_func_resource_qcaps_output (size:704b/88B) */
18776 struct __rte_packed_begin hwrm_func_resource_qcaps_output {
18777 	/* The specific error status for the command. */
18778 	uint16_t	error_code;
18779 	/* The HWRM command request type. */
18780 	uint16_t	req_type;
18781 	/* The sequence ID from the original command. */
18782 	uint16_t	seq_id;
18783 	/* The length of the response data in number of bytes. */
18784 	uint16_t	resp_len;
18785 	/*
18786 	 * Maximum guaranteed number of VFs supported by PF. Not applicable for
18787 	 * VFs.
18788 	 */
18789 	uint16_t	max_vfs;
18790 	/* Maximum guaranteed number of MSI-X vectors supported by function. */
18791 	uint16_t	max_msix;
18792 	/*
18793 	 * Hint of strategy to be used by PF driver to reserve resources for
18794 	 * its VF.
18795 	 */
18796 	uint16_t	vf_reservation_strategy;
18797 	/*
18798 	 * The PF driver should evenly divide its remaining resources among
18799 	 * all VFs.
18800 	 */
18801 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MAXIMAL \
18802 		UINT32_C(0x0)
18803 	/* The PF driver should only reserve minimal resources for each VF. */
18804 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL \
18805 		UINT32_C(0x1)
18806 	/*
18807 	 * The PF driver should not reserve any resources for each VF until
18808 	 * the VF interface is brought up.
18809 	 */
18810 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL_STATIC \
18811 		UINT32_C(0x2)
18812 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_LAST \
18813 		HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL_STATIC
18814 	/* Minimum guaranteed number of RSS/COS contexts. */
18815 	uint16_t	min_rsscos_ctx;
18816 	/* Maximum non-guaranteed number of RSS/COS contexts */
18817 	uint16_t	max_rsscos_ctx;
18818 	/* Minimum guaranteed number of completion rings */
18819 	uint16_t	min_cmpl_rings;
18820 	/* Maximum non-guaranteed number of completion rings */
18821 	uint16_t	max_cmpl_rings;
18822 	/* Minimum guaranteed number of transmit rings */
18823 	uint16_t	min_tx_rings;
18824 	/* Maximum non-guaranteed number of transmit rings */
18825 	uint16_t	max_tx_rings;
18826 	/* Minimum guaranteed number of receive rings */
18827 	uint16_t	min_rx_rings;
18828 	/* Maximum non-guaranteed number of receive rings */
18829 	uint16_t	max_rx_rings;
18830 	/* Minimum guaranteed number of L2 contexts */
18831 	uint16_t	min_l2_ctxs;
18832 	/* Maximum non-guaranteed number of L2 contexts */
18833 	uint16_t	max_l2_ctxs;
18834 	/* Minimum guaranteed number of VNICs */
18835 	uint16_t	min_vnics;
18836 	/* Maximum non-guaranteed number of VNICs */
18837 	uint16_t	max_vnics;
18838 	/* Minimum guaranteed number of statistic contexts */
18839 	uint16_t	min_stat_ctx;
18840 	/* Maximum non-guaranteed number of statistic contexts */
18841 	uint16_t	max_stat_ctx;
18842 	/* Minimum guaranteed number of ring groups */
18843 	uint16_t	min_hw_ring_grps;
18844 	/* Maximum non-guaranteed number of ring groups */
18845 	uint16_t	max_hw_ring_grps;
18846 	/*
18847 	 * Maximum number of inputs into the transmit scheduler for this
18848 	 * function. The number of TX rings assigned to the function cannot
18849 	 * exceed this value.
18850 	 */
18851 	uint16_t	max_tx_scheduler_inputs;
18852 	uint16_t	flags;
18853 	/*
18854 	 * When this bit is '1', it indicates that VF_RESOURCE_CFG supports
18855 	 * feature to reserve all minimum resources when minimum >= 1,
18856 	 * otherwise returns an error.
18857 	 */
18858 	#define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_FLAGS_MIN_GUARANTEED \
18859 		UINT32_C(0x1)
18860 	/* Minimum guaranteed number of MSI-X vectors supported by function */
18861 	uint16_t	min_msix;
18862 	/* Minimum guaranteed number of KTLS Tx Key Contexts */
18863 	uint32_t	min_ktls_tx_key_ctxs;
18864 	/* Maximum non-guaranteed number of KTLS Tx Key Contexts */
18865 	uint32_t	max_ktls_tx_key_ctxs;
18866 	/* Minimum guaranteed number of KTLS Rx Key Contexts */
18867 	uint32_t	min_ktls_rx_key_ctxs;
18868 	/* Maximum non-guaranteed number of KTLS Rx Key Contexts */
18869 	uint32_t	max_ktls_rx_key_ctxs;
18870 	/* Minimum guaranteed number of QUIC Tx Key Contexts */
18871 	uint32_t	min_quic_tx_key_ctxs;
18872 	/* Maximum non-guaranteed number of QUIC Tx Key Contexts */
18873 	uint32_t	max_quic_tx_key_ctxs;
18874 	/* Minimum guaranteed number of QUIC Rx Key Contexts */
18875 	uint32_t	min_quic_rx_key_ctxs;
18876 	/* Maximum non-guaranteed number of QUIC Rx Key Contexts */
18877 	uint32_t	max_quic_rx_key_ctxs;
18878 	uint8_t	unused_0[3];
18879 	/*
18880 	 * This field is used in Output records to indicate that the output
18881 	 * is completely written to RAM. This field should be read as '1'
18882 	 * to indicate that the output has been completely written. When
18883 	 * writing a command completion or response to an internal processor,
18884 	 * the order of writes has to be such that this field is written last.
18885 	 */
18886 	uint8_t	valid;
18887 } __rte_packed_end;
18888 
18889 /*****************************
18890  * hwrm_func_vf_resource_cfg *
18891  *****************************/
18892 
18893 
18894 /* hwrm_func_vf_resource_cfg_input (size:704b/88B) */
18895 struct __rte_packed_begin hwrm_func_vf_resource_cfg_input {
18896 	/* The HWRM command request type. */
18897 	uint16_t	req_type;
18898 	/*
18899 	 * The completion ring to send the completion event on. This should
18900 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
18901 	 */
18902 	uint16_t	cmpl_ring;
18903 	/*
18904 	 * The sequence ID is used by the driver for tracking multiple
18905 	 * commands. This ID is treated as opaque data by the firmware and
18906 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
18907 	 */
18908 	uint16_t	seq_id;
18909 	/*
18910 	 * The target ID of the command:
18911 	 * * 0x0-0xFFF8 - The function ID
18912 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
18913 	 * * 0xFFFD - Reserved for user-space HWRM interface
18914 	 * * 0xFFFF - HWRM
18915 	 */
18916 	uint16_t	target_id;
18917 	/*
18918 	 * A physical address pointer pointing to a host buffer that the
18919 	 * command's response data will be written. This can be either a host
18920 	 * physical address (HPA) or a guest physical address (GPA) and must
18921 	 * point to a physically contiguous block of memory.
18922 	 */
18923 	uint64_t	resp_addr;
18924 	/* VF ID that is being configured by PF */
18925 	uint16_t	vf_id;
18926 	/* Maximum guaranteed number of MSI-X vectors for the function */
18927 	uint16_t	max_msix;
18928 	/* Minimum guaranteed number of RSS/COS contexts */
18929 	uint16_t	min_rsscos_ctx;
18930 	/* Maximum non-guaranteed number of RSS/COS contexts */
18931 	uint16_t	max_rsscos_ctx;
18932 	/* Minimum guaranteed number of completion rings */
18933 	uint16_t	min_cmpl_rings;
18934 	/* Maximum non-guaranteed number of completion rings */
18935 	uint16_t	max_cmpl_rings;
18936 	/* Minimum guaranteed number of transmit rings */
18937 	uint16_t	min_tx_rings;
18938 	/* Maximum non-guaranteed number of transmit rings */
18939 	uint16_t	max_tx_rings;
18940 	/* Minimum guaranteed number of receive rings */
18941 	uint16_t	min_rx_rings;
18942 	/* Maximum non-guaranteed number of receive rings */
18943 	uint16_t	max_rx_rings;
18944 	/* Minimum guaranteed number of L2 contexts */
18945 	uint16_t	min_l2_ctxs;
18946 	/* Maximum non-guaranteed number of L2 contexts */
18947 	uint16_t	max_l2_ctxs;
18948 	/* Minimum guaranteed number of VNICs */
18949 	uint16_t	min_vnics;
18950 	/* Maximum non-guaranteed number of VNICs */
18951 	uint16_t	max_vnics;
18952 	/* Minimum guaranteed number of statistic contexts */
18953 	uint16_t	min_stat_ctx;
18954 	/* Maximum non-guaranteed number of statistic contexts */
18955 	uint16_t	max_stat_ctx;
18956 	/* Minimum guaranteed number of ring groups */
18957 	uint16_t	min_hw_ring_grps;
18958 	/* Maximum non-guaranteed number of ring groups */
18959 	uint16_t	max_hw_ring_grps;
18960 	uint16_t	flags;
18961 	/*
18962 	 * If this bit is set, all minimum resources requested should be
18963 	 * reserved if minimum >= 1, otherwise return error. In case of
18964 	 * error, keep all existing reservations before the call.
18965 	 */
18966 	#define HWRM_FUNC_VF_RESOURCE_CFG_INPUT_FLAGS_MIN_GUARANTEED \
18967 		UINT32_C(0x1)
18968 	/* Minimum guaranteed number of MSI-X vectors for the function */
18969 	uint16_t	min_msix;
18970 	/* Minimum guaranteed number of KTLS Tx Key Contexts */
18971 	uint32_t	min_ktls_tx_key_ctxs;
18972 	/* Maximum non-guaranteed number of KTLS Tx Key Contexts */
18973 	uint32_t	max_ktls_tx_key_ctxs;
18974 	/* Minimum guaranteed number of KTLS Rx Key Contexts */
18975 	uint32_t	min_ktls_rx_key_ctxs;
18976 	/* Maximum non-guaranteed number of KTLS Rx Key Contexts */
18977 	uint32_t	max_ktls_rx_key_ctxs;
18978 	/* Minimum guaranteed number of QUIC Tx Key Contexts */
18979 	uint32_t	min_quic_tx_key_ctxs;
18980 	/* Maximum non-guaranteed number of QUIC Tx Key Contexts */
18981 	uint32_t	max_quic_tx_key_ctxs;
18982 	/* Minimum guaranteed number of QUIC Rx Key Contexts */
18983 	uint32_t	min_quic_rx_key_ctxs;
18984 	/* Maximum non-guaranteed number of QUIC Rx Key Contexts */
18985 	uint32_t	max_quic_rx_key_ctxs;
18986 } __rte_packed_end;
18987 
18988 /* hwrm_func_vf_resource_cfg_output (size:384b/48B) */
18989 struct __rte_packed_begin hwrm_func_vf_resource_cfg_output {
18990 	/* The specific error status for the command. */
18991 	uint16_t	error_code;
18992 	/* The HWRM command request type. */
18993 	uint16_t	req_type;
18994 	/* The sequence ID from the original command. */
18995 	uint16_t	seq_id;
18996 	/* The length of the response data in number of bytes. */
18997 	uint16_t	resp_len;
18998 	/* Reserved number of RSS/COS contexts */
18999 	uint16_t	reserved_rsscos_ctx;
19000 	/* Reserved number of completion rings */
19001 	uint16_t	reserved_cmpl_rings;
19002 	/* Reserved number of transmit rings */
19003 	uint16_t	reserved_tx_rings;
19004 	/* Reserved number of receive rings */
19005 	uint16_t	reserved_rx_rings;
19006 	/* Reserved number of L2 contexts */
19007 	uint16_t	reserved_l2_ctxs;
19008 	/* Reserved number of VNICs */
19009 	uint16_t	reserved_vnics;
19010 	/* Reserved number of statistic contexts */
19011 	uint16_t	reserved_stat_ctx;
19012 	/* Reserved number of ring groups */
19013 	uint16_t	reserved_hw_ring_grps;
19014 	/* Actual number of KTLS Tx Key Contexts reserved */
19015 	uint32_t	reserved_ktls_tx_key_ctxs;
19016 	/* Actual number of KTLS Rx Key Contexts reserved */
19017 	uint32_t	reserved_ktls_rx_key_ctxs;
19018 	/* Actual number of QUIC Tx Key Contexts reserved */
19019 	uint32_t	reserved_quic_tx_key_ctxs;
19020 	/* Actual number of QUIC Rx Key Contexts reserved */
19021 	uint32_t	reserved_quic_rx_key_ctxs;
19022 	uint8_t	unused_0[7];
19023 	/*
19024 	 * This field is used in Output records to indicate that the output
19025 	 * is completely written to RAM. This field should be read as '1'
19026 	 * to indicate that the output has been completely written. When
19027 	 * writing a command completion or response to an internal processor,
19028 	 * the order of writes has to be such that this field is written last.
19029 	 */
19030 	uint8_t	valid;
19031 } __rte_packed_end;
19032 
19033 /*********************************
19034  * hwrm_func_backing_store_qcaps *
19035  *********************************/
19036 
19037 
19038 /* hwrm_func_backing_store_qcaps_input (size:128b/16B) */
19039 struct __rte_packed_begin hwrm_func_backing_store_qcaps_input {
19040 	/* The HWRM command request type. */
19041 	uint16_t	req_type;
19042 	/*
19043 	 * The completion ring to send the completion event on. This should
19044 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
19045 	 */
19046 	uint16_t	cmpl_ring;
19047 	/*
19048 	 * The sequence ID is used by the driver for tracking multiple
19049 	 * commands. This ID is treated as opaque data by the firmware and
19050 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
19051 	 */
19052 	uint16_t	seq_id;
19053 	/*
19054 	 * The target ID of the command:
19055 	 * * 0x0-0xFFF8 - The function ID
19056 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
19057 	 * * 0xFFFD - Reserved for user-space HWRM interface
19058 	 * * 0xFFFF - HWRM
19059 	 */
19060 	uint16_t	target_id;
19061 	/*
19062 	 * A physical address pointer pointing to a host buffer that the
19063 	 * command's response data will be written. This can be either a host
19064 	 * physical address (HPA) or a guest physical address (GPA) and must
19065 	 * point to a physically contiguous block of memory.
19066 	 */
19067 	uint64_t	resp_addr;
19068 } __rte_packed_end;
19069 
19070 /* hwrm_func_backing_store_qcaps_output (size:832b/104B) */
19071 struct __rte_packed_begin hwrm_func_backing_store_qcaps_output {
19072 	/* The specific error status for the command. */
19073 	uint16_t	error_code;
19074 	/* The HWRM command request type. */
19075 	uint16_t	req_type;
19076 	/* The sequence ID from the original command. */
19077 	uint16_t	seq_id;
19078 	/* The length of the response data in number of bytes. */
19079 	uint16_t	resp_len;
19080 	/* Maximum number of QP context entries supported for this function. */
19081 	uint32_t	qp_max_entries;
19082 	/*
19083 	 * Minimum number of QP context entries that are needed to be reserved
19084 	 * for QP1 for the PF and its VFs. PF drivers must allocate at least
19085 	 * this many QP context entries, even if RoCE will not be used.
19086 	 */
19087 	uint16_t	qp_min_qp1_entries;
19088 	/*
19089 	 * Maximum number of QP context entries that can be used for L2 and
19090 	 * mid-path.
19091 	 */
19092 	uint16_t	qp_max_l2_entries;
19093 	/* Number of bytes that must be allocated for each context entry. */
19094 	uint16_t	qp_entry_size;
19095 	/* Maximum number of SRQ context entries that can be used for L2. */
19096 	uint16_t	srq_max_l2_entries;
19097 	/* Maximum number of SRQ context entries supported for this function. */
19098 	uint32_t	srq_max_entries;
19099 	/* Number of bytes that must be allocated for each context entry. */
19100 	uint16_t	srq_entry_size;
19101 	/* Maximum number of CQ context entries that can be used for L2. */
19102 	uint16_t	cq_max_l2_entries;
19103 	/* Maximum number of CQ context entries supported for this function. */
19104 	uint32_t	cq_max_entries;
19105 	/* Number of bytes that must be allocated for each context entry. */
19106 	uint16_t	cq_entry_size;
19107 	/* Maximum number of VNIC context entries supported for this function. */
19108 	uint16_t	vnic_max_vnic_entries;
19109 	/*
19110 	 * Maximum number of Ring table context entries supported for this
19111 	 * function.
19112 	 */
19113 	uint16_t	vnic_max_ring_table_entries;
19114 	/* Number of bytes that must be allocated for each context entry. */
19115 	uint16_t	vnic_entry_size;
19116 	/*
19117 	 * Maximum number of statistic context entries supported for this
19118 	 * function.
19119 	 */
19120 	uint32_t	stat_max_entries;
19121 	/* Number of bytes that must be allocated for each context entry. */
19122 	uint16_t	stat_entry_size;
19123 	/* Number of bytes that must be allocated for each context entry. */
19124 	uint16_t	tqm_entry_size;
19125 	/* Minimum number of TQM context entries required per ring. */
19126 	uint32_t	tqm_min_entries_per_ring;
19127 	/*
19128 	 * Maximum number of TQM context entries supported per ring. This is
19129 	 * actually a recommended TQM queue size based on worst case usage of
19130 	 * the TQM queue.
19131 	 *
19132 	 * TQM fastpath rings should be sized large enough to accommodate the
19133 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
19134 	 * that can be enqueued to the TQM ring.
19135 	 *
19136 	 * TQM slowpath rings should be sized as follows:
19137 	 *
19138 	 * num_entries = num_vnics + num_l2_tx_rings + 2 * num_roce_qps + tqm_min_size
19139 	 *
19140 	 * Where:
19141 	 *   num_vnics is the number of VNICs allocated in the VNIC backing
19142 	 *   store
19143 	 *   num_l2_tx_rings is the number of L2 rings in the QP backing store
19144 	 *   num_roce_qps is the number of RoCE QPs in the QP backing store
19145 	 *   tqm_min_size is tqm_min_entries_per_ring reported by
19146 	 *     HWRM_FUNC_BACKING_STORE_QCAPS
19147 	 *
19148 	 * Note that TQM ring sizes cannot be extended while the system is
19149 	 * operational. If a PF driver needs to extend a TQM ring, it needs
19150 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
19151 	 * the backing store.
19152 	 */
19153 	uint32_t	tqm_max_entries_per_ring;
19154 	/*
19155 	 * Maximum number of MR plus AV context entries supported for this
19156 	 * function.
19157 	 */
19158 	uint32_t	mrav_max_entries;
19159 	/* Number of bytes that must be allocated for each context entry. */
19160 	uint16_t	mrav_entry_size;
19161 	/* Number of bytes that must be allocated for each context entry. */
19162 	uint16_t	tim_entry_size;
19163 	/* Maximum number of Timer context entries supported for this function. */
19164 	uint32_t	tim_max_entries;
19165 	/*
19166 	 * When this field is zero, the 32b `mrav_num_entries` field in the
19167 	 * `backing_store_cfg` and `backing_store_qcfg` commands represents
19168 	 * the total number of MR plus AV entries allowed in the MR/AV backing
19169 	 * store PBL.
19170 	 *
19171 	 * When this field is non-zero, the 32b `mrav_num_entries` field in
19172 	 * the `backing_store_cfg` and `backing_store_qcfg` commands is
19173 	 * logically divided into two 16b fields. Bits `[31:16]` represents
19174 	 * the `mr_num_entries` and bits `[15:0]` represents `av_num_entries`.
19175 	 * Both of these values are represented in a unit granularity
19176 	 * specified by this field. For example, if this field is 16 and
19177 	 * `mrav_num_entries` is `0x02000100`, then the number of MR entries
19178 	 * is 8192 and the number of AV entries is 4096.
19179 	 */
19180 	uint16_t	mrav_num_entries_units;
19181 	/*
19182 	 * The number of entries specified for any TQM ring must be a
19183 	 * multiple of this value to prevent any resource allocation
19184 	 * limitations.
19185 	 */
19186 	uint8_t	tqm_entries_multiple;
19187 	/*
19188 	 * Initializer to be used by drivers
19189 	 * to initialize context memory to ensure
19190 	 * context subsystem flags an error for an attack
19191 	 * before the first time context load.
19192 	 */
19193 	uint8_t	ctx_kind_initializer;
19194 	/*
19195 	 * Specifies which context kinds need to be initialized with the
19196 	 * ctx_kind_initializer.
19197 	 */
19198 	uint16_t	ctx_init_mask;
19199 	/*
19200 	 * If this bit is '1' then this context type should be initialized
19201 	 * with the ctx_kind_initializer at the specified offset.
19202 	 */
19203 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_QP \
19204 		UINT32_C(0x1)
19205 	/*
19206 	 * If this bit is '1' then this context type should be initialized
19207 	 * with the ctx_kind_initializer at the specified offset.
19208 	 */
19209 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_SRQ \
19210 		UINT32_C(0x2)
19211 	/*
19212 	 * If this bit is '1' then this context type should be initialized
19213 	 * with the ctx_kind_initializer at the specified offset.
19214 	 */
19215 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_CQ \
19216 		UINT32_C(0x4)
19217 	/*
19218 	 * If this bit is '1' then this context type should be initialized
19219 	 * with the ctx_kind_initializer at the specified offset.
19220 	 */
19221 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_VNIC \
19222 		UINT32_C(0x8)
19223 	/*
19224 	 * If this bit is '1' then this context type should be initialized
19225 	 * with the ctx_kind_initializer at the specified offset.
19226 	 */
19227 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_STAT \
19228 		UINT32_C(0x10)
19229 	/*
19230 	 * If this bit is '1' then this context type should be initialized
19231 	 * with the ctx_kind_initializer at the specified offset.
19232 	 */
19233 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_MRAV \
19234 		UINT32_C(0x20)
19235 	/*
19236 	 * If this bit is '1' then the Tx KTLS context type should be
19237 	 * initialized with the ctx_kind_initializer at the specified offset.
19238 	 */
19239 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_TKC \
19240 		UINT32_C(0x40)
19241 	/*
19242 	 * If this bit is '1' then the Rx KTLS context type should be
19243 	 * initialized with the ctx_kind_initializer at the specified offset.
19244 	 */
19245 	#define HWRM_FUNC_BACKING_STORE_QCAPS_OUTPUT_CTX_INIT_MASK_RKC \
19246 		UINT32_C(0x80)
19247 	/*
19248 	 * Specifies the doubleword offset of ctx_kind_initializer for this
19249 	 * context type.
19250 	 */
19251 	uint8_t	qp_init_offset;
19252 	/*
19253 	 * Specifies the doubleword offset of ctx_kind_initializer for this
19254 	 * context type.
19255 	 */
19256 	uint8_t	srq_init_offset;
19257 	/*
19258 	 * Specifies the doubleword offset of ctx_kind_initializer for this
19259 	 * context type.
19260 	 */
19261 	uint8_t	cq_init_offset;
19262 	/*
19263 	 * Specifies the doubleword offset of ctx_kind_initializer for this
19264 	 * context type.
19265 	 */
19266 	uint8_t	vnic_init_offset;
19267 	/*
19268 	 * Count of TQM fastpath rings to be used for allocating backing store.
19269 	 * Backing store configuration must be specified for each TQM ring from
19270 	 * this count in `backing_store_cfg`.
19271 	 * Only first 8 TQM FP rings will be advertised with this field.
19272 	 */
19273 	uint8_t	tqm_fp_rings_count;
19274 	/*
19275 	 * Specifies the doubleword offset of ctx_kind_initializer for this
19276 	 * context type.
19277 	 */
19278 	uint8_t	stat_init_offset;
19279 	/*
19280 	 * Specifies the doubleword offset of ctx_kind_initializer for this
19281 	 * context type.
19282 	 */
19283 	uint8_t	mrav_init_offset;
19284 	/*
19285 	 * Count of TQM extended fastpath rings to be used for allocating
19286 	 * backing store beyond 8 rings(rings 9,10,11)
19287 	 * Backing store configuration must be specified for each TQM ring from
19288 	 * this count in `backing_store_cfg`.
19289 	 */
19290 	uint8_t	tqm_fp_rings_count_ext;
19291 	/*
19292 	 * Specifies the doubleword offset of ctx_kind_initializer for Tx
19293 	 * KTLS context type.
19294 	 */
19295 	uint8_t	tkc_init_offset;
19296 	/*
19297 	 * Specifies the doubleword offset of ctx_kind_initializer for Rx
19298 	 * KTLS context type.
19299 	 */
19300 	uint8_t	rkc_init_offset;
19301 	/* Tx KTLS context entry size in bytes. */
19302 	uint16_t	tkc_entry_size;
19303 	/* Rx KTLS context entry size in bytes. */
19304 	uint16_t	rkc_entry_size;
19305 	/*
19306 	 * Maximum number of Tx KTLS context entries supported for this
19307 	 * function.
19308 	 */
19309 	uint32_t	tkc_max_entries;
19310 	/*
19311 	 * Maximum number of Rx KTLS context entries supported for this
19312 	 * function.
19313 	 */
19314 	uint32_t	rkc_max_entries;
19315 	/*
19316 	 * Additional number of RoCE QP context entries required for this
19317 	 * function to support fast QP destroy feature.
19318 	 */
19319 	uint16_t	fast_qpmd_qp_num_entries;
19320 	/* Reserved for future. */
19321 	uint8_t	rsvd1[5];
19322 	/*
19323 	 * This field is used in Output records to indicate that the output
19324 	 * is completely written to RAM. This field should be read as '1'
19325 	 * to indicate that the output has been completely written. When
19326 	 * writing a command completion or response to an internal processor,
19327 	 * the order of writes has to be such that this field is written last.
19328 	 */
19329 	uint8_t	valid;
19330 } __rte_packed_end;
19331 
19332 /* tqm_fp_ring_cfg (size:128b/16B) */
19333 struct __rte_packed_begin tqm_fp_ring_cfg {
19334 	/* TQM ring page size and level. */
19335 	uint8_t	tqm_ring_pg_size_tqm_ring_lvl;
19336 	/* TQM ring PBL indirect levels. */
19337 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_MASK \
19338 		UINT32_C(0xf)
19339 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_SFT       0
19340 	/* PBL pointer is physical start address. */
19341 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_LVL_0 \
19342 		UINT32_C(0x0)
19343 	/* PBL pointer points to PTE table. */
19344 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_LVL_1 \
19345 		UINT32_C(0x1)
19346 	/*
19347 	 * PBL pointer points to PDE table with each entry pointing to
19348 	 * PTE tables.
19349 	 */
19350 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_LVL_2 \
19351 		UINT32_C(0x2)
19352 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_LAST \
19353 		TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_LVL_LVL_2
19354 	/* TQM ring page size. */
19355 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_MASK \
19356 		UINT32_C(0xf0)
19357 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_SFT   4
19358 	/* 4KB. */
19359 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_4K \
19360 		(UINT32_C(0x0) << 4)
19361 	/* 8KB. */
19362 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_8K \
19363 		(UINT32_C(0x1) << 4)
19364 	/* 64KB. */
19365 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_64K \
19366 		(UINT32_C(0x2) << 4)
19367 	/* 2MB. */
19368 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_2M \
19369 		(UINT32_C(0x3) << 4)
19370 	/* 8MB. */
19371 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_8M \
19372 		(UINT32_C(0x4) << 4)
19373 	/* 1GB. */
19374 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_1G \
19375 		(UINT32_C(0x5) << 4)
19376 	#define TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_LAST \
19377 		TQM_FP_RING_CFG_TQM_RING_CFG_TQM_RING_PG_SIZE_PG_1G
19378 	uint8_t	unused[3];
19379 	/* Number of TQM ring entries. */
19380 	uint32_t	tqm_ring_num_entries;
19381 	/* TQM ring page directory. */
19382 	uint64_t	tqm_ring_page_dir;
19383 } __rte_packed_end;
19384 
19385 /*******************************
19386  * hwrm_func_backing_store_cfg *
19387  *******************************/
19388 
19389 
19390 /* hwrm_func_backing_store_cfg_input (size:2688b/336B) */
19391 struct __rte_packed_begin hwrm_func_backing_store_cfg_input {
19392 	/* The HWRM command request type. */
19393 	uint16_t	req_type;
19394 	/*
19395 	 * The completion ring to send the completion event on. This should
19396 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
19397 	 */
19398 	uint16_t	cmpl_ring;
19399 	/*
19400 	 * The sequence ID is used by the driver for tracking multiple
19401 	 * commands. This ID is treated as opaque data by the firmware and
19402 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
19403 	 */
19404 	uint16_t	seq_id;
19405 	/*
19406 	 * The target ID of the command:
19407 	 * * 0x0-0xFFF8 - The function ID
19408 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
19409 	 * * 0xFFFD - Reserved for user-space HWRM interface
19410 	 * * 0xFFFF - HWRM
19411 	 */
19412 	uint16_t	target_id;
19413 	/*
19414 	 * A physical address pointer pointing to a host buffer that the
19415 	 * command's response data will be written. This can be either a host
19416 	 * physical address (HPA) or a guest physical address (GPA) and must
19417 	 * point to a physically contiguous block of memory.
19418 	 */
19419 	uint64_t	resp_addr;
19420 	uint32_t	flags;
19421 	/*
19422 	 * When set, the firmware only uses on-chip resources and does not
19423 	 * expect any backing store to be provided by the host driver. This
19424 	 * mode provides minimal L2 functionality (e.g. limited L2 resources,
19425 	 * no RoCE).
19426 	 */
19427 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_FLAGS_PREBOOT_MODE \
19428 		UINT32_C(0x1)
19429 	/*
19430 	 * When set, the 32b `mrav_num_entries` field is logically divided
19431 	 * into two 16b fields, `mr_num_entries` and `av_num_entries`.
19432 	 */
19433 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_FLAGS_MRAV_RESERVATION_SPLIT \
19434 		UINT32_C(0x2)
19435 	uint32_t	enables;
19436 	/*
19437 	 * This bit must be '1' for the qp fields to be
19438 	 * configured.
19439 	 */
19440 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_QP \
19441 		UINT32_C(0x1)
19442 	/*
19443 	 * This bit must be '1' for the srq fields to be
19444 	 * configured.
19445 	 */
19446 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_SRQ \
19447 		UINT32_C(0x2)
19448 	/*
19449 	 * This bit must be '1' for the cq fields to be
19450 	 * configured.
19451 	 */
19452 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_CQ \
19453 		UINT32_C(0x4)
19454 	/*
19455 	 * This bit must be '1' for the vnic fields to be
19456 	 * configured.
19457 	 */
19458 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_VNIC \
19459 		UINT32_C(0x8)
19460 	/*
19461 	 * This bit must be '1' for the stat fields to be
19462 	 * configured.
19463 	 */
19464 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_STAT \
19465 		UINT32_C(0x10)
19466 	/*
19467 	 * This bit must be '1' for the tqm_sp fields to be
19468 	 * configured.
19469 	 */
19470 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_SP \
19471 		UINT32_C(0x20)
19472 	/*
19473 	 * This bit must be '1' for the tqm_ring0 fields to be
19474 	 * configured.
19475 	 */
19476 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING0 \
19477 		UINT32_C(0x40)
19478 	/*
19479 	 * This bit must be '1' for the tqm_ring1 fields to be
19480 	 * configured.
19481 	 */
19482 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING1 \
19483 		UINT32_C(0x80)
19484 	/*
19485 	 * This bit must be '1' for the tqm_ring2 fields to be
19486 	 * configured.
19487 	 */
19488 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING2 \
19489 		UINT32_C(0x100)
19490 	/*
19491 	 * This bit must be '1' for the tqm_ring3 fields to be
19492 	 * configured.
19493 	 */
19494 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING3 \
19495 		UINT32_C(0x200)
19496 	/*
19497 	 * This bit must be '1' for the tqm_ring4 fields to be
19498 	 * configured.
19499 	 */
19500 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING4 \
19501 		UINT32_C(0x400)
19502 	/*
19503 	 * This bit must be '1' for the tqm_ring5 fields to be
19504 	 * configured.
19505 	 */
19506 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING5 \
19507 		UINT32_C(0x800)
19508 	/*
19509 	 * This bit must be '1' for the tqm_ring6 fields to be
19510 	 * configured.
19511 	 */
19512 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING6 \
19513 		UINT32_C(0x1000)
19514 	/*
19515 	 * This bit must be '1' for the tqm_ring7 fields to be
19516 	 * configured.
19517 	 */
19518 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING7 \
19519 		UINT32_C(0x2000)
19520 	/*
19521 	 * This bit must be '1' for the mrav fields to be
19522 	 * configured.
19523 	 */
19524 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_MRAV \
19525 		UINT32_C(0x4000)
19526 	/*
19527 	 * This bit must be '1' for the tim fields to be
19528 	 * configured.
19529 	 */
19530 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TIM \
19531 		UINT32_C(0x8000)
19532 	/*
19533 	 * This bit must be '1' for the tqm_ring8 fields to be
19534 	 * configured.
19535 	 */
19536 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING8 \
19537 		UINT32_C(0x10000)
19538 	/*
19539 	 * This bit must be '1' for the tqm_ring9 fields to be
19540 	 * configured.
19541 	 */
19542 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING9 \
19543 		UINT32_C(0x20000)
19544 	/*
19545 	 * This bit must be '1' for the tqm_ring10 fields to be
19546 	 * configured.
19547 	 */
19548 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TQM_RING10 \
19549 		UINT32_C(0x40000)
19550 	/*
19551 	 * This bit must be '1' for the Tx KTLS context
19552 	 * fields to be configured.
19553 	 */
19554 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_TKC \
19555 		UINT32_C(0x80000)
19556 	/*
19557 	 * This bit must be '1' for the Rx KTLS context
19558 	 * fields to be configured.
19559 	 */
19560 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_RKC \
19561 		UINT32_C(0x100000)
19562 	/*
19563 	 * This bit must be '1' for the number of QPs reserved for fast
19564 	 * qp modify destroy feature to be configured.
19565 	 */
19566 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_ENABLES_QP_FAST_QPMD \
19567 		UINT32_C(0x200000)
19568 	/* QPC page size and level. */
19569 	uint8_t	qpc_pg_size_qpc_lvl;
19570 	/* QPC PBL indirect levels. */
19571 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_MASK \
19572 		UINT32_C(0xf)
19573 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_SFT       0
19574 	/* PBL pointer is physical start address. */
19575 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_LVL_0 \
19576 		UINT32_C(0x0)
19577 	/* PBL pointer points to PTE table. */
19578 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_LVL_1 \
19579 		UINT32_C(0x1)
19580 	/*
19581 	 * PBL pointer points to PDE table with each entry pointing to PTE
19582 	 * tables.
19583 	 */
19584 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_LVL_2 \
19585 		UINT32_C(0x2)
19586 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_LAST \
19587 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_LVL_LVL_2
19588 	/* QPC page size. */
19589 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_MASK \
19590 		UINT32_C(0xf0)
19591 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_SFT   4
19592 	/* 4KB. */
19593 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_4K \
19594 		(UINT32_C(0x0) << 4)
19595 	/* 8KB. */
19596 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_8K \
19597 		(UINT32_C(0x1) << 4)
19598 	/* 64KB. */
19599 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_64K \
19600 		(UINT32_C(0x2) << 4)
19601 	/* 2MB. */
19602 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_2M \
19603 		(UINT32_C(0x3) << 4)
19604 	/* 8MB. */
19605 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_8M \
19606 		(UINT32_C(0x4) << 4)
19607 	/* 1GB. */
19608 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_1G \
19609 		(UINT32_C(0x5) << 4)
19610 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_LAST \
19611 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_QPC_PG_SIZE_PG_1G
19612 	/* SRQ page size and level. */
19613 	uint8_t	srq_pg_size_srq_lvl;
19614 	/* SRQ PBL indirect levels. */
19615 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_MASK \
19616 		UINT32_C(0xf)
19617 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_SFT       0
19618 	/* PBL pointer is physical start address. */
19619 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_LVL_0 \
19620 		UINT32_C(0x0)
19621 	/* PBL pointer points to PTE table. */
19622 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_LVL_1 \
19623 		UINT32_C(0x1)
19624 	/*
19625 	 * PBL pointer points to PDE table with each entry pointing to PTE
19626 	 * tables.
19627 	 */
19628 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_LVL_2 \
19629 		UINT32_C(0x2)
19630 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_LAST \
19631 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_LVL_LVL_2
19632 	/* SRQ page size. */
19633 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_MASK \
19634 		UINT32_C(0xf0)
19635 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_SFT   4
19636 	/* 4KB. */
19637 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_4K \
19638 		(UINT32_C(0x0) << 4)
19639 	/* 8KB. */
19640 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_8K \
19641 		(UINT32_C(0x1) << 4)
19642 	/* 64KB. */
19643 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_64K \
19644 		(UINT32_C(0x2) << 4)
19645 	/* 2MB. */
19646 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_2M \
19647 		(UINT32_C(0x3) << 4)
19648 	/* 8MB. */
19649 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_8M \
19650 		(UINT32_C(0x4) << 4)
19651 	/* 1GB. */
19652 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_1G \
19653 		(UINT32_C(0x5) << 4)
19654 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_LAST \
19655 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_SRQ_PG_SIZE_PG_1G
19656 	/* CQ page size and level. */
19657 	uint8_t	cq_pg_size_cq_lvl;
19658 	/* CQ PBL indirect levels. */
19659 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_MASK \
19660 		UINT32_C(0xf)
19661 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_SFT       0
19662 	/* PBL pointer is physical start address. */
19663 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_LVL_0 \
19664 		UINT32_C(0x0)
19665 	/* PBL pointer points to PTE table. */
19666 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_LVL_1 \
19667 		UINT32_C(0x1)
19668 	/*
19669 	 * PBL pointer points to PDE table with each entry pointing to PTE
19670 	 * tables.
19671 	 */
19672 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_LVL_2 \
19673 		UINT32_C(0x2)
19674 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_LAST \
19675 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_LVL_LVL_2
19676 	/* CQ page size. */
19677 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_MASK \
19678 		UINT32_C(0xf0)
19679 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_SFT   4
19680 	/* 4KB. */
19681 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_4K \
19682 		(UINT32_C(0x0) << 4)
19683 	/* 8KB. */
19684 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_8K \
19685 		(UINT32_C(0x1) << 4)
19686 	/* 64KB. */
19687 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_64K \
19688 		(UINT32_C(0x2) << 4)
19689 	/* 2MB. */
19690 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_2M \
19691 		(UINT32_C(0x3) << 4)
19692 	/* 8MB. */
19693 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_8M \
19694 		(UINT32_C(0x4) << 4)
19695 	/* 1GB. */
19696 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_1G \
19697 		(UINT32_C(0x5) << 4)
19698 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_LAST \
19699 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_CQ_PG_SIZE_PG_1G
19700 	/* VNIC page size and level. */
19701 	uint8_t	vnic_pg_size_vnic_lvl;
19702 	/* VNIC PBL indirect levels. */
19703 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_MASK \
19704 		UINT32_C(0xf)
19705 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_SFT       0
19706 	/* PBL pointer is physical start address. */
19707 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_LVL_0 \
19708 		UINT32_C(0x0)
19709 	/* PBL pointer points to PTE table. */
19710 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_LVL_1 \
19711 		UINT32_C(0x1)
19712 	/*
19713 	 * PBL pointer points to PDE table with each entry pointing to PTE
19714 	 * tables.
19715 	 */
19716 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_LVL_2 \
19717 		UINT32_C(0x2)
19718 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_LAST \
19719 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_LVL_LVL_2
19720 	/* VNIC page size. */
19721 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_MASK \
19722 		UINT32_C(0xf0)
19723 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_SFT   4
19724 	/* 4KB. */
19725 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_4K \
19726 		(UINT32_C(0x0) << 4)
19727 	/* 8KB. */
19728 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_8K \
19729 		(UINT32_C(0x1) << 4)
19730 	/* 64KB. */
19731 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_64K \
19732 		(UINT32_C(0x2) << 4)
19733 	/* 2MB. */
19734 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_2M \
19735 		(UINT32_C(0x3) << 4)
19736 	/* 8MB. */
19737 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_8M \
19738 		(UINT32_C(0x4) << 4)
19739 	/* 1GB. */
19740 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_1G \
19741 		(UINT32_C(0x5) << 4)
19742 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_LAST \
19743 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_VNIC_PG_SIZE_PG_1G
19744 	/* Stat page size and level. */
19745 	uint8_t	stat_pg_size_stat_lvl;
19746 	/* Stat PBL indirect levels. */
19747 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_MASK \
19748 		UINT32_C(0xf)
19749 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_SFT       0
19750 	/* PBL pointer is physical start address. */
19751 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_LVL_0 \
19752 		UINT32_C(0x0)
19753 	/* PBL pointer points to PTE table. */
19754 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_LVL_1 \
19755 		UINT32_C(0x1)
19756 	/*
19757 	 * PBL pointer points to PDE table with each entry pointing to PTE
19758 	 * tables.
19759 	 */
19760 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_LVL_2 \
19761 		UINT32_C(0x2)
19762 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_LAST \
19763 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_LVL_LVL_2
19764 	/* Stat page size. */
19765 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_MASK \
19766 		UINT32_C(0xf0)
19767 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_SFT   4
19768 	/* 4KB. */
19769 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_4K \
19770 		(UINT32_C(0x0) << 4)
19771 	/* 8KB. */
19772 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_8K \
19773 		(UINT32_C(0x1) << 4)
19774 	/* 64KB. */
19775 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_64K \
19776 		(UINT32_C(0x2) << 4)
19777 	/* 2MB. */
19778 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_2M \
19779 		(UINT32_C(0x3) << 4)
19780 	/* 8MB. */
19781 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_8M \
19782 		(UINT32_C(0x4) << 4)
19783 	/* 1GB. */
19784 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_1G \
19785 		(UINT32_C(0x5) << 4)
19786 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_LAST \
19787 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_STAT_PG_SIZE_PG_1G
19788 	/* TQM slow path page size and level. */
19789 	uint8_t	tqm_sp_pg_size_tqm_sp_lvl;
19790 	/* TQM slow path PBL indirect levels. */
19791 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_MASK \
19792 		UINT32_C(0xf)
19793 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_SFT       0
19794 	/* PBL pointer is physical start address. */
19795 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_LVL_0 \
19796 		UINT32_C(0x0)
19797 	/* PBL pointer points to PTE table. */
19798 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_LVL_1 \
19799 		UINT32_C(0x1)
19800 	/*
19801 	 * PBL pointer points to PDE table with each entry pointing to PTE
19802 	 * tables.
19803 	 */
19804 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_LVL_2 \
19805 		UINT32_C(0x2)
19806 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_LAST \
19807 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_LVL_LVL_2
19808 	/* TQM slow path page size. */
19809 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_MASK \
19810 		UINT32_C(0xf0)
19811 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_SFT   4
19812 	/* 4KB. */
19813 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_4K \
19814 		(UINT32_C(0x0) << 4)
19815 	/* 8KB. */
19816 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_8K \
19817 		(UINT32_C(0x1) << 4)
19818 	/* 64KB. */
19819 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_64K \
19820 		(UINT32_C(0x2) << 4)
19821 	/* 2MB. */
19822 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_2M \
19823 		(UINT32_C(0x3) << 4)
19824 	/* 8MB. */
19825 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_8M \
19826 		(UINT32_C(0x4) << 4)
19827 	/* 1GB. */
19828 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_1G \
19829 		(UINT32_C(0x5) << 4)
19830 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_LAST \
19831 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_SP_PG_SIZE_PG_1G
19832 	/* TQM ring 0 page size and level. */
19833 	uint8_t	tqm_ring0_pg_size_tqm_ring0_lvl;
19834 	/* TQM ring 0 PBL indirect levels. */
19835 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_MASK \
19836 		UINT32_C(0xf)
19837 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_SFT       0
19838 	/* PBL pointer is physical start address. */
19839 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_LVL_0 \
19840 		UINT32_C(0x0)
19841 	/* PBL pointer points to PTE table. */
19842 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_LVL_1 \
19843 		UINT32_C(0x1)
19844 	/*
19845 	 * PBL pointer points to PDE table with each entry pointing to PTE
19846 	 * tables.
19847 	 */
19848 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_LVL_2 \
19849 		UINT32_C(0x2)
19850 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_LAST \
19851 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_LVL_LVL_2
19852 	/* TQM ring 0 page size. */
19853 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_MASK \
19854 		UINT32_C(0xf0)
19855 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_SFT   4
19856 	/* 4KB. */
19857 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_4K \
19858 		(UINT32_C(0x0) << 4)
19859 	/* 8KB. */
19860 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_8K \
19861 		(UINT32_C(0x1) << 4)
19862 	/* 64KB. */
19863 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_64K \
19864 		(UINT32_C(0x2) << 4)
19865 	/* 2MB. */
19866 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_2M \
19867 		(UINT32_C(0x3) << 4)
19868 	/* 8MB. */
19869 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_8M \
19870 		(UINT32_C(0x4) << 4)
19871 	/* 1GB. */
19872 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_1G \
19873 		(UINT32_C(0x5) << 4)
19874 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_LAST \
19875 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING0_PG_SIZE_PG_1G
19876 	/* TQM ring 1 page size and level. */
19877 	uint8_t	tqm_ring1_pg_size_tqm_ring1_lvl;
19878 	/* TQM ring 1 PBL indirect levels. */
19879 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_MASK \
19880 		UINT32_C(0xf)
19881 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_SFT       0
19882 	/* PBL pointer is physical start address. */
19883 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_LVL_0 \
19884 		UINT32_C(0x0)
19885 	/* PBL pointer points to PTE table. */
19886 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_LVL_1 \
19887 		UINT32_C(0x1)
19888 	/*
19889 	 * PBL pointer points to PDE table with each entry pointing to PTE
19890 	 * tables.
19891 	 */
19892 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_LVL_2 \
19893 		UINT32_C(0x2)
19894 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_LAST \
19895 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_LVL_LVL_2
19896 	/* TQM ring 1 page size. */
19897 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_MASK \
19898 		UINT32_C(0xf0)
19899 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_SFT   4
19900 	/* 4KB. */
19901 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_4K \
19902 		(UINT32_C(0x0) << 4)
19903 	/* 8KB. */
19904 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_8K \
19905 		(UINT32_C(0x1) << 4)
19906 	/* 64KB. */
19907 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_64K \
19908 		(UINT32_C(0x2) << 4)
19909 	/* 2MB. */
19910 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_2M \
19911 		(UINT32_C(0x3) << 4)
19912 	/* 8MB. */
19913 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_8M \
19914 		(UINT32_C(0x4) << 4)
19915 	/* 1GB. */
19916 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_1G \
19917 		(UINT32_C(0x5) << 4)
19918 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_LAST \
19919 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING1_PG_SIZE_PG_1G
19920 	/* TQM ring 2 page size and level. */
19921 	uint8_t	tqm_ring2_pg_size_tqm_ring2_lvl;
19922 	/* TQM ring 2 PBL indirect levels. */
19923 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_MASK \
19924 		UINT32_C(0xf)
19925 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_SFT       0
19926 	/* PBL pointer is physical start address. */
19927 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_LVL_0 \
19928 		UINT32_C(0x0)
19929 	/* PBL pointer points to PTE table. */
19930 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_LVL_1 \
19931 		UINT32_C(0x1)
19932 	/*
19933 	 * PBL pointer points to PDE table with each entry pointing to PTE
19934 	 * tables.
19935 	 */
19936 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_LVL_2 \
19937 		UINT32_C(0x2)
19938 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_LAST \
19939 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_LVL_LVL_2
19940 	/* TQM ring 2 page size. */
19941 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_MASK \
19942 		UINT32_C(0xf0)
19943 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_SFT   4
19944 	/* 4KB. */
19945 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_4K \
19946 		(UINT32_C(0x0) << 4)
19947 	/* 8KB. */
19948 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_8K \
19949 		(UINT32_C(0x1) << 4)
19950 	/* 64KB. */
19951 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_64K \
19952 		(UINT32_C(0x2) << 4)
19953 	/* 2MB. */
19954 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_2M \
19955 		(UINT32_C(0x3) << 4)
19956 	/* 8MB. */
19957 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_8M \
19958 		(UINT32_C(0x4) << 4)
19959 	/* 1GB. */
19960 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_1G \
19961 		(UINT32_C(0x5) << 4)
19962 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_LAST \
19963 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING2_PG_SIZE_PG_1G
19964 	/* TQM ring 3 page size and level. */
19965 	uint8_t	tqm_ring3_pg_size_tqm_ring3_lvl;
19966 	/* TQM ring 3 PBL indirect levels. */
19967 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_MASK \
19968 		UINT32_C(0xf)
19969 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_SFT       0
19970 	/* PBL pointer is physical start address. */
19971 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_LVL_0 \
19972 		UINT32_C(0x0)
19973 	/* PBL pointer points to PTE table. */
19974 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_LVL_1 \
19975 		UINT32_C(0x1)
19976 	/*
19977 	 * PBL pointer points to PDE table with each entry pointing to PTE
19978 	 * tables.
19979 	 */
19980 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_LVL_2 \
19981 		UINT32_C(0x2)
19982 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_LAST \
19983 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_LVL_LVL_2
19984 	/* TQM ring 3 page size. */
19985 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_MASK \
19986 		UINT32_C(0xf0)
19987 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_SFT   4
19988 	/* 4KB. */
19989 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_4K \
19990 		(UINT32_C(0x0) << 4)
19991 	/* 8KB. */
19992 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_8K \
19993 		(UINT32_C(0x1) << 4)
19994 	/* 64KB. */
19995 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_64K \
19996 		(UINT32_C(0x2) << 4)
19997 	/* 2MB. */
19998 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_2M \
19999 		(UINT32_C(0x3) << 4)
20000 	/* 8MB. */
20001 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_8M \
20002 		(UINT32_C(0x4) << 4)
20003 	/* 1GB. */
20004 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_1G \
20005 		(UINT32_C(0x5) << 4)
20006 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_LAST \
20007 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING3_PG_SIZE_PG_1G
20008 	/* TQM ring 4 page size and level. */
20009 	uint8_t	tqm_ring4_pg_size_tqm_ring4_lvl;
20010 	/* TQM ring 4 PBL indirect levels. */
20011 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_MASK \
20012 		UINT32_C(0xf)
20013 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_SFT       0
20014 	/* PBL pointer is physical start address. */
20015 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_LVL_0 \
20016 		UINT32_C(0x0)
20017 	/* PBL pointer points to PTE table. */
20018 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_LVL_1 \
20019 		UINT32_C(0x1)
20020 	/*
20021 	 * PBL pointer points to PDE table with each entry pointing to PTE
20022 	 * tables.
20023 	 */
20024 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_LVL_2 \
20025 		UINT32_C(0x2)
20026 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_LAST \
20027 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_LVL_LVL_2
20028 	/* TQM ring 4 page size. */
20029 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_MASK \
20030 		UINT32_C(0xf0)
20031 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_SFT   4
20032 	/* 4KB. */
20033 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_4K \
20034 		(UINT32_C(0x0) << 4)
20035 	/* 8KB. */
20036 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_8K \
20037 		(UINT32_C(0x1) << 4)
20038 	/* 64KB. */
20039 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_64K \
20040 		(UINT32_C(0x2) << 4)
20041 	/* 2MB. */
20042 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_2M \
20043 		(UINT32_C(0x3) << 4)
20044 	/* 8MB. */
20045 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_8M \
20046 		(UINT32_C(0x4) << 4)
20047 	/* 1GB. */
20048 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_1G \
20049 		(UINT32_C(0x5) << 4)
20050 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_LAST \
20051 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING4_PG_SIZE_PG_1G
20052 	/* TQM ring 5 page size and level. */
20053 	uint8_t	tqm_ring5_pg_size_tqm_ring5_lvl;
20054 	/* TQM ring 5 PBL indirect levels. */
20055 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_MASK \
20056 		UINT32_C(0xf)
20057 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_SFT       0
20058 	/* PBL pointer is physical start address. */
20059 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_LVL_0 \
20060 		UINT32_C(0x0)
20061 	/* PBL pointer points to PTE table. */
20062 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_LVL_1 \
20063 		UINT32_C(0x1)
20064 	/*
20065 	 * PBL pointer points to PDE table with each entry pointing to PTE
20066 	 * tables.
20067 	 */
20068 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_LVL_2 \
20069 		UINT32_C(0x2)
20070 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_LAST \
20071 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_LVL_LVL_2
20072 	/* TQM ring 5 page size. */
20073 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_MASK \
20074 		UINT32_C(0xf0)
20075 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_SFT   4
20076 	/* 4KB. */
20077 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_4K \
20078 		(UINT32_C(0x0) << 4)
20079 	/* 8KB. */
20080 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_8K \
20081 		(UINT32_C(0x1) << 4)
20082 	/* 64KB. */
20083 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_64K \
20084 		(UINT32_C(0x2) << 4)
20085 	/* 2MB. */
20086 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_2M \
20087 		(UINT32_C(0x3) << 4)
20088 	/* 8MB. */
20089 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_8M \
20090 		(UINT32_C(0x4) << 4)
20091 	/* 1GB. */
20092 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_1G \
20093 		(UINT32_C(0x5) << 4)
20094 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_LAST \
20095 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING5_PG_SIZE_PG_1G
20096 	/* TQM ring 6 page size and level. */
20097 	uint8_t	tqm_ring6_pg_size_tqm_ring6_lvl;
20098 	/* TQM ring 6 PBL indirect levels. */
20099 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_MASK \
20100 		UINT32_C(0xf)
20101 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_SFT       0
20102 	/* PBL pointer is physical start address. */
20103 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_LVL_0 \
20104 		UINT32_C(0x0)
20105 	/* PBL pointer points to PTE table. */
20106 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_LVL_1 \
20107 		UINT32_C(0x1)
20108 	/*
20109 	 * PBL pointer points to PDE table with each entry pointing to PTE
20110 	 * tables.
20111 	 */
20112 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_LVL_2 \
20113 		UINT32_C(0x2)
20114 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_LAST \
20115 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_LVL_LVL_2
20116 	/* TQM ring 6 page size. */
20117 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_MASK \
20118 		UINT32_C(0xf0)
20119 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_SFT   4
20120 	/* 4KB. */
20121 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_4K \
20122 		(UINT32_C(0x0) << 4)
20123 	/* 8KB. */
20124 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_8K \
20125 		(UINT32_C(0x1) << 4)
20126 	/* 64KB. */
20127 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_64K \
20128 		(UINT32_C(0x2) << 4)
20129 	/* 2MB. */
20130 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_2M \
20131 		(UINT32_C(0x3) << 4)
20132 	/* 8MB. */
20133 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_8M \
20134 		(UINT32_C(0x4) << 4)
20135 	/* 1GB. */
20136 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_1G \
20137 		(UINT32_C(0x5) << 4)
20138 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_LAST \
20139 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING6_PG_SIZE_PG_1G
20140 	/* TQM ring 7 page size and level. */
20141 	uint8_t	tqm_ring7_pg_size_tqm_ring7_lvl;
20142 	/* TQM ring 7 PBL indirect levels. */
20143 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_MASK \
20144 		UINT32_C(0xf)
20145 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_SFT       0
20146 	/* PBL pointer is physical start address. */
20147 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_LVL_0 \
20148 		UINT32_C(0x0)
20149 	/* PBL pointer points to PTE table. */
20150 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_LVL_1 \
20151 		UINT32_C(0x1)
20152 	/*
20153 	 * PBL pointer points to PDE table with each entry pointing to PTE
20154 	 * tables.
20155 	 */
20156 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_LVL_2 \
20157 		UINT32_C(0x2)
20158 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_LAST \
20159 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_LVL_LVL_2
20160 	/* TQM ring 7 page size. */
20161 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_MASK \
20162 		UINT32_C(0xf0)
20163 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_SFT   4
20164 	/* 4KB. */
20165 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_4K \
20166 		(UINT32_C(0x0) << 4)
20167 	/* 8KB. */
20168 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_8K \
20169 		(UINT32_C(0x1) << 4)
20170 	/* 64KB. */
20171 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_64K \
20172 		(UINT32_C(0x2) << 4)
20173 	/* 2MB. */
20174 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_2M \
20175 		(UINT32_C(0x3) << 4)
20176 	/* 8MB. */
20177 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_8M \
20178 		(UINT32_C(0x4) << 4)
20179 	/* 1GB. */
20180 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_1G \
20181 		(UINT32_C(0x5) << 4)
20182 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_LAST \
20183 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TQM_RING7_PG_SIZE_PG_1G
20184 	/* MR/AV page size and level. */
20185 	uint8_t	mrav_pg_size_mrav_lvl;
20186 	/* MR/AV PBL indirect levels. */
20187 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_MASK \
20188 		UINT32_C(0xf)
20189 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_SFT       0
20190 	/* PBL pointer is physical start address. */
20191 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_LVL_0 \
20192 		UINT32_C(0x0)
20193 	/* PBL pointer points to PTE table. */
20194 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_LVL_1 \
20195 		UINT32_C(0x1)
20196 	/*
20197 	 * PBL pointer points to PDE table with each entry pointing to PTE
20198 	 * tables.
20199 	 */
20200 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_LVL_2 \
20201 		UINT32_C(0x2)
20202 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_LAST \
20203 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_LVL_LVL_2
20204 	/* MR/AV page size. */
20205 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_MASK \
20206 		UINT32_C(0xf0)
20207 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_SFT   4
20208 	/* 4KB. */
20209 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_4K \
20210 		(UINT32_C(0x0) << 4)
20211 	/* 8KB. */
20212 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_8K \
20213 		(UINT32_C(0x1) << 4)
20214 	/* 64KB. */
20215 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_64K \
20216 		(UINT32_C(0x2) << 4)
20217 	/* 2MB. */
20218 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_2M \
20219 		(UINT32_C(0x3) << 4)
20220 	/* 8MB. */
20221 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_8M \
20222 		(UINT32_C(0x4) << 4)
20223 	/* 1GB. */
20224 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_1G \
20225 		(UINT32_C(0x5) << 4)
20226 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_LAST \
20227 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_MRAV_PG_SIZE_PG_1G
20228 	/* Timer page size and level. */
20229 	uint8_t	tim_pg_size_tim_lvl;
20230 	/* Timer PBL indirect levels. */
20231 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_MASK \
20232 		UINT32_C(0xf)
20233 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_SFT       0
20234 	/* PBL pointer is physical start address. */
20235 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_LVL_0 \
20236 		UINT32_C(0x0)
20237 	/* PBL pointer points to PTE table. */
20238 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_LVL_1 \
20239 		UINT32_C(0x1)
20240 	/*
20241 	 * PBL pointer points to PDE table with each entry pointing to PTE
20242 	 * tables.
20243 	 */
20244 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_LVL_2 \
20245 		UINT32_C(0x2)
20246 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_LAST \
20247 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_LVL_LVL_2
20248 	/* Timer page size. */
20249 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_MASK \
20250 		UINT32_C(0xf0)
20251 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_SFT   4
20252 	/* 4KB. */
20253 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_4K \
20254 		(UINT32_C(0x0) << 4)
20255 	/* 8KB. */
20256 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_8K \
20257 		(UINT32_C(0x1) << 4)
20258 	/* 64KB. */
20259 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_64K \
20260 		(UINT32_C(0x2) << 4)
20261 	/* 2MB. */
20262 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_2M \
20263 		(UINT32_C(0x3) << 4)
20264 	/* 8MB. */
20265 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_8M \
20266 		(UINT32_C(0x4) << 4)
20267 	/* 1GB. */
20268 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_1G \
20269 		(UINT32_C(0x5) << 4)
20270 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_LAST \
20271 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TIM_PG_SIZE_PG_1G
20272 	/* QP page directory. */
20273 	uint64_t	qpc_page_dir;
20274 	/* SRQ page directory. */
20275 	uint64_t	srq_page_dir;
20276 	/* CQ page directory. */
20277 	uint64_t	cq_page_dir;
20278 	/* VNIC page directory. */
20279 	uint64_t	vnic_page_dir;
20280 	/* Stat page directory. */
20281 	uint64_t	stat_page_dir;
20282 	/* TQM slowpath page directory. */
20283 	uint64_t	tqm_sp_page_dir;
20284 	/* TQM ring 0 page directory. */
20285 	uint64_t	tqm_ring0_page_dir;
20286 	/* TQM ring 1 page directory. */
20287 	uint64_t	tqm_ring1_page_dir;
20288 	/* TQM ring 2 page directory. */
20289 	uint64_t	tqm_ring2_page_dir;
20290 	/* TQM ring 3 page directory. */
20291 	uint64_t	tqm_ring3_page_dir;
20292 	/* TQM ring 4 page directory. */
20293 	uint64_t	tqm_ring4_page_dir;
20294 	/* TQM ring 5 page directory. */
20295 	uint64_t	tqm_ring5_page_dir;
20296 	/* TQM ring 6 page directory. */
20297 	uint64_t	tqm_ring6_page_dir;
20298 	/* TQM ring 7 page directory. */
20299 	uint64_t	tqm_ring7_page_dir;
20300 	/* MR/AV page directory. */
20301 	uint64_t	mrav_page_dir;
20302 	/* Timer page directory. */
20303 	uint64_t	tim_page_dir;
20304 	/* Number of QPs. */
20305 	uint32_t	qp_num_entries;
20306 	/* Number of SRQs. */
20307 	uint32_t	srq_num_entries;
20308 	/* Number of CQs. */
20309 	uint32_t	cq_num_entries;
20310 	/* Number of Stats. */
20311 	uint32_t	stat_num_entries;
20312 	/*
20313 	 * Number of TQM slowpath entries.
20314 	 *
20315 	 * TQM slowpath rings should be sized as follows:
20316 	 *
20317 	 * num_entries = num_vnics + num_l2_tx_rings + 2 * num_roce_qps + tqm_min_size
20318 	 *
20319 	 * Where:
20320 	 *   num_vnics is the number of VNICs allocated in the VNIC backing
20321 	 *   store num_l2_tx_rings is the number of L2 rings in the QP backing
20322 	 *   store num_roce_qps is the number of RoCE QPs in the QP backing
20323 	 *   store tqm_min_size is tqm_min_entries_per_ring reported by
20324 	 *   HWRM_FUNC_BACKING_STORE_QCAPS
20325 	 *
20326 	 * Note that TQM ring sizes cannot be extended while the system is
20327 	 * operational. If a PF driver needs to extend a TQM ring, it needs
20328 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
20329 	 * the backing store.
20330 	 */
20331 	uint32_t	tqm_sp_num_entries;
20332 	/*
20333 	 * Number of TQM ring 0 entries.
20334 	 *
20335 	 * TQM fastpath rings should be sized large enough to accommodate the
20336 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
20337 	 * that can be enqueued to the TQM ring.
20338 	 *
20339 	 * Note that TQM ring sizes cannot be extended while the system is
20340 	 * operational. If a PF driver needs to extend a TQM ring, it needs
20341 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
20342 	 * the backing store.
20343 	 */
20344 	uint32_t	tqm_ring0_num_entries;
20345 	/*
20346 	 * Number of TQM ring 1 entries.
20347 	 *
20348 	 * TQM fastpath rings should be sized large enough to accommodate the
20349 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
20350 	 * that can be enqueued to the TQM ring.
20351 	 *
20352 	 * Note that TQM ring sizes cannot be extended while the system is
20353 	 * operational. If a PF driver needs to extend a TQM ring, it needs
20354 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
20355 	 * the backing store.
20356 	 */
20357 	uint32_t	tqm_ring1_num_entries;
20358 	/*
20359 	 * Number of TQM ring 2 entries.
20360 	 *
20361 	 * TQM fastpath rings should be sized large enough to accommodate the
20362 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
20363 	 * that can be enqueued to the TQM ring.
20364 	 *
20365 	 * Note that TQM ring sizes cannot be extended while the system is
20366 	 * operational. If a PF driver needs to extend a TQM ring, it needs
20367 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
20368 	 * the backing store.
20369 	 */
20370 	uint32_t	tqm_ring2_num_entries;
20371 	/*
20372 	 * Number of TQM ring 3 entries.
20373 	 *
20374 	 * TQM fastpath rings should be sized large enough to accommodate the
20375 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
20376 	 * that can be enqueued to the TQM ring.
20377 	 *
20378 	 * Note that TQM ring sizes cannot be extended while the system is
20379 	 * operational. If a PF driver needs to extend a TQM ring, it needs
20380 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
20381 	 * the backing store.
20382 	 */
20383 	uint32_t	tqm_ring3_num_entries;
20384 	/*
20385 	 * Number of TQM ring 4 entries.
20386 	 *
20387 	 * TQM fastpath rings should be sized large enough to accommodate the
20388 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
20389 	 * that can be enqueued to the TQM ring.
20390 	 *
20391 	 * Note that TQM ring sizes cannot be extended while the system is
20392 	 * operational. If a PF driver needs to extend a TQM ring, it needs
20393 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
20394 	 * the backing store.
20395 	 */
20396 	uint32_t	tqm_ring4_num_entries;
20397 	/*
20398 	 * Number of TQM ring 5 entries.
20399 	 *
20400 	 * TQM fastpath rings should be sized large enough to accommodate the
20401 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
20402 	 * that can be enqueued to the TQM ring.
20403 	 *
20404 	 * Note that TQM ring sizes cannot be extended while the system is
20405 	 * operational. If a PF driver needs to extend a TQM ring, it needs
20406 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
20407 	 * the backing store.
20408 	 */
20409 	uint32_t	tqm_ring5_num_entries;
20410 	/*
20411 	 * Number of TQM ring 6 entries.
20412 	 *
20413 	 * TQM fastpath rings should be sized large enough to accommodate the
20414 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
20415 	 * that can be enqueued to the TQM ring.
20416 	 *
20417 	 * Note that TQM ring sizes cannot be extended while the system is
20418 	 * operational. If a PF driver needs to extend a TQM ring, it needs
20419 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
20420 	 * the backing store.
20421 	 */
20422 	uint32_t	tqm_ring6_num_entries;
20423 	/*
20424 	 * Number of TQM ring 7 entries.
20425 	 *
20426 	 * TQM fastpath rings should be sized large enough to accommodate the
20427 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
20428 	 * that can be enqueued to the TQM ring.
20429 	 *
20430 	 * Note that TQM ring sizes cannot be extended while the system is
20431 	 * operational. If a PF driver needs to extend a TQM ring, it needs
20432 	 * to reset the function (e.g. HWRM_FUNC_RESET) and then reallocate
20433 	 * the backing store.
20434 	 */
20435 	uint32_t	tqm_ring7_num_entries;
20436 	/*
20437 	 * If the MR/AV split reservation flag is not set, then this field
20438 	 * represents the total number of MR plus AV entries. For versions
20439 	 * of firmware that support the split reservation, when it is not
20440 	 * specified half of the entries will be reserved for MRs and the
20441 	 * other half for AVs.
20442 	 *
20443 	 * If the MR/AV split reservation flag is set, then this
20444 	 * field is logically divided into two 16b fields. Bits `[31:16]`
20445 	 * represents the `mr_num_entries` and bits `[15:0]` represents
20446 	 * `av_num_entries`. The granularity of these values is defined by
20447 	 * the `mrav_num_entries_unit` field returned by the
20448 	 * `backing_store_qcaps` command.
20449 	 */
20450 	uint32_t	mrav_num_entries;
20451 	/* Number of Timer entries. */
20452 	uint32_t	tim_num_entries;
20453 	/* Number of entries to reserve for QP1 */
20454 	uint16_t	qp_num_qp1_entries;
20455 	/* Number of entries to reserve for L2 */
20456 	uint16_t	qp_num_l2_entries;
20457 	/* Number of bytes that have been allocated for each context entry. */
20458 	uint16_t	qp_entry_size;
20459 	/* Number of entries to reserve for L2 */
20460 	uint16_t	srq_num_l2_entries;
20461 	/* Number of bytes that have been allocated for each context entry. */
20462 	uint16_t	srq_entry_size;
20463 	/* Number of entries to reserve for L2 */
20464 	uint16_t	cq_num_l2_entries;
20465 	/* Number of bytes that have been allocated for each context entry. */
20466 	uint16_t	cq_entry_size;
20467 	/* Number of entries to reserve for VNIC entries */
20468 	uint16_t	vnic_num_vnic_entries;
20469 	/* Number of entries to reserve for Ring table entries */
20470 	uint16_t	vnic_num_ring_table_entries;
20471 	/* Number of bytes that have been allocated for each context entry. */
20472 	uint16_t	vnic_entry_size;
20473 	/* Number of bytes that have been allocated for each context entry. */
20474 	uint16_t	stat_entry_size;
20475 	/* Number of bytes that have been allocated for each context entry. */
20476 	uint16_t	tqm_entry_size;
20477 	/* Number of bytes that have been allocated for each context entry. */
20478 	uint16_t	mrav_entry_size;
20479 	/* Number of bytes that have been allocated for each context entry. */
20480 	uint16_t	tim_entry_size;
20481 	/* TQM ring page size and level. */
20482 	uint8_t	tqm_ring8_pg_size_tqm_ring_lvl;
20483 	/* TQM ring PBL indirect levels. */
20484 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_MASK \
20485 		UINT32_C(0xf)
20486 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_SFT \
20487 		0
20488 	/* PBL pointer is physical start address. */
20489 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_LVL_0 \
20490 		UINT32_C(0x0)
20491 	/* PBL pointer points to PTE table. */
20492 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_LVL_1 \
20493 		UINT32_C(0x1)
20494 	/*
20495 	 * PBL pointer points to PDE table with each entry pointing to
20496 	 * PTE tables.
20497 	 */
20498 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_LVL_2 \
20499 		UINT32_C(0x2)
20500 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_LAST \
20501 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_LVL_LVL_2
20502 	/* TQM ring page size. */
20503 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_MASK \
20504 		UINT32_C(0xf0)
20505 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_SFT \
20506 		4
20507 	/* 4KB. */
20508 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_4K \
20509 		(UINT32_C(0x0) << 4)
20510 	/* 8KB. */
20511 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_8K \
20512 		(UINT32_C(0x1) << 4)
20513 	/* 64KB. */
20514 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_64K \
20515 		(UINT32_C(0x2) << 4)
20516 	/* 2MB. */
20517 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_2M \
20518 		(UINT32_C(0x3) << 4)
20519 	/* 8MB. */
20520 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_8M \
20521 		(UINT32_C(0x4) << 4)
20522 	/* 1GB. */
20523 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_1G \
20524 		(UINT32_C(0x5) << 4)
20525 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_LAST \
20526 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING8_TQM_RING_PG_SIZE_PG_1G
20527 	uint8_t	ring8_unused[3];
20528 	/* Number of TQM ring entries. */
20529 	uint32_t	tqm_ring8_num_entries;
20530 	/* TQM ring page directory. */
20531 	uint64_t	tqm_ring8_page_dir;
20532 	/* TQM ring page size and level. */
20533 	uint8_t	tqm_ring9_pg_size_tqm_ring_lvl;
20534 	/* TQM ring PBL indirect levels. */
20535 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_MASK \
20536 		UINT32_C(0xf)
20537 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_SFT \
20538 		0
20539 	/* PBL pointer is physical start address. */
20540 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_LVL_0 \
20541 		UINT32_C(0x0)
20542 	/* PBL pointer points to PTE table. */
20543 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_LVL_1 \
20544 		UINT32_C(0x1)
20545 	/*
20546 	 * PBL pointer points to PDE table with each entry pointing to
20547 	 * PTE tables.
20548 	 */
20549 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_LVL_2 \
20550 		UINT32_C(0x2)
20551 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_LAST \
20552 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_LVL_LVL_2
20553 	/* TQM ring page size. */
20554 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_MASK \
20555 		UINT32_C(0xf0)
20556 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_SFT \
20557 		4
20558 	/* 4KB. */
20559 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_4K \
20560 		(UINT32_C(0x0) << 4)
20561 	/* 8KB. */
20562 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_8K \
20563 		(UINT32_C(0x1) << 4)
20564 	/* 64KB. */
20565 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_64K \
20566 		(UINT32_C(0x2) << 4)
20567 	/* 2MB. */
20568 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_2M \
20569 		(UINT32_C(0x3) << 4)
20570 	/* 8MB. */
20571 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_8M \
20572 		(UINT32_C(0x4) << 4)
20573 	/* 1GB. */
20574 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_1G \
20575 		(UINT32_C(0x5) << 4)
20576 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_LAST \
20577 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING9_TQM_RING_PG_SIZE_PG_1G
20578 	uint8_t	ring9_unused[3];
20579 	/* Number of TQM ring entries. */
20580 	uint32_t	tqm_ring9_num_entries;
20581 	/* TQM ring page directory. */
20582 	uint64_t	tqm_ring9_page_dir;
20583 	/* TQM ring page size and level. */
20584 	uint8_t	tqm_ring10_pg_size_tqm_ring_lvl;
20585 	/* TQM ring PBL indirect levels. */
20586 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_MASK \
20587 		UINT32_C(0xf)
20588 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_SFT \
20589 		0
20590 	/* PBL pointer is physical start address. */
20591 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_LVL_0 \
20592 		UINT32_C(0x0)
20593 	/* PBL pointer points to PTE table. */
20594 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_LVL_1 \
20595 		UINT32_C(0x1)
20596 	/*
20597 	 * PBL pointer points to PDE table with each entry pointing to
20598 	 * PTE tables.
20599 	 */
20600 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_LVL_2 \
20601 		UINT32_C(0x2)
20602 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_LAST \
20603 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_LVL_LVL_2
20604 	/* TQM ring page size. */
20605 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_MASK \
20606 		UINT32_C(0xf0)
20607 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_SFT \
20608 		4
20609 	/* 4KB. */
20610 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_4K \
20611 		(UINT32_C(0x0) << 4)
20612 	/* 8KB. */
20613 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_8K \
20614 		(UINT32_C(0x1) << 4)
20615 	/* 64KB. */
20616 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_64K \
20617 		(UINT32_C(0x2) << 4)
20618 	/* 2MB. */
20619 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_2M \
20620 		(UINT32_C(0x3) << 4)
20621 	/* 8MB. */
20622 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_8M \
20623 		(UINT32_C(0x4) << 4)
20624 	/* 1GB. */
20625 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_1G \
20626 		(UINT32_C(0x5) << 4)
20627 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_LAST \
20628 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_RING10_TQM_RING_PG_SIZE_PG_1G
20629 	uint8_t	ring10_unused[3];
20630 	/* Number of TQM ring entries. */
20631 	uint32_t	tqm_ring10_num_entries;
20632 	/* TQM ring page directory. */
20633 	uint64_t	tqm_ring10_page_dir;
20634 	/* Number of Tx KTLS context entries allocated. */
20635 	uint32_t	tkc_num_entries;
20636 	/* Number of Rx KTLS context entries allocated. */
20637 	uint32_t	rkc_num_entries;
20638 	/* Tx KTLS context page directory. */
20639 	uint64_t	tkc_page_dir;
20640 	/* Rx KTLS context page directory. */
20641 	uint64_t	rkc_page_dir;
20642 	/* Number of bytes allocated for each Tx KTLS context entry. */
20643 	uint16_t	tkc_entry_size;
20644 	/* Number of bytes allocated for each Rx KTLS context entry. */
20645 	uint16_t	rkc_entry_size;
20646 	/* Tx KTLS context page size and level. */
20647 	uint8_t	tkc_pg_size_tkc_lvl;
20648 	/* Tx KTLS context PBL indirect levels. */
20649 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_MASK \
20650 		UINT32_C(0xf)
20651 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_SFT       0
20652 	/* PBL pointer is physical start address. */
20653 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_LVL_0 \
20654 		UINT32_C(0x0)
20655 	/* PBL pointer points to PTE table. */
20656 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_LVL_1 \
20657 		UINT32_C(0x1)
20658 	/*
20659 	 * PBL pointer points to PDE table with each entry pointing to PTE
20660 	 * tables.
20661 	 */
20662 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_LVL_2 \
20663 		UINT32_C(0x2)
20664 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_LAST \
20665 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_LVL_LVL_2
20666 	/* Tx KTLS context page size. */
20667 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_MASK \
20668 		UINT32_C(0xf0)
20669 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_SFT   4
20670 	/* 4KB. */
20671 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_4K \
20672 		(UINT32_C(0x0) << 4)
20673 	/* 8KB. */
20674 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_8K \
20675 		(UINT32_C(0x1) << 4)
20676 	/* 64KB. */
20677 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_64K \
20678 		(UINT32_C(0x2) << 4)
20679 	/* 2MB. */
20680 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_2M \
20681 		(UINT32_C(0x3) << 4)
20682 	/* 8MB. */
20683 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_8M \
20684 		(UINT32_C(0x4) << 4)
20685 	/* 1GB. */
20686 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_1G \
20687 		(UINT32_C(0x5) << 4)
20688 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_LAST \
20689 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_TKC_PG_SIZE_PG_1G
20690 	/* Rx KTLS context page size and level. */
20691 	uint8_t	rkc_pg_size_rkc_lvl;
20692 	/* Rx KTLS context PBL indirect levels. */
20693 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_MASK \
20694 		UINT32_C(0xf)
20695 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_SFT       0
20696 	/* PBL pointer is physical start address. */
20697 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_LVL_0 \
20698 		UINT32_C(0x0)
20699 	/* PBL pointer points to PTE table. */
20700 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_LVL_1 \
20701 		UINT32_C(0x1)
20702 	/*
20703 	 * PBL pointer points to PDE table with each entry pointing to
20704 	 * PTE tables.
20705 	 */
20706 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_LVL_2 \
20707 		UINT32_C(0x2)
20708 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_LAST \
20709 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_LVL_LVL_2
20710 	/* Rx KTLS context page size. */
20711 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_MASK \
20712 		UINT32_C(0xf0)
20713 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_SFT   4
20714 	/* 4KB. */
20715 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_4K \
20716 		(UINT32_C(0x0) << 4)
20717 	/* 8KB. */
20718 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_8K \
20719 		(UINT32_C(0x1) << 4)
20720 	/* 64KB. */
20721 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_64K \
20722 		(UINT32_C(0x2) << 4)
20723 	/* 2MB. */
20724 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_2M \
20725 		(UINT32_C(0x3) << 4)
20726 	/* 8MB. */
20727 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_8M \
20728 		(UINT32_C(0x4) << 4)
20729 	/* 1GB. */
20730 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_1G \
20731 		(UINT32_C(0x5) << 4)
20732 	#define HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_LAST \
20733 		HWRM_FUNC_BACKING_STORE_CFG_INPUT_RKC_PG_SIZE_PG_1G
20734 	/*
20735 	 * Number of RoCE QP context entries reserved for this
20736 	 * function to support fast QP modify destroy feature.
20737 	 */
20738 	uint16_t	qp_num_fast_qpmd_entries;
20739 } __rte_packed_end;
20740 
20741 /* hwrm_func_backing_store_cfg_output (size:128b/16B) */
20742 struct __rte_packed_begin hwrm_func_backing_store_cfg_output {
20743 	/* The specific error status for the command. */
20744 	uint16_t	error_code;
20745 	/* The HWRM command request type. */
20746 	uint16_t	req_type;
20747 	/* The sequence ID from the original command. */
20748 	uint16_t	seq_id;
20749 	/* The length of the response data in number of bytes. */
20750 	uint16_t	resp_len;
20751 	uint8_t	unused_0[7];
20752 	/*
20753 	 * This field is used in Output records to indicate that the output
20754 	 * is completely written to RAM. This field should be read as '1'
20755 	 * to indicate that the output has been completely written. When
20756 	 * writing a command completion or response to an internal processor,
20757 	 * the order of writes has to be such that this field is written last.
20758 	 */
20759 	uint8_t	valid;
20760 } __rte_packed_end;
20761 
20762 /********************************
20763  * hwrm_func_backing_store_qcfg *
20764  ********************************/
20765 
20766 
20767 /* hwrm_func_backing_store_qcfg_input (size:128b/16B) */
20768 struct __rte_packed_begin hwrm_func_backing_store_qcfg_input {
20769 	/* The HWRM command request type. */
20770 	uint16_t	req_type;
20771 	/*
20772 	 * The completion ring to send the completion event on. This should
20773 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
20774 	 */
20775 	uint16_t	cmpl_ring;
20776 	/*
20777 	 * The sequence ID is used by the driver for tracking multiple
20778 	 * commands. This ID is treated as opaque data by the firmware and
20779 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
20780 	 */
20781 	uint16_t	seq_id;
20782 	/*
20783 	 * The target ID of the command:
20784 	 * * 0x0-0xFFF8 - The function ID
20785 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
20786 	 * * 0xFFFD - Reserved for user-space HWRM interface
20787 	 * * 0xFFFF - HWRM
20788 	 */
20789 	uint16_t	target_id;
20790 	/*
20791 	 * A physical address pointer pointing to a host buffer that the
20792 	 * command's response data will be written. This can be either a host
20793 	 * physical address (HPA) or a guest physical address (GPA) and must
20794 	 * point to a physically contiguous block of memory.
20795 	 */
20796 	uint64_t	resp_addr;
20797 } __rte_packed_end;
20798 
20799 /* hwrm_func_backing_store_qcfg_output (size:2496b/312B) */
20800 struct __rte_packed_begin hwrm_func_backing_store_qcfg_output {
20801 	/* The specific error status for the command. */
20802 	uint16_t	error_code;
20803 	/* The HWRM command request type. */
20804 	uint16_t	req_type;
20805 	/* The sequence ID from the original command. */
20806 	uint16_t	seq_id;
20807 	/* The length of the response data in number of bytes. */
20808 	uint16_t	resp_len;
20809 	uint32_t	flags;
20810 	/*
20811 	 * When set, the firmware only uses on-chip resources and does not
20812 	 * expect any backing store to be provided by the host driver. This
20813 	 * mode provides minimal L2 functionality (e.g. limited L2 resources,
20814 	 * no RoCE).
20815 	 */
20816 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_FLAGS_PREBOOT_MODE \
20817 		UINT32_C(0x1)
20818 	/*
20819 	 * When set, the 32b `mrav_num_entries` field is logically divided
20820 	 * into two 16b fields, `mr_num_entries` and `av_num_entries`.
20821 	 */
20822 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_FLAGS_MRAV_RESERVATION_SPLIT \
20823 		UINT32_C(0x2)
20824 	uint32_t	enables;
20825 	/*
20826 	 * This bit must be '1' for the qp fields to be
20827 	 * configured.
20828 	 */
20829 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_QP \
20830 		UINT32_C(0x1)
20831 	/*
20832 	 * This bit must be '1' for the srq fields to be
20833 	 * configured.
20834 	 */
20835 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_SRQ \
20836 		UINT32_C(0x2)
20837 	/*
20838 	 * This bit must be '1' for the cq fields to be
20839 	 * configured.
20840 	 */
20841 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_CQ \
20842 		UINT32_C(0x4)
20843 	/*
20844 	 * This bit must be '1' for the vnic fields to be
20845 	 * configured.
20846 	 */
20847 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_VNIC \
20848 		UINT32_C(0x8)
20849 	/*
20850 	 * This bit must be '1' for the stat fields to be
20851 	 * configured.
20852 	 */
20853 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_STAT \
20854 		UINT32_C(0x10)
20855 	/*
20856 	 * This bit must be '1' for the tqm_sp fields to be
20857 	 * configured.
20858 	 */
20859 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_SP \
20860 		UINT32_C(0x20)
20861 	/*
20862 	 * This bit must be '1' for the tqm_ring0 fields to be
20863 	 * configured.
20864 	 */
20865 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING0 \
20866 		UINT32_C(0x40)
20867 	/*
20868 	 * This bit must be '1' for the tqm_ring1 fields to be
20869 	 * configured.
20870 	 */
20871 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING1 \
20872 		UINT32_C(0x80)
20873 	/*
20874 	 * This bit must be '1' for the tqm_ring2 fields to be
20875 	 * configured.
20876 	 */
20877 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING2 \
20878 		UINT32_C(0x100)
20879 	/*
20880 	 * This bit must be '1' for the tqm_ring3 fields to be
20881 	 * configured.
20882 	 */
20883 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING3 \
20884 		UINT32_C(0x200)
20885 	/*
20886 	 * This bit must be '1' for the tqm_ring4 fields to be
20887 	 * configured.
20888 	 */
20889 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING4 \
20890 		UINT32_C(0x400)
20891 	/*
20892 	 * This bit must be '1' for the tqm_ring5 fields to be
20893 	 * configured.
20894 	 */
20895 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING5 \
20896 		UINT32_C(0x800)
20897 	/*
20898 	 * This bit must be '1' for the tqm_ring6 fields to be
20899 	 * configured.
20900 	 */
20901 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING6 \
20902 		UINT32_C(0x1000)
20903 	/*
20904 	 * This bit must be '1' for the tqm_ring7 fields to be
20905 	 * configured.
20906 	 */
20907 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING7 \
20908 		UINT32_C(0x2000)
20909 	/*
20910 	 * This bit must be '1' for the mrav fields to be
20911 	 * configured.
20912 	 */
20913 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_MRAV \
20914 		UINT32_C(0x4000)
20915 	/*
20916 	 * This bit must be '1' for the tim fields to be
20917 	 * configured.
20918 	 */
20919 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TIM \
20920 		UINT32_C(0x8000)
20921 	/*
20922 	 * This bit must be '1' for the tqm_ring8 fields to be
20923 	 * configured.
20924 	 */
20925 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING8 \
20926 		UINT32_C(0x10000)
20927 	/*
20928 	 * This bit must be '1' for the tqm_ring9 fields to be
20929 	 * configured.
20930 	 */
20931 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING9 \
20932 		UINT32_C(0x20000)
20933 	/*
20934 	 * This bit must be '1' for the tqm_ring10 fields to be
20935 	 * configured.
20936 	 */
20937 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TQM_RING10 \
20938 		UINT32_C(0x40000)
20939 	/*
20940 	 * This bit must be '1' for the Tx KTLS context
20941 	 * fields to be configured.
20942 	 */
20943 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_TKC \
20944 		UINT32_C(0x80000)
20945 	/*
20946 	 * This bit must be '1' for the Rx KTLS context
20947 	 * fields to be configured.
20948 	 */
20949 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_RKC \
20950 		UINT32_C(0x100000)
20951 	/*
20952 	 * This bit must be '1' for the number of QPs reserved for fast
20953 	 * qp modify destroy feature to be configured.
20954 	 */
20955 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_ENABLES_QP_FAST_QPMD \
20956 		UINT32_C(0x200000)
20957 	/* QPC page size and level. */
20958 	uint8_t	qpc_pg_size_qpc_lvl;
20959 	/* QPC PBL indirect levels. */
20960 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_MASK \
20961 		UINT32_C(0xf)
20962 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_SFT       0
20963 	/* PBL pointer is physical start address. */
20964 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_LVL_0 \
20965 		UINT32_C(0x0)
20966 	/* PBL pointer points to PTE table. */
20967 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_LVL_1 \
20968 		UINT32_C(0x1)
20969 	/*
20970 	 * PBL pointer points to PDE table with each entry pointing to PTE
20971 	 * tables.
20972 	 */
20973 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_LVL_2 \
20974 		UINT32_C(0x2)
20975 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_LAST \
20976 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_LVL_LVL_2
20977 	/* QPC page size. */
20978 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_MASK \
20979 		UINT32_C(0xf0)
20980 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_SFT   4
20981 	/* 4KB. */
20982 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_4K \
20983 		(UINT32_C(0x0) << 4)
20984 	/* 8KB. */
20985 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_8K \
20986 		(UINT32_C(0x1) << 4)
20987 	/* 64KB. */
20988 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_64K \
20989 		(UINT32_C(0x2) << 4)
20990 	/* 2MB. */
20991 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_2M \
20992 		(UINT32_C(0x3) << 4)
20993 	/* 8MB. */
20994 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_8M \
20995 		(UINT32_C(0x4) << 4)
20996 	/* 1GB. */
20997 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_1G \
20998 		(UINT32_C(0x5) << 4)
20999 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_LAST \
21000 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_QPC_PG_SIZE_PG_1G
21001 	/* SRQ page size and level. */
21002 	uint8_t	srq_pg_size_srq_lvl;
21003 	/* SRQ PBL indirect levels. */
21004 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_MASK \
21005 		UINT32_C(0xf)
21006 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_SFT       0
21007 	/* PBL pointer is physical start address. */
21008 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_LVL_0 \
21009 		UINT32_C(0x0)
21010 	/* PBL pointer points to PTE table. */
21011 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_LVL_1 \
21012 		UINT32_C(0x1)
21013 	/*
21014 	 * PBL pointer points to PDE table with each entry pointing to PTE
21015 	 * tables.
21016 	 */
21017 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_LVL_2 \
21018 		UINT32_C(0x2)
21019 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_LAST \
21020 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_LVL_LVL_2
21021 	/* SRQ page size. */
21022 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_MASK \
21023 		UINT32_C(0xf0)
21024 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_SFT   4
21025 	/* 4KB. */
21026 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_4K \
21027 		(UINT32_C(0x0) << 4)
21028 	/* 8KB. */
21029 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_8K \
21030 		(UINT32_C(0x1) << 4)
21031 	/* 64KB. */
21032 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_64K \
21033 		(UINT32_C(0x2) << 4)
21034 	/* 2MB. */
21035 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_2M \
21036 		(UINT32_C(0x3) << 4)
21037 	/* 8MB. */
21038 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_8M \
21039 		(UINT32_C(0x4) << 4)
21040 	/* 1GB. */
21041 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_1G \
21042 		(UINT32_C(0x5) << 4)
21043 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_LAST \
21044 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_SRQ_PG_SIZE_PG_1G
21045 	/* CQ page size and level. */
21046 	uint8_t	cq_pg_size_cq_lvl;
21047 	/* CQ PBL indirect levels. */
21048 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_MASK \
21049 		UINT32_C(0xf)
21050 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_SFT       0
21051 	/* PBL pointer is physical start address. */
21052 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_LVL_0 \
21053 		UINT32_C(0x0)
21054 	/* PBL pointer points to PTE table. */
21055 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_LVL_1 \
21056 		UINT32_C(0x1)
21057 	/*
21058 	 * PBL pointer points to PDE table with each entry pointing to PTE
21059 	 * tables.
21060 	 */
21061 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_LVL_2 \
21062 		UINT32_C(0x2)
21063 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_LAST \
21064 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_LVL_LVL_2
21065 	/* CQ page size. */
21066 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_MASK \
21067 		UINT32_C(0xf0)
21068 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_SFT   4
21069 	/* 4KB. */
21070 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_4K \
21071 		(UINT32_C(0x0) << 4)
21072 	/* 8KB. */
21073 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_8K \
21074 		(UINT32_C(0x1) << 4)
21075 	/* 64KB. */
21076 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_64K \
21077 		(UINT32_C(0x2) << 4)
21078 	/* 2MB. */
21079 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_2M \
21080 		(UINT32_C(0x3) << 4)
21081 	/* 8MB. */
21082 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_8M \
21083 		(UINT32_C(0x4) << 4)
21084 	/* 1GB. */
21085 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_1G \
21086 		(UINT32_C(0x5) << 4)
21087 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_LAST \
21088 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_CQ_PG_SIZE_PG_1G
21089 	/* VNIC page size and level. */
21090 	uint8_t	vnic_pg_size_vnic_lvl;
21091 	/* VNIC PBL indirect levels. */
21092 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_MASK \
21093 		UINT32_C(0xf)
21094 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_SFT       0
21095 	/* PBL pointer is physical start address. */
21096 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_LVL_0 \
21097 		UINT32_C(0x0)
21098 	/* PBL pointer points to PTE table. */
21099 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_LVL_1 \
21100 		UINT32_C(0x1)
21101 	/*
21102 	 * PBL pointer points to PDE table with each entry pointing to PTE
21103 	 * tables.
21104 	 */
21105 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_LVL_2 \
21106 		UINT32_C(0x2)
21107 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_LAST \
21108 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_LVL_LVL_2
21109 	/* VNIC page size. */
21110 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_MASK \
21111 		UINT32_C(0xf0)
21112 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_SFT   4
21113 	/* 4KB. */
21114 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_4K \
21115 		(UINT32_C(0x0) << 4)
21116 	/* 8KB. */
21117 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_8K \
21118 		(UINT32_C(0x1) << 4)
21119 	/* 64KB. */
21120 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_64K \
21121 		(UINT32_C(0x2) << 4)
21122 	/* 2MB. */
21123 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_2M \
21124 		(UINT32_C(0x3) << 4)
21125 	/* 8MB. */
21126 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_8M \
21127 		(UINT32_C(0x4) << 4)
21128 	/* 1GB. */
21129 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_1G \
21130 		(UINT32_C(0x5) << 4)
21131 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_LAST \
21132 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_VNIC_PG_SIZE_PG_1G
21133 	/* Stat page size and level. */
21134 	uint8_t	stat_pg_size_stat_lvl;
21135 	/* Stat PBL indirect levels. */
21136 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_MASK \
21137 		UINT32_C(0xf)
21138 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_SFT       0
21139 	/* PBL pointer is physical start address. */
21140 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_LVL_0 \
21141 		UINT32_C(0x0)
21142 	/* PBL pointer points to PTE table. */
21143 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_LVL_1 \
21144 		UINT32_C(0x1)
21145 	/*
21146 	 * PBL pointer points to PDE table with each entry pointing to PTE
21147 	 * tables.
21148 	 */
21149 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_LVL_2 \
21150 		UINT32_C(0x2)
21151 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_LAST \
21152 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_LVL_LVL_2
21153 	/* Stat page size. */
21154 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_MASK \
21155 		UINT32_C(0xf0)
21156 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_SFT   4
21157 	/* 4KB. */
21158 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_4K \
21159 		(UINT32_C(0x0) << 4)
21160 	/* 8KB. */
21161 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_8K \
21162 		(UINT32_C(0x1) << 4)
21163 	/* 64KB. */
21164 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_64K \
21165 		(UINT32_C(0x2) << 4)
21166 	/* 2MB. */
21167 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_2M \
21168 		(UINT32_C(0x3) << 4)
21169 	/* 8MB. */
21170 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_8M \
21171 		(UINT32_C(0x4) << 4)
21172 	/* 1GB. */
21173 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_1G \
21174 		(UINT32_C(0x5) << 4)
21175 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_LAST \
21176 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_STAT_PG_SIZE_PG_1G
21177 	/* TQM slow path page size and level. */
21178 	uint8_t	tqm_sp_pg_size_tqm_sp_lvl;
21179 	/* TQM slow path PBL indirect levels. */
21180 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_MASK \
21181 		UINT32_C(0xf)
21182 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_SFT       0
21183 	/* PBL pointer is physical start address. */
21184 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_LVL_0 \
21185 		UINT32_C(0x0)
21186 	/* PBL pointer points to PTE table. */
21187 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_LVL_1 \
21188 		UINT32_C(0x1)
21189 	/*
21190 	 * PBL pointer points to PDE table with each entry pointing to PTE
21191 	 * tables.
21192 	 */
21193 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_LVL_2 \
21194 		UINT32_C(0x2)
21195 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_LAST \
21196 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_LVL_LVL_2
21197 	/* TQM slow path page size. */
21198 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_MASK \
21199 		UINT32_C(0xf0)
21200 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_SFT   4
21201 	/* 4KB. */
21202 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_4K \
21203 		(UINT32_C(0x0) << 4)
21204 	/* 8KB. */
21205 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_8K \
21206 		(UINT32_C(0x1) << 4)
21207 	/* 64KB. */
21208 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_64K \
21209 		(UINT32_C(0x2) << 4)
21210 	/* 2MB. */
21211 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_2M \
21212 		(UINT32_C(0x3) << 4)
21213 	/* 8MB. */
21214 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_8M \
21215 		(UINT32_C(0x4) << 4)
21216 	/* 1GB. */
21217 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_1G \
21218 		(UINT32_C(0x5) << 4)
21219 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_LAST \
21220 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_SP_PG_SIZE_PG_1G
21221 	/* TQM ring 0 page size and level. */
21222 	uint8_t	tqm_ring0_pg_size_tqm_ring0_lvl;
21223 	/* TQM ring 0 PBL indirect levels. */
21224 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_MASK \
21225 		UINT32_C(0xf)
21226 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_SFT       0
21227 	/* PBL pointer is physical start address. */
21228 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_LVL_0 \
21229 		UINT32_C(0x0)
21230 	/* PBL pointer points to PTE table. */
21231 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_LVL_1 \
21232 		UINT32_C(0x1)
21233 	/*
21234 	 * PBL pointer points to PDE table with each entry pointing to PTE
21235 	 * tables.
21236 	 */
21237 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_LVL_2 \
21238 		UINT32_C(0x2)
21239 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_LAST \
21240 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_LVL_LVL_2
21241 	/* TQM ring 0 page size. */
21242 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_MASK \
21243 		UINT32_C(0xf0)
21244 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_SFT   4
21245 	/* 4KB. */
21246 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_4K \
21247 		(UINT32_C(0x0) << 4)
21248 	/* 8KB. */
21249 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_8K \
21250 		(UINT32_C(0x1) << 4)
21251 	/* 64KB. */
21252 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_64K \
21253 		(UINT32_C(0x2) << 4)
21254 	/* 2MB. */
21255 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_2M \
21256 		(UINT32_C(0x3) << 4)
21257 	/* 8MB. */
21258 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_8M \
21259 		(UINT32_C(0x4) << 4)
21260 	/* 1GB. */
21261 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_1G \
21262 		(UINT32_C(0x5) << 4)
21263 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_LAST \
21264 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING0_PG_SIZE_PG_1G
21265 	/* TQM ring 1 page size and level. */
21266 	uint8_t	tqm_ring1_pg_size_tqm_ring1_lvl;
21267 	/* TQM ring 1 PBL indirect levels. */
21268 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_MASK \
21269 		UINT32_C(0xf)
21270 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_SFT       0
21271 	/* PBL pointer is physical start address. */
21272 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_LVL_0 \
21273 		UINT32_C(0x0)
21274 	/* PBL pointer points to PTE table. */
21275 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_LVL_1 \
21276 		UINT32_C(0x1)
21277 	/*
21278 	 * PBL pointer points to PDE table with each entry pointing to PTE
21279 	 * tables.
21280 	 */
21281 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_LVL_2 \
21282 		UINT32_C(0x2)
21283 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_LAST \
21284 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_LVL_LVL_2
21285 	/* TQM ring 1 page size. */
21286 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_MASK \
21287 		UINT32_C(0xf0)
21288 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_SFT   4
21289 	/* 4KB. */
21290 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_4K \
21291 		(UINT32_C(0x0) << 4)
21292 	/* 8KB. */
21293 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_8K \
21294 		(UINT32_C(0x1) << 4)
21295 	/* 64KB. */
21296 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_64K \
21297 		(UINT32_C(0x2) << 4)
21298 	/* 2MB. */
21299 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_2M \
21300 		(UINT32_C(0x3) << 4)
21301 	/* 8MB. */
21302 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_8M \
21303 		(UINT32_C(0x4) << 4)
21304 	/* 1GB. */
21305 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_1G \
21306 		(UINT32_C(0x5) << 4)
21307 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_LAST \
21308 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING1_PG_SIZE_PG_1G
21309 	/* TQM ring 2 page size and level. */
21310 	uint8_t	tqm_ring2_pg_size_tqm_ring2_lvl;
21311 	/* TQM ring 2 PBL indirect levels. */
21312 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_MASK \
21313 		UINT32_C(0xf)
21314 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_SFT       0
21315 	/* PBL pointer is physical start address. */
21316 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_LVL_0 \
21317 		UINT32_C(0x0)
21318 	/* PBL pointer points to PTE table. */
21319 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_LVL_1 \
21320 		UINT32_C(0x1)
21321 	/*
21322 	 * PBL pointer points to PDE table with each entry pointing to PTE
21323 	 * tables.
21324 	 */
21325 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_LVL_2 \
21326 		UINT32_C(0x2)
21327 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_LAST \
21328 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_LVL_LVL_2
21329 	/* TQM ring 2 page size. */
21330 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_MASK \
21331 		UINT32_C(0xf0)
21332 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_SFT   4
21333 	/* 4KB. */
21334 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_4K \
21335 		(UINT32_C(0x0) << 4)
21336 	/* 8KB. */
21337 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_8K \
21338 		(UINT32_C(0x1) << 4)
21339 	/* 64KB. */
21340 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_64K \
21341 		(UINT32_C(0x2) << 4)
21342 	/* 2MB. */
21343 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_2M \
21344 		(UINT32_C(0x3) << 4)
21345 	/* 8MB. */
21346 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_8M \
21347 		(UINT32_C(0x4) << 4)
21348 	/* 1GB. */
21349 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_1G \
21350 		(UINT32_C(0x5) << 4)
21351 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_LAST \
21352 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING2_PG_SIZE_PG_1G
21353 	/* TQM ring 3 page size and level. */
21354 	uint8_t	tqm_ring3_pg_size_tqm_ring3_lvl;
21355 	/* TQM ring 3 PBL indirect levels. */
21356 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_MASK \
21357 		UINT32_C(0xf)
21358 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_SFT       0
21359 	/* PBL pointer is physical start address. */
21360 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_LVL_0 \
21361 		UINT32_C(0x0)
21362 	/* PBL pointer points to PTE table. */
21363 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_LVL_1 \
21364 		UINT32_C(0x1)
21365 	/*
21366 	 * PBL pointer points to PDE table with each entry pointing to PTE
21367 	 * tables.
21368 	 */
21369 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_LVL_2 \
21370 		UINT32_C(0x2)
21371 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_LAST \
21372 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_LVL_LVL_2
21373 	/* TQM ring 3 page size. */
21374 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_MASK \
21375 		UINT32_C(0xf0)
21376 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_SFT   4
21377 	/* 4KB. */
21378 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_4K \
21379 		(UINT32_C(0x0) << 4)
21380 	/* 8KB. */
21381 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_8K \
21382 		(UINT32_C(0x1) << 4)
21383 	/* 64KB. */
21384 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_64K \
21385 		(UINT32_C(0x2) << 4)
21386 	/* 2MB. */
21387 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_2M \
21388 		(UINT32_C(0x3) << 4)
21389 	/* 8MB. */
21390 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_8M \
21391 		(UINT32_C(0x4) << 4)
21392 	/* 1GB. */
21393 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_1G \
21394 		(UINT32_C(0x5) << 4)
21395 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_LAST \
21396 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING3_PG_SIZE_PG_1G
21397 	/* TQM ring 4 page size and level. */
21398 	uint8_t	tqm_ring4_pg_size_tqm_ring4_lvl;
21399 	/* TQM ring 4 PBL indirect levels. */
21400 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_MASK \
21401 		UINT32_C(0xf)
21402 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_SFT       0
21403 	/* PBL pointer is physical start address. */
21404 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_LVL_0 \
21405 		UINT32_C(0x0)
21406 	/* PBL pointer points to PTE table. */
21407 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_LVL_1 \
21408 		UINT32_C(0x1)
21409 	/*
21410 	 * PBL pointer points to PDE table with each entry pointing to PTE
21411 	 * tables.
21412 	 */
21413 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_LVL_2 \
21414 		UINT32_C(0x2)
21415 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_LAST \
21416 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_LVL_LVL_2
21417 	/* TQM ring 4 page size. */
21418 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_MASK \
21419 		UINT32_C(0xf0)
21420 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_SFT   4
21421 	/* 4KB. */
21422 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_4K \
21423 		(UINT32_C(0x0) << 4)
21424 	/* 8KB. */
21425 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_8K \
21426 		(UINT32_C(0x1) << 4)
21427 	/* 64KB. */
21428 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_64K \
21429 		(UINT32_C(0x2) << 4)
21430 	/* 2MB. */
21431 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_2M \
21432 		(UINT32_C(0x3) << 4)
21433 	/* 8MB. */
21434 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_8M \
21435 		(UINT32_C(0x4) << 4)
21436 	/* 1GB. */
21437 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_1G \
21438 		(UINT32_C(0x5) << 4)
21439 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_LAST \
21440 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING4_PG_SIZE_PG_1G
21441 	/* TQM ring 5 page size and level. */
21442 	uint8_t	tqm_ring5_pg_size_tqm_ring5_lvl;
21443 	/* TQM ring 5 PBL indirect levels. */
21444 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_MASK \
21445 		UINT32_C(0xf)
21446 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_SFT       0
21447 	/* PBL pointer is physical start address. */
21448 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_LVL_0 \
21449 		UINT32_C(0x0)
21450 	/* PBL pointer points to PTE table. */
21451 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_LVL_1 \
21452 		UINT32_C(0x1)
21453 	/*
21454 	 * PBL pointer points to PDE table with each entry pointing to PTE
21455 	 * tables.
21456 	 */
21457 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_LVL_2 \
21458 		UINT32_C(0x2)
21459 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_LAST \
21460 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_LVL_LVL_2
21461 	/* TQM ring 5 page size. */
21462 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_MASK \
21463 		UINT32_C(0xf0)
21464 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_SFT   4
21465 	/* 4KB. */
21466 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_4K \
21467 		(UINT32_C(0x0) << 4)
21468 	/* 8KB. */
21469 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_8K \
21470 		(UINT32_C(0x1) << 4)
21471 	/* 64KB. */
21472 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_64K \
21473 		(UINT32_C(0x2) << 4)
21474 	/* 2MB. */
21475 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_2M \
21476 		(UINT32_C(0x3) << 4)
21477 	/* 8MB. */
21478 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_8M \
21479 		(UINT32_C(0x4) << 4)
21480 	/* 1GB. */
21481 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_1G \
21482 		(UINT32_C(0x5) << 4)
21483 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_LAST \
21484 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING5_PG_SIZE_PG_1G
21485 	/* TQM ring 6 page size and level. */
21486 	uint8_t	tqm_ring6_pg_size_tqm_ring6_lvl;
21487 	/* TQM ring 6 PBL indirect levels. */
21488 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_MASK \
21489 		UINT32_C(0xf)
21490 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_SFT       0
21491 	/* PBL pointer is physical start address. */
21492 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_LVL_0 \
21493 		UINT32_C(0x0)
21494 	/* PBL pointer points to PTE table. */
21495 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_LVL_1 \
21496 		UINT32_C(0x1)
21497 	/*
21498 	 * PBL pointer points to PDE table with each entry pointing to PTE
21499 	 * tables.
21500 	 */
21501 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_LVL_2 \
21502 		UINT32_C(0x2)
21503 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_LAST \
21504 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_LVL_LVL_2
21505 	/* TQM ring 6 page size. */
21506 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_MASK \
21507 		UINT32_C(0xf0)
21508 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_SFT   4
21509 	/* 4KB. */
21510 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_4K \
21511 		(UINT32_C(0x0) << 4)
21512 	/* 8KB. */
21513 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_8K \
21514 		(UINT32_C(0x1) << 4)
21515 	/* 64KB. */
21516 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_64K \
21517 		(UINT32_C(0x2) << 4)
21518 	/* 2MB. */
21519 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_2M \
21520 		(UINT32_C(0x3) << 4)
21521 	/* 8MB. */
21522 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_8M \
21523 		(UINT32_C(0x4) << 4)
21524 	/* 1GB. */
21525 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_1G \
21526 		(UINT32_C(0x5) << 4)
21527 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_LAST \
21528 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING6_PG_SIZE_PG_1G
21529 	/* TQM ring 7 page size and level. */
21530 	uint8_t	tqm_ring7_pg_size_tqm_ring7_lvl;
21531 	/* TQM ring 7 PBL indirect levels. */
21532 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_MASK \
21533 		UINT32_C(0xf)
21534 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_SFT       0
21535 	/* PBL pointer is physical start address. */
21536 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_LVL_0 \
21537 		UINT32_C(0x0)
21538 	/* PBL pointer points to PTE table. */
21539 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_LVL_1 \
21540 		UINT32_C(0x1)
21541 	/*
21542 	 * PBL pointer points to PDE table with each entry pointing to PTE
21543 	 * tables.
21544 	 */
21545 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_LVL_2 \
21546 		UINT32_C(0x2)
21547 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_LAST \
21548 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_LVL_LVL_2
21549 	/* TQM ring 7 page size. */
21550 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_MASK \
21551 		UINT32_C(0xf0)
21552 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_SFT   4
21553 	/* 4KB. */
21554 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_4K \
21555 		(UINT32_C(0x0) << 4)
21556 	/* 8KB. */
21557 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_8K \
21558 		(UINT32_C(0x1) << 4)
21559 	/* 64KB. */
21560 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_64K \
21561 		(UINT32_C(0x2) << 4)
21562 	/* 2MB. */
21563 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_2M \
21564 		(UINT32_C(0x3) << 4)
21565 	/* 8MB. */
21566 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_8M \
21567 		(UINT32_C(0x4) << 4)
21568 	/* 1GB. */
21569 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_1G \
21570 		(UINT32_C(0x5) << 4)
21571 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_LAST \
21572 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TQM_RING7_PG_SIZE_PG_1G
21573 	/* MR/AV page size and level. */
21574 	uint8_t	mrav_pg_size_mrav_lvl;
21575 	/* MR/AV PBL indirect levels. */
21576 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_MASK \
21577 		UINT32_C(0xf)
21578 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_SFT       0
21579 	/* PBL pointer is physical start address. */
21580 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_LVL_0 \
21581 		UINT32_C(0x0)
21582 	/* PBL pointer points to PTE table. */
21583 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_LVL_1 \
21584 		UINT32_C(0x1)
21585 	/*
21586 	 * PBL pointer points to PDE table with each entry pointing to PTE
21587 	 * tables.
21588 	 */
21589 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_LVL_2 \
21590 		UINT32_C(0x2)
21591 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_LAST \
21592 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_LVL_LVL_2
21593 	/* MR/AV page size. */
21594 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_MASK \
21595 		UINT32_C(0xf0)
21596 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_SFT   4
21597 	/* 4KB. */
21598 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_4K \
21599 		(UINT32_C(0x0) << 4)
21600 	/* 8KB. */
21601 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_8K \
21602 		(UINT32_C(0x1) << 4)
21603 	/* 64KB. */
21604 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_64K \
21605 		(UINT32_C(0x2) << 4)
21606 	/* 2MB. */
21607 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_2M \
21608 		(UINT32_C(0x3) << 4)
21609 	/* 8MB. */
21610 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_8M \
21611 		(UINT32_C(0x4) << 4)
21612 	/* 1GB. */
21613 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_1G \
21614 		(UINT32_C(0x5) << 4)
21615 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_LAST \
21616 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_MRAV_PG_SIZE_PG_1G
21617 	/* Timer page size and level. */
21618 	uint8_t	tim_pg_size_tim_lvl;
21619 	/* Timer PBL indirect levels. */
21620 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_MASK \
21621 		UINT32_C(0xf)
21622 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_SFT       0
21623 	/* PBL pointer is physical start address. */
21624 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_LVL_0 \
21625 		UINT32_C(0x0)
21626 	/* PBL pointer points to PTE table. */
21627 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_LVL_1 \
21628 		UINT32_C(0x1)
21629 	/*
21630 	 * PBL pointer points to PDE table with each entry pointing to PTE
21631 	 * tables.
21632 	 */
21633 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_LVL_2 \
21634 		UINT32_C(0x2)
21635 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_LAST \
21636 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_LVL_LVL_2
21637 	/* Timer page size. */
21638 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_MASK \
21639 		UINT32_C(0xf0)
21640 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_SFT   4
21641 	/* 4KB. */
21642 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_4K \
21643 		(UINT32_C(0x0) << 4)
21644 	/* 8KB. */
21645 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_8K \
21646 		(UINT32_C(0x1) << 4)
21647 	/* 64KB. */
21648 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_64K \
21649 		(UINT32_C(0x2) << 4)
21650 	/* 2MB. */
21651 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_2M \
21652 		(UINT32_C(0x3) << 4)
21653 	/* 8MB. */
21654 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_8M \
21655 		(UINT32_C(0x4) << 4)
21656 	/* 1GB. */
21657 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_1G \
21658 		(UINT32_C(0x5) << 4)
21659 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_LAST \
21660 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TIM_PG_SIZE_PG_1G
21661 	/* QP page directory. */
21662 	uint64_t	qpc_page_dir;
21663 	/* SRQ page directory. */
21664 	uint64_t	srq_page_dir;
21665 	/* CQ page directory. */
21666 	uint64_t	cq_page_dir;
21667 	/* VNIC page directory. */
21668 	uint64_t	vnic_page_dir;
21669 	/* Stat page directory. */
21670 	uint64_t	stat_page_dir;
21671 	/* TQM slowpath page directory. */
21672 	uint64_t	tqm_sp_page_dir;
21673 	/* TQM ring 0 page directory. */
21674 	uint64_t	tqm_ring0_page_dir;
21675 	/* TQM ring 1 page directory. */
21676 	uint64_t	tqm_ring1_page_dir;
21677 	/* TQM ring 2 page directory. */
21678 	uint64_t	tqm_ring2_page_dir;
21679 	/* TQM ring 3 page directory. */
21680 	uint64_t	tqm_ring3_page_dir;
21681 	/* TQM ring 4 page directory. */
21682 	uint64_t	tqm_ring4_page_dir;
21683 	/* TQM ring 5 page directory. */
21684 	uint64_t	tqm_ring5_page_dir;
21685 	/* TQM ring 6 page directory. */
21686 	uint64_t	tqm_ring6_page_dir;
21687 	/* TQM ring 7 page directory. */
21688 	uint64_t	tqm_ring7_page_dir;
21689 	/* MR/AV page directory. */
21690 	uint64_t	mrav_page_dir;
21691 	/* Timer page directory. */
21692 	uint64_t	tim_page_dir;
21693 	/* Number of entries to reserve for QP1 */
21694 	uint16_t	qp_num_qp1_entries;
21695 	/* Number of entries to reserve for L2 */
21696 	uint16_t	qp_num_l2_entries;
21697 	/* Number of QPs. */
21698 	uint32_t	qp_num_entries;
21699 	/* Number of SRQs. */
21700 	uint32_t	srq_num_entries;
21701 	/* Number of entries to reserve for L2 */
21702 	uint16_t	srq_num_l2_entries;
21703 	/* Number of entries to reserve for L2 */
21704 	uint16_t	cq_num_l2_entries;
21705 	/* Number of CQs. */
21706 	uint32_t	cq_num_entries;
21707 	/* Number of entries to reserve for VNIC entries */
21708 	uint16_t	vnic_num_vnic_entries;
21709 	/* Number of entries to reserve for Ring table entries */
21710 	uint16_t	vnic_num_ring_table_entries;
21711 	/* Number of Stats. */
21712 	uint32_t	stat_num_entries;
21713 	/* Number of TQM slowpath entries. */
21714 	uint32_t	tqm_sp_num_entries;
21715 	/* Number of TQM ring 0 entries. */
21716 	uint32_t	tqm_ring0_num_entries;
21717 	/* Number of TQM ring 1 entries. */
21718 	uint32_t	tqm_ring1_num_entries;
21719 	/* Number of TQM ring 2 entries. */
21720 	uint32_t	tqm_ring2_num_entries;
21721 	/* Number of TQM ring 3 entries. */
21722 	uint32_t	tqm_ring3_num_entries;
21723 	/* Number of TQM ring 4 entries. */
21724 	uint32_t	tqm_ring4_num_entries;
21725 	/* Number of TQM ring 5 entries. */
21726 	uint32_t	tqm_ring5_num_entries;
21727 	/* Number of TQM ring 6 entries. */
21728 	uint32_t	tqm_ring6_num_entries;
21729 	/* Number of TQM ring 7 entries. */
21730 	uint32_t	tqm_ring7_num_entries;
21731 	/*
21732 	 * If the MR/AV split reservation flag is not set, then this field
21733 	 * represents the total number of MR plus AV entries. For versions
21734 	 * of firmware that support the split reservation, when it is not
21735 	 * specified half of the entries will be reserved for MRs and the
21736 	 * other half for AVs.
21737 	 *
21738 	 * If the MR/AV split reservation flag is set, then this
21739 	 * field is logically divided into two 16b fields. Bits `[31:16]`
21740 	 * represents the `mr_num_entries` and bits `[15:0]` represents
21741 	 * `av_num_entries`. The granularity of these values is defined by
21742 	 * the `mrav_num_entries_unit` field returned by the
21743 	 * `backing_store_qcaps` command.
21744 	 */
21745 	uint32_t	mrav_num_entries;
21746 	/* Number of Timer entries. */
21747 	uint32_t	tim_num_entries;
21748 	/* TQM ring page size and level. */
21749 	uint8_t	tqm_ring8_pg_size_tqm_ring_lvl;
21750 	/* TQM ring PBL indirect levels. */
21751 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_MASK \
21752 		UINT32_C(0xf)
21753 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_SFT \
21754 		0
21755 	/* PBL pointer is physical start address. */
21756 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_LVL_0 \
21757 		UINT32_C(0x0)
21758 	/* PBL pointer points to PTE table. */
21759 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_LVL_1 \
21760 		UINT32_C(0x1)
21761 	/*
21762 	 * PBL pointer points to PDE table with each entry pointing to
21763 	 * PTE tables.
21764 	 */
21765 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_LVL_2 \
21766 		UINT32_C(0x2)
21767 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_LAST \
21768 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_LVL_LVL_2
21769 	/* TQM ring page size. */
21770 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_MASK \
21771 		UINT32_C(0xf0)
21772 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_SFT \
21773 		4
21774 	/* 4KB. */
21775 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_4K \
21776 		(UINT32_C(0x0) << 4)
21777 	/* 8KB. */
21778 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_8K \
21779 		(UINT32_C(0x1) << 4)
21780 	/* 64KB. */
21781 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_64K \
21782 		(UINT32_C(0x2) << 4)
21783 	/* 2MB. */
21784 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_2M \
21785 		(UINT32_C(0x3) << 4)
21786 	/* 8MB. */
21787 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_8M \
21788 		(UINT32_C(0x4) << 4)
21789 	/* 1GB. */
21790 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_1G \
21791 		(UINT32_C(0x5) << 4)
21792 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_LAST \
21793 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING8_TQM_RING_PG_SIZE_PG_1G
21794 	uint8_t	ring8_unused[3];
21795 	/* Number of TQM ring entries. */
21796 	uint32_t	tqm_ring8_num_entries;
21797 	/* TQM ring page directory. */
21798 	uint64_t	tqm_ring8_page_dir;
21799 	/* TQM ring page size and level. */
21800 	uint8_t	tqm_ring9_pg_size_tqm_ring_lvl;
21801 	/* TQM ring PBL indirect levels. */
21802 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_MASK \
21803 		UINT32_C(0xf)
21804 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_SFT \
21805 		0
21806 	/* PBL pointer is physical start address. */
21807 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_LVL_0 \
21808 		UINT32_C(0x0)
21809 	/* PBL pointer points to PTE table. */
21810 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_LVL_1 \
21811 		UINT32_C(0x1)
21812 	/*
21813 	 * PBL pointer points to PDE table with each entry pointing to
21814 	 * PTE tables.
21815 	 */
21816 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_LVL_2 \
21817 		UINT32_C(0x2)
21818 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_LAST \
21819 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_LVL_LVL_2
21820 	/* TQM ring page size. */
21821 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_MASK \
21822 		UINT32_C(0xf0)
21823 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_SFT \
21824 		4
21825 	/* 4KB. */
21826 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_4K \
21827 		(UINT32_C(0x0) << 4)
21828 	/* 8KB. */
21829 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_8K \
21830 		(UINT32_C(0x1) << 4)
21831 	/* 64KB. */
21832 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_64K \
21833 		(UINT32_C(0x2) << 4)
21834 	/* 2MB. */
21835 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_2M \
21836 		(UINT32_C(0x3) << 4)
21837 	/* 8MB. */
21838 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_8M \
21839 		(UINT32_C(0x4) << 4)
21840 	/* 1GB. */
21841 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_1G \
21842 		(UINT32_C(0x5) << 4)
21843 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_LAST \
21844 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING9_TQM_RING_PG_SIZE_PG_1G
21845 	uint8_t	ring9_unused[3];
21846 	/* Number of TQM ring entries. */
21847 	uint32_t	tqm_ring9_num_entries;
21848 	/* TQM ring page directory. */
21849 	uint64_t	tqm_ring9_page_dir;
21850 	/* TQM ring page size and level. */
21851 	uint8_t	tqm_ring10_pg_size_tqm_ring_lvl;
21852 	/* TQM ring PBL indirect levels. */
21853 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_MASK \
21854 		UINT32_C(0xf)
21855 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_SFT \
21856 		0
21857 	/* PBL pointer is physical start address. */
21858 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_LVL_0 \
21859 		UINT32_C(0x0)
21860 	/* PBL pointer points to PTE table. */
21861 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_LVL_1 \
21862 		UINT32_C(0x1)
21863 	/*
21864 	 * PBL pointer points to PDE table with each entry pointing to
21865 	 * PTE tables.
21866 	 */
21867 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_LVL_2 \
21868 		UINT32_C(0x2)
21869 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_LAST \
21870 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_LVL_LVL_2
21871 	/* TQM ring page size. */
21872 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_MASK \
21873 		UINT32_C(0xf0)
21874 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_SFT \
21875 		4
21876 	/* 4KB. */
21877 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_4K \
21878 		(UINT32_C(0x0) << 4)
21879 	/* 8KB. */
21880 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_8K \
21881 		(UINT32_C(0x1) << 4)
21882 	/* 64KB. */
21883 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_64K \
21884 		(UINT32_C(0x2) << 4)
21885 	/* 2MB. */
21886 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_2M \
21887 		(UINT32_C(0x3) << 4)
21888 	/* 8MB. */
21889 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_8M \
21890 		(UINT32_C(0x4) << 4)
21891 	/* 1GB. */
21892 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_1G \
21893 		(UINT32_C(0x5) << 4)
21894 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_LAST \
21895 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RING10_TQM_RING_PG_SIZE_PG_1G
21896 	uint8_t	ring10_unused[3];
21897 	/* Number of TQM ring entries. */
21898 	uint32_t	tqm_ring10_num_entries;
21899 	/* TQM ring page directory. */
21900 	uint64_t	tqm_ring10_page_dir;
21901 	/* Number of Tx KTLS context entries. */
21902 	uint32_t	tkc_num_entries;
21903 	/* Number of Rx KTLS context entries. */
21904 	uint32_t	rkc_num_entries;
21905 	/* Tx KTLS context page directory. */
21906 	uint64_t	tkc_page_dir;
21907 	/* Rx KTLS context page directory. */
21908 	uint64_t	rkc_page_dir;
21909 	/* Tx KTLS context page size and level. */
21910 	uint8_t	tkc_pg_size_tkc_lvl;
21911 	/* Tx KTLS context PBL indirect levels. */
21912 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_MASK \
21913 		UINT32_C(0xf)
21914 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_SFT       0
21915 	/* PBL pointer is physical start address. */
21916 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_LVL_0 \
21917 		UINT32_C(0x0)
21918 	/* PBL pointer points to PTE table. */
21919 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_LVL_1 \
21920 		UINT32_C(0x1)
21921 	/*
21922 	 * PBL pointer points to PDE table with each entry pointing to
21923 	 * PTE tables.
21924 	 */
21925 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_LVL_2 \
21926 		UINT32_C(0x2)
21927 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_LAST \
21928 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_LVL_LVL_2
21929 	/* Tx KTLS context page size. */
21930 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_MASK \
21931 		UINT32_C(0xf0)
21932 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_SFT   4
21933 	/* 4KB. */
21934 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_4K \
21935 		(UINT32_C(0x0) << 4)
21936 	/* 8KB. */
21937 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_8K \
21938 		(UINT32_C(0x1) << 4)
21939 	/* 64KB. */
21940 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_64K \
21941 		(UINT32_C(0x2) << 4)
21942 	/* 2MB. */
21943 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_2M \
21944 		(UINT32_C(0x3) << 4)
21945 	/* 8MB. */
21946 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_8M \
21947 		(UINT32_C(0x4) << 4)
21948 	/* 1GB. */
21949 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_1G \
21950 		(UINT32_C(0x5) << 4)
21951 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_LAST \
21952 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_TKC_PG_SIZE_PG_1G
21953 	/* Rx KTLS context page size and level. */
21954 	uint8_t	rkc_pg_size_rkc_lvl;
21955 	/* Rx KTLS context PBL indirect levels. */
21956 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_MASK \
21957 		UINT32_C(0xf)
21958 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_SFT       0
21959 	/* PBL pointer is physical start address. */
21960 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_LVL_0 \
21961 		UINT32_C(0x0)
21962 	/* PBL pointer points to PTE table. */
21963 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_LVL_1 \
21964 		UINT32_C(0x1)
21965 	/*
21966 	 * PBL pointer points to PDE table with each entry pointing to
21967 	 * PTE tables.
21968 	 */
21969 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_LVL_2 \
21970 		UINT32_C(0x2)
21971 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_LAST \
21972 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_LVL_LVL_2
21973 	/* Rx KTLS context page size. */
21974 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_MASK \
21975 		UINT32_C(0xf0)
21976 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_SFT   4
21977 	/* 4KB. */
21978 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_4K \
21979 		(UINT32_C(0x0) << 4)
21980 	/* 8KB. */
21981 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_8K \
21982 		(UINT32_C(0x1) << 4)
21983 	/* 64KB. */
21984 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_64K \
21985 		(UINT32_C(0x2) << 4)
21986 	/* 2MB. */
21987 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_2M \
21988 		(UINT32_C(0x3) << 4)
21989 	/* 8MB. */
21990 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_8M \
21991 		(UINT32_C(0x4) << 4)
21992 	/* 1GB. */
21993 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_1G \
21994 		(UINT32_C(0x5) << 4)
21995 	#define HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_LAST \
21996 		HWRM_FUNC_BACKING_STORE_QCFG_OUTPUT_RKC_PG_SIZE_PG_1G
21997 	/*
21998 	 * Number of RoCE QP context entries required for this
21999 	 * function to support fast QP modify destroy feature.
22000 	 */
22001 	uint16_t	qp_num_fast_qpmd_entries;
22002 	uint8_t	unused_1[3];
22003 	/*
22004 	 * This field is used in Output records to indicate that the output
22005 	 * is completely written to RAM. This field should be read as 1
22006 	 * to indicate that the output has been completely written.
22007 	 * When writing a command completion or response to an internal
22008 	 * processor, the order of writes has to be such that this field
22009 	 * is written last.
22010 	 */
22011 	uint8_t	valid;
22012 } __rte_packed_end;
22013 
22014 /****************************
22015  * hwrm_error_recovery_qcfg *
22016  ****************************/
22017 
22018 
22019 /* hwrm_error_recovery_qcfg_input (size:192b/24B) */
22020 struct __rte_packed_begin hwrm_error_recovery_qcfg_input {
22021 	/* The HWRM command request type. */
22022 	uint16_t	req_type;
22023 	/*
22024 	 * The completion ring to send the completion event on. This should
22025 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22026 	 */
22027 	uint16_t	cmpl_ring;
22028 	/*
22029 	 * The sequence ID is used by the driver for tracking multiple
22030 	 * commands. This ID is treated as opaque data by the firmware and
22031 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22032 	 */
22033 	uint16_t	seq_id;
22034 	/*
22035 	 * The target ID of the command:
22036 	 * * 0x0-0xFFF8 - The function ID
22037 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22038 	 * * 0xFFFD - Reserved for user-space HWRM interface
22039 	 * * 0xFFFF - HWRM
22040 	 */
22041 	uint16_t	target_id;
22042 	/*
22043 	 * A physical address pointer pointing to a host buffer that the
22044 	 * command's response data will be written. This can be either a host
22045 	 * physical address (HPA) or a guest physical address (GPA) and must
22046 	 * point to a physically contiguous block of memory.
22047 	 */
22048 	uint64_t	resp_addr;
22049 	uint8_t	unused_0[8];
22050 } __rte_packed_end;
22051 
22052 /* hwrm_error_recovery_qcfg_output (size:1664b/208B) */
22053 struct __rte_packed_begin hwrm_error_recovery_qcfg_output {
22054 	/* The specific error status for the command. */
22055 	uint16_t	error_code;
22056 	/* The HWRM command request type. */
22057 	uint16_t	req_type;
22058 	/* The sequence ID from the original command. */
22059 	uint16_t	seq_id;
22060 	/* The length of the response data in number of bytes. */
22061 	uint16_t	resp_len;
22062 	uint32_t	flags;
22063 	/*
22064 	 * When this flag is set to 1, error recovery will be initiated
22065 	 * through master function driver.
22066 	 */
22067 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FLAGS_HOST       UINT32_C(0x1)
22068 	/*
22069 	 * When this flag is set to 1, error recovery will be performed
22070 	 * through Co processor.
22071 	 */
22072 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FLAGS_CO_CPU     UINT32_C(0x2)
22073 	/*
22074 	 * Driver Polling frequency. This value is in units of 100msec.
22075 	 * Typical value would be 10 to indicate 1sec.
22076 	 * Drivers can poll FW health status, Heartbeat, reset_counter with
22077 	 * this frequency.
22078 	 */
22079 	uint32_t	driver_polling_freq;
22080 	/*
22081 	 * This value is in units of 100msec.
22082 	 * Typical value would be 30 to indicate 3sec.
22083 	 * Master function wait period from detecting a fatal error to
22084 	 * initiating reset. In this time period Master PF expects every
22085 	 * active driver will detect fatal error.
22086 	 */
22087 	uint32_t	master_func_wait_period;
22088 	/*
22089 	 * This value is in units of 100msec.
22090 	 * Typical value would be 50 to indicate 5sec.
22091 	 * Normal function wait period from fatal error detection to
22092 	 * polling FW health status. In this time period, drivers should not
22093 	 * do any PCIe MMIO transaction and should not send any HWRM commands.
22094 	 */
22095 	uint32_t	normal_func_wait_period;
22096 	/*
22097 	 * This value is in units of 100msec.
22098 	 * Typical value would be 20 to indicate 2sec.
22099 	 * This field indicates that, master function wait period after chip
22100 	 * reset. After this time, master function should reinitialize with
22101 	 * FW.
22102 	 */
22103 	uint32_t	master_func_wait_period_after_reset;
22104 	/*
22105 	 * This value is in units of 100msec.
22106 	 * Typical value would be 60 to indicate 6sec.
22107 	 * This field is applicable to both master and normal functions.
22108 	 * Even after chip reset, if FW status not changed to ready,
22109 	 * then all the functions can poll for this much time and bailout.
22110 	 */
22111 	uint32_t	max_bailout_time_after_reset;
22112 	/*
22113 	 * FW health status register.
22114 	 * Lower 2 bits indicates address space location and upper 30 bits
22115 	 * indicates upper 30bits of the register address.
22116 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
22117 	 */
22118 	uint32_t	fw_health_status_reg;
22119 	/* Lower 2 bits indicates address space location. */
22120 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_MASK \
22121 		UINT32_C(0x3)
22122 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_SFT \
22123 		0
22124 	/*
22125 	 * If value is 0, this register is located in PCIe config space.
22126 	 * Drivers have to map appropriate window to access this
22127 	 * register.
22128 	 */
22129 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_PCIE_CFG \
22130 		UINT32_C(0x0)
22131 	/*
22132 	 * If value is 1, this register is located in GRC address space.
22133 	 * Drivers have to map appropriate window to access this
22134 	 * register.
22135 	 */
22136 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_GRC \
22137 		UINT32_C(0x1)
22138 	/*
22139 	 * If value is 2, this register is located in first BAR address
22140 	 * space. Drivers have to map appropriate window to access this
22141 	 * register.
22142 	 */
22143 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_BAR0 \
22144 		UINT32_C(0x2)
22145 	/*
22146 	 * If value is 3, this register is located in second BAR address
22147 	 * space. Drivers have to map appropriate window to access this
22148 	 * Drivers have to map appropriate window to access this
22149 	 * register.
22150 	 */
22151 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_BAR1 \
22152 		UINT32_C(0x3)
22153 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_LAST \
22154 		HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SPACE_BAR1
22155 	/* Upper 30bits of the register address. */
22156 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_MASK \
22157 		UINT32_C(0xfffffffc)
22158 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEALTH_STATUS_REG_ADDR_SFT \
22159 		2
22160 	/*
22161 	 * FW HeartBeat register.
22162 	 * Lower 2 bits indicates address space location and upper 30 bits
22163 	 * indicates actual address.
22164 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
22165 	 */
22166 	uint32_t	fw_heartbeat_reg;
22167 	/* Lower 2 bits indicates address space location. */
22168 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_MASK \
22169 		UINT32_C(0x3)
22170 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_SFT \
22171 		0
22172 	/*
22173 	 * If value is 0, this register is located in PCIe config space.
22174 	 * Drivers have to map appropriate window to access this
22175 	 * register.
22176 	 */
22177 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_PCIE_CFG \
22178 		UINT32_C(0x0)
22179 	/*
22180 	 * If value is 1, this register is located in GRC address space.
22181 	 * Drivers have to map appropriate window to access this
22182 	 * register.
22183 	 */
22184 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_GRC \
22185 		UINT32_C(0x1)
22186 	/*
22187 	 * If value is 2, this register is located in first BAR address
22188 	 * space. Drivers have to map appropriate window to access this
22189 	 * register.
22190 	 */
22191 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_BAR0 \
22192 		UINT32_C(0x2)
22193 	/*
22194 	 * If value is 3, this register is located in second BAR address
22195 	 * space. Drivers have to map appropriate window to access this
22196 	 * register.
22197 	 */
22198 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_BAR1 \
22199 		UINT32_C(0x3)
22200 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_LAST \
22201 		HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SPACE_BAR1
22202 	/* Upper 30bits of the register address. */
22203 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_MASK \
22204 		UINT32_C(0xfffffffc)
22205 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_HEARTBEAT_REG_ADDR_SFT \
22206 		2
22207 	/*
22208 	 * FW reset counter.
22209 	 * Lower 2 bits indicates address space location and upper 30 bits
22210 	 * indicates actual address.
22211 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
22212 	 */
22213 	uint32_t	fw_reset_cnt_reg;
22214 	/* Lower 2 bits indicates address space location. */
22215 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_MASK \
22216 		UINT32_C(0x3)
22217 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_SFT \
22218 		0
22219 	/*
22220 	 * If value is 0, this register is located in PCIe config space.
22221 	 * Drivers have to map appropriate window to access this
22222 	 * register.
22223 	 */
22224 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_PCIE_CFG \
22225 		UINT32_C(0x0)
22226 	/*
22227 	 * If value is 1, this register is located in GRC address space.
22228 	 * Drivers have to map appropriate window to access this
22229 	 * register.
22230 	 */
22231 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_GRC \
22232 		UINT32_C(0x1)
22233 	/*
22234 	 * If value is 2, this register is located in first BAR address
22235 	 * space. Drivers have to map appropriate window to access this
22236 	 * register.
22237 	 */
22238 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_BAR0 \
22239 		UINT32_C(0x2)
22240 	/*
22241 	 * If value is 3, this register is located in second BAR address
22242 	 * space. Drivers have to map appropriate window to access this
22243 	 * register.
22244 	 */
22245 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_BAR1 \
22246 		UINT32_C(0x3)
22247 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_LAST \
22248 		HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SPACE_BAR1
22249 	/* Upper 30bits of the register address. */
22250 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_MASK \
22251 		UINT32_C(0xfffffffc)
22252 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_FW_RESET_CNT_REG_ADDR_SFT \
22253 		2
22254 	/*
22255 	 * Reset Inprogress Register address for PFs.
22256 	 * Lower 2 bits indicates address space location and upper 30 bits
22257 	 * indicates actual address.
22258 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
22259 	 */
22260 	uint32_t	reset_inprogress_reg;
22261 	/* Lower 2 bits indicates address space location. */
22262 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_MASK \
22263 		UINT32_C(0x3)
22264 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_SFT \
22265 		0
22266 	/*
22267 	 * If value is 0, this register is located in PCIe config space.
22268 	 * Drivers have to map appropriate window to access this
22269 	 * register.
22270 	 */
22271 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_PCIE_CFG \
22272 		UINT32_C(0x0)
22273 	/*
22274 	 * If value is 1, this register is located in GRC address space.
22275 	 * Drivers have to map appropriate window to access this
22276 	 * register.
22277 	 */
22278 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_GRC \
22279 		UINT32_C(0x1)
22280 	/*
22281 	 * If value is 2, this register is located in first BAR address
22282 	 * space. Drivers have to map appropriate window to access this
22283 	 * register.
22284 	 */
22285 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_BAR0 \
22286 		UINT32_C(0x2)
22287 	/*
22288 	 * If value is 3, this register is located in second BAR address
22289 	 * space. Drivers have to map appropriate window to access this
22290 	 * register.
22291 	 */
22292 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_BAR1 \
22293 		UINT32_C(0x3)
22294 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_LAST \
22295 		HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SPACE_BAR1
22296 	/* Upper 30bits of the register address. */
22297 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_MASK \
22298 		UINT32_C(0xfffffffc)
22299 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_INPROGRESS_REG_ADDR_SFT \
22300 		2
22301 	/* This field indicates the mask value for reset_inprogress_reg. */
22302 	uint32_t	reset_inprogress_reg_mask;
22303 	uint8_t	unused_0[3];
22304 	/*
22305 	 * Array of registers and value count to reset the Chip
22306 	 * Each array count has reset_reg, reset_reg_val, delay_after_reset
22307 	 * in TLV format. Depending upon Chip type, number of reset registers
22308 	 * will vary. Drivers have to write reset_reg_val in the reset_reg
22309 	 * location in the same sequence in order to recover from a fatal
22310 	 * error.
22311 	 */
22312 	uint8_t	reg_array_cnt;
22313 	/*
22314 	 * Reset register.
22315 	 * Lower 2 bits indicates address space location and upper 30 bits
22316 	 * indicates actual address.
22317 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
22318 	 */
22319 	uint32_t	reset_reg[16];
22320 	/* Lower 2 bits indicates address space location. */
22321 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_MASK \
22322 		UINT32_C(0x3)
22323 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_SFT     0
22324 	/*
22325 	 * If value is 0, this register is located in PCIe config space.
22326 	 * Drivers have to map appropriate window to access this
22327 	 * register.
22328 	 */
22329 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_PCIE_CFG \
22330 		UINT32_C(0x0)
22331 	/*
22332 	 * If value is 1, this register is located in GRC address space.
22333 	 * Drivers have to map appropriate window to access this
22334 	 * register.
22335 	 */
22336 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_GRC \
22337 		UINT32_C(0x1)
22338 	/*
22339 	 * If value is 2, this register is located in first BAR address
22340 	 * space. Drivers have to map appropriate window to access this
22341 	 * register.
22342 	 */
22343 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_BAR0 \
22344 		UINT32_C(0x2)
22345 	/*
22346 	 * If value is 3, this register is located in second BAR address
22347 	 * space. Drivers have to map appropriate window to access this
22348 	 * register.
22349 	 */
22350 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_BAR1 \
22351 		UINT32_C(0x3)
22352 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_LAST \
22353 		HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SPACE_BAR1
22354 	/* Upper 30bits of the register address. */
22355 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_MASK \
22356 		UINT32_C(0xfffffffc)
22357 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_RESET_REG_ADDR_SFT           2
22358 	/* Value to be written in reset_reg to reset the controller. */
22359 	uint32_t	reset_reg_val[16];
22360 	/*
22361 	 * This value is in units of 1msec.
22362 	 * Typical value would be 10 to indicate 10msec.
22363 	 * Some of the operations like Core reset require delay before
22364 	 * accessing PCIE MMIO register space.
22365 	 * If this value is non-zero, drivers have to wait for
22366 	 * this much time after writing reset_reg_val in reset_reg.
22367 	 */
22368 	uint8_t	delay_after_reset[16];
22369 	/*
22370 	 * Error recovery counter.
22371 	 * Lower 2 bits indicates address space location and upper 30 bits
22372 	 * indicates actual address.
22373 	 * A value of 0xFFFF-FFFF indicates this register does not exist.
22374 	 */
22375 	uint32_t	err_recovery_cnt_reg;
22376 	/* Lower 2 bits indicates address space location. */
22377 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_MASK \
22378 		UINT32_C(0x3)
22379 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_SFT \
22380 		0
22381 	/*
22382 	 * If value is 0, this register is located in PCIe config space.
22383 	 * Drivers have to map appropriate window to access this
22384 	 * register.
22385 	 */
22386 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_PCIE_CFG \
22387 		UINT32_C(0x0)
22388 	/*
22389 	 * If value is 1, this register is located in GRC address space.
22390 	 * Drivers have to map appropriate window to access this
22391 	 * register.
22392 	 */
22393 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_GRC \
22394 		UINT32_C(0x1)
22395 	/*
22396 	 * If value is 2, this register is located in first BAR address
22397 	 * space. Drivers have to map appropriate window to access this
22398 	 * register.
22399 	 */
22400 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_BAR0 \
22401 		UINT32_C(0x2)
22402 	/*
22403 	 * If value is 3, this register is located in second BAR address
22404 	 * space. Drivers have to map appropriate window to access this
22405 	 * register.
22406 	 */
22407 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_BAR1 \
22408 		UINT32_C(0x3)
22409 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_LAST \
22410 		HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SPACE_BAR1
22411 	/* Upper 30bits of the register address. */
22412 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_MASK \
22413 		UINT32_C(0xfffffffc)
22414 	#define HWRM_ERROR_RECOVERY_QCFG_OUTPUT_ERR_RECOVERY_CNT_REG_ADDR_SFT \
22415 		2
22416 	uint8_t	unused_1[3];
22417 	/*
22418 	 * This field is used in Output records to indicate that the output
22419 	 * is completely written to RAM. This field should be read as '1'
22420 	 * to indicate that the output has been completely written.
22421 	 * When writing a command completion or response to an internal
22422 	 * processor, the order of writes has to be such that this field
22423 	 * is written last.
22424 	 */
22425 	uint8_t	valid;
22426 } __rte_packed_end;
22427 
22428 /***************************
22429  * hwrm_func_echo_response *
22430  ***************************/
22431 
22432 
22433 /* hwrm_func_echo_response_input (size:192b/24B) */
22434 struct __rte_packed_begin hwrm_func_echo_response_input {
22435 	/* The HWRM command request type. */
22436 	uint16_t	req_type;
22437 	/*
22438 	 * The completion ring to send the completion event on. This should
22439 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22440 	 */
22441 	uint16_t	cmpl_ring;
22442 	/*
22443 	 * The sequence ID is used by the driver for tracking multiple
22444 	 * commands. This ID is treated as opaque data by the firmware and
22445 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22446 	 */
22447 	uint16_t	seq_id;
22448 	/*
22449 	 * The target ID of the command:
22450 	 * * 0x0-0xFFF8 - The function ID
22451 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22452 	 * * 0xFFFD - Reserved for user-space HWRM interface
22453 	 * * 0xFFFF - HWRM
22454 	 */
22455 	uint16_t	target_id;
22456 	/*
22457 	 * A physical address pointer pointing to a host buffer that the
22458 	 * command's response data will be written. This can be either a host
22459 	 * physical address (HPA) or a guest physical address (GPA) and must
22460 	 * point to a physically contiguous block of memory.
22461 	 */
22462 	uint64_t	resp_addr;
22463 	uint32_t	event_data1;
22464 	uint32_t	event_data2;
22465 } __rte_packed_end;
22466 
22467 /* hwrm_func_echo_response_output (size:128b/16B) */
22468 struct __rte_packed_begin hwrm_func_echo_response_output {
22469 	/* The specific error status for the command. */
22470 	uint16_t	error_code;
22471 	/* The HWRM command request type. */
22472 	uint16_t	req_type;
22473 	/* The sequence ID from the original command. */
22474 	uint16_t	seq_id;
22475 	/* The length of the response data in number of bytes. */
22476 	uint16_t	resp_len;
22477 	uint8_t	unused_0[7];
22478 	/*
22479 	 * This field is used in Output records to indicate that the output
22480 	 * is completely written to RAM. This field should be read as '1'
22481 	 * to indicate that the output has been completely written. When
22482 	 * writing a command completion or response to an internal processor,
22483 	 * the order of writes has to be such that this field is written last.
22484 	 */
22485 	uint8_t	valid;
22486 } __rte_packed_end;
22487 
22488 /**************************
22489  * hwrm_func_ptp_pin_qcfg *
22490  **************************/
22491 
22492 
22493 /* hwrm_func_ptp_pin_qcfg_input (size:192b/24B) */
22494 struct __rte_packed_begin hwrm_func_ptp_pin_qcfg_input {
22495 	/* The HWRM command request type. */
22496 	uint16_t	req_type;
22497 	/*
22498 	 * The completion ring to send the completion event on. This should
22499 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22500 	 */
22501 	uint16_t	cmpl_ring;
22502 	/*
22503 	 * The sequence ID is used by the driver for tracking multiple
22504 	 * commands. This ID is treated as opaque data by the firmware and
22505 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22506 	 */
22507 	uint16_t	seq_id;
22508 	/*
22509 	 * The target ID of the command:
22510 	 * * 0x0-0xFFF8 - The function ID
22511 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22512 	 * * 0xFFFD - Reserved for user-space HWRM interface
22513 	 * * 0xFFFF - HWRM
22514 	 */
22515 	uint16_t	target_id;
22516 	/*
22517 	 * A physical address pointer pointing to a host buffer that the
22518 	 * command's response data will be written. This can be either a host
22519 	 * physical address (HPA) or a guest physical address (GPA) and must
22520 	 * point to a physically contiguous block of memory.
22521 	 */
22522 	uint64_t	resp_addr;
22523 	uint8_t	unused_0[8];
22524 } __rte_packed_end;
22525 
22526 /* hwrm_func_ptp_pin_qcfg_output (size:128b/16B) */
22527 struct __rte_packed_begin hwrm_func_ptp_pin_qcfg_output {
22528 	/* The specific error status for the command. */
22529 	uint16_t	error_code;
22530 	/* The HWRM command request type. */
22531 	uint16_t	req_type;
22532 	/* The sequence ID from the original command. */
22533 	uint16_t	seq_id;
22534 	/* The length of the response data in number of bytes. */
22535 	uint16_t	resp_len;
22536 	/*
22537 	 * The number of TSIO pins that are configured on this board
22538 	 * Up to 4 pins can be returned in the response.
22539 	 */
22540 	uint8_t	num_pins;
22541 	/* Pin state */
22542 	uint8_t	state;
22543 	/*
22544 	 * When this bit is '1', TSIO pin 0 is enabled.
22545 	 * When this bit is '0', TSIO pin 0 is disabled.
22546 	 */
22547 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_STATE_PIN0_ENABLED \
22548 		UINT32_C(0x1)
22549 	/*
22550 	 * When this bit is '1', TSIO pin 1 is enabled.
22551 	 * When this bit is '0', TSIO pin 1 is disabled.
22552 	 */
22553 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_STATE_PIN1_ENABLED \
22554 		UINT32_C(0x2)
22555 	/*
22556 	 * When this bit is '1', TSIO pin 2 is enabled.
22557 	 * When this bit is '0', TSIO pin 2 is disabled.
22558 	 */
22559 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_STATE_PIN2_ENABLED \
22560 		UINT32_C(0x4)
22561 	/*
22562 	 * When this bit is '1', TSIO pin 3 is enabled.
22563 	 * When this bit is '0', TSIO pin 3 is disabled.
22564 	 */
22565 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_STATE_PIN3_ENABLED \
22566 		UINT32_C(0x8)
22567 	/* Type of function for Pin #0. */
22568 	uint8_t	pin0_usage;
22569 	/* No function is configured. */
22570 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_NONE     UINT32_C(0x0)
22571 	/* PPS IN is configured. */
22572 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_PPS_IN   UINT32_C(0x1)
22573 	/* PPS OUT is configured. */
22574 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_PPS_OUT  UINT32_C(0x2)
22575 	/* SYNC IN is configured. */
22576 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_SYNC_IN  UINT32_C(0x3)
22577 	/* SYNC OUT is configured. */
22578 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_SYNC_OUT UINT32_C(0x4)
22579 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_LAST \
22580 		HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN0_USAGE_SYNC_OUT
22581 	/* Type of function for Pin #1. */
22582 	uint8_t	pin1_usage;
22583 	/* No function is configured. */
22584 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_NONE     UINT32_C(0x0)
22585 	/* PPS IN is configured. */
22586 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_PPS_IN   UINT32_C(0x1)
22587 	/* PPS OUT is configured. */
22588 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_PPS_OUT  UINT32_C(0x2)
22589 	/* SYNC IN is configured. */
22590 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_SYNC_IN  UINT32_C(0x3)
22591 	/* SYNC OUT is configured. */
22592 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_SYNC_OUT UINT32_C(0x4)
22593 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_LAST \
22594 		HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN1_USAGE_SYNC_OUT
22595 	/* Type of function for Pin #2. */
22596 	uint8_t	pin2_usage;
22597 	/* No function is configured. */
22598 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_NONE \
22599 		UINT32_C(0x0)
22600 	/* PPS IN is configured. */
22601 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_PPS_IN \
22602 		UINT32_C(0x1)
22603 	/* PPS OUT is configured. */
22604 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_PPS_OUT \
22605 		UINT32_C(0x2)
22606 	/* SYNC IN is configured. */
22607 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNC_IN \
22608 		UINT32_C(0x3)
22609 	/* SYNC OUT is configured. */
22610 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNC_OUT \
22611 		UINT32_C(0x4)
22612 	/* SYNCE primary clock OUT is configured. */
22613 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNCE_PRIMARY_CLOCK_OUT \
22614 		UINT32_C(0x5)
22615 	/* SYNCE secondary clock OUT is configured. */
22616 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT \
22617 		UINT32_C(0x6)
22618 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_LAST \
22619 		HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT
22620 	/* Type of function for Pin #3. */
22621 	uint8_t	pin3_usage;
22622 	/* No function is configured. */
22623 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_NONE \
22624 		UINT32_C(0x0)
22625 	/* PPS IN is configured. */
22626 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_PPS_IN \
22627 		UINT32_C(0x1)
22628 	/* PPS OUT is configured. */
22629 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_PPS_OUT \
22630 		UINT32_C(0x2)
22631 	/* SYNC IN is configured. */
22632 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNC_IN \
22633 		UINT32_C(0x3)
22634 	/* SYNC OUT is configured. */
22635 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNC_OUT \
22636 		UINT32_C(0x4)
22637 	/* SYNCE primary clock OUT is configured. */
22638 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNCE_PRIMARY_CLOCK_OUT \
22639 		UINT32_C(0x5)
22640 	/* SYNCE secondary OUT is configured. */
22641 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUT \
22642 		UINT32_C(0x6)
22643 	#define HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_LAST \
22644 		HWRM_FUNC_PTP_PIN_QCFG_OUTPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUT
22645 	uint8_t	unused_0;
22646 	/*
22647 	 * This field is used in Output records to indicate that the output
22648 	 * is completely written to RAM. This field should be read as '1'
22649 	 * to indicate that the output has been completely written. When
22650 	 * writing a command completion or response to an internal processor,
22651 	 * the order of writes has to be such that this field is written last.
22652 	 */
22653 	uint8_t	valid;
22654 } __rte_packed_end;
22655 
22656 /*************************
22657  * hwrm_func_ptp_pin_cfg *
22658  *************************/
22659 
22660 
22661 /* hwrm_func_ptp_pin_cfg_input (size:256b/32B) */
22662 struct __rte_packed_begin hwrm_func_ptp_pin_cfg_input {
22663 	/* The HWRM command request type. */
22664 	uint16_t	req_type;
22665 	/*
22666 	 * The completion ring to send the completion event on. This should
22667 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22668 	 */
22669 	uint16_t	cmpl_ring;
22670 	/*
22671 	 * The sequence ID is used by the driver for tracking multiple
22672 	 * commands. This ID is treated as opaque data by the firmware and
22673 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22674 	 */
22675 	uint16_t	seq_id;
22676 	/*
22677 	 * The target ID of the command:
22678 	 * * 0x0-0xFFF8 - The function ID
22679 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22680 	 * * 0xFFFD - Reserved for user-space HWRM interface
22681 	 * * 0xFFFF - HWRM
22682 	 */
22683 	uint16_t	target_id;
22684 	/*
22685 	 * A physical address pointer pointing to a host buffer that the
22686 	 * command's response data will be written. This can be either a host
22687 	 * physical address (HPA) or a guest physical address (GPA) and must
22688 	 * point to a physically contiguous block of memory.
22689 	 */
22690 	uint64_t	resp_addr;
22691 	uint32_t	enables;
22692 	/*
22693 	 * This bit must be '1' for the pin0_state field to be
22694 	 * configured.
22695 	 */
22696 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN0_STATE \
22697 		UINT32_C(0x1)
22698 	/*
22699 	 * This bit must be '1' for the pin0_usage field to be
22700 	 * configured.
22701 	 */
22702 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN0_USAGE \
22703 		UINT32_C(0x2)
22704 	/*
22705 	 * This bit must be '1' for the pin1_state field to be
22706 	 * configured.
22707 	 */
22708 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN1_STATE \
22709 		UINT32_C(0x4)
22710 	/*
22711 	 * This bit must be '1' for the pin1_usage field to be
22712 	 * configured.
22713 	 */
22714 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN1_USAGE \
22715 		UINT32_C(0x8)
22716 	/*
22717 	 * This bit must be '1' for the pin2_state field to be
22718 	 * configured.
22719 	 */
22720 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN2_STATE \
22721 		UINT32_C(0x10)
22722 	/*
22723 	 * This bit must be '1' for the pin2_usage field to be
22724 	 * configured.
22725 	 */
22726 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN2_USAGE \
22727 		UINT32_C(0x20)
22728 	/*
22729 	 * This bit must be '1' for the pin3_state field to be
22730 	 * configured.
22731 	 */
22732 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN3_STATE \
22733 		UINT32_C(0x40)
22734 	/*
22735 	 * This bit must be '1' for the pin3_usage field to be
22736 	 * configured.
22737 	 */
22738 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_ENABLES_PIN3_USAGE \
22739 		UINT32_C(0x80)
22740 	/* Enable or disable functionality of Pin #0. */
22741 	uint8_t	pin0_state;
22742 	/* Disabled */
22743 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_STATE_DISABLED UINT32_C(0x0)
22744 	/* Enabled */
22745 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_STATE_ENABLED  UINT32_C(0x1)
22746 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_STATE_LAST \
22747 		HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_STATE_ENABLED
22748 	/* Configure function for TSIO pin#0. */
22749 	uint8_t	pin0_usage;
22750 	/* No function is configured. */
22751 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_NONE     UINT32_C(0x0)
22752 	/* PPS IN is configured. */
22753 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_PPS_IN   UINT32_C(0x1)
22754 	/* PPS OUT is configured. */
22755 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_PPS_OUT  UINT32_C(0x2)
22756 	/* SYNC IN is configured. */
22757 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_SYNC_IN  UINT32_C(0x3)
22758 	/* SYNC OUT is configured. */
22759 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_SYNC_OUT UINT32_C(0x4)
22760 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_LAST \
22761 		HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN0_USAGE_SYNC_OUT
22762 	/* Enable or disable functionality of Pin #1. */
22763 	uint8_t	pin1_state;
22764 	/* Disabled */
22765 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_STATE_DISABLED UINT32_C(0x0)
22766 	/* Enabled */
22767 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_STATE_ENABLED  UINT32_C(0x1)
22768 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_STATE_LAST \
22769 		HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_STATE_ENABLED
22770 	/* Configure function for TSIO pin#1. */
22771 	uint8_t	pin1_usage;
22772 	/* No function is configured. */
22773 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_NONE     UINT32_C(0x0)
22774 	/* PPS IN is configured. */
22775 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_PPS_IN   UINT32_C(0x1)
22776 	/* PPS OUT is configured. */
22777 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_PPS_OUT  UINT32_C(0x2)
22778 	/* SYNC IN is configured. */
22779 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_SYNC_IN  UINT32_C(0x3)
22780 	/* SYNC OUT is configured. */
22781 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_SYNC_OUT UINT32_C(0x4)
22782 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_LAST \
22783 		HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN1_USAGE_SYNC_OUT
22784 	/* Enable or disable functionality of Pin #2. */
22785 	uint8_t	pin2_state;
22786 	/* Disabled */
22787 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_STATE_DISABLED UINT32_C(0x0)
22788 	/* Enabled */
22789 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_STATE_ENABLED  UINT32_C(0x1)
22790 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_STATE_LAST \
22791 		HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_STATE_ENABLED
22792 	/* Configure function for TSIO pin#2. */
22793 	uint8_t	pin2_usage;
22794 	/* No function is configured. */
22795 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_NONE \
22796 		UINT32_C(0x0)
22797 	/* PPS IN is configured. */
22798 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_PPS_IN \
22799 		UINT32_C(0x1)
22800 	/* PPS OUT is configured. */
22801 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_PPS_OUT \
22802 		UINT32_C(0x2)
22803 	/* SYNC IN is configured. */
22804 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNC_IN \
22805 		UINT32_C(0x3)
22806 	/* SYNC OUT is configured. */
22807 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNC_OUT \
22808 		UINT32_C(0x4)
22809 	/* SYNCE primary clock OUT is configured. */
22810 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNCE_PRIMARY_CLOCK_OUT \
22811 		UINT32_C(0x5)
22812 	/* SYNCE secondary clock OUT is configured. */
22813 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT \
22814 		UINT32_C(0x6)
22815 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_LAST \
22816 		HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN2_USAGE_SYNCE_SECONDARY_CLOCK_OUT
22817 	/* Enable or disable functionality of Pin #3. */
22818 	uint8_t	pin3_state;
22819 	/* Disabled */
22820 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_STATE_DISABLED UINT32_C(0x0)
22821 	/* Enabled */
22822 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_STATE_ENABLED  UINT32_C(0x1)
22823 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_STATE_LAST \
22824 		HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_STATE_ENABLED
22825 	/* Configure function for TSIO pin#3. */
22826 	uint8_t	pin3_usage;
22827 	/* No function is configured. */
22828 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_NONE \
22829 		UINT32_C(0x0)
22830 	/* PPS IN is configured. */
22831 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_PPS_IN \
22832 		UINT32_C(0x1)
22833 	/* PPS OUT is configured. */
22834 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_PPS_OUT \
22835 		UINT32_C(0x2)
22836 	/* SYNC IN is configured. */
22837 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNC_IN \
22838 		UINT32_C(0x3)
22839 	/* SYNC OUT is configured. */
22840 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNC_OUT \
22841 		UINT32_C(0x4)
22842 	/* SYNCE primary clock OUT is configured. */
22843 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNCE_PRIMARY_CLOCK_OUT \
22844 		UINT32_C(0x5)
22845 	/* SYNCE secondary clock OUT is configured. */
22846 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUT \
22847 		UINT32_C(0x6)
22848 	#define HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_LAST \
22849 		HWRM_FUNC_PTP_PIN_CFG_INPUT_PIN3_USAGE_SYNCE_SECONDARY_CLOCK_OUT
22850 	uint8_t	unused_0[4];
22851 } __rte_packed_end;
22852 
22853 /* hwrm_func_ptp_pin_cfg_output (size:128b/16B) */
22854 struct __rte_packed_begin hwrm_func_ptp_pin_cfg_output {
22855 	/* The specific error status for the command. */
22856 	uint16_t	error_code;
22857 	/* The HWRM command request type. */
22858 	uint16_t	req_type;
22859 	/* The sequence ID from the original command. */
22860 	uint16_t	seq_id;
22861 	/* The length of the response data in number of bytes. */
22862 	uint16_t	resp_len;
22863 	uint8_t	unused_0[7];
22864 	/*
22865 	 * This field is used in Output records to indicate that the output
22866 	 * is completely written to RAM. This field should be read as '1'
22867 	 * to indicate that the output has been completely written. When
22868 	 * writing a command completion or response to an internal processor,
22869 	 * the order of writes has to be such that this field is written last.
22870 	 */
22871 	uint8_t	valid;
22872 } __rte_packed_end;
22873 
22874 /*********************
22875  * hwrm_func_ptp_cfg *
22876  *********************/
22877 
22878 
22879 /* hwrm_func_ptp_cfg_input (size:384b/48B) */
22880 struct __rte_packed_begin hwrm_func_ptp_cfg_input {
22881 	/* The HWRM command request type. */
22882 	uint16_t	req_type;
22883 	/*
22884 	 * The completion ring to send the completion event on. This should
22885 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
22886 	 */
22887 	uint16_t	cmpl_ring;
22888 	/*
22889 	 * The sequence ID is used by the driver for tracking multiple
22890 	 * commands. This ID is treated as opaque data by the firmware and
22891 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
22892 	 */
22893 	uint16_t	seq_id;
22894 	/*
22895 	 * The target ID of the command:
22896 	 * * 0x0-0xFFF8 - The function ID
22897 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
22898 	 * * 0xFFFD - Reserved for user-space HWRM interface
22899 	 * * 0xFFFF - HWRM
22900 	 */
22901 	uint16_t	target_id;
22902 	/*
22903 	 * A physical address pointer pointing to a host buffer that the
22904 	 * command's response data will be written. This can be either a host
22905 	 * physical address (HPA) or a guest physical address (GPA) and must
22906 	 * point to a physically contiguous block of memory.
22907 	 */
22908 	uint64_t	resp_addr;
22909 	uint16_t	enables;
22910 	/*
22911 	 * This bit must be '1' for the ptp_pps_event field to be
22912 	 * configured.
22913 	 */
22914 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_PPS_EVENT \
22915 		UINT32_C(0x1)
22916 	/*
22917 	 * This bit must be '1' for the ptp_freq_adj_dll_source field to be
22918 	 * configured.
22919 	 */
22920 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_DLL_SOURCE \
22921 		UINT32_C(0x2)
22922 	/*
22923 	 * This bit must be '1' for the ptp_freq_adj_dll_phase field to be
22924 	 * configured.
22925 	 */
22926 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_DLL_PHASE \
22927 		UINT32_C(0x4)
22928 	/*
22929 	 * This bit must be '1' for the ptp_freq_adj_ext_period field to be
22930 	 * configured.
22931 	 */
22932 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_EXT_PERIOD \
22933 		UINT32_C(0x8)
22934 	/*
22935 	 * This bit must be '1' for the ptp_freq_adj_ext_up field to be
22936 	 * configured.
22937 	 */
22938 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_EXT_UP \
22939 		UINT32_C(0x10)
22940 	/*
22941 	 * This bit must be '1' for the ptp_freq_adj_ext_phase field to be
22942 	 * configured.
22943 	 */
22944 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_EXT_PHASE \
22945 		UINT32_C(0x20)
22946 	/* This bit must be '1' for ptp_set_time field to be configured. */
22947 	#define HWRM_FUNC_PTP_CFG_INPUT_ENABLES_PTP_SET_TIME \
22948 		UINT32_C(0x40)
22949 	/* This field is used to enable interrupt for a specific PPS event. */
22950 	uint8_t	ptp_pps_event;
22951 	/*
22952 	 * When this bit is set to '1', interrupt is enabled for internal
22953 	 * PPS event. Latches timestamp on PPS_OUT TSIO Pin. If user does
22954 	 * not configure PPS_OUT on a TSIO pin, then firmware will allocate
22955 	 * PPS_OUT to an unallocated pin.
22956 	 */
22957 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_PPS_EVENT_INTERNAL \
22958 		UINT32_C(0x1)
22959 	/*
22960 	 * When this bit is set to '1', interrupt is enabled for external
22961 	 * PPS event. Latches timestamp on PPS_IN TSIO pin.
22962 	 */
22963 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_PPS_EVENT_EXTERNAL \
22964 		UINT32_C(0x2)
22965 	/*
22966 	 * This field is used to set the source signal used to discipline
22967 	 * PHC (PTP Hardware Clock)
22968 	 */
22969 	uint8_t	ptp_freq_adj_dll_source;
22970 	/* No source is selected. Use servo to discipline PHC */
22971 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_NONE \
22972 		UINT32_C(0x0)
22973 	/* TSIO Pin #0 is selected as source signal. */
22974 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_TSIO_0 \
22975 		UINT32_C(0x1)
22976 	/* TSIO Pin #1 is selected as source signal. */
22977 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_TSIO_1 \
22978 		UINT32_C(0x2)
22979 	/* TSIO Pin #2 is selected as source signal. */
22980 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_TSIO_2 \
22981 		UINT32_C(0x3)
22982 	/* TSIO Pin #3 is selected as source signal. */
22983 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_TSIO_3 \
22984 		UINT32_C(0x4)
22985 	/* Port #0 is selected as source signal. */
22986 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_PORT_0 \
22987 		UINT32_C(0x5)
22988 	/* Port #1 is selected as source signal. */
22989 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_PORT_1 \
22990 		UINT32_C(0x6)
22991 	/* Port #2 is selected as source signal. */
22992 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_PORT_2 \
22993 		UINT32_C(0x7)
22994 	/* Port #3 is selected as source signal. */
22995 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_PORT_3 \
22996 		UINT32_C(0x8)
22997 	/* Invalid signal. */
22998 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_INVALID \
22999 		UINT32_C(0xff)
23000 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_LAST \
23001 		HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_SOURCE_INVALID
23002 	/*
23003 	 * This field is used to provide phase adjustment for DLL
23004 	 * used to discipline PHC (PTP Hardware clock)
23005 	 */
23006 	uint8_t	ptp_freq_adj_dll_phase;
23007 	/* No Phase adjustment. */
23008 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_NONE \
23009 		UINT32_C(0x0)
23010 	/* 4Khz sync in frequency. */
23011 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_4K \
23012 		UINT32_C(0x1)
23013 	/* 8Khz sync in frequency. */
23014 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_8K \
23015 		UINT32_C(0x2)
23016 	/* 10Mhz sync in frequency. */
23017 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_10M \
23018 		UINT32_C(0x3)
23019 	/* 25Mhz sync in frequency. */
23020 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_25M \
23021 		UINT32_C(0x4)
23022 	#define HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_LAST \
23023 		HWRM_FUNC_PTP_CFG_INPUT_PTP_FREQ_ADJ_DLL_PHASE_25M
23024 	uint8_t	unused_0[3];
23025 	/*
23026 	 * Period in nanoseconds (ns) for external signal
23027 	 * input.
23028 	 */
23029 	uint32_t	ptp_freq_adj_ext_period;
23030 	/*
23031 	 * Up time in nanoseconds (ns) of the duty cycle
23032 	 * of the external signal. This value should be
23033 	 * less than ptp_freq_adj_ext_period.
23034 	 */
23035 	uint32_t	ptp_freq_adj_ext_up;
23036 	/*
23037 	 * Phase value is provided. This field provides the
23038 	 * least significant 32 bits of the phase input. The
23039 	 * most significant 16 bits come from
23040 	 * ptp_freq_adj_ext_phase_upper field. Setting this
23041 	 * field requires setting ptp_freq_adj_ext_period
23042 	 * field as well to identify the external signal
23043 	 * pin.
23044 	 */
23045 	uint32_t	ptp_freq_adj_ext_phase_lower;
23046 	/*
23047 	 * Phase value is provided. The lower 16 bits of this field is used
23048 	 * with the 32 bit value from ptp_freq_adj_ext_phase_lower
23049 	 * to provide a 48 bit value input for Phase.
23050 	 */
23051 	uint32_t	ptp_freq_adj_ext_phase_upper;
23052 	/*
23053 	 * Allows driver to set the full 64bit time in FW. The upper 16 bits
23054 	 * will be stored in FW and the lower 48bits will be programmed in
23055 	 * PHC. Firmware will send a broadcast async event to all functions
23056 	 * to indicate the programmed upper 16 bits.
23057 	 */
23058 	uint64_t	ptp_set_time;
23059 } __rte_packed_end;
23060 
23061 /* hwrm_func_ptp_cfg_output (size:128b/16B) */
23062 struct __rte_packed_begin hwrm_func_ptp_cfg_output {
23063 	/* The specific error status for the command. */
23064 	uint16_t	error_code;
23065 	/* The HWRM command request type. */
23066 	uint16_t	req_type;
23067 	/* The sequence ID from the original command. */
23068 	uint16_t	seq_id;
23069 	/* The length of the response data in number of bytes. */
23070 	uint16_t	resp_len;
23071 	uint8_t	unused_0[7];
23072 	/*
23073 	 * This field is used in Output records to indicate that the output
23074 	 * is completely written to RAM. This field should be read as '1'
23075 	 * to indicate that the output has been completely written. When
23076 	 * writing a command completion or response to an internal processor,
23077 	 * the order of writes has to be such that this field is written last.
23078 	 */
23079 	uint8_t	valid;
23080 } __rte_packed_end;
23081 
23082 /**************************
23083  * hwrm_func_ptp_ts_query *
23084  **************************/
23085 
23086 
23087 /* hwrm_func_ptp_ts_query_input (size:192b/24B) */
23088 struct __rte_packed_begin hwrm_func_ptp_ts_query_input {
23089 	/* The HWRM command request type. */
23090 	uint16_t	req_type;
23091 	/*
23092 	 * The completion ring to send the completion event on. This should
23093 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23094 	 */
23095 	uint16_t	cmpl_ring;
23096 	/*
23097 	 * The sequence ID is used by the driver for tracking multiple
23098 	 * commands. This ID is treated as opaque data by the firmware and
23099 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23100 	 */
23101 	uint16_t	seq_id;
23102 	/*
23103 	 * The target ID of the command:
23104 	 * * 0x0-0xFFF8 - The function ID
23105 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23106 	 * * 0xFFFD - Reserved for user-space HWRM interface
23107 	 * * 0xFFFF - HWRM
23108 	 */
23109 	uint16_t	target_id;
23110 	/*
23111 	 * A physical address pointer pointing to a host buffer that the
23112 	 * command's response data will be written. This can be either a host
23113 	 * physical address (HPA) or a guest physical address (GPA) and must
23114 	 * point to a physically contiguous block of memory.
23115 	 */
23116 	uint64_t	resp_addr;
23117 	uint32_t	flags;
23118 	/* If set, the response includes PPS event timestamps */
23119 	#define HWRM_FUNC_PTP_TS_QUERY_INPUT_FLAGS_PPS_TIME     UINT32_C(0x1)
23120 	/* If set, the response includes PTM timestamps */
23121 	#define HWRM_FUNC_PTP_TS_QUERY_INPUT_FLAGS_PTM_TIME     UINT32_C(0x2)
23122 	uint8_t	unused_0[4];
23123 } __rte_packed_end;
23124 
23125 /* hwrm_func_ptp_ts_query_output (size:320b/40B) */
23126 struct __rte_packed_begin hwrm_func_ptp_ts_query_output {
23127 	/* The specific error status for the command. */
23128 	uint16_t	error_code;
23129 	/* The HWRM command request type. */
23130 	uint16_t	req_type;
23131 	/* The sequence ID from the original command. */
23132 	uint16_t	seq_id;
23133 	/* The length of the response data in number of bytes. */
23134 	uint16_t	resp_len;
23135 	/* Timestamp value of last PPS event latched. */
23136 	uint64_t	pps_event_ts;
23137 	/*
23138 	 * PHC timestamp value when PTM responseD request is received
23139 	 * at downstream port (t4'). This is a 48 bit timestamp in nanoseconds.
23140 	 */
23141 	uint64_t	ptm_local_ts;
23142 	/*
23143 	 * PTM System timestamp value corresponding to t4' at
23144 	 * root complex (T4'). Together with ptm_local_ts, these
23145 	 * two timestamps provide the cross-trigger timestamps.
23146 	 * Driver can directly use these values for cross-trigger.
23147 	 * This is a 48 bit timestamp in nanoseconds.
23148 	 */
23149 	uint64_t	ptm_system_ts;
23150 	/*
23151 	 * PTM Link delay. This is the time taken at root complex (RC)
23152 	 * between receiving PTM request and sending PTM response to
23153 	 * downstream port. This is a 32 bit value in nanoseconds.
23154 	 */
23155 	uint32_t	ptm_link_delay;
23156 	uint8_t	unused_0[3];
23157 	/*
23158 	 * This field is used in Output records to indicate that the output
23159 	 * is completely written to RAM. This field should be read as '1'
23160 	 * to indicate that the output has been completely written. When
23161 	 * writing a command completion or response to an internal processor,
23162 	 * the order of writes has to be such that this field is written last.
23163 	 */
23164 	uint8_t	valid;
23165 } __rte_packed_end;
23166 
23167 /*************************
23168  * hwrm_func_ptp_ext_cfg *
23169  *************************/
23170 
23171 
23172 /* hwrm_func_ptp_ext_cfg_input (size:256b/32B) */
23173 struct __rte_packed_begin hwrm_func_ptp_ext_cfg_input {
23174 	/* The HWRM command request type. */
23175 	uint16_t	req_type;
23176 	/*
23177 	 * The completion ring to send the completion event on. This should
23178 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23179 	 */
23180 	uint16_t	cmpl_ring;
23181 	/*
23182 	 * The sequence ID is used by the driver for tracking multiple
23183 	 * commands. This ID is treated as opaque data by the firmware and
23184 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23185 	 */
23186 	uint16_t	seq_id;
23187 	/*
23188 	 * The target ID of the command:
23189 	 * * 0x0-0xFFF8 - The function ID
23190 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23191 	 * * 0xFFFD - Reserved for user-space HWRM interface
23192 	 * * 0xFFFF - HWRM
23193 	 */
23194 	uint16_t	target_id;
23195 	/*
23196 	 * A physical address pointer pointing to a host buffer that the
23197 	 * command's response data will be written. This can be either a host
23198 	 * physical address (HPA) or a guest physical address (GPA) and must
23199 	 * point to a physically contiguous block of memory.
23200 	 */
23201 	uint64_t	resp_addr;
23202 	uint16_t	enables;
23203 	/*
23204 	 * This bit must be '1' for the phc_master_fid field to be
23205 	 * configured.
23206 	 */
23207 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_ENABLES_PHC_MASTER_FID \
23208 		UINT32_C(0x1)
23209 	/*
23210 	 * This bit must be '1' for the phc_sec_fid field to be
23211 	 * configured.
23212 	 */
23213 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_ENABLES_PHC_SEC_FID \
23214 		UINT32_C(0x2)
23215 	/*
23216 	 * This bit must be '1' for the phc_sec_mode field to be
23217 	 * configured.
23218 	 */
23219 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_ENABLES_PHC_SEC_MODE \
23220 		UINT32_C(0x4)
23221 	/*
23222 	 * This bit must be '1' for the failover_timer field to be
23223 	 * configured.
23224 	 */
23225 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_ENABLES_FAILOVER_TIMER \
23226 		UINT32_C(0x8)
23227 	/*
23228 	 * This field is used to configure the Master function. Only this
23229 	 * function can modify or condition the PHC. Only driver calls from
23230 	 * this function are allowed to adjust frequency of PHC or configure
23231 	 * PPS functionality.
23232 	 * If driver does not specify this FID, then firmware will auto select
23233 	 * the first function that makes the call to modify PHC as the Master.
23234 	 */
23235 	uint16_t	phc_master_fid;
23236 	/*
23237 	 * This field is used to configure the secondary function. This
23238 	 * function becomes the Master function in case of failover from
23239 	 * Master function.
23240 	 * If driver does not specify this FID, firmware will auto select
23241 	 * the last non-master function to make a call to condition PHC as
23242 	 * secondary.
23243 	 */
23244 	uint16_t	phc_sec_fid;
23245 	/*
23246 	 * This field is used to configure conditions under which a function
23247 	 * can become a secondary function.
23248 	 */
23249 	uint8_t	phc_sec_mode;
23250 	/*
23251 	 * Immediately failover to the current secondary function. If there
23252 	 * is no secondary function available, failover does not happen.
23253 	 */
23254 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_PHC_SEC_MODE_SWITCH  UINT32_C(0x0)
23255 	/*
23256 	 * All functions (PF and VF) can be used during auto selection
23257 	 * of a secondary function. This is not used in case of admin
23258 	 * configured secondary function.
23259 	 */
23260 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_PHC_SEC_MODE_ALL     UINT32_C(0x1)
23261 	/*
23262 	 * Only PF's can be selected as a secondary function during auto
23263 	 * selection. This is not used in case of admin configured secondary
23264 	 * function.
23265 	 */
23266 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_PHC_SEC_MODE_PF_ONLY UINT32_C(0x2)
23267 	#define HWRM_FUNC_PTP_EXT_CFG_INPUT_PHC_SEC_MODE_LAST \
23268 		HWRM_FUNC_PTP_EXT_CFG_INPUT_PHC_SEC_MODE_PF_ONLY
23269 	uint8_t	unused_0;
23270 	/*
23271 	 * This field indicates the failover time is milliseconds. If the
23272 	 * timeout expires, firmware will failover PTP configurability from
23273 	 * current master to secondary fid.
23274 	 * 0 - Failover timer is automatically selected based on the last
23275 	 * adjFreq() call. If adjFreq() is not called for 3 * (last interval)
23276 	 * the failover kicks in. For example, if last interval between
23277 	 * adjFreq() calls was 2 seconds and the next adjFreq() is not made for
23278 	 * at least 6 seconds, then secondary takes over as master to condition
23279 	 * PHC. Firmware rounds up the failover timer to be a multiple of 250
23280 	 * ms. Firmware checks every 250 ms to see if timer expired.
23281 	 * 0xFFFFFFFF - If driver specifies this value, then failover never
23282 	 * happens. Admin or auto selected Master will always be used for
23283 	 * conditioning PHC.
23284 	 * X - If driver specifies any other value, this is admin indicated
23285 	 * failover timeout. If no adjFreq() call is made within this timeout
23286 	 * value, then failover happens. This value should be a multiple of
23287 	 * 250 ms. Firmware checks every 250 ms to see if timer expired.
23288 	 */
23289 	uint32_t	failover_timer;
23290 	uint8_t	unused_1[4];
23291 } __rte_packed_end;
23292 
23293 /* hwrm_func_ptp_ext_cfg_output (size:128b/16B) */
23294 struct __rte_packed_begin hwrm_func_ptp_ext_cfg_output {
23295 	/* The specific error status for the command. */
23296 	uint16_t	error_code;
23297 	/* The HWRM command request type. */
23298 	uint16_t	req_type;
23299 	/* The sequence ID from the original command. */
23300 	uint16_t	seq_id;
23301 	/* The length of the response data in number of bytes. */
23302 	uint16_t	resp_len;
23303 	uint8_t	unused_0[7];
23304 	/*
23305 	 * This field is used in Output records to indicate that the output
23306 	 * is completely written to RAM. This field should be read as '1'
23307 	 * to indicate that the output has been completely written. When
23308 	 * writing a command completion or response to an internal processor,
23309 	 * the order of writes has to be such that this field is written last.
23310 	 */
23311 	uint8_t	valid;
23312 } __rte_packed_end;
23313 
23314 /**************************
23315  * hwrm_func_ptp_ext_qcfg *
23316  **************************/
23317 
23318 
23319 /* hwrm_func_ptp_ext_qcfg_input (size:192b/24B) */
23320 struct __rte_packed_begin hwrm_func_ptp_ext_qcfg_input {
23321 	/* The HWRM command request type. */
23322 	uint16_t	req_type;
23323 	/*
23324 	 * The completion ring to send the completion event on. This should
23325 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23326 	 */
23327 	uint16_t	cmpl_ring;
23328 	/*
23329 	 * The sequence ID is used by the driver for tracking multiple
23330 	 * commands. This ID is treated as opaque data by the firmware and
23331 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23332 	 */
23333 	uint16_t	seq_id;
23334 	/*
23335 	 * The target ID of the command:
23336 	 * * 0x0-0xFFF8 - The function ID
23337 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23338 	 * * 0xFFFD - Reserved for user-space HWRM interface
23339 	 * * 0xFFFF - HWRM
23340 	 */
23341 	uint16_t	target_id;
23342 	/*
23343 	 * A physical address pointer pointing to a host buffer that the
23344 	 * command's response data will be written. This can be either a host
23345 	 * physical address (HPA) or a guest physical address (GPA) and must
23346 	 * point to a physically contiguous block of memory.
23347 	 */
23348 	uint64_t	resp_addr;
23349 	uint8_t	unused_0[8];
23350 } __rte_packed_end;
23351 
23352 /* hwrm_func_ptp_ext_qcfg_output (size:256b/32B) */
23353 struct __rte_packed_begin hwrm_func_ptp_ext_qcfg_output {
23354 	/* The specific error status for the command. */
23355 	uint16_t	error_code;
23356 	/* The HWRM command request type. */
23357 	uint16_t	req_type;
23358 	/* The sequence ID from the original command. */
23359 	uint16_t	seq_id;
23360 	/* The length of the response data in number of bytes. */
23361 	uint16_t	resp_len;
23362 	/*
23363 	 * Firmware returns the current PHC master function. This function
23364 	 * could either be admin selected or auto selected.
23365 	 */
23366 	uint16_t	phc_master_fid;
23367 	/*
23368 	 * Firmware returns the current PHC secondary function. This function
23369 	 * could either be admin selected or auto selected.
23370 	 */
23371 	uint16_t	phc_sec_fid;
23372 	/*
23373 	 * Firmware returns the last non-master/non-secondary function to
23374 	 * make a call to condition PHC.
23375 	 */
23376 	uint16_t	phc_active_fid0;
23377 	/*
23378 	 * Firmware returns the second last non-master/non-secondary function
23379 	 * to make a call to condition PHC.
23380 	 */
23381 	uint16_t	phc_active_fid1;
23382 	/*
23383 	 * Timestamp indicating the last time a failover happened. The master
23384 	 * and secondary functions in the failover event is indicated in the
23385 	 * next two fields.
23386 	 */
23387 	uint32_t	last_failover_event;
23388 	/*
23389 	 * Last failover happened from this function. This was the master
23390 	 * function at the time of failover.
23391 	 */
23392 	uint16_t	from_fid;
23393 	/*
23394 	 * Last failover happened to this function. This was the secondary
23395 	 * function at the time of failover.
23396 	 */
23397 	uint16_t	to_fid;
23398 	uint8_t	unused_0[7];
23399 	/*
23400 	 * This field is used in Output records to indicate that the output
23401 	 * is completely written to RAM. This field should be read as '1'
23402 	 * to indicate that the output has been completely written. When
23403 	 * writing a command completion or response to an internal processor,
23404 	 * the order of writes has to be such that this field is written last.
23405 	 */
23406 	uint8_t	valid;
23407 } __rte_packed_end;
23408 
23409 /***************************
23410  * hwrm_func_key_ctx_alloc *
23411  ***************************/
23412 
23413 
23414 /* hwrm_func_key_ctx_alloc_input (size:384b/48B) */
23415 struct __rte_packed_begin hwrm_func_key_ctx_alloc_input {
23416 	/* The HWRM command request type. */
23417 	uint16_t	req_type;
23418 	/*
23419 	 * The completion ring to send the completion event on. This should
23420 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23421 	 */
23422 	uint16_t	cmpl_ring;
23423 	/*
23424 	 * The sequence ID is used by the driver for tracking multiple
23425 	 * commands. This ID is treated as opaque data by the firmware and
23426 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23427 	 */
23428 	uint16_t	seq_id;
23429 	/*
23430 	 * The target ID of the command:
23431 	 * * 0x0-0xFFF8 - The function ID
23432 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23433 	 * * 0xFFFD - Reserved for user-space HWRM interface
23434 	 * * 0xFFFF - HWRM
23435 	 */
23436 	uint16_t	target_id;
23437 	/*
23438 	 * A physical address pointer pointing to a host buffer that the
23439 	 * command's response data will be written. This can be either a host
23440 	 * physical address (HPA) or a guest physical address (GPA) and must
23441 	 * point to a physically contiguous block of memory.
23442 	 */
23443 	uint64_t	resp_addr;
23444 	/* Function ID. */
23445 	uint16_t	fid;
23446 	/*
23447 	 * Number of Key Contexts to be allocated.
23448 	 * When running in the XID partition mode, if the call is made by
23449 	 * a VF driver, this field specifies the number of XIDs requested
23450 	 * by the VF driver. The XID partitions are managed by the PF
23451 	 * driver in XID partition mode and the VF command will be
23452 	 * redirected to the PF driver. The PF driver may reduce this
23453 	 * number if it cannot allocate a big enough block of XID
23454 	 * partitions to satisfy the request.
23455 	 * This field must not exceed the maximum batch size specified in
23456 	 * the max_key_ctxs_alloc field of the HWRM_FUNC_QCAPS response,
23457 	 * must not be zero, and must be integer multiples of the
23458 	 * partition size specified in the ctxs_per_partition field of
23459 	 * the HWRM_FUNC_QCAPS response.
23460 	 */
23461 	uint16_t	num_key_ctxs;
23462 	/*
23463 	 * DMA buffer size in bytes. This field in invalid in the XID
23464 	 * partition mode.
23465 	 */
23466 	uint32_t	dma_bufr_size_bytes;
23467 	/* Key Context type. */
23468 	uint8_t	key_ctx_type;
23469 	/* KTLS Tx Key Context type. */
23470 	#define HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_TX \
23471 		UINT32_C(0x0)
23472 	/* KTLS Rx Key Context type. */
23473 	#define HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_RX \
23474 		UINT32_C(0x1)
23475 	/* QUIC Tx Key Context type. */
23476 	#define HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_QUIC_TX \
23477 		UINT32_C(0x2)
23478 	/* QUIC Rx Key Context type. */
23479 	#define HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_QUIC_RX \
23480 		UINT32_C(0x3)
23481 	#define HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_LAST \
23482 		HWRM_FUNC_KEY_CTX_ALLOC_INPUT_KEY_CTX_TYPE_QUIC_RX
23483 	uint8_t	unused_0[7];
23484 	/*
23485 	 * Host DMA address to send back KTLS context IDs. This field is
23486 	 * invalid in the XID partition mode.
23487 	 */
23488 	uint64_t	host_dma_addr;
23489 	/*
23490 	 * This field is only used by the PF driver that manages the XID
23491 	 * partitions. This field specifies the starting XID of one or
23492 	 * more contiguous XID partitions allocated by the PF driver.
23493 	 * This field is not used by the VF driver.
23494 	 * If the call is successful, this starting XID value will be
23495 	 * returned in the partition_start_xid field of the response.
23496 	 */
23497 	uint32_t	partition_start_xid;
23498 	uint8_t	unused_1[4];
23499 } __rte_packed_end;
23500 
23501 /* hwrm_func_key_ctx_alloc_output (size:192b/24B) */
23502 struct __rte_packed_begin hwrm_func_key_ctx_alloc_output {
23503 	/* The specific error status for the command. */
23504 	uint16_t	error_code;
23505 	/* The HWRM command request type. */
23506 	uint16_t	req_type;
23507 	/* The sequence ID from the original command. */
23508 	uint16_t	seq_id;
23509 	/* The length of the response data in number of bytes. */
23510 	uint16_t	resp_len;
23511 	/* Number of Key Contexts that have been allocated. */
23512 	uint16_t	num_key_ctxs_allocated;
23513 	/* Control flags. */
23514 	uint8_t	flags;
23515 	/*
23516 	 * When set, it indicates that all key contexts allocated by this
23517 	 * command are contiguous. As a result, the driver has to read the
23518 	 * start context ID from the first entry of the DMA data buffer
23519 	 * and figures out the end context ID by 'start context ID +
23520 	 * num_key_ctxs_allocated - 1'. In XID partition mode,
23521 	 * this bit should always be set.
23522 	 */
23523 	#define HWRM_FUNC_KEY_CTX_ALLOC_OUTPUT_FLAGS_KEY_CTXS_CONTIGUOUS \
23524 		UINT32_C(0x1)
23525 	uint8_t	unused_0;
23526 	/*
23527 	 * This field is only valid in the XID partition mode. It indicates
23528 	 * the starting XID that has been allocated.
23529 	 */
23530 	uint32_t	partition_start_xid;
23531 	uint8_t	unused_1[7];
23532 	/*
23533 	 * This field is used in Output records to indicate that the output
23534 	 * is completely written to RAM. This field should be read as '1'
23535 	 * to indicate that the output has been completely written. When
23536 	 * writing a command completion or response to an internal processor,
23537 	 * the order of writes has to be such that this field is written last.
23538 	 */
23539 	uint8_t	valid;
23540 } __rte_packed_end;
23541 
23542 /**************************
23543  * hwrm_func_key_ctx_free *
23544  **************************/
23545 
23546 
23547 /* hwrm_func_key_ctx_free_input (size:256b/32B) */
23548 struct __rte_packed_begin hwrm_func_key_ctx_free_input {
23549 	/* The HWRM command request type. */
23550 	uint16_t	req_type;
23551 	/*
23552 	 * The completion ring to send the completion event on. This should
23553 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23554 	 */
23555 	uint16_t	cmpl_ring;
23556 	/*
23557 	 * The sequence ID is used by the driver for tracking multiple
23558 	 * commands. This ID is treated as opaque data by the firmware and
23559 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23560 	 */
23561 	uint16_t	seq_id;
23562 	/*
23563 	 * The target ID of the command:
23564 	 * * 0x0-0xFFF8 - The function ID
23565 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23566 	 * * 0xFFFD - Reserved for user-space HWRM interface
23567 	 * * 0xFFFF - HWRM
23568 	 */
23569 	uint16_t	target_id;
23570 	/*
23571 	 * A physical address pointer pointing to a host buffer that the
23572 	 * command's response data will be written. This can be either a host
23573 	 * physical address (HPA) or a guest physical address (GPA) and must
23574 	 * point to a physically contiguous block of memory.
23575 	 */
23576 	uint64_t	resp_addr;
23577 	/* Function ID. */
23578 	uint16_t	fid;
23579 	/* Key Context type. */
23580 	uint8_t	key_ctx_type;
23581 	/* KTLS Tx Key Context type. */
23582 	#define HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_TX      UINT32_C(0x0)
23583 	/* KTLS Rx Key Context type. */
23584 	#define HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_RX      UINT32_C(0x1)
23585 	/* QUIC Tx Key Context type. */
23586 	#define HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_QUIC_TX UINT32_C(0x2)
23587 	/* QUIC Rx Key Context type. */
23588 	#define HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_QUIC_RX UINT32_C(0x3)
23589 	#define HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_LAST \
23590 		HWRM_FUNC_KEY_CTX_FREE_INPUT_KEY_CTX_TYPE_QUIC_RX
23591 	uint8_t	unused_0;
23592 	/* Starting XID of the partition that needs to be freed. */
23593 	uint32_t	partition_start_xid;
23594 	/*
23595 	 * Number of entries to be freed.
23596 	 * When running in the XID partition mode, this field is only
23597 	 * used by the PF driver that manages the XID partitions.
23598 	 * The PF driver specifies the number of XIDs to be freed and
23599 	 * this number is always equal to the number of XIDs previously
23600 	 * allocated successfully using HWRM_FUNC_KEY_CTX_ALLOC.
23601 	 * This field is not used by the VF driver.
23602 	 */
23603 	uint16_t	num_entries;
23604 	uint8_t	unused_1[6];
23605 } __rte_packed_end;
23606 
23607 /* hwrm_func_key_ctx_free_output (size:128b/16B) */
23608 struct __rte_packed_begin hwrm_func_key_ctx_free_output {
23609 	/* The specific error status for the command. */
23610 	uint16_t	error_code;
23611 	/* The HWRM command request type. */
23612 	uint16_t	req_type;
23613 	/* The sequence ID from the original command. */
23614 	uint16_t	seq_id;
23615 	/* The length of the response data in number of bytes. */
23616 	uint16_t	resp_len;
23617 	uint8_t	rsvd0[7];
23618 	/*
23619 	 * This field is used in Output records to indicate that the
23620 	 * output is completely written to RAM. This field should be
23621 	 * read as '1' to indicate that the output has been completely
23622 	 * written. When writing a command completion or response to
23623 	 * an internal processor, the order of writes has to be such
23624 	 * that this field is written last.
23625 	 */
23626 	uint8_t	valid;
23627 } __rte_packed_end;
23628 
23629 /**********************************
23630  * hwrm_func_backing_store_cfg_v2 *
23631  **********************************/
23632 
23633 
23634 /* hwrm_func_backing_store_cfg_v2_input (size:448b/56B) */
23635 struct __rte_packed_begin hwrm_func_backing_store_cfg_v2_input {
23636 	/* The HWRM command request type. */
23637 	uint16_t	req_type;
23638 	/*
23639 	 * The completion ring to send the completion event on. This should
23640 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23641 	 */
23642 	uint16_t	cmpl_ring;
23643 	/*
23644 	 * The sequence ID is used by the driver for tracking multiple
23645 	 * commands. This ID is treated as opaque data by the firmware and
23646 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23647 	 */
23648 	uint16_t	seq_id;
23649 	/*
23650 	 * The target ID of the command:
23651 	 * * 0x0-0xFFF8 - The function ID
23652 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23653 	 * * 0xFFFD - Reserved for user-space HWRM interface
23654 	 * * 0xFFFF - HWRM
23655 	 */
23656 	uint16_t	target_id;
23657 	/*
23658 	 * A physical address pointer pointing to a host buffer that the
23659 	 * command's response data will be written. This can be either a host
23660 	 * physical address (HPA) or a guest physical address (GPA) and must
23661 	 * point to a physically contiguous block of memory.
23662 	 */
23663 	uint64_t	resp_addr;
23664 	/* Type of backing store to be configured. */
23665 	uint16_t	type;
23666 	/* Queue pair. */
23667 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_QP \
23668 		UINT32_C(0x0)
23669 	/* Shared receive queue. */
23670 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SRQ \
23671 		UINT32_C(0x1)
23672 	/* Completion queue. */
23673 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_CQ \
23674 		UINT32_C(0x2)
23675 	/* Virtual NIC. */
23676 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_VNIC \
23677 		UINT32_C(0x3)
23678 	/* Statistic context. */
23679 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_STAT \
23680 		UINT32_C(0x4)
23681 	/* Slow-path TQM ring. */
23682 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SP_TQM_RING \
23683 		UINT32_C(0x5)
23684 	/* Fast-path TQM ring. */
23685 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_FP_TQM_RING \
23686 		UINT32_C(0x6)
23687 	/* Memory Region and Memory Address Vector Context. */
23688 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_MRAV \
23689 		UINT32_C(0xe)
23690 	/* TIM. */
23691 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_TIM \
23692 		UINT32_C(0xf)
23693 	/* Tx crypto key. */
23694 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_TX_CK \
23695 		UINT32_C(0x13)
23696 	/* Rx crypto key. */
23697 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_RX_CK \
23698 		UINT32_C(0x14)
23699 	/* Mid-path TQM ring. */
23700 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_MP_TQM_RING \
23701 		UINT32_C(0x15)
23702 	/* SQ Doorbell shadow region. */
23703 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SQ_DB_SHADOW \
23704 		UINT32_C(0x16)
23705 	/* RQ Doorbell shadow region. */
23706 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_RQ_DB_SHADOW \
23707 		UINT32_C(0x17)
23708 	/* SRQ Doorbell shadow region. */
23709 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SRQ_DB_SHADOW \
23710 		UINT32_C(0x18)
23711 	/* CQ Doorbell shadow region. */
23712 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_CQ_DB_SHADOW \
23713 		UINT32_C(0x19)
23714 	/* CFA table scope context. */
23715 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_TBL_SCOPE \
23716 		UINT32_C(0x1c)
23717 	/* XID partition context. */
23718 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_XID_PARTITION \
23719 		UINT32_C(0x1d)
23720 	/* SRT trace. */
23721 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SRT_TRACE \
23722 		UINT32_C(0x1e)
23723 	/* SRT2 trace. */
23724 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_SRT2_TRACE \
23725 		UINT32_C(0x1f)
23726 	/* CRT trace. */
23727 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_CRT_TRACE \
23728 		UINT32_C(0x20)
23729 	/* CRT2 trace. */
23730 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_CRT2_TRACE \
23731 		UINT32_C(0x21)
23732 	/* RIGP0 trace. */
23733 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_RIGP0_TRACE \
23734 		UINT32_C(0x22)
23735 	/* L2 HWRM trace. */
23736 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_L2_HWRM_TRACE \
23737 		UINT32_C(0x23)
23738 	/* RoCE HWRM trace. */
23739 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_ROCE_HWRM_TRACE \
23740 		UINT32_C(0x24)
23741 	/* Invalid type. */
23742 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_INVALID \
23743 		UINT32_C(0xffff)
23744 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_LAST \
23745 		HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_TYPE_INVALID
23746 	/*
23747 	 * Instance of the backing store type. It is zero-based,
23748 	 * which means "0" indicates the first instance. For backing
23749 	 * stores with single instance only, leave this field to 0.
23750 	 * 1. If the backing store type is MPC TQM ring, use the following
23751 	 *    instance value to map to MPC clients:
23752 	 *    TCE (0), RCE (1), TE_CFA(2), RE_CFA (3), PRIMATE(4)
23753 	 * 2. If the backing store type is TBL_SCOPE, use the following
23754 	 *    instance value to map to table scope regions:
23755 	 *    RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
23756 	 * 3. If the backing store type is XID partition, use the following
23757 	 *    instance value to map to context types:
23758 	 *    TX_CK (0), RX_CK (1)
23759 	 */
23760 	uint16_t	instance;
23761 	/* Control flags. */
23762 	uint32_t	flags;
23763 	/*
23764 	 * When set, the firmware only uses on-chip resources and
23765 	 * does not expect any backing store to be provided by the
23766 	 * host driver. This mode provides minimal L2 functionality
23767 	 * (e.g. limited L2 resources, no RoCE).
23768 	 */
23769 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_FLAGS_PREBOOT_MODE \
23770 		UINT32_C(0x1)
23771 	/*
23772 	 * When set, the driver indicates that the backing store type
23773 	 * to be configured in this command is the last one to do for
23774 	 * the associated PF. That means all backing store type
23775 	 * configurations are done for the corresponding PF after this
23776 	 * command. As a result, the firmware has to do the necessary
23777 	 * post configurations.
23778 	 */
23779 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_FLAGS_BS_CFG_ALL_DONE \
23780 		UINT32_C(0x2)
23781 	/*
23782 	 * When set, the driver indicates extending the size of the specific
23783 	 * backing store type instead of configuring the corresponding PBLs.
23784 	 * The size specified in the command will be the new size to be
23785 	 * configured. The operation is only valid when the specific backing
23786 	 * store has been configured before. Otherwise, the firmware will
23787 	 * return an error. The driver needs to zero out the 'entry_size',
23788 	 * 'flags', 'page_dir', and 'page_size_pbl_level' fields, and the
23789 	 * firmware will ignore these inputs. Further, the firmware expects
23790 	 * the 'num_entries' and any valid split entries to be no less than
23791 	 * the initial value that has been configured. If not, it will
23792 	 * return an error code.
23793 	 */
23794 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_FLAGS_BS_EXTEND \
23795 		UINT32_C(0x4)
23796 	/* Page directory. */
23797 	uint64_t	page_dir;
23798 	/* Number of entries */
23799 	uint32_t	num_entries;
23800 	/* Number of bytes allocated for each entry */
23801 	uint16_t	entry_size;
23802 	/* Page size and pbl level. */
23803 	uint8_t	page_size_pbl_level;
23804 	/* PBL indirect levels. */
23805 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_MASK \
23806 		UINT32_C(0xf)
23807 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_SFT   0
23808 	/* PBL pointer is physical start address. */
23809 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_LVL_0 \
23810 		UINT32_C(0x0)
23811 	/* PBL pointer points to PTE table. */
23812 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_LVL_1 \
23813 		UINT32_C(0x1)
23814 	/*
23815 	 * PBL pointer points to PDE table with each entry pointing to
23816 	 * PTE tables.
23817 	 */
23818 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_LVL_2 \
23819 		UINT32_C(0x2)
23820 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_LAST \
23821 		HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PBL_LEVEL_LVL_2
23822 	/* Page size. */
23823 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_MASK \
23824 		UINT32_C(0xf0)
23825 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_SFT   4
23826 	/* 4KB. */
23827 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_4K \
23828 		(UINT32_C(0x0) << 4)
23829 	/* 8KB. */
23830 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_8K \
23831 		(UINT32_C(0x1) << 4)
23832 	/* 64KB. */
23833 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_64K \
23834 		(UINT32_C(0x2) << 4)
23835 	/* 2MB. */
23836 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_2M \
23837 		(UINT32_C(0x3) << 4)
23838 	/* 8MB. */
23839 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_8M \
23840 		(UINT32_C(0x4) << 4)
23841 	/* 1GB. */
23842 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_1G \
23843 		(UINT32_C(0x5) << 4)
23844 	#define HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_LAST \
23845 		HWRM_FUNC_BACKING_STORE_CFG_V2_INPUT_PAGE_SIZE_PG_1G
23846 	/*
23847 	 * This field counts how many split entries contain valid data.
23848 	 * Below is the table that maps the count value:
23849 	 * | Count |                     Indication                     |
23850 	 * | ----- | -------------------------------------------------- |
23851 	 * |   0   | None of the split entries has valid data.          |
23852 	 * |   1   | Only "split_entry_0" contains valid data.          |
23853 	 * |   2   | Only "split_entry_0" and "1" have valid data.      |
23854 	 * |   3   | Only "split_entry_0", "1" and "2" have valid data. |
23855 	 * |   4   | All four split entries have valid data.            |
23856 	 */
23857 	uint8_t	subtype_valid_cnt;
23858 	/*
23859 	 * Split entry #0. Note that the four split entries (as a group)
23860 	 * must be cast to a type-specific data structure first before
23861 	 * accessing it! Below is the table that maps a backing store
23862 	 * type to the associated split entry casting data structure.
23863 	 * | Type |       Split Entry Casting Data Structure           |
23864 	 * | ---- | -------------------------------------------------- |
23865 	 * | QPC  |             qpc_split_entries                      |
23866 	 * | SRQ  |             srq_split_entries                      |
23867 	 * | CQ   |             cq_split_entries                       |
23868 	 * | VINC |            vnic_split_entries                      |
23869 	 * | MRAV |            mrav_split_entries                      |
23870 	 * | TS   |             ts_split_entries                       |
23871 	 * | CK   |             ck_split_entries                       |
23872 	 */
23873 	uint32_t	split_entry_0;
23874 	/* Split entry #1. */
23875 	uint32_t	split_entry_1;
23876 	/* Split entry #2. */
23877 	uint32_t	split_entry_2;
23878 	/* Split entry #3. */
23879 	uint32_t	split_entry_3;
23880 } __rte_packed_end;
23881 
23882 /* hwrm_func_backing_store_cfg_v2_output (size:128b/16B) */
23883 struct __rte_packed_begin hwrm_func_backing_store_cfg_v2_output {
23884 	/* The specific error status for the command. */
23885 	uint16_t	error_code;
23886 	/* The HWRM command request type. */
23887 	uint16_t	req_type;
23888 	/* The sequence ID from the original command. */
23889 	uint16_t	seq_id;
23890 	/* The length of the response data in number of bytes. */
23891 	uint16_t	resp_len;
23892 	uint8_t	rsvd0[7];
23893 	/*
23894 	 * This field is used in Output records to indicate that the
23895 	 * output is completely written to RAM. This field should be
23896 	 * read as '1' to indicate that the output has been completely
23897 	 * written. When writing a command completion or response to
23898 	 * an internal processor, the order of writes has to be such
23899 	 * that this field is written last.
23900 	 */
23901 	uint8_t	valid;
23902 } __rte_packed_end;
23903 
23904 /***********************************
23905  * hwrm_func_backing_store_qcfg_v2 *
23906  ***********************************/
23907 
23908 
23909 /* hwrm_func_backing_store_qcfg_v2_input (size:192b/24B) */
23910 struct __rte_packed_begin hwrm_func_backing_store_qcfg_v2_input {
23911 	/* The HWRM command request type. */
23912 	uint16_t	req_type;
23913 	/*
23914 	 * The completion ring to send the completion event on. This should
23915 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
23916 	 */
23917 	uint16_t	cmpl_ring;
23918 	/*
23919 	 * The sequence ID is used by the driver for tracking multiple
23920 	 * commands. This ID is treated as opaque data by the firmware and
23921 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
23922 	 */
23923 	uint16_t	seq_id;
23924 	/*
23925 	 * The target ID of the command:
23926 	 * * 0x0-0xFFF8 - The function ID
23927 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
23928 	 * * 0xFFFD - Reserved for user-space HWRM interface
23929 	 * * 0xFFFF - HWRM
23930 	 */
23931 	uint16_t	target_id;
23932 	/*
23933 	 * A physical address pointer pointing to a host buffer that the
23934 	 * command's response data will be written. This can be either a host
23935 	 * physical address (HPA) or a guest physical address (GPA) and must
23936 	 * point to a physically contiguous block of memory.
23937 	 */
23938 	uint64_t	resp_addr;
23939 	/* Type of backing store to be configured. */
23940 	uint16_t	type;
23941 	/* Queue pair. */
23942 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_QP \
23943 		UINT32_C(0x0)
23944 	/* Shared receive queue. */
23945 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SRQ \
23946 		UINT32_C(0x1)
23947 	/* Completion queue. */
23948 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_CQ \
23949 		UINT32_C(0x2)
23950 	/* Virtual NIC. */
23951 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_VNIC \
23952 		UINT32_C(0x3)
23953 	/* Statistic context. */
23954 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_STAT \
23955 		UINT32_C(0x4)
23956 	/* Slow-path TQM ring. */
23957 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SP_TQM_RING \
23958 		UINT32_C(0x5)
23959 	/* Fast-path TQM ring. */
23960 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_FP_TQM_RING \
23961 		UINT32_C(0x6)
23962 	/* Memory Region and Memory Address Vector Context. */
23963 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_MRAV \
23964 		UINT32_C(0xe)
23965 	/* TIM. */
23966 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_TIM \
23967 		UINT32_C(0xf)
23968 	/* Tx crypto key. */
23969 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_TX_CK \
23970 		UINT32_C(0x13)
23971 	/* Rx crypto key. */
23972 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_RX_CK \
23973 		UINT32_C(0x14)
23974 	/* Mid-path TQM ring. */
23975 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_MP_TQM_RING \
23976 		UINT32_C(0x15)
23977 	/* SQ Doorbell shadow region. */
23978 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SQ_DB_SHADOW \
23979 		UINT32_C(0x16)
23980 	/* RQ Doorbell shadow region. */
23981 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_RQ_DB_SHADOW \
23982 		UINT32_C(0x17)
23983 	/* SRQ Doorbell shadow region. */
23984 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SRQ_DB_SHADOW \
23985 		UINT32_C(0x18)
23986 	/* CQ Doorbell shadow region. */
23987 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_CQ_DB_SHADOW \
23988 		UINT32_C(0x19)
23989 	/* CFA table scope context. */
23990 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_TBL_SCOPE \
23991 		UINT32_C(0x1c)
23992 	/* VF XID partition in-use table. */
23993 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_XID_PARTITION_TABLE \
23994 		UINT32_C(0x1d)
23995 	/* SRT trace. */
23996 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SRT_TRACE \
23997 		UINT32_C(0x1e)
23998 	/* SRT2 trace. */
23999 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_SRT2_TRACE \
24000 		UINT32_C(0x1f)
24001 	/* CRT trace. */
24002 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_CRT_TRACE \
24003 		UINT32_C(0x20)
24004 	/* CRT2 trace. */
24005 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_CRT2_TRACE \
24006 		UINT32_C(0x21)
24007 	/* RIGP0 trace. */
24008 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_RIGP0_TRACE \
24009 		UINT32_C(0x22)
24010 	/* L2 HWRM trace. */
24011 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_L2_HWRM_TRACE \
24012 		UINT32_C(0x23)
24013 	/* RoCE HWRM trace. */
24014 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_ROCE_HWRM_TRACE \
24015 		UINT32_C(0x24)
24016 	/* Invalid type. */
24017 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_INVALID \
24018 		UINT32_C(0xffff)
24019 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_LAST \
24020 		HWRM_FUNC_BACKING_STORE_QCFG_V2_INPUT_TYPE_INVALID
24021 	/*
24022 	 * Instance of the backing store type. It is zero-based,
24023 	 * which means "0" indicates the first instance. For backing
24024 	 * stores with single instance only, leave this field to 0.
24025 	 * 1. If the backing store type is MPC TQM ring, use the following
24026 	 *    instance value to map to MPC clients:
24027 	 *    TCE (0), RCE (1), TE_CFA(2), RE_CFA (3), PRIMATE(4)
24028 	 * 2. If the backing store type is TBL_SCOPE, use the following
24029 	 *    instance value to map to table scope regions:
24030 	 *    RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
24031 	 * 3. If the backing store type is XID partition, use the following
24032 	 *    instance value to map to context types:
24033 	 *    TX_CK (0), RX_CK (1)
24034 	 */
24035 	uint16_t	instance;
24036 	uint8_t	rsvd[4];
24037 } __rte_packed_end;
24038 
24039 /* hwrm_func_backing_store_qcfg_v2_output (size:448b/56B) */
24040 struct __rte_packed_begin hwrm_func_backing_store_qcfg_v2_output {
24041 	/* The specific error status for the command. */
24042 	uint16_t	error_code;
24043 	/* The HWRM command request type. */
24044 	uint16_t	req_type;
24045 	/* The sequence ID from the original command. */
24046 	uint16_t	seq_id;
24047 	/* The length of the response data in number of bytes. */
24048 	uint16_t	resp_len;
24049 	/* Type of backing store to be configured. */
24050 	uint16_t	type;
24051 	/* Queue pair. */
24052 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_QP \
24053 		UINT32_C(0x0)
24054 	/* Shared receive queue. */
24055 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SRQ \
24056 		UINT32_C(0x1)
24057 	/* Completion queue. */
24058 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_CQ \
24059 		UINT32_C(0x2)
24060 	/* Virtual NIC. */
24061 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_VNIC \
24062 		UINT32_C(0x3)
24063 	/* Statistic context. */
24064 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_STAT \
24065 		UINT32_C(0x4)
24066 	/* Slow-path TQM ring. */
24067 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SP_TQM_RING \
24068 		UINT32_C(0x5)
24069 	/* Fast-path TQM ring. */
24070 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_FP_TQM_RING \
24071 		UINT32_C(0x6)
24072 	/* Memory Region and Memory Address Vector Context. */
24073 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_MRAV \
24074 		UINT32_C(0xe)
24075 	/* TIM. */
24076 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_TIM \
24077 		UINT32_C(0xf)
24078 	/* Tx crypto key. */
24079 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_TX_CK \
24080 		UINT32_C(0x13)
24081 	/* Rx crypto key. */
24082 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_RX_CK \
24083 		UINT32_C(0x14)
24084 	/* Mid-path TQM ring. */
24085 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_MP_TQM_RING \
24086 		UINT32_C(0x15)
24087 	/* CFA table scope context. */
24088 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_TBL_SCOPE \
24089 		UINT32_C(0x1c)
24090 	/* XID partition context. */
24091 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_XID_PARTITION \
24092 		UINT32_C(0x1d)
24093 	/* SRT trace. */
24094 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SRT_TRACE \
24095 		UINT32_C(0x1e)
24096 	/* SRT2 trace. */
24097 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_SRT2_TRACE \
24098 		UINT32_C(0x1f)
24099 	/* CRT trace. */
24100 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_CRT_TRACE \
24101 		UINT32_C(0x20)
24102 	/* CRT2 trace. */
24103 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_CRT2_TRACE \
24104 		UINT32_C(0x21)
24105 	/* RIGP0 trace. */
24106 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_RIGP0_TRACE \
24107 		UINT32_C(0x22)
24108 	/* L2 HWRM trace. */
24109 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_L2_HWRM_TRACE \
24110 		UINT32_C(0x23)
24111 	/* RoCE HWRM trace. */
24112 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_ROCE_HWRM_TRACE \
24113 		UINT32_C(0x24)
24114 	/* Invalid type. */
24115 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_INVALID \
24116 		UINT32_C(0xffff)
24117 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_LAST \
24118 		HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_TYPE_INVALID
24119 	/*
24120 	 * Instance of the backing store type. It is zero-based,
24121 	 * which means "0" indicates the first instance. For backing
24122 	 * stores with single instance only, leave this field to 0.
24123 	 * 1. If the backing store type is MPC TQM ring, use the following
24124 	 *    instance value to map to MPC clients:
24125 	 *    TCE (0), RCE (1), TE_CFA(2), RE_CFA (3), PRIMATE(4)
24126 	 * 2. If the backing store type is TBL_SCOPE, use the following
24127 	 *    instance value to map to table scope regions:
24128 	 *    RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
24129 	 * 3. If the backing store type is XID partition, use the following
24130 	 *    instance value to map to context types:
24131 	 *    TX_CK (0), RX_CK (1)
24132 	 */
24133 	uint16_t	instance;
24134 	/* Control flags. */
24135 	uint32_t	flags;
24136 	/* Page directory. */
24137 	uint64_t	page_dir;
24138 	/* Number of entries */
24139 	uint32_t	num_entries;
24140 	/* Page size and pbl level. */
24141 	uint8_t	page_size_pbl_level;
24142 	/* PBL indirect levels. */
24143 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_MASK \
24144 		UINT32_C(0xf)
24145 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_SFT   0
24146 	/* PBL pointer is physical start address. */
24147 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_LVL_0 \
24148 		UINT32_C(0x0)
24149 	/* PBL pointer points to PTE table. */
24150 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_LVL_1 \
24151 		UINT32_C(0x1)
24152 	/*
24153 	 * PBL pointer points to PDE table with each entry pointing to
24154 	 * PTE tables.
24155 	 */
24156 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_LVL_2 \
24157 		UINT32_C(0x2)
24158 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_LAST \
24159 		HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PBL_LEVEL_LVL_2
24160 	/* Page size. */
24161 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_MASK \
24162 		UINT32_C(0xf0)
24163 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_SFT   4
24164 	/* 4KB. */
24165 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_4K \
24166 		(UINT32_C(0x0) << 4)
24167 	/* 8KB. */
24168 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_8K \
24169 		(UINT32_C(0x1) << 4)
24170 	/* 64KB. */
24171 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_64K \
24172 		(UINT32_C(0x2) << 4)
24173 	/* 2MB. */
24174 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_2M \
24175 		(UINT32_C(0x3) << 4)
24176 	/* 8MB. */
24177 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_8M \
24178 		(UINT32_C(0x4) << 4)
24179 	/* 1GB. */
24180 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_1G \
24181 		(UINT32_C(0x5) << 4)
24182 	#define HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_LAST \
24183 		HWRM_FUNC_BACKING_STORE_QCFG_V2_OUTPUT_PAGE_SIZE_PG_1G
24184 	/*
24185 	 * This field counts how many split entries contain valid data.
24186 	 * Below is the table that maps the count value:
24187 	 * | count |                     Indication                     |
24188 	 * | ----- | -------------------------------------------------- |
24189 	 * |   0   | None of the split entries has valid data.          |
24190 	 * |   1   | Only "split_entry_0" contains valid data.          |
24191 	 * |   2   | Only "split_entry_0" and "1" have valid data.      |
24192 	 * |   3   | Only "split_entry_0", "1" and "2" have valid data. |
24193 	 * |   4   | All four split entries have valid data.            |
24194 	 */
24195 	uint8_t	subtype_valid_cnt;
24196 	uint8_t	rsvd[2];
24197 	/*
24198 	 * Split entry #0. Note that the four split entries (as a group)
24199 	 * must be cast to a type-specific data structure first before
24200 	 * accessing it! Below is the table that maps a backing store
24201 	 * type to the associated split entry casting data structure.
24202 	 * | Type |       Split Entry Casting Data Structure           |
24203 	 * | ---- | -------------------------------------------------- |
24204 	 * | QPC  |             qpc_split_entries                      |
24205 	 * | SRQ  |             srq_split_entries                      |
24206 	 * | CQ   |             cq_split_entries                       |
24207 	 * | VINC |            vnic_split_entries                      |
24208 	 * | MRAV |            mrav_split_entries                      |
24209 	 * | TS   |             ts_split_entries                       |
24210 	 * | CK   |             ck_split_entries                       |
24211 	 */
24212 	uint32_t	split_entry_0;
24213 	/* Split entry #1. */
24214 	uint32_t	split_entry_1;
24215 	/* Split entry #2. */
24216 	uint32_t	split_entry_2;
24217 	/* Split entry #3. */
24218 	uint32_t	split_entry_3;
24219 	uint8_t	rsvd2[7];
24220 	/*
24221 	 * This field is used in Output records to indicate that the
24222 	 * output is completely written to RAM. This field should be
24223 	 * read as '1' to indicate that the output has been completely
24224 	 * written. When writing a command completion or response to
24225 	 * an internal processor, the order of writes has to be such
24226 	 * that this field is written last.
24227 	 */
24228 	uint8_t	valid;
24229 } __rte_packed_end;
24230 
24231 /* Common structure to cast QPC split entries. This casting is required in the
24232  * following HWRM command inputs/outputs if the backing store type is QPC.
24233  * 1. hwrm_func_backing_store_cfg_v2_input
24234  * 2. hwrm_func_backing_store_qcfg_v2_output
24235  * 3. hwrm_func_backing_store_qcaps_v2_output
24236  */
24237 /* qpc_split_entries (size:128b/16B) */
24238 struct __rte_packed_begin qpc_split_entries {
24239 	/* Number of L2 QP backing store entries. */
24240 	uint32_t	qp_num_l2_entries;
24241 	/* Number of QP1 entries. */
24242 	uint32_t	qp_num_qp1_entries;
24243 	/*
24244 	 * Number of RoCE QP context entries required for this
24245 	 * function to support fast QP modify destroy feature.
24246 	 */
24247 	uint32_t	qp_num_fast_qpmd_entries;
24248 	uint32_t	rsvd;
24249 } __rte_packed_end;
24250 
24251 /* Common structure to cast SRQ split entries. This casting is required in the
24252  * following HWRM command inputs/outputs if the backing store type is SRQ.
24253  * 1. hwrm_func_backing_store_cfg_v2_input
24254  * 2. hwrm_func_backing_store_qcfg_v2_output
24255  * 3. hwrm_func_backing_store_qcaps_v2_output
24256  */
24257 /* srq_split_entries (size:128b/16B) */
24258 struct __rte_packed_begin srq_split_entries {
24259 	/* Number of L2 SRQ backing store entries. */
24260 	uint32_t	srq_num_l2_entries;
24261 	uint32_t	rsvd;
24262 	uint32_t	rsvd2[2];
24263 } __rte_packed_end;
24264 
24265 /* Common structure to cast CQ split entries. This casting is required in the
24266  * following HWRM command inputs/outputs if the backing store type is CQ.
24267  * 1. hwrm_func_backing_store_cfg_v2_input
24268  * 2. hwrm_func_backing_store_qcfg_v2_output
24269  * 3. hwrm_func_backing_store_qcaps_v2_output
24270  */
24271 /* cq_split_entries (size:128b/16B) */
24272 struct __rte_packed_begin cq_split_entries {
24273 	/* Number of L2 CQ backing store entries. */
24274 	uint32_t	cq_num_l2_entries;
24275 	uint32_t	rsvd;
24276 	uint32_t	rsvd2[2];
24277 } __rte_packed_end;
24278 
24279 /* Common structure to cast VNIC split entries. This casting is required in the
24280  * following HWRM command inputs/outputs if the backing store type is VNIC.
24281  * 1. hwrm_func_backing_store_cfg_v2_input
24282  * 2. hwrm_func_backing_store_qcfg_v2_output
24283  * 3. hwrm_func_backing_store_qcaps_v2_output
24284  */
24285 /* vnic_split_entries (size:128b/16B) */
24286 struct __rte_packed_begin vnic_split_entries {
24287 	/* Number of VNIC backing store entries. */
24288 	uint32_t	vnic_num_vnic_entries;
24289 	uint32_t	rsvd;
24290 	uint32_t	rsvd2[2];
24291 } __rte_packed_end;
24292 
24293 /* Common structure to cast MRAV split entries. This casting is required in the
24294  * following HWRM command inputs/outputs if the backing store type is MRAV.
24295  * 1. hwrm_func_backing_store_cfg_v2_input
24296  * 2. hwrm_func_backing_store_qcfg_v2_output
24297  * 3. hwrm_func_backing_store_qcaps_v2_output
24298  */
24299 /* mrav_split_entries (size:128b/16B) */
24300 struct __rte_packed_begin mrav_split_entries {
24301 	/* Number of AV backing store entries. */
24302 	uint32_t	mrav_num_av_entries;
24303 	uint32_t	rsvd;
24304 	uint32_t	rsvd2[2];
24305 } __rte_packed_end;
24306 
24307 /* Common structure to cast TBL_SCOPE split entries. This casting is required
24308  * in the following HWRM command inputs/outputs if the backing store type is
24309  * TBL_SCOPE.
24310  * 1. hwrm_func_backing_store_cfg_v2_input
24311  * 2. hwrm_func_backing_store_qcfg_v2_output
24312  * 3. hwrm_func_backing_store_qcaps_v2_output
24313  */
24314 /* ts_split_entries (size:128b/16B) */
24315 struct __rte_packed_begin ts_split_entries {
24316 	/* Max number of TBL_SCOPE region entries (QCAPS). */
24317 	uint32_t	region_num_entries;
24318 	/* tsid to configure (CFG). */
24319 	uint8_t	tsid;
24320 	/*
24321 	 * Lkup static bucket count (power of 2).
24322 	 * Array is indexed by enum cfa_dir
24323 	 */
24324 	uint8_t	lkup_static_bkt_cnt_exp[2];
24325 	uint8_t	rsvd;
24326 	uint32_t	rsvd2[2];
24327 } __rte_packed_end;
24328 
24329 /* Common structure to cast crypto key split entries. This casting is required
24330  * in the following HWRM command inputs/outputs if the backing store type is
24331  * TX_CK or RX_CK.
24332  * 1. hwrm_func_backing_store_cfg_v2_input
24333  * 2. hwrm_func_backing_store_qcfg_v2_output
24334  * 3. hwrm_func_backing_store_qcaps_v2_output
24335  */
24336 /* ck_split_entries (size:128b/16B) */
24337 struct __rte_packed_begin ck_split_entries {
24338 	/*
24339 	 * Number of QUIC backing store entries. That means the number of KTLS
24340 	 * backing store entries is the difference between this number and the
24341 	 * total number of crypto key entries.
24342 	 */
24343 	uint32_t	num_quic_entries;
24344 	uint32_t	rsvd;
24345 	uint32_t	rsvd2[2];
24346 } __rte_packed_end;
24347 
24348 /************************************
24349  * hwrm_func_backing_store_qcaps_v2 *
24350  ************************************/
24351 
24352 
24353 /* hwrm_func_backing_store_qcaps_v2_input (size:192b/24B) */
24354 struct __rte_packed_begin hwrm_func_backing_store_qcaps_v2_input {
24355 	/* The HWRM command request type. */
24356 	uint16_t	req_type;
24357 	/*
24358 	 * The completion ring to send the completion event on. This should
24359 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24360 	 */
24361 	uint16_t	cmpl_ring;
24362 	/*
24363 	 * The sequence ID is used by the driver for tracking multiple
24364 	 * commands. This ID is treated as opaque data by the firmware and
24365 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24366 	 */
24367 	uint16_t	seq_id;
24368 	/*
24369 	 * The target ID of the command:
24370 	 * * 0x0-0xFFF8 - The function ID
24371 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24372 	 * * 0xFFFD - Reserved for user-space HWRM interface
24373 	 * * 0xFFFF - HWRM
24374 	 */
24375 	uint16_t	target_id;
24376 	/*
24377 	 * A physical address pointer pointing to a host buffer that the
24378 	 * command's response data will be written. This can be either a host
24379 	 * physical address (HPA) or a guest physical address (GPA) and must
24380 	 * point to a physically contiguous block of memory.
24381 	 */
24382 	uint64_t	resp_addr;
24383 	/* Type of backing store to be queried. */
24384 	uint16_t	type;
24385 	/* Queue pair. */
24386 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_QP \
24387 		UINT32_C(0x0)
24388 	/* Shared receive queue. */
24389 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SRQ \
24390 		UINT32_C(0x1)
24391 	/* Completion queue. */
24392 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_CQ \
24393 		UINT32_C(0x2)
24394 	/* Virtual NIC. */
24395 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_VNIC \
24396 		UINT32_C(0x3)
24397 	/* Statistic context. */
24398 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_STAT \
24399 		UINT32_C(0x4)
24400 	/* Slow-path TQM ring. */
24401 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SP_TQM_RING \
24402 		UINT32_C(0x5)
24403 	/* Fast-path TQM ring. */
24404 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_FP_TQM_RING \
24405 		UINT32_C(0x6)
24406 	/* Memory Region and Memory Address Vector Context. */
24407 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_MRAV \
24408 		UINT32_C(0xe)
24409 	/* TIM. */
24410 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_TIM \
24411 		UINT32_C(0xf)
24412 	/* Tx crypto key. */
24413 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_TX_CK \
24414 		UINT32_C(0x13)
24415 	/* Rx crypto key. */
24416 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_RX_CK \
24417 		UINT32_C(0x14)
24418 	/* Mid-path TQM ring. */
24419 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_MP_TQM_RING \
24420 		UINT32_C(0x15)
24421 	/* SQ Doorbell shadow region. */
24422 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SQ_DB_SHADOW \
24423 		UINT32_C(0x16)
24424 	/* RQ Doorbell shadow region. */
24425 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_RQ_DB_SHADOW \
24426 		UINT32_C(0x17)
24427 	/* SRQ Doorbell shadow region. */
24428 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SRQ_DB_SHADOW \
24429 		UINT32_C(0x18)
24430 	/* CQ Doorbell shadow region. */
24431 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_CQ_DB_SHADOW \
24432 		UINT32_C(0x19)
24433 	/* CFA table scope context. */
24434 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_TBL_SCOPE \
24435 		UINT32_C(0x1c)
24436 	/* XID partition context. */
24437 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_XID_PARTITION \
24438 		UINT32_C(0x1d)
24439 	/* SRT trace. */
24440 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SRT_TRACE \
24441 		UINT32_C(0x1e)
24442 	/* SRT2 trace. */
24443 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_SRT2_TRACE \
24444 		UINT32_C(0x1f)
24445 	/* CRT trace. */
24446 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_CRT_TRACE \
24447 		UINT32_C(0x20)
24448 	/* CRT2 trace. */
24449 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_CRT2_TRACE \
24450 		UINT32_C(0x21)
24451 	/* RIGP0 trace. */
24452 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_RIGP0_TRACE \
24453 		UINT32_C(0x22)
24454 	/* L2 HWRM trace. */
24455 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_L2_HWRM_TRACE \
24456 		UINT32_C(0x23)
24457 	/* RoCE HWRM trace. */
24458 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_ROCE_HWRM_TRACE \
24459 		UINT32_C(0x24)
24460 	/* Invalid type. */
24461 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_INVALID \
24462 		UINT32_C(0xffff)
24463 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_LAST \
24464 		HWRM_FUNC_BACKING_STORE_QCAPS_V2_INPUT_TYPE_INVALID
24465 	uint8_t	rsvd[6];
24466 } __rte_packed_end;
24467 
24468 /* hwrm_func_backing_store_qcaps_v2_output (size:448b/56B) */
24469 struct __rte_packed_begin hwrm_func_backing_store_qcaps_v2_output {
24470 	/* The specific error status for the command. */
24471 	uint16_t	error_code;
24472 	/* The HWRM command request type. */
24473 	uint16_t	req_type;
24474 	/* The sequence ID from the original command. */
24475 	uint16_t	seq_id;
24476 	/* The length of the response data in number of bytes. */
24477 	uint16_t	resp_len;
24478 	/* Type of backing store to be queried. */
24479 	uint16_t	type;
24480 	/* Queue pair. */
24481 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_QP \
24482 		UINT32_C(0x0)
24483 	/* Shared receive queue. */
24484 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SRQ \
24485 		UINT32_C(0x1)
24486 	/* Completion queue. */
24487 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_CQ \
24488 		UINT32_C(0x2)
24489 	/* Virtual NIC. */
24490 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_VNIC \
24491 		UINT32_C(0x3)
24492 	/* Statistic context. */
24493 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_STAT \
24494 		UINT32_C(0x4)
24495 	/* Slow-path TQM ring. */
24496 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SP_TQM_RING \
24497 		UINT32_C(0x5)
24498 	/* Fast-path TQM ring. */
24499 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_FP_TQM_RING \
24500 		UINT32_C(0x6)
24501 	/* Memory Region and Memory Address Vector Context. */
24502 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_MRAV \
24503 		UINT32_C(0xe)
24504 	/* TIM. */
24505 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_TIM \
24506 		UINT32_C(0xf)
24507 	/* Tx crypto key. */
24508 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_TX_CK \
24509 		UINT32_C(0x13)
24510 	/* Rx crypto key. */
24511 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_RX_CK \
24512 		UINT32_C(0x14)
24513 	/* Mid-path TQM ring. */
24514 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_MP_TQM_RING \
24515 		UINT32_C(0x15)
24516 	/* SQ Doorbell shadow region. */
24517 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SQ_DB_SHADOW \
24518 		UINT32_C(0x16)
24519 	/* RQ Doorbell shadow region. */
24520 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_RQ_DB_SHADOW \
24521 		UINT32_C(0x17)
24522 	/* SRQ Doorbell shadow region. */
24523 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SRQ_DB_SHADOW \
24524 		UINT32_C(0x18)
24525 	/* CQ Doorbell shadow region. */
24526 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_CQ_DB_SHADOW \
24527 		UINT32_C(0x19)
24528 	/* CFA table scope context. */
24529 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_TBL_SCOPE \
24530 		UINT32_C(0x1c)
24531 	/* XID partition context. */
24532 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_XID_PARTITION \
24533 		UINT32_C(0x1d)
24534 	/* SRT trace. */
24535 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SRT_TRACE \
24536 		UINT32_C(0x1e)
24537 	/* SRT2 trace. */
24538 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_SRT2_TRACE \
24539 		UINT32_C(0x1f)
24540 	/* CRT trace. */
24541 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_CRT_TRACE \
24542 		UINT32_C(0x20)
24543 	/* CRT2 trace. */
24544 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_CRT2_TRACE \
24545 		UINT32_C(0x21)
24546 	/* RIGP0 trace. */
24547 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_RIGP0_TRACE \
24548 		UINT32_C(0x22)
24549 	/* L2 HWRM trace. */
24550 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_L2_HWRM_TRACE \
24551 		UINT32_C(0x23)
24552 	/* RoCE HWRM trace. */
24553 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_ROCE_HWRM_TRACE \
24554 		UINT32_C(0x24)
24555 	/* Invalid type. */
24556 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_INVALID \
24557 		UINT32_C(0xffff)
24558 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_LAST \
24559 		HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_TYPE_INVALID
24560 	/* Number of bytes per backing store entry. */
24561 	uint16_t	entry_size;
24562 	/* Control flags. */
24563 	uint32_t	flags;
24564 	/*
24565 	 * When set, it indicates the context type should be initialized
24566 	 * with the 'ctx_init_value' at the specified offset.
24567 	 */
24568 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_ENABLE_CTX_KIND_INIT \
24569 		UINT32_C(0x1)
24570 	/* When set, it indicates the context type is valid. */
24571 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_TYPE_VALID \
24572 		UINT32_C(0x2)
24573 	/*
24574 	 * When set, it indicates the region for this type is not a regular
24575 	 * context memory but a driver managed memory that is created,
24576 	 * initialized and managed by the driver.
24577 	 */
24578 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_DRIVER_MANAGED_MEMORY \
24579 		UINT32_C(0x4)
24580 	/*
24581 	 * When set, it indicates the support of the following capability
24582 	 * that is specific to the QP type:
24583 	 * - For 2-port adapters, the ability to extend the RoCE QP
24584 	 *   entries configured on a PF, during some network events such as
24585 	 *   Link Down. These additional entries count is included in the
24586 	 *   advertised 'max_num_entries'.
24587 	 * - The count of RoCE QP entries, derived from 'max_num_entries'
24588 	 *   (max_num_entries - qp_num_qp1_entries - qp_num_l2_entries -
24589 	 *   qp_num_fast_qpmd_entries, note qp_num_fast_qpmd_entries is
24590 	 *   always zero when QPs are pseudo-statically allocated), includes
24591 	 *   the count of QPs that can be migrated from the other PF (e.g.,
24592 	 *   during network link down). Therefore, during normal operation
24593 	 *   when both PFs are active, the supported number of RoCE QPs for
24594 	 *   each of the PF is half of the advertised value.
24595 	 */
24596 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_FLAGS_ROCE_QP_PSEUDO_STATIC_ALLOC \
24597 		UINT32_C(0x8)
24598 	/*
24599 	 * Bit map of the valid instances associated with the
24600 	 * backing store type.
24601 	 * 1. If the backing store type is MPC TQM ring, use the following
24602 	 *    bits to map to MPC clients:
24603 	 *    TCE (0), RCE (1), TE_CFA(2), RE_CFA (3), PRIMATE(4)
24604 	 * 2. If the backing store type is TBL_SCOPE, use the following
24605 	 *    bits to map to table scope regions:
24606 	 *    RE_CFA_LKUP (0), RE_CFA_ACT (1), TE_CFA_LKUP(2), TE_CFA_ACT (3)
24607 	 * 3. If the backing store type is VF XID partition in-use table, use
24608 	 *    the following bits to map to context types:
24609 	 *    TX_CK (0), RX_CK (1)
24610 	 */
24611 	uint32_t	instance_bit_map;
24612 	/*
24613 	 * Initializer to be used by drivers to initialize context memory
24614 	 * to ensure context subsystem flags an error for an attack before
24615 	 * the first time context load.
24616 	 */
24617 	uint8_t	ctx_init_value;
24618 	/*
24619 	 * Specifies the doubleword offset of ctx_init_value for this
24620 	 * context type.
24621 	 */
24622 	uint8_t	ctx_init_offset;
24623 	/*
24624 	 * Some backing store types, e.g., TQM rings, require the number
24625 	 * of entries to be a multiple of this value to prevent any
24626 	 * resource allocation limitations. If not applicable, leave
24627 	 * this field with "0".
24628 	 */
24629 	uint8_t	entry_multiple;
24630 	uint8_t	rsvd;
24631 	/* Maximum number of backing store entries supported for this type. */
24632 	uint32_t	max_num_entries;
24633 	/*
24634 	 * Minimum number of backing store entries required for this type.
24635 	 * This field is only valid for some backing store types, e.g.,
24636 	 * TQM rings. If not applicable, leave this field with "0".
24637 	 */
24638 	uint32_t	min_num_entries;
24639 	/*
24640 	 * Next valid backing store type. If current type queried is already
24641 	 * the last valid type, firmware must set this field to invalid type.
24642 	 */
24643 	uint16_t	next_valid_type;
24644 	/*
24645 	 * This field counts how many split entries contain valid data.
24646 	 * Below is the table that maps the count value:
24647 	 * | count |                     Indication                     |
24648 	 * | ----- | -------------------------------------------------- |
24649 	 * |   0   | None of the split entries has valid data.          |
24650 	 * |   1   | Only "split_entry_0" contains valid data.          |
24651 	 * |   2   | Only "split_entry_0" and "1" have valid data.      |
24652 	 * |   3   | Only "split_entry_0", "1" and "2" have valid data. |
24653 	 * |   4   | All four split entries have valid data.            |
24654 	 */
24655 	uint8_t	subtype_valid_cnt;
24656 	/*
24657 	 * Bitmap that indicates if each of the 'split_entry' denotes an
24658 	 * exact count (i.e., min = max). When the exact count bit is set,
24659 	 * it indicates the exact number of entries as advertised has to be
24660 	 * configured. The 'split_entry' to be set to contain exact count by
24661 	 * this bitmap needs to be a valid split entry specified by
24662 	 * 'subtype_valid_cnt'.
24663 	 */
24664 	uint8_t	exact_cnt_bit_map;
24665 	/*
24666 	 * When this bit is '1', it indicates 'split_entry_0' contains
24667 	 * an exact count.
24668 	 */
24669 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_SPLIT_ENTRY_0_EXACT \
24670 		UINT32_C(0x1)
24671 	/*
24672 	 * When this bit is '1', it indicates 'split_entry_1' contains
24673 	 * an exact count.
24674 	 */
24675 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_SPLIT_ENTRY_1_EXACT \
24676 		UINT32_C(0x2)
24677 	/*
24678 	 * When this bit is '1', it indicates 'split_entry_2' contains
24679 	 * an exact count.
24680 	 */
24681 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_SPLIT_ENTRY_2_EXACT \
24682 		UINT32_C(0x4)
24683 	/*
24684 	 * When this bit is '1', it indicates 'split_entry_3' contains
24685 	 * an exact count.
24686 	 */
24687 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_SPLIT_ENTRY_3_EXACT \
24688 		UINT32_C(0x8)
24689 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_UNUSED_MASK \
24690 		UINT32_C(0xf0)
24691 	#define HWRM_FUNC_BACKING_STORE_QCAPS_V2_OUTPUT_EXACT_CNT_BIT_MAP_UNUSED_SFT \
24692 		4
24693 	/*
24694 	 * Split entry #0. Note that the four split entries (as a group)
24695 	 * must be cast to a type-specific data structure first before
24696 	 * accessing it! Below is the table that maps a backing store
24697 	 * type to the associated split entry casting data structure.
24698 	 * | Type |       Split Entry Casting Data Structure           |
24699 	 * | ---- | -------------------------------------------------- |
24700 	 * | QPC  |             qpc_split_entries                      |
24701 	 * | SRQ  |             srq_split_entries                      |
24702 	 * | CQ   |             cq_split_entries                       |
24703 	 * | VINC |            vnic_split_entries                      |
24704 	 * | MRAV |            mrav_split_entries                      |
24705 	 * | TS   |             ts_split_entries                       |
24706 	 */
24707 	uint32_t	split_entry_0;
24708 	/* Split entry #1. */
24709 	uint32_t	split_entry_1;
24710 	/* Split entry #2. */
24711 	uint32_t	split_entry_2;
24712 	/* Split entry #3. */
24713 	uint32_t	split_entry_3;
24714 	uint8_t	rsvd3[3];
24715 	/*
24716 	 * This field is used in Output records to indicate that the
24717 	 * output is completely written to RAM. This field should be
24718 	 * read as '1' to indicate that the output has been completely
24719 	 * written. When writing a command completion or response to
24720 	 * an internal processor, the order of writes has to be such
24721 	 * that this field is written last.
24722 	 */
24723 	uint8_t	valid;
24724 } __rte_packed_end;
24725 
24726 /****************************
24727  * hwrm_func_dbr_pacing_cfg *
24728  ****************************/
24729 
24730 
24731 /* hwrm_func_dbr_pacing_cfg_input (size:320b/40B) */
24732 struct __rte_packed_begin hwrm_func_dbr_pacing_cfg_input {
24733 	/* The HWRM command request type. */
24734 	uint16_t	req_type;
24735 	/*
24736 	 * The completion ring to send the completion event on. This should
24737 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24738 	 */
24739 	uint16_t	cmpl_ring;
24740 	/*
24741 	 * The sequence ID is used by the driver for tracking multiple
24742 	 * commands. This ID is treated as opaque data by the firmware and
24743 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24744 	 */
24745 	uint16_t	seq_id;
24746 	/*
24747 	 * The target ID of the command:
24748 	 * * 0x0-0xFFF8 - The function ID
24749 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24750 	 * * 0xFFFD - Reserved for user-space HWRM interface
24751 	 * * 0xFFFF - HWRM
24752 	 */
24753 	uint16_t	target_id;
24754 	/*
24755 	 * A physical address pointer pointing to a host buffer that the
24756 	 * command's response data will be written. This can be either a host
24757 	 * physical address (HPA) or a guest physical address (GPA) and must
24758 	 * point to a physically contiguous block of memory.
24759 	 */
24760 	uint64_t	resp_addr;
24761 	uint8_t	flags;
24762 	/*
24763 	 * This bit must be '1' to enable DBR NQ events. The NQ ID to
24764 	 * receive the events must be specified in the primary_nq_id
24765 	 * field.
24766 	 */
24767 	#define HWRM_FUNC_DBR_PACING_CFG_INPUT_FLAGS_DBR_NQ_EVENT_ENABLE \
24768 		UINT32_C(0x1)
24769 	/* This bit must be '1' to disable DBR NQ events. */
24770 	#define HWRM_FUNC_DBR_PACING_CFG_INPUT_FLAGS_DBR_NQ_EVENT_DISABLE \
24771 		UINT32_C(0x2)
24772 	uint8_t	unused_0[7];
24773 	uint32_t	enables;
24774 	/*
24775 	 * This bit must be '1' for the primary_nq_id field to be
24776 	 * configured.
24777 	 */
24778 	#define HWRM_FUNC_DBR_PACING_CFG_INPUT_ENABLES_PRIMARY_NQ_ID_VALID \
24779 		UINT32_C(0x1)
24780 	/*
24781 	 * This bit must be '1' for the pacing_threshold field to be
24782 	 * configured.
24783 	 */
24784 	#define HWRM_FUNC_DBR_PACING_CFG_INPUT_ENABLES_PACING_THRESHOLD_VALID \
24785 		UINT32_C(0x2)
24786 	/*
24787 	 * Specify primary function's NQ ID to receive the doorbell pacing
24788 	 * threshold crossing events.
24789 	 */
24790 	uint32_t	primary_nq_id;
24791 	/*
24792 	 * Specify pacing threshold value, as a percentage of the max
24793 	 * doorbell FIFO depth. The range is 1 to 36.
24794 	 */
24795 	uint32_t	pacing_threshold;
24796 	uint8_t	unused_1[4];
24797 } __rte_packed_end;
24798 
24799 /* hwrm_func_dbr_pacing_cfg_output (size:128b/16B) */
24800 struct __rte_packed_begin hwrm_func_dbr_pacing_cfg_output {
24801 	/* The specific error status for the command. */
24802 	uint16_t	error_code;
24803 	/* The HWRM command request type. */
24804 	uint16_t	req_type;
24805 	/* The sequence ID from the original command. */
24806 	uint16_t	seq_id;
24807 	/* The length of the response data in number of bytes. */
24808 	uint16_t	resp_len;
24809 	uint8_t	unused_0[7];
24810 	/*
24811 	 * This field is used in Output records to indicate that the output
24812 	 * is completely written to RAM. This field should be read as '1'
24813 	 * to indicate that the output has been completely written.
24814 	 * When writing a command completion or response to an internal
24815 	 * processor, the order of writes has to be such that this field is
24816 	 * written last.
24817 	 */
24818 	uint8_t	valid;
24819 } __rte_packed_end;
24820 
24821 /*****************************
24822  * hwrm_func_dbr_pacing_qcfg *
24823  *****************************/
24824 
24825 
24826 /* hwrm_func_dbr_pacing_qcfg_input (size:128b/16B) */
24827 struct __rte_packed_begin hwrm_func_dbr_pacing_qcfg_input {
24828 	/* The HWRM command request type. */
24829 	uint16_t	req_type;
24830 	/*
24831 	 * The completion ring to send the completion event on. This should
24832 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
24833 	 */
24834 	uint16_t	cmpl_ring;
24835 	/*
24836 	 * The sequence ID is used by the driver for tracking multiple
24837 	 * commands. This ID is treated as opaque data by the firmware and
24838 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
24839 	 */
24840 	uint16_t	seq_id;
24841 	/*
24842 	 * The target ID of the command:
24843 	 * * 0x0-0xFFF8 - The function ID
24844 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
24845 	 * * 0xFFFD - Reserved for user-space HWRM interface
24846 	 * * 0xFFFF - HWRM
24847 	 */
24848 	uint16_t	target_id;
24849 	/*
24850 	 * A physical address pointer pointing to a host buffer that the
24851 	 * command's response data will be written. This can be either a host
24852 	 * physical address (HPA) or a guest physical address (GPA) and must
24853 	 * point to a physically contiguous block of memory.
24854 	 */
24855 	uint64_t	resp_addr;
24856 } __rte_packed_end;
24857 
24858 /* hwrm_func_dbr_pacing_qcfg_output (size:512b/64B) */
24859 struct __rte_packed_begin hwrm_func_dbr_pacing_qcfg_output {
24860 	/* The specific error status for the command. */
24861 	uint16_t	error_code;
24862 	/* The HWRM command request type. */
24863 	uint16_t	req_type;
24864 	/* The sequence ID from the original command. */
24865 	uint16_t	seq_id;
24866 	/* The length of the response data in number of bytes. */
24867 	uint16_t	resp_len;
24868 	uint8_t	flags;
24869 	/* When this bit is '1', it indicates DBR NQ events are enabled. */
24870 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_FLAGS_DBR_NQ_EVENT_ENABLED \
24871 		UINT32_C(0x1)
24872 	uint8_t	unused_0[7];
24873 	/*
24874 	 * The Doorbell global FIFO occupancy register. This field should be
24875 	 * used by the driver and user library in the doorbell pacing
24876 	 * algorithm. Lower 2 bits indicates address space location and upper
24877 	 * 30 bits indicates upper 30bits of the register address. A value of
24878 	 * 0xFFFF-FFFF indicates this register does not exist.
24879 	 */
24880 	uint32_t	dbr_stat_db_fifo_reg;
24881 	/* Lower 2 bits indicates address space location. */
24882 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_MASK \
24883 		UINT32_C(0x3)
24884 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_SFT \
24885 		0
24886 	/*
24887 	 * If value is 0, this register is located in PCIe config space.
24888 	 * Drivers have to map appropriate window to access this
24889 	 * register.
24890 	 */
24891 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_PCIE_CFG \
24892 		UINT32_C(0x0)
24893 	/*
24894 	 * If value is 1, this register is located in GRC address space.
24895 	 * Drivers have to map appropriate window to access this
24896 	 * register.
24897 	 */
24898 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_GRC \
24899 		UINT32_C(0x1)
24900 	/*
24901 	 * If value is 2, this register is located in first BAR address
24902 	 * space. Drivers have to map appropriate window to access this
24903 	 * register.
24904 	 */
24905 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_BAR0 \
24906 		UINT32_C(0x2)
24907 	/*
24908 	 * If value is 3, this register is located in second BAR address
24909 	 * space. Drivers have to map appropriate window to access this
24910 	 * Drivers have to map appropriate window to access this
24911 	 * register.
24912 	 */
24913 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_BAR1 \
24914 		UINT32_C(0x3)
24915 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_LAST \
24916 		HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SPACE_BAR1
24917 	/* Upper 30bits of the register address. */
24918 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_MASK \
24919 		UINT32_C(0xfffffffc)
24920 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_STAT_DB_FIFO_REG_ADDR_SFT \
24921 		2
24922 	/*
24923 	 * This field indicates the mask value for dbr_stat_db_fifo_reg
24924 	 * to get the high watermark for doorbell FIFO.
24925 	 */
24926 	uint32_t	dbr_stat_db_fifo_reg_watermark_mask;
24927 	/*
24928 	 * This field indicates the shift value for dbr_stat_db_fifo_reg
24929 	 * to get the high watermark for doorbell FIFO.
24930 	 */
24931 	uint8_t	dbr_stat_db_fifo_reg_watermark_shift;
24932 	uint8_t	unused_1[3];
24933 	/*
24934 	 * This field indicates the mask value for dbr_stat_db_fifo_reg
24935 	 * to get the amount of room left for doorbell FIFO.
24936 	 */
24937 	uint32_t	dbr_stat_db_fifo_reg_fifo_room_mask;
24938 	/*
24939 	 * This field indicates the shift value for dbr_stat_db_fifo_reg
24940 	 * to get the amount of room left for doorbell FIFO.
24941 	 */
24942 	uint8_t	dbr_stat_db_fifo_reg_fifo_room_shift;
24943 	uint8_t	unused_2[3];
24944 	/*
24945 	 * DBR_REG_AEQ_ARM register. This field should be used by the driver
24946 	 * to rearm the interrupt for regeneration of a notification to the
24947 	 * host from the hardware when the global doorbell occupancy threshold
24948 	 * is above the threshold value. Lower 2 bits indicates address space
24949 	 * location and upper 30 bits indicates upper 30bits of the register
24950 	 * address. A value of 0xFFFF-FFFF indicates this register does not
24951 	 * exist.
24952 	 */
24953 	uint32_t	dbr_throttling_aeq_arm_reg;
24954 	/* Lower 2 bits indicates address space location. */
24955 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_MASK \
24956 		UINT32_C(0x3)
24957 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_SFT \
24958 		0
24959 	/*
24960 	 * If value is 0, this register is located in PCIe config space.
24961 	 * Drivers have to map appropriate window to access this
24962 	 * register.
24963 	 */
24964 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_PCIE_CFG \
24965 		UINT32_C(0x0)
24966 	/*
24967 	 * If value is 1, this register is located in GRC address space.
24968 	 * Drivers have to map appropriate window to access this
24969 	 * register.
24970 	 */
24971 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_GRC \
24972 		UINT32_C(0x1)
24973 	/*
24974 	 * If value is 2, this register is located in first BAR address
24975 	 * space. Drivers have to map appropriate window to access this
24976 	 * register.
24977 	 */
24978 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_BAR0 \
24979 		UINT32_C(0x2)
24980 	/*
24981 	 * If value is 3, this register is located in second BAR address
24982 	 * space. Drivers have to map appropriate window to access this
24983 	 * Drivers have to map appropriate window to access this
24984 	 * register.
24985 	 */
24986 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_BAR1 \
24987 		UINT32_C(0x3)
24988 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_LAST \
24989 		HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SPACE_BAR1
24990 	/* Upper 30bits of the register address. */
24991 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_MASK \
24992 		UINT32_C(0xfffffffc)
24993 	#define HWRM_FUNC_DBR_PACING_QCFG_OUTPUT_DBR_THROTTLING_AEQ_ARM_REG_ADDR_SFT \
24994 		2
24995 	/*
24996 	 * This field indicates the value to be written for
24997 	 * dbr_throttling_aeq_arm_reg register.
24998 	 */
24999 	uint8_t	dbr_throttling_aeq_arm_reg_val;
25000 	uint8_t	unused_3[3];
25001 	/* This field indicates the maximum depth of the doorbell FIFO. */
25002 	uint32_t	dbr_stat_db_max_fifo_depth;
25003 	/*
25004 	 * Specifies primary function's NQ ID.
25005 	 * A value of 0xFFFF FFFF indicates NQ ID is invalid.
25006 	 */
25007 	uint32_t	primary_nq_id;
25008 	/*
25009 	 * Specifies the pacing threshold value, as a percentage of the
25010 	 * max doorbell FIFO depth. The range is 1 to 100.
25011 	 */
25012 	uint32_t	pacing_threshold;
25013 	uint8_t	unused_4[7];
25014 	/*
25015 	 * This field is used in Output records to indicate that the output
25016 	 * is completely written to RAM. This field should be read as '1'
25017 	 * to indicate that the output has been completely written.
25018 	 * When writing a command completion or response to an internal
25019 	 * processor, the order of writes has to be such that this field is
25020 	 * written last.
25021 	 */
25022 	uint8_t	valid;
25023 } __rte_packed_end;
25024 
25025 /****************************************
25026  * hwrm_func_dbr_pacing_broadcast_event *
25027  ****************************************/
25028 
25029 
25030 /* hwrm_func_dbr_pacing_broadcast_event_input (size:128b/16B) */
25031 struct __rte_packed_begin hwrm_func_dbr_pacing_broadcast_event_input {
25032 	/* The HWRM command request type. */
25033 	uint16_t	req_type;
25034 	/*
25035 	 * The completion ring to send the completion event on. This should
25036 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25037 	 */
25038 	uint16_t	cmpl_ring;
25039 	/*
25040 	 * The sequence ID is used by the driver for tracking multiple
25041 	 * commands. This ID is treated as opaque data by the firmware and
25042 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25043 	 */
25044 	uint16_t	seq_id;
25045 	/*
25046 	 * The target ID of the command:
25047 	 * * 0x0-0xFFF8 - The function ID
25048 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25049 	 * * 0xFFFD - Reserved for user-space HWRM interface
25050 	 * * 0xFFFF - HWRM
25051 	 */
25052 	uint16_t	target_id;
25053 	/*
25054 	 * A physical address pointer pointing to a host buffer that the
25055 	 * command's response data will be written. This can be either a host
25056 	 * physical address (HPA) or a guest physical address (GPA) and must
25057 	 * point to a physically contiguous block of memory.
25058 	 */
25059 	uint64_t	resp_addr;
25060 } __rte_packed_end;
25061 
25062 /* hwrm_func_dbr_pacing_broadcast_event_output (size:128b/16B) */
25063 struct __rte_packed_begin hwrm_func_dbr_pacing_broadcast_event_output {
25064 	/* The specific error status for the command. */
25065 	uint16_t	error_code;
25066 	/* The HWRM command request type. */
25067 	uint16_t	req_type;
25068 	/* The sequence ID from the original command. */
25069 	uint16_t	seq_id;
25070 	/* The length of the response data in number of bytes. */
25071 	uint16_t	resp_len;
25072 	uint8_t	unused_0[7];
25073 	/*
25074 	 * This field is used in Output records to indicate that the output
25075 	 * is completely written to RAM. This field should be read as '1'
25076 	 * to indicate that the output has been completely written.
25077 	 * When writing a command completion or response to an internal
25078 	 * processor, the order of writes has to be such that this field is
25079 	 * written last.
25080 	 */
25081 	uint8_t	valid;
25082 } __rte_packed_end;
25083 
25084 /*************************************
25085  * hwrm_func_dbr_pacing_nqlist_query *
25086  *************************************/
25087 
25088 
25089 /* hwrm_func_dbr_pacing_nqlist_query_input (size:128b/16B) */
25090 struct __rte_packed_begin hwrm_func_dbr_pacing_nqlist_query_input {
25091 	/* The HWRM command request type. */
25092 	uint16_t	req_type;
25093 	/*
25094 	 * The completion ring to send the completion event on. This should
25095 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25096 	 */
25097 	uint16_t	cmpl_ring;
25098 	/*
25099 	 * The sequence ID is used by the driver for tracking multiple
25100 	 * commands. This ID is treated as opaque data by the firmware and
25101 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25102 	 */
25103 	uint16_t	seq_id;
25104 	/*
25105 	 * The target ID of the command:
25106 	 * * 0x0-0xFFF8 - The function ID
25107 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25108 	 * * 0xFFFD - Reserved for user-space HWRM interface
25109 	 * * 0xFFFF - HWRM
25110 	 */
25111 	uint16_t	target_id;
25112 	/*
25113 	 * A physical address pointer pointing to a host buffer that the
25114 	 * command's response data will be written. This can be either a host
25115 	 * physical address (HPA) or a guest physical address (GPA) and must
25116 	 * point to a physically contiguous block of memory.
25117 	 */
25118 	uint64_t	resp_addr;
25119 } __rte_packed_end;
25120 
25121 /* hwrm_func_dbr_pacing_nqlist_query_output (size:384b/48B) */
25122 struct __rte_packed_begin hwrm_func_dbr_pacing_nqlist_query_output {
25123 	/* The specific error status for the command. */
25124 	uint16_t	error_code;
25125 	/* The HWRM command request type. */
25126 	uint16_t	req_type;
25127 	/* The sequence ID from the original command. */
25128 	uint16_t	seq_id;
25129 	/* The length of the response data in number of bytes. */
25130 	uint16_t	resp_len;
25131 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25132 	uint16_t	nq_ring_id0;
25133 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25134 	uint16_t	nq_ring_id1;
25135 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25136 	uint16_t	nq_ring_id2;
25137 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25138 	uint16_t	nq_ring_id3;
25139 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25140 	uint16_t	nq_ring_id4;
25141 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25142 	uint16_t	nq_ring_id5;
25143 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25144 	uint16_t	nq_ring_id6;
25145 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25146 	uint16_t	nq_ring_id7;
25147 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25148 	uint16_t	nq_ring_id8;
25149 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25150 	uint16_t	nq_ring_id9;
25151 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25152 	uint16_t	nq_ring_id10;
25153 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25154 	uint16_t	nq_ring_id11;
25155 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25156 	uint16_t	nq_ring_id12;
25157 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25158 	uint16_t	nq_ring_id13;
25159 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25160 	uint16_t	nq_ring_id14;
25161 	/* ID of an NQ ring allocated for DBR pacing notifications. */
25162 	uint16_t	nq_ring_id15;
25163 	/* Number of consecutive NQ ring IDs populated in the response. */
25164 	uint32_t	num_nqs;
25165 	uint8_t	unused_0[3];
25166 	/*
25167 	 * This field is used in Output records to indicate that the output
25168 	 * is completely written to RAM. This field should be read as '1'
25169 	 * to indicate that the output has been completely written. When
25170 	 * writing a command completion or response to an internal processor,
25171 	 * the order of writes has to be such that this field is written last.
25172 	 */
25173 	uint8_t	valid;
25174 } __rte_packed_end;
25175 
25176 /************************************
25177  * hwrm_func_dbr_recovery_completed *
25178  ************************************/
25179 
25180 
25181 /* hwrm_func_dbr_recovery_completed_input (size:192b/24B) */
25182 struct __rte_packed_begin hwrm_func_dbr_recovery_completed_input {
25183 	/* The HWRM command request type. */
25184 	uint16_t	req_type;
25185 	/*
25186 	 * The completion ring to send the completion event on. This should
25187 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25188 	 */
25189 	uint16_t	cmpl_ring;
25190 	/*
25191 	 * The sequence ID is used by the driver for tracking multiple
25192 	 * commands. This ID is treated as opaque data by the firmware and
25193 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25194 	 */
25195 	uint16_t	seq_id;
25196 	/*
25197 	 * The target ID of the command:
25198 	 * * 0x0-0xFFF8 - The function ID
25199 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25200 	 * * 0xFFFD - Reserved for user-space HWRM interface
25201 	 * * 0xFFFF - HWRM
25202 	 */
25203 	uint16_t	target_id;
25204 	/*
25205 	 * A physical address pointer pointing to a host buffer that the
25206 	 * command's response data will be written. This can be either a host
25207 	 * physical address (HPA) or a guest physical address (GPA) and must
25208 	 * point to a physically contiguous block of memory.
25209 	 */
25210 	uint64_t	resp_addr;
25211 	/*
25212 	 * Specifies the epoch value with the one that was specified by the
25213 	 * firmware in the error_report_doorbell_drop_threshold async event
25214 	 * corresponding to the specific recovery cycle.
25215 	 */
25216 	uint32_t	epoch;
25217 	/* The epoch value. */
25218 	#define HWRM_FUNC_DBR_RECOVERY_COMPLETED_INPUT_EPOCH_VALUE_MASK \
25219 		UINT32_C(0xffffff)
25220 	#define HWRM_FUNC_DBR_RECOVERY_COMPLETED_INPUT_EPOCH_VALUE_SFT 0
25221 	uint8_t	unused_0[4];
25222 } __rte_packed_end;
25223 
25224 /* hwrm_func_dbr_recovery_completed_output (size:128b/16B) */
25225 struct __rte_packed_begin hwrm_func_dbr_recovery_completed_output {
25226 	/* The specific error status for the command. */
25227 	uint16_t	error_code;
25228 	/* The HWRM command request type. */
25229 	uint16_t	req_type;
25230 	/* The sequence ID from the original command. */
25231 	uint16_t	seq_id;
25232 	/* The length of the response data in number of bytes. */
25233 	uint16_t	resp_len;
25234 	uint8_t	unused_0[7];
25235 	/*
25236 	 * This field is used in Output records to indicate that the output
25237 	 * is completely written to RAM. This field should be read as '1'
25238 	 * to indicate that the output has been completely written.
25239 	 * When writing a command completion or response to an internal
25240 	 * processor, the order of writes has to be such that this field is
25241 	 * written last.
25242 	 */
25243 	uint8_t	valid;
25244 } __rte_packed_end;
25245 
25246 /***********************
25247  * hwrm_func_synce_cfg *
25248  ***********************/
25249 
25250 
25251 /* hwrm_func_synce_cfg_input (size:192b/24B) */
25252 struct __rte_packed_begin hwrm_func_synce_cfg_input {
25253 	/* The HWRM command request type. */
25254 	uint16_t	req_type;
25255 	/*
25256 	 * The completion ring to send the completion event on. This should
25257 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25258 	 */
25259 	uint16_t	cmpl_ring;
25260 	/*
25261 	 * The sequence ID is used by the driver for tracking multiple
25262 	 * commands. This ID is treated as opaque data by the firmware and
25263 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25264 	 */
25265 	uint16_t	seq_id;
25266 	/*
25267 	 * The target ID of the command:
25268 	 * * 0x0-0xFFF8 - The function ID
25269 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25270 	 * * 0xFFFD - Reserved for user-space HWRM interface
25271 	 * * 0xFFFF - HWRM
25272 	 */
25273 	uint16_t	target_id;
25274 	/*
25275 	 * A physical address pointer pointing to a host buffer that the
25276 	 * command's response data will be written. This can be either a host
25277 	 * physical address (HPA) or a guest physical address (GPA) and must
25278 	 * point to a physically contiguous block of memory.
25279 	 */
25280 	uint64_t	resp_addr;
25281 	uint8_t	enables;
25282 	/*
25283 	 * This bit must be '1' for the freq_profile field to be
25284 	 * configured.
25285 	 */
25286 	#define HWRM_FUNC_SYNCE_CFG_INPUT_ENABLES_FREQ_PROFILE \
25287 		UINT32_C(0x1)
25288 	/*
25289 	 * This bit must be '1' for the primary_clock_state field to be
25290 	 * configured.
25291 	 */
25292 	#define HWRM_FUNC_SYNCE_CFG_INPUT_ENABLES_PRIMARY_CLOCK \
25293 		UINT32_C(0x2)
25294 	/*
25295 	 * This bit must be '1' for the secondary_clock_state field to be
25296 	 * configured.
25297 	 */
25298 	#define HWRM_FUNC_SYNCE_CFG_INPUT_ENABLES_SECONDARY_CLOCK \
25299 		UINT32_C(0x4)
25300 	/* Frequency profile for SyncE recovered clock. */
25301 	uint8_t	freq_profile;
25302 	/* Invalid frequency profile */
25303 	#define HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_INVALID UINT32_C(0x0)
25304 	/* 25MHz SyncE clock profile */
25305 	#define HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_25MHZ   UINT32_C(0x1)
25306 	#define HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_LAST \
25307 		HWRM_FUNC_SYNCE_CFG_INPUT_FREQ_PROFILE_25MHZ
25308 	/*
25309 	 * Enable or disable primary clock for PF/port, overriding previous
25310 	 * primary clock setting.
25311 	 */
25312 	uint8_t	primary_clock_state;
25313 	/* Disable clock */
25314 	#define HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_DISABLE \
25315 		UINT32_C(0x0)
25316 	/* Enable clock */
25317 	#define HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_ENABLE \
25318 		UINT32_C(0x1)
25319 	#define HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_LAST \
25320 		HWRM_FUNC_SYNCE_CFG_INPUT_PRIMARY_CLOCK_STATE_ENABLE
25321 	/*
25322 	 * Enable or disable secondary clock for PF/port, overriding previous
25323 	 * secondary clock setting.
25324 	 */
25325 	uint8_t	secondary_clock_state;
25326 	/* Clock disabled */
25327 	#define HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_DISABLE \
25328 		UINT32_C(0x0)
25329 	/* Clock enabled */
25330 	#define HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_ENABLE \
25331 		UINT32_C(0x1)
25332 	#define HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_LAST \
25333 		HWRM_FUNC_SYNCE_CFG_INPUT_SECONDARY_CLOCK_STATE_ENABLE
25334 	uint8_t	unused_0[4];
25335 } __rte_packed_end;
25336 
25337 /* hwrm_func_synce_cfg_output (size:128b/16B) */
25338 struct __rte_packed_begin hwrm_func_synce_cfg_output {
25339 	/* The specific error status for the command. */
25340 	uint16_t	error_code;
25341 	/* The HWRM command request type. */
25342 	uint16_t	req_type;
25343 	/* The sequence ID from the original command. */
25344 	uint16_t	seq_id;
25345 	/* The length of the response data in number of bytes. */
25346 	uint16_t	resp_len;
25347 	uint8_t	unused_0[7];
25348 	/*
25349 	 * This field is used in Output records to indicate that the output
25350 	 * is completely written to RAM. This field should be read as '1'
25351 	 * to indicate that the output has been completely written. When
25352 	 * writing a command completion or response to an internal processor,
25353 	 * the order of writes has to be such that this field is written last.
25354 	 */
25355 	uint8_t	valid;
25356 } __rte_packed_end;
25357 
25358 /************************
25359  * hwrm_func_synce_qcfg *
25360  ************************/
25361 
25362 
25363 /* hwrm_func_synce_qcfg_input (size:192b/24B) */
25364 struct __rte_packed_begin hwrm_func_synce_qcfg_input {
25365 	/* The HWRM command request type. */
25366 	uint16_t	req_type;
25367 	/*
25368 	 * The completion ring to send the completion event on. This should
25369 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25370 	 */
25371 	uint16_t	cmpl_ring;
25372 	/*
25373 	 * The sequence ID is used by the driver for tracking multiple
25374 	 * commands. This ID is treated as opaque data by the firmware and
25375 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25376 	 */
25377 	uint16_t	seq_id;
25378 	/*
25379 	 * The target ID of the command:
25380 	 * * 0x0-0xFFF8 - The function ID
25381 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25382 	 * * 0xFFFD - Reserved for user-space HWRM interface
25383 	 * * 0xFFFF - HWRM
25384 	 */
25385 	uint16_t	target_id;
25386 	/*
25387 	 * A physical address pointer pointing to a host buffer that the
25388 	 * command's response data will be written. This can be either a host
25389 	 * physical address (HPA) or a guest physical address (GPA) and must
25390 	 * point to a physically contiguous block of memory.
25391 	 */
25392 	uint64_t	resp_addr;
25393 	uint8_t	unused_0[8];
25394 } __rte_packed_end;
25395 
25396 /* hwrm_func_synce_qcfg_output (size:128b/16B) */
25397 struct __rte_packed_begin hwrm_func_synce_qcfg_output {
25398 	/* The specific error status for the command. */
25399 	uint16_t	error_code;
25400 	/* The HWRM command request type. */
25401 	uint16_t	req_type;
25402 	/* The sequence ID from the original command. */
25403 	uint16_t	seq_id;
25404 	/* The length of the response data in number of bytes. */
25405 	uint16_t	resp_len;
25406 	/* Frequency profile for SyncE recovered clock. */
25407 	uint8_t	freq_profile;
25408 	/* Invalid frequency profile */
25409 	#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_INVALID UINT32_C(0x0)
25410 	/* 25MHz SyncE clock profile */
25411 	#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_25MHZ   UINT32_C(0x1)
25412 	#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_LAST \
25413 		HWRM_FUNC_SYNCE_QCFG_OUTPUT_FREQ_PROFILE_25MHZ
25414 	/* SyncE recovered clock state */
25415 	uint8_t	state;
25416 	/*
25417 	 * When this bit is '1', primary clock is enabled for this PF/port.
25418 	 * When this bit is '0', primary clock is disabled for this PF/port.
25419 	 */
25420 	#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_STATE_PRIMARY_CLOCK_ENABLED \
25421 		UINT32_C(0x1)
25422 	/*
25423 	 * When this bit is '1', secondary clock is enabled for this
25424 	 * PF/port.
25425 	 * When this bit is '0', secondary clock is disabled for this
25426 	 * PF/port.
25427 	 */
25428 	#define HWRM_FUNC_SYNCE_QCFG_OUTPUT_STATE_SECONDARY_CLOCK_ENABLED \
25429 		UINT32_C(0x2)
25430 	uint8_t	unused_0[5];
25431 	/*
25432 	 * This field is used in Output records to indicate that the output
25433 	 * is completely written to RAM. This field should be read as '1'
25434 	 * to indicate that the output has been completely written. When
25435 	 * writing a command completion or response to an internal processor,
25436 	 * the order of writes has to be such that this field is written last.
25437 	 */
25438 	uint8_t	valid;
25439 } __rte_packed_end;
25440 
25441 /************************
25442  * hwrm_func_lag_create *
25443  ************************/
25444 
25445 
25446 /* hwrm_func_lag_create_input (size:192b/24B) */
25447 struct __rte_packed_begin hwrm_func_lag_create_input {
25448 	/* The HWRM command request type. */
25449 	uint16_t	req_type;
25450 	/*
25451 	 * The completion ring to send the completion event on. This should
25452 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25453 	 */
25454 	uint16_t	cmpl_ring;
25455 	/*
25456 	 * The sequence ID is used by the driver for tracking multiple
25457 	 * commands. This ID is treated as opaque data by the firmware and
25458 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25459 	 */
25460 	uint16_t	seq_id;
25461 	/*
25462 	 * The target ID of the command:
25463 	 * * 0x0-0xFFF8 - The function ID
25464 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25465 	 * * 0xFFFD - Reserved for user-space HWRM interface
25466 	 * * 0xFFFF - HWRM
25467 	 */
25468 	uint16_t	target_id;
25469 	/*
25470 	 * A physical address pointer pointing to a host buffer that the
25471 	 * command's response data will be written. This can be either a host
25472 	 * physical address (HPA) or a guest physical address (GPA) and must
25473 	 * point to a physically contiguous block of memory.
25474 	 */
25475 	uint64_t	resp_addr;
25476 	uint8_t	enables;
25477 	/*
25478 	 * This bit must be '1' for the active_port_map field to be
25479 	 * configured.
25480 	 */
25481 	#define HWRM_FUNC_LAG_CREATE_INPUT_ENABLES_ACTIVE_PORT_MAP \
25482 		UINT32_C(0x1)
25483 	/*
25484 	 * This bit must be '1' for the member_port_map field to be
25485 	 * configured.
25486 	 */
25487 	#define HWRM_FUNC_LAG_CREATE_INPUT_ENABLES_MEMBER_PORT_MAP \
25488 		UINT32_C(0x2)
25489 	/* This bit must be '1' for the aggr_mode field to be configured. */
25490 	#define HWRM_FUNC_LAG_CREATE_INPUT_ENABLES_AGGR_MODE \
25491 		UINT32_C(0x4)
25492 	/* rsvd1 is 5 b */
25493 	#define HWRM_FUNC_LAG_CREATE_INPUT_ENABLES_RSVD1_MASK \
25494 		UINT32_C(0xf8)
25495 	#define HWRM_FUNC_LAG_CREATE_INPUT_ENABLES_RSVD1_SFT           3
25496 	/*
25497 	 * This is the bitmap of all active ports in the LAG. Each bit
25498 	 * represents a front panel port of the device. Ports are numbered
25499 	 * from 0 to n - 1 on a device with n ports. The number of front panel
25500 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
25501 	 * response. The active_port_map must always be a subset of the
25502 	 * member_port_map. An active port is eligible to send and receive
25503 	 * traffic.
25504 	 *
25505 	 * If the LAG mode is active-backup, only one port can be an active
25506 	 * port at a given time. All other ports in the member_port_map that
25507 	 * are not the active port are backup port. When the active port
25508 	 * fails, another member port takes over to become the active port.
25509 	 * The driver should use HWRM_FUNC_LAG_UPDATE to update
25510 	 * the active_port_map by only setting the port bit of the new active
25511 	 * port.
25512 	 *
25513 	 * In active-active, balance_xor or 802_3_ad mode, all member ports
25514 	 * can be active ports. If the driver determines that an active
25515 	 * port is down or unable to function, it should use
25516 	 * HWRM_FUNC_LAG_UPDATE to update the active_port_map by clearing
25517 	 * the port bit that has failed.
25518 	 */
25519 	uint8_t	active_port_map;
25520 	/* If this bit is set to '1', the port0 is a lag active port. */
25521 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_PORT_0 \
25522 		UINT32_C(0x1)
25523 	/* If this bit is set to '1', the port1 is a lag active port. */
25524 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_PORT_1 \
25525 		UINT32_C(0x2)
25526 	/* If this bit is set to '1', the port2 is a lag active port. */
25527 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_PORT_2 \
25528 		UINT32_C(0x4)
25529 	/* If this bit is set to '1', the port3 is a lag active port. */
25530 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_PORT_3 \
25531 		UINT32_C(0x8)
25532 	/* rsvd3 is 4 b */
25533 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_RSVD3_MASK \
25534 		UINT32_C(0xf0)
25535 	#define HWRM_FUNC_LAG_CREATE_INPUT_ACTIVE_PORT_MAP_RSVD3_SFT  4
25536 	/*
25537 	 * This is the bitmap of all member ports in the LAG. Each bit
25538 	 * represents a front panel port of the device. Ports are numbered
25539 	 * from 0 to n - 1 on a device with n ports. The number of front panel
25540 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
25541 	 * response. There must be at least 2 ports in the member ports and
25542 	 * each must not be a member of another LAG. Note that on a 4-port
25543 	 * device, there can be either 2 ports or 4 ports in the member ports.
25544 	 * Using 3 member ports is not supported.
25545 	 */
25546 	uint8_t	member_port_map;
25547 	/* If this bit is set to '1', the port0 is a lag member port. */
25548 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_PORT_0 \
25549 		UINT32_C(0x1)
25550 	/* If this bit is set to '1', the port1 is a lag member port. */
25551 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_PORT_1 \
25552 		UINT32_C(0x2)
25553 	/* If this bit is set to '1', the port2 is a lag member port. */
25554 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_PORT_2 \
25555 		UINT32_C(0x4)
25556 	/* If this bit is set to '1', the port3 is a lag member port. */
25557 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_PORT_3 \
25558 		UINT32_C(0x8)
25559 	/* rsvd4 is 4 b */
25560 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_RSVD4_MASK \
25561 		UINT32_C(0xf0)
25562 	#define HWRM_FUNC_LAG_CREATE_INPUT_MEMBER_PORT_MAP_RSVD4_SFT  4
25563 	/* Link aggregation mode being used. */
25564 	uint8_t	link_aggr_mode;
25565 	/* active active mode. */
25566 	#define HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_ACTIVE_ACTIVE \
25567 		UINT32_C(0x1)
25568 	/* active backup mode. */
25569 	#define HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_ACTIVE_BACKUP \
25570 		UINT32_C(0x2)
25571 	/* Balance XOR mode. */
25572 	#define HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_BALANCE_XOR \
25573 		UINT32_C(0x3)
25574 	/* 802.3AD mode. */
25575 	#define HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_802_3_AD \
25576 		UINT32_C(0x4)
25577 	#define HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_LAST \
25578 		HWRM_FUNC_LAG_CREATE_INPUT_AGGR_MODE_802_3_AD
25579 	uint8_t	unused_0[4];
25580 } __rte_packed_end;
25581 
25582 /* hwrm_func_lag_create_output (size:128b/16B) */
25583 struct __rte_packed_begin hwrm_func_lag_create_output {
25584 	/* The specific error status for the command. */
25585 	uint16_t	error_code;
25586 	/* The HWRM command request type. */
25587 	uint16_t	req_type;
25588 	/* The sequence ID from the original command. */
25589 	uint16_t	seq_id;
25590 	/* The length of the response data in number of bytes. */
25591 	uint16_t	resp_len;
25592 	/*
25593 	 * LAG ID of the created LAG. This LAG ID will also be returned
25594 	 * in the HWRM_FUNC_QCFG response of all member ports.
25595 	 */
25596 	uint8_t	fw_lag_id;
25597 	uint8_t	unused_0[6];
25598 	/*
25599 	 * This field is used in Output records to indicate that the output
25600 	 * is completely written to RAM. This field should be read as '1'
25601 	 * to indicate that the output has been completely written. When
25602 	 * writing a command completion or response to an internal processor,
25603 	 * the order of writes has to be such that this field is written last.
25604 	 */
25605 	uint8_t	valid;
25606 } __rte_packed_end;
25607 
25608 /************************
25609  * hwrm_func_lag_update *
25610  ************************/
25611 
25612 
25613 /* hwrm_func_lag_update_input (size:192b/24B) */
25614 struct __rte_packed_begin hwrm_func_lag_update_input {
25615 	/* The HWRM command request type. */
25616 	uint16_t	req_type;
25617 	/*
25618 	 * The completion ring to send the completion event on. This should
25619 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25620 	 */
25621 	uint16_t	cmpl_ring;
25622 	/*
25623 	 * The sequence ID is used by the driver for tracking multiple
25624 	 * commands. This ID is treated as opaque data by the firmware and
25625 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25626 	 */
25627 	uint16_t	seq_id;
25628 	/*
25629 	 * The target ID of the command:
25630 	 * * 0x0-0xFFF8 - The function ID
25631 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25632 	 * * 0xFFFD - Reserved for user-space HWRM interface
25633 	 * * 0xFFFF - HWRM
25634 	 */
25635 	uint16_t	target_id;
25636 	/*
25637 	 * A physical address pointer pointing to a host buffer that the
25638 	 * command's response data will be written. This can be either a host
25639 	 * physical address (HPA) or a guest physical address (GPA) and must
25640 	 * point to a physically contiguous block of memory.
25641 	 */
25642 	uint64_t	resp_addr;
25643 	/* Link aggregation group ID of the LAG to be updated. */
25644 	uint8_t	fw_lag_id;
25645 	uint8_t	enables;
25646 	/*
25647 	 * This bit must be '1' for the active_port_map field to be
25648 	 * updated.
25649 	 */
25650 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ENABLES_ACTIVE_PORT_MAP \
25651 		UINT32_C(0x1)
25652 	/*
25653 	 * This bit must be '1' for the member_port_map field to be
25654 	 * updated.
25655 	 */
25656 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ENABLES_MEMBER_PORT_MAP \
25657 		UINT32_C(0x2)
25658 	/* This bit must be '1' for the aggr_mode field to be updated. */
25659 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ENABLES_AGGR_MODE \
25660 		UINT32_C(0x4)
25661 	/* rsvd1 is 5 b */
25662 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ENABLES_RSVD1_MASK \
25663 		UINT32_C(0xf8)
25664 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ENABLES_RSVD1_SFT           3
25665 	/*
25666 	 * This is the bitmap of all active ports in the LAG. Each bit
25667 	 * represents a front panel port of the device. Ports are numbered
25668 	 * from 0 to n - 1 on a device with n ports. The number of front panel
25669 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
25670 	 * response. The active_port_map must always be a subset of the
25671 	 * member_port_map. An active port is eligible to send and receive
25672 	 * traffic.
25673 	 *
25674 	 * If the LAG mode is active-backup, only one port can be an active
25675 	 * port at a given time. All other ports in the member_port_map that
25676 	 * are not the active port are backup port. When the active port
25677 	 * fails, another member port takes over to become the active port.
25678 	 * The driver should use HWRM_FUNC_LAG_UPDATE to update
25679 	 * the active_port_map by only setting the port bit of the new active
25680 	 * port.
25681 	 *
25682 	 * In active-active, balance_xor or 802_3_ad mode, all member ports
25683 	 * can be active ports. If the driver determines that an active
25684 	 * port is down or unable to function, it should use
25685 	 * HWRM_FUNC_LAG_UPDATE to update the active_port_map by clearing
25686 	 * the port bit that has failed.
25687 	 */
25688 	uint8_t	active_port_map;
25689 	/* If this bit is set to '1', the port0 is a lag active port. */
25690 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_PORT_0 \
25691 		UINT32_C(0x1)
25692 	/* If this bit is set to '1', the port1 is a lag active port. */
25693 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_PORT_1 \
25694 		UINT32_C(0x2)
25695 	/* If this bit is set to '1', the port2 is a lag active port. */
25696 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_PORT_2 \
25697 		UINT32_C(0x4)
25698 	/* If this bit is set to '1', the port3 is a lag active port. */
25699 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_PORT_3 \
25700 		UINT32_C(0x8)
25701 	/* rsvd3 is 4 b */
25702 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_RSVD3_MASK \
25703 		UINT32_C(0xf0)
25704 	#define HWRM_FUNC_LAG_UPDATE_INPUT_ACTIVE_PORT_MAP_RSVD3_SFT  4
25705 	/*
25706 	 * This is the bitmap of all member ports in the LAG. Each bit
25707 	 * represents a front panel port of the device. Ports are numbered
25708 	 * from 0 to n - 1 on a device with n ports. The number of front panel
25709 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
25710 	 * response. There must be at least 2 ports in the member ports and
25711 	 * each must not be a member of another LAG. Note that on a 4-port
25712 	 * device, there can be either 2 ports or 4 ports in the member ports.
25713 	 * Using 3 member ports is not supported.
25714 	 */
25715 	uint8_t	member_port_map;
25716 	/* If this bit is set to '1', the port0 is a lag member port. */
25717 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_PORT_0 \
25718 		UINT32_C(0x1)
25719 	/* If this bit is set to '1', the port1 is a lag member port. */
25720 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_PORT_1 \
25721 		UINT32_C(0x2)
25722 	/* If this bit is set to '1', the port2 is a lag member port. */
25723 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_PORT_2 \
25724 		UINT32_C(0x4)
25725 	/* If this bit is set to '1', the port3 is a lag member port. */
25726 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_PORT_3 \
25727 		UINT32_C(0x8)
25728 	/* rsvd4 is 4 b */
25729 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_RSVD4_MASK \
25730 		UINT32_C(0xf0)
25731 	#define HWRM_FUNC_LAG_UPDATE_INPUT_MEMBER_PORT_MAP_RSVD4_SFT  4
25732 	/* Link aggregation mode being used. */
25733 	uint8_t	link_aggr_mode;
25734 	/* active active mode. */
25735 	#define HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_ACTIVE_ACTIVE \
25736 		UINT32_C(0x1)
25737 	/* active backup mode. */
25738 	#define HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_ACTIVE_BACKUP \
25739 		UINT32_C(0x2)
25740 	/* Balance XOR mode. */
25741 	#define HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_BALANCE_XOR \
25742 		UINT32_C(0x3)
25743 	/* 802.3AD mode. */
25744 	#define HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_802_3_AD \
25745 		UINT32_C(0x4)
25746 	#define HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_LAST \
25747 		HWRM_FUNC_LAG_UPDATE_INPUT_AGGR_MODE_802_3_AD
25748 	uint8_t	unused_0[3];
25749 } __rte_packed_end;
25750 
25751 /* hwrm_func_lag_update_output (size:128b/16B) */
25752 struct __rte_packed_begin hwrm_func_lag_update_output {
25753 	/* The specific error status for the command. */
25754 	uint16_t	error_code;
25755 	/* The HWRM command request type. */
25756 	uint16_t	req_type;
25757 	/* The sequence ID from the original command. */
25758 	uint16_t	seq_id;
25759 	/* The length of the response data in number of bytes. */
25760 	uint16_t	resp_len;
25761 	uint8_t	unused_0[7];
25762 	/*
25763 	 * This field is used in Output records to indicate that the output
25764 	 * is completely written to RAM. This field should be read as '1'
25765 	 * to indicate that the output has been completely written. When
25766 	 * writing a command completion or response to an internal processor,
25767 	 * the order of writes has to be such that this field is written last.
25768 	 */
25769 	uint8_t	valid;
25770 } __rte_packed_end;
25771 
25772 /**********************
25773  * hwrm_func_lag_free *
25774  **********************/
25775 
25776 
25777 /* hwrm_func_lag_free_input (size:192b/24B) */
25778 struct __rte_packed_begin hwrm_func_lag_free_input {
25779 	/* The HWRM command request type. */
25780 	uint16_t	req_type;
25781 	/*
25782 	 * The completion ring to send the completion event on. This should
25783 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25784 	 */
25785 	uint16_t	cmpl_ring;
25786 	/*
25787 	 * The sequence ID is used by the driver for tracking multiple
25788 	 * commands. This ID is treated as opaque data by the firmware and
25789 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25790 	 */
25791 	uint16_t	seq_id;
25792 	/*
25793 	 * The target ID of the command:
25794 	 * * 0x0-0xFFF8 - The function ID
25795 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25796 	 * * 0xFFFD - Reserved for user-space HWRM interface
25797 	 * * 0xFFFF - HWRM
25798 	 */
25799 	uint16_t	target_id;
25800 	/*
25801 	 * A physical address pointer pointing to a host buffer that the
25802 	 * command's response data will be written. This can be either a host
25803 	 * physical address (HPA) or a guest physical address (GPA) and must
25804 	 * point to a physically contiguous block of memory.
25805 	 */
25806 	uint64_t	resp_addr;
25807 	/* Link aggregation group ID of the LAG to be freed. */
25808 	uint8_t	fw_lag_id;
25809 	uint8_t	unused_0[7];
25810 } __rte_packed_end;
25811 
25812 /* hwrm_func_lag_free_output (size:128b/16B) */
25813 struct __rte_packed_begin hwrm_func_lag_free_output {
25814 	/* The specific error status for the command. */
25815 	uint16_t	error_code;
25816 	/* The HWRM command request type. */
25817 	uint16_t	req_type;
25818 	/* The sequence ID from the original command. */
25819 	uint16_t	seq_id;
25820 	/* The length of the response data in number of bytes. */
25821 	uint16_t	resp_len;
25822 	uint8_t	unused_0[7];
25823 	/*
25824 	 * This field is used in Output records to indicate that the output
25825 	 * is completely written to RAM. This field should be read as '1'
25826 	 * to indicate that the output has been completely written. When
25827 	 * writing a command completion or response to an internal processor,
25828 	 * the order of writes has to be such that this field is written last.
25829 	 */
25830 	uint8_t	valid;
25831 } __rte_packed_end;
25832 
25833 /**********************
25834  * hwrm_func_lag_qcfg *
25835  **********************/
25836 
25837 
25838 /* hwrm_func_lag_qcfg_input (size:192b/24B) */
25839 struct __rte_packed_begin hwrm_func_lag_qcfg_input {
25840 	/* The HWRM command request type. */
25841 	uint16_t	req_type;
25842 	/*
25843 	 * The completion ring to send the completion event on. This should
25844 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25845 	 */
25846 	uint16_t	cmpl_ring;
25847 	/*
25848 	 * The sequence ID is used by the driver for tracking multiple
25849 	 * commands. This ID is treated as opaque data by the firmware and
25850 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25851 	 */
25852 	uint16_t	seq_id;
25853 	/*
25854 	 * The target ID of the command:
25855 	 * * 0x0-0xFFF8 - The function ID
25856 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25857 	 * * 0xFFFD - Reserved for user-space HWRM interface
25858 	 * * 0xFFFF - HWRM
25859 	 */
25860 	uint16_t	target_id;
25861 	/*
25862 	 * A physical address pointer pointing to a host buffer that the
25863 	 * command's response data will be written. This can be either a host
25864 	 * physical address (HPA) or a guest physical address (GPA) and must
25865 	 * point to a physically contiguous block of memory.
25866 	 */
25867 	uint64_t	resp_addr;
25868 	/* Link aggregation group ID of the LAG to be queried. */
25869 	uint8_t	fw_lag_id;
25870 	uint8_t	unused_0[7];
25871 } __rte_packed_end;
25872 
25873 /* hwrm_func_lag_qcfg_output (size:128b/16B) */
25874 struct __rte_packed_begin hwrm_func_lag_qcfg_output {
25875 	/* The specific error status for the command. */
25876 	uint16_t	error_code;
25877 	/* The HWRM command request type. */
25878 	uint16_t	req_type;
25879 	/* The sequence ID from the original command. */
25880 	uint16_t	seq_id;
25881 	/* The length of the response data in number of bytes. */
25882 	uint16_t	resp_len;
25883 	/*
25884 	 * This is the bitmap of all active ports in the LAG. Each bit
25885 	 * represents a front panel port of the device. Ports are numbered
25886 	 * from 0 to n - 1 on a device with n ports. The number of front panel
25887 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
25888 	 * response. The active_port_map must always be a subset of the
25889 	 * member_port_map. An active port is eligible to send and receive
25890 	 * traffic.
25891 	 *
25892 	 * If the LAG mode is active-backup, only one port can be an active
25893 	 * port at a given time. All other ports in the member_port_map that
25894 	 * are not the active port are backup port. When the active port
25895 	 * fails, another member port takes over to become the active port.
25896 	 * The driver should use HWRM_FUNC_LAG_UPDATE to update
25897 	 * the active_port_map by only setting the port bit of the new active
25898 	 * port.
25899 	 *
25900 	 * In active-active, balance_xor or 802_3_ad mode, all member ports
25901 	 * can be active ports. If the driver determines that an active
25902 	 * port is down or unable to function, it should use
25903 	 * HWRM_FUNC_LAG_UPDATE to update the active_port_map by clearing
25904 	 * the port bit that has failed.
25905 	 */
25906 	uint8_t	active_port_map;
25907 	/* If this bit is set to '1', the port0 is a lag active port. */
25908 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_0 \
25909 		UINT32_C(0x1)
25910 	/* If this bit is set to '1', the port1 is a lag active port. */
25911 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_1 \
25912 		UINT32_C(0x2)
25913 	/* If this bit is set to '1', the port2 is a lag active port. */
25914 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_2 \
25915 		UINT32_C(0x4)
25916 	/* If this bit is set to '1', the port3 is a lag active port. */
25917 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_3 \
25918 		UINT32_C(0x8)
25919 	/* rsvd3 is 4 b */
25920 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_RSVD3_MASK \
25921 		UINT32_C(0xf0)
25922 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_ACTIVE_PORT_MAP_RSVD3_SFT  4
25923 	/*
25924 	 * This is the bitmap of all member ports in the LAG. Each bit
25925 	 * represents a front panel port of the device. Ports are numbered
25926 	 * from 0 to n - 1 on a device with n ports. The number of front panel
25927 	 * ports is specified in the port_cnt field of the HWRM_PORT_PHY_QCAPS
25928 	 * response. There must be at least 2 ports in the member ports and
25929 	 * each must not be a member of another LAG. Note that on a 4-port
25930 	 * device, there can be either 2 ports or 4 ports in the member ports.
25931 	 * Using 3 member ports is not supported.
25932 	 */
25933 	uint8_t	member_port_map;
25934 	/* If this bit is set to '1', the port0 is a lag member port. */
25935 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_0 \
25936 		UINT32_C(0x1)
25937 	/* If this bit is set to '1', the port1 is a lag member port. */
25938 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_1 \
25939 		UINT32_C(0x2)
25940 	/* If this bit is set to '1', the port2 is a lag member port. */
25941 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_2 \
25942 		UINT32_C(0x4)
25943 	/* If this bit is set to '1', the port3 is a lag member port. */
25944 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_3 \
25945 		UINT32_C(0x8)
25946 	/* rsvd4 is 4 b */
25947 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_RSVD4_MASK \
25948 		UINT32_C(0xf0)
25949 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_MEMBER_PORT_MAP_RSVD4_SFT  4
25950 	/* Link aggregation mode being used. */
25951 	uint8_t	link_aggr_mode;
25952 	/* active active mode. */
25953 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_ACTIVE_ACTIVE UINT32_C(0x1)
25954 	/* active backup mode. */
25955 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_ACTIVE_BACKUP UINT32_C(0x2)
25956 	/* Balance XOR mode. */
25957 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_BALANCE_XOR   UINT32_C(0x3)
25958 	/* 802.3AD mode. */
25959 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_802_3_AD      UINT32_C(0x4)
25960 	#define HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_LAST \
25961 		HWRM_FUNC_LAG_QCFG_OUTPUT_AGGR_MODE_802_3_AD
25962 	uint8_t	unused_0[4];
25963 	/*
25964 	 * This field is used in Output records to indicate that the output
25965 	 * is completely written to RAM. This field should be read as '1'
25966 	 * to indicate that the output has been completely written. When
25967 	 * writing a command completion or response to an internal processor,
25968 	 * the order of writes has to be such that this field is written last.
25969 	 */
25970 	uint8_t	valid;
25971 } __rte_packed_end;
25972 
25973 /**************************
25974  * hwrm_func_lag_mode_cfg *
25975  **************************/
25976 
25977 
25978 /* hwrm_func_lag_mode_cfg_input (size:192b/24B) */
25979 struct __rte_packed_begin hwrm_func_lag_mode_cfg_input {
25980 	/* The HWRM command request type. */
25981 	uint16_t	req_type;
25982 	/*
25983 	 * The completion ring to send the completion event on. This should
25984 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
25985 	 */
25986 	uint16_t	cmpl_ring;
25987 	/*
25988 	 * The sequence ID is used by the driver for tracking multiple
25989 	 * commands. This ID is treated as opaque data by the firmware and
25990 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
25991 	 */
25992 	uint16_t	seq_id;
25993 	/*
25994 	 * The target ID of the command:
25995 	 * * 0x0-0xFFF8 - The function ID
25996 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
25997 	 * * 0xFFFD - Reserved for user-space HWRM interface
25998 	 * * 0xFFFF - HWRM
25999 	 */
26000 	uint16_t	target_id;
26001 	/*
26002 	 * A physical address pointer pointing to a host buffer that the
26003 	 * command's response data will be written. This can be either a host
26004 	 * physical address (HPA) or a guest physical address (GPA) and must
26005 	 * point to a physically contiguous block of memory.
26006 	 */
26007 	uint64_t	resp_addr;
26008 	uint8_t	enables;
26009 	/*
26010 	 * This bit must be '1' for the link aggregation enable or
26011 	 * disable flags to be configured.
26012 	 */
26013 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_FLAGS \
26014 		UINT32_C(0x1)
26015 	/*
26016 	 * This bit must be '1' for the active_port_map field to be
26017 	 * configured.
26018 	 */
26019 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_ACTIVE_PORT_MAP \
26020 		UINT32_C(0x2)
26021 	/*
26022 	 * This bit must be '1' for the member_port_map field to be
26023 	 * configured.
26024 	 */
26025 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_MEMBER_PORT_MAP \
26026 		UINT32_C(0x4)
26027 	/* This bit must be '1' for the aggr_mode field to be configured. */
26028 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_AGGR_MODE \
26029 		UINT32_C(0x8)
26030 	/* This bit must be '1' for the lag id field to be configured. */
26031 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_LAG_ID \
26032 		UINT32_C(0x10)
26033 	/* rsvd1 is 3 b */
26034 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_RSVD1_MASK \
26035 		UINT32_C(0xe0)
26036 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ENABLES_RSVD1_SFT           5
26037 	uint8_t	flags;
26038 	/*
26039 	 * If this bit is set to 1, the driver is requesting FW to disable
26040 	 * link aggregation feature during run time.
26041 	 */
26042 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_FLAGS_AGGR_DISABLE \
26043 		UINT32_C(0x1)
26044 	/*
26045 	 * If this bit is set to 1, the driver is requesting FW to enable
26046 	 * link aggregation feature during run time.
26047 	 */
26048 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_FLAGS_AGGR_ENABLE \
26049 		UINT32_C(0x2)
26050 	/* rsvd2 is 6 b */
26051 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_FLAGS_RSVD2_MASK \
26052 		UINT32_C(0xfc)
26053 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_FLAGS_RSVD2_SFT        2
26054 	/*
26055 	 * This is the bitmap of all active ports in the LAG. Each bit
26056 	 * represents a front panel port of the device starting from port 0.
26057 	 * The number of front panel ports is specified in the port_cnt field
26058 	 * of the HWRM_PORT_PHY_QCAPS response.
26059 	 * The term "active port" is one of member ports which is eligible to
26060 	 * send or receive the traffic.
26061 	 * In the active-backup mode, only one member port is active port at
26062 	 * any given time. If the active port fails, another member port
26063 	 * automatically takes over the active role to ensure continuous
26064 	 * network connectivity.
26065 	 * In the active-active, balance_xor or 802_3_ad mode, all member ports
26066 	 * could be active port, if link status on one port is down, driver
26067 	 * needs to send the NIC a new active-port bitmap with marking this
26068 	 * port as not active port.
26069 	 * The PORT_2 and PORT_3 are only valid if the NIC has four front
26070 	 * panel ports.
26071 	 */
26072 	uint8_t	active_port_map;
26073 	/* If this bit is set to '1', the port0 is a lag active port. */
26074 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_PORT_0 \
26075 		UINT32_C(0x1)
26076 	/* If this bit is set to '1', the port1 is a lag active port. */
26077 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_PORT_1 \
26078 		UINT32_C(0x2)
26079 	/* If this bit is set to '1', the port2 is a lag active port. */
26080 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_PORT_2 \
26081 		UINT32_C(0x4)
26082 	/* If this bit is set to '1', the port3 is a lag active port. */
26083 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_PORT_3 \
26084 		UINT32_C(0x8)
26085 	/* rsvd3 is 4 b */
26086 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_RSVD3_MASK \
26087 		UINT32_C(0xf0)
26088 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_ACTIVE_PORT_MAP_RSVD3_SFT  4
26089 	/*
26090 	 * This is the bitmap of all member ports in the LAG. Each bit
26091 	 * represents a front panel port of the device starting from port 0.
26092 	 * The number of front panel ports is specified in the port_cnt field
26093 	 * of the HWRM_PORT_PHY_QCAPS response.
26094 	 * The term "member port" refers to a front panel port that is added to
26095 	 * the bond group as a slave device. These member ports are combined to
26096 	 * create a logical bond interface.
26097 	 * For a 4-port NIC, the LAG member port combination can consist of
26098 	 * either two ports or four ports. However, it is important to note
26099 	 * that the case with three ports in the same lag group is not
26100 	 * supported.
26101 	 * The PORT_2 and PORT_3 are only valid if the NIC has four front
26102 	 * panel ports. There could be a case to use multiple LAG groups,
26103 	 * for example, if the NIC has four front panel ports, the lag feature
26104 	 * can use up to two LAG groups, with two ports assigned to each group.
26105 	 */
26106 	uint8_t	member_port_map;
26107 	/* If this bit is set to '1', the port0 is a lag member port. */
26108 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_PORT_0 \
26109 		UINT32_C(0x1)
26110 	/* If this bit is set to '1', the port1 is a lag member port. */
26111 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_PORT_1 \
26112 		UINT32_C(0x2)
26113 	/* If this bit is set to '1', the port2 is a lag member port. */
26114 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_PORT_2 \
26115 		UINT32_C(0x4)
26116 	/* If this bit is set to '1', the port3 is a lag member port. */
26117 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_PORT_3 \
26118 		UINT32_C(0x8)
26119 	/* rsvd4 is 4 b */
26120 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_RSVD4_MASK \
26121 		UINT32_C(0xf0)
26122 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_MEMBER_PORT_MAP_RSVD4_SFT  4
26123 	/* Link aggregation mode being used. */
26124 	uint8_t	link_aggr_mode;
26125 	/* active active mode. */
26126 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_ACTIVE_ACTIVE \
26127 		UINT32_C(0x1)
26128 	/* active backup mode. */
26129 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_ACTIVE_BACKUP \
26130 		UINT32_C(0x2)
26131 	/* Balance XOR mode. */
26132 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_BALANCE_XOR \
26133 		UINT32_C(0x3)
26134 	/* 802.3AD mode. */
26135 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_802_3_AD \
26136 		UINT32_C(0x4)
26137 	#define HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_LAST \
26138 		HWRM_FUNC_LAG_MODE_CFG_INPUT_AGGR_MODE_802_3_AD
26139 	/* Link aggregation group idx being used. */
26140 	uint8_t	lag_id;
26141 	uint8_t	unused_0[2];
26142 } __rte_packed_end;
26143 
26144 /* hwrm_func_lag_mode_cfg_output (size:128b/16B) */
26145 struct __rte_packed_begin hwrm_func_lag_mode_cfg_output {
26146 	/* The specific error status for the command. */
26147 	uint16_t	error_code;
26148 	/* The HWRM command request type. */
26149 	uint16_t	req_type;
26150 	/* The sequence ID from the original command. */
26151 	uint16_t	seq_id;
26152 	/* The length of the response data in number of bytes. */
26153 	uint16_t	resp_len;
26154 	/* Link aggregation group idx being used. */
26155 	uint8_t	lag_id;
26156 	uint8_t	unused_0[6];
26157 	/*
26158 	 * This field is used in Output records to indicate that the output
26159 	 * is completely written to RAM. This field should be read as '1'
26160 	 * to indicate that the output has been completely written. When
26161 	 * writing a command completion or response to an internal processor,
26162 	 * the order of writes has to be such that this field is written last.
26163 	 */
26164 	uint8_t	valid;
26165 } __rte_packed_end;
26166 
26167 /***************************
26168  * hwrm_func_lag_mode_qcfg *
26169  ***************************/
26170 
26171 
26172 /* hwrm_func_lag_mode_qcfg_input (size:192b/24B) */
26173 struct __rte_packed_begin hwrm_func_lag_mode_qcfg_input {
26174 	/* The HWRM command request type. */
26175 	uint16_t	req_type;
26176 	/*
26177 	 * The completion ring to send the completion event on. This should
26178 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
26179 	 */
26180 	uint16_t	cmpl_ring;
26181 	/*
26182 	 * The sequence ID is used by the driver for tracking multiple
26183 	 * commands. This ID is treated as opaque data by the firmware and
26184 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
26185 	 */
26186 	uint16_t	seq_id;
26187 	/*
26188 	 * The target ID of the command:
26189 	 * * 0x0-0xFFF8 - The function ID
26190 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
26191 	 * * 0xFFFD - Reserved for user-space HWRM interface
26192 	 * * 0xFFFF - HWRM
26193 	 */
26194 	uint16_t	target_id;
26195 	/*
26196 	 * A physical address pointer pointing to a host buffer that the
26197 	 * command's response data will be written. This can be either a host
26198 	 * physical address (HPA) or a guest physical address (GPA) and must
26199 	 * point to a physically contiguous block of memory.
26200 	 */
26201 	uint64_t	resp_addr;
26202 	uint8_t	unused_0[8];
26203 } __rte_packed_end;
26204 
26205 /* hwrm_func_lag_mode_qcfg_output (size:128b/16B) */
26206 struct __rte_packed_begin hwrm_func_lag_mode_qcfg_output {
26207 	/* The specific error status for the command. */
26208 	uint16_t	error_code;
26209 	/* The HWRM command request type. */
26210 	uint16_t	req_type;
26211 	/* The sequence ID from the original command. */
26212 	uint16_t	seq_id;
26213 	/* The length of the response data in number of bytes. */
26214 	uint16_t	resp_len;
26215 	uint8_t	aggr_enabled;
26216 	/*
26217 	 * This flag is used to query whether link aggregation is enabled
26218 	 * or disabled during run time.
26219 	 */
26220 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_ENABLED     UINT32_C(0x1)
26221 	/* rsvd1 is 7 b */
26222 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_RSVD1_MASK       UINT32_C(0xfe)
26223 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_RSVD1_SFT        1
26224 	/*
26225 	 * This is the bitmap of all active ports in the LAG. Each bit
26226 	 * represents a front panel port of the device starting from port 0.
26227 	 * The number of front panel ports is specified in the port_cnt field
26228 	 * of the HWRM_PORT_PHY_QCAPS response.
26229 	 * The term "active port" is one of member ports which is eligible to
26230 	 * send or receive the traffic.
26231 	 * In the active-backup mode, only one member port is active port at
26232 	 * any given time. If the active port fails, another member port
26233 	 * automatically takes over the active role to ensure continuous
26234 	 * network connectivity.
26235 	 * In the active-active, balance_xor or 802_3_ad mode, all member ports
26236 	 * could be active port, if link status on one port is down, driver
26237 	 * needs to send the NIC a new active-port bitmap with marking this
26238 	 * port as not active port.
26239 	 * The PORT_2 and PORT_3 are only valid if the NIC has four front
26240 	 * panel ports.
26241 	 */
26242 	uint8_t	active_port_map;
26243 	/* If this bit is set to '1', the port0 is a lag active port. */
26244 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_0 \
26245 		UINT32_C(0x1)
26246 	/* If this bit is set to '1', the port1 is a lag active port. */
26247 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_1 \
26248 		UINT32_C(0x2)
26249 	/* If this bit is set to '1', the port2 is a lag active port. */
26250 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_2 \
26251 		UINT32_C(0x4)
26252 	/* If this bit is set to '1', the port3 is a lag active port. */
26253 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_PORT_3 \
26254 		UINT32_C(0x8)
26255 	/* rsvd2 is 4 b */
26256 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_RSVD2_MASK \
26257 		UINT32_C(0xf0)
26258 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_ACTIVE_PORT_MAP_RSVD2_SFT  4
26259 	/*
26260 	 * This is the bitmap of all member ports in the LAG. Each bit
26261 	 * represents a front panel port of the device starting from port 0.
26262 	 * The number of front panel ports is specified in the port_cnt field
26263 	 * of the HWRM_PORT_PHY_QCAPS response.
26264 	 * The term "member port" refers to a front panel port that is added to
26265 	 * the bond group as a slave device. These member ports are combined to
26266 	 * create a logical bond interface.
26267 	 * For a 4-port NIC, the LAG member port combination can consist of
26268 	 * either two ports or four ports. However, it is important to note
26269 	 * that the case with three ports in the same lag group is not
26270 	 * supported.
26271 	 * The PORT_2 and PORT_3 are only valid if the NIC has four front
26272 	 * panel ports. There could be a case to use multiple LAG groups,
26273 	 * for example, if the NIC has four front panel ports, the lag feature
26274 	 * can use up to two LAG groups, with two ports assigned to each group.
26275 	 */
26276 	uint8_t	member_port_map;
26277 	/* If this bit is set to '1', the port0 is a lag member port. */
26278 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_0 \
26279 		UINT32_C(0x1)
26280 	/* If this bit is set to '1', the port1 is a lag member port. */
26281 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_1 \
26282 		UINT32_C(0x2)
26283 	/* If this bit is set to '1', the port2 is a lag member port. */
26284 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_2 \
26285 		UINT32_C(0x4)
26286 	/* If this bit is set to '1', the port3 is a lag member port. */
26287 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_PORT_3 \
26288 		UINT32_C(0x8)
26289 	/* rsvd3 is 4 b */
26290 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_RSVD3_MASK \
26291 		UINT32_C(0xf0)
26292 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_MEMBER_PORT_MAP_RSVD3_SFT  4
26293 	/* Link aggregation mode being used. */
26294 	uint8_t	link_aggr_mode;
26295 	/* active active mode. */
26296 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_ACTIVE_ACTIVE \
26297 		UINT32_C(0x1)
26298 	/* active backup mode. */
26299 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_ACTIVE_BACKUP \
26300 		UINT32_C(0x2)
26301 	/* Balance XOR mode. */
26302 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_BALANCE_XOR \
26303 		UINT32_C(0x3)
26304 	/* 802.3AD mode. */
26305 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_802_3_AD \
26306 		UINT32_C(0x4)
26307 	#define HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_LAST \
26308 		HWRM_FUNC_LAG_MODE_QCFG_OUTPUT_AGGR_MODE_802_3_AD
26309 	uint8_t	unused_0[3];
26310 	/*
26311 	 * This field is used in Output records to indicate that the output
26312 	 * is completely written to RAM. This field should be read as '1'
26313 	 * to indicate that the output has been completely written. When
26314 	 * writing a command completion or response to an internal processor,
26315 	 * the order of writes has to be such that this field is written last.
26316 	 */
26317 	uint8_t	valid;
26318 } __rte_packed_end;
26319 
26320 /***********************
26321  * hwrm_func_vlan_qcfg *
26322  ***********************/
26323 
26324 
26325 /* hwrm_func_vlan_qcfg_input (size:192b/24B) */
26326 struct __rte_packed_begin hwrm_func_vlan_qcfg_input {
26327 	/* The HWRM command request type. */
26328 	uint16_t	req_type;
26329 	/*
26330 	 * The completion ring to send the completion event on. This should
26331 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
26332 	 */
26333 	uint16_t	cmpl_ring;
26334 	/*
26335 	 * The sequence ID is used by the driver for tracking multiple
26336 	 * commands. This ID is treated as opaque data by the firmware and
26337 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
26338 	 */
26339 	uint16_t	seq_id;
26340 	/*
26341 	 * The target ID of the command:
26342 	 * * 0x0-0xFFF8 - The function ID
26343 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
26344 	 * * 0xFFFD - Reserved for user-space HWRM interface
26345 	 * * 0xFFFF - HWRM
26346 	 */
26347 	uint16_t	target_id;
26348 	/*
26349 	 * A physical address pointer pointing to a host buffer that the
26350 	 * command's response data will be written. This can be either a host
26351 	 * physical address (HPA) or a guest physical address (GPA) and must
26352 	 * point to a physically contiguous block of memory.
26353 	 */
26354 	uint64_t	resp_addr;
26355 	/*
26356 	 * Function ID of the function that is being
26357 	 * configured.
26358 	 * If set to 0xFF... (All Fs), then the configuration is
26359 	 * for the requesting function.
26360 	 */
26361 	uint16_t	fid;
26362 	uint8_t	unused_0[6];
26363 } __rte_packed_end;
26364 
26365 /* hwrm_func_vlan_qcfg_output (size:320b/40B) */
26366 struct __rte_packed_begin hwrm_func_vlan_qcfg_output {
26367 	/* The specific error status for the command. */
26368 	uint16_t	error_code;
26369 	/* The HWRM command request type. */
26370 	uint16_t	req_type;
26371 	/* The sequence ID from the original command. */
26372 	uint16_t	seq_id;
26373 	/* The length of the response data in number of bytes. */
26374 	uint16_t	resp_len;
26375 	uint64_t	unused_0;
26376 	/* S-TAG VLAN identifier configured for the function. */
26377 	uint16_t	stag_vid;
26378 	/* S-TAG PCP value configured for the function. */
26379 	uint8_t	stag_pcp;
26380 	uint8_t	unused_1;
26381 	/*
26382 	 * S-TAG TPID value configured for the function. This field is
26383 	 * specified in network byte order.
26384 	 */
26385 	uint16_t	stag_tpid;
26386 	/* C-TAG VLAN identifier configured for the function. */
26387 	uint16_t	ctag_vid;
26388 	/* C-TAG PCP value configured for the function. */
26389 	uint8_t	ctag_pcp;
26390 	uint8_t	unused_2;
26391 	/*
26392 	 * C-TAG TPID value configured for the function. This field is
26393 	 * specified in network byte order.
26394 	 */
26395 	uint16_t	ctag_tpid;
26396 	/* Future use. */
26397 	uint32_t	rsvd2;
26398 	/* Future use. */
26399 	uint32_t	rsvd3;
26400 	uint8_t	unused_3[3];
26401 	/*
26402 	 * This field is used in Output records to indicate that the output
26403 	 * is completely written to RAM. This field should be read as '1'
26404 	 * to indicate that the output has been completely written. When
26405 	 * writing a command completion or response to an internal processor,
26406 	 * the order of writes has to be such that this field is written last.
26407 	 */
26408 	uint8_t	valid;
26409 } __rte_packed_end;
26410 
26411 /**********************
26412  * hwrm_func_vlan_cfg *
26413  **********************/
26414 
26415 
26416 /* hwrm_func_vlan_cfg_input (size:384b/48B) */
26417 struct __rte_packed_begin hwrm_func_vlan_cfg_input {
26418 	/* The HWRM command request type. */
26419 	uint16_t	req_type;
26420 	/*
26421 	 * The completion ring to send the completion event on. This should
26422 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
26423 	 */
26424 	uint16_t	cmpl_ring;
26425 	/*
26426 	 * The sequence ID is used by the driver for tracking multiple
26427 	 * commands. This ID is treated as opaque data by the firmware and
26428 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
26429 	 */
26430 	uint16_t	seq_id;
26431 	/*
26432 	 * The target ID of the command:
26433 	 * * 0x0-0xFFF8 - The function ID
26434 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
26435 	 * * 0xFFFD - Reserved for user-space HWRM interface
26436 	 * * 0xFFFF - HWRM
26437 	 */
26438 	uint16_t	target_id;
26439 	/*
26440 	 * A physical address pointer pointing to a host buffer that the
26441 	 * command's response data will be written. This can be either a host
26442 	 * physical address (HPA) or a guest physical address (GPA) and must
26443 	 * point to a physically contiguous block of memory.
26444 	 */
26445 	uint64_t	resp_addr;
26446 	/*
26447 	 * Function ID of the function that is being
26448 	 * configured.
26449 	 * If set to 0xFF... (All Fs), then the configuration is
26450 	 * for the requesting function.
26451 	 */
26452 	uint16_t	fid;
26453 	uint8_t	unused_0[2];
26454 	uint32_t	enables;
26455 	/*
26456 	 * This bit must be '1' for the stag_vid field to be
26457 	 * configured.
26458 	 */
26459 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_STAG_VID      UINT32_C(0x1)
26460 	/*
26461 	 * This bit must be '1' for the ctag_vid field to be
26462 	 * configured.
26463 	 */
26464 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_CTAG_VID      UINT32_C(0x2)
26465 	/*
26466 	 * This bit must be '1' for the stag_pcp field to be
26467 	 * configured.
26468 	 */
26469 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_STAG_PCP      UINT32_C(0x4)
26470 	/*
26471 	 * This bit must be '1' for the ctag_pcp field to be
26472 	 * configured.
26473 	 */
26474 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_CTAG_PCP      UINT32_C(0x8)
26475 	/*
26476 	 * This bit must be '1' for the stag_tpid field to be
26477 	 * configured.
26478 	 */
26479 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_STAG_TPID     UINT32_C(0x10)
26480 	/*
26481 	 * This bit must be '1' for the ctag_tpid field to be
26482 	 * configured.
26483 	 */
26484 	#define HWRM_FUNC_VLAN_CFG_INPUT_ENABLES_CTAG_TPID     UINT32_C(0x20)
26485 	/* S-TAG VLAN identifier configured for the function. */
26486 	uint16_t	stag_vid;
26487 	/* S-TAG PCP value configured for the function. */
26488 	uint8_t	stag_pcp;
26489 	uint8_t	unused_1;
26490 	/*
26491 	 * S-TAG TPID value configured for the function. This field is
26492 	 * specified in network byte order.
26493 	 */
26494 	uint16_t	stag_tpid;
26495 	/* C-TAG VLAN identifier configured for the function. */
26496 	uint16_t	ctag_vid;
26497 	/* C-TAG PCP value configured for the function. */
26498 	uint8_t	ctag_pcp;
26499 	uint8_t	unused_2;
26500 	/*
26501 	 * C-TAG TPID value configured for the function. This field is
26502 	 * specified in network byte order.
26503 	 */
26504 	uint16_t	ctag_tpid;
26505 	/* Future use. */
26506 	uint32_t	rsvd1;
26507 	/* Future use. */
26508 	uint32_t	rsvd2;
26509 	uint8_t	unused_3[4];
26510 } __rte_packed_end;
26511 
26512 /* hwrm_func_vlan_cfg_output (size:128b/16B) */
26513 struct __rte_packed_begin hwrm_func_vlan_cfg_output {
26514 	/* The specific error status for the command. */
26515 	uint16_t	error_code;
26516 	/* The HWRM command request type. */
26517 	uint16_t	req_type;
26518 	/* The sequence ID from the original command. */
26519 	uint16_t	seq_id;
26520 	/* The length of the response data in number of bytes. */
26521 	uint16_t	resp_len;
26522 	uint8_t	unused_0[7];
26523 	/*
26524 	 * This field is used in Output records to indicate that the output
26525 	 * is completely written to RAM. This field should be read as '1'
26526 	 * to indicate that the output has been completely written. When
26527 	 * writing a command completion or response to an internal processor,
26528 	 * the order of writes has to be such that this field is written last.
26529 	 */
26530 	uint8_t	valid;
26531 } __rte_packed_end;
26532 
26533 /*******************************
26534  * hwrm_func_vf_vnic_ids_query *
26535  *******************************/
26536 
26537 
26538 /* hwrm_func_vf_vnic_ids_query_input (size:256b/32B) */
26539 struct __rte_packed_begin hwrm_func_vf_vnic_ids_query_input {
26540 	/* The HWRM command request type. */
26541 	uint16_t	req_type;
26542 	/*
26543 	 * The completion ring to send the completion event on. This should
26544 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
26545 	 */
26546 	uint16_t	cmpl_ring;
26547 	/*
26548 	 * The sequence ID is used by the driver for tracking multiple
26549 	 * commands. This ID is treated as opaque data by the firmware and
26550 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
26551 	 */
26552 	uint16_t	seq_id;
26553 	/*
26554 	 * The target ID of the command:
26555 	 * * 0x0-0xFFF8 - The function ID
26556 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
26557 	 * * 0xFFFD - Reserved for user-space HWRM interface
26558 	 * * 0xFFFF - HWRM
26559 	 */
26560 	uint16_t	target_id;
26561 	/*
26562 	 * A physical address pointer pointing to a host buffer that the
26563 	 * command's response data will be written. This can be either a host
26564 	 * physical address (HPA) or a guest physical address (GPA) and must
26565 	 * point to a physically contiguous block of memory.
26566 	 */
26567 	uint64_t	resp_addr;
26568 	/*
26569 	 * This value is used to identify a Virtual Function (VF).
26570 	 * The scope of VF ID is local within a PF.
26571 	 */
26572 	uint16_t	vf_id;
26573 	uint8_t	unused_0[2];
26574 	/* Max number of vnic ids in vnic id table */
26575 	uint32_t	max_vnic_id_cnt;
26576 	/* This is the address for VF VNIC ID table */
26577 	uint64_t	vnic_id_tbl_addr;
26578 } __rte_packed_end;
26579 
26580 /* hwrm_func_vf_vnic_ids_query_output (size:128b/16B) */
26581 struct __rte_packed_begin hwrm_func_vf_vnic_ids_query_output {
26582 	/* The specific error status for the command. */
26583 	uint16_t	error_code;
26584 	/* The HWRM command request type. */
26585 	uint16_t	req_type;
26586 	/* The sequence ID from the original command. */
26587 	uint16_t	seq_id;
26588 	/* The length of the response data in number of bytes. */
26589 	uint16_t	resp_len;
26590 	/*
26591 	 * Actual number of vnic ids
26592 	 *
26593 	 * Each VNIC ID is written as a 32-bit number.
26594 	 */
26595 	uint32_t	vnic_id_cnt;
26596 	uint8_t	unused_0[3];
26597 	/*
26598 	 * This field is used in Output records to indicate that the output
26599 	 * is completely written to RAM. This field should be read as '1'
26600 	 * to indicate that the output has been completely written. When
26601 	 * writing a command completion or response to an internal processor,
26602 	 * the order of writes has to be such that this field is written last.
26603 	 */
26604 	uint8_t	valid;
26605 } __rte_packed_end;
26606 
26607 /***********************
26608  * hwrm_func_vf_bw_cfg *
26609  ***********************/
26610 
26611 
26612 /* hwrm_func_vf_bw_cfg_input (size:960b/120B) */
26613 struct __rte_packed_begin hwrm_func_vf_bw_cfg_input {
26614 	/* The HWRM command request type. */
26615 	uint16_t	req_type;
26616 	/*
26617 	 * The completion ring to send the completion event on. This should
26618 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
26619 	 */
26620 	uint16_t	cmpl_ring;
26621 	/*
26622 	 * The sequence ID is used by the driver for tracking multiple
26623 	 * commands. This ID is treated as opaque data by the firmware and
26624 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
26625 	 */
26626 	uint16_t	seq_id;
26627 	/*
26628 	 * The target ID of the command:
26629 	 * * 0x0-0xFFF8 - The function ID
26630 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
26631 	 * * 0xFFFD - Reserved for user-space HWRM interface
26632 	 * * 0xFFFF - HWRM
26633 	 */
26634 	uint16_t	target_id;
26635 	/*
26636 	 * A physical address pointer pointing to a host buffer that the
26637 	 * command's response data will be written. This can be either a host
26638 	 * physical address (HPA) or a guest physical address (GPA) and must
26639 	 * point to a physically contiguous block of memory.
26640 	 */
26641 	uint64_t	resp_addr;
26642 	/*
26643 	 * The number of VF functions that are being configured.
26644 	 * The cmd space allows up to 50 VFs' BW to be configured with one cmd.
26645 	 */
26646 	uint16_t	num_vfs;
26647 	uint16_t	unused[3];
26648 	/* These 16-bit fields contain the VF fid and the rate scale percentage. */
26649 	uint16_t	vfn[48];
26650 	/* The physical VF id the adjustment will be made to. */
26651 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_VFID_MASK     UINT32_C(0xfff)
26652 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_VFID_SFT      0
26653 	/*
26654 	 * This field configures the rate scale percentage of the VF as specified
26655 	 * by the physical VF id.
26656 	 */
26657 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_MASK     UINT32_C(0xf000)
26658 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_SFT      12
26659 	/* 0% of the max tx rate */
26660 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_0 \
26661 		(UINT32_C(0x0) << 12)
26662 	/* 6.66% of the max tx rate */
26663 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_6_66 \
26664 		(UINT32_C(0x1) << 12)
26665 	/* 13.33% of the max tx rate */
26666 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_13_33 \
26667 		(UINT32_C(0x2) << 12)
26668 	/* 20% of the max tx rate */
26669 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_20 \
26670 		(UINT32_C(0x3) << 12)
26671 	/* 26.66% of the max tx rate */
26672 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_26_66 \
26673 		(UINT32_C(0x4) << 12)
26674 	/* 33% of the max tx rate */
26675 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_33_33 \
26676 		(UINT32_C(0x5) << 12)
26677 	/* 40% of the max tx rate */
26678 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_40 \
26679 		(UINT32_C(0x6) << 12)
26680 	/* 46.66% of the max tx rate */
26681 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_46_66 \
26682 		(UINT32_C(0x7) << 12)
26683 	/* 53.33% of the max tx rate */
26684 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_53_33 \
26685 		(UINT32_C(0x8) << 12)
26686 	/* 60% of the max tx rate */
26687 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_60 \
26688 		(UINT32_C(0x9) << 12)
26689 	/* 66.66% of the max tx rate */
26690 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_66_66 \
26691 		(UINT32_C(0xa) << 12)
26692 	/* 53.33% of the max tx rate */
26693 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_73_33 \
26694 		(UINT32_C(0xb) << 12)
26695 	/* 80% of the max tx rate */
26696 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_80 \
26697 		(UINT32_C(0xc) << 12)
26698 	/* 86.66% of the max tx rate */
26699 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_86_66 \
26700 		(UINT32_C(0xd) << 12)
26701 	/* 93.33% of the max tx rate */
26702 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_93_33 \
26703 		(UINT32_C(0xe) << 12)
26704 	/* 100% of the max tx rate */
26705 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_100 \
26706 		(UINT32_C(0xf) << 12)
26707 	#define HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_LAST \
26708 		HWRM_FUNC_VF_BW_CFG_INPUT_VFN_RATE_PCT_100
26709 } __rte_packed_end;
26710 
26711 /* hwrm_func_vf_bw_cfg_output (size:128b/16B) */
26712 struct __rte_packed_begin hwrm_func_vf_bw_cfg_output {
26713 	/* The specific error status for the command. */
26714 	uint16_t	error_code;
26715 	/* The HWRM command request type. */
26716 	uint16_t	req_type;
26717 	/* The sequence ID from the original command. */
26718 	uint16_t	seq_id;
26719 	/* The length of the response data in number of bytes. */
26720 	uint16_t	resp_len;
26721 	uint8_t	unused_0[7];
26722 	/*
26723 	 * This field is used in Output records to indicate that the output
26724 	 * is completely written to RAM. This field should be read as '1'
26725 	 * to indicate that the output has been completely written. When
26726 	 * writing a command completion or response to an internal processor,
26727 	 * the order of writes has to be such that this field is written last.
26728 	 */
26729 	uint8_t	valid;
26730 } __rte_packed_end;
26731 
26732 /************************
26733  * hwrm_func_vf_bw_qcfg *
26734  ************************/
26735 
26736 
26737 /* hwrm_func_vf_bw_qcfg_input (size:960b/120B) */
26738 struct __rte_packed_begin hwrm_func_vf_bw_qcfg_input {
26739 	/* The HWRM command request type. */
26740 	uint16_t	req_type;
26741 	/*
26742 	 * The completion ring to send the completion event on. This should
26743 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
26744 	 */
26745 	uint16_t	cmpl_ring;
26746 	/*
26747 	 * The sequence ID is used by the driver for tracking multiple
26748 	 * commands. This ID is treated as opaque data by the firmware and
26749 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
26750 	 */
26751 	uint16_t	seq_id;
26752 	/*
26753 	 * The target ID of the command:
26754 	 * * 0x0-0xFFF8 - The function ID
26755 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
26756 	 * * 0xFFFD - Reserved for user-space HWRM interface
26757 	 * * 0xFFFF - HWRM
26758 	 */
26759 	uint16_t	target_id;
26760 	/*
26761 	 * A physical address pointer pointing to a host buffer that the
26762 	 * command's response data will be written. This can be either a host
26763 	 * physical address (HPA) or a guest physical address (GPA) and must
26764 	 * point to a physically contiguous block of memory.
26765 	 */
26766 	uint64_t	resp_addr;
26767 	/*
26768 	 * The number of VF functions that are being queried.
26769 	 * The inline response space allows the host to query up to 50 VFs'
26770 	 * rate scale percentage
26771 	 */
26772 	uint16_t	num_vfs;
26773 	uint16_t	unused[3];
26774 	/* These 16-bit fields contain the VF fid */
26775 	uint16_t	vfn[48];
26776 	/* The physical VF id of interest */
26777 	#define HWRM_FUNC_VF_BW_QCFG_INPUT_VFN_VFID_MASK UINT32_C(0xfff)
26778 	#define HWRM_FUNC_VF_BW_QCFG_INPUT_VFN_VFID_SFT 0
26779 } __rte_packed_end;
26780 
26781 /* hwrm_func_vf_bw_qcfg_output (size:960b/120B) */
26782 struct __rte_packed_begin hwrm_func_vf_bw_qcfg_output {
26783 	/* The specific error status for the command. */
26784 	uint16_t	error_code;
26785 	/* The HWRM command request type. */
26786 	uint16_t	req_type;
26787 	/* The sequence ID from the original command. */
26788 	uint16_t	seq_id;
26789 	/* The length of the response data in number of bytes. */
26790 	uint16_t	resp_len;
26791 	/*
26792 	 * The number of VF functions that are being queried.
26793 	 * The inline response space allows the host to query up to 50 VFs'
26794 	 * rate scale percentage.
26795 	 */
26796 	uint16_t	num_vfs;
26797 	uint16_t	unused[3];
26798 	/* These 16-bit fields contain the VF fid and the rate scale percentage. */
26799 	uint16_t	vfn[48];
26800 	/* The physical VF id the adjustment will be made to. */
26801 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_VFID_MASK     UINT32_C(0xfff)
26802 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_VFID_SFT      0
26803 	/*
26804 	 * This field configures the rate scale percentage of the VF as specified
26805 	 * by the physical VF id.
26806 	 */
26807 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_MASK     UINT32_C(0xf000)
26808 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_SFT      12
26809 	/* 0% of the max tx rate */
26810 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_0 \
26811 		(UINT32_C(0x0) << 12)
26812 	/* 6.66% of the max tx rate */
26813 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_6_66 \
26814 		(UINT32_C(0x1) << 12)
26815 	/* 13.33% of the max tx rate */
26816 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_13_33 \
26817 		(UINT32_C(0x2) << 12)
26818 	/* 20% of the max tx rate */
26819 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_20 \
26820 		(UINT32_C(0x3) << 12)
26821 	/* 26.66% of the max tx rate */
26822 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_26_66 \
26823 		(UINT32_C(0x4) << 12)
26824 	/* 33% of the max tx rate */
26825 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_33_33 \
26826 		(UINT32_C(0x5) << 12)
26827 	/* 40% of the max tx rate */
26828 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_40 \
26829 		(UINT32_C(0x6) << 12)
26830 	/* 46.66% of the max tx rate */
26831 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_46_66 \
26832 		(UINT32_C(0x7) << 12)
26833 	/* 53.33% of the max tx rate */
26834 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_53_33 \
26835 		(UINT32_C(0x8) << 12)
26836 	/* 60% of the max tx rate */
26837 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_60 \
26838 		(UINT32_C(0x9) << 12)
26839 	/* 66.66% of the max tx rate */
26840 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_66_66 \
26841 		(UINT32_C(0xa) << 12)
26842 	/* 53.33% of the max tx rate */
26843 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_73_33 \
26844 		(UINT32_C(0xb) << 12)
26845 	/* 80% of the max tx rate */
26846 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_80 \
26847 		(UINT32_C(0xc) << 12)
26848 	/* 86.66% of the max tx rate */
26849 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_86_66 \
26850 		(UINT32_C(0xd) << 12)
26851 	/* 93.33% of the max tx rate */
26852 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_93_33 \
26853 		(UINT32_C(0xe) << 12)
26854 	/* 100% of the max tx rate */
26855 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_100 \
26856 		(UINT32_C(0xf) << 12)
26857 	#define HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_LAST \
26858 		HWRM_FUNC_VF_BW_QCFG_OUTPUT_VFN_RATE_PCT_100
26859 	uint8_t	unused_0[7];
26860 	/*
26861 	 * This field is used in Output records to indicate that the output
26862 	 * is completely written to RAM. This field should be read as '1'
26863 	 * to indicate that the output has been completely written. When
26864 	 * writing a command completion or response to an internal processor,
26865 	 * the order of writes has to be such that this field is written last.
26866 	 */
26867 	uint8_t	valid;
26868 } __rte_packed_end;
26869 
26870 /***************************
26871  * hwrm_func_drv_if_change *
26872  ***************************/
26873 
26874 
26875 /* hwrm_func_drv_if_change_input (size:192b/24B) */
26876 struct __rte_packed_begin hwrm_func_drv_if_change_input {
26877 	/* The HWRM command request type. */
26878 	uint16_t	req_type;
26879 	/*
26880 	 * The completion ring to send the completion event on. This should
26881 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
26882 	 */
26883 	uint16_t	cmpl_ring;
26884 	/*
26885 	 * The sequence ID is used by the driver for tracking multiple
26886 	 * commands. This ID is treated as opaque data by the firmware and
26887 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
26888 	 */
26889 	uint16_t	seq_id;
26890 	/*
26891 	 * The target ID of the command:
26892 	 * * 0x0-0xFFF8 - The function ID
26893 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
26894 	 * * 0xFFFD - Reserved for user-space HWRM interface
26895 	 * * 0xFFFF - HWRM
26896 	 */
26897 	uint16_t	target_id;
26898 	/*
26899 	 * A physical address pointer pointing to a host buffer that the
26900 	 * command's response data will be written. This can be either a host
26901 	 * physical address (HPA) or a guest physical address (GPA) and must
26902 	 * point to a physically contiguous block of memory.
26903 	 */
26904 	uint64_t	resp_addr;
26905 	uint32_t	flags;
26906 	/*
26907 	 * When this bit is '1', the function driver is indicating
26908 	 * that the IF state is changing to UP state. The call should
26909 	 * be made at the beginning of the driver's open call before
26910 	 * resources are allocated. After making the call, the driver
26911 	 * should check the response to see if any resources may have
26912 	 * changed (see the response below). If the driver fails
26913 	 * the open call, the driver should make this call again with
26914 	 * this bit cleared to indicate that the IF state is not UP.
26915 	 * During the driver's close call when the IF state is changing
26916 	 * to DOWN, the driver should make this call with the bit cleared
26917 	 * after all resources have been freed.
26918 	 */
26919 	#define HWRM_FUNC_DRV_IF_CHANGE_INPUT_FLAGS_UP     UINT32_C(0x1)
26920 	uint32_t	unused;
26921 } __rte_packed_end;
26922 
26923 /* hwrm_func_drv_if_change_output (size:128b/16B) */
26924 struct __rte_packed_begin hwrm_func_drv_if_change_output {
26925 	/* The specific error status for the command. */
26926 	uint16_t	error_code;
26927 	/* The HWRM command request type. */
26928 	uint16_t	req_type;
26929 	/* The sequence ID from the original command. */
26930 	uint16_t	seq_id;
26931 	/* The length of the response data in number of bytes. */
26932 	uint16_t	resp_len;
26933 	uint32_t	flags;
26934 	/*
26935 	 * When this bit is '1', it indicates that the resources reserved
26936 	 * for this function may have changed. The driver should check
26937 	 * resource capabilities and reserve resources again before
26938 	 * allocating resources.
26939 	 */
26940 	#define HWRM_FUNC_DRV_IF_CHANGE_OUTPUT_FLAGS_RESC_CHANGE \
26941 		UINT32_C(0x1)
26942 	/*
26943 	 * When this bit is '1', it indicates that the firmware got changed /
26944 	 * reset. The driver should do complete re-initialization when that
26945 	 * bit is set.
26946 	 */
26947 	#define HWRM_FUNC_DRV_IF_CHANGE_OUTPUT_FLAGS_HOT_FW_RESET_DONE \
26948 		UINT32_C(0x2)
26949 	/*
26950 	 * When this bit is '1', it indicates that capabilities
26951 	 * for this function may have changed. The driver should
26952 	 * query for changes to capabilities.
26953 	 * The CAPS_CHANGE bit will only be set when it is safe for the
26954 	 * driver to completely re-initialize all resources for the function
26955 	 * including any children VFs.
26956 	 */
26957 	#define HWRM_FUNC_DRV_IF_CHANGE_OUTPUT_FLAGS_CAPS_CHANGE \
26958 		UINT32_C(0x4)
26959 	uint8_t	unused_0[3];
26960 	/*
26961 	 * This field is used in Output records to indicate that the output
26962 	 * is completely written to RAM. This field should be read as '1'
26963 	 * to indicate that the output has been completely written. When
26964 	 * writing a command completion or response to an internal processor,
26965 	 * the order of writes has to be such that this field is written last.
26966 	 */
26967 	uint8_t	valid;
26968 } __rte_packed_end;
26969 
26970 /*******************************
26971  * hwrm_func_host_pf_ids_query *
26972  *******************************/
26973 
26974 
26975 /* hwrm_func_host_pf_ids_query_input (size:192b/24B) */
26976 struct __rte_packed_begin hwrm_func_host_pf_ids_query_input {
26977 	/* The HWRM command request type. */
26978 	uint16_t	req_type;
26979 	/*
26980 	 * The completion ring to send the completion event on. This should
26981 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
26982 	 */
26983 	uint16_t	cmpl_ring;
26984 	/*
26985 	 * The sequence ID is used by the driver for tracking multiple
26986 	 * commands. This ID is treated as opaque data by the firmware and
26987 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
26988 	 */
26989 	uint16_t	seq_id;
26990 	/*
26991 	 * The target ID of the command:
26992 	 * * 0x0-0xFFF8 - The function ID
26993 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
26994 	 * * 0xFFFD - Reserved for user-space HWRM interface
26995 	 * * 0xFFFF - HWRM
26996 	 */
26997 	uint16_t	target_id;
26998 	/*
26999 	 * A physical address pointer pointing to a host buffer that the
27000 	 * command's response data will be written. This can be either a host
27001 	 * physical address (HPA) or a guest physical address (GPA) and must
27002 	 * point to a physically contiguous block of memory.
27003 	 */
27004 	uint64_t	resp_addr;
27005 	uint8_t	host;
27006 	/*
27007 	 * # If this bit is set to '1', the query will contain PF(s)
27008 	 * belongs to SOC host.
27009 	 */
27010 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_HOST_SOC      UINT32_C(0x1)
27011 	/*
27012 	 * # If this bit is set to '1', the query will contain PF(s)
27013 	 * belongs to EP0 host.
27014 	 */
27015 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_HOST_EP_0     UINT32_C(0x2)
27016 	/*
27017 	 * # If this bit is set to '1', the query will contain PF(s)
27018 	 * belongs to EP1 host.
27019 	 */
27020 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_HOST_EP_1     UINT32_C(0x4)
27021 	/*
27022 	 * # If this bit is set to '1', the query will contain PF(s)
27023 	 * belongs to EP2 host.
27024 	 */
27025 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_HOST_EP_2     UINT32_C(0x8)
27026 	/*
27027 	 * # If this bit is set to '1', the query will contain PF(s)
27028 	 * belongs to EP3 host.
27029 	 */
27030 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_HOST_EP_3     UINT32_C(0x10)
27031 	/*
27032 	 * This provides a filter of what PF(s) will be returned in the
27033 	 * query..
27034 	 */
27035 	uint8_t	filter;
27036 	/*
27037 	 * all available PF(s) belong to the host(s) (defined in the
27038 	 * host field). This includes the hidden PFs.
27039 	 */
27040 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_FILTER_ALL  UINT32_C(0x0)
27041 	/*
27042 	 * all available PF(s) belong to the host(s) (defined in the
27043 	 * host field) that is available for L2 traffic.
27044 	 */
27045 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_FILTER_L2   UINT32_C(0x1)
27046 	/*
27047 	 * all available PF(s) belong to the host(s) (defined in the
27048 	 * host field) that is available for ROCE traffic.
27049 	 */
27050 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_FILTER_ROCE UINT32_C(0x2)
27051 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_FILTER_LAST \
27052 		HWRM_FUNC_HOST_PF_IDS_QUERY_INPUT_FILTER_ROCE
27053 	uint8_t	unused_1[6];
27054 } __rte_packed_end;
27055 
27056 /* hwrm_func_host_pf_ids_query_output (size:128b/16B) */
27057 struct __rte_packed_begin hwrm_func_host_pf_ids_query_output {
27058 	/* The specific error status for the command. */
27059 	uint16_t	error_code;
27060 	/* The HWRM command request type. */
27061 	uint16_t	req_type;
27062 	/* The sequence ID from the original command. */
27063 	uint16_t	seq_id;
27064 	/* The length of the response data in number of bytes. */
27065 	uint16_t	resp_len;
27066 	/* This provides the first PF ID of the device. */
27067 	uint16_t	first_pf_id;
27068 	uint16_t	pf_ordinal_mask;
27069 	/*
27070 	 * When this bit is '1', it indicates first PF belongs to one of
27071 	 * the hosts defined in the input request.
27072 	 */
27073 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_0 \
27074 		UINT32_C(0x1)
27075 	/*
27076 	 * When this bit is '1', it indicates 2nd PF belongs to one of the
27077 	 * hosts defined in the input request.
27078 	 */
27079 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_1 \
27080 		UINT32_C(0x2)
27081 	/*
27082 	 * When this bit is '1', it indicates 3rd PF belongs to one of the
27083 	 * hosts defined in the input request.
27084 	 */
27085 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_2 \
27086 		UINT32_C(0x4)
27087 	/*
27088 	 * When this bit is '1', it indicates 4th PF belongs to one of the
27089 	 * hosts defined in the input request.
27090 	 */
27091 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_3 \
27092 		UINT32_C(0x8)
27093 	/*
27094 	 * When this bit is '1', it indicates 5th PF belongs to one of the
27095 	 * hosts defined in the input request.
27096 	 */
27097 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_4 \
27098 		UINT32_C(0x10)
27099 	/*
27100 	 * When this bit is '1', it indicates 6th PF belongs to one of the
27101 	 * hosts defined in the input request.
27102 	 */
27103 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_5 \
27104 		UINT32_C(0x20)
27105 	/*
27106 	 * When this bit is '1', it indicates 7th PF belongs to one of the
27107 	 * hosts defined in the input request.
27108 	 */
27109 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_6 \
27110 		UINT32_C(0x40)
27111 	/*
27112 	 * When this bit is '1', it indicates 8th PF belongs to one of the
27113 	 * hosts defined in the input request.
27114 	 */
27115 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_7 \
27116 		UINT32_C(0x80)
27117 	/*
27118 	 * When this bit is '1', it indicates 9th PF belongs to one of the
27119 	 * hosts defined in the input request.
27120 	 */
27121 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_8 \
27122 		UINT32_C(0x100)
27123 	/*
27124 	 * When this bit is '1', it indicates 10th PF belongs to one of the
27125 	 * hosts defined in the input request.
27126 	 */
27127 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_9 \
27128 		UINT32_C(0x200)
27129 	/*
27130 	 * When this bit is '1', it indicates 11th PF belongs to one of the
27131 	 * hosts defined in the input request.
27132 	 */
27133 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_10 \
27134 		UINT32_C(0x400)
27135 	/*
27136 	 * When this bit is '1', it indicates 12th PF belongs to one of the
27137 	 * hosts defined in the input request.
27138 	 */
27139 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_11 \
27140 		UINT32_C(0x800)
27141 	/*
27142 	 * When this bit is '1', it indicates 13th PF belongs to one of the
27143 	 * hosts defined in the input request.
27144 	 */
27145 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_12 \
27146 		UINT32_C(0x1000)
27147 	/*
27148 	 * When this bit is '1', it indicates 14th PF belongs to one of the
27149 	 * hosts defined in the input request.
27150 	 */
27151 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_13 \
27152 		UINT32_C(0x2000)
27153 	/*
27154 	 * When this bit is '1', it indicates 15th PF belongs to one of the
27155 	 * hosts defined in the input request.
27156 	 */
27157 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_14 \
27158 		UINT32_C(0x4000)
27159 	/*
27160 	 * When this bit is '1', it indicates 16th PF belongs to one of the
27161 	 * hosts defined in the input request.
27162 	 */
27163 	#define HWRM_FUNC_HOST_PF_IDS_QUERY_OUTPUT_PF_ORDINAL_MASK_FUNC_15 \
27164 		UINT32_C(0x8000)
27165 	uint8_t	unused_1[3];
27166 	/*
27167 	 * This field is used in Output records to indicate that the output
27168 	 * is completely written to RAM. This field should be read as '1'
27169 	 * to indicate that the output has been completely written. When
27170 	 * writing a command completion or response to an internal processor,
27171 	 * the order of writes has to be such that this field is written last.
27172 	 */
27173 	uint8_t	valid;
27174 } __rte_packed_end;
27175 
27176 /*********************
27177  * hwrm_func_spd_cfg *
27178  *********************/
27179 
27180 
27181 /* hwrm_func_spd_cfg_input (size:384b/48B) */
27182 struct __rte_packed_begin hwrm_func_spd_cfg_input {
27183 	/* The HWRM command request type. */
27184 	uint16_t	req_type;
27185 	/*
27186 	 * The completion ring to send the completion event on. This should
27187 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
27188 	 */
27189 	uint16_t	cmpl_ring;
27190 	/*
27191 	 * The sequence ID is used by the driver for tracking multiple
27192 	 * commands. This ID is treated as opaque data by the firmware and
27193 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
27194 	 */
27195 	uint16_t	seq_id;
27196 	/*
27197 	 * The target ID of the command:
27198 	 * * 0x0-0xFFF8 - The function ID
27199 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
27200 	 * * 0xFFFD - Reserved for user-space HWRM interface
27201 	 * * 0xFFFF - HWRM
27202 	 */
27203 	uint16_t	target_id;
27204 	/*
27205 	 * A physical address pointer pointing to a host buffer that the
27206 	 * command's response data will be written. This can be either a host
27207 	 * physical address (HPA) or a guest physical address (GPA) and must
27208 	 * point to a physically contiguous block of memory.
27209 	 */
27210 	uint64_t	resp_addr;
27211 	uint32_t	flags;
27212 	/* Set this bit is '1' to enable the SPD datapath forwarding. */
27213 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_FWD_ENABLE       UINT32_C(0x1)
27214 	/* Set this bit is '1' to disable the SPD datapath forwarding. */
27215 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_FWD_DISABLE      UINT32_C(0x2)
27216 	/*
27217 	 * Set this bit is '1' to enable the SPD datapath checksum
27218 	 * feature.
27219 	 */
27220 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_CSUM_ENABLE      UINT32_C(0x4)
27221 	/*
27222 	 * Set this bit is '1' to disable the SPD datapath checksum
27223 	 * feature.
27224 	 */
27225 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_CSUM_DISABLE     UINT32_C(0x8)
27226 	/*
27227 	 * Set this bit is '1' to enable the SPD datapath debug
27228 	 * feature.
27229 	 */
27230 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_DBG_ENABLE       UINT32_C(0x10)
27231 	/*
27232 	 * Set this bit is '1' to disable the SPD datapath debug
27233 	 * feature.
27234 	 */
27235 	#define HWRM_FUNC_SPD_CFG_INPUT_FLAGS_DBG_DISABLE      UINT32_C(0x20)
27236 	uint32_t	enables;
27237 	/*
27238 	 * This bit must be '1' for the ethertype field to be
27239 	 * configured.
27240 	 */
27241 	#define HWRM_FUNC_SPD_CFG_INPUT_ENABLES_ETHERTYPE \
27242 		UINT32_C(0x1)
27243 	/*
27244 	 * This bit must be '1' for the hash_mode_flags field to be
27245 	 * configured.
27246 	 */
27247 	#define HWRM_FUNC_SPD_CFG_INPUT_ENABLES_HASH_MODE_FLAGS \
27248 		UINT32_C(0x2)
27249 	/*
27250 	 * This bit must be '1' for the hash_type field to be
27251 	 * configured.
27252 	 */
27253 	#define HWRM_FUNC_SPD_CFG_INPUT_ENABLES_HASH_TYPE \
27254 		UINT32_C(0x4)
27255 	/*
27256 	 * This bit must be '1' for the ring_tbl_addr field to be
27257 	 * configured.
27258 	 */
27259 	#define HWRM_FUNC_SPD_CFG_INPUT_ENABLES_RING_TBL_ADDR \
27260 		UINT32_C(0x8)
27261 	/*
27262 	 * This bit must be '1' for the hash_key_tbl_addr field to be
27263 	 * configured.
27264 	 */
27265 	#define HWRM_FUNC_SPD_CFG_INPUT_ENABLES_HASH_KEY_TBL_ADDR \
27266 		UINT32_C(0x10)
27267 	/*
27268 	 * Ethertype value used in the encapsulated SPD packet header.
27269 	 * The user must choose a value that is not conflicting with
27270 	 * publicly defined ethertype values. By default, the ethertype
27271 	 * value of 0xffff is used if there is no user specified value.
27272 	 */
27273 	uint16_t	ethertype;
27274 	/* Flags to specify different RSS hash modes. */
27275 	uint8_t	hash_mode_flags;
27276 	/*
27277 	 * When this bit is '1', it indicates using current RSS
27278 	 * hash mode setting configured in the device.
27279 	 */
27280 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT \
27281 		UINT32_C(0x1)
27282 	/*
27283 	 * When this bit is '1', it indicates requesting support of
27284 	 * RSS hashing over innermost 4 tuples {l3.src, l3.dest,
27285 	 * l4.src, l4.dest} for tunnel packets. For none-tunnel
27286 	 * packets, the RSS hash is computed over the normal
27287 	 * src/dest l3 and src/dest l4 headers.
27288 	 */
27289 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_MODE_FLAGS_INNERMOST_4 \
27290 		UINT32_C(0x2)
27291 	/*
27292 	 * When this bit is '1', it indicates requesting support of
27293 	 * RSS hashing over innermost 2 tuples {l3.src, l3.dest} for
27294 	 * tunnel packets. For none-tunnel packets, the RSS hash is
27295 	 * computed over the normal src/dest l3 headers.
27296 	 */
27297 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_MODE_FLAGS_INNERMOST_2 \
27298 		UINT32_C(0x4)
27299 	/*
27300 	 * When this bit is '1', it indicates requesting support of
27301 	 * RSS hashing over outermost 4 tuples {t_l3.src, t_l3.dest,
27302 	 * t_l4.src, t_l4.dest} for tunnel packets. For none-tunnel
27303 	 * packets, the RSS hash is computed over the normal
27304 	 * src/dest l3 and src/dest l4 headers.
27305 	 */
27306 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_MODE_FLAGS_OUTERMOST_4 \
27307 		UINT32_C(0x8)
27308 	/*
27309 	 * When this bit is '1', it indicates requesting support of
27310 	 * RSS hashing over outermost 2 tuples {t_l3.src, t_l3.dest} for
27311 	 * tunnel packets. For none-tunnel packets, the RSS hash is
27312 	 * computed over the normal src/dest l3 headers.
27313 	 */
27314 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_MODE_FLAGS_OUTERMOST_2 \
27315 		UINT32_C(0x10)
27316 	uint8_t	unused_1;
27317 	uint32_t	hash_type;
27318 	/*
27319 	 * When this bit is '1', the RSS hash shall be computed
27320 	 * over source and destination IPv4 addresses of IPv4
27321 	 * packets.
27322 	 */
27323 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_IPV4         UINT32_C(0x1)
27324 	/*
27325 	 * When this bit is '1', the RSS hash shall be computed
27326 	 * over source/destination IPv4 addresses and
27327 	 * source/destination ports of TCP/IPv4 packets.
27328 	 */
27329 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_TCP_IPV4     UINT32_C(0x2)
27330 	/*
27331 	 * When this bit is '1', the RSS hash shall be computed
27332 	 * over source/destination IPv4 addresses and
27333 	 * source/destination ports of UDP/IPv4 packets.
27334 	 */
27335 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_UDP_IPV4     UINT32_C(0x4)
27336 	/*
27337 	 * When this bit is '1', the RSS hash shall be computed
27338 	 * over source and destination IPv4 addresses of IPv6
27339 	 * packets.
27340 	 */
27341 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_IPV6         UINT32_C(0x8)
27342 	/*
27343 	 * When this bit is '1', the RSS hash shall be computed
27344 	 * over source/destination IPv6 addresses and
27345 	 * source/destination ports of TCP/IPv6 packets.
27346 	 */
27347 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_TCP_IPV6     UINT32_C(0x10)
27348 	/*
27349 	 * When this bit is '1', the RSS hash shall be computed
27350 	 * over source/destination IPv6 addresses and
27351 	 * source/destination ports of UDP/IPv6 packets.
27352 	 */
27353 	#define HWRM_FUNC_SPD_CFG_INPUT_HASH_TYPE_UDP_IPV6     UINT32_C(0x20)
27354 	/* This is the address for rss ring group table */
27355 	uint64_t	ring_grp_tbl_addr;
27356 	/* This is the address for rss hash key table */
27357 	uint64_t	hash_key_tbl_addr;
27358 } __rte_packed_end;
27359 
27360 /* hwrm_func_spd_cfg_output (size:128b/16B) */
27361 struct __rte_packed_begin hwrm_func_spd_cfg_output {
27362 	/* The specific error status for the command. */
27363 	uint16_t	error_code;
27364 	/* The HWRM command request type. */
27365 	uint16_t	req_type;
27366 	/* The sequence ID from the original command. */
27367 	uint16_t	seq_id;
27368 	/* The length of the response data in number of bytes. */
27369 	uint16_t	resp_len;
27370 	uint8_t	unused_0[7];
27371 	/*
27372 	 * This field is used in Output records to indicate that the output
27373 	 * is completely written to RAM. This field should be read as '1'
27374 	 * to indicate that the output has been completely written. When
27375 	 * writing a command completion or response to an internal processor,
27376 	 * the order of writes has to be such that this field is written last.
27377 	 */
27378 	uint8_t	valid;
27379 } __rte_packed_end;
27380 
27381 /**********************
27382  * hwrm_func_spd_qcfg *
27383  **********************/
27384 
27385 
27386 /* hwrm_func_spd_qcfg_input (size:128b/16B) */
27387 struct __rte_packed_begin hwrm_func_spd_qcfg_input {
27388 	/* The HWRM command request type. */
27389 	uint16_t	req_type;
27390 	/*
27391 	 * The completion ring to send the completion event on. This should
27392 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
27393 	 */
27394 	uint16_t	cmpl_ring;
27395 	/*
27396 	 * The sequence ID is used by the driver for tracking multiple
27397 	 * commands. This ID is treated as opaque data by the firmware and
27398 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
27399 	 */
27400 	uint16_t	seq_id;
27401 	/*
27402 	 * The target ID of the command:
27403 	 * * 0x0-0xFFF8 - The function ID
27404 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
27405 	 * * 0xFFFD - Reserved for user-space HWRM interface
27406 	 * * 0xFFFF - HWRM
27407 	 */
27408 	uint16_t	target_id;
27409 	/*
27410 	 * A physical address pointer pointing to a host buffer that the
27411 	 * command's response data will be written. This can be either a host
27412 	 * physical address (HPA) or a guest physical address (GPA) and must
27413 	 * point to a physically contiguous block of memory.
27414 	 */
27415 	uint64_t	resp_addr;
27416 } __rte_packed_end;
27417 
27418 /* hwrm_func_spd_qcfg_output (size:512b/64B) */
27419 struct __rte_packed_begin hwrm_func_spd_qcfg_output {
27420 	/* The specific error status for the command. */
27421 	uint16_t	error_code;
27422 	/* The HWRM command request type. */
27423 	uint16_t	req_type;
27424 	/* The sequence ID from the original command. */
27425 	uint16_t	seq_id;
27426 	/* The length of the response data in number of bytes. */
27427 	uint16_t	resp_len;
27428 	uint32_t	flags;
27429 	/*
27430 	 * The SPD datapath forwarding is currently enabled when this
27431 	 * flag is set to '1'.
27432 	 */
27433 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_FLAGS_FWD_ENABLED      UINT32_C(0x1)
27434 	/*
27435 	 * The SPD datapath checksum feature is currently enabled when
27436 	 * this flag is set to '1'.
27437 	 */
27438 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_FLAGS_CSUM_ENABLED     UINT32_C(0x2)
27439 	/*
27440 	 * The SPD datapath debug feature is currently enabled when
27441 	 * this flag is set to '1'.
27442 	 */
27443 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_FLAGS_DBG_ENABLED      UINT32_C(0x4)
27444 	uint32_t	hash_type;
27445 	/*
27446 	 * When this bit is '1', the RSS hash shall be computed
27447 	 * over source and destination IPv4 addresses of IPv4
27448 	 * packets.
27449 	 */
27450 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_IPV4         UINT32_C(0x1)
27451 	/*
27452 	 * When this bit is '1', the RSS hash shall be computed
27453 	 * over source/destination IPv4 addresses and
27454 	 * source/destination ports of TCP/IPv4 packets.
27455 	 */
27456 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_TCP_IPV4     UINT32_C(0x2)
27457 	/*
27458 	 * When this bit is '1', the RSS hash shall be computed
27459 	 * over source/destination IPv4 addresses and
27460 	 * source/destination ports of UDP/IPv4 packets.
27461 	 */
27462 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_UDP_IPV4     UINT32_C(0x4)
27463 	/*
27464 	 * When this bit is '1', the RSS hash shall be computed
27465 	 * over source and destination IPv4 addresses of IPv6
27466 	 * packets.
27467 	 */
27468 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_IPV6         UINT32_C(0x8)
27469 	/*
27470 	 * When this bit is '1', the RSS hash shall be computed
27471 	 * over source/destination IPv6 addresses and
27472 	 * source/destination ports of TCP/IPv6 packets.
27473 	 */
27474 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_TCP_IPV6     UINT32_C(0x10)
27475 	/*
27476 	 * When this bit is '1', the RSS hash shall be computed
27477 	 * over source/destination IPv6 addresses and
27478 	 * source/destination ports of UDP/IPv6 packets.
27479 	 */
27480 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_TYPE_UDP_IPV6     UINT32_C(0x20)
27481 	/* This is the value of rss hash key */
27482 	uint32_t	hash_key[10];
27483 	/* Flags to specify different RSS hash modes. */
27484 	uint8_t	hash_mode_flags;
27485 	/*
27486 	 * When this bit is '1', it indicates using current RSS
27487 	 * hash mode setting configured in the device.
27488 	 */
27489 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_MODE_FLAGS_DEFAULT \
27490 		UINT32_C(0x1)
27491 	/*
27492 	 * When this bit is '1', it indicates requesting support of
27493 	 * RSS hashing over innermost 4 tuples {l3.src, l3.dest,
27494 	 * l4.src, l4.dest} for tunnel packets. For none-tunnel
27495 	 * packets, the RSS hash is computed over the normal
27496 	 * src/dest l3 and src/dest l4 headers.
27497 	 */
27498 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_MODE_FLAGS_INNERMOST_4 \
27499 		UINT32_C(0x2)
27500 	/*
27501 	 * When this bit is '1', it indicates requesting support of
27502 	 * RSS hashing over innermost 2 tuples {l3.src, l3.dest} for
27503 	 * tunnel packets. For none-tunnel packets, the RSS hash is
27504 	 * computed over the normal src/dest l3 headers.
27505 	 */
27506 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_MODE_FLAGS_INNERMOST_2 \
27507 		UINT32_C(0x4)
27508 	/*
27509 	 * When this bit is '1', it indicates requesting support of
27510 	 * RSS hashing over outermost 4 tuples {t_l3.src, t_l3.dest,
27511 	 * t_l4.src, t_l4.dest} for tunnel packets. For none-tunnel
27512 	 * packets, the RSS hash is computed over the normal
27513 	 * src/dest l3 and src/dest l4 headers.
27514 	 */
27515 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_MODE_FLAGS_OUTERMOST_4 \
27516 		UINT32_C(0x8)
27517 	/*
27518 	 * When this bit is '1', it indicates requesting support of
27519 	 * RSS hashing over outermost 2 tuples {t_l3.src, t_l3.dest} for
27520 	 * tunnel packets. For none-tunnel packets, the RSS hash is
27521 	 * computed over the normal src/dest l3 headers.
27522 	 */
27523 	#define HWRM_FUNC_SPD_QCFG_OUTPUT_HASH_MODE_FLAGS_OUTERMOST_2 \
27524 		UINT32_C(0x10)
27525 	uint8_t	unused_1;
27526 	/*
27527 	 * Ethertype value used in the encapsulated SPD packet header.
27528 	 * The user must choose a value that is not conflicting with
27529 	 * publicly defined ethertype values. By default, the ethertype
27530 	 * value of 0xffff is used if there is no user specified value.
27531 	 */
27532 	uint16_t	ethertype;
27533 	uint8_t	unused_2[3];
27534 	/*
27535 	 * This field is used in Output records to indicate that the output
27536 	 * is completely written to RAM. This field should be read as '1'
27537 	 * to indicate that the output has been completely written. When
27538 	 * writing a command completion or response to an internal processor,
27539 	 * the order of writes has to be such that this field is written last.
27540 	 */
27541 	uint8_t	valid;
27542 } __rte_packed_end;
27543 
27544 /*********************
27545  * hwrm_port_phy_cfg *
27546  *********************/
27547 
27548 
27549 /* hwrm_port_phy_cfg_input (size:512b/64B) */
27550 struct __rte_packed_begin hwrm_port_phy_cfg_input {
27551 	/* The HWRM command request type. */
27552 	uint16_t	req_type;
27553 	/*
27554 	 * The completion ring to send the completion event on. This should
27555 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
27556 	 */
27557 	uint16_t	cmpl_ring;
27558 	/*
27559 	 * The sequence ID is used by the driver for tracking multiple
27560 	 * commands. This ID is treated as opaque data by the firmware and
27561 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
27562 	 */
27563 	uint16_t	seq_id;
27564 	/*
27565 	 * The target ID of the command:
27566 	 * * 0x0-0xFFF8 - The function ID
27567 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
27568 	 * * 0xFFFD - Reserved for user-space HWRM interface
27569 	 * * 0xFFFF - HWRM
27570 	 */
27571 	uint16_t	target_id;
27572 	/*
27573 	 * A physical address pointer pointing to a host buffer that the
27574 	 * command's response data will be written. This can be either a host
27575 	 * physical address (HPA) or a guest physical address (GPA) and must
27576 	 * point to a physically contiguous block of memory.
27577 	 */
27578 	uint64_t	resp_addr;
27579 	uint32_t	flags;
27580 	/*
27581 	 * When this bit is set to '1', the PHY for the port shall
27582 	 * be reset.
27583 	 *
27584 	 * # If this bit is set to 1, then the HWRM shall reset the
27585 	 * PHY after applying PHY configuration changes specified
27586 	 * in this command.
27587 	 * # In order to guarantee that PHY configuration changes
27588 	 * specified in this command take effect, the HWRM
27589 	 * client should set this flag to 1.
27590 	 * # If this bit is not set to 1, then the HWRM may reset
27591 	 * the PHY depending on the current PHY configuration and
27592 	 * settings specified in this command.
27593 	 */
27594 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY \
27595 		UINT32_C(0x1)
27596 	/* deprecated bit. Do not use!!! */
27597 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_DEPRECATED \
27598 		UINT32_C(0x2)
27599 	/*
27600 	 * When this bit is set to '1', and the force_pam4_link_speed
27601 	 * bit in the 'enables' field is '0', the link shall be forced
27602 	 * to the force_link_speed value.
27603 	 *
27604 	 * When this bit is set to '1', and the force_pam4_link_speed
27605 	 * bit in the 'enables' field is '1', the link shall be forced
27606 	 * to the force_pam4_link_speed value.
27607 	 *
27608 	 * When this bit is set to '1', the HWRM client should
27609 	 * not enable any of the auto negotiation related
27610 	 * fields represented by auto_XXX fields in this command.
27611 	 * When this bit is set to '1' and the HWRM client has
27612 	 * enabled a auto_XXX field in this command, then the
27613 	 * HWRM shall ignore the enabled auto_XXX field.
27614 	 *
27615 	 * When this bit is set to zero, the link
27616 	 * shall be allowed to autoneg.
27617 	 */
27618 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE \
27619 		UINT32_C(0x4)
27620 	/*
27621 	 * When this bit is set to '1', the auto-negotiation process
27622 	 * shall be restarted on the link.
27623 	 */
27624 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG \
27625 		UINT32_C(0x8)
27626 	/*
27627 	 * When this bit is set to '1', Energy Efficient Ethernet
27628 	 * (EEE) is requested to be enabled on this link.
27629 	 * If EEE is not supported on this port, then this flag
27630 	 * shall be ignored by the HWRM.
27631 	 */
27632 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_ENABLE \
27633 		UINT32_C(0x10)
27634 	/*
27635 	 * When this bit is set to '1', Energy Efficient Ethernet
27636 	 * (EEE) is requested to be disabled on this link.
27637 	 * If EEE is not supported on this port, then this flag
27638 	 * shall be ignored by the HWRM.
27639 	 */
27640 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_DISABLE \
27641 		UINT32_C(0x20)
27642 	/*
27643 	 * When this bit is set to '1' and EEE is enabled on this
27644 	 * link, then TX LPI is requested to be enabled on the link.
27645 	 * If EEE is not supported on this port, then this flag
27646 	 * shall be ignored by the HWRM.
27647 	 * If EEE is disabled on this port, then this flag shall be
27648 	 * ignored by the HWRM.
27649 	 */
27650 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_TX_LPI_ENABLE \
27651 		UINT32_C(0x40)
27652 	/*
27653 	 * When this bit is set to '1' and EEE is enabled on this
27654 	 * link, then TX LPI is requested to be disabled on the link.
27655 	 * If EEE is not supported on this port, then this flag
27656 	 * shall be ignored by the HWRM.
27657 	 * If EEE is disabled on this port, then this flag shall be
27658 	 * ignored by the HWRM.
27659 	 */
27660 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_EEE_TX_LPI_DISABLE \
27661 		UINT32_C(0x80)
27662 	/*
27663 	 * When set to 1, then the HWRM shall enable FEC autonegotiation
27664 	 * on this port if supported. When enabled, at least one of the
27665 	 * FEC modes must be advertised by enabling the fec_clause_74_enable,
27666 	 * fec_clause_91_enable, fec_rs544_1xn_enable, fec_rs544_ieee_enable,
27667 	 * fec_rs272_1xn_enable, or fec_rs272_ieee_enable flag. If none
27668 	 * of the FEC mode is currently enabled, the HWRM shall choose
27669 	 * a default advertisement setting.
27670 	 * The default advertisement setting can be queried by calling
27671 	 * hwrm_port_phy_qcfg. Note that the link speed must be
27672 	 * in autonegotiation mode for FEC autonegotiation to take effect.
27673 	 * When set to 0, then this flag shall be ignored.
27674 	 * If FEC autonegotiation is not supported, then the HWRM shall
27675 	 * ignore this flag.
27676 	 */
27677 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_AUTONEG_ENABLE \
27678 		UINT32_C(0x100)
27679 	/*
27680 	 * When set to 1, then the HWRM shall disable FEC autonegotiation
27681 	 * on this port and use forced FEC mode. In forced FEC mode, one
27682 	 * or more FEC forced settings under the same clause can be set.
27683 	 * When set to 0, then this flag shall be ignored.
27684 	 * If FEC autonegotiation is not supported, then the HWRM shall
27685 	 * ignore this flag.
27686 	 */
27687 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_AUTONEG_DISABLE \
27688 		UINT32_C(0x200)
27689 	/*
27690 	 * When set to 1, then the HWRM shall enable FEC CLAUSE 74 (Fire
27691 	 * Code) on this port if supported, by advertising FEC CLAUSE 74 if
27692 	 * FEC autonegotiation is enabled or force enabled otherwise.
27693 	 * When set to 0, then this flag shall be ignored.
27694 	 * If FEC CLAUSE 74 is not supported, then the HWRM shall ignore this
27695 	 * flag.
27696 	 */
27697 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE74_ENABLE \
27698 		UINT32_C(0x400)
27699 	/*
27700 	 * When set to 1, then the HWRM shall disable FEC CLAUSE 74 (Fire
27701 	 * Code) on this port if supported, by not advertising FEC CLAUSE 74
27702 	 * if FEC autonegotiation is enabled or force disabled otherwise.
27703 	 * When set to 0, then this flag shall be ignored.
27704 	 * If FEC CLAUSE 74 is not supported, then the HWRM shall ignore this
27705 	 * flag.
27706 	 */
27707 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE74_DISABLE \
27708 		UINT32_C(0x800)
27709 	/*
27710 	 * When set to 1, then the HWRM shall enable FEC CLAUSE 91
27711 	 * (Reed Solomon RS(528,514) for NRZ) on this port if supported,
27712 	 * by advertising FEC RS(528,514) if FEC autonegotiation is enabled
27713 	 * or force enabled otherwise. In forced FEC mode, this flag
27714 	 * will only take effect if the speed is NRZ. Additional
27715 	 * RS544 or RS272 flags (also under clause 91) may be set for PAM4
27716 	 * in forced FEC mode.
27717 	 * When set to 0, then this flag shall be ignored.
27718 	 * If FEC RS(528,514) is not supported, then the HWRM shall ignore
27719 	 * this flag.
27720 	 */
27721 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE91_ENABLE \
27722 		UINT32_C(0x1000)
27723 	/*
27724 	 * When set to 1, then the HWRM shall disable FEC CLAUSE 91
27725 	 * (Reed Solomon RS(528,514) for NRZ) on this port if supported, by
27726 	 * not advertising RS(528,514) if FEC autonegotiation is enabled or
27727 	 * force disabled otherwise. When set to 0, then this flag shall be
27728 	 * ignored. If FEC RS(528,514) is not supported, then the HWRM
27729 	 * shall ignore this flag.
27730 	 */
27731 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_CLAUSE91_DISABLE \
27732 		UINT32_C(0x2000)
27733 	/*
27734 	 * When this bit is set to '1', the link shall be forced to
27735 	 * be taken down.
27736 	 *
27737 	 * # When this bit is set to '1", all other
27738 	 * command input settings related to the link speed shall
27739 	 * be ignored.
27740 	 * Once the link state is forced down, it can be
27741 	 * explicitly cleared from that state by setting this flag
27742 	 * to '0'.
27743 	 * # If this flag is set to '0', then the link shall be
27744 	 * cleared from forced down state if the link is in forced
27745 	 * down state.
27746 	 * There may be conditions (e.g. out-of-band or sideband
27747 	 * configuration changes for the link) outside the scope
27748 	 * of the HWRM implementation that may clear forced down
27749 	 * link state.
27750 	 */
27751 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE_LINK_DWN \
27752 		UINT32_C(0x4000)
27753 	/*
27754 	 * When set to 1, then the HWRM shall enable FEC RS544_1XN
27755 	 * on this port if supported, by advertising FEC RS544_1XN if
27756 	 * FEC autonegotiation is enabled or force enabled otherwise.
27757 	 * In forced mode, this flag will only take effect if the speed is
27758 	 * PAM4. If this flag and fec_rs544_ieee_enable are set, the
27759 	 * HWRM shall choose one of the RS544 modes.
27760 	 * When set to 0, then this flag shall be ignored.
27761 	 * If FEC RS544_1XN is not supported, then the HWRM shall ignore this
27762 	 * flag.
27763 	 */
27764 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_1XN_ENABLE \
27765 		UINT32_C(0x8000)
27766 	/*
27767 	 * When set to 1, then the HWRM shall disable FEC RS544_1XN
27768 	 * on this port if supported, by not advertising FEC RS544_1XN if
27769 	 * FEC autonegotiation is enabled or force disabled otherwise.
27770 	 * When set to 0, then this flag shall be ignored.
27771 	 * If FEC RS544_1XN is not supported, then the HWRM shall ignore
27772 	 * this flag.
27773 	 */
27774 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_1XN_DISABLE \
27775 		UINT32_C(0x10000)
27776 	/*
27777 	 * When set to 1, then the HWRM shall enable FEC RS(544,514)
27778 	 * on this port if supported, by advertising FEC RS(544,514) if
27779 	 * FEC autonegotiation is enabled or force enabled otherwise.
27780 	 * In forced mode, this flag will only take effect if the speed is
27781 	 * PAM4. If this flag and fec_rs544_1xn_enable are set, the
27782 	 * HWRM shall choose one of the RS544 modes.
27783 	 * When set to 0, then this flag shall be ignored.
27784 	 * If FEC RS(544,514) is not supported, then the HWRM shall ignore
27785 	 * this flag.
27786 	 */
27787 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_IEEE_ENABLE \
27788 		UINT32_C(0x20000)
27789 	/*
27790 	 * When set to 1, then the HWRM shall disable FEC RS(544,514)
27791 	 * on this port if supported, by not advertising FEC RS(544,514) if
27792 	 * FEC autonegotiation is enabled or force disabled otherwise.
27793 	 * When set to 0, then this flag shall be ignored.
27794 	 * If FEC RS(544,514) is not supported, then the HWRM shall ignore
27795 	 * this flag.
27796 	 */
27797 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS544_IEEE_DISABLE \
27798 		UINT32_C(0x40000)
27799 	/*
27800 	 * When set to 1, then the HWRM shall enable FEC RS272_1XN
27801 	 * on this port if supported, by advertising FEC RS272_1XN if
27802 	 * FEC autonegotiation is enabled or force enabled otherwise.
27803 	 * In forced mode, this flag will only take effect if the speed is
27804 	 * PAM4. If this flag and fec_rs272_ieee_enable are set, the
27805 	 * HWRM shall choose one of the RS272 modes. Note that RS272
27806 	 * and RS544 modes cannot be set at the same time in forced FEC mode.
27807 	 * When set to 0, then this flag shall be ignored.
27808 	 * If FEC RS272_1XN is not supported, then the HWRM shall ignore this
27809 	 * flag.
27810 	 */
27811 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS272_1XN_ENABLE \
27812 		UINT32_C(0x80000)
27813 	/*
27814 	 * When set to 1, then the HWRM shall disable FEC RS272_1XN
27815 	 * on this port if supported, by not advertising FEC RS272_1XN if
27816 	 * FEC autonegotiation is enabled or force disabled otherwise.
27817 	 * When set to 0, then this flag shall be ignored.
27818 	 * If FEC RS272_1XN is not supported, then the HWRM shall ignore
27819 	 * this flag.
27820 	 */
27821 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS272_1XN_DISABLE \
27822 		UINT32_C(0x100000)
27823 	/*
27824 	 * When set to 1, then the HWRM shall enable FEC RS(272,257)
27825 	 * on this port if supported, by advertising FEC RS(272,257) if
27826 	 * FEC autonegotiation is enabled or force enabled otherwise.
27827 	 * In forced mode, this flag will only take effect if the speed is
27828 	 * PAM4. If this flag and fec_rs272_1xn_enable are set, the
27829 	 * HWRM shall choose one of the RS272 modes. Note that RS272
27830 	 * and RS544 modes cannot be set at the same time in forced FEC mode.
27831 	 * When set to 0, then this flag shall be ignored.
27832 	 * If FEC RS(272,257) is not supported, then the HWRM shall ignore
27833 	 * this flag.
27834 	 */
27835 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS272_IEEE_ENABLE \
27836 		UINT32_C(0x200000)
27837 	/*
27838 	 * When set to 1, then the HWRM shall disable FEC RS(272,257)
27839 	 * on this port if supported, by not advertising FEC RS(272,257) if
27840 	 * FEC autonegotiation is enabled or force disabled otherwise.
27841 	 * When set to 0, then this flag shall be ignored.
27842 	 * If FEC RS(272,257) is not supported, then the HWRM shall ignore
27843 	 * this flag.
27844 	 */
27845 	#define HWRM_PORT_PHY_CFG_INPUT_FLAGS_FEC_RS272_IEEE_DISABLE \
27846 		UINT32_C(0x400000)
27847 	uint32_t	enables;
27848 	/*
27849 	 * This bit must be '1' for the auto_mode field to be
27850 	 * configured.
27851 	 */
27852 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_MODE \
27853 		UINT32_C(0x1)
27854 	/*
27855 	 * This bit must be '1' for the auto_duplex field to be
27856 	 * configured.
27857 	 */
27858 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_DUPLEX \
27859 		UINT32_C(0x2)
27860 	/*
27861 	 * This bit must be '1' for the auto_pause field to be
27862 	 * configured.
27863 	 */
27864 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_PAUSE \
27865 		UINT32_C(0x4)
27866 	/*
27867 	 * This bit must be '1' for the auto_link_speed field to be
27868 	 * configured.
27869 	 */
27870 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED \
27871 		UINT32_C(0x8)
27872 	/*
27873 	 * This bit must be '1' for the auto_link_speed_mask field to be
27874 	 * configured.
27875 	 */
27876 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEED_MASK \
27877 		UINT32_C(0x10)
27878 	/*
27879 	 * This bit must be '1' for the wirespeed field to be
27880 	 * configured.
27881 	 */
27882 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_WIRESPEED \
27883 		UINT32_C(0x20)
27884 	/*
27885 	 * This bit must be '1' for the lpbk field to be
27886 	 * configured.
27887 	 */
27888 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_LPBK \
27889 		UINT32_C(0x40)
27890 	/*
27891 	 * This bit must be '1' for the preemphasis field to be
27892 	 * configured.
27893 	 */
27894 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_PREEMPHASIS \
27895 		UINT32_C(0x80)
27896 	/*
27897 	 * This bit must be '1' for the force_pause field to be
27898 	 * configured.
27899 	 */
27900 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_FORCE_PAUSE \
27901 		UINT32_C(0x100)
27902 	/*
27903 	 * This bit must be '1' for the eee_link_speed_mask field to be
27904 	 * configured.
27905 	 */
27906 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_EEE_LINK_SPEED_MASK \
27907 		UINT32_C(0x200)
27908 	/*
27909 	 * This bit must be '1' for the tx_lpi_timer field to be
27910 	 * configured.
27911 	 */
27912 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_TX_LPI_TIMER \
27913 		UINT32_C(0x400)
27914 	/*
27915 	 * This bit must be '1' for the force_pam4_link_speed field to be
27916 	 * configured.
27917 	 */
27918 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_FORCE_PAM4_LINK_SPEED \
27919 		UINT32_C(0x800)
27920 	/*
27921 	 * This bit must be '1' for the auto_pam4_link_speed_mask field to
27922 	 * be configured.
27923 	 */
27924 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_PAM4_LINK_SPEED_MASK \
27925 		UINT32_C(0x1000)
27926 	/*
27927 	 * This bit must be '1' for the force_link_speeds2 field to be
27928 	 * configured.
27929 	 */
27930 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_FORCE_LINK_SPEEDS2 \
27931 		UINT32_C(0x2000)
27932 	/*
27933 	 * This bit must be '1' for the auto_link_speeds2_mask field to
27934 	 * be configured.
27935 	 */
27936 	#define HWRM_PORT_PHY_CFG_INPUT_ENABLES_AUTO_LINK_SPEEDS2_MASK \
27937 		UINT32_C(0x4000)
27938 	/* Port ID of port that is to be configured. */
27939 	uint16_t	port_id;
27940 	/*
27941 	 * This is the speed that will be used if the force
27942 	 * bit is '1'. If unsupported speed is selected, an error
27943 	 * will be generated.
27944 	 */
27945 	uint16_t	force_link_speed;
27946 	/* 100Mb link speed */
27947 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100MB UINT32_C(0x1)
27948 	/* 1Gb link speed */
27949 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_1GB   UINT32_C(0xa)
27950 	/* 2Gb link speed */
27951 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_2GB   UINT32_C(0x14)
27952 	/* 25Gb link speed */
27953 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_2_5GB UINT32_C(0x19)
27954 	/* 10Gb link speed */
27955 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_10GB  UINT32_C(0x64)
27956 	/* 20Mb link speed */
27957 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_20GB  UINT32_C(0xc8)
27958 	/* 25Gb link speed */
27959 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_25GB  UINT32_C(0xfa)
27960 	/* 40Gb link speed */
27961 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_40GB  UINT32_C(0x190)
27962 	/* 50Gb link speed */
27963 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_50GB  UINT32_C(0x1f4)
27964 	/* 100Gb link speed */
27965 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_100GB UINT32_C(0x3e8)
27966 	/* 10Mb link speed */
27967 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_10MB  UINT32_C(0xffff)
27968 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_LAST \
27969 		HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEED_10MB
27970 	/*
27971 	 * This value is used to identify what autoneg mode is
27972 	 * used when the link speed is not being forced.
27973 	 */
27974 	uint8_t	auto_mode;
27975 	/* Disable autoneg or autoneg disabled. No speeds are selected. */
27976 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_NONE         UINT32_C(0x0)
27977 	/* Select all possible speeds for autoneg mode. */
27978 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ALL_SPEEDS   UINT32_C(0x1)
27979 	/*
27980 	 * Select only the auto_link_speed speed for autoneg mode. This mode
27981 	 * has been DEPRECATED. An HWRM client should not use this mode.
27982 	 */
27983 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ONE_SPEED    UINT32_C(0x2)
27984 	/*
27985 	 * Select the auto_link_speed or any speed below that speed for
27986 	 * autoneg. This mode has been DEPRECATED. An HWRM client should not
27987 	 * use this mode.
27988 	 */
27989 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_ONE_OR_BELOW UINT32_C(0x3)
27990 	/*
27991 	 * Select the speeds based on the corresponding link speed mask
27992 	 * values that are provided. The included speeds are specified in the
27993 	 * auto_link_speed and auto_pam4_link_speed fields.
27994 	 */
27995 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK   UINT32_C(0x4)
27996 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_LAST \
27997 		HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK
27998 	/*
27999 	 * This is the duplex setting that will be used if the autoneg_mode
28000 	 * is "one_speed" or "one_or_below".
28001 	 */
28002 	uint8_t	auto_duplex;
28003 	/* Half Duplex will be requested. */
28004 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_HALF UINT32_C(0x0)
28005 	/* Full duplex will be requested. */
28006 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_FULL UINT32_C(0x1)
28007 	/* Both Half and Full duplex will be requested. */
28008 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_BOTH UINT32_C(0x2)
28009 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_LAST \
28010 		HWRM_PORT_PHY_CFG_INPUT_AUTO_DUPLEX_BOTH
28011 	/*
28012 	 * This value is used to configure the pause that will be
28013 	 * used for autonegotiation.
28014 	 * Add text on the usage of auto_pause and force_pause.
28015 	 */
28016 	uint8_t	auto_pause;
28017 	/*
28018 	 * When this bit is '1', Generation of tx pause messages
28019 	 * has been requested. Disabled otherwise.
28020 	 */
28021 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_TX \
28022 		UINT32_C(0x1)
28023 	/*
28024 	 * When this bit is '1', Reception of rx pause messages
28025 	 * has been requested. Disabled otherwise.
28026 	 */
28027 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_RX \
28028 		UINT32_C(0x2)
28029 	/*
28030 	 * When set to 1, the advertisement of pause is enabled.
28031 	 *
28032 	 * # When the auto_mode is not set to none and this flag is
28033 	 * set to 1, then the auto_pause bits on this port are being
28034 	 * advertised and autoneg pause results are being interpreted.
28035 	 * # When the auto_mode is not set to none and this
28036 	 * flag is set to 0, the pause is forced as indicated in
28037 	 * force_pause, and also advertised as auto_pause bits, but
28038 	 * the autoneg results are not interpreted since the pause
28039 	 * configuration is being forced.
28040 	 * # When the auto_mode is set to none and this flag is set to
28041 	 * 1, auto_pause bits should be ignored and should be set to 0.
28042 	 */
28043 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_PAUSE_AUTONEG_PAUSE \
28044 		UINT32_C(0x4)
28045 	/*
28046 	 * This field is only used by management firmware to communicate with
28047 	 * core firmware regarding phy_port_cfg.
28048 	 * It mainly used to notify core firmware that management firmware is
28049 	 * using port for NCSI over RMII communication or not.
28050 	 */
28051 	uint8_t	mgmt_flag;
28052 	/*
28053 	 * Bit denoting if management firmware is using the link for
28054 	 * NCSI over RMII communication.
28055 	 * When set to 1, management firmware is no longer using the given
28056 	 * port.
28057 	 * When set to 0, management firmware is using the given port.
28058 	 */
28059 	#define HWRM_PORT_PHY_CFG_INPUT_MGMT_FLAG_LINK_RELEASE \
28060 		UINT32_C(0x1)
28061 	/*
28062 	 * Validity bit, set to 1 to indicate other bits in mgmt_flags are
28063 	 * valid.
28064 	 */
28065 	#define HWRM_PORT_PHY_CFG_INPUT_MGMT_FLAG_MGMT_VALID \
28066 		UINT32_C(0x80)
28067 	/*
28068 	 * This is the speed that will be used if the autoneg_mode
28069 	 * is "one_speed" or "one_or_below". If an unsupported speed
28070 	 * is selected, an error will be generated.
28071 	 */
28072 	uint16_t	auto_link_speed;
28073 	/* 100Mb link speed */
28074 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_100MB UINT32_C(0x1)
28075 	/* 1Gb link speed */
28076 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_1GB   UINT32_C(0xa)
28077 	/* 2Gb link speed */
28078 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_2GB   UINT32_C(0x14)
28079 	/* 25Gb link speed */
28080 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_2_5GB UINT32_C(0x19)
28081 	/* 10Gb link speed */
28082 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_10GB  UINT32_C(0x64)
28083 	/* 20Mb link speed */
28084 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_20GB  UINT32_C(0xc8)
28085 	/* 25Gb link speed */
28086 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_25GB  UINT32_C(0xfa)
28087 	/* 40Gb link speed */
28088 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_40GB  UINT32_C(0x190)
28089 	/* 50Gb link speed */
28090 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_50GB  UINT32_C(0x1f4)
28091 	/* 100Gb link speed */
28092 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_100GB UINT32_C(0x3e8)
28093 	/* 10Mb link speed */
28094 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_10MB  UINT32_C(0xffff)
28095 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_LAST \
28096 		HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_10MB
28097 	/*
28098 	 * This is a mask of link speeds that will be used if
28099 	 * autoneg_mode is "mask". If unsupported speed is enabled
28100 	 * an error will be generated.
28101 	 */
28102 	uint16_t	auto_link_speed_mask;
28103 	/* 100Mb link speed (Half-duplex) */
28104 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100MBHD \
28105 		UINT32_C(0x1)
28106 	/* 100Mb link speed (Full-duplex) */
28107 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100MB \
28108 		UINT32_C(0x2)
28109 	/* 1Gb link speed (Half-duplex) */
28110 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_1GBHD \
28111 		UINT32_C(0x4)
28112 	/* 1Gb link speed (Full-duplex) */
28113 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_1GB \
28114 		UINT32_C(0x8)
28115 	/* 2Gb link speed */
28116 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_2GB \
28117 		UINT32_C(0x10)
28118 	/* 25Gb link speed */
28119 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_2_5GB \
28120 		UINT32_C(0x20)
28121 	/* 10Gb link speed */
28122 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_10GB \
28123 		UINT32_C(0x40)
28124 	/* 20Gb link speed */
28125 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_20GB \
28126 		UINT32_C(0x80)
28127 	/* 25Gb link speed */
28128 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_25GB \
28129 		UINT32_C(0x100)
28130 	/* 40Gb link speed */
28131 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_40GB \
28132 		UINT32_C(0x200)
28133 	/* 50Gb link speed */
28134 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_50GB \
28135 		UINT32_C(0x400)
28136 	/* 100Gb link speed */
28137 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_100GB \
28138 		UINT32_C(0x800)
28139 	/* 10Mb link speed (Half-duplex) */
28140 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_10MBHD \
28141 		UINT32_C(0x1000)
28142 	/* 10Mb link speed (Full-duplex) */
28143 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEED_MASK_10MB \
28144 		UINT32_C(0x2000)
28145 	/* This value controls the wirespeed feature. */
28146 	uint8_t	wirespeed;
28147 	/* Wirespeed feature is disabled. */
28148 	#define HWRM_PORT_PHY_CFG_INPUT_WIRESPEED_OFF UINT32_C(0x0)
28149 	/* Wirespeed feature is enabled. */
28150 	#define HWRM_PORT_PHY_CFG_INPUT_WIRESPEED_ON  UINT32_C(0x1)
28151 	#define HWRM_PORT_PHY_CFG_INPUT_WIRESPEED_LAST \
28152 		HWRM_PORT_PHY_CFG_INPUT_WIRESPEED_ON
28153 	/* This value controls the loopback setting for the PHY. */
28154 	uint8_t	lpbk;
28155 	/* No loopback is selected. Normal operation. */
28156 	#define HWRM_PORT_PHY_CFG_INPUT_LPBK_NONE     UINT32_C(0x0)
28157 	/*
28158 	 * The HW will be configured with local loopback such that
28159 	 * host data is sent back to the host without modification.
28160 	 */
28161 	#define HWRM_PORT_PHY_CFG_INPUT_LPBK_LOCAL    UINT32_C(0x1)
28162 	/*
28163 	 * The HW will be configured with remote loopback such that
28164 	 * port logic will send packets back out the transmitter that
28165 	 * are received.
28166 	 */
28167 	#define HWRM_PORT_PHY_CFG_INPUT_LPBK_REMOTE   UINT32_C(0x2)
28168 	/*
28169 	 * The HW will be configured with external loopback such that
28170 	 * host data is sent on the transmitter and based on the external
28171 	 * loopback connection the data will be received without
28172 	 * modification.
28173 	 */
28174 	#define HWRM_PORT_PHY_CFG_INPUT_LPBK_EXTERNAL UINT32_C(0x3)
28175 	#define HWRM_PORT_PHY_CFG_INPUT_LPBK_LAST \
28176 		HWRM_PORT_PHY_CFG_INPUT_LPBK_EXTERNAL
28177 	/*
28178 	 * This value is used to configure the pause that will be
28179 	 * used for force mode.
28180 	 */
28181 	uint8_t	force_pause;
28182 	/*
28183 	 * When this bit is '1', Generation of tx pause messages
28184 	 * is supported. Disabled otherwise.
28185 	 */
28186 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAUSE_TX     UINT32_C(0x1)
28187 	/*
28188 	 * When this bit is '1', Reception of rx pause messages
28189 	 * is supported. Disabled otherwise.
28190 	 */
28191 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAUSE_RX     UINT32_C(0x2)
28192 	uint8_t	unused_1;
28193 	/*
28194 	 * This value controls the pre-emphasis to be used for the
28195 	 * link. Driver should not set this value (use
28196 	 * enable.preemphasis = 0) unless driver is sure of setting.
28197 	 * Normally HWRM FW will determine proper pre-emphasis.
28198 	 */
28199 	uint32_t	preemphasis;
28200 	/*
28201 	 * Setting for link speed mask that is used to
28202 	 * advertise speeds during autonegotiation when EEE is enabled.
28203 	 * This field is valid only when EEE is enabled.
28204 	 * The speeds specified in this field shall be a subset of
28205 	 * speeds specified in auto_link_speed_mask.
28206 	 * If EEE is enabled,then at least one speed shall be provided
28207 	 * in this mask.
28208 	 */
28209 	uint16_t	eee_link_speed_mask;
28210 	/* Reserved */
28211 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD1 \
28212 		UINT32_C(0x1)
28213 	/* 100Mb link speed (Full-duplex) */
28214 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_100MB \
28215 		UINT32_C(0x2)
28216 	/* Reserved */
28217 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD2 \
28218 		UINT32_C(0x4)
28219 	/* 1Gb link speed (Full-duplex) */
28220 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_1GB \
28221 		UINT32_C(0x8)
28222 	/* Reserved */
28223 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD3 \
28224 		UINT32_C(0x10)
28225 	/* Reserved */
28226 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_RSVD4 \
28227 		UINT32_C(0x20)
28228 	/* 10Gb link speed */
28229 	#define HWRM_PORT_PHY_CFG_INPUT_EEE_LINK_SPEED_MASK_10GB \
28230 		UINT32_C(0x40)
28231 	/*
28232 	 * This is the speed that will be used if the force and force_pam4
28233 	 * bits are '1'. If unsupported speed is selected, an error
28234 	 * will be generated.
28235 	 */
28236 	uint16_t	force_pam4_link_speed;
28237 	/* 50Gb link speed */
28238 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_50GB \
28239 		UINT32_C(0x1f4)
28240 	/* 100Gb link speed */
28241 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_100GB \
28242 		UINT32_C(0x3e8)
28243 	/* 200Gb link speed */
28244 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_200GB \
28245 		UINT32_C(0x7d0)
28246 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_LAST \
28247 		HWRM_PORT_PHY_CFG_INPUT_FORCE_PAM4_LINK_SPEED_200GB
28248 	/*
28249 	 * Requested setting of TX LPI timer in microseconds.
28250 	 * This field is valid only when EEE is enabled and TX LPI is
28251 	 * enabled.
28252 	 */
28253 	uint32_t	tx_lpi_timer;
28254 	#define HWRM_PORT_PHY_CFG_INPUT_TX_LPI_TIMER_MASK UINT32_C(0xffffff)
28255 	#define HWRM_PORT_PHY_CFG_INPUT_TX_LPI_TIMER_SFT 0
28256 	/* This field specifies which PAM4 speeds are enabled for auto mode. */
28257 	uint16_t	auto_link_pam4_speed_mask;
28258 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_PAM4_SPEED_MASK_50G \
28259 		UINT32_C(0x1)
28260 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_PAM4_SPEED_MASK_100G \
28261 		UINT32_C(0x2)
28262 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_PAM4_SPEED_MASK_200G \
28263 		UINT32_C(0x4)
28264 	/*
28265 	 * This is the speed that will be used if the force_link_speeds2
28266 	 * bit is '1'. If unsupported speed is selected, an error
28267 	 * will be generated.
28268 	 */
28269 	uint16_t	force_link_speeds2;
28270 	/* 1Gb link speed */
28271 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_1GB \
28272 		UINT32_C(0xa)
28273 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
28274 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_10GB \
28275 		UINT32_C(0x64)
28276 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
28277 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_25GB \
28278 		UINT32_C(0xfa)
28279 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
28280 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_40GB \
28281 		UINT32_C(0x190)
28282 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
28283 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_50GB \
28284 		UINT32_C(0x1f4)
28285 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
28286 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_100GB \
28287 		UINT32_C(0x3e8)
28288 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
28289 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_50GB_PAM4_56 \
28290 		UINT32_C(0x1f5)
28291 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
28292 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_100GB_PAM4_56 \
28293 		UINT32_C(0x3e9)
28294 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
28295 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_200GB_PAM4_56 \
28296 		UINT32_C(0x7d1)
28297 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
28298 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_400GB_PAM4_56 \
28299 		UINT32_C(0xfa1)
28300 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
28301 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_100GB_PAM4_112 \
28302 		UINT32_C(0x3ea)
28303 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
28304 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_200GB_PAM4_112 \
28305 		UINT32_C(0x7d2)
28306 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
28307 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_400GB_PAM4_112 \
28308 		UINT32_C(0xfa2)
28309 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
28310 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_800GB_PAM4_112 \
28311 		UINT32_C(0x1f42)
28312 	#define HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_LAST \
28313 		HWRM_PORT_PHY_CFG_INPUT_FORCE_LINK_SPEEDS2_800GB_PAM4_112
28314 	/*
28315 	 * This is a mask of link speeds that will be used if
28316 	 * auto_link_speeds2_mask bit in the "enables" field is 1.
28317 	 * If unsupported speed is enabled an error will be generated.
28318 	 */
28319 	uint16_t	auto_link_speeds2_mask;
28320 	/* 1Gb link speed */
28321 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_1GB \
28322 		UINT32_C(0x1)
28323 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
28324 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_10GB \
28325 		UINT32_C(0x2)
28326 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
28327 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_25GB \
28328 		UINT32_C(0x4)
28329 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
28330 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_40GB \
28331 		UINT32_C(0x8)
28332 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
28333 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_50GB \
28334 		UINT32_C(0x10)
28335 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
28336 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_100GB \
28337 		UINT32_C(0x20)
28338 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
28339 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_50GB_PAM4_56 \
28340 		UINT32_C(0x40)
28341 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
28342 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_100GB_PAM4_56 \
28343 		UINT32_C(0x80)
28344 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
28345 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_200GB_PAM4_56 \
28346 		UINT32_C(0x100)
28347 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
28348 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_400GB_PAM4_56 \
28349 		UINT32_C(0x200)
28350 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
28351 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_100GB_PAM4_112 \
28352 		UINT32_C(0x400)
28353 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
28354 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_200GB_PAM4_112 \
28355 		UINT32_C(0x800)
28356 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
28357 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_400GB_PAM4_112 \
28358 		UINT32_C(0x1000)
28359 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
28360 	#define HWRM_PORT_PHY_CFG_INPUT_AUTO_LINK_SPEEDS2_MASK_800GB_PAM4_112 \
28361 		UINT32_C(0x2000)
28362 	uint8_t	unused_2[6];
28363 } __rte_packed_end;
28364 
28365 /* hwrm_port_phy_cfg_output (size:128b/16B) */
28366 struct __rte_packed_begin hwrm_port_phy_cfg_output {
28367 	/* The specific error status for the command. */
28368 	uint16_t	error_code;
28369 	/* The HWRM command request type. */
28370 	uint16_t	req_type;
28371 	/* The sequence ID from the original command. */
28372 	uint16_t	seq_id;
28373 	/* The length of the response data in number of bytes. */
28374 	uint16_t	resp_len;
28375 	uint8_t	unused_0[7];
28376 	/*
28377 	 * This field is used in Output records to indicate that the output
28378 	 * is completely written to RAM. This field should be read as '1'
28379 	 * to indicate that the output has been completely written. When
28380 	 * writing a command completion or response to an internal processor,
28381 	 * the order of writes has to be such that this field is written last.
28382 	 */
28383 	uint8_t	valid;
28384 } __rte_packed_end;
28385 
28386 /* hwrm_port_phy_cfg_cmd_err (size:64b/8B) */
28387 struct __rte_packed_begin hwrm_port_phy_cfg_cmd_err {
28388 	/*
28389 	 * command specific error codes that goes to
28390 	 * the cmd_err field in Common HWRM Error Response.
28391 	 */
28392 	uint8_t	code;
28393 	/* Unknown error */
28394 	#define HWRM_PORT_PHY_CFG_CMD_ERR_CODE_UNKNOWN       UINT32_C(0x0)
28395 	/* Unable to complete operation due to invalid speed */
28396 	#define HWRM_PORT_PHY_CFG_CMD_ERR_CODE_ILLEGAL_SPEED UINT32_C(0x1)
28397 	/*
28398 	 * retry the command since the phy is not ready.
28399 	 * retry count is returned in opaque_0.
28400 	 * This is only valid for the first command and
28401 	 * this value will not change for successive calls.
28402 	 * but if a 0 is returned at any time then this should
28403 	 * be treated as an un recoverable failure,
28404 	 *
28405 	 * retry interval in milliseconds is returned in opaque_1.
28406 	 * This specifies the time that user should wait before
28407 	 * issuing the next port_phy_cfg command.
28408 	 */
28409 	#define HWRM_PORT_PHY_CFG_CMD_ERR_CODE_RETRY         UINT32_C(0x2)
28410 	#define HWRM_PORT_PHY_CFG_CMD_ERR_CODE_LAST \
28411 		HWRM_PORT_PHY_CFG_CMD_ERR_CODE_RETRY
28412 	uint8_t	unused_0[7];
28413 } __rte_packed_end;
28414 
28415 /**********************
28416  * hwrm_port_phy_qcfg *
28417  **********************/
28418 
28419 
28420 /* hwrm_port_phy_qcfg_input (size:192b/24B) */
28421 struct __rte_packed_begin hwrm_port_phy_qcfg_input {
28422 	/* The HWRM command request type. */
28423 	uint16_t	req_type;
28424 	/*
28425 	 * The completion ring to send the completion event on. This should
28426 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
28427 	 */
28428 	uint16_t	cmpl_ring;
28429 	/*
28430 	 * The sequence ID is used by the driver for tracking multiple
28431 	 * commands. This ID is treated as opaque data by the firmware and
28432 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
28433 	 */
28434 	uint16_t	seq_id;
28435 	/*
28436 	 * The target ID of the command:
28437 	 * * 0x0-0xFFF8 - The function ID
28438 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
28439 	 * * 0xFFFD - Reserved for user-space HWRM interface
28440 	 * * 0xFFFF - HWRM
28441 	 */
28442 	uint16_t	target_id;
28443 	/*
28444 	 * A physical address pointer pointing to a host buffer that the
28445 	 * command's response data will be written. This can be either a host
28446 	 * physical address (HPA) or a guest physical address (GPA) and must
28447 	 * point to a physically contiguous block of memory.
28448 	 */
28449 	uint64_t	resp_addr;
28450 	/* Port ID of port that is to be queried. */
28451 	uint16_t	port_id;
28452 	uint8_t	unused_0[6];
28453 } __rte_packed_end;
28454 
28455 /* hwrm_port_phy_qcfg_output (size:832b/104B) */
28456 struct __rte_packed_begin hwrm_port_phy_qcfg_output {
28457 	/* The specific error status for the command. */
28458 	uint16_t	error_code;
28459 	/* The HWRM command request type. */
28460 	uint16_t	req_type;
28461 	/* The sequence ID from the original command. */
28462 	uint16_t	seq_id;
28463 	/* The length of the response data in number of bytes. */
28464 	uint16_t	resp_len;
28465 	/* This value indicates the current link status. */
28466 	uint8_t	link;
28467 	/* There is no link or cable detected. */
28468 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_NO_LINK UINT32_C(0x0)
28469 	/* There is no link, but a cable has been detected. */
28470 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SIGNAL  UINT32_C(0x1)
28471 	/* There is a link. */
28472 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK    UINT32_C(0x2)
28473 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LAST \
28474 		HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK
28475 	uint8_t	active_fec_signal_mode;
28476 	/*
28477 	 * This value indicates the current link signaling mode of the
28478 	 * connection.
28479 	 */
28480 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_MASK \
28481 		UINT32_C(0xf)
28482 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_SFT                 0
28483 	/* NRZ signaling */
28484 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_NRZ \
28485 		UINT32_C(0x0)
28486 	/* PAM4-56 signaling */
28487 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_PAM4 \
28488 		UINT32_C(0x1)
28489 	/* PAM4-112 signaling */
28490 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_PAM4_112 \
28491 		UINT32_C(0x2)
28492 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_LAST \
28493 		HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_PAM4_112
28494 	/* This value indicates the current active FEC mode. */
28495 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_MASK \
28496 		UINT32_C(0xf0)
28497 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_SFT                  4
28498 	/* No active FEC */
28499 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_NONE_ACTIVE \
28500 		(UINT32_C(0x0) << 4)
28501 	/* FEC CLAUSE 74 (Fire Code) active, autonegotiated or forced. */
28502 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_CLAUSE74_ACTIVE \
28503 		(UINT32_C(0x1) << 4)
28504 	/* FEC CLAUSE 91 RS(528,514) active, autonegotiated or forced. */
28505 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_CLAUSE91_ACTIVE \
28506 		(UINT32_C(0x2) << 4)
28507 	/* FEC RS544_1XN active, autonegotiated or forced. */
28508 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_RS544_1XN_ACTIVE \
28509 		(UINT32_C(0x3) << 4)
28510 	/* FEC RS(544,528) active, autonegotiated or forced. */
28511 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_RS544_IEEE_ACTIVE \
28512 		(UINT32_C(0x4) << 4)
28513 	/* FEC RS272_1XN active, autonegotiated or forced. */
28514 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_RS272_1XN_ACTIVE \
28515 		(UINT32_C(0x5) << 4)
28516 	/* FEC RS(272,257) active, autonegotiated or forced. */
28517 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_RS272_IEEE_ACTIVE \
28518 		(UINT32_C(0x6) << 4)
28519 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_LAST \
28520 		HWRM_PORT_PHY_QCFG_OUTPUT_ACTIVE_FEC_FEC_RS272_IEEE_ACTIVE
28521 	/*
28522 	 * This value indicates the current link speed of the connection.
28523 	 * The signal_mode field indicates if the link is using
28524 	 * NRZ or PAM4 signaling.
28525 	 */
28526 	uint16_t	link_speed;
28527 	/* 100Mb link speed */
28528 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100MB UINT32_C(0x1)
28529 	/* 1Gb link speed */
28530 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_1GB   UINT32_C(0xa)
28531 	/* 2Gb link speed */
28532 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2GB   UINT32_C(0x14)
28533 	/* 25Gb link speed */
28534 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_2_5GB UINT32_C(0x19)
28535 	/* 10Gb link speed */
28536 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10GB  UINT32_C(0x64)
28537 	/* 20Mb link speed */
28538 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_20GB  UINT32_C(0xc8)
28539 	/* 25Gb link speed */
28540 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_25GB  UINT32_C(0xfa)
28541 	/* 40Gb link speed */
28542 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_40GB  UINT32_C(0x190)
28543 	/* 50Gb link speed */
28544 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_50GB  UINT32_C(0x1f4)
28545 	/* 100Gb link speed */
28546 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_100GB UINT32_C(0x3e8)
28547 	/* 200Gb link speed */
28548 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_200GB UINT32_C(0x7d0)
28549 	/* 400Gb link speed */
28550 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_400GB UINT32_C(0xfa0)
28551 	/* 800Gb link speed */
28552 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_800GB UINT32_C(0x1f40)
28553 	/* 10Mb link speed */
28554 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10MB  UINT32_C(0xffff)
28555 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_LAST \
28556 		HWRM_PORT_PHY_QCFG_OUTPUT_LINK_SPEED_10MB
28557 	/*
28558 	 * This value is indicates the duplex of the current
28559 	 * configuration.
28560 	 */
28561 	uint8_t	duplex_cfg;
28562 	/* Half Duplex connection. */
28563 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_HALF UINT32_C(0x0)
28564 	/* Full duplex connection. */
28565 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_FULL UINT32_C(0x1)
28566 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_LAST \
28567 		HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_CFG_FULL
28568 	/*
28569 	 * This value is used to indicate the current
28570 	 * pause configuration. When autoneg is enabled, this value
28571 	 * represents the autoneg results of pause configuration.
28572 	 */
28573 	uint8_t	pause;
28574 	/*
28575 	 * When this bit is '1', Generation of tx pause messages
28576 	 * is supported. Disabled otherwise.
28577 	 */
28578 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_TX     UINT32_C(0x1)
28579 	/*
28580 	 * When this bit is '1', Reception of rx pause messages
28581 	 * is supported. Disabled otherwise.
28582 	 */
28583 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PAUSE_RX     UINT32_C(0x2)
28584 	/*
28585 	 * The supported speeds for the port. This is a bit mask.
28586 	 * For each speed that is supported, the corresponding
28587 	 * bit will be set to '1'.
28588 	 */
28589 	uint16_t	support_speeds;
28590 	/* 100Mb link speed (Half-duplex) */
28591 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MBHD \
28592 		UINT32_C(0x1)
28593 	/* 100Mb link speed (Full-duplex) */
28594 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100MB \
28595 		UINT32_C(0x2)
28596 	/* 1Gb link speed (Half-duplex) */
28597 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GBHD \
28598 		UINT32_C(0x4)
28599 	/* 1Gb link speed (Full-duplex) */
28600 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_1GB \
28601 		UINT32_C(0x8)
28602 	/* 2Gb link speed */
28603 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2GB \
28604 		UINT32_C(0x10)
28605 	/* 25Gb link speed */
28606 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_2_5GB \
28607 		UINT32_C(0x20)
28608 	/* 10Gb link speed */
28609 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB \
28610 		UINT32_C(0x40)
28611 	/* 20Gb link speed */
28612 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_20GB \
28613 		UINT32_C(0x80)
28614 	/* 25Gb link speed */
28615 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_25GB \
28616 		UINT32_C(0x100)
28617 	/* 40Gb link speed */
28618 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_40GB \
28619 		UINT32_C(0x200)
28620 	/* 50Gb link speed */
28621 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_50GB \
28622 		UINT32_C(0x400)
28623 	/* 100Gb link speed */
28624 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB \
28625 		UINT32_C(0x800)
28626 	/* 10Mb link speed (Half-duplex) */
28627 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10MBHD \
28628 		UINT32_C(0x1000)
28629 	/* 10Mb link speed (Full-duplex) */
28630 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10MB \
28631 		UINT32_C(0x2000)
28632 	/*
28633 	 * Current setting of forced link speed.
28634 	 * When the link speed is not being forced, this
28635 	 * value shall be set to 0.
28636 	 */
28637 	uint16_t	force_link_speed;
28638 	/* 100Mb link speed */
28639 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_100MB UINT32_C(0x1)
28640 	/* 1Gb link speed */
28641 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_1GB   UINT32_C(0xa)
28642 	/* 2Gb link speed */
28643 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_2GB   UINT32_C(0x14)
28644 	/* 25Gb link speed */
28645 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_2_5GB UINT32_C(0x19)
28646 	/* 10Gb link speed */
28647 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_10GB  UINT32_C(0x64)
28648 	/* 20Mb link speed */
28649 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_20GB  UINT32_C(0xc8)
28650 	/* 25Gb link speed */
28651 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_25GB  UINT32_C(0xfa)
28652 	/* 40Gb link speed */
28653 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_40GB \
28654 		UINT32_C(0x190)
28655 	/* 50Gb link speed */
28656 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_50GB \
28657 		UINT32_C(0x1f4)
28658 	/* 100Gb link speed */
28659 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_100GB \
28660 		UINT32_C(0x3e8)
28661 	/* 10Mb link speed */
28662 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_10MB \
28663 		UINT32_C(0xffff)
28664 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_LAST \
28665 		HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEED_10MB
28666 	/* Current setting of auto negotiation mode. */
28667 	uint8_t	auto_mode;
28668 	/* Disable autoneg or autoneg disabled. No speeds are selected. */
28669 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE         UINT32_C(0x0)
28670 	/* Select all possible speeds for autoneg mode. */
28671 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_ALL_SPEEDS   UINT32_C(0x1)
28672 	/*
28673 	 * Select only the auto_link_speed speed for autoneg mode. This mode
28674 	 * has been DEPRECATED. An HWRM client should not use this mode.
28675 	 */
28676 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_ONE_SPEED    UINT32_C(0x2)
28677 	/*
28678 	 * Select the auto_link_speed or any speed below that speed for
28679 	 * autoneg. This mode has been DEPRECATED. An HWRM client should not
28680 	 * use this mode.
28681 	 */
28682 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_ONE_OR_BELOW UINT32_C(0x3)
28683 	/*
28684 	 * Select the speeds based on the corresponding link speed mask value
28685 	 * that is provided.
28686 	 */
28687 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_SPEED_MASK   UINT32_C(0x4)
28688 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_LAST \
28689 		HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_SPEED_MASK
28690 	/*
28691 	 * Current setting of pause autonegotiation.
28692 	 * Move autoneg_pause flag here.
28693 	 */
28694 	uint8_t	auto_pause;
28695 	/*
28696 	 * When this bit is '1', Generation of tx pause messages
28697 	 * has been requested. Disabled otherwise.
28698 	 */
28699 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAUSE_TX \
28700 		UINT32_C(0x1)
28701 	/*
28702 	 * When this bit is '1', Reception of rx pause messages
28703 	 * has been requested. Disabled otherwise.
28704 	 */
28705 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAUSE_RX \
28706 		UINT32_C(0x2)
28707 	/*
28708 	 * When set to 1, the advertisement of pause is enabled.
28709 	 *
28710 	 * # When the auto_mode is not set to none and this flag is
28711 	 * set to 1, then the auto_pause bits on this port are being
28712 	 * advertised and autoneg pause results are being interpreted.
28713 	 * # When the auto_mode is not set to none and this
28714 	 * flag is set to 0, the pause is forced as indicated in
28715 	 * force_pause, and also advertised as auto_pause bits, but
28716 	 * the autoneg results are not interpreted since the pause
28717 	 * configuration is being forced.
28718 	 * # When the auto_mode is set to none and this flag is set to
28719 	 * 1, auto_pause bits should be ignored and should be set to 0.
28720 	 */
28721 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAUSE_AUTONEG_PAUSE \
28722 		UINT32_C(0x4)
28723 	/*
28724 	 * Current setting for auto_link_speed. This field is only
28725 	 * valid when auto_mode is set to "one_speed" or "one_or_below".
28726 	 */
28727 	uint16_t	auto_link_speed;
28728 	/* 100Mb link speed */
28729 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_100MB UINT32_C(0x1)
28730 	/* 1Gb link speed */
28731 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_1GB   UINT32_C(0xa)
28732 	/* 2Gb link speed */
28733 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_2GB   UINT32_C(0x14)
28734 	/* 25Gb link speed */
28735 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_2_5GB UINT32_C(0x19)
28736 	/* 10Gb link speed */
28737 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_10GB  UINT32_C(0x64)
28738 	/* 20Mb link speed */
28739 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_20GB  UINT32_C(0xc8)
28740 	/* 25Gb link speed */
28741 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_25GB  UINT32_C(0xfa)
28742 	/* 40Gb link speed */
28743 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_40GB  UINT32_C(0x190)
28744 	/* 50Gb link speed */
28745 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_50GB  UINT32_C(0x1f4)
28746 	/* 100Gb link speed */
28747 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_100GB UINT32_C(0x3e8)
28748 	/* 10Mb link speed */
28749 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_10MB \
28750 		UINT32_C(0xffff)
28751 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_LAST \
28752 		HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_10MB
28753 	/*
28754 	 * Current setting for auto_link_speed_mask that is used to
28755 	 * advertise speeds during autonegotiation.
28756 	 * This field is only valid when auto_mode is set to "mask".
28757 	 * The speeds specified in this field shall be a subset of
28758 	 * supported speeds on this port.
28759 	 */
28760 	uint16_t	auto_link_speed_mask;
28761 	/* 100Mb link speed (Half-duplex) */
28762 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_100MBHD \
28763 		UINT32_C(0x1)
28764 	/* 100Mb link speed (Full-duplex) */
28765 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_100MB \
28766 		UINT32_C(0x2)
28767 	/* 1Gb link speed (Half-duplex) */
28768 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_1GBHD \
28769 		UINT32_C(0x4)
28770 	/* 1Gb link speed (Full-duplex) */
28771 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_1GB \
28772 		UINT32_C(0x8)
28773 	/* 2Gb link speed */
28774 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_2GB \
28775 		UINT32_C(0x10)
28776 	/* 25Gb link speed */
28777 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_2_5GB \
28778 		UINT32_C(0x20)
28779 	/* 10Gb link speed */
28780 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_10GB \
28781 		UINT32_C(0x40)
28782 	/* 20Gb link speed */
28783 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_20GB \
28784 		UINT32_C(0x80)
28785 	/* 25Gb link speed */
28786 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_25GB \
28787 		UINT32_C(0x100)
28788 	/* 40Gb link speed */
28789 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_40GB \
28790 		UINT32_C(0x200)
28791 	/* 50Gb link speed */
28792 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_50GB \
28793 		UINT32_C(0x400)
28794 	/* 100Gb link speed */
28795 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_100GB \
28796 		UINT32_C(0x800)
28797 	/* 10Mb link speed (Half-duplex) */
28798 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_10MBHD \
28799 		UINT32_C(0x1000)
28800 	/* 10Mb link speed (Full-duplex) */
28801 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEED_MASK_10MB \
28802 		UINT32_C(0x2000)
28803 	/* Current setting for wirespeed. */
28804 	uint8_t	wirespeed;
28805 	/* Wirespeed feature is disabled. */
28806 	#define HWRM_PORT_PHY_QCFG_OUTPUT_WIRESPEED_OFF UINT32_C(0x0)
28807 	/* Wirespeed feature is enabled. */
28808 	#define HWRM_PORT_PHY_QCFG_OUTPUT_WIRESPEED_ON  UINT32_C(0x1)
28809 	#define HWRM_PORT_PHY_QCFG_OUTPUT_WIRESPEED_LAST \
28810 		HWRM_PORT_PHY_QCFG_OUTPUT_WIRESPEED_ON
28811 	/* Current setting for loopback. */
28812 	uint8_t	lpbk;
28813 	/* No loopback is selected. Normal operation. */
28814 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_NONE     UINT32_C(0x0)
28815 	/*
28816 	 * The HW will be configured with local loopback such that
28817 	 * host data is sent back to the host without modification.
28818 	 */
28819 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_LOCAL    UINT32_C(0x1)
28820 	/*
28821 	 * The HW will be configured with remote loopback such that
28822 	 * port logic will send packets back out the transmitter that
28823 	 * are received.
28824 	 */
28825 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_REMOTE   UINT32_C(0x2)
28826 	/*
28827 	 * The HW will be configured with external loopback such that
28828 	 * host data is sent on the transmitter and based on the external
28829 	 * loopback connection the data will be received without
28830 	 * modification.
28831 	 */
28832 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_EXTERNAL UINT32_C(0x3)
28833 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_LAST \
28834 		HWRM_PORT_PHY_QCFG_OUTPUT_LPBK_EXTERNAL
28835 	/*
28836 	 * Current setting of forced pause.
28837 	 * When the pause configuration is not being forced, then
28838 	 * this value shall be set to 0.
28839 	 */
28840 	uint8_t	force_pause;
28841 	/*
28842 	 * When this bit is '1', Generation of tx pause messages
28843 	 * is supported. Disabled otherwise.
28844 	 */
28845 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAUSE_TX     UINT32_C(0x1)
28846 	/*
28847 	 * When this bit is '1', Reception of rx pause messages
28848 	 * is supported. Disabled otherwise.
28849 	 */
28850 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAUSE_RX     UINT32_C(0x2)
28851 	/*
28852 	 * This value indicates the current status of the optics module on
28853 	 * this port.
28854 	 */
28855 	uint8_t	module_status;
28856 	/* Module is inserted and accepted */
28857 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NONE \
28858 		UINT32_C(0x0)
28859 	/* Module is rejected and transmit side Laser is disabled. */
28860 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_DISABLETX \
28861 		UINT32_C(0x1)
28862 	/* Module mismatch warning. */
28863 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_WARNINGMSG \
28864 		UINT32_C(0x2)
28865 	/* Module is rejected and powered down. */
28866 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_PWRDOWN \
28867 		UINT32_C(0x3)
28868 	/* Module is not inserted. */
28869 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NOTINSERTED \
28870 		UINT32_C(0x4)
28871 	/* Module is powered down because of over current fault. */
28872 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_CURRENTFAULT \
28873 		UINT32_C(0x5)
28874 	/* Module status is not applicable. */
28875 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NOTAPPLICABLE \
28876 		UINT32_C(0xff)
28877 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_LAST \
28878 		HWRM_PORT_PHY_QCFG_OUTPUT_MODULE_STATUS_NOTAPPLICABLE
28879 	/* Current setting for preemphasis. */
28880 	uint32_t	preemphasis;
28881 	/* This field represents the major version of the PHY. */
28882 	uint8_t	phy_maj;
28883 	/* This field represents the minor version of the PHY. */
28884 	uint8_t	phy_min;
28885 	/* This field represents the build version of the PHY. */
28886 	uint8_t	phy_bld;
28887 	/* This value represents a PHY type. */
28888 	uint8_t	phy_type;
28889 	/* Unknown */
28890 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_UNKNOWN \
28891 		UINT32_C(0x0)
28892 	/* BASE-CR */
28893 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASECR \
28894 		UINT32_C(0x1)
28895 	/* BASE-KR4 (Deprecated) */
28896 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR4 \
28897 		UINT32_C(0x2)
28898 	/* BASE-LR */
28899 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASELR \
28900 		UINT32_C(0x3)
28901 	/* BASE-SR */
28902 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASESR \
28903 		UINT32_C(0x4)
28904 	/* BASE-KR2 (Deprecated) */
28905 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR2 \
28906 		UINT32_C(0x5)
28907 	/* BASE-KX */
28908 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKX \
28909 		UINT32_C(0x6)
28910 	/* BASE-KR */
28911 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR \
28912 		UINT32_C(0x7)
28913 	/* BASE-T */
28914 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET \
28915 		UINT32_C(0x8)
28916 	/* EEE capable BASE-T */
28917 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASETE \
28918 		UINT32_C(0x9)
28919 	/* SGMII connected external PHY */
28920 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_SGMIIEXTPHY \
28921 		UINT32_C(0xa)
28922 	/* 25G_BASECR_CA_L */
28923 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_25G_BASECR_CA_L \
28924 		UINT32_C(0xb)
28925 	/* 25G_BASECR_CA_S */
28926 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_25G_BASECR_CA_S \
28927 		UINT32_C(0xc)
28928 	/* 25G_BASECR_CA_N */
28929 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_25G_BASECR_CA_N \
28930 		UINT32_C(0xd)
28931 	/* 25G_BASESR */
28932 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_25G_BASESR \
28933 		UINT32_C(0xe)
28934 	/* 100G_BASECR4 */
28935 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASECR4 \
28936 		UINT32_C(0xf)
28937 	/* 100G_BASESR4 */
28938 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASESR4 \
28939 		UINT32_C(0x10)
28940 	/* 100G_BASELR4 */
28941 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASELR4 \
28942 		UINT32_C(0x11)
28943 	/* 100G_BASEER4 */
28944 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASEER4 \
28945 		UINT32_C(0x12)
28946 	/* 100G_BASESR10 */
28947 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASESR10 \
28948 		UINT32_C(0x13)
28949 	/* 40G_BASECR4 */
28950 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_BASECR4 \
28951 		UINT32_C(0x14)
28952 	/* 40G_BASESR4 */
28953 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_BASESR4 \
28954 		UINT32_C(0x15)
28955 	/* 40G_BASELR4 */
28956 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_BASELR4 \
28957 		UINT32_C(0x16)
28958 	/* 40G_BASEER4 */
28959 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_BASEER4 \
28960 		UINT32_C(0x17)
28961 	/* 40G_ACTIVE_CABLE */
28962 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_40G_ACTIVE_CABLE \
28963 		UINT32_C(0x18)
28964 	/* 1G_baseT */
28965 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_1G_BASET \
28966 		UINT32_C(0x19)
28967 	/* 1G_baseSX */
28968 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_1G_BASESX \
28969 		UINT32_C(0x1a)
28970 	/* 1G_baseCX */
28971 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_1G_BASECX \
28972 		UINT32_C(0x1b)
28973 	/* 200G_BASECR4 */
28974 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASECR4 \
28975 		UINT32_C(0x1c)
28976 	/* 200G_BASESR4 */
28977 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASESR4 \
28978 		UINT32_C(0x1d)
28979 	/* 200G_BASELR4 */
28980 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASELR4 \
28981 		UINT32_C(0x1e)
28982 	/* 200G_BASEER4 */
28983 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASEER4 \
28984 		UINT32_C(0x1f)
28985 	/* 50G_BASECR */
28986 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_50G_BASECR \
28987 		UINT32_C(0x20)
28988 	/* 50G_BASESR */
28989 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_50G_BASESR \
28990 		UINT32_C(0x21)
28991 	/* 50G_BASELR */
28992 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_50G_BASELR \
28993 		UINT32_C(0x22)
28994 	/* 50G_BASEER */
28995 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_50G_BASEER \
28996 		UINT32_C(0x23)
28997 	/* 100G_BASECR2 */
28998 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASECR2 \
28999 		UINT32_C(0x24)
29000 	/* 100G_BASESR2 */
29001 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASESR2 \
29002 		UINT32_C(0x25)
29003 	/* 100G_BASELR2 */
29004 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASELR2 \
29005 		UINT32_C(0x26)
29006 	/* 100G_BASEER2 */
29007 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASEER2 \
29008 		UINT32_C(0x27)
29009 	/* 400G_BASECR */
29010 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASECR \
29011 		UINT32_C(0x28)
29012 	/* 100G_BASESR */
29013 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASESR \
29014 		UINT32_C(0x29)
29015 	/* 100G_BASELR */
29016 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASELR \
29017 		UINT32_C(0x2a)
29018 	/* 100G_BASEER */
29019 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_100G_BASEER \
29020 		UINT32_C(0x2b)
29021 	/* 200G_BASECR2 */
29022 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASECR2 \
29023 		UINT32_C(0x2c)
29024 	/* 200G_BASESR2 */
29025 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASESR2 \
29026 		UINT32_C(0x2d)
29027 	/* 200G_BASELR2 */
29028 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASELR2 \
29029 		UINT32_C(0x2e)
29030 	/* 200G_BASEER2 */
29031 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_200G_BASEER2 \
29032 		UINT32_C(0x2f)
29033 	/* 400G_BASECR8 */
29034 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASECR8 \
29035 		UINT32_C(0x30)
29036 	/* 200G_BASESR8 */
29037 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASESR8 \
29038 		UINT32_C(0x31)
29039 	/* 400G_BASELR8 */
29040 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASELR8 \
29041 		UINT32_C(0x32)
29042 	/* 400G_BASEER8 */
29043 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASEER8 \
29044 		UINT32_C(0x33)
29045 	/* 400G_BASECR4 */
29046 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASECR4 \
29047 		UINT32_C(0x34)
29048 	/* 400G_BASESR4 */
29049 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASESR4 \
29050 		UINT32_C(0x35)
29051 	/* 400G_BASELR4 */
29052 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASELR4 \
29053 		UINT32_C(0x36)
29054 	/* 400G_BASEER4 */
29055 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_400G_BASEER4 \
29056 		UINT32_C(0x37)
29057 	/* 800G_BASECR8 */
29058 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASECR8 \
29059 		UINT32_C(0x38)
29060 	/* 800G_BASESR8 */
29061 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASESR8 \
29062 		UINT32_C(0x39)
29063 	/* 800G_BASELR8 */
29064 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASELR8 \
29065 		UINT32_C(0x3a)
29066 	/* 800G_BASEER8 */
29067 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASEER8 \
29068 		UINT32_C(0x3b)
29069 	/* 800G_BASEFR8 */
29070 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASEFR8 \
29071 		UINT32_C(0x3c)
29072 	/* 800G_BASEDR8 */
29073 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASEDR8 \
29074 		UINT32_C(0x3d)
29075 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_LAST \
29076 		HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_800G_BASEDR8
29077 	/* This value represents a media type. */
29078 	uint8_t	media_type;
29079 	/* Unknown */
29080 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_UNKNOWN UINT32_C(0x0)
29081 	/* Twisted Pair */
29082 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_TP      UINT32_C(0x1)
29083 	/* Direct Attached Copper */
29084 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_DAC     UINT32_C(0x2)
29085 	/* Fiber */
29086 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_FIBRE   UINT32_C(0x3)
29087 	#define HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_LAST \
29088 		HWRM_PORT_PHY_QCFG_OUTPUT_MEDIA_TYPE_FIBRE
29089 	/* This value represents a transceiver type. */
29090 	uint8_t	xcvr_pkg_type;
29091 	/* PHY and MAC are in the same package */
29092 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_PKG_TYPE_XCVR_INTERNAL \
29093 		UINT32_C(0x1)
29094 	/* PHY and MAC are in different packages */
29095 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_PKG_TYPE_XCVR_EXTERNAL \
29096 		UINT32_C(0x2)
29097 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_PKG_TYPE_LAST \
29098 		HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_PKG_TYPE_XCVR_EXTERNAL
29099 	uint8_t	eee_config_phy_addr;
29100 	/* This field represents PHY address. */
29101 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_ADDR_MASK \
29102 		UINT32_C(0x1f)
29103 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PHY_ADDR_SFT               0
29104 	/*
29105 	 * This field represents flags related to EEE configuration.
29106 	 * These EEE configuration flags are valid only when the
29107 	 * auto_mode is not set to none (in other words autonegotiation
29108 	 * is enabled).
29109 	 */
29110 	#define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_MASK \
29111 		UINT32_C(0xe0)
29112 	#define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_SFT             5
29113 	/*
29114 	 * When set to 1, Energy Efficient Ethernet (EEE) mode is
29115 	 * enabled. Speeds for autoneg with EEE mode enabled are based on
29116 	 * eee_link_speed_mask.
29117 	 */
29118 	#define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_EEE_ENABLED \
29119 		UINT32_C(0x20)
29120 	/*
29121 	 * This flag is valid only when eee_enabled is set to 1.
29122 	 *
29123 	 * # If eee_enabled is set to 0, then EEE mode is disabled
29124 	 * and this flag shall be ignored.
29125 	 * # If eee_enabled is set to 1 and this flag is set to 1,
29126 	 * then Energy Efficient Ethernet (EEE) mode is enabled
29127 	 * and in use.
29128 	 * # If eee_enabled is set to 1 and this flag is set to 0,
29129 	 * then Energy Efficient Ethernet (EEE) mode is enabled
29130 	 * but is currently not in use.
29131 	 */
29132 	#define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_EEE_ACTIVE \
29133 		UINT32_C(0x40)
29134 	/*
29135 	 * This flag is valid only when eee_enabled is set to 1.
29136 	 *
29137 	 * # If eee_enabled is set to 0, then EEE mode is disabled
29138 	 * and this flag shall be ignored.
29139 	 * # If eee_enabled is set to 1 and this flag is set to 1,
29140 	 * then Energy Efficient Ethernet (EEE) mode is enabled
29141 	 * and TX LPI is enabled.
29142 	 * # If eee_enabled is set to 1 and this flag is set to 0,
29143 	 * then Energy Efficient Ethernet (EEE) mode is enabled
29144 	 * but TX LPI is disabled.
29145 	 */
29146 	#define HWRM_PORT_PHY_QCFG_OUTPUT_EEE_CONFIG_EEE_TX_LPI \
29147 		UINT32_C(0x80)
29148 	/*
29149 	 * When set to 1, the parallel detection is used to determine
29150 	 * the speed of the link partner.
29151 	 *
29152 	 * Parallel detection is used when a autonegotiation capable
29153 	 * device is connected to a link partner that is not capable
29154 	 * of autonegotiation.
29155 	 */
29156 	uint8_t	parallel_detect;
29157 	/*
29158 	 * When set to 1, the parallel detection is used to determine
29159 	 * the speed of the link partner.
29160 	 *
29161 	 * Parallel detection is used when a autonegotiation capable
29162 	 * device is connected to a link partner that is not capable
29163 	 * of autonegotiation.
29164 	 */
29165 	#define HWRM_PORT_PHY_QCFG_OUTPUT_PARALLEL_DETECT     UINT32_C(0x1)
29166 	/*
29167 	 * The advertised speeds for the port by the link partner.
29168 	 * Each advertised speed will be set to '1'.
29169 	 */
29170 	uint16_t	link_partner_adv_speeds;
29171 	/* 100Mb link speed (Half-duplex) */
29172 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_100MBHD \
29173 		UINT32_C(0x1)
29174 	/* 100Mb link speed (Full-duplex) */
29175 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_100MB \
29176 		UINT32_C(0x2)
29177 	/* 1Gb link speed (Half-duplex) */
29178 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_1GBHD \
29179 		UINT32_C(0x4)
29180 	/* 1Gb link speed (Full-duplex) */
29181 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_1GB \
29182 		UINT32_C(0x8)
29183 	/* 2Gb link speed */
29184 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_2GB \
29185 		UINT32_C(0x10)
29186 	/* 25Gb link speed */
29187 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_2_5GB \
29188 		UINT32_C(0x20)
29189 	/* 10Gb link speed */
29190 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_10GB \
29191 		UINT32_C(0x40)
29192 	/* 20Gb link speed */
29193 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_20GB \
29194 		UINT32_C(0x80)
29195 	/* 25Gb link speed */
29196 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_25GB \
29197 		UINT32_C(0x100)
29198 	/* 40Gb link speed */
29199 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_40GB \
29200 		UINT32_C(0x200)
29201 	/* 50Gb link speed */
29202 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_50GB \
29203 		UINT32_C(0x400)
29204 	/* 100Gb link speed */
29205 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_100GB \
29206 		UINT32_C(0x800)
29207 	/* 10Mb link speed (Half-duplex) */
29208 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_10MBHD \
29209 		UINT32_C(0x1000)
29210 	/* 10Mb link speed (Full-duplex) */
29211 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_SPEEDS_10MB \
29212 		UINT32_C(0x2000)
29213 	/*
29214 	 * The advertised autoneg for the port by the link partner.
29215 	 * This field is deprecated and should be set to 0.
29216 	 */
29217 	uint8_t	link_partner_adv_auto_mode;
29218 	/* Disable autoneg or autoneg disabled. No speeds are selected. */
29219 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_NONE \
29220 		UINT32_C(0x0)
29221 	/* Select all possible speeds for autoneg mode. */
29222 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_ALL_SPEEDS \
29223 		UINT32_C(0x1)
29224 	/*
29225 	 * Select only the auto_link_speed speed for autoneg mode. This mode
29226 	 * has been DEPRECATED. An HWRM client should not use this mode.
29227 	 */
29228 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_ONE_SPEED \
29229 		UINT32_C(0x2)
29230 	/*
29231 	 * Select the auto_link_speed or any speed below that speed for
29232 	 * autoneg. This mode has been DEPRECATED. An HWRM client should not
29233 	 * use this mode.
29234 	 */
29235 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_ONE_OR_BELOW \
29236 		UINT32_C(0x3)
29237 	/*
29238 	 * Select the speeds based on the corresponding link speed mask value
29239 	 * that is provided.
29240 	 */
29241 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_SPEED_MASK \
29242 		UINT32_C(0x4)
29243 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_LAST \
29244 		HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_AUTO_MODE_SPEED_MASK
29245 	/* The advertised pause settings on the port by the link partner. */
29246 	uint8_t	link_partner_adv_pause;
29247 	/*
29248 	 * When this bit is '1', Generation of tx pause messages
29249 	 * is supported. Disabled otherwise.
29250 	 */
29251 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_PAUSE_TX \
29252 		UINT32_C(0x1)
29253 	/*
29254 	 * When this bit is '1', Reception of rx pause messages
29255 	 * is supported. Disabled otherwise.
29256 	 */
29257 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_PAUSE_RX \
29258 		UINT32_C(0x2)
29259 	/*
29260 	 * Current setting for link speed mask that is used to
29261 	 * advertise speeds during autonegotiation when EEE is enabled.
29262 	 * This field is valid only when eee_enabled flags is set to 1.
29263 	 * The speeds specified in this field shall be a subset of
29264 	 * speeds specified in auto_link_speed_mask.
29265 	 */
29266 	uint16_t	adv_eee_link_speed_mask;
29267 	/* Reserved */
29268 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD1 \
29269 		UINT32_C(0x1)
29270 	/* 100Mb link speed (Full-duplex) */
29271 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_100MB \
29272 		UINT32_C(0x2)
29273 	/* Reserved */
29274 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD2 \
29275 		UINT32_C(0x4)
29276 	/* 1Gb link speed (Full-duplex) */
29277 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_1GB \
29278 		UINT32_C(0x8)
29279 	/* Reserved */
29280 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD3 \
29281 		UINT32_C(0x10)
29282 	/* Reserved */
29283 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_RSVD4 \
29284 		UINT32_C(0x20)
29285 	/* 10Gb link speed */
29286 	#define HWRM_PORT_PHY_QCFG_OUTPUT_ADV_EEE_LINK_SPEED_MASK_10GB \
29287 		UINT32_C(0x40)
29288 	/*
29289 	 * Current setting for link speed mask that is advertised by
29290 	 * the link partner when EEE is enabled.
29291 	 * This field is valid only when eee_enabled flags is set to 1.
29292 	 */
29293 	uint16_t	link_partner_adv_eee_link_speed_mask;
29294 	/* Reserved */
29295 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD1 \
29296 		UINT32_C(0x1)
29297 	/* 100Mb link speed (Full-duplex) */
29298 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_100MB \
29299 		UINT32_C(0x2)
29300 	/* Reserved */
29301 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD2 \
29302 		UINT32_C(0x4)
29303 	/* 1Gb link speed (Full-duplex) */
29304 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_1GB \
29305 		UINT32_C(0x8)
29306 	/* Reserved */
29307 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD3 \
29308 		UINT32_C(0x10)
29309 	/* Reserved */
29310 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_RSVD4 \
29311 		UINT32_C(0x20)
29312 	/* 10Gb link speed */
29313 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_ADV_EEE_LINK_SPEED_MASK_10GB \
29314 		UINT32_C(0x40)
29315 	uint32_t	xcvr_identifier_type_tx_lpi_timer;
29316 	/*
29317 	 * Current setting of TX LPI timer in microseconds.
29318 	 * This field is valid only when_eee_enabled flag is set to 1
29319 	 * and tx_lpi_enabled is set to 1.
29320 	 */
29321 	#define HWRM_PORT_PHY_QCFG_OUTPUT_TX_LPI_TIMER_MASK \
29322 		UINT32_C(0xffffff)
29323 	#define HWRM_PORT_PHY_QCFG_OUTPUT_TX_LPI_TIMER_SFT             0
29324 	/* This value represents transceiver identifier type. */
29325 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_MASK \
29326 		UINT32_C(0xff000000)
29327 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_SFT     24
29328 	/* Unknown */
29329 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_UNKNOWN \
29330 		(UINT32_C(0x0) << 24)
29331 	/* SFP/SFP+/SFP28 */
29332 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_SFP \
29333 		(UINT32_C(0x3) << 24)
29334 	/* QSFP+ */
29335 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFP \
29336 		(UINT32_C(0xc) << 24)
29337 	/* QSFP+ */
29338 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFPPLUS \
29339 		(UINT32_C(0xd) << 24)
29340 	/* QSFP28/QSFP56 or later */
29341 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFP28 \
29342 		(UINT32_C(0x11) << 24)
29343 	/* QSFP-DD */
29344 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFPDD \
29345 		(UINT32_C(0x18) << 24)
29346 	/* QSFP112 */
29347 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_QSFP112 \
29348 		(UINT32_C(0x1e) << 24)
29349 	/* SFP-DD CMIS */
29350 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_SFPDD \
29351 		(UINT32_C(0x1f) << 24)
29352 	/* SFP CMIS */
29353 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_CSFP \
29354 		(UINT32_C(0x20) << 24)
29355 	#define HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_LAST \
29356 		HWRM_PORT_PHY_QCFG_OUTPUT_XCVR_IDENTIFIER_TYPE_CSFP
29357 	/*
29358 	 * This value represents the current configuration of
29359 	 * Forward Error Correction (FEC) on the port.
29360 	 */
29361 	uint16_t	fec_cfg;
29362 	/*
29363 	 * When set to 1, then FEC is not supported on this port. If this
29364 	 * flag is set to 1, then all other FEC configuration flags shall be
29365 	 * ignored. When set to 0, then FEC is supported as indicated by
29366 	 * other configuration flags.
29367 	 */
29368 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_NONE_SUPPORTED \
29369 		UINT32_C(0x1)
29370 	/*
29371 	 * When set to 1, then FEC autonegotiation is supported on this port.
29372 	 * When set to 0, then FEC autonegotiation is not supported on this
29373 	 * port.
29374 	 */
29375 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_AUTONEG_SUPPORTED \
29376 		UINT32_C(0x2)
29377 	/*
29378 	 * When set to 1, then FEC autonegotiation is enabled on this port.
29379 	 * When set to 0, then FEC autonegotiation is disabled if supported.
29380 	 * This flag should be ignored if FEC autonegotiation is not
29381 	 * supported on this port.
29382 	 */
29383 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_AUTONEG_ENABLED \
29384 		UINT32_C(0x4)
29385 	/*
29386 	 * When set to 1, then FEC CLAUSE 74 (Fire Code) is supported on this
29387 	 * port. When set to 0, then FEC CLAUSE 74 (Fire Code) is not
29388 	 * supported on this port.
29389 	 */
29390 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE74_SUPPORTED \
29391 		UINT32_C(0x8)
29392 	/*
29393 	 * When set to 1, then FEC CLAUSE 74 (Fire Code) is enabled on this
29394 	 * port. This means that FEC CLAUSE 74 is either advertised if
29395 	 * FEC autonegotiation is enabled or FEC CLAUSE 74 is force enabled.
29396 	 * When set to 0, then FEC CLAUSE 74 (Fire Code) is disabled if
29397 	 * supported. This flag should be ignored if FEC CLAUSE 74 is not
29398 	 * supported on this port.
29399 	 */
29400 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE74_ENABLED \
29401 		UINT32_C(0x10)
29402 	/*
29403 	 * When set to 1, then FEC CLAUSE 91 (Reed Solomon RS(528,514) for
29404 	 * NRZ) is supported on this port.
29405 	 * When set to 0, then FEC RS(528,418) is not supported on this port.
29406 	 */
29407 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_SUPPORTED \
29408 		UINT32_C(0x20)
29409 	/*
29410 	 * When set to 1, then FEC CLAUSE 91 (Reed Solomon RS(528,514) for
29411 	 * NRZ) is enabled on this port. This means that FEC RS(528,514) is
29412 	 * either advertised if FEC autonegotiation is enabled or FEC
29413 	 * RS(528,514) is force enabled. When set to 0, then FEC RS(528,514)
29414 	 * is disabled if supported.
29415 	 * This flag should be ignored if FEC CLAUSE 91 is not supported on
29416 	 * this port.
29417 	 */
29418 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_CLAUSE91_ENABLED \
29419 		UINT32_C(0x40)
29420 	/*
29421 	 * When set to 1, then FEC RS544_1XN is supported on this port.
29422 	 * When set to 0, then FEC RS544_1XN is not supported on this port.
29423 	 */
29424 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_1XN_SUPPORTED \
29425 		UINT32_C(0x80)
29426 	/*
29427 	 * When set to 1, then RS544_1XN is enabled on this
29428 	 * port. This means that FEC RS544_1XN is either advertised if
29429 	 * FEC autonegotiation is enabled or FEC RS544_1XN is force enabled.
29430 	 * When set to 0, then FEC RS544_1XN is disabled if supported.
29431 	 * This flag should be ignored if FEC RS544_1XN is not supported on
29432 	 * this port.
29433 	 */
29434 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_1XN_ENABLED \
29435 		UINT32_C(0x100)
29436 	/*
29437 	 * When set to 1, then FEC RS(544,514) is supported on this port.
29438 	 * When set to 0, then FEC RS(544,514) is not supported on this port.
29439 	 */
29440 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_IEEE_SUPPORTED \
29441 		UINT32_C(0x200)
29442 	/*
29443 	 * When set to 1, then RS(544,514) is enabled on this
29444 	 * port. This means that FEC RS(544,514) is either advertised if
29445 	 * FEC autonegotiation is enabled or FEC RS(544,514) is force
29446 	 * enabled. When set to 0, then FEC RS(544,514) is disabled if
29447 	 * supported. This flag should be ignored if FEC RS(544,514) is not
29448 	 * supported on this port.
29449 	 */
29450 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS544_IEEE_ENABLED \
29451 		UINT32_C(0x400)
29452 	/*
29453 	 * When set to 1, then FEC RS272_1XN is supported on this port.
29454 	 * When set to 0, then FEC RS272_1XN is not supported on this port.
29455 	 */
29456 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS272_1XN_SUPPORTED \
29457 		UINT32_C(0x800)
29458 	/*
29459 	 * When set to 1, then RS272_1XN is enabled on this
29460 	 * port. This means that FEC RS272_1XN is either advertised if
29461 	 * FEC autonegotiation is enabled or FEC RS272_1XN is force
29462 	 * enabled. When set to 0, then FEC RS272_1XN is disabled if
29463 	 * supported.
29464 	 * This flag should be ignored if FEC RS272_1XN is not supported on
29465 	 * this port.
29466 	 */
29467 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS272_1XN_ENABLED \
29468 		UINT32_C(0x1000)
29469 	/*
29470 	 * When set to 1, then FEC RS(272,514) is supported on this port.
29471 	 * When set to 0, then FEC RS(272,514) is not supported on this port.
29472 	 */
29473 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS272_IEEE_SUPPORTED \
29474 		UINT32_C(0x2000)
29475 	/*
29476 	 * When set to 1, then RS(272,257) is enabled on this
29477 	 * port. This means that FEC RS(272,257) is either advertised if
29478 	 * FEC autonegotiation is enabled or FEC RS(272,257) is force
29479 	 * enabled. When set to 0, then FEC RS(272,257) is disabled if
29480 	 * supported.
29481 	 * This flag should be ignored if FEC RS(272,257) is not supported on
29482 	 * this port.
29483 	 */
29484 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FEC_CFG_FEC_RS272_IEEE_ENABLED \
29485 		UINT32_C(0x4000)
29486 	/*
29487 	 * This value is indicates the duplex of the current
29488 	 * connection state.
29489 	 */
29490 	uint8_t	duplex_state;
29491 	/* Half Duplex connection. */
29492 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_STATE_HALF UINT32_C(0x0)
29493 	/* Full duplex connection. */
29494 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_STATE_FULL UINT32_C(0x1)
29495 	#define HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_STATE_LAST \
29496 		HWRM_PORT_PHY_QCFG_OUTPUT_DUPLEX_STATE_FULL
29497 	/* Option flags fields. */
29498 	uint8_t	option_flags;
29499 	/* When this bit is '1', Media auto detect is enabled. */
29500 	#define HWRM_PORT_PHY_QCFG_OUTPUT_OPTION_FLAGS_MEDIA_AUTO_DETECT \
29501 		UINT32_C(0x1)
29502 	/*
29503 	 * When this bit is '1', active_fec_signal_mode can be
29504 	 * trusted.
29505 	 */
29506 	#define HWRM_PORT_PHY_QCFG_OUTPUT_OPTION_FLAGS_SIGNAL_MODE_KNOWN \
29507 		UINT32_C(0x2)
29508 	/*
29509 	 * When this bit is '1', speeds2 fields are used to get
29510 	 * speed details.
29511 	 */
29512 	#define HWRM_PORT_PHY_QCFG_OUTPUT_OPTION_FLAGS_SPEEDS2_SUPPORTED \
29513 		UINT32_C(0x4)
29514 	/*
29515 	 * Up to 16 bytes of null padded ASCII string representing
29516 	 * PHY vendor.
29517 	 * If the string is set to null, then the vendor name is not
29518 	 * available.
29519 	 */
29520 	char	phy_vendor_name[16];
29521 	/*
29522 	 * Up to 16 bytes of null padded ASCII string that
29523 	 * identifies vendor specific part number of the PHY.
29524 	 * If the string is set to null, then the vendor specific
29525 	 * part number is not available.
29526 	 */
29527 	char	phy_vendor_partnumber[16];
29528 	/*
29529 	 * The supported PAM4 speeds for the port. This is a bit mask.
29530 	 * For each speed that is supported, the corresponding
29531 	 * bit will be set to '1'.
29532 	 */
29533 	uint16_t	support_pam4_speeds;
29534 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_50G \
29535 		UINT32_C(0x1)
29536 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_100G \
29537 		UINT32_C(0x2)
29538 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_PAM4_SPEEDS_200G \
29539 		UINT32_C(0x4)
29540 	/*
29541 	 * Current setting of forced PAM4 link speed.
29542 	 * When the link speed is not being forced, this
29543 	 * value shall be set to 0.
29544 	 */
29545 	uint16_t	force_pam4_link_speed;
29546 	/* 50Gb link speed */
29547 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAM4_LINK_SPEED_50GB \
29548 		UINT32_C(0x1f4)
29549 	/* 100Gb link speed */
29550 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAM4_LINK_SPEED_100GB \
29551 		UINT32_C(0x3e8)
29552 	/* 200Gb link speed */
29553 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAM4_LINK_SPEED_200GB \
29554 		UINT32_C(0x7d0)
29555 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAM4_LINK_SPEED_LAST \
29556 		HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_PAM4_LINK_SPEED_200GB
29557 	/*
29558 	 * Current setting for auto_pam4_link_speed_mask that is used to
29559 	 * advertise speeds during autonegotiation.
29560 	 * This field is only valid when auto_mode is set to "mask".
29561 	 * The speeds specified in this field shall be a subset of
29562 	 * supported speeds on this port.
29563 	 */
29564 	uint16_t	auto_pam4_link_speed_mask;
29565 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAM4_LINK_SPEED_MASK_50G \
29566 		UINT32_C(0x1)
29567 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAM4_LINK_SPEED_MASK_100G \
29568 		UINT32_C(0x2)
29569 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_PAM4_LINK_SPEED_MASK_200G \
29570 		UINT32_C(0x4)
29571 	/*
29572 	 * The advertised PAM4 speeds for the port by the link partner.
29573 	 * Each advertised speed will be set to '1'.
29574 	 */
29575 	uint8_t	link_partner_pam4_adv_speeds;
29576 	/* 50Gb link speed */
29577 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_PAM4_ADV_SPEEDS_50GB \
29578 		UINT32_C(0x1)
29579 	/* 100Gb link speed */
29580 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_PAM4_ADV_SPEEDS_100GB \
29581 		UINT32_C(0x2)
29582 	/* 200Gb link speed */
29583 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_PARTNER_PAM4_ADV_SPEEDS_200GB \
29584 		UINT32_C(0x4)
29585 	/*
29586 	 * This field is used to indicate the reasons for link down.
29587 	 * This field is set to 0, if the link down reason is unknown.
29588 	 */
29589 	uint8_t	link_down_reason;
29590 	/* Remote fault */
29591 	#define HWRM_PORT_PHY_QCFG_OUTPUT_LINK_DOWN_REASON_RF     UINT32_C(0x1)
29592 	/*
29593 	 * The supported speeds for the port. This is a bit mask.
29594 	 * For each speed that is supported, the corresponding
29595 	 * bit will be set to '1'. This is valid only if speeds2_supported
29596 	 * is set in option_flags
29597 	 */
29598 	uint16_t	support_speeds2;
29599 	/* 1Gb link speed */
29600 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_1GB \
29601 		UINT32_C(0x1)
29602 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
29603 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_10GB \
29604 		UINT32_C(0x2)
29605 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
29606 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_25GB \
29607 		UINT32_C(0x4)
29608 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
29609 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_40GB \
29610 		UINT32_C(0x8)
29611 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
29612 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_50GB \
29613 		UINT32_C(0x10)
29614 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
29615 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_100GB \
29616 		UINT32_C(0x20)
29617 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
29618 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_50GB_PAM4_56 \
29619 		UINT32_C(0x40)
29620 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
29621 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_100GB_PAM4_56 \
29622 		UINT32_C(0x80)
29623 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
29624 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_200GB_PAM4_56 \
29625 		UINT32_C(0x100)
29626 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
29627 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_400GB_PAM4_56 \
29628 		UINT32_C(0x200)
29629 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
29630 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_100GB_PAM4_112 \
29631 		UINT32_C(0x400)
29632 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
29633 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_200GB_PAM4_112 \
29634 		UINT32_C(0x800)
29635 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
29636 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_400GB_PAM4_112 \
29637 		UINT32_C(0x1000)
29638 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
29639 	#define HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS2_800GB_PAM4_112 \
29640 		UINT32_C(0x2000)
29641 	/*
29642 	 * Current setting of forced link speed. When the link speed is not
29643 	 * being forced, this value shall be set to 0.
29644 	 * This field is valid only if speeds2_supported is set in
29645 	 * option_flags.
29646 	 */
29647 	uint16_t	force_link_speeds2;
29648 	/* 1Gb link speed */
29649 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_1GB \
29650 		UINT32_C(0xa)
29651 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
29652 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_10GB \
29653 		UINT32_C(0x64)
29654 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
29655 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_25GB \
29656 		UINT32_C(0xfa)
29657 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
29658 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_40GB \
29659 		UINT32_C(0x190)
29660 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
29661 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_50GB \
29662 		UINT32_C(0x1f4)
29663 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
29664 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_100GB \
29665 		UINT32_C(0x3e8)
29666 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
29667 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_50GB_PAM4_56 \
29668 		UINT32_C(0x1f5)
29669 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
29670 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_100GB_PAM4_56 \
29671 		UINT32_C(0x3e9)
29672 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
29673 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_200GB_PAM4_56 \
29674 		UINT32_C(0x7d1)
29675 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
29676 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_400GB_PAM4_56 \
29677 		UINT32_C(0xfa1)
29678 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
29679 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_100GB_PAM4_112 \
29680 		UINT32_C(0x3ea)
29681 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
29682 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_200GB_PAM4_112 \
29683 		UINT32_C(0x7d2)
29684 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
29685 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_400GB_PAM4_112 \
29686 		UINT32_C(0xfa2)
29687 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
29688 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_800GB_PAM4_112 \
29689 		UINT32_C(0x1f42)
29690 	#define HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_LAST \
29691 		HWRM_PORT_PHY_QCFG_OUTPUT_FORCE_LINK_SPEEDS2_800GB_PAM4_112
29692 	/*
29693 	 * Current setting of auto_link speed_mask that is used to advertise
29694 	 * speeds during autonegotiation.
29695 	 * This field is only valid when auto_mode is set to "mask".
29696 	 * and if speeds2_supported is set in option_flags
29697 	 * The speeds specified in this field shall be a subset of
29698 	 * supported speeds on this port.
29699 	 */
29700 	uint16_t	auto_link_speeds2;
29701 	/* 1Gb link speed */
29702 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_1GB \
29703 		UINT32_C(0x1)
29704 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
29705 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_10GB \
29706 		UINT32_C(0x2)
29707 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
29708 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_25GB \
29709 		UINT32_C(0x4)
29710 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
29711 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_40GB \
29712 		UINT32_C(0x8)
29713 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
29714 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_50GB \
29715 		UINT32_C(0x10)
29716 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
29717 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_100GB \
29718 		UINT32_C(0x20)
29719 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
29720 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_50GB_PAM4_56 \
29721 		UINT32_C(0x40)
29722 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
29723 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_100GB_PAM4_56 \
29724 		UINT32_C(0x80)
29725 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
29726 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_200GB_PAM4_56 \
29727 		UINT32_C(0x100)
29728 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
29729 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_400GB_PAM4_56 \
29730 		UINT32_C(0x200)
29731 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
29732 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_100GB_PAM4_112 \
29733 		UINT32_C(0x400)
29734 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
29735 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_200GB_PAM4_112 \
29736 		UINT32_C(0x800)
29737 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
29738 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_400GB_PAM4_112 \
29739 		UINT32_C(0x1000)
29740 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
29741 	#define HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_LINK_SPEEDS2_800GB_PAM4_112 \
29742 		UINT32_C(0x2000)
29743 	/*
29744 	 * This field is indicate the number of lanes used to transfer
29745 	 * data. If the link is down, the value is zero.
29746 	 * This is valid only if speeds2_supported is set in option_flags.
29747 	 */
29748 	uint8_t	active_lanes;
29749 	/*
29750 	 * This field is used in Output records to indicate that the output
29751 	 * is completely written to RAM. This field should be read as '1'
29752 	 * to indicate that the output has been completely written. When
29753 	 * writing a command completion or response to an internal processor,
29754 	 * the order of writes has to be such that this field is written last.
29755 	 */
29756 	uint8_t	valid;
29757 } __rte_packed_end;
29758 
29759 /*********************
29760  * hwrm_port_mac_cfg *
29761  *********************/
29762 
29763 
29764 /* hwrm_port_mac_cfg_input (size:448b/56B) */
29765 struct __rte_packed_begin hwrm_port_mac_cfg_input {
29766 	/* The HWRM command request type. */
29767 	uint16_t	req_type;
29768 	/*
29769 	 * The completion ring to send the completion event on. This should
29770 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
29771 	 */
29772 	uint16_t	cmpl_ring;
29773 	/*
29774 	 * The sequence ID is used by the driver for tracking multiple
29775 	 * commands. This ID is treated as opaque data by the firmware and
29776 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
29777 	 */
29778 	uint16_t	seq_id;
29779 	/*
29780 	 * The target ID of the command:
29781 	 * * 0x0-0xFFF8 - The function ID
29782 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
29783 	 * * 0xFFFD - Reserved for user-space HWRM interface
29784 	 * * 0xFFFF - HWRM
29785 	 */
29786 	uint16_t	target_id;
29787 	/*
29788 	 * A physical address pointer pointing to a host buffer that the
29789 	 * command's response data will be written. This can be either a host
29790 	 * physical address (HPA) or a guest physical address (GPA) and must
29791 	 * point to a physically contiguous block of memory.
29792 	 */
29793 	uint64_t	resp_addr;
29794 	/*
29795 	 * In this field, there are a number of CoS mappings related flags
29796 	 * that are used to configure CoS mappings and their corresponding
29797 	 * priorities in the hardware.
29798 	 * For the priorities of CoS mappings, the HWRM uses the following
29799 	 * priority order (high to low) by default:
29800 	 * # vlan pri
29801 	 * # ip_dscp
29802 	 * # tunnel_vlan_pri
29803 	 * # default cos
29804 	 *
29805 	 * A subset of CoS mappings can be enabled.
29806 	 * If a priority is not specified for an enabled CoS mapping, the
29807 	 * priority will be assigned in the above order for the enabled CoS
29808 	 * mappings. For example, if vlan_pri and ip_dscp CoS mappings are
29809 	 * enabled and their priorities are not specified, the following
29810 	 * priority order (high to low) will be used by the HWRM:
29811 	 * # vlan_pri
29812 	 * # ip_dscp
29813 	 * # default cos
29814 	 *
29815 	 * vlan_pri CoS mapping together with default CoS with lower priority
29816 	 * are enabled by default by the HWRM.
29817 	 */
29818 	uint32_t	flags;
29819 	/*
29820 	 * When this bit is '1', this command will configure
29821 	 * the MAC to match the current link state of the PHY.
29822 	 * If the link is not established on the PHY, then this
29823 	 * bit has no effect.
29824 	 */
29825 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_MATCH_LINK \
29826 		UINT32_C(0x1)
29827 	/*
29828 	 * When this bit is set to '1', the inner VLAN PRI to CoS mapping
29829 	 * is requested to be enabled.
29830 	 */
29831 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_VLAN_PRI2COS_ENABLE \
29832 		UINT32_C(0x2)
29833 	/*
29834 	 * When this bit is set to '1', tunnel VLAN PRI field to
29835 	 * CoS mapping is requested to be enabled.
29836 	 */
29837 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_TUNNEL_PRI2COS_ENABLE \
29838 		UINT32_C(0x4)
29839 	/*
29840 	 * When this bit is set to '1', the IP DSCP to CoS mapping is
29841 	 * requested to be enabled.
29842 	 */
29843 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_IP_DSCP2COS_ENABLE \
29844 		UINT32_C(0x8)
29845 	/*
29846 	 * When this bit is '1', the HWRM is requested to
29847 	 * enable timestamp capture capability on the receive side
29848 	 * of this port.
29849 	 */
29850 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_RX_TS_CAPTURE_ENABLE \
29851 		UINT32_C(0x10)
29852 	/*
29853 	 * When this bit is '1', the HWRM is requested to
29854 	 * disable timestamp capture capability on the receive side
29855 	 * of this port.
29856 	 */
29857 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_RX_TS_CAPTURE_DISABLE \
29858 		UINT32_C(0x20)
29859 	/*
29860 	 * When this bit is '1', the HWRM is requested to
29861 	 * enable timestamp capture capability on the transmit side
29862 	 * of this port.
29863 	 */
29864 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_TX_TS_CAPTURE_ENABLE \
29865 		UINT32_C(0x40)
29866 	/*
29867 	 * When this bit is '1', the HWRM is requested to
29868 	 * disable timestamp capture capability on the transmit side
29869 	 * of this port.
29870 	 */
29871 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_TX_TS_CAPTURE_DISABLE \
29872 		UINT32_C(0x80)
29873 	/*
29874 	 * When this bit is '1', the Out-Of-Box WoL is requested to
29875 	 * be enabled on this port.
29876 	 */
29877 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_OOB_WOL_ENABLE \
29878 		UINT32_C(0x100)
29879 	/*
29880 	 * When this bit is '1', the Out-Of-Box WoL is requested to
29881 	 * be disabled on this port.
29882 	 */
29883 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_OOB_WOL_DISABLE \
29884 		UINT32_C(0x200)
29885 	/*
29886 	 * When this bit is set to '1', the inner VLAN PRI to CoS mapping
29887 	 * is requested to be disabled.
29888 	 */
29889 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_VLAN_PRI2COS_DISABLE \
29890 		UINT32_C(0x400)
29891 	/*
29892 	 * When this bit is set to '1', tunnel VLAN PRI field to
29893 	 * CoS mapping is requested to be disabled.
29894 	 */
29895 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_TUNNEL_PRI2COS_DISABLE \
29896 		UINT32_C(0x800)
29897 	/*
29898 	 * When this bit is set to '1', the IP DSCP to CoS mapping is
29899 	 * requested to be disabled.
29900 	 */
29901 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_IP_DSCP2COS_DISABLE \
29902 		UINT32_C(0x1000)
29903 	/*
29904 	 * When this bit is set to '1', and the ptp_tx_ts_capture_enable
29905 	 * bit is set, then the device uses one step Tx timestamping.
29906 	 * This bit is temporary and used for experimental purposes.
29907 	 */
29908 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_PTP_ONE_STEP_TX_TS \
29909 		UINT32_C(0x2000)
29910 	/*
29911 	 * When this bit is '1', the controller is requested to enable
29912 	 * timestamp capture capability on all packets (not just PTP)
29913 	 * of the receive side of this port.
29914 	 */
29915 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_ALL_RX_TS_CAPTURE_ENABLE \
29916 		UINT32_C(0x4000)
29917 	/*
29918 	 * When this bit is '1', the controller is requested to disable
29919 	 * timestamp capture capability on all packets (not just PTP)
29920 	 * of the receive side of this port.
29921 	 */
29922 	#define HWRM_PORT_MAC_CFG_INPUT_FLAGS_ALL_RX_TS_CAPTURE_DISABLE \
29923 		UINT32_C(0x8000)
29924 	uint32_t	enables;
29925 	/*
29926 	 * This bit must be '1' for the ipg field to be
29927 	 * configured.
29928 	 */
29929 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_IPG \
29930 		UINT32_C(0x1)
29931 	/*
29932 	 * This bit must be '1' for the lpbk field to be
29933 	 * configured.
29934 	 */
29935 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_LPBK \
29936 		UINT32_C(0x2)
29937 	/*
29938 	 * This bit must be '1' for the vlan_pri2cos_map_pri field to be
29939 	 * configured.
29940 	 */
29941 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_VLAN_PRI2COS_MAP_PRI \
29942 		UINT32_C(0x4)
29943 	/*
29944 	 * This bit must be '1' for the tunnel_pri2cos_map_pri field to be
29945 	 * configured.
29946 	 */
29947 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_TUNNEL_PRI2COS_MAP_PRI \
29948 		UINT32_C(0x10)
29949 	/*
29950 	 * This bit must be '1' for the dscp2cos_map_pri field to be
29951 	 * configured.
29952 	 */
29953 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_DSCP2COS_MAP_PRI \
29954 		UINT32_C(0x20)
29955 	/*
29956 	 * This bit must be '1' for the rx_ts_capture_ptp_msg_type field to
29957 	 * be configured.
29958 	 */
29959 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_RX_TS_CAPTURE_PTP_MSG_TYPE \
29960 		UINT32_C(0x40)
29961 	/*
29962 	 * This bit must be '1' for the tx_ts_capture_ptp_msg_type field to
29963 	 * be configured.
29964 	 */
29965 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_TX_TS_CAPTURE_PTP_MSG_TYPE \
29966 		UINT32_C(0x80)
29967 	/*
29968 	 * This bit must be '1' for the cos_field_cfg field to be
29969 	 * configured.
29970 	 */
29971 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_COS_FIELD_CFG \
29972 		UINT32_C(0x100)
29973 	/*
29974 	 * This bit must be '1' for the ptp_freq_adj_ppb field to be
29975 	 * configured.
29976 	 */
29977 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_PTP_FREQ_ADJ_PPB \
29978 		UINT32_C(0x200)
29979 	/*
29980 	 * This bit must be '1' for the ptp_adj_phase field to be
29981 	 * configured.
29982 	 */
29983 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_PTP_ADJ_PHASE \
29984 		UINT32_C(0x400)
29985 	/*
29986 	 * This bit must be '1' for the ptp_load_control field to
29987 	 * be configured.
29988 	 */
29989 	#define HWRM_PORT_MAC_CFG_INPUT_ENABLES_PTP_LOAD_CONTROL \
29990 		UINT32_C(0x800)
29991 	/* Port ID of port that is to be configured. */
29992 	uint16_t	port_id;
29993 	/*
29994 	 * This value is used to configure the minimum IPG that will
29995 	 * be sent between packets by this port.
29996 	 */
29997 	uint8_t	ipg;
29998 	/* This value controls the loopback setting for the MAC. */
29999 	uint8_t	lpbk;
30000 	/* No loopback is selected. Normal operation. */
30001 	#define HWRM_PORT_MAC_CFG_INPUT_LPBK_NONE   UINT32_C(0x0)
30002 	/*
30003 	 * The HW will be configured with local loopback such that
30004 	 * host data is sent back to the host without modification.
30005 	 */
30006 	#define HWRM_PORT_MAC_CFG_INPUT_LPBK_LOCAL  UINT32_C(0x1)
30007 	/*
30008 	 * The HW will be configured with remote loopback such that
30009 	 * port logic will send packets back out the transmitter that
30010 	 * are received.
30011 	 */
30012 	#define HWRM_PORT_MAC_CFG_INPUT_LPBK_REMOTE UINT32_C(0x2)
30013 	#define HWRM_PORT_MAC_CFG_INPUT_LPBK_LAST \
30014 		HWRM_PORT_MAC_CFG_INPUT_LPBK_REMOTE
30015 	/*
30016 	 * This value controls the priority setting of VLAN PRI to CoS
30017 	 * mapping based on VLAN Tags of inner packet headers of
30018 	 * tunneled packets or packet headers of non-tunneled packets.
30019 	 *
30020 	 * # Each XXX_pri variable shall have a unique priority value
30021 	 * when it is being specified.
30022 	 * # When comparing priorities of mappings, higher value
30023 	 * indicates higher priority.
30024 	 * For example, a value of 0-3 is returned where 0 is being
30025 	 * the lowest priority and 3 is being the highest priority.
30026 	 */
30027 	uint8_t	vlan_pri2cos_map_pri;
30028 	/* Reserved field. */
30029 	uint8_t	reserved1;
30030 	/*
30031 	 * This value controls the priority setting of VLAN PRI to CoS
30032 	 * mapping based on VLAN Tags of tunneled header.
30033 	 * This mapping only applies when tunneled headers
30034 	 * are present.
30035 	 *
30036 	 * # Each XXX_pri variable shall have a unique priority value
30037 	 * when it is being specified.
30038 	 * # When comparing priorities of mappings, higher value
30039 	 * indicates higher priority.
30040 	 * For example, a value of 0-3 is returned where 0 is being
30041 	 * the lowest priority and 3 is being the highest priority.
30042 	 */
30043 	uint8_t	tunnel_pri2cos_map_pri;
30044 	/*
30045 	 * This value controls the priority setting of IP DSCP to CoS
30046 	 * mapping based on inner IP header of tunneled packets or
30047 	 * IP header of non-tunneled packets.
30048 	 *
30049 	 * # Each XXX_pri variable shall have a unique priority value
30050 	 * when it is being specified.
30051 	 * # When comparing priorities of mappings, higher value
30052 	 * indicates higher priority.
30053 	 * For example, a value of 0-3 is returned where 0 is being
30054 	 * the lowest priority and 3 is being the highest priority.
30055 	 */
30056 	uint8_t	dscp2pri_map_pri;
30057 	/*
30058 	 * This is a 16-bit bit mask that is used to request a
30059 	 * specific configuration of time stamp capture of PTP messages
30060 	 * on the receive side of this port.
30061 	 * This field shall be ignored if the ptp_rx_ts_capture_enable
30062 	 * flag is not set in this command.
30063 	 * Otherwise, if bit 'i' is set, then the HWRM is being
30064 	 * requested to configure the receive side of the port to
30065 	 * capture the time stamp of every received PTP message
30066 	 * with messageType field value set to i.
30067 	 */
30068 	uint16_t	rx_ts_capture_ptp_msg_type;
30069 	/*
30070 	 * This is a 16-bit bit mask that is used to request a
30071 	 * specific configuration of time stamp capture of PTP messages
30072 	 * on the transmit side of this port.
30073 	 * This field shall be ignored if the ptp_tx_ts_capture_enable
30074 	 * flag is not set in this command.
30075 	 * Otherwise, if bit 'i' is set, then the HWRM is being
30076 	 * requested to configure the transmit side of the port to
30077 	 * capture the time stamp of every transmitted PTP message
30078 	 * with messageType field value set to i.
30079 	 */
30080 	uint16_t	tx_ts_capture_ptp_msg_type;
30081 	/* Configuration of CoS fields. */
30082 	uint8_t	cos_field_cfg;
30083 	/* Reserved */
30084 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_RSVD1 \
30085 		UINT32_C(0x1)
30086 	/*
30087 	 * This field is used to specify selection of VLAN PRI value
30088 	 * based on whether one or two VLAN Tags are present in
30089 	 * the inner packet headers of tunneled packets or
30090 	 * non-tunneled packets.
30091 	 * This field is valid only if inner VLAN PRI to CoS mapping
30092 	 * is enabled.
30093 	 * If VLAN PRI to CoS mapping is not enabled, then this
30094 	 * field shall be ignored.
30095 	 */
30096 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_MASK \
30097 		UINT32_C(0x6)
30098 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_SFT \
30099 		1
30100 	/*
30101 	 * Select inner VLAN PRI when 1 or 2 VLAN Tags are
30102 	 * present in the inner packet headers
30103 	 */
30104 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_INNERMOST \
30105 		(UINT32_C(0x0) << 1)
30106 	/*
30107 	 * Select outer VLAN Tag PRI when 2 VLAN Tags are
30108 	 * present in the inner packet headers.
30109 	 * No VLAN PRI shall be selected for this configuration
30110 	 * if only one VLAN Tag is present in the inner
30111 	 * packet headers.
30112 	 */
30113 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_OUTER \
30114 		(UINT32_C(0x1) << 1)
30115 	/*
30116 	 * Select outermost VLAN PRI when 1 or 2 VLAN Tags
30117 	 * are present in the inner packet headers
30118 	 */
30119 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_OUTERMOST \
30120 		(UINT32_C(0x2) << 1)
30121 	/* Unspecified */
30122 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED \
30123 		(UINT32_C(0x3) << 1)
30124 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_LAST \
30125 		HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED
30126 	/*
30127 	 * This field is used to specify selection of tunnel VLAN
30128 	 * PRI value based on whether one or two VLAN Tags are
30129 	 * present in tunnel headers.
30130 	 * This field is valid only if tunnel VLAN PRI to CoS mapping
30131 	 * is enabled.
30132 	 * If tunnel VLAN PRI to CoS mapping is not enabled, then this
30133 	 * field shall be ignored.
30134 	 */
30135 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_MASK \
30136 		UINT32_C(0x18)
30137 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_SFT \
30138 		3
30139 	/*
30140 	 * Select inner VLAN PRI when 1 or 2 VLAN Tags are
30141 	 * present in the tunnel packet headers
30142 	 */
30143 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_INNERMOST \
30144 		(UINT32_C(0x0) << 3)
30145 	/*
30146 	 * Select outer VLAN Tag PRI when 2 VLAN Tags are
30147 	 * present in the tunnel packet headers.
30148 	 * No tunnel VLAN PRI shall be selected for this
30149 	 * configuration if only one VLAN Tag is present in
30150 	 * the tunnel packet headers.
30151 	 */
30152 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTER \
30153 		(UINT32_C(0x1) << 3)
30154 	/*
30155 	 * Select outermost VLAN PRI when 1 or 2 VLAN Tags
30156 	 * are present in the tunnel packet headers
30157 	 */
30158 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTERMOST \
30159 		(UINT32_C(0x2) << 3)
30160 	/* Unspecified */
30161 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED \
30162 		(UINT32_C(0x3) << 3)
30163 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_LAST \
30164 		HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED
30165 	/*
30166 	 * This field shall be used to provide default CoS value
30167 	 * that has been configured on this port.
30168 	 * This field is valid only if default CoS mapping
30169 	 * is enabled.
30170 	 * If default CoS mapping is not enabled, then this
30171 	 * field shall be ignored.
30172 	 */
30173 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_DEFAULT_COS_MASK \
30174 		UINT32_C(0xe0)
30175 	#define HWRM_PORT_MAC_CFG_INPUT_COS_FIELD_CFG_DEFAULT_COS_SFT \
30176 		5
30177 	uint8_t	unused_0[3];
30178 	/*
30179 	 * This signed field specifies by how much to adjust the frequency
30180 	 * of sync timer updates (measured in parts per billion).
30181 	 */
30182 	int32_t	ptp_freq_adj_ppb;
30183 	uint8_t	unused_1[3];
30184 	/*
30185 	 * This value controls how PTP configuration like freq_adj and
30186 	 * phase are loaded in the hardware block.
30187 	 */
30188 	uint8_t	ptp_load_control;
30189 	/* PTP configuration is not loaded in hardware. */
30190 	#define HWRM_PORT_MAC_CFG_INPUT_PTP_LOAD_CONTROL_NONE \
30191 		UINT32_C(0x0)
30192 	/*
30193 	 * PTP configuration will be loaded immediately in the hardware
30194 	 * block. By default, it will always be immediate.
30195 	 */
30196 	#define HWRM_PORT_MAC_CFG_INPUT_PTP_LOAD_CONTROL_IMMEDIATE \
30197 		UINT32_C(0x1)
30198 	/*
30199 	 * PTP configuration will loaded at the next Pulse per second (PPS)
30200 	 * event in the hardware block.
30201 	 */
30202 	#define HWRM_PORT_MAC_CFG_INPUT_PTP_LOAD_CONTROL_PPS_EVENT \
30203 		UINT32_C(0x2)
30204 	#define HWRM_PORT_MAC_CFG_INPUT_PTP_LOAD_CONTROL_LAST \
30205 		HWRM_PORT_MAC_CFG_INPUT_PTP_LOAD_CONTROL_PPS_EVENT
30206 	/*
30207 	 * This unsigned field specifies the phase offset to be applied
30208 	 * to the PHC (PTP Hardware Clock). This field is specified in
30209 	 * nanoseconds.
30210 	 */
30211 	int64_t	ptp_adj_phase;
30212 } __rte_packed_end;
30213 
30214 /* hwrm_port_mac_cfg_output (size:128b/16B) */
30215 struct __rte_packed_begin hwrm_port_mac_cfg_output {
30216 	/* The specific error status for the command. */
30217 	uint16_t	error_code;
30218 	/* The HWRM command request type. */
30219 	uint16_t	req_type;
30220 	/* The sequence ID from the original command. */
30221 	uint16_t	seq_id;
30222 	/* The length of the response data in number of bytes. */
30223 	uint16_t	resp_len;
30224 	/*
30225 	 * This is the configured maximum length of Ethernet packet
30226 	 * payload that is allowed to be received on the port.
30227 	 * This value does not include the number of bytes used by
30228 	 * Ethernet header and trailer (CRC).
30229 	 */
30230 	uint16_t	mru;
30231 	/*
30232 	 * This is the configured maximum length of Ethernet packet
30233 	 * payload that is allowed to be transmitted on the port.
30234 	 * This value does not include the number of bytes used by
30235 	 * Ethernet header and trailer (CRC).
30236 	 */
30237 	uint16_t	mtu;
30238 	/* Current configuration of the IPG value. */
30239 	uint8_t	ipg;
30240 	/* Current value of the loopback value. */
30241 	uint8_t	lpbk;
30242 	/* No loopback is selected. Normal operation. */
30243 	#define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_NONE   UINT32_C(0x0)
30244 	/*
30245 	 * The HW will be configured with local loopback such that
30246 	 * host data is sent back to the host without modification.
30247 	 */
30248 	#define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_LOCAL  UINT32_C(0x1)
30249 	/*
30250 	 * The HW will be configured with remote loopback such that
30251 	 * port logic will send packets back out the transmitter that
30252 	 * are received.
30253 	 */
30254 	#define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_REMOTE UINT32_C(0x2)
30255 	#define HWRM_PORT_MAC_CFG_OUTPUT_LPBK_LAST \
30256 		HWRM_PORT_MAC_CFG_OUTPUT_LPBK_REMOTE
30257 	uint8_t	unused_0;
30258 	/*
30259 	 * This field is used in Output records to indicate that the output
30260 	 * is completely written to RAM. This field should be read as '1'
30261 	 * to indicate that the output has been completely written. When
30262 	 * writing a command completion or response to an internal processor,
30263 	 * the order of writes has to be such that this field is written last.
30264 	 */
30265 	uint8_t	valid;
30266 } __rte_packed_end;
30267 
30268 /**********************
30269  * hwrm_port_mac_qcfg *
30270  **********************/
30271 
30272 
30273 /* hwrm_port_mac_qcfg_input (size:192b/24B) */
30274 struct __rte_packed_begin hwrm_port_mac_qcfg_input {
30275 	/* The HWRM command request type. */
30276 	uint16_t	req_type;
30277 	/*
30278 	 * The completion ring to send the completion event on. This should
30279 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
30280 	 */
30281 	uint16_t	cmpl_ring;
30282 	/*
30283 	 * The sequence ID is used by the driver for tracking multiple
30284 	 * commands. This ID is treated as opaque data by the firmware and
30285 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
30286 	 */
30287 	uint16_t	seq_id;
30288 	/*
30289 	 * The target ID of the command:
30290 	 * * 0x0-0xFFF8 - The function ID
30291 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
30292 	 * * 0xFFFD - Reserved for user-space HWRM interface
30293 	 * * 0xFFFF - HWRM
30294 	 */
30295 	uint16_t	target_id;
30296 	/*
30297 	 * A physical address pointer pointing to a host buffer that the
30298 	 * command's response data will be written. This can be either a host
30299 	 * physical address (HPA) or a guest physical address (GPA) and must
30300 	 * point to a physically contiguous block of memory.
30301 	 */
30302 	uint64_t	resp_addr;
30303 	/* Port ID of port that is to be configured. */
30304 	uint16_t	port_id;
30305 	uint8_t	unused_0[6];
30306 } __rte_packed_end;
30307 
30308 /* hwrm_port_mac_qcfg_output (size:256b/32B) */
30309 struct __rte_packed_begin hwrm_port_mac_qcfg_output {
30310 	/* The specific error status for the command. */
30311 	uint16_t	error_code;
30312 	/* The HWRM command request type. */
30313 	uint16_t	req_type;
30314 	/* The sequence ID from the original command. */
30315 	uint16_t	seq_id;
30316 	/* The length of the response data in number of bytes. */
30317 	uint16_t	resp_len;
30318 	/*
30319 	 * This is the configured maximum length of Ethernet packet
30320 	 * payload that is allowed to be received on the port.
30321 	 * This value does not include the number of bytes used by the
30322 	 * Ethernet header and trailer (CRC).
30323 	 */
30324 	uint16_t	mru;
30325 	/*
30326 	 * This is the configured maximum length of Ethernet packet
30327 	 * payload that is allowed to be transmitted on the port.
30328 	 * This value does not include the number of bytes used by the
30329 	 * Ethernet header and trailer (CRC).
30330 	 */
30331 	uint16_t	mtu;
30332 	/*
30333 	 * The minimum IPG that will
30334 	 * be sent between packets by this port.
30335 	 */
30336 	uint8_t	ipg;
30337 	/* The loopback setting for the MAC. */
30338 	uint8_t	lpbk;
30339 	/* No loopback is selected. Normal operation. */
30340 	#define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_NONE   UINT32_C(0x0)
30341 	/*
30342 	 * The HW will be configured with local loopback such that
30343 	 * host data is sent back to the host without modification.
30344 	 */
30345 	#define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_LOCAL  UINT32_C(0x1)
30346 	/*
30347 	 * The HW will be configured with remote loopback such that
30348 	 * port logic will send packets back out the transmitter that
30349 	 * are received.
30350 	 */
30351 	#define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_REMOTE UINT32_C(0x2)
30352 	#define HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_LAST \
30353 		HWRM_PORT_MAC_QCFG_OUTPUT_LPBK_REMOTE
30354 	/*
30355 	 * Priority setting for VLAN PRI to CoS mapping.
30356 	 * # Each XXX_pri variable shall have a unique priority value
30357 	 * when it is being used.
30358 	 * # When comparing priorities of mappings, higher value
30359 	 * indicates higher priority.
30360 	 * For example, a value of 0-3 is returned where 0 is being
30361 	 * the lowest priority and 3 is being the highest priority.
30362 	 * # If the corresponding CoS mapping is not enabled, then this
30363 	 * field should be ignored.
30364 	 * # This value indicates the normalized priority value retained
30365 	 * in the HWRM.
30366 	 */
30367 	uint8_t	vlan_pri2cos_map_pri;
30368 	/*
30369 	 * In this field, a number of CoS mappings related flags
30370 	 * are used to indicate configured CoS mappings.
30371 	 */
30372 	uint8_t	flags;
30373 	/*
30374 	 * When this bit is set to '1', the inner VLAN PRI to CoS mapping
30375 	 * is enabled.
30376 	 */
30377 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_VLAN_PRI2COS_ENABLE \
30378 		UINT32_C(0x1)
30379 	/*
30380 	 * When this bit is set to '1', tunnel VLAN PRI field to
30381 	 * CoS mapping is enabled.
30382 	 */
30383 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_TUNNEL_PRI2COS_ENABLE \
30384 		UINT32_C(0x2)
30385 	/*
30386 	 * When this bit is set to '1', the IP DSCP to CoS mapping is
30387 	 * enabled.
30388 	 */
30389 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_IP_DSCP2COS_ENABLE \
30390 		UINT32_C(0x4)
30391 	/*
30392 	 * When this bit is '1', the Out-Of-Box WoL is enabled on this
30393 	 * port.
30394 	 */
30395 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_OOB_WOL_ENABLE \
30396 		UINT32_C(0x8)
30397 	/* When this bit is '1', PTP is enabled for RX on this port. */
30398 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_PTP_RX_TS_CAPTURE_ENABLE \
30399 		UINT32_C(0x10)
30400 	/* When this bit is '1', PTP is enabled for TX on this port. */
30401 	#define HWRM_PORT_MAC_QCFG_OUTPUT_FLAGS_PTP_TX_TS_CAPTURE_ENABLE \
30402 		UINT32_C(0x20)
30403 	/*
30404 	 * Priority setting for tunnel VLAN PRI to CoS mapping.
30405 	 * # Each XXX_pri variable shall have a unique priority value
30406 	 * when it is being used.
30407 	 * # When comparing priorities of mappings, higher value
30408 	 * indicates higher priority.
30409 	 * For example, a value of 0-3 is returned where 0 is being
30410 	 * the lowest priority and 3 is being the highest priority.
30411 	 * # If the corresponding CoS mapping is not enabled, then this
30412 	 * field should be ignored.
30413 	 * # This value indicates the normalized priority value retained
30414 	 * in the HWRM.
30415 	 */
30416 	uint8_t	tunnel_pri2cos_map_pri;
30417 	/*
30418 	 * Priority setting for DSCP to PRI mapping.
30419 	 * # Each XXX_pri variable shall have a unique priority value
30420 	 * when it is being used.
30421 	 * # When comparing priorities of mappings, higher value
30422 	 * indicates higher priority.
30423 	 * For example, a value of 0-3 is returned where 0 is being
30424 	 * the lowest priority and 3 is being the highest priority.
30425 	 * # If the corresponding CoS mapping is not enabled, then this
30426 	 * field should be ignored.
30427 	 * # This value indicates the normalized priority value retained
30428 	 * in the HWRM.
30429 	 */
30430 	uint8_t	dscp2pri_map_pri;
30431 	/*
30432 	 * This is a 16-bit bit mask that represents the
30433 	 * current configuration of time stamp capture of PTP messages
30434 	 * on the receive side of this port.
30435 	 * If bit 'i' is set, then the receive side of the port
30436 	 * is configured to capture the time stamp of every
30437 	 * received PTP message with messageType field value set
30438 	 * to i.
30439 	 * If all bits are set to 0 (i.e. field value set 0),
30440 	 * then the receive side of the port is not configured
30441 	 * to capture timestamp for PTP messages.
30442 	 * If all bits are set to 1, then the receive side of the
30443 	 * port is configured to capture timestamp for all PTP
30444 	 * messages.
30445 	 */
30446 	uint16_t	rx_ts_capture_ptp_msg_type;
30447 	/*
30448 	 * This is a 16-bit bit mask that represents the
30449 	 * current configuration of time stamp capture of PTP messages
30450 	 * on the transmit side of this port.
30451 	 * If bit 'i' is set, then the transmit side of the port
30452 	 * is configured to capture the time stamp of every
30453 	 * received PTP message with messageType field value set
30454 	 * to i.
30455 	 * If all bits are set to 0 (i.e. field value set 0),
30456 	 * then the transmit side of the port is not configured
30457 	 * to capture timestamp for PTP messages.
30458 	 * If all bits are set to 1, then the transmit side of the
30459 	 * port is configured to capture timestamp for all PTP
30460 	 * messages.
30461 	 */
30462 	uint16_t	tx_ts_capture_ptp_msg_type;
30463 	/* Configuration of CoS fields. */
30464 	uint8_t	cos_field_cfg;
30465 	/* Reserved */
30466 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_RSVD \
30467 		UINT32_C(0x1)
30468 	/*
30469 	 * This field is used for selecting VLAN PRI value
30470 	 * based on whether one or two VLAN Tags are present in
30471 	 * the inner packet headers of tunneled packets or
30472 	 * non-tunneled packets.
30473 	 */
30474 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_MASK \
30475 		UINT32_C(0x6)
30476 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_SFT \
30477 		1
30478 	/*
30479 	 * Select inner VLAN PRI when 1 or 2 VLAN Tags are
30480 	 * present in the inner packet headers
30481 	 */
30482 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_INNERMOST \
30483 		(UINT32_C(0x0) << 1)
30484 	/*
30485 	 * Select outer VLAN Tag PRI when 2 VLAN Tags are
30486 	 * present in the inner packet headers.
30487 	 * No VLAN PRI is selected for this configuration
30488 	 * if only one VLAN Tag is present in the inner
30489 	 * packet headers.
30490 	 */
30491 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_OUTER \
30492 		(UINT32_C(0x1) << 1)
30493 	/*
30494 	 * Select outermost VLAN PRI when 1 or 2 VLAN Tags
30495 	 * are present in the inner packet headers
30496 	 */
30497 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_OUTERMOST \
30498 		(UINT32_C(0x2) << 1)
30499 	/* Unspecified */
30500 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED \
30501 		(UINT32_C(0x3) << 1)
30502 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_LAST \
30503 		HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_VLAN_PRI_SEL_UNSPECIFIED
30504 	/*
30505 	 * This field is used for selecting tunnel VLAN PRI value
30506 	 * based on whether one or two VLAN Tags are present in
30507 	 * the tunnel headers of tunneled packets. This selection
30508 	 * does not apply to non-tunneled packets.
30509 	 */
30510 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_MASK \
30511 		UINT32_C(0x18)
30512 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_SFT \
30513 		3
30514 	/*
30515 	 * Select inner VLAN PRI when 1 or 2 VLAN Tags are
30516 	 * present in the tunnel packet headers
30517 	 */
30518 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_INNERMOST \
30519 		(UINT32_C(0x0) << 3)
30520 	/*
30521 	 * Select outer VLAN Tag PRI when 2 VLAN Tags are
30522 	 * present in the tunnel packet headers.
30523 	 * No VLAN PRI is selected for this configuration
30524 	 * if only one VLAN Tag is present in the tunnel
30525 	 * packet headers.
30526 	 */
30527 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTER \
30528 		(UINT32_C(0x1) << 3)
30529 	/*
30530 	 * Select outermost VLAN PRI when 1 or 2 VLAN Tags
30531 	 * are present in the tunnel packet headers
30532 	 */
30533 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_OUTERMOST \
30534 		(UINT32_C(0x2) << 3)
30535 	/* Unspecified */
30536 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED \
30537 		(UINT32_C(0x3) << 3)
30538 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_LAST \
30539 		HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_T_VLAN_PRI_SEL_UNSPECIFIED
30540 	/*
30541 	 * This field is used to provide default CoS value that
30542 	 * has been configured on this port.
30543 	 */
30544 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_DEFAULT_COS_MASK \
30545 		UINT32_C(0xe0)
30546 	#define HWRM_PORT_MAC_QCFG_OUTPUT_COS_FIELD_CFG_DEFAULT_COS_SFT \
30547 		5
30548 	uint8_t	unused_1;
30549 	uint16_t	port_svif_info;
30550 	/*
30551 	 * This field specifies the source virtual interface of the port
30552 	 * being queried. Drivers can use this to program port svif field in
30553 	 * the L2 context table.
30554 	 */
30555 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PORT_SVIF_INFO_PORT_SVIF_MASK \
30556 		UINT32_C(0x7fff)
30557 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PORT_SVIF_INFO_PORT_SVIF_SFT       0
30558 	/* This field specifies whether port_svif is valid or not */
30559 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PORT_SVIF_INFO_PORT_SVIF_VALID \
30560 		UINT32_C(0x8000)
30561 	/*
30562 	 * This field indicates the configured load control for PTP
30563 	 * time of day (TOD) block.
30564 	 */
30565 	uint8_t	ptp_load_control;
30566 	/* Indicates the current load control is none. */
30567 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PTP_LOAD_CONTROL_NONE \
30568 		UINT32_C(0x0)
30569 	/* Indicates the current load control is immediate. */
30570 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PTP_LOAD_CONTROL_IMMEDIATE \
30571 		UINT32_C(0x1)
30572 	/*
30573 	 * Indicates current load control is at next Pulse per Second (PPS)
30574 	 * event.
30575 	 */
30576 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PTP_LOAD_CONTROL_PPS_EVENT \
30577 		UINT32_C(0x2)
30578 	#define HWRM_PORT_MAC_QCFG_OUTPUT_PTP_LOAD_CONTROL_LAST \
30579 		HWRM_PORT_MAC_QCFG_OUTPUT_PTP_LOAD_CONTROL_PPS_EVENT
30580 	uint8_t	unused_2[4];
30581 	/*
30582 	 * This field is used in Output records to indicate that the output
30583 	 * is completely written to RAM. This field should be read as '1'
30584 	 * to indicate that the output has been completely written. When
30585 	 * writing a command completion or response to an internal processor,
30586 	 * the order of writes has to be such that this field is written last.
30587 	 */
30588 	uint8_t	valid;
30589 } __rte_packed_end;
30590 
30591 /**************************
30592  * hwrm_port_mac_ptp_qcfg *
30593  **************************/
30594 
30595 
30596 /* hwrm_port_mac_ptp_qcfg_input (size:192b/24B) */
30597 struct __rte_packed_begin hwrm_port_mac_ptp_qcfg_input {
30598 	/* The HWRM command request type. */
30599 	uint16_t	req_type;
30600 	/*
30601 	 * The completion ring to send the completion event on. This should
30602 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
30603 	 */
30604 	uint16_t	cmpl_ring;
30605 	/*
30606 	 * The sequence ID is used by the driver for tracking multiple
30607 	 * commands. This ID is treated as opaque data by the firmware and
30608 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
30609 	 */
30610 	uint16_t	seq_id;
30611 	/*
30612 	 * The target ID of the command:
30613 	 * * 0x0-0xFFF8 - The function ID
30614 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
30615 	 * * 0xFFFD - Reserved for user-space HWRM interface
30616 	 * * 0xFFFF - HWRM
30617 	 */
30618 	uint16_t	target_id;
30619 	/*
30620 	 * A physical address pointer pointing to a host buffer that the
30621 	 * command's response data will be written. This can be either a host
30622 	 * physical address (HPA) or a guest physical address (GPA) and must
30623 	 * point to a physically contiguous block of memory.
30624 	 */
30625 	uint64_t	resp_addr;
30626 	/* Port ID of port that is being queried. */
30627 	uint16_t	port_id;
30628 	uint8_t	unused_0[6];
30629 } __rte_packed_end;
30630 
30631 /* hwrm_port_mac_ptp_qcfg_output (size:704b/88B) */
30632 struct __rte_packed_begin hwrm_port_mac_ptp_qcfg_output {
30633 	/* The specific error status for the command. */
30634 	uint16_t	error_code;
30635 	/* The HWRM command request type. */
30636 	uint16_t	req_type;
30637 	/* The sequence ID from the original command. */
30638 	uint16_t	seq_id;
30639 	/* The length of the response data in number of bytes. */
30640 	uint16_t	resp_len;
30641 	/*
30642 	 * In this field, a number of PTP related flags
30643 	 * are used to indicate configured PTP capabilities.
30644 	 */
30645 	uint8_t	flags;
30646 	/*
30647 	 * When this bit is set to '1', the PTP related registers are
30648 	 * directly accessible by the host.
30649 	 */
30650 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_DIRECT_ACCESS \
30651 		UINT32_C(0x1)
30652 	/*
30653 	 * When this bit is set to '1', the device supports one-step
30654 	 * Tx timestamping.
30655 	 */
30656 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_ONE_STEP_TX_TS \
30657 		UINT32_C(0x4)
30658 	/*
30659 	 * When this bit is set to '1', the PTP information is accessible
30660 	 * via HWRM commands.
30661 	 */
30662 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_HWRM_ACCESS \
30663 		UINT32_C(0x8)
30664 	/*
30665 	 * When this bit is set to '1', two specific registers for current
30666 	 * time (ts_ref_clock_reg_lower and ts_ref_clock_reg_upper) are
30667 	 * directly accessible by the host.
30668 	 */
30669 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_PARTIAL_DIRECT_ACCESS_REF_CLOCK \
30670 		UINT32_C(0x10)
30671 	/*
30672 	 * When this bit is set to '1', it indicates that driver has
30673 	 * configured 64bit RTC.
30674 	 */
30675 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_RTC_CONFIGURED \
30676 		UINT32_C(0x20)
30677 	/*
30678 	 * When this bit is set to '1', it indicates that current time
30679 	 * exposed to driver is 64bit.
30680 	 */
30681 	#define HWRM_PORT_MAC_PTP_QCFG_OUTPUT_FLAGS_64B_PHC_TIME \
30682 		UINT32_C(0x40)
30683 	uint8_t	unused_0[3];
30684 	/*
30685 	 * Offset of the PTP register for the lower 32 bits of timestamp
30686 	 * for RX.
30687 	 */
30688 	uint32_t	rx_ts_reg_off_lower;
30689 	/*
30690 	 * Offset of the PTP register for the upper 32 bits of timestamp
30691 	 * for RX.
30692 	 */
30693 	uint32_t	rx_ts_reg_off_upper;
30694 	/* Offset of the PTP register for the sequence ID for RX. */
30695 	uint32_t	rx_ts_reg_off_seq_id;
30696 	/* Offset of the first PTP source ID for RX. */
30697 	uint32_t	rx_ts_reg_off_src_id_0;
30698 	/* Offset of the second PTP source ID for RX. */
30699 	uint32_t	rx_ts_reg_off_src_id_1;
30700 	/* Offset of the third PTP source ID for RX. */
30701 	uint32_t	rx_ts_reg_off_src_id_2;
30702 	/* Offset of the domain ID for RX. */
30703 	uint32_t	rx_ts_reg_off_domain_id;
30704 	/* Offset of the PTP FIFO register for RX. */
30705 	uint32_t	rx_ts_reg_off_fifo;
30706 	/* Offset of the PTP advance FIFO register for RX. */
30707 	uint32_t	rx_ts_reg_off_fifo_adv;
30708 	/* PTP timestamp granularity for RX. */
30709 	uint32_t	rx_ts_reg_off_granularity;
30710 	/*
30711 	 * Offset of the PTP register for the lower 32 bits of timestamp
30712 	 * for TX.
30713 	 */
30714 	uint32_t	tx_ts_reg_off_lower;
30715 	/*
30716 	 * Offset of the PTP register for the upper 32 bits of timestamp
30717 	 * for TX.
30718 	 */
30719 	uint32_t	tx_ts_reg_off_upper;
30720 	/* Offset of the PTP register for the sequence ID for TX. */
30721 	uint32_t	tx_ts_reg_off_seq_id;
30722 	/* Offset of the PTP FIFO register for TX. */
30723 	uint32_t	tx_ts_reg_off_fifo;
30724 	/* PTP timestamp granularity for TX. */
30725 	uint32_t	tx_ts_reg_off_granularity;
30726 	/* Offset of register to get lower 32 bits of current time. */
30727 	uint32_t	ts_ref_clock_reg_lower;
30728 	/* Offset of register to get upper 32 bits of current time. */
30729 	uint32_t	ts_ref_clock_reg_upper;
30730 	uint8_t	unused_1[7];
30731 	/*
30732 	 * This field is used in Output records to indicate that the output
30733 	 * is completely written to RAM. This field should be read as '1'
30734 	 * to indicate that the output has been completely written. When
30735 	 * writing a command completion or response to an internal processor,
30736 	 * the order of writes has to be such that this field is written last.
30737 	 */
30738 	uint8_t	valid;
30739 } __rte_packed_end;
30740 
30741 /* Port Tx Statistics Format */
30742 /* tx_port_stats (size:3264b/408B) */
30743 struct __rte_packed_begin tx_port_stats {
30744 	/* Total Number of 64 Bytes frames transmitted */
30745 	uint64_t	tx_64b_frames;
30746 	/* Total Number of 65-127 Bytes frames transmitted */
30747 	uint64_t	tx_65b_127b_frames;
30748 	/* Total Number of 128-255 Bytes frames transmitted */
30749 	uint64_t	tx_128b_255b_frames;
30750 	/* Total Number of 256-511 Bytes frames transmitted */
30751 	uint64_t	tx_256b_511b_frames;
30752 	/* Total Number of 512-1023 Bytes frames transmitted */
30753 	uint64_t	tx_512b_1023b_frames;
30754 	/* Total Number of 1024-1518 Bytes frames transmitted */
30755 	uint64_t	tx_1024b_1518b_frames;
30756 	/*
30757 	 * Total Number of each good VLAN (excludes FCS errors)
30758 	 * frame transmitted which is 1519 to 1522 bytes in length
30759 	 * inclusive (excluding framing bits but including FCS bytes).
30760 	 */
30761 	uint64_t	tx_good_vlan_frames;
30762 	/* Total Number of 1519-2047 Bytes frames transmitted */
30763 	uint64_t	tx_1519b_2047b_frames;
30764 	/* Total Number of 2048-4095 Bytes frames transmitted */
30765 	uint64_t	tx_2048b_4095b_frames;
30766 	/* Total Number of 4096-9216 Bytes frames transmitted */
30767 	uint64_t	tx_4096b_9216b_frames;
30768 	/* Total Number of 9217-16383 Bytes frames transmitted */
30769 	uint64_t	tx_9217b_16383b_frames;
30770 	/* Total Number of good frames transmitted */
30771 	uint64_t	tx_good_frames;
30772 	/* Total Number of frames transmitted */
30773 	uint64_t	tx_total_frames;
30774 	/* Total number of unicast frames transmitted */
30775 	uint64_t	tx_ucast_frames;
30776 	/* Total number of multicast frames transmitted */
30777 	uint64_t	tx_mcast_frames;
30778 	/* Total number of broadcast frames transmitted */
30779 	uint64_t	tx_bcast_frames;
30780 	/* Total number of PAUSE control frames transmitted */
30781 	uint64_t	tx_pause_frames;
30782 	/*
30783 	 * Total number of PFC/per-priority PAUSE
30784 	 * control frames transmitted
30785 	 */
30786 	uint64_t	tx_pfc_frames;
30787 	/* Total number of jabber frames transmitted */
30788 	uint64_t	tx_jabber_frames;
30789 	/* Total number of frames transmitted with FCS error */
30790 	uint64_t	tx_fcs_err_frames;
30791 	/* Total number of control frames transmitted */
30792 	uint64_t	tx_control_frames;
30793 	/* Total number of over-sized frames transmitted */
30794 	uint64_t	tx_oversz_frames;
30795 	/* Total number of frames with single deferral */
30796 	uint64_t	tx_single_dfrl_frames;
30797 	/* Total number of frames with multiple deferrals */
30798 	uint64_t	tx_multi_dfrl_frames;
30799 	/* Total number of frames with single collision */
30800 	uint64_t	tx_single_coll_frames;
30801 	/* Total number of frames with multiple collisions */
30802 	uint64_t	tx_multi_coll_frames;
30803 	/* Total number of frames with late collisions */
30804 	uint64_t	tx_late_coll_frames;
30805 	/* Total number of frames with excessive collisions */
30806 	uint64_t	tx_excessive_coll_frames;
30807 	/* Total number of fragmented frames transmitted */
30808 	uint64_t	tx_frag_frames;
30809 	/* Total number of transmit errors */
30810 	uint64_t	tx_err;
30811 	/* Total number of single VLAN tagged frames transmitted */
30812 	uint64_t	tx_tagged_frames;
30813 	/* Total number of double VLAN tagged frames transmitted */
30814 	uint64_t	tx_dbl_tagged_frames;
30815 	/* Total number of runt frames transmitted */
30816 	uint64_t	tx_runt_frames;
30817 	/* Total number of TX FIFO under runs */
30818 	uint64_t	tx_fifo_underruns;
30819 	/*
30820 	 * Total number of PFC frames with PFC enabled bit for
30821 	 * Pri 0 transmitted
30822 	 */
30823 	uint64_t	tx_pfc_ena_frames_pri0;
30824 	/*
30825 	 * Total number of PFC frames with PFC enabled bit for
30826 	 * Pri 1 transmitted
30827 	 */
30828 	uint64_t	tx_pfc_ena_frames_pri1;
30829 	/*
30830 	 * Total number of PFC frames with PFC enabled bit for
30831 	 * Pri 2 transmitted
30832 	 */
30833 	uint64_t	tx_pfc_ena_frames_pri2;
30834 	/*
30835 	 * Total number of PFC frames with PFC enabled bit for
30836 	 * Pri 3 transmitted
30837 	 */
30838 	uint64_t	tx_pfc_ena_frames_pri3;
30839 	/*
30840 	 * Total number of PFC frames with PFC enabled bit for
30841 	 * Pri 4 transmitted
30842 	 */
30843 	uint64_t	tx_pfc_ena_frames_pri4;
30844 	/*
30845 	 * Total number of PFC frames with PFC enabled bit for
30846 	 * Pri 5 transmitted
30847 	 */
30848 	uint64_t	tx_pfc_ena_frames_pri5;
30849 	/*
30850 	 * Total number of PFC frames with PFC enabled bit for
30851 	 * Pri 6 transmitted
30852 	 */
30853 	uint64_t	tx_pfc_ena_frames_pri6;
30854 	/*
30855 	 * Total number of PFC frames with PFC enabled bit for
30856 	 * Pri 7 transmitted
30857 	 */
30858 	uint64_t	tx_pfc_ena_frames_pri7;
30859 	/* Total number of EEE LPI Events on TX */
30860 	uint64_t	tx_eee_lpi_events;
30861 	/* EEE LPI Duration Counter on TX */
30862 	uint64_t	tx_eee_lpi_duration;
30863 	/*
30864 	 * Total number of Link Level Flow Control (LLFC) messages
30865 	 * transmitted
30866 	 */
30867 	uint64_t	tx_llfc_logical_msgs;
30868 	/* Total number of HCFC messages transmitted */
30869 	uint64_t	tx_hcfc_msgs;
30870 	/* Total number of TX collisions */
30871 	uint64_t	tx_total_collisions;
30872 	/* Total number of transmitted bytes */
30873 	uint64_t	tx_bytes;
30874 	/* Total number of end-to-end HOL frames */
30875 	uint64_t	tx_xthol_frames;
30876 	/* Total Tx Drops per Port reported by STATS block */
30877 	uint64_t	tx_stat_discard;
30878 	/* Total Tx Error Drops per Port reported by STATS block */
30879 	uint64_t	tx_stat_error;
30880 } __rte_packed_end;
30881 
30882 /* Port Rx Statistics Format */
30883 /* rx_port_stats (size:4224b/528B) */
30884 struct __rte_packed_begin rx_port_stats {
30885 	/* Total Number of 64 Bytes frames received */
30886 	uint64_t	rx_64b_frames;
30887 	/* Total Number of 65-127 Bytes frames received */
30888 	uint64_t	rx_65b_127b_frames;
30889 	/* Total Number of 128-255 Bytes frames received */
30890 	uint64_t	rx_128b_255b_frames;
30891 	/* Total Number of 256-511 Bytes frames received */
30892 	uint64_t	rx_256b_511b_frames;
30893 	/* Total Number of 512-1023 Bytes frames received */
30894 	uint64_t	rx_512b_1023b_frames;
30895 	/* Total Number of 1024-1518 Bytes frames received */
30896 	uint64_t	rx_1024b_1518b_frames;
30897 	/*
30898 	 * Total Number of each good VLAN (excludes FCS errors)
30899 	 * frame received which is 1519 to 1522 bytes in length
30900 	 * inclusive (excluding framing bits but including FCS bytes).
30901 	 */
30902 	uint64_t	rx_good_vlan_frames;
30903 	/* Total Number of 1519-2047 Bytes frames received */
30904 	uint64_t	rx_1519b_2047b_frames;
30905 	/* Total Number of 2048-4095 Bytes frames received */
30906 	uint64_t	rx_2048b_4095b_frames;
30907 	/* Total Number of 4096-9216 Bytes frames received */
30908 	uint64_t	rx_4096b_9216b_frames;
30909 	/* Total Number of 9217-16383 Bytes frames received */
30910 	uint64_t	rx_9217b_16383b_frames;
30911 	/* Total number of frames received */
30912 	uint64_t	rx_total_frames;
30913 	/* Total number of unicast frames received */
30914 	uint64_t	rx_ucast_frames;
30915 	/* Total number of multicast frames received */
30916 	uint64_t	rx_mcast_frames;
30917 	/* Total number of broadcast frames received */
30918 	uint64_t	rx_bcast_frames;
30919 	/* Total number of received frames with FCS error */
30920 	uint64_t	rx_fcs_err_frames;
30921 	/* Total number of control frames received */
30922 	uint64_t	rx_ctrl_frames;
30923 	/* Total number of PAUSE frames received */
30924 	uint64_t	rx_pause_frames;
30925 	/* Total number of PFC frames received */
30926 	uint64_t	rx_pfc_frames;
30927 	/*
30928 	 * Total number of frames received with an unsupported
30929 	 * opcode
30930 	 */
30931 	uint64_t	rx_unsupported_opcode_frames;
30932 	/*
30933 	 * Total number of frames received with an unsupported
30934 	 * DA for pause and PFC
30935 	 */
30936 	uint64_t	rx_unsupported_da_pausepfc_frames;
30937 	/* Total number of frames received with an unsupported SA */
30938 	uint64_t	rx_wrong_sa_frames;
30939 	/* Total number of received packets with alignment error */
30940 	uint64_t	rx_align_err_frames;
30941 	/* Total number of received frames with out-of-range length */
30942 	uint64_t	rx_oor_len_frames;
30943 	/* Total number of received frames with error termination */
30944 	uint64_t	rx_code_err_frames;
30945 	/*
30946 	 * Total number of received frames with a false carrier is
30947 	 * detected during idle, as defined by RX_ER samples active
30948 	 * and RXD is 0xE. The event is reported along with the
30949 	 * statistics generated on the next received frame. Only
30950 	 * one false carrier condition can be detected and logged
30951 	 * between frames.
30952 	 *
30953 	 * Carrier event, valid for 10M/100M speed modes only.
30954 	 */
30955 	uint64_t	rx_false_carrier_frames;
30956 	/* Total number of over-sized frames received */
30957 	uint64_t	rx_ovrsz_frames;
30958 	/* Total number of jabber packets received */
30959 	uint64_t	rx_jbr_frames;
30960 	/* Total number of received frames with MTU error */
30961 	uint64_t	rx_mtu_err_frames;
30962 	/* Total number of received frames with CRC match */
30963 	uint64_t	rx_match_crc_frames;
30964 	/* Total number of frames received promiscuously */
30965 	uint64_t	rx_promiscuous_frames;
30966 	/*
30967 	 * Total number of received frames with one or two VLAN
30968 	 * tags
30969 	 */
30970 	uint64_t	rx_tagged_frames;
30971 	/* Total number of received frames with two VLAN tags */
30972 	uint64_t	rx_double_tagged_frames;
30973 	/* Total number of truncated frames received */
30974 	uint64_t	rx_trunc_frames;
30975 	/* Total number of good frames (without errors) received */
30976 	uint64_t	rx_good_frames;
30977 	/*
30978 	 * Total number of received PFC frames with transition from
30979 	 * XON to XOFF on Pri 0
30980 	 */
30981 	uint64_t	rx_pfc_xon2xoff_frames_pri0;
30982 	/*
30983 	 * Total number of received PFC frames with transition from
30984 	 * XON to XOFF on Pri 1
30985 	 */
30986 	uint64_t	rx_pfc_xon2xoff_frames_pri1;
30987 	/*
30988 	 * Total number of received PFC frames with transition from
30989 	 * XON to XOFF on Pri 2
30990 	 */
30991 	uint64_t	rx_pfc_xon2xoff_frames_pri2;
30992 	/*
30993 	 * Total number of received PFC frames with transition from
30994 	 * XON to XOFF on Pri 3
30995 	 */
30996 	uint64_t	rx_pfc_xon2xoff_frames_pri3;
30997 	/*
30998 	 * Total number of received PFC frames with transition from
30999 	 * XON to XOFF on Pri 4
31000 	 */
31001 	uint64_t	rx_pfc_xon2xoff_frames_pri4;
31002 	/*
31003 	 * Total number of received PFC frames with transition from
31004 	 * XON to XOFF on Pri 5
31005 	 */
31006 	uint64_t	rx_pfc_xon2xoff_frames_pri5;
31007 	/*
31008 	 * Total number of received PFC frames with transition from
31009 	 * XON to XOFF on Pri 6
31010 	 */
31011 	uint64_t	rx_pfc_xon2xoff_frames_pri6;
31012 	/*
31013 	 * Total number of received PFC frames with transition from
31014 	 * XON to XOFF on Pri 7
31015 	 */
31016 	uint64_t	rx_pfc_xon2xoff_frames_pri7;
31017 	/*
31018 	 * Total number of received PFC frames with PFC enabled
31019 	 * bit for Pri 0
31020 	 */
31021 	uint64_t	rx_pfc_ena_frames_pri0;
31022 	/*
31023 	 * Total number of received PFC frames with PFC enabled
31024 	 * bit for Pri 1
31025 	 */
31026 	uint64_t	rx_pfc_ena_frames_pri1;
31027 	/*
31028 	 * Total number of received PFC frames with PFC enabled
31029 	 * bit for Pri 2
31030 	 */
31031 	uint64_t	rx_pfc_ena_frames_pri2;
31032 	/*
31033 	 * Total number of received PFC frames with PFC enabled
31034 	 * bit for Pri 3
31035 	 */
31036 	uint64_t	rx_pfc_ena_frames_pri3;
31037 	/*
31038 	 * Total number of received PFC frames with PFC enabled
31039 	 * bit for Pri 4
31040 	 */
31041 	uint64_t	rx_pfc_ena_frames_pri4;
31042 	/*
31043 	 * Total number of received PFC frames with PFC enabled
31044 	 * bit for Pri 5
31045 	 */
31046 	uint64_t	rx_pfc_ena_frames_pri5;
31047 	/*
31048 	 * Total number of received PFC frames with PFC enabled
31049 	 * bit for Pri 6
31050 	 */
31051 	uint64_t	rx_pfc_ena_frames_pri6;
31052 	/*
31053 	 * Total number of received PFC frames with PFC enabled
31054 	 * bit for Pri 7
31055 	 */
31056 	uint64_t	rx_pfc_ena_frames_pri7;
31057 	/* Total Number of frames received with SCH CRC error */
31058 	uint64_t	rx_sch_crc_err_frames;
31059 	/* Total Number of under-sized frames received */
31060 	uint64_t	rx_undrsz_frames;
31061 	/* Total Number of fragmented frames received */
31062 	uint64_t	rx_frag_frames;
31063 	/* Total number of RX EEE LPI Events */
31064 	uint64_t	rx_eee_lpi_events;
31065 	/* EEE LPI Duration Counter on RX */
31066 	uint64_t	rx_eee_lpi_duration;
31067 	/*
31068 	 * Total number of physical type Link Level Flow Control
31069 	 * (LLFC) messages received
31070 	 */
31071 	uint64_t	rx_llfc_physical_msgs;
31072 	/*
31073 	 * Total number of logical type Link Level Flow Control
31074 	 * (LLFC) messages received
31075 	 */
31076 	uint64_t	rx_llfc_logical_msgs;
31077 	/*
31078 	 * Total number of logical type Link Level Flow Control
31079 	 * (LLFC) messages received with CRC error
31080 	 */
31081 	uint64_t	rx_llfc_msgs_with_crc_err;
31082 	/* Total number of HCFC messages received */
31083 	uint64_t	rx_hcfc_msgs;
31084 	/* Total number of HCFC messages received with CRC error */
31085 	uint64_t	rx_hcfc_msgs_with_crc_err;
31086 	/* Total number of received bytes */
31087 	uint64_t	rx_bytes;
31088 	/* Total number of bytes received in runt frames */
31089 	uint64_t	rx_runt_bytes;
31090 	/* Total number of runt frames received */
31091 	uint64_t	rx_runt_frames;
31092 	/* Total Rx Discards per Port reported by STATS block */
31093 	uint64_t	rx_stat_discard;
31094 	uint64_t	rx_stat_err;
31095 } __rte_packed_end;
31096 
31097 /********************
31098  * hwrm_port_qstats *
31099  ********************/
31100 
31101 
31102 /* hwrm_port_qstats_input (size:320b/40B) */
31103 struct __rte_packed_begin hwrm_port_qstats_input {
31104 	/* The HWRM command request type. */
31105 	uint16_t	req_type;
31106 	/*
31107 	 * The completion ring to send the completion event on. This should
31108 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
31109 	 */
31110 	uint16_t	cmpl_ring;
31111 	/*
31112 	 * The sequence ID is used by the driver for tracking multiple
31113 	 * commands. This ID is treated as opaque data by the firmware and
31114 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
31115 	 */
31116 	uint16_t	seq_id;
31117 	/*
31118 	 * The target ID of the command:
31119 	 * * 0x0-0xFFF8 - The function ID
31120 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
31121 	 * * 0xFFFD - Reserved for user-space HWRM interface
31122 	 * * 0xFFFF - HWRM
31123 	 */
31124 	uint16_t	target_id;
31125 	/*
31126 	 * A physical address pointer pointing to a host buffer that the
31127 	 * command's response data will be written. This can be either a host
31128 	 * physical address (HPA) or a guest physical address (GPA) and must
31129 	 * point to a physically contiguous block of memory.
31130 	 */
31131 	uint64_t	resp_addr;
31132 	/* Port ID of port that is being queried. */
31133 	uint16_t	port_id;
31134 	uint8_t	flags;
31135 	/*
31136 	 * This bit is set to 1 when request is for a counter mask,
31137 	 * representing the width of each of the stats counters, rather
31138 	 * than counters themselves.
31139 	 */
31140 	#define HWRM_PORT_QSTATS_INPUT_FLAGS_COUNTER_MASK     UINT32_C(0x1)
31141 	uint8_t	unused_0[5];
31142 	/*
31143 	 * This is the host address where
31144 	 * Tx port statistics will be stored
31145 	 */
31146 	uint64_t	tx_stat_host_addr;
31147 	/*
31148 	 * This is the host address where
31149 	 * Rx port statistics will be stored
31150 	 */
31151 	uint64_t	rx_stat_host_addr;
31152 } __rte_packed_end;
31153 
31154 /* hwrm_port_qstats_output (size:128b/16B) */
31155 struct __rte_packed_begin hwrm_port_qstats_output {
31156 	/* The specific error status for the command. */
31157 	uint16_t	error_code;
31158 	/* The HWRM command request type. */
31159 	uint16_t	req_type;
31160 	/* The sequence ID from the original command. */
31161 	uint16_t	seq_id;
31162 	/* The length of the response data in number of bytes. */
31163 	uint16_t	resp_len;
31164 	/* The size of TX port statistics block in bytes. */
31165 	uint16_t	tx_stat_size;
31166 	/* The size of RX port statistics block in bytes. */
31167 	uint16_t	rx_stat_size;
31168 	uint8_t	unused_0[3];
31169 	/*
31170 	 * This field is used in Output records to indicate that the output
31171 	 * is completely written to RAM. This field should be read as '1'
31172 	 * to indicate that the output has been completely written. When
31173 	 * writing a command completion or response to an internal processor,
31174 	 * the order of writes has to be such that this field is written last.
31175 	 */
31176 	uint8_t	valid;
31177 } __rte_packed_end;
31178 
31179 /* Port Tx Statistics extended Format */
31180 /* tx_port_stats_ext (size:2048b/256B) */
31181 struct __rte_packed_begin tx_port_stats_ext {
31182 	/* Total number of tx bytes count on cos queue 0 */
31183 	uint64_t	tx_bytes_cos0;
31184 	/* Total number of tx bytes count on cos queue 1 */
31185 	uint64_t	tx_bytes_cos1;
31186 	/* Total number of tx bytes count on cos queue 2 */
31187 	uint64_t	tx_bytes_cos2;
31188 	/* Total number of tx bytes count on cos queue 3 */
31189 	uint64_t	tx_bytes_cos3;
31190 	/* Total number of tx bytes count on cos queue 4 */
31191 	uint64_t	tx_bytes_cos4;
31192 	/* Total number of tx bytes count on cos queue 5 */
31193 	uint64_t	tx_bytes_cos5;
31194 	/* Total number of tx bytes count on cos queue 6 */
31195 	uint64_t	tx_bytes_cos6;
31196 	/* Total number of tx bytes count on cos queue 7 */
31197 	uint64_t	tx_bytes_cos7;
31198 	/* Total number of tx packets count on cos queue 0 */
31199 	uint64_t	tx_packets_cos0;
31200 	/* Total number of tx packets count on cos queue 1 */
31201 	uint64_t	tx_packets_cos1;
31202 	/* Total number of tx packets count on cos queue 2 */
31203 	uint64_t	tx_packets_cos2;
31204 	/* Total number of tx packets count on cos queue 3 */
31205 	uint64_t	tx_packets_cos3;
31206 	/* Total number of tx packets count on cos queue 4 */
31207 	uint64_t	tx_packets_cos4;
31208 	/* Total number of tx packets count on cos queue 5 */
31209 	uint64_t	tx_packets_cos5;
31210 	/* Total number of tx packets count on cos queue 6 */
31211 	uint64_t	tx_packets_cos6;
31212 	/* Total number of tx packets count on cos queue 7 */
31213 	uint64_t	tx_packets_cos7;
31214 	/*
31215 	 * time duration between transmitting a XON -> XOFF and a subsequent XOFF
31216 	 * -> XON for priority 0
31217 	 */
31218 	uint64_t	pfc_pri0_tx_duration_us;
31219 	/*
31220 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31221 	 * priority 0
31222 	 */
31223 	uint64_t	pfc_pri0_tx_transitions;
31224 	/*
31225 	 * time duration between transmitting a XON -> XOFF and a subsequent XOFF
31226 	 * -> XON for priority 1
31227 	 */
31228 	uint64_t	pfc_pri1_tx_duration_us;
31229 	/*
31230 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31231 	 * priority 1
31232 	 */
31233 	uint64_t	pfc_pri1_tx_transitions;
31234 	/*
31235 	 * time duration between transmitting a XON -> XOFF and a subsequent XOFF
31236 	 * -> XON for priority 2
31237 	 */
31238 	uint64_t	pfc_pri2_tx_duration_us;
31239 	/*
31240 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31241 	 * priority 2
31242 	 */
31243 	uint64_t	pfc_pri2_tx_transitions;
31244 	/*
31245 	 * time duration between transmitting a XON -> XOFF and a subsequent XOFF
31246 	 * -> XON for priority 3
31247 	 */
31248 	uint64_t	pfc_pri3_tx_duration_us;
31249 	/*
31250 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31251 	 * priority 3
31252 	 */
31253 	uint64_t	pfc_pri3_tx_transitions;
31254 	/*
31255 	 * time duration between transmitting a XON -> XOFF and a subsequent XOFF
31256 	 * -> XON for priority 4
31257 	 */
31258 	uint64_t	pfc_pri4_tx_duration_us;
31259 	/*
31260 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31261 	 * priority 4
31262 	 */
31263 	uint64_t	pfc_pri4_tx_transitions;
31264 	/*
31265 	 * time duration between transmitting a XON -> XOFF and a subsequent XOFF
31266 	 * -> XON for priority 5
31267 	 */
31268 	uint64_t	pfc_pri5_tx_duration_us;
31269 	/*
31270 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31271 	 * priority 5
31272 	 */
31273 	uint64_t	pfc_pri5_tx_transitions;
31274 	/*
31275 	 * time duration between transmitting a XON -> XOFF and a subsequent XOFF
31276 	 * -> XON for priority 6
31277 	 */
31278 	uint64_t	pfc_pri6_tx_duration_us;
31279 	/*
31280 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31281 	 * priority 6
31282 	 */
31283 	uint64_t	pfc_pri6_tx_transitions;
31284 	/*
31285 	 * time duration between transmitting a XON -> XOFF and a subsequent XOFF
31286 	 * -> XON for priority 7
31287 	 */
31288 	uint64_t	pfc_pri7_tx_duration_us;
31289 	/*
31290 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31291 	 * priority 7
31292 	 */
31293 	uint64_t	pfc_pri7_tx_transitions;
31294 } __rte_packed_end;
31295 
31296 /* Port Rx Statistics extended Format */
31297 /* rx_port_stats_ext (size:3904b/488B) */
31298 struct __rte_packed_begin rx_port_stats_ext {
31299 	/* Number of times link state changed to down */
31300 	uint64_t	link_down_events;
31301 	/* Number of times the idle rings with pause bit are found */
31302 	uint64_t	continuous_pause_events;
31303 	/* Number of times the active rings pause bit resumed back */
31304 	uint64_t	resume_pause_events;
31305 	/*
31306 	 * Number of times, the ROCE cos queue PFC is disabled to avoid pause
31307 	 * flood/burst
31308 	 */
31309 	uint64_t	continuous_roce_pause_events;
31310 	/* Number of times, the ROCE cos queue PFC is enabled back */
31311 	uint64_t	resume_roce_pause_events;
31312 	/* Total number of rx bytes count on cos queue 0 */
31313 	uint64_t	rx_bytes_cos0;
31314 	/* Total number of rx bytes count on cos queue 1 */
31315 	uint64_t	rx_bytes_cos1;
31316 	/* Total number of rx bytes count on cos queue 2 */
31317 	uint64_t	rx_bytes_cos2;
31318 	/* Total number of rx bytes count on cos queue 3 */
31319 	uint64_t	rx_bytes_cos3;
31320 	/* Total number of rx bytes count on cos queue 4 */
31321 	uint64_t	rx_bytes_cos4;
31322 	/* Total number of rx bytes count on cos queue 5 */
31323 	uint64_t	rx_bytes_cos5;
31324 	/* Total number of rx bytes count on cos queue 6 */
31325 	uint64_t	rx_bytes_cos6;
31326 	/* Total number of rx bytes count on cos queue 7 */
31327 	uint64_t	rx_bytes_cos7;
31328 	/* Total number of rx packets count on cos queue 0 */
31329 	uint64_t	rx_packets_cos0;
31330 	/* Total number of rx packets count on cos queue 1 */
31331 	uint64_t	rx_packets_cos1;
31332 	/* Total number of rx packets count on cos queue 2 */
31333 	uint64_t	rx_packets_cos2;
31334 	/* Total number of rx packets count on cos queue 3 */
31335 	uint64_t	rx_packets_cos3;
31336 	/* Total number of rx packets count on cos queue 4 */
31337 	uint64_t	rx_packets_cos4;
31338 	/* Total number of rx packets count on cos queue 5 */
31339 	uint64_t	rx_packets_cos5;
31340 	/* Total number of rx packets count on cos queue 6 */
31341 	uint64_t	rx_packets_cos6;
31342 	/* Total number of rx packets count on cos queue 7 */
31343 	uint64_t	rx_packets_cos7;
31344 	/*
31345 	 * time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for
31346 	 * priority 0
31347 	 */
31348 	uint64_t	pfc_pri0_rx_duration_us;
31349 	/*
31350 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31351 	 * priority 0
31352 	 */
31353 	uint64_t	pfc_pri0_rx_transitions;
31354 	/*
31355 	 * time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for
31356 	 * priority 1
31357 	 */
31358 	uint64_t	pfc_pri1_rx_duration_us;
31359 	/*
31360 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31361 	 * priority 1
31362 	 */
31363 	uint64_t	pfc_pri1_rx_transitions;
31364 	/*
31365 	 * time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for
31366 	 * priority 2
31367 	 */
31368 	uint64_t	pfc_pri2_rx_duration_us;
31369 	/*
31370 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31371 	 * priority 2
31372 	 */
31373 	uint64_t	pfc_pri2_rx_transitions;
31374 	/*
31375 	 * time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for
31376 	 * priority 3
31377 	 */
31378 	uint64_t	pfc_pri3_rx_duration_us;
31379 	/*
31380 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31381 	 * priority 3
31382 	 */
31383 	uint64_t	pfc_pri3_rx_transitions;
31384 	/*
31385 	 * time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for
31386 	 * priority 4
31387 	 */
31388 	uint64_t	pfc_pri4_rx_duration_us;
31389 	/*
31390 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31391 	 * priority 4
31392 	 */
31393 	uint64_t	pfc_pri4_rx_transitions;
31394 	/*
31395 	 * time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for
31396 	 * priority 5
31397 	 */
31398 	uint64_t	pfc_pri5_rx_duration_us;
31399 	/*
31400 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31401 	 * priority 5
31402 	 */
31403 	uint64_t	pfc_pri5_rx_transitions;
31404 	/*
31405 	 * time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for
31406 	 * priority 6
31407 	 */
31408 	uint64_t	pfc_pri6_rx_duration_us;
31409 	/*
31410 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31411 	 * priority 6
31412 	 */
31413 	uint64_t	pfc_pri6_rx_transitions;
31414 	/*
31415 	 * time duration receiving a XON -> XOFF and a subsequent XOFF -> XON for
31416 	 * priority 7
31417 	 */
31418 	uint64_t	pfc_pri7_rx_duration_us;
31419 	/*
31420 	 * Number of times, a XON -> XOFF and XOFF -> XON transitions occur for
31421 	 * priority 7
31422 	 */
31423 	uint64_t	pfc_pri7_rx_transitions;
31424 	/* Total number of received bits */
31425 	uint64_t	rx_bits;
31426 	/* The number of events where the port receive buffer was over 85% full */
31427 	uint64_t	rx_buffer_passed_threshold;
31428 	/*
31429 	 * This counter represents uncorrected symbol errors post-FEC and may not
31430 	 * be populated in all cases. Each uncorrected FEC block may result in
31431 	 * one or more symbol errors.
31432 	 */
31433 	uint64_t	rx_pcs_symbol_err;
31434 	/* The number of corrected bits on the port according to active FEC */
31435 	uint64_t	rx_corrected_bits;
31436 	/* Total number of rx discard bytes count on cos queue 0 */
31437 	uint64_t	rx_discard_bytes_cos0;
31438 	/* Total number of rx discard bytes count on cos queue 1 */
31439 	uint64_t	rx_discard_bytes_cos1;
31440 	/* Total number of rx discard bytes count on cos queue 2 */
31441 	uint64_t	rx_discard_bytes_cos2;
31442 	/* Total number of rx discard bytes count on cos queue 3 */
31443 	uint64_t	rx_discard_bytes_cos3;
31444 	/* Total number of rx discard bytes count on cos queue 4 */
31445 	uint64_t	rx_discard_bytes_cos4;
31446 	/* Total number of rx discard bytes count on cos queue 5 */
31447 	uint64_t	rx_discard_bytes_cos5;
31448 	/* Total number of rx discard bytes count on cos queue 6 */
31449 	uint64_t	rx_discard_bytes_cos6;
31450 	/* Total number of rx discard bytes count on cos queue 7 */
31451 	uint64_t	rx_discard_bytes_cos7;
31452 	/* Total number of rx discard packets count on cos queue 0 */
31453 	uint64_t	rx_discard_packets_cos0;
31454 	/* Total number of rx discard packets count on cos queue 1 */
31455 	uint64_t	rx_discard_packets_cos1;
31456 	/* Total number of rx discard packets count on cos queue 2 */
31457 	uint64_t	rx_discard_packets_cos2;
31458 	/* Total number of rx discard packets count on cos queue 3 */
31459 	uint64_t	rx_discard_packets_cos3;
31460 	/* Total number of rx discard packets count on cos queue 4 */
31461 	uint64_t	rx_discard_packets_cos4;
31462 	/* Total number of rx discard packets count on cos queue 5 */
31463 	uint64_t	rx_discard_packets_cos5;
31464 	/* Total number of rx discard packets count on cos queue 6 */
31465 	uint64_t	rx_discard_packets_cos6;
31466 	/* Total number of rx discard packets count on cos queue 7 */
31467 	uint64_t	rx_discard_packets_cos7;
31468 	/* Total number of FEC blocks corrected by the FEC function in the PHY */
31469 	uint64_t	rx_fec_corrected_blocks;
31470 	/*
31471 	 * Total number of FEC blocks determined to be uncorrectable by the
31472 	 * FEC function in the PHY
31473 	 */
31474 	uint64_t	rx_fec_uncorrectable_blocks;
31475 	/*
31476 	 * Total number of packets that are dropped due to not matching
31477 	 * any RX filter rules. This value is zero on the non supported
31478 	 * controllers. This counter is per controller, Firmware reports the
31479 	 * same value on active ports. This counter does not include the
31480 	 * packet discards because of no available buffers.
31481 	 */
31482 	uint64_t	rx_filter_miss;
31483 	/*
31484 	 * This field represents the number of FEC symbol errors by counting
31485 	 * once for each 10-bit symbol corrected by FEC block.
31486 	 * rx_fec_corrected_blocks will be incremented if all symbol errors in a
31487 	 * codeword gets corrected.
31488 	 */
31489 	uint64_t	rx_fec_symbol_err;
31490 } __rte_packed_end;
31491 
31492 /*
31493  * Port Rx Statistics extended PFC WatchDog Format.
31494  * StormDetect and StormRevert event determination is based
31495  * on an integration period and a percentage threshold.
31496  * StormDetect event - when percentage of XOFF frames received
31497  * within an integration period exceeds the configured threshold.
31498  * StormRevert event - when percentage of XON frames received
31499  * within an integration period exceeds the configured threshold.
31500  * Actual number of XOFF/XON frames for the events to be triggered
31501  * depends on both configured integration period and sampling rate.
31502  * The statistics in this structure represent counts of specified
31503  * events from the moment the feature (PFC WatchDog) is enabled via
31504  * hwrm_queue_pfc_enable_cfg call.
31505  */
31506 /* rx_port_stats_ext_pfc_wd (size:5120b/640B) */
31507 struct __rte_packed_begin rx_port_stats_ext_pfc_wd {
31508 	/*
31509 	 * Total number of PFC WatchDog StormDetect events detected
31510 	 * for Pri 0
31511 	 */
31512 	uint64_t	rx_pfc_watchdog_storms_detected_pri0;
31513 	/*
31514 	 * Total number of PFC WatchDog StormDetect events detected
31515 	 * for Pri 1
31516 	 */
31517 	uint64_t	rx_pfc_watchdog_storms_detected_pri1;
31518 	/*
31519 	 * Total number of PFC WatchDog StormDetect events detected
31520 	 * for Pri 2
31521 	 */
31522 	uint64_t	rx_pfc_watchdog_storms_detected_pri2;
31523 	/*
31524 	 * Total number of PFC WatchDog StormDetect events detected
31525 	 * for Pri 3
31526 	 */
31527 	uint64_t	rx_pfc_watchdog_storms_detected_pri3;
31528 	/*
31529 	 * Total number of PFC WatchDog StormDetect events detected
31530 	 * for Pri 4
31531 	 */
31532 	uint64_t	rx_pfc_watchdog_storms_detected_pri4;
31533 	/*
31534 	 * Total number of PFC WatchDog StormDetect events detected
31535 	 * for Pri 5
31536 	 */
31537 	uint64_t	rx_pfc_watchdog_storms_detected_pri5;
31538 	/*
31539 	 * Total number of PFC WatchDog StormDetect events detected
31540 	 * for Pri 6
31541 	 */
31542 	uint64_t	rx_pfc_watchdog_storms_detected_pri6;
31543 	/*
31544 	 * Total number of PFC WatchDog StormDetect events detected
31545 	 * for Pri 7
31546 	 */
31547 	uint64_t	rx_pfc_watchdog_storms_detected_pri7;
31548 	/*
31549 	 * Total number of PFC WatchDog StormRevert events detected
31550 	 * for Pri 0
31551 	 */
31552 	uint64_t	rx_pfc_watchdog_storms_reverted_pri0;
31553 	/*
31554 	 * Total number of PFC WatchDog StormRevert events detected
31555 	 * for Pri 1
31556 	 */
31557 	uint64_t	rx_pfc_watchdog_storms_reverted_pri1;
31558 	/*
31559 	 * Total number of PFC WatchDog StormRevert events detected
31560 	 * for Pri 2
31561 	 */
31562 	uint64_t	rx_pfc_watchdog_storms_reverted_pri2;
31563 	/*
31564 	 * Total number of PFC WatchDog StormRevert events detected
31565 	 * for Pri 3
31566 	 */
31567 	uint64_t	rx_pfc_watchdog_storms_reverted_pri3;
31568 	/*
31569 	 * Total number of PFC WatchDog StormRevert events detected
31570 	 * for Pri 4
31571 	 */
31572 	uint64_t	rx_pfc_watchdog_storms_reverted_pri4;
31573 	/*
31574 	 * Total number of PFC WatchDog StormRevert events detected
31575 	 * for Pri 5
31576 	 */
31577 	uint64_t	rx_pfc_watchdog_storms_reverted_pri5;
31578 	/*
31579 	 * Total number of PFC WatchDog StormRevert events detected
31580 	 * for Pri 6
31581 	 */
31582 	uint64_t	rx_pfc_watchdog_storms_reverted_pri6;
31583 	/*
31584 	 * Total number of PFC WatchDog StormRevert events detected
31585 	 * for Pri 7
31586 	 */
31587 	uint64_t	rx_pfc_watchdog_storms_reverted_pri7;
31588 	/*
31589 	 * Total number of packets received during PFC watchdog storm
31590 	 * for pri 0
31591 	 */
31592 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri0;
31593 	/*
31594 	 * Total number of packets received during PFC watchdog storm
31595 	 * for pri 1
31596 	 */
31597 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri1;
31598 	/*
31599 	 * Total number of packets received during PFC watchdog storm
31600 	 *  for pri 2
31601 	 */
31602 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri2;
31603 	/*
31604 	 * Total number of packets received during PFC watchdog storm
31605 	 *  for pri 3
31606 	 */
31607 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri3;
31608 	/*
31609 	 * Total number of packets received during PFC watchdog storm
31610 	 *  for pri 4
31611 	 */
31612 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri4;
31613 	/*
31614 	 * Total number of packets received during PFC watchdog storm
31615 	 *  for pri 5
31616 	 */
31617 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri5;
31618 	/*
31619 	 * Total number of packets received during PFC watchdog storm
31620 	 *  for pri 6
31621 	 */
31622 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri6;
31623 	/*
31624 	 * Total number of packets received during PFC watchdog storm
31625 	 *  for pri 7
31626 	 */
31627 	uint64_t	rx_pfc_watchdog_storms_rx_packets_pri7;
31628 	/*
31629 	 * Total number of bytes received during PFC watchdog storm
31630 	 * for pri 0
31631 	 */
31632 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri0;
31633 	/*
31634 	 * Total number of bytes received during PFC watchdog storm
31635 	 * for pri 1
31636 	 */
31637 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri1;
31638 	/*
31639 	 * Total number of bytes received during PFC watchdog storm
31640 	 *  for pri 2
31641 	 */
31642 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri2;
31643 	/*
31644 	 * Total number of bytes received during PFC watchdog storm
31645 	 *  for pri 3
31646 	 */
31647 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri3;
31648 	/*
31649 	 * Total number of bytes received during PFC watchdog storm
31650 	 *  for pri 4
31651 	 */
31652 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri4;
31653 	/*
31654 	 * Total number of bytes received during PFC watchdog storm
31655 	 *  for pri 5
31656 	 */
31657 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri5;
31658 	/*
31659 	 * Total number of bytes received during PFC watchdog storm
31660 	 *  for pri 6
31661 	 */
31662 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri6;
31663 	/*
31664 	 * Total number of bytes received during PFC watchdog storm
31665 	 *  for pri 7
31666 	 */
31667 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_pri7;
31668 	/*
31669 	 * Total number of packets dropped on rx during PFC watchdog storm
31670 	 * for pri 0
31671 	 */
31672 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri0;
31673 	/*
31674 	 * Total number of packets dropped on rx during PFC watchdog storm
31675 	 * for pri 1
31676 	 */
31677 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri1;
31678 	/*
31679 	 * Total number of packets dropped on rx during PFC watchdog storm
31680 	 *  for pri 2
31681 	 */
31682 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri2;
31683 	/*
31684 	 * Total number of packets dropped on rx during PFC watchdog storm
31685 	 *  for pri 3
31686 	 */
31687 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri3;
31688 	/*
31689 	 * Total number of packets dropped on rx during PFC watchdog storm
31690 	 *  for pri 4
31691 	 */
31692 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri4;
31693 	/*
31694 	 * Total number of packets dropped on rx during PFC watchdog storm
31695 	 *  for pri 5
31696 	 */
31697 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri5;
31698 	/*
31699 	 * Total number of packets dropped on rx during PFC watchdog storm
31700 	 *  for pri 6
31701 	 */
31702 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri6;
31703 	/*
31704 	 * Total number of packets dropped on rx during PFC watchdog storm
31705 	 *  for pri 7
31706 	 */
31707 	uint64_t	rx_pfc_watchdog_storms_rx_packets_dropped_pri7;
31708 	/*
31709 	 * Total number of bytes dropped on rx during PFC watchdog storm
31710 	 * for pri 0
31711 	 */
31712 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri0;
31713 	/*
31714 	 * Total number of bytes dropped on rx during PFC watchdog storm
31715 	 * for pri 1
31716 	 */
31717 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri1;
31718 	/*
31719 	 * Total number of bytes dropped on rx during PFC watchdog storm
31720 	 *  for pri 2
31721 	 */
31722 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri2;
31723 	/*
31724 	 * Total number of bytes dropped on rx during PFC watchdog storm
31725 	 *  for pri 3
31726 	 */
31727 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri3;
31728 	/*
31729 	 * Total number of bytes dropped on rx during PFC watchdog storm
31730 	 *  for pri 4
31731 	 */
31732 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri4;
31733 	/*
31734 	 * Total number of bytes dropped on rx during PFC watchdog storm
31735 	 *  for pri 5
31736 	 */
31737 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri5;
31738 	/*
31739 	 * Total number of bytes dropped on rx during PFC watchdog storm
31740 	 *  for pri 6
31741 	 */
31742 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri6;
31743 	/*
31744 	 * Total number of bytes dropped on rx during PFC watchdog storm
31745 	 *  for pri 7
31746 	 */
31747 	uint64_t	rx_pfc_watchdog_storms_rx_bytes_dropped_pri7;
31748 	/*
31749 	 * Number of packets received during last PFC watchdog storm
31750 	 * for pri 0
31751 	 */
31752 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri0;
31753 	/*
31754 	 * Number of packets received during last PFC watchdog storm
31755 	 * for pri 1
31756 	 */
31757 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri1;
31758 	/*
31759 	 * Number of packets received during last PFC watchdog storm
31760 	 *  for pri 2
31761 	 */
31762 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri2;
31763 	/*
31764 	 * Number of packets received during last PFC watchdog storm
31765 	 *  for pri 3
31766 	 */
31767 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri3;
31768 	/*
31769 	 * Number of packets received during last PFC watchdog storm
31770 	 *  for pri 4
31771 	 */
31772 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri4;
31773 	/*
31774 	 * Number of packets received during last PFC watchdog storm
31775 	 *  for pri 5
31776 	 */
31777 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri5;
31778 	/*
31779 	 * Number of packets received during last PFC watchdog storm
31780 	 *  for pri 6
31781 	 */
31782 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri6;
31783 	/*
31784 	 * Number of packets received during last PFC watchdog storm
31785 	 *  for pri 7
31786 	 */
31787 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_pri7;
31788 	/*
31789 	 * Number of bytes received during last PFC watchdog storm
31790 	 * for pri 0
31791 	 */
31792 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri0;
31793 	/*
31794 	 * Number of bytes received during last PFC watchdog storm
31795 	 * for pri 1
31796 	 */
31797 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri1;
31798 	/*
31799 	 * Number of bytes received during last PFC watchdog storm
31800 	 *  for pri 2
31801 	 */
31802 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri2;
31803 	/*
31804 	 * Number of bytes received during last PFC watchdog storm
31805 	 *  for pri 3
31806 	 */
31807 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri3;
31808 	/*
31809 	 * Number of bytes received during last PFC watchdog storm
31810 	 *  for pri 4
31811 	 */
31812 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri4;
31813 	/*
31814 	 * Number of bytes received during last PFC watchdog storm
31815 	 *  for pri 5
31816 	 */
31817 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri5;
31818 	/*
31819 	 * Number of bytes received during last PFC watchdog storm
31820 	 *  for pri 6
31821 	 */
31822 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri6;
31823 	/*
31824 	 * Number of bytes received during last PFC watchdog storm
31825 	 *  for pri 7
31826 	 */
31827 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_pri7;
31828 	/*
31829 	 * Number of packets dropped on rx during last PFC watchdog storm
31830 	 * for pri 0
31831 	 */
31832 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri0;
31833 	/*
31834 	 * Number of packets dropped on rx during last PFC watchdog storm
31835 	 * for pri 1
31836 	 */
31837 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri1;
31838 	/*
31839 	 * Number of packets dropped on rx during last PFC watchdog storm
31840 	 *  for pri 2
31841 	 */
31842 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri2;
31843 	/*
31844 	 * Number of packets dropped on rx during last PFC watchdog storm
31845 	 *  for pri 3
31846 	 */
31847 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri3;
31848 	/*
31849 	 * Number of packets dropped on rx during last PFC watchdog storm
31850 	 *  for pri 4
31851 	 */
31852 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri4;
31853 	/*
31854 	 * Number of packets dropped on rx during last PFC watchdog storm
31855 	 *  for pri 5
31856 	 */
31857 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri5;
31858 	/*
31859 	 * Number of packets dropped on rx during last PFC watchdog storm
31860 	 *  for pri 6
31861 	 */
31862 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri6;
31863 	/*
31864 	 * Number of packets dropped on rx during last PFC watchdog storm
31865 	 *  for pri 7
31866 	 */
31867 	uint64_t	rx_pfc_watchdog_last_storm_rx_packets_dropped_pri7;
31868 	/*
31869 	 * Total number of bytes dropped on rx during PFC watchdog storm
31870 	 * for pri 0
31871 	 */
31872 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri0;
31873 	/*
31874 	 * Number of bytes dropped on rx during last PFC watchdog storm
31875 	 * for pri 1
31876 	 */
31877 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri1;
31878 	/*
31879 	 * Number of bytes dropped on rx during last PFC watchdog storm
31880 	 *  for pri 2
31881 	 */
31882 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri2;
31883 	/*
31884 	 * Number of bytes dropped on rx during last PFC watchdog storm
31885 	 *  for pri 3
31886 	 */
31887 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri3;
31888 	/*
31889 	 * Number of bytes dropped on rx during last PFC watchdog storm
31890 	 *  for pri 4
31891 	 */
31892 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri4;
31893 	/*
31894 	 * Number of bytes dropped on rx during last PFC watchdog storm
31895 	 *  for pri 5
31896 	 */
31897 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri5;
31898 	/*
31899 	 * Number of bytes dropped on rx during last PFC watchdog storm
31900 	 *  for pri 6
31901 	 */
31902 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri6;
31903 	/*
31904 	 * Number of bytes dropped on rx during last PFC watchdog storm
31905 	 *  for pri 7
31906 	 */
31907 	uint64_t	rx_pfc_watchdog_last_storm_rx_bytes_dropped_pri7;
31908 } __rte_packed_end;
31909 
31910 /************************
31911  * hwrm_port_qstats_ext *
31912  ************************/
31913 
31914 
31915 /* hwrm_port_qstats_ext_input (size:320b/40B) */
31916 struct __rte_packed_begin hwrm_port_qstats_ext_input {
31917 	/* The HWRM command request type. */
31918 	uint16_t	req_type;
31919 	/*
31920 	 * The completion ring to send the completion event on. This should
31921 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
31922 	 */
31923 	uint16_t	cmpl_ring;
31924 	/*
31925 	 * The sequence ID is used by the driver for tracking multiple
31926 	 * commands. This ID is treated as opaque data by the firmware and
31927 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
31928 	 */
31929 	uint16_t	seq_id;
31930 	/*
31931 	 * The target ID of the command:
31932 	 * * 0x0-0xFFF8 - The function ID
31933 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
31934 	 * * 0xFFFD - Reserved for user-space HWRM interface
31935 	 * * 0xFFFF - HWRM
31936 	 */
31937 	uint16_t	target_id;
31938 	/*
31939 	 * A physical address pointer pointing to a host buffer that the
31940 	 * command's response data will be written. This can be either a host
31941 	 * physical address (HPA) or a guest physical address (GPA) and must
31942 	 * point to a physically contiguous block of memory.
31943 	 */
31944 	uint64_t	resp_addr;
31945 	/* Port ID of port that is being queried. */
31946 	uint16_t	port_id;
31947 	/*
31948 	 * The size of TX port extended
31949 	 * statistics block in bytes.
31950 	 */
31951 	uint16_t	tx_stat_size;
31952 	/*
31953 	 * The size of RX port extended
31954 	 * statistics block in bytes
31955 	 */
31956 	uint16_t	rx_stat_size;
31957 	uint8_t	flags;
31958 	/*
31959 	 * This bit is set to 1 when request is for the counter mask,
31960 	 * representing width of each of the stats counters, rather than
31961 	 * counters themselves.
31962 	 */
31963 	#define HWRM_PORT_QSTATS_EXT_INPUT_FLAGS_COUNTER_MASK     UINT32_C(0x1)
31964 	uint8_t	unused_0;
31965 	/*
31966 	 * This is the host address where
31967 	 * Tx port statistics will be stored
31968 	 */
31969 	uint64_t	tx_stat_host_addr;
31970 	/*
31971 	 * This is the host address where
31972 	 * Rx port statistics will be stored
31973 	 */
31974 	uint64_t	rx_stat_host_addr;
31975 } __rte_packed_end;
31976 
31977 /* hwrm_port_qstats_ext_output (size:128b/16B) */
31978 struct __rte_packed_begin hwrm_port_qstats_ext_output {
31979 	/* The specific error status for the command. */
31980 	uint16_t	error_code;
31981 	/* The HWRM command request type. */
31982 	uint16_t	req_type;
31983 	/* The sequence ID from the original command. */
31984 	uint16_t	seq_id;
31985 	/* The length of the response data in number of bytes. */
31986 	uint16_t	resp_len;
31987 	/* The size of TX port statistics block in bytes. */
31988 	uint16_t	tx_stat_size;
31989 	/* The size of RX port statistics block in bytes. */
31990 	uint16_t	rx_stat_size;
31991 	/* Total number of active cos queues available. */
31992 	uint16_t	total_active_cos_queues;
31993 	uint8_t	flags;
31994 	/*
31995 	 * If set to 1, then this field indicates that clear
31996 	 * roce specific counters is supported.
31997 	 */
31998 	#define HWRM_PORT_QSTATS_EXT_OUTPUT_FLAGS_CLEAR_ROCE_COUNTERS_SUPPORTED \
31999 		UINT32_C(0x1)
32000 	/*
32001 	 * This field is used in Output records to indicate that the output
32002 	 * is completely written to RAM. This field should be read as '1'
32003 	 * to indicate that the output has been completely written. When
32004 	 * writing a command completion or response to an internal processor,
32005 	 * the order of writes has to be such that this field is written last.
32006 	 */
32007 	uint8_t	valid;
32008 } __rte_packed_end;
32009 
32010 /*******************************
32011  * hwrm_port_qstats_ext_pfc_wd *
32012  *******************************/
32013 
32014 
32015 /* hwrm_port_qstats_ext_pfc_wd_input (size:256b/32B) */
32016 struct __rte_packed_begin hwrm_port_qstats_ext_pfc_wd_input {
32017 	/* The HWRM command request type. */
32018 	uint16_t	req_type;
32019 	/*
32020 	 * The completion ring to send the completion event on. This should
32021 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32022 	 */
32023 	uint16_t	cmpl_ring;
32024 	/*
32025 	 * The sequence ID is used by the driver for tracking multiple
32026 	 * commands. This ID is treated as opaque data by the firmware and
32027 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32028 	 */
32029 	uint16_t	seq_id;
32030 	/*
32031 	 * The target ID of the command:
32032 	 * * 0x0-0xFFF8 - The function ID
32033 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32034 	 * * 0xFFFD - Reserved for user-space HWRM interface
32035 	 * * 0xFFFF - HWRM
32036 	 */
32037 	uint16_t	target_id;
32038 	/*
32039 	 * A physical address pointer pointing to a host buffer that the
32040 	 * command's response data will be written. This can be either a host
32041 	 * physical address (HPA) or a guest physical address (GPA) and must
32042 	 * point to a physically contiguous block of memory.
32043 	 */
32044 	uint64_t	resp_addr;
32045 	/* Port ID of port that is being queried. */
32046 	uint16_t	port_id;
32047 	/*
32048 	 * The size of rx_port_stats_ext_pfc_wd
32049 	 * block in bytes
32050 	 */
32051 	uint16_t	pfc_wd_stat_size;
32052 	uint8_t	unused_0[4];
32053 	/*
32054 	 * This is the host address where
32055 	 * rx_port_stats_ext_pfc_wd will be stored
32056 	 */
32057 	uint64_t	pfc_wd_stat_host_addr;
32058 } __rte_packed_end;
32059 
32060 /* hwrm_port_qstats_ext_pfc_wd_output (size:128b/16B) */
32061 struct __rte_packed_begin hwrm_port_qstats_ext_pfc_wd_output {
32062 	/* The specific error status for the command. */
32063 	uint16_t	error_code;
32064 	/* The HWRM command request type. */
32065 	uint16_t	req_type;
32066 	/* The sequence ID from the original command. */
32067 	uint16_t	seq_id;
32068 	/* The length of the response data in number of bytes. */
32069 	uint16_t	resp_len;
32070 	/*
32071 	 * The size of rx_port_stats_ext_pfc_wd
32072 	 * statistics block in bytes.
32073 	 */
32074 	uint16_t	pfc_wd_stat_size;
32075 	uint8_t	unused_0[5];
32076 	/*
32077 	 * This field is used in Output records to indicate that the output
32078 	 * is completely written to RAM. This field should be read as '1'
32079 	 * to indicate that the output has been completely written. When
32080 	 * writing a command completion or response to an internal processor,
32081 	 * the order of writes has to be such that this field is written last.
32082 	 */
32083 	uint8_t	valid;
32084 } __rte_packed_end;
32085 
32086 /*************************
32087  * hwrm_port_lpbk_qstats *
32088  *************************/
32089 
32090 
32091 /* hwrm_port_lpbk_qstats_input (size:256b/32B) */
32092 struct __rte_packed_begin hwrm_port_lpbk_qstats_input {
32093 	/* The HWRM command request type. */
32094 	uint16_t	req_type;
32095 	/*
32096 	 * The completion ring to send the completion event on. This should
32097 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32098 	 */
32099 	uint16_t	cmpl_ring;
32100 	/*
32101 	 * The sequence ID is used by the driver for tracking multiple
32102 	 * commands. This ID is treated as opaque data by the firmware and
32103 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32104 	 */
32105 	uint16_t	seq_id;
32106 	/*
32107 	 * The target ID of the command:
32108 	 * * 0x0-0xFFF8 - The function ID
32109 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32110 	 * * 0xFFFD - Reserved for user-space HWRM interface
32111 	 * * 0xFFFF - HWRM
32112 	 */
32113 	uint16_t	target_id;
32114 	/*
32115 	 * A physical address pointer pointing to a host buffer that the
32116 	 * command's response data will be written. This can be either a host
32117 	 * physical address (HPA) or a guest physical address (GPA) and must
32118 	 * point to a physically contiguous block of memory.
32119 	 */
32120 	uint64_t	resp_addr;
32121 	/*
32122 	 * The size of the loopback statistics buffer passed in the
32123 	 * loopback_stat_host_addr in bytes.
32124 	 * Firmware will not exceed this size when it DMAs the
32125 	 * statistics structure to the host. The actual DMA size
32126 	 * will be returned in the response.
32127 	 */
32128 	uint16_t	lpbk_stat_size;
32129 	uint8_t	flags;
32130 	/*
32131 	 * This bit is set to 1 when request is for a counter mask,
32132 	 * representing the width of each of the stats counters, rather
32133 	 * than counters themselves.
32134 	 */
32135 	#define HWRM_PORT_LPBK_QSTATS_INPUT_FLAGS_COUNTER_MASK \
32136 		UINT32_C(0x1)
32137 	uint8_t	unused_0[5];
32138 	/*
32139 	 * This is the host address where
32140 	 * loopback statistics will be stored
32141 	 */
32142 	uint64_t	lpbk_stat_host_addr;
32143 } __rte_packed_end;
32144 
32145 /* hwrm_port_lpbk_qstats_output (size:128b/16B) */
32146 struct __rte_packed_begin hwrm_port_lpbk_qstats_output {
32147 	/* The specific error status for the command. */
32148 	uint16_t	error_code;
32149 	/* The HWRM command request type. */
32150 	uint16_t	req_type;
32151 	/* The sequence ID from the original command. */
32152 	uint16_t	seq_id;
32153 	/* The length of the response data in number of bytes. */
32154 	uint16_t	resp_len;
32155 	/*
32156 	 * The size of the loopback statistics block in bytes DMA'ed by the
32157 	 * firmware. Note that this size will never exceed the lpbk_stat_size
32158 	 * field passed in by the driver in the hwrm_port_lpbk_qstats_input
32159 	 * structure.
32160 	 */
32161 	uint16_t	lpbk_stat_size;
32162 	uint8_t	unused_0[5];
32163 	/*
32164 	 * This field is used in Output records to indicate that the output
32165 	 * is completely written to RAM. This field should be read as '1'
32166 	 * to indicate that the output has been completely written.
32167 	 * When writing a command completion or response to an internal
32168 	 * processor, the order of writes has to be such that this field is
32169 	 * written last.
32170 	 */
32171 	uint8_t	valid;
32172 } __rte_packed_end;
32173 
32174 /* Loopback Port Statistic Format */
32175 /* port_lpbk_stats (size:640b/80B) */
32176 struct __rte_packed_begin port_lpbk_stats {
32177 	/* Number of transmitted unicast frames */
32178 	uint64_t	lpbk_ucast_frames;
32179 	/* Number of transmitted multicast frames */
32180 	uint64_t	lpbk_mcast_frames;
32181 	/* Number of transmitted broadcast frames */
32182 	uint64_t	lpbk_bcast_frames;
32183 	/* Number of transmitted bytes for unicast traffic */
32184 	uint64_t	lpbk_ucast_bytes;
32185 	/* Number of transmitted bytes for multicast traffic */
32186 	uint64_t	lpbk_mcast_bytes;
32187 	/* Number of transmitted bytes for broadcast traffic */
32188 	uint64_t	lpbk_bcast_bytes;
32189 	/* Number of dropped tx packets */
32190 	uint64_t	lpbk_tx_discards;
32191 	/* Number of error dropped tx packets */
32192 	uint64_t	lpbk_tx_errors;
32193 	/* Number of dropped rx packets */
32194 	uint64_t	lpbk_rx_discards;
32195 	/* Number of error dropped rx packets */
32196 	uint64_t	lpbk_rx_errors;
32197 } __rte_packed_end;
32198 
32199 /************************
32200  * hwrm_port_ecn_qstats *
32201  ************************/
32202 
32203 
32204 /* hwrm_port_ecn_qstats_input (size:256b/32B) */
32205 struct __rte_packed_begin hwrm_port_ecn_qstats_input {
32206 	/* The HWRM command request type. */
32207 	uint16_t	req_type;
32208 	/*
32209 	 * The completion ring to send the completion event on. This should
32210 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32211 	 */
32212 	uint16_t	cmpl_ring;
32213 	/*
32214 	 * The sequence ID is used by the driver for tracking multiple
32215 	 * commands. This ID is treated as opaque data by the firmware and
32216 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32217 	 */
32218 	uint16_t	seq_id;
32219 	/*
32220 	 * The target ID of the command:
32221 	 * * 0x0-0xFFF8 - The function ID
32222 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32223 	 * * 0xFFFD - Reserved for user-space HWRM interface
32224 	 * * 0xFFFF - HWRM
32225 	 */
32226 	uint16_t	target_id;
32227 	/*
32228 	 * A physical address pointer pointing to a host buffer that the
32229 	 * command's response data will be written. This can be either a host
32230 	 * physical address (HPA) or a guest physical address (GPA) and must
32231 	 * point to a physically contiguous block of memory.
32232 	 */
32233 	uint64_t	resp_addr;
32234 	/*
32235 	 * Port ID of port that is being queried. Unused if NIC is in
32236 	 * multi-host mode.
32237 	 */
32238 	uint16_t	port_id;
32239 	/*
32240 	 * Size of the DMA buffer the caller has allocated for the firmware to
32241 	 * write into.
32242 	 */
32243 	uint16_t	ecn_stat_buf_size;
32244 	uint8_t	flags;
32245 	/*
32246 	 * This bit is set to 1 when request is for a counter mask,
32247 	 * representing the width of each of the stats counters, rather
32248 	 * than counters themselves.
32249 	 */
32250 	#define HWRM_PORT_ECN_QSTATS_INPUT_FLAGS_COUNTER_MASK     UINT32_C(0x1)
32251 	uint8_t	unused_0[3];
32252 	/*
32253 	 * This is the host address where
32254 	 * ECN port statistics will be stored
32255 	 */
32256 	uint64_t	ecn_stat_host_addr;
32257 } __rte_packed_end;
32258 
32259 /* hwrm_port_ecn_qstats_output (size:128b/16B) */
32260 struct __rte_packed_begin hwrm_port_ecn_qstats_output {
32261 	/* The specific error status for the command. */
32262 	uint16_t	error_code;
32263 	/* The HWRM command request type. */
32264 	uint16_t	req_type;
32265 	/* The sequence ID from the original command. */
32266 	uint16_t	seq_id;
32267 	/* The length of the response data in number of bytes. */
32268 	uint16_t	resp_len;
32269 	/* Number of bytes of stats the firmware wrote to the DMA buffer. */
32270 	uint16_t	ecn_stat_buf_size;
32271 	/*
32272 	 * Bitmask that indicates which CoS queues have ECN marking enabled.
32273 	 * Bit i corresponds to CoS queue i.
32274 	 */
32275 	uint8_t	mark_en;
32276 	uint8_t	unused_0[4];
32277 	/*
32278 	 * This field is used in Output records to indicate that the output
32279 	 * is completely written to RAM. This field should be read as '1'
32280 	 * to indicate that the output has been completely written. When
32281 	 * writing a command completion or response to an internal processor,
32282 	 * the order of writes has to be such that this field is written last.
32283 	 */
32284 	uint8_t	valid;
32285 } __rte_packed_end;
32286 
32287 /* ECN mark statistics format */
32288 /* port_stats_ecn (size:512b/64B) */
32289 struct __rte_packed_begin port_stats_ecn {
32290 	/*
32291 	 * Number of packets marked in CoS queue 0.
32292 	 * Or, if the driver requested counter masks, a mask to indicate the size
32293 	 * of the counter.
32294 	 */
32295 	uint64_t	mark_cnt_cos0;
32296 	/*
32297 	 * Number of packets marked in CoS queue 1.
32298 	 * Or, if the driver requested counter masks, a mask to indicate the size
32299 	 * of the counter.
32300 	 */
32301 	uint64_t	mark_cnt_cos1;
32302 	/*
32303 	 * Number of packets marked in CoS queue 2.
32304 	 * Or, if the driver requested counter masks, a mask to indicate the size
32305 	 * of the counter.
32306 	 */
32307 	uint64_t	mark_cnt_cos2;
32308 	/*
32309 	 * Number of packets marked in CoS queue 3.
32310 	 * Or, if the driver requested counter masks, a mask to indicate the size
32311 	 * of the counter.
32312 	 */
32313 	uint64_t	mark_cnt_cos3;
32314 	/*
32315 	 * Number of packets marked in CoS queue 4.
32316 	 * Or, if the driver requested counter masks, a mask to indicate the size
32317 	 * of the counter.
32318 	 */
32319 	uint64_t	mark_cnt_cos4;
32320 	/*
32321 	 * Number of packets marked in CoS queue 5.
32322 	 * Or, if the driver requested counter masks, a mask to indicate the size
32323 	 * of the counter.
32324 	 */
32325 	uint64_t	mark_cnt_cos5;
32326 	/*
32327 	 * Number of packets marked in CoS queue 6.
32328 	 * Or, if the driver requested counter masks, a mask to indicate the size
32329 	 * of the counter.
32330 	 */
32331 	uint64_t	mark_cnt_cos6;
32332 	/*
32333 	 * Number of packets marked in CoS queue 7.
32334 	 * Or, if the driver requested counter masks, a mask to indicate the size
32335 	 * of the counter.
32336 	 */
32337 	uint64_t	mark_cnt_cos7;
32338 } __rte_packed_end;
32339 
32340 /***********************
32341  * hwrm_port_clr_stats *
32342  ***********************/
32343 
32344 
32345 /* hwrm_port_clr_stats_input (size:192b/24B) */
32346 struct __rte_packed_begin hwrm_port_clr_stats_input {
32347 	/* The HWRM command request type. */
32348 	uint16_t	req_type;
32349 	/*
32350 	 * The completion ring to send the completion event on. This should
32351 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32352 	 */
32353 	uint16_t	cmpl_ring;
32354 	/*
32355 	 * The sequence ID is used by the driver for tracking multiple
32356 	 * commands. This ID is treated as opaque data by the firmware and
32357 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32358 	 */
32359 	uint16_t	seq_id;
32360 	/*
32361 	 * The target ID of the command:
32362 	 * * 0x0-0xFFF8 - The function ID
32363 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32364 	 * * 0xFFFD - Reserved for user-space HWRM interface
32365 	 * * 0xFFFF - HWRM
32366 	 */
32367 	uint16_t	target_id;
32368 	/*
32369 	 * A physical address pointer pointing to a host buffer that the
32370 	 * command's response data will be written. This can be either a host
32371 	 * physical address (HPA) or a guest physical address (GPA) and must
32372 	 * point to a physically contiguous block of memory.
32373 	 */
32374 	uint64_t	resp_addr;
32375 	/* Port ID of port that is being queried. */
32376 	uint16_t	port_id;
32377 	uint8_t	flags;
32378 	/*
32379 	 * If set to 1, then this field indicates clear the following RoCE
32380 	 * specific counters.
32381 	 * RoCE associated TX/RX cos counters
32382 	 * CNP associated TX/RX cos counters
32383 	 * RoCE/CNP specific TX/RX flow counters
32384 	 * Firmware will determine the RoCE/CNP cos queue based on qos
32385 	 * profile.
32386 	 * This flag is honored only when RoCE is enabled on that port.
32387 	 */
32388 	#define HWRM_PORT_CLR_STATS_INPUT_FLAGS_ROCE_COUNTERS     UINT32_C(0x1)
32389 	uint8_t	unused_0[5];
32390 } __rte_packed_end;
32391 
32392 /* hwrm_port_clr_stats_output (size:128b/16B) */
32393 struct __rte_packed_begin hwrm_port_clr_stats_output {
32394 	/* The specific error status for the command. */
32395 	uint16_t	error_code;
32396 	/* The HWRM command request type. */
32397 	uint16_t	req_type;
32398 	/* The sequence ID from the original command. */
32399 	uint16_t	seq_id;
32400 	/* The length of the response data in number of bytes. */
32401 	uint16_t	resp_len;
32402 	uint8_t	unused_0[7];
32403 	/*
32404 	 * This field is used in Output records to indicate that the output
32405 	 * is completely written to RAM. This field should be read as '1'
32406 	 * to indicate that the output has been completely written. When
32407 	 * writing a command completion or response to an internal processor,
32408 	 * the order of writes has to be such that this field is written last.
32409 	 */
32410 	uint8_t	valid;
32411 } __rte_packed_end;
32412 
32413 /****************************
32414  * hwrm_port_lpbk_clr_stats *
32415  ****************************/
32416 
32417 
32418 /* hwrm_port_lpbk_clr_stats_input (size:192b/24B) */
32419 struct __rte_packed_begin hwrm_port_lpbk_clr_stats_input {
32420 	/* The HWRM command request type. */
32421 	uint16_t	req_type;
32422 	/*
32423 	 * The completion ring to send the completion event on. This should
32424 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32425 	 */
32426 	uint16_t	cmpl_ring;
32427 	/*
32428 	 * The sequence ID is used by the driver for tracking multiple
32429 	 * commands. This ID is treated as opaque data by the firmware and
32430 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32431 	 */
32432 	uint16_t	seq_id;
32433 	/*
32434 	 * The target ID of the command:
32435 	 * * 0x0-0xFFF8 - The function ID
32436 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32437 	 * * 0xFFFD - Reserved for user-space HWRM interface
32438 	 * * 0xFFFF - HWRM
32439 	 */
32440 	uint16_t	target_id;
32441 	/*
32442 	 * A physical address pointer pointing to a host buffer that the
32443 	 * command's response data will be written. This can be either a host
32444 	 * physical address (HPA) or a guest physical address (GPA) and must
32445 	 * point to a physically contiguous block of memory.
32446 	 */
32447 	uint64_t	resp_addr;
32448 	/* Port ID of port that is to be queried. */
32449 	uint16_t	port_id;
32450 	uint8_t	unused_0[6];
32451 } __rte_packed_end;
32452 
32453 /* hwrm_port_lpbk_clr_stats_output (size:128b/16B) */
32454 struct __rte_packed_begin hwrm_port_lpbk_clr_stats_output {
32455 	/* The specific error status for the command. */
32456 	uint16_t	error_code;
32457 	/* The HWRM command request type. */
32458 	uint16_t	req_type;
32459 	/* The sequence ID from the original command. */
32460 	uint16_t	seq_id;
32461 	/* The length of the response data in number of bytes. */
32462 	uint16_t	resp_len;
32463 	uint8_t	unused_0[7];
32464 	/*
32465 	 * This field is used in Output records to indicate that the output
32466 	 * is completely written to RAM. This field should be read as '1'
32467 	 * to indicate that the output has been completely written. When
32468 	 * writing a command completion or response to an internal processor,
32469 	 * the order of writes has to be such that this field is written last.
32470 	 */
32471 	uint8_t	valid;
32472 } __rte_packed_end;
32473 
32474 /***********************
32475  * hwrm_port_phy_qcaps *
32476  ***********************/
32477 
32478 
32479 /* hwrm_port_phy_qcaps_input (size:192b/24B) */
32480 struct __rte_packed_begin hwrm_port_phy_qcaps_input {
32481 	/* The HWRM command request type. */
32482 	uint16_t	req_type;
32483 	/*
32484 	 * The completion ring to send the completion event on. This should
32485 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32486 	 */
32487 	uint16_t	cmpl_ring;
32488 	/*
32489 	 * The sequence ID is used by the driver for tracking multiple
32490 	 * commands. This ID is treated as opaque data by the firmware and
32491 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32492 	 */
32493 	uint16_t	seq_id;
32494 	/*
32495 	 * The target ID of the command:
32496 	 * * 0x0-0xFFF8 - The function ID
32497 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32498 	 * * 0xFFFD - Reserved for user-space HWRM interface
32499 	 * * 0xFFFF - HWRM
32500 	 */
32501 	uint16_t	target_id;
32502 	/*
32503 	 * A physical address pointer pointing to a host buffer that the
32504 	 * command's response data will be written. This can be either a host
32505 	 * physical address (HPA) or a guest physical address (GPA) and must
32506 	 * point to a physically contiguous block of memory.
32507 	 */
32508 	uint64_t	resp_addr;
32509 	/* Port ID of port that is being queried. */
32510 	uint16_t	port_id;
32511 	uint8_t	unused_0[6];
32512 } __rte_packed_end;
32513 
32514 /* hwrm_port_phy_qcaps_output (size:320b/40B) */
32515 struct __rte_packed_begin hwrm_port_phy_qcaps_output {
32516 	/* The specific error status for the command. */
32517 	uint16_t	error_code;
32518 	/* The HWRM command request type. */
32519 	uint16_t	req_type;
32520 	/* The sequence ID from the original command. */
32521 	uint16_t	seq_id;
32522 	/* The length of the response data in number of bytes. */
32523 	uint16_t	resp_len;
32524 	/* PHY capability flags */
32525 	uint8_t	flags;
32526 	/*
32527 	 * If set to 1, then this field indicates that the
32528 	 * link is capable of supporting EEE.
32529 	 */
32530 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_EEE_SUPPORTED \
32531 		UINT32_C(0x1)
32532 	/*
32533 	 * If set to 1, then this field indicates that the
32534 	 * PHY is capable of supporting external loopback.
32535 	 */
32536 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_EXTERNAL_LPBK_SUPPORTED \
32537 		UINT32_C(0x2)
32538 	/*
32539 	 * If set to 1, then this field indicates that the
32540 	 * PHY is capable of supporting loopback in autoneg mode.
32541 	 */
32542 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_AUTONEG_LPBK_SUPPORTED \
32543 		UINT32_C(0x4)
32544 	/*
32545 	 * Indicates if the configuration of shared PHY settings is
32546 	 * supported. In cases where a physical port is shared by multiple
32547 	 * functions (e.g. NPAR, multihost, etc), the configuration of PHY
32548 	 * settings may not be allowed. Callers to HWRM_PORT_PHY_CFG will
32549 	 * get an HWRM_ERR_CODE_RESOURCE_ACCESS_DENIED error in this case.
32550 	 */
32551 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_SHARED_PHY_CFG_SUPPORTED \
32552 		UINT32_C(0x8)
32553 	/*
32554 	 * If set to 1, it indicates that the port counters and extended
32555 	 * port counters will not reset when the firmware shuts down or
32556 	 * resets the PHY. These counters will only be reset during power
32557 	 * cycle or by calling HWRM_PORT_CLR_STATS.
32558 	 * If set to 0, the state of the counters is unspecified when
32559 	 * firmware shuts down or resets the PHY.
32560 	 */
32561 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_CUMULATIVE_COUNTERS_ON_RESET \
32562 		UINT32_C(0x10)
32563 	/*
32564 	 * If set to 1, then this field indicates that the
32565 	 * local loopback is not supported on this controller.
32566 	 */
32567 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_LOCAL_LPBK_NOT_SUPPORTED \
32568 		UINT32_C(0x20)
32569 	/*
32570 	 * If set to 1, then this field indicates that the
32571 	 * PHY/Link down policy during PF shutdown is totally
32572 	 * controlled by the firmware. It can shutdown the link
32573 	 * even when there are active VFs associated with the PF.
32574 	 * Host PF driver can send HWRM_PHY_CFG command to bring
32575 	 * down the PHY even when the port is shared between VFs
32576 	 * and PFs.
32577 	 */
32578 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_FW_MANAGED_LINK_DOWN \
32579 		UINT32_C(0x40)
32580 	/*
32581 	 * If set to 1, this field indicates that the FCS may
32582 	 * be disabled for a given packet via the transmit
32583 	 * buffer descriptor.
32584 	 */
32585 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS_NO_FCS \
32586 		UINT32_C(0x80)
32587 	/* Number of front panel ports for this device. */
32588 	uint8_t	port_cnt;
32589 	/* Not supported or unknown */
32590 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_UNKNOWN UINT32_C(0x0)
32591 	/* single port device */
32592 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_1       UINT32_C(0x1)
32593 	/* 2-port device */
32594 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_2       UINT32_C(0x2)
32595 	/* 3-port device */
32596 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_3       UINT32_C(0x3)
32597 	/* 4-port device */
32598 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_4       UINT32_C(0x4)
32599 	/* 12-port device */
32600 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_12      UINT32_C(0xc)
32601 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_LAST \
32602 		HWRM_PORT_PHY_QCAPS_OUTPUT_PORT_CNT_12
32603 	/*
32604 	 * This is a bit mask to indicate what speeds are supported
32605 	 * as forced speeds on this link.
32606 	 * For each speed that can be forced on this link, the
32607 	 * corresponding mask bit shall be set to '1'.
32608 	 */
32609 	uint16_t	supported_speeds_force_mode;
32610 	/* 100Mb link speed (Half-duplex) */
32611 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_100MBHD \
32612 		UINT32_C(0x1)
32613 	/* 100Mb link speed (Full-duplex) */
32614 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_100MB \
32615 		UINT32_C(0x2)
32616 	/* 1Gb link speed (Half-duplex) */
32617 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_1GBHD \
32618 		UINT32_C(0x4)
32619 	/* 1Gb link speed (Full-duplex) */
32620 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_1GB \
32621 		UINT32_C(0x8)
32622 	/* 2Gb link speed */
32623 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_2GB \
32624 		UINT32_C(0x10)
32625 	/* 25Gb link speed */
32626 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_2_5GB \
32627 		UINT32_C(0x20)
32628 	/* 10Gb link speed */
32629 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_10GB \
32630 		UINT32_C(0x40)
32631 	/* 20Gb link speed */
32632 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_20GB \
32633 		UINT32_C(0x80)
32634 	/* 25Gb link speed */
32635 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_25GB \
32636 		UINT32_C(0x100)
32637 	/* 40Gb link speed */
32638 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_40GB \
32639 		UINT32_C(0x200)
32640 	/* 50Gb link speed */
32641 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_50GB \
32642 		UINT32_C(0x400)
32643 	/* 100Gb link speed */
32644 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_100GB \
32645 		UINT32_C(0x800)
32646 	/* 10Mb link speed (Half-duplex) */
32647 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_10MBHD \
32648 		UINT32_C(0x1000)
32649 	/* 10Mb link speed (Full-duplex) */
32650 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_FORCE_MODE_10MB \
32651 		UINT32_C(0x2000)
32652 	/*
32653 	 * This is a bit mask to indicate what speeds are supported
32654 	 * for autonegotiation on this link.
32655 	 * For each speed that can be autonegotiated on this link, the
32656 	 * corresponding mask bit shall be set to '1'.
32657 	 */
32658 	uint16_t	supported_speeds_auto_mode;
32659 	/* 100Mb link speed (Half-duplex) */
32660 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_100MBHD \
32661 		UINT32_C(0x1)
32662 	/* 100Mb link speed (Full-duplex) */
32663 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_100MB \
32664 		UINT32_C(0x2)
32665 	/* 1Gb link speed (Half-duplex) */
32666 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_1GBHD \
32667 		UINT32_C(0x4)
32668 	/* 1Gb link speed (Full-duplex) */
32669 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_1GB \
32670 		UINT32_C(0x8)
32671 	/* 2Gb link speed */
32672 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_2GB \
32673 		UINT32_C(0x10)
32674 	/* 25Gb link speed */
32675 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_2_5GB \
32676 		UINT32_C(0x20)
32677 	/* 10Gb link speed */
32678 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_10GB \
32679 		UINT32_C(0x40)
32680 	/* 20Gb link speed */
32681 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_20GB \
32682 		UINT32_C(0x80)
32683 	/* 25Gb link speed */
32684 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_25GB \
32685 		UINT32_C(0x100)
32686 	/* 40Gb link speed */
32687 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_40GB \
32688 		UINT32_C(0x200)
32689 	/* 50Gb link speed */
32690 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_50GB \
32691 		UINT32_C(0x400)
32692 	/* 100Gb link speed */
32693 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_100GB \
32694 		UINT32_C(0x800)
32695 	/* 10Mb link speed (Half-duplex) */
32696 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_10MBHD \
32697 		UINT32_C(0x1000)
32698 	/* 10Mb link speed (Full-duplex) */
32699 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_AUTO_MODE_10MB \
32700 		UINT32_C(0x2000)
32701 	/*
32702 	 * This is a bit mask to indicate what speeds are supported
32703 	 * for EEE on this link.
32704 	 * For each speed that can be autonegotiated when EEE is enabled
32705 	 * on this link, the corresponding mask bit shall be set to '1'.
32706 	 * This field is only valid when the eee_supported is set to '1'.
32707 	 */
32708 	uint16_t	supported_speeds_eee_mode;
32709 	/* Reserved */
32710 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD1 \
32711 		UINT32_C(0x1)
32712 	/* 100Mb link speed (Full-duplex) */
32713 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_100MB \
32714 		UINT32_C(0x2)
32715 	/* Reserved */
32716 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD2 \
32717 		UINT32_C(0x4)
32718 	/* 1Gb link speed (Full-duplex) */
32719 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_1GB \
32720 		UINT32_C(0x8)
32721 	/* Reserved */
32722 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD3 \
32723 		UINT32_C(0x10)
32724 	/* Reserved */
32725 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_RSVD4 \
32726 		UINT32_C(0x20)
32727 	/* 10Gb link speed */
32728 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS_EEE_MODE_10GB \
32729 		UINT32_C(0x40)
32730 	uint32_t	tx_lpi_timer_low;
32731 	/*
32732 	 * The lowest value of TX LPI timer that can be set on this link
32733 	 * when EEE is enabled. This value is in microseconds.
32734 	 * This field is valid only when_eee_supported is set to '1'.
32735 	 */
32736 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_LOW_MASK \
32737 		UINT32_C(0xffffff)
32738 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_LOW_SFT 0
32739 	/*
32740 	 * Reserved field. The HWRM shall set this field to 0.
32741 	 * An HWRM client shall ignore this field.
32742 	 */
32743 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD2_MASK \
32744 		UINT32_C(0xff000000)
32745 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD2_SFT            24
32746 	uint32_t	valid_tx_lpi_timer_high;
32747 	/*
32748 	 * The highest value of TX LPI timer that can be set on this link
32749 	 * when EEE is enabled. This value is in microseconds.
32750 	 * This field is valid only when_eee_supported is set to '1'.
32751 	 */
32752 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_HIGH_MASK \
32753 		UINT32_C(0xffffff)
32754 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_TX_LPI_TIMER_HIGH_SFT 0
32755 	/*
32756 	 * Reserved field. The HWRM shall set this field to 0.
32757 	 * An HWRM client shall ignore this field.
32758 	 */
32759 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD_MASK \
32760 		UINT32_C(0xff000000)
32761 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_RSVD_SFT              24
32762 	/*
32763 	 * This field is used to advertise which PAM4 speeds are supported
32764 	 * in auto mode.
32765 	 */
32766 	uint16_t	supported_pam4_speeds_auto_mode;
32767 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_AUTO_MODE_50G \
32768 		UINT32_C(0x1)
32769 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_AUTO_MODE_100G \
32770 		UINT32_C(0x2)
32771 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_AUTO_MODE_200G \
32772 		UINT32_C(0x4)
32773 	/*
32774 	 * This field is used to advertise which PAM4 speeds are supported
32775 	 * in forced mode.
32776 	 */
32777 	uint16_t	supported_pam4_speeds_force_mode;
32778 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_FORCE_MODE_50G \
32779 		UINT32_C(0x1)
32780 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_FORCE_MODE_100G \
32781 		UINT32_C(0x2)
32782 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_PAM4_SPEEDS_FORCE_MODE_200G \
32783 		UINT32_C(0x4)
32784 	/* More PHY capability flags */
32785 	uint16_t	flags2;
32786 	/*
32787 	 * If set to 1, then this field indicates that
32788 	 * 802.3x flow control is not supported.
32789 	 */
32790 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_PAUSE_UNSUPPORTED \
32791 		UINT32_C(0x1)
32792 	/*
32793 	 * If set to 1, then this field indicates that
32794 	 * priority-based flow control is not supported.
32795 	 */
32796 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_PFC_UNSUPPORTED \
32797 		UINT32_C(0x2)
32798 	/*
32799 	 * If set to 1, then this field indicates that
32800 	 * bank based addressing is supported in firmware.
32801 	 */
32802 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_BANK_ADDR_SUPPORTED \
32803 		UINT32_C(0x4)
32804 	/*
32805 	 * If set to 1, then this field indicates that
32806 	 * supported_speed2 field is to be used in lieu of all
32807 	 * supported_speed variants.
32808 	 */
32809 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_SPEEDS2_SUPPORTED \
32810 		UINT32_C(0x8)
32811 	/*
32812 	 * Number of internal ports for this device. This field allows the FW
32813 	 * to advertise how many internal ports are present. Manufacturing
32814 	 * tools uses this to determine how many internal ports should have
32815 	 * the PRBS test run on them. This field always return 0 unless NVM
32816 	 * option "HPTN_MODE" is set to 1.
32817 	 */
32818 	uint8_t	internal_port_cnt;
32819 	uint8_t	unused_0;
32820 	/*
32821 	 * This is a bit mask to indicate what speeds are supported
32822 	 * as forced speeds on this link.
32823 	 * For each speed that can be forced on this link, the
32824 	 * corresponding mask bit shall be set to '1'.
32825 	 * This field is valid only if speeds2_supported bit is set in flags2
32826 	 */
32827 	uint16_t	supported_speeds2_force_mode;
32828 	/* 1Gb link speed */
32829 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_1GB \
32830 		UINT32_C(0x1)
32831 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
32832 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_10GB \
32833 		UINT32_C(0x2)
32834 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
32835 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_25GB \
32836 		UINT32_C(0x4)
32837 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
32838 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_40GB \
32839 		UINT32_C(0x8)
32840 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
32841 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_50GB \
32842 		UINT32_C(0x10)
32843 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
32844 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_100GB \
32845 		UINT32_C(0x20)
32846 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
32847 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_50GB_PAM4_56 \
32848 		UINT32_C(0x40)
32849 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
32850 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_100GB_PAM4_56 \
32851 		UINT32_C(0x80)
32852 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
32853 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_200GB_PAM4_56 \
32854 		UINT32_C(0x100)
32855 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
32856 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_400GB_PAM4_56 \
32857 		UINT32_C(0x200)
32858 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
32859 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_100GB_PAM4_112 \
32860 		UINT32_C(0x400)
32861 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
32862 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_200GB_PAM4_112 \
32863 		UINT32_C(0x800)
32864 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
32865 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_400GB_PAM4_112 \
32866 		UINT32_C(0x1000)
32867 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
32868 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_FORCE_MODE_800GB_PAM4_112 \
32869 		UINT32_C(0x2000)
32870 	/*
32871 	 * This is a bit mask to indicate what speeds are supported
32872 	 * for autonegotiation on this link.
32873 	 * For each speed that can be autonegotiated on this link, the
32874 	 * corresponding mask bit shall be set to '1'.
32875 	 * This field is valid only if speeds2_supported bit is set in flags2
32876 	 */
32877 	uint16_t	supported_speeds2_auto_mode;
32878 	/* 1Gb link speed */
32879 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_1GB \
32880 		UINT32_C(0x1)
32881 	/* 10Gb (NRZ: 10G per lane, 1 lane) link speed */
32882 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_10GB \
32883 		UINT32_C(0x2)
32884 	/* 25Gb (NRZ: 25G per lane, 1 lane) link speed */
32885 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_25GB \
32886 		UINT32_C(0x4)
32887 	/* 40Gb (NRZ: 10G per lane, 4 lanes) link speed */
32888 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_40GB \
32889 		UINT32_C(0x8)
32890 	/* 50Gb (NRZ: 25G per lane, 2 lanes) link speed */
32891 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_50GB \
32892 		UINT32_C(0x10)
32893 	/* 100Gb (NRZ: 25G per lane, 4 lanes) link speed */
32894 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_100GB \
32895 		UINT32_C(0x20)
32896 	/* 50Gb (PAM4-56: 50G per lane, 1 lane) link speed */
32897 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_50GB_PAM4_56 \
32898 		UINT32_C(0x40)
32899 	/* 100Gb (PAM4-56: 50G per lane, 2 lanes) link speed */
32900 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_100GB_PAM4_56 \
32901 		UINT32_C(0x80)
32902 	/* 200Gb (PAM4-56: 50G per lane, 4 lanes) link speed */
32903 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_200GB_PAM4_56 \
32904 		UINT32_C(0x100)
32905 	/* 400Gb (PAM4-56: 50G per lane, 8 lanes) link speed */
32906 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_400GB_PAM4_56 \
32907 		UINT32_C(0x200)
32908 	/* 100Gb (PAM4-112: 100G per lane, 1 lane) link speed */
32909 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_100GB_PAM4_112 \
32910 		UINT32_C(0x400)
32911 	/* 200Gb (PAM4-112: 100G per lane, 2 lanes) link speed */
32912 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_200GB_PAM4_112 \
32913 		UINT32_C(0x800)
32914 	/* 400Gb (PAM4-112: 100G per lane, 4 lanes) link speed */
32915 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_400GB_PAM4_112 \
32916 		UINT32_C(0x1000)
32917 	/* 800Gb (PAM4-112: 100G per lane, 8 lanes) link speed */
32918 	#define HWRM_PORT_PHY_QCAPS_OUTPUT_SUPPORTED_SPEEDS2_AUTO_MODE_800GB_PAM4_112 \
32919 		UINT32_C(0x2000)
32920 	uint8_t	unused_1[3];
32921 	/*
32922 	 * This field is used in Output records to indicate that the output
32923 	 * is completely written to RAM. This field should be read as '1'
32924 	 * to indicate that the output has been completely written. When
32925 	 * writing a command completion or response to an internal processor,
32926 	 * the order of writes has to be such that this field is written last.
32927 	 */
32928 	uint8_t	valid;
32929 } __rte_packed_end;
32930 
32931 /****************************
32932  * hwrm_port_phy_mdio_write *
32933  ****************************/
32934 
32935 
32936 /* hwrm_port_phy_mdio_write_input (size:320b/40B) */
32937 struct __rte_packed_begin hwrm_port_phy_mdio_write_input {
32938 	/* The HWRM command request type. */
32939 	uint16_t	req_type;
32940 	/*
32941 	 * The completion ring to send the completion event on. This should
32942 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
32943 	 */
32944 	uint16_t	cmpl_ring;
32945 	/*
32946 	 * The sequence ID is used by the driver for tracking multiple
32947 	 * commands. This ID is treated as opaque data by the firmware and
32948 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
32949 	 */
32950 	uint16_t	seq_id;
32951 	/*
32952 	 * The target ID of the command:
32953 	 * * 0x0-0xFFF8 - The function ID
32954 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
32955 	 * * 0xFFFD - Reserved for user-space HWRM interface
32956 	 * * 0xFFFF - HWRM
32957 	 */
32958 	uint16_t	target_id;
32959 	/*
32960 	 * A physical address pointer pointing to a host buffer that the
32961 	 * command's response data will be written. This can be either a host
32962 	 * physical address (HPA) or a guest physical address (GPA) and must
32963 	 * point to a physically contiguous block of memory.
32964 	 */
32965 	uint64_t	resp_addr;
32966 	/* Reserved for future use. */
32967 	uint32_t	unused_0[2];
32968 	/* Port ID of port. */
32969 	uint16_t	port_id;
32970 	/* If phy_address is 0xFF, port_id will be used to derive phy_addr. */
32971 	uint8_t	phy_addr;
32972 	/* 8-bit device address. */
32973 	uint8_t	dev_addr;
32974 	/* 16-bit register address. */
32975 	uint16_t	reg_addr;
32976 	/* 16-bit register data. */
32977 	uint16_t	reg_data;
32978 	/*
32979 	 * When this bit is set to 1 a Clause 45 mdio access is done.
32980 	 * when this bit is set to 0 a Clause 22 mdio access is done.
32981 	 */
32982 	uint8_t	cl45_mdio;
32983 	/*  */
32984 	uint8_t	unused_1[7];
32985 } __rte_packed_end;
32986 
32987 /* hwrm_port_phy_mdio_write_output (size:128b/16B) */
32988 struct __rte_packed_begin hwrm_port_phy_mdio_write_output {
32989 	/* The specific error status for the command. */
32990 	uint16_t	error_code;
32991 	/* The HWRM command request type. */
32992 	uint16_t	req_type;
32993 	/* The sequence ID from the original command. */
32994 	uint16_t	seq_id;
32995 	/* The length of the response data in number of bytes. */
32996 	uint16_t	resp_len;
32997 	uint8_t	unused_0[7];
32998 	/*
32999 	 * This field is used in Output records to indicate that the output
33000 	 * is completely written to RAM. This field should be read as '1'
33001 	 * to indicate that the output has been completely written. When
33002 	 * writing a command completion or response to an internal processor,
33003 	 * the order of writes has to be such that this field is written last.
33004 	 */
33005 	uint8_t	valid;
33006 } __rte_packed_end;
33007 
33008 /***************************
33009  * hwrm_port_phy_mdio_read *
33010  ***************************/
33011 
33012 
33013 /* hwrm_port_phy_mdio_read_input (size:256b/32B) */
33014 struct __rte_packed_begin hwrm_port_phy_mdio_read_input {
33015 	/* The HWRM command request type. */
33016 	uint16_t	req_type;
33017 	/*
33018 	 * The completion ring to send the completion event on. This should
33019 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
33020 	 */
33021 	uint16_t	cmpl_ring;
33022 	/*
33023 	 * The sequence ID is used by the driver for tracking multiple
33024 	 * commands. This ID is treated as opaque data by the firmware and
33025 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33026 	 */
33027 	uint16_t	seq_id;
33028 	/*
33029 	 * The target ID of the command:
33030 	 * * 0x0-0xFFF8 - The function ID
33031 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33032 	 * * 0xFFFD - Reserved for user-space HWRM interface
33033 	 * * 0xFFFF - HWRM
33034 	 */
33035 	uint16_t	target_id;
33036 	/*
33037 	 * A physical address pointer pointing to a host buffer that the
33038 	 * command's response data will be written. This can be either a host
33039 	 * physical address (HPA) or a guest physical address (GPA) and must
33040 	 * point to a physically contiguous block of memory.
33041 	 */
33042 	uint64_t	resp_addr;
33043 	/* Reserved for future use. */
33044 	uint32_t	unused_0[2];
33045 	/* Port ID of port. */
33046 	uint16_t	port_id;
33047 	/* If phy_address is 0xFF, port_id will be used to derive phy_addr. */
33048 	uint8_t	phy_addr;
33049 	/* 8-bit device address. */
33050 	uint8_t	dev_addr;
33051 	/* 16-bit register address. */
33052 	uint16_t	reg_addr;
33053 	/*
33054 	 * When this bit is set to 1 a Clause 45 mdio access is done.
33055 	 * when this bit is set to 0 a Clause 22 mdio access is done.
33056 	 */
33057 	uint8_t	cl45_mdio;
33058 	/*  */
33059 	uint8_t	unused_1;
33060 } __rte_packed_end;
33061 
33062 /* hwrm_port_phy_mdio_read_output (size:128b/16B) */
33063 struct __rte_packed_begin hwrm_port_phy_mdio_read_output {
33064 	/* The specific error status for the command. */
33065 	uint16_t	error_code;
33066 	/* The HWRM command request type. */
33067 	uint16_t	req_type;
33068 	/* The sequence ID from the original command. */
33069 	uint16_t	seq_id;
33070 	/* The length of the response data in number of bytes. */
33071 	uint16_t	resp_len;
33072 	/* 16-bit register data. */
33073 	uint16_t	reg_data;
33074 	uint8_t	unused_0[5];
33075 	/*
33076 	 * This field is used in Output records to indicate that the output
33077 	 * is completely written to RAM. This field should be read as '1'
33078 	 * to indicate that the output has been completely written. When
33079 	 * writing a command completion or response to an internal processor,
33080 	 * the order of writes has to be such that this field is written last.
33081 	 */
33082 	uint8_t	valid;
33083 } __rte_packed_end;
33084 
33085 /*********************
33086  * hwrm_port_led_cfg *
33087  *********************/
33088 
33089 
33090 /* hwrm_port_led_cfg_input (size:512b/64B) */
33091 struct __rte_packed_begin hwrm_port_led_cfg_input {
33092 	/* The HWRM command request type. */
33093 	uint16_t	req_type;
33094 	/*
33095 	 * The completion ring to send the completion event on. This should
33096 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
33097 	 */
33098 	uint16_t	cmpl_ring;
33099 	/*
33100 	 * The sequence ID is used by the driver for tracking multiple
33101 	 * commands. This ID is treated as opaque data by the firmware and
33102 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33103 	 */
33104 	uint16_t	seq_id;
33105 	/*
33106 	 * The target ID of the command:
33107 	 * * 0x0-0xFFF8 - The function ID
33108 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33109 	 * * 0xFFFD - Reserved for user-space HWRM interface
33110 	 * * 0xFFFF - HWRM
33111 	 */
33112 	uint16_t	target_id;
33113 	/*
33114 	 * A physical address pointer pointing to a host buffer that the
33115 	 * command's response data will be written. This can be either a host
33116 	 * physical address (HPA) or a guest physical address (GPA) and must
33117 	 * point to a physically contiguous block of memory.
33118 	 */
33119 	uint64_t	resp_addr;
33120 	uint32_t	enables;
33121 	/*
33122 	 * This bit must be '1' for the led0_id field to be
33123 	 * configured.
33124 	 */
33125 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_ID \
33126 		UINT32_C(0x1)
33127 	/*
33128 	 * This bit must be '1' for the led0_state field to be
33129 	 * configured.
33130 	 */
33131 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_STATE \
33132 		UINT32_C(0x2)
33133 	/*
33134 	 * This bit must be '1' for the led0_color field to be
33135 	 * configured.
33136 	 */
33137 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_COLOR \
33138 		UINT32_C(0x4)
33139 	/*
33140 	 * This bit must be '1' for the led0_blink_on field to be
33141 	 * configured.
33142 	 */
33143 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_BLINK_ON \
33144 		UINT32_C(0x8)
33145 	/*
33146 	 * This bit must be '1' for the led0_blink_off field to be
33147 	 * configured.
33148 	 */
33149 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_BLINK_OFF \
33150 		UINT32_C(0x10)
33151 	/*
33152 	 * This bit must be '1' for the led0_group_id field to be
33153 	 * configured.
33154 	 */
33155 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED0_GROUP_ID \
33156 		UINT32_C(0x20)
33157 	/*
33158 	 * This bit must be '1' for the led1_id field to be
33159 	 * configured.
33160 	 */
33161 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_ID \
33162 		UINT32_C(0x40)
33163 	/*
33164 	 * This bit must be '1' for the led1_state field to be
33165 	 * configured.
33166 	 */
33167 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_STATE \
33168 		UINT32_C(0x80)
33169 	/*
33170 	 * This bit must be '1' for the led1_color field to be
33171 	 * configured.
33172 	 */
33173 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_COLOR \
33174 		UINT32_C(0x100)
33175 	/*
33176 	 * This bit must be '1' for the led1_blink_on field to be
33177 	 * configured.
33178 	 */
33179 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_BLINK_ON \
33180 		UINT32_C(0x200)
33181 	/*
33182 	 * This bit must be '1' for the led1_blink_off field to be
33183 	 * configured.
33184 	 */
33185 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_BLINK_OFF \
33186 		UINT32_C(0x400)
33187 	/*
33188 	 * This bit must be '1' for the led1_group_id field to be
33189 	 * configured.
33190 	 */
33191 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED1_GROUP_ID \
33192 		UINT32_C(0x800)
33193 	/*
33194 	 * This bit must be '1' for the led2_id field to be
33195 	 * configured.
33196 	 */
33197 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_ID \
33198 		UINT32_C(0x1000)
33199 	/*
33200 	 * This bit must be '1' for the led2_state field to be
33201 	 * configured.
33202 	 */
33203 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_STATE \
33204 		UINT32_C(0x2000)
33205 	/*
33206 	 * This bit must be '1' for the led2_color field to be
33207 	 * configured.
33208 	 */
33209 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_COLOR \
33210 		UINT32_C(0x4000)
33211 	/*
33212 	 * This bit must be '1' for the led2_blink_on field to be
33213 	 * configured.
33214 	 */
33215 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_BLINK_ON \
33216 		UINT32_C(0x8000)
33217 	/*
33218 	 * This bit must be '1' for the led2_blink_off field to be
33219 	 * configured.
33220 	 */
33221 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_BLINK_OFF \
33222 		UINT32_C(0x10000)
33223 	/*
33224 	 * This bit must be '1' for the led2_group_id field to be
33225 	 * configured.
33226 	 */
33227 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED2_GROUP_ID \
33228 		UINT32_C(0x20000)
33229 	/*
33230 	 * This bit must be '1' for the led3_id field to be
33231 	 * configured.
33232 	 */
33233 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_ID \
33234 		UINT32_C(0x40000)
33235 	/*
33236 	 * This bit must be '1' for the led3_state field to be
33237 	 * configured.
33238 	 */
33239 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_STATE \
33240 		UINT32_C(0x80000)
33241 	/*
33242 	 * This bit must be '1' for the led3_color field to be
33243 	 * configured.
33244 	 */
33245 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_COLOR \
33246 		UINT32_C(0x100000)
33247 	/*
33248 	 * This bit must be '1' for the led3_blink_on field to be
33249 	 * configured.
33250 	 */
33251 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_BLINK_ON \
33252 		UINT32_C(0x200000)
33253 	/*
33254 	 * This bit must be '1' for the led3_blink_off field to be
33255 	 * configured.
33256 	 */
33257 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_BLINK_OFF \
33258 		UINT32_C(0x400000)
33259 	/*
33260 	 * This bit must be '1' for the led3_group_id field to be
33261 	 * configured.
33262 	 */
33263 	#define HWRM_PORT_LED_CFG_INPUT_ENABLES_LED3_GROUP_ID \
33264 		UINT32_C(0x800000)
33265 	/* Port ID of port whose LEDs are configured. */
33266 	uint16_t	port_id;
33267 	/*
33268 	 * The number of LEDs that are being configured.
33269 	 * Up to 4 LEDs can be configured with this command.
33270 	 */
33271 	uint8_t	num_leds;
33272 	/* Reserved field. */
33273 	uint8_t	rsvd;
33274 	/* An identifier for the LED #0. */
33275 	uint8_t	led0_id;
33276 	/* The requested state of the LED #0. */
33277 	uint8_t	led0_state;
33278 	/* Default state of the LED */
33279 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_DEFAULT  UINT32_C(0x0)
33280 	/* Off */
33281 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_OFF      UINT32_C(0x1)
33282 	/* On */
33283 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_ON       UINT32_C(0x2)
33284 	/* Blink */
33285 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_BLINK    UINT32_C(0x3)
33286 	/* Blink Alternately */
33287 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_BLINKALT UINT32_C(0x4)
33288 	#define HWRM_PORT_LED_CFG_INPUT_LED0_STATE_LAST \
33289 		HWRM_PORT_LED_CFG_INPUT_LED0_STATE_BLINKALT
33290 	/* The requested color of LED #0. */
33291 	uint8_t	led0_color;
33292 	/* Default */
33293 	#define HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_DEFAULT    UINT32_C(0x0)
33294 	/* Amber */
33295 	#define HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_AMBER      UINT32_C(0x1)
33296 	/* Green */
33297 	#define HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_GREEN      UINT32_C(0x2)
33298 	/* Green or Amber */
33299 	#define HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_GREENAMBER UINT32_C(0x3)
33300 	#define HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_LAST \
33301 		HWRM_PORT_LED_CFG_INPUT_LED0_COLOR_GREENAMBER
33302 	uint8_t	unused_0;
33303 	/*
33304 	 * If the LED #0 state is "blink" or "blinkalt", then
33305 	 * this field represents the requested time in milliseconds
33306 	 * to keep LED on between cycles.
33307 	 */
33308 	uint16_t	led0_blink_on;
33309 	/*
33310 	 * If the LED #0 state is "blink" or "blinkalt", then
33311 	 * this field represents the requested time in milliseconds
33312 	 * to keep LED off between cycles.
33313 	 */
33314 	uint16_t	led0_blink_off;
33315 	/*
33316 	 * An identifier for the group of LEDs that LED #0 belongs
33317 	 * to.
33318 	 * If set to 0, then the LED #0 shall not be grouped and
33319 	 * shall be treated as an individual resource.
33320 	 * For all other non-zero values of this field, LED #0 shall
33321 	 * be grouped together with the LEDs with the same group ID
33322 	 * value.
33323 	 */
33324 	uint8_t	led0_group_id;
33325 	/* Reserved field. */
33326 	uint8_t	rsvd0;
33327 	/* An identifier for the LED #1. */
33328 	uint8_t	led1_id;
33329 	/* The requested state of the LED #1. */
33330 	uint8_t	led1_state;
33331 	/* Default state of the LED */
33332 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_DEFAULT  UINT32_C(0x0)
33333 	/* Off */
33334 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_OFF      UINT32_C(0x1)
33335 	/* On */
33336 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_ON       UINT32_C(0x2)
33337 	/* Blink */
33338 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_BLINK    UINT32_C(0x3)
33339 	/* Blink Alternately */
33340 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_BLINKALT UINT32_C(0x4)
33341 	#define HWRM_PORT_LED_CFG_INPUT_LED1_STATE_LAST \
33342 		HWRM_PORT_LED_CFG_INPUT_LED1_STATE_BLINKALT
33343 	/* The requested color of LED #1. */
33344 	uint8_t	led1_color;
33345 	/* Default */
33346 	#define HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_DEFAULT    UINT32_C(0x0)
33347 	/* Amber */
33348 	#define HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_AMBER      UINT32_C(0x1)
33349 	/* Green */
33350 	#define HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_GREEN      UINT32_C(0x2)
33351 	/* Green or Amber */
33352 	#define HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_GREENAMBER UINT32_C(0x3)
33353 	#define HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_LAST \
33354 		HWRM_PORT_LED_CFG_INPUT_LED1_COLOR_GREENAMBER
33355 	uint8_t	unused_1;
33356 	/*
33357 	 * If the LED #1 state is "blink" or "blinkalt", then
33358 	 * this field represents the requested time in milliseconds
33359 	 * to keep LED on between cycles.
33360 	 */
33361 	uint16_t	led1_blink_on;
33362 	/*
33363 	 * If the LED #1 state is "blink" or "blinkalt", then
33364 	 * this field represents the requested time in milliseconds
33365 	 * to keep LED off between cycles.
33366 	 */
33367 	uint16_t	led1_blink_off;
33368 	/*
33369 	 * An identifier for the group of LEDs that LED #1 belongs
33370 	 * to.
33371 	 * If set to 0, then the LED #1 shall not be grouped and
33372 	 * shall be treated as an individual resource.
33373 	 * For all other non-zero values of this field, LED #1 shall
33374 	 * be grouped together with the LEDs with the same group ID
33375 	 * value.
33376 	 */
33377 	uint8_t	led1_group_id;
33378 	/* Reserved field. */
33379 	uint8_t	rsvd1;
33380 	/* An identifier for the LED #2. */
33381 	uint8_t	led2_id;
33382 	/* The requested state of the LED #2. */
33383 	uint8_t	led2_state;
33384 	/* Default state of the LED */
33385 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_DEFAULT  UINT32_C(0x0)
33386 	/* Off */
33387 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_OFF      UINT32_C(0x1)
33388 	/* On */
33389 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_ON       UINT32_C(0x2)
33390 	/* Blink */
33391 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_BLINK    UINT32_C(0x3)
33392 	/* Blink Alternately */
33393 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_BLINKALT UINT32_C(0x4)
33394 	#define HWRM_PORT_LED_CFG_INPUT_LED2_STATE_LAST \
33395 		HWRM_PORT_LED_CFG_INPUT_LED2_STATE_BLINKALT
33396 	/* The requested color of LED #2. */
33397 	uint8_t	led2_color;
33398 	/* Default */
33399 	#define HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_DEFAULT    UINT32_C(0x0)
33400 	/* Amber */
33401 	#define HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_AMBER      UINT32_C(0x1)
33402 	/* Green */
33403 	#define HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_GREEN      UINT32_C(0x2)
33404 	/* Green or Amber */
33405 	#define HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_GREENAMBER UINT32_C(0x3)
33406 	#define HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_LAST \
33407 		HWRM_PORT_LED_CFG_INPUT_LED2_COLOR_GREENAMBER
33408 	uint8_t	unused_2;
33409 	/*
33410 	 * If the LED #2 state is "blink" or "blinkalt", then
33411 	 * this field represents the requested time in milliseconds
33412 	 * to keep LED on between cycles.
33413 	 */
33414 	uint16_t	led2_blink_on;
33415 	/*
33416 	 * If the LED #2 state is "blink" or "blinkalt", then
33417 	 * this field represents the requested time in milliseconds
33418 	 * to keep LED off between cycles.
33419 	 */
33420 	uint16_t	led2_blink_off;
33421 	/*
33422 	 * An identifier for the group of LEDs that LED #2 belongs
33423 	 * to.
33424 	 * If set to 0, then the LED #2 shall not be grouped and
33425 	 * shall be treated as an individual resource.
33426 	 * For all other non-zero values of this field, LED #2 shall
33427 	 * be grouped together with the LEDs with the same group ID
33428 	 * value.
33429 	 */
33430 	uint8_t	led2_group_id;
33431 	/* Reserved field. */
33432 	uint8_t	rsvd2;
33433 	/* An identifier for the LED #3. */
33434 	uint8_t	led3_id;
33435 	/* The requested state of the LED #3. */
33436 	uint8_t	led3_state;
33437 	/* Default state of the LED */
33438 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_DEFAULT  UINT32_C(0x0)
33439 	/* Off */
33440 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_OFF      UINT32_C(0x1)
33441 	/* On */
33442 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_ON       UINT32_C(0x2)
33443 	/* Blink */
33444 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_BLINK    UINT32_C(0x3)
33445 	/* Blink Alternately */
33446 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_BLINKALT UINT32_C(0x4)
33447 	#define HWRM_PORT_LED_CFG_INPUT_LED3_STATE_LAST \
33448 		HWRM_PORT_LED_CFG_INPUT_LED3_STATE_BLINKALT
33449 	/* The requested color of LED #3. */
33450 	uint8_t	led3_color;
33451 	/* Default */
33452 	#define HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_DEFAULT    UINT32_C(0x0)
33453 	/* Amber */
33454 	#define HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_AMBER      UINT32_C(0x1)
33455 	/* Green */
33456 	#define HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_GREEN      UINT32_C(0x2)
33457 	/* Green or Amber */
33458 	#define HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_GREENAMBER UINT32_C(0x3)
33459 	#define HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_LAST \
33460 		HWRM_PORT_LED_CFG_INPUT_LED3_COLOR_GREENAMBER
33461 	uint8_t	unused_3;
33462 	/*
33463 	 * If the LED #3 state is "blink" or "blinkalt", then
33464 	 * this field represents the requested time in milliseconds
33465 	 * to keep LED on between cycles.
33466 	 */
33467 	uint16_t	led3_blink_on;
33468 	/*
33469 	 * If the LED #3 state is "blink" or "blinkalt", then
33470 	 * this field represents the requested time in milliseconds
33471 	 * to keep LED off between cycles.
33472 	 */
33473 	uint16_t	led3_blink_off;
33474 	/*
33475 	 * An identifier for the group of LEDs that LED #3 belongs
33476 	 * to.
33477 	 * If set to 0, then the LED #3 shall not be grouped and
33478 	 * shall be treated as an individual resource.
33479 	 * For all other non-zero values of this field, LED #3 shall
33480 	 * be grouped together with the LEDs with the same group ID
33481 	 * value.
33482 	 */
33483 	uint8_t	led3_group_id;
33484 	/* Reserved field. */
33485 	uint8_t	rsvd3;
33486 } __rte_packed_end;
33487 
33488 /* hwrm_port_led_cfg_output (size:128b/16B) */
33489 struct __rte_packed_begin hwrm_port_led_cfg_output {
33490 	/* The specific error status for the command. */
33491 	uint16_t	error_code;
33492 	/* The HWRM command request type. */
33493 	uint16_t	req_type;
33494 	/* The sequence ID from the original command. */
33495 	uint16_t	seq_id;
33496 	/* The length of the response data in number of bytes. */
33497 	uint16_t	resp_len;
33498 	uint8_t	unused_0[7];
33499 	/*
33500 	 * This field is used in Output records to indicate that the output
33501 	 * is completely written to RAM. This field should be read as '1'
33502 	 * to indicate that the output has been completely written. When
33503 	 * writing a command completion or response to an internal processor,
33504 	 * the order of writes has to be such that this field is written last.
33505 	 */
33506 	uint8_t	valid;
33507 } __rte_packed_end;
33508 
33509 /**********************
33510  * hwrm_port_led_qcfg *
33511  **********************/
33512 
33513 
33514 /* hwrm_port_led_qcfg_input (size:192b/24B) */
33515 struct __rte_packed_begin hwrm_port_led_qcfg_input {
33516 	/* The HWRM command request type. */
33517 	uint16_t	req_type;
33518 	/*
33519 	 * The completion ring to send the completion event on. This should
33520 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
33521 	 */
33522 	uint16_t	cmpl_ring;
33523 	/*
33524 	 * The sequence ID is used by the driver for tracking multiple
33525 	 * commands. This ID is treated as opaque data by the firmware and
33526 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33527 	 */
33528 	uint16_t	seq_id;
33529 	/*
33530 	 * The target ID of the command:
33531 	 * * 0x0-0xFFF8 - The function ID
33532 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33533 	 * * 0xFFFD - Reserved for user-space HWRM interface
33534 	 * * 0xFFFF - HWRM
33535 	 */
33536 	uint16_t	target_id;
33537 	/*
33538 	 * A physical address pointer pointing to a host buffer that the
33539 	 * command's response data will be written. This can be either a host
33540 	 * physical address (HPA) or a guest physical address (GPA) and must
33541 	 * point to a physically contiguous block of memory.
33542 	 */
33543 	uint64_t	resp_addr;
33544 	/* Port ID of port whose LED configuration is being queried. */
33545 	uint16_t	port_id;
33546 	uint8_t	unused_0[6];
33547 } __rte_packed_end;
33548 
33549 /* hwrm_port_led_qcfg_output (size:448b/56B) */
33550 struct __rte_packed_begin hwrm_port_led_qcfg_output {
33551 	/* The specific error status for the command. */
33552 	uint16_t	error_code;
33553 	/* The HWRM command request type. */
33554 	uint16_t	req_type;
33555 	/* The sequence ID from the original command. */
33556 	uint16_t	seq_id;
33557 	/* The length of the response data in number of bytes. */
33558 	uint16_t	resp_len;
33559 	/*
33560 	 * The number of LEDs that are configured on this port.
33561 	 * Up to 4 LEDs can be returned in the response.
33562 	 */
33563 	uint8_t	num_leds;
33564 	/* An identifier for the LED #0. */
33565 	uint8_t	led0_id;
33566 	/* The type of LED #0. */
33567 	uint8_t	led0_type;
33568 	/* Speed LED */
33569 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_TYPE_SPEED    UINT32_C(0x0)
33570 	/* Activity LED */
33571 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_TYPE_ACTIVITY UINT32_C(0x1)
33572 	/* Invalid */
33573 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_TYPE_INVALID  UINT32_C(0xff)
33574 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_TYPE_LAST \
33575 		HWRM_PORT_LED_QCFG_OUTPUT_LED0_TYPE_INVALID
33576 	/* The current state of the LED #0. */
33577 	uint8_t	led0_state;
33578 	/* Default state of the LED */
33579 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_DEFAULT  UINT32_C(0x0)
33580 	/* Off */
33581 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_OFF      UINT32_C(0x1)
33582 	/* On */
33583 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_ON       UINT32_C(0x2)
33584 	/* Blink */
33585 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_BLINK    UINT32_C(0x3)
33586 	/* Blink Alternately */
33587 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_BLINKALT UINT32_C(0x4)
33588 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_LAST \
33589 		HWRM_PORT_LED_QCFG_OUTPUT_LED0_STATE_BLINKALT
33590 	/* The color of LED #0. */
33591 	uint8_t	led0_color;
33592 	/* Default */
33593 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_DEFAULT    UINT32_C(0x0)
33594 	/* Amber */
33595 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_AMBER      UINT32_C(0x1)
33596 	/* Green */
33597 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_GREEN      UINT32_C(0x2)
33598 	/* Green or Amber */
33599 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_GREENAMBER UINT32_C(0x3)
33600 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_LAST \
33601 		HWRM_PORT_LED_QCFG_OUTPUT_LED0_COLOR_GREENAMBER
33602 	uint8_t	unused_0;
33603 	/*
33604 	 * If the LED #0 state is "blink" or "blinkalt", then
33605 	 * this field represents the requested time in milliseconds
33606 	 * to keep LED on between cycles.
33607 	 */
33608 	uint16_t	led0_blink_on;
33609 	/*
33610 	 * If the LED #0 state is "blink" or "blinkalt", then
33611 	 * this field represents the requested time in milliseconds
33612 	 * to keep LED off between cycles.
33613 	 */
33614 	uint16_t	led0_blink_off;
33615 	/*
33616 	 * An identifier for the group of LEDs that LED #0 belongs
33617 	 * to.
33618 	 * If set to 0, then the LED #0 is not grouped.
33619 	 * For all other non-zero values of this field, LED #0 is
33620 	 * grouped together with the LEDs with the same group ID
33621 	 * value.
33622 	 */
33623 	uint8_t	led0_group_id;
33624 	/* An identifier for the LED #1. */
33625 	uint8_t	led1_id;
33626 	/* The type of LED #1. */
33627 	uint8_t	led1_type;
33628 	/* Speed LED */
33629 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_TYPE_SPEED    UINT32_C(0x0)
33630 	/* Activity LED */
33631 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_TYPE_ACTIVITY UINT32_C(0x1)
33632 	/* Invalid */
33633 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_TYPE_INVALID  UINT32_C(0xff)
33634 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_TYPE_LAST \
33635 		HWRM_PORT_LED_QCFG_OUTPUT_LED1_TYPE_INVALID
33636 	/* The current state of the LED #1. */
33637 	uint8_t	led1_state;
33638 	/* Default state of the LED */
33639 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_DEFAULT  UINT32_C(0x0)
33640 	/* Off */
33641 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_OFF      UINT32_C(0x1)
33642 	/* On */
33643 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_ON       UINT32_C(0x2)
33644 	/* Blink */
33645 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_BLINK    UINT32_C(0x3)
33646 	/* Blink Alternately */
33647 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_BLINKALT UINT32_C(0x4)
33648 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_LAST \
33649 		HWRM_PORT_LED_QCFG_OUTPUT_LED1_STATE_BLINKALT
33650 	/* The color of LED #1. */
33651 	uint8_t	led1_color;
33652 	/* Default */
33653 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_DEFAULT    UINT32_C(0x0)
33654 	/* Amber */
33655 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_AMBER      UINT32_C(0x1)
33656 	/* Green */
33657 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_GREEN      UINT32_C(0x2)
33658 	/* Green or Amber */
33659 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_GREENAMBER UINT32_C(0x3)
33660 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_LAST \
33661 		HWRM_PORT_LED_QCFG_OUTPUT_LED1_COLOR_GREENAMBER
33662 	uint8_t	unused_1;
33663 	/*
33664 	 * If the LED #1 state is "blink" or "blinkalt", then
33665 	 * this field represents the requested time in milliseconds
33666 	 * to keep LED on between cycles.
33667 	 */
33668 	uint16_t	led1_blink_on;
33669 	/*
33670 	 * If the LED #1 state is "blink" or "blinkalt", then
33671 	 * this field represents the requested time in milliseconds
33672 	 * to keep LED off between cycles.
33673 	 */
33674 	uint16_t	led1_blink_off;
33675 	/*
33676 	 * An identifier for the group of LEDs that LED #1 belongs
33677 	 * to.
33678 	 * If set to 0, then the LED #1 is not grouped.
33679 	 * For all other non-zero values of this field, LED #1 is
33680 	 * grouped together with the LEDs with the same group ID
33681 	 * value.
33682 	 */
33683 	uint8_t	led1_group_id;
33684 	/* An identifier for the LED #2. */
33685 	uint8_t	led2_id;
33686 	/* The type of LED #2. */
33687 	uint8_t	led2_type;
33688 	/* Speed LED */
33689 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_TYPE_SPEED    UINT32_C(0x0)
33690 	/* Activity LED */
33691 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_TYPE_ACTIVITY UINT32_C(0x1)
33692 	/* Invalid */
33693 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_TYPE_INVALID  UINT32_C(0xff)
33694 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_TYPE_LAST \
33695 		HWRM_PORT_LED_QCFG_OUTPUT_LED2_TYPE_INVALID
33696 	/* The current state of the LED #2. */
33697 	uint8_t	led2_state;
33698 	/* Default state of the LED */
33699 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_DEFAULT  UINT32_C(0x0)
33700 	/* Off */
33701 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_OFF      UINT32_C(0x1)
33702 	/* On */
33703 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_ON       UINT32_C(0x2)
33704 	/* Blink */
33705 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_BLINK    UINT32_C(0x3)
33706 	/* Blink Alternately */
33707 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_BLINKALT UINT32_C(0x4)
33708 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_LAST \
33709 		HWRM_PORT_LED_QCFG_OUTPUT_LED2_STATE_BLINKALT
33710 	/* The color of LED #2. */
33711 	uint8_t	led2_color;
33712 	/* Default */
33713 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_DEFAULT    UINT32_C(0x0)
33714 	/* Amber */
33715 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_AMBER      UINT32_C(0x1)
33716 	/* Green */
33717 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_GREEN      UINT32_C(0x2)
33718 	/* Green or Amber */
33719 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_GREENAMBER UINT32_C(0x3)
33720 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_LAST \
33721 		HWRM_PORT_LED_QCFG_OUTPUT_LED2_COLOR_GREENAMBER
33722 	uint8_t	unused_2;
33723 	/*
33724 	 * If the LED #2 state is "blink" or "blinkalt", then
33725 	 * this field represents the requested time in milliseconds
33726 	 * to keep LED on between cycles.
33727 	 */
33728 	uint16_t	led2_blink_on;
33729 	/*
33730 	 * If the LED #2 state is "blink" or "blinkalt", then
33731 	 * this field represents the requested time in milliseconds
33732 	 * to keep LED off between cycles.
33733 	 */
33734 	uint16_t	led2_blink_off;
33735 	/*
33736 	 * An identifier for the group of LEDs that LED #2 belongs
33737 	 * to.
33738 	 * If set to 0, then the LED #2 is not grouped.
33739 	 * For all other non-zero values of this field, LED #2 is
33740 	 * grouped together with the LEDs with the same group ID
33741 	 * value.
33742 	 */
33743 	uint8_t	led2_group_id;
33744 	/* An identifier for the LED #3. */
33745 	uint8_t	led3_id;
33746 	/* The type of LED #3. */
33747 	uint8_t	led3_type;
33748 	/* Speed LED */
33749 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_TYPE_SPEED    UINT32_C(0x0)
33750 	/* Activity LED */
33751 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_TYPE_ACTIVITY UINT32_C(0x1)
33752 	/* Invalid */
33753 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_TYPE_INVALID  UINT32_C(0xff)
33754 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_TYPE_LAST \
33755 		HWRM_PORT_LED_QCFG_OUTPUT_LED3_TYPE_INVALID
33756 	/* The current state of the LED #3. */
33757 	uint8_t	led3_state;
33758 	/* Default state of the LED */
33759 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_DEFAULT  UINT32_C(0x0)
33760 	/* Off */
33761 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_OFF      UINT32_C(0x1)
33762 	/* On */
33763 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_ON       UINT32_C(0x2)
33764 	/* Blink */
33765 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_BLINK    UINT32_C(0x3)
33766 	/* Blink Alternately */
33767 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_BLINKALT UINT32_C(0x4)
33768 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_LAST \
33769 		HWRM_PORT_LED_QCFG_OUTPUT_LED3_STATE_BLINKALT
33770 	/* The color of LED #3. */
33771 	uint8_t	led3_color;
33772 	/* Default */
33773 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_DEFAULT    UINT32_C(0x0)
33774 	/* Amber */
33775 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_AMBER      UINT32_C(0x1)
33776 	/* Green */
33777 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_GREEN      UINT32_C(0x2)
33778 	/* Green or Amber */
33779 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_GREENAMBER UINT32_C(0x3)
33780 	#define HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_LAST \
33781 		HWRM_PORT_LED_QCFG_OUTPUT_LED3_COLOR_GREENAMBER
33782 	uint8_t	unused_3;
33783 	/*
33784 	 * If the LED #3 state is "blink" or "blinkalt", then
33785 	 * this field represents the requested time in milliseconds
33786 	 * to keep LED on between cycles.
33787 	 */
33788 	uint16_t	led3_blink_on;
33789 	/*
33790 	 * If the LED #3 state is "blink" or "blinkalt", then
33791 	 * this field represents the requested time in milliseconds
33792 	 * to keep LED off between cycles.
33793 	 */
33794 	uint16_t	led3_blink_off;
33795 	/*
33796 	 * An identifier for the group of LEDs that LED #3 belongs
33797 	 * to.
33798 	 * If set to 0, then the LED #3 is not grouped.
33799 	 * For all other non-zero values of this field, LED #3 is
33800 	 * grouped together with the LEDs with the same group ID
33801 	 * value.
33802 	 */
33803 	uint8_t	led3_group_id;
33804 	uint8_t	unused_4[6];
33805 	/*
33806 	 * This field is used in Output records to indicate that the output
33807 	 * is completely written to RAM. This field should be read as '1'
33808 	 * to indicate that the output has been completely written. When
33809 	 * writing a command completion or response to an internal processor,
33810 	 * the order of writes has to be such that this field is written last.
33811 	 */
33812 	uint8_t	valid;
33813 } __rte_packed_end;
33814 
33815 /***********************
33816  * hwrm_port_led_qcaps *
33817  ***********************/
33818 
33819 
33820 /* hwrm_port_led_qcaps_input (size:192b/24B) */
33821 struct __rte_packed_begin hwrm_port_led_qcaps_input {
33822 	/* The HWRM command request type. */
33823 	uint16_t	req_type;
33824 	/*
33825 	 * The completion ring to send the completion event on. This should
33826 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
33827 	 */
33828 	uint16_t	cmpl_ring;
33829 	/*
33830 	 * The sequence ID is used by the driver for tracking multiple
33831 	 * commands. This ID is treated as opaque data by the firmware and
33832 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
33833 	 */
33834 	uint16_t	seq_id;
33835 	/*
33836 	 * The target ID of the command:
33837 	 * * 0x0-0xFFF8 - The function ID
33838 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
33839 	 * * 0xFFFD - Reserved for user-space HWRM interface
33840 	 * * 0xFFFF - HWRM
33841 	 */
33842 	uint16_t	target_id;
33843 	/*
33844 	 * A physical address pointer pointing to a host buffer that the
33845 	 * command's response data will be written. This can be either a host
33846 	 * physical address (HPA) or a guest physical address (GPA) and must
33847 	 * point to a physically contiguous block of memory.
33848 	 */
33849 	uint64_t	resp_addr;
33850 	/* Port ID of port whose LED configuration is being queried. */
33851 	uint16_t	port_id;
33852 	uint8_t	unused_0[6];
33853 } __rte_packed_end;
33854 
33855 /* hwrm_port_led_qcaps_output (size:384b/48B) */
33856 struct __rte_packed_begin hwrm_port_led_qcaps_output {
33857 	/* The specific error status for the command. */
33858 	uint16_t	error_code;
33859 	/* The HWRM command request type. */
33860 	uint16_t	req_type;
33861 	/* The sequence ID from the original command. */
33862 	uint16_t	seq_id;
33863 	/* The length of the response data in number of bytes. */
33864 	uint16_t	resp_len;
33865 	/*
33866 	 * The number of LEDs that are configured on this port.
33867 	 * Up to 4 LEDs can be returned in the response.
33868 	 */
33869 	uint8_t	num_leds;
33870 	/* Reserved for future use. */
33871 	uint8_t	unused[3];
33872 	/* An identifier for the LED #0. */
33873 	uint8_t	led0_id;
33874 	/* The type of LED #0. */
33875 	uint8_t	led0_type;
33876 	/* Speed LED */
33877 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_TYPE_SPEED    UINT32_C(0x0)
33878 	/* Activity LED */
33879 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_TYPE_ACTIVITY UINT32_C(0x1)
33880 	/* Invalid */
33881 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_TYPE_INVALID  UINT32_C(0xff)
33882 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_TYPE_LAST \
33883 		HWRM_PORT_LED_QCAPS_OUTPUT_LED0_TYPE_INVALID
33884 	/*
33885 	 * An identifier for the group of LEDs that LED #0 belongs
33886 	 * to.
33887 	 * If set to 0, then the LED #0 cannot be grouped.
33888 	 * For all other non-zero values of this field, LED #0 is
33889 	 * grouped together with the LEDs with the same group ID
33890 	 * value.
33891 	 */
33892 	uint8_t	led0_group_id;
33893 	uint8_t	unused_0;
33894 	/* The states supported by LED #0. */
33895 	uint16_t	led0_state_caps;
33896 	/*
33897 	 * If set to 1, this LED is enabled.
33898 	 * If set to 0, this LED is disabled.
33899 	 */
33900 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_STATE_CAPS_ENABLED \
33901 		UINT32_C(0x1)
33902 	/*
33903 	 * If set to 1, off state is supported on this LED.
33904 	 * If set to 0, off state is not supported on this LED.
33905 	 */
33906 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_STATE_CAPS_OFF_SUPPORTED \
33907 		UINT32_C(0x2)
33908 	/*
33909 	 * If set to 1, on state is supported on this LED.
33910 	 * If set to 0, on state is not supported on this LED.
33911 	 */
33912 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_STATE_CAPS_ON_SUPPORTED \
33913 		UINT32_C(0x4)
33914 	/*
33915 	 * If set to 1, blink state is supported on this LED.
33916 	 * If set to 0, blink state is not supported on this LED.
33917 	 */
33918 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_STATE_CAPS_BLINK_SUPPORTED \
33919 		UINT32_C(0x8)
33920 	/*
33921 	 * If set to 1, blink_alt state is supported on this LED.
33922 	 * If set to 0, blink_alt state is not supported on this LED.
33923 	 */
33924 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_STATE_CAPS_BLINK_ALT_SUPPORTED \
33925 		UINT32_C(0x10)
33926 	/* The colors supported by LED #0. */
33927 	uint16_t	led0_color_caps;
33928 	/* reserved. */
33929 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_COLOR_CAPS_RSVD \
33930 		UINT32_C(0x1)
33931 	/*
33932 	 * If set to 1, Amber color is supported on this LED.
33933 	 * If set to 0, Amber color is not supported on this LED.
33934 	 */
33935 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_COLOR_CAPS_AMBER_SUPPORTED \
33936 		UINT32_C(0x2)
33937 	/*
33938 	 * If set to 1, Green color is supported on this LED.
33939 	 * If set to 0, Green color is not supported on this LED.
33940 	 */
33941 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED0_COLOR_CAPS_GREEN_SUPPORTED \
33942 		UINT32_C(0x4)
33943 	/* An identifier for the LED #1. */
33944 	uint8_t	led1_id;
33945 	/* The type of LED #1. */
33946 	uint8_t	led1_type;
33947 	/* Speed LED */
33948 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_TYPE_SPEED    UINT32_C(0x0)
33949 	/* Activity LED */
33950 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_TYPE_ACTIVITY UINT32_C(0x1)
33951 	/* Invalid */
33952 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_TYPE_INVALID  UINT32_C(0xff)
33953 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_TYPE_LAST \
33954 		HWRM_PORT_LED_QCAPS_OUTPUT_LED1_TYPE_INVALID
33955 	/*
33956 	 * An identifier for the group of LEDs that LED #1 belongs
33957 	 * to.
33958 	 * If set to 0, then the LED #0 cannot be grouped.
33959 	 * For all other non-zero values of this field, LED #0 is
33960 	 * grouped together with the LEDs with the same group ID
33961 	 * value.
33962 	 */
33963 	uint8_t	led1_group_id;
33964 	uint8_t	unused_1;
33965 	/* The states supported by LED #1. */
33966 	uint16_t	led1_state_caps;
33967 	/*
33968 	 * If set to 1, this LED is enabled.
33969 	 * If set to 0, this LED is disabled.
33970 	 */
33971 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_STATE_CAPS_ENABLED \
33972 		UINT32_C(0x1)
33973 	/*
33974 	 * If set to 1, off state is supported on this LED.
33975 	 * If set to 0, off state is not supported on this LED.
33976 	 */
33977 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_STATE_CAPS_OFF_SUPPORTED \
33978 		UINT32_C(0x2)
33979 	/*
33980 	 * If set to 1, on state is supported on this LED.
33981 	 * If set to 0, on state is not supported on this LED.
33982 	 */
33983 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_STATE_CAPS_ON_SUPPORTED \
33984 		UINT32_C(0x4)
33985 	/*
33986 	 * If set to 1, blink state is supported on this LED.
33987 	 * If set to 0, blink state is not supported on this LED.
33988 	 */
33989 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_STATE_CAPS_BLINK_SUPPORTED \
33990 		UINT32_C(0x8)
33991 	/*
33992 	 * If set to 1, blink_alt state is supported on this LED.
33993 	 * If set to 0, blink_alt state is not supported on this LED.
33994 	 */
33995 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_STATE_CAPS_BLINK_ALT_SUPPORTED \
33996 		UINT32_C(0x10)
33997 	/* The colors supported by LED #1. */
33998 	uint16_t	led1_color_caps;
33999 	/* reserved. */
34000 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_COLOR_CAPS_RSVD \
34001 		UINT32_C(0x1)
34002 	/*
34003 	 * If set to 1, Amber color is supported on this LED.
34004 	 * If set to 0, Amber color is not supported on this LED.
34005 	 */
34006 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_COLOR_CAPS_AMBER_SUPPORTED \
34007 		UINT32_C(0x2)
34008 	/*
34009 	 * If set to 1, Green color is supported on this LED.
34010 	 * If set to 0, Green color is not supported on this LED.
34011 	 */
34012 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED1_COLOR_CAPS_GREEN_SUPPORTED \
34013 		UINT32_C(0x4)
34014 	/* An identifier for the LED #2. */
34015 	uint8_t	led2_id;
34016 	/* The type of LED #2. */
34017 	uint8_t	led2_type;
34018 	/* Speed LED */
34019 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_TYPE_SPEED    UINT32_C(0x0)
34020 	/* Activity LED */
34021 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_TYPE_ACTIVITY UINT32_C(0x1)
34022 	/* Invalid */
34023 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_TYPE_INVALID  UINT32_C(0xff)
34024 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_TYPE_LAST \
34025 		HWRM_PORT_LED_QCAPS_OUTPUT_LED2_TYPE_INVALID
34026 	/*
34027 	 * An identifier for the group of LEDs that LED #0 belongs
34028 	 * to.
34029 	 * If set to 0, then the LED #0 cannot be grouped.
34030 	 * For all other non-zero values of this field, LED #0 is
34031 	 * grouped together with the LEDs with the same group ID
34032 	 * value.
34033 	 */
34034 	uint8_t	led2_group_id;
34035 	uint8_t	unused_2;
34036 	/* The states supported by LED #2. */
34037 	uint16_t	led2_state_caps;
34038 	/*
34039 	 * If set to 1, this LED is enabled.
34040 	 * If set to 0, this LED is disabled.
34041 	 */
34042 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_STATE_CAPS_ENABLED \
34043 		UINT32_C(0x1)
34044 	/*
34045 	 * If set to 1, off state is supported on this LED.
34046 	 * If set to 0, off state is not supported on this LED.
34047 	 */
34048 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_STATE_CAPS_OFF_SUPPORTED \
34049 		UINT32_C(0x2)
34050 	/*
34051 	 * If set to 1, on state is supported on this LED.
34052 	 * If set to 0, on state is not supported on this LED.
34053 	 */
34054 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_STATE_CAPS_ON_SUPPORTED \
34055 		UINT32_C(0x4)
34056 	/*
34057 	 * If set to 1, blink state is supported on this LED.
34058 	 * If set to 0, blink state is not supported on this LED.
34059 	 */
34060 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_STATE_CAPS_BLINK_SUPPORTED \
34061 		UINT32_C(0x8)
34062 	/*
34063 	 * If set to 1, blink_alt state is supported on this LED.
34064 	 * If set to 0, blink_alt state is not supported on this LED.
34065 	 */
34066 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_STATE_CAPS_BLINK_ALT_SUPPORTED \
34067 		UINT32_C(0x10)
34068 	/* The colors supported by LED #2. */
34069 	uint16_t	led2_color_caps;
34070 	/* reserved. */
34071 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_COLOR_CAPS_RSVD \
34072 		UINT32_C(0x1)
34073 	/*
34074 	 * If set to 1, Amber color is supported on this LED.
34075 	 * If set to 0, Amber color is not supported on this LED.
34076 	 */
34077 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_COLOR_CAPS_AMBER_SUPPORTED \
34078 		UINT32_C(0x2)
34079 	/*
34080 	 * If set to 1, Green color is supported on this LED.
34081 	 * If set to 0, Green color is not supported on this LED.
34082 	 */
34083 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED2_COLOR_CAPS_GREEN_SUPPORTED \
34084 		UINT32_C(0x4)
34085 	/* An identifier for the LED #3. */
34086 	uint8_t	led3_id;
34087 	/* The type of LED #3. */
34088 	uint8_t	led3_type;
34089 	/* Speed LED */
34090 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_TYPE_SPEED    UINT32_C(0x0)
34091 	/* Activity LED */
34092 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_TYPE_ACTIVITY UINT32_C(0x1)
34093 	/* Invalid */
34094 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_TYPE_INVALID  UINT32_C(0xff)
34095 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_TYPE_LAST \
34096 		HWRM_PORT_LED_QCAPS_OUTPUT_LED3_TYPE_INVALID
34097 	/*
34098 	 * An identifier for the group of LEDs that LED #3 belongs
34099 	 * to.
34100 	 * If set to 0, then the LED #0 cannot be grouped.
34101 	 * For all other non-zero values of this field, LED #0 is
34102 	 * grouped together with the LEDs with the same group ID
34103 	 * value.
34104 	 */
34105 	uint8_t	led3_group_id;
34106 	uint8_t	unused_3;
34107 	/* The states supported by LED #3. */
34108 	uint16_t	led3_state_caps;
34109 	/*
34110 	 * If set to 1, this LED is enabled.
34111 	 * If set to 0, this LED is disabled.
34112 	 */
34113 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_STATE_CAPS_ENABLED \
34114 		UINT32_C(0x1)
34115 	/*
34116 	 * If set to 1, off state is supported on this LED.
34117 	 * If set to 0, off state is not supported on this LED.
34118 	 */
34119 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_STATE_CAPS_OFF_SUPPORTED \
34120 		UINT32_C(0x2)
34121 	/*
34122 	 * If set to 1, on state is supported on this LED.
34123 	 * If set to 0, on state is not supported on this LED.
34124 	 */
34125 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_STATE_CAPS_ON_SUPPORTED \
34126 		UINT32_C(0x4)
34127 	/*
34128 	 * If set to 1, blink state is supported on this LED.
34129 	 * If set to 0, blink state is not supported on this LED.
34130 	 */
34131 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_STATE_CAPS_BLINK_SUPPORTED \
34132 		UINT32_C(0x8)
34133 	/*
34134 	 * If set to 1, blink_alt state is supported on this LED.
34135 	 * If set to 0, blink_alt state is not supported on this LED.
34136 	 */
34137 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_STATE_CAPS_BLINK_ALT_SUPPORTED \
34138 		UINT32_C(0x10)
34139 	/* The colors supported by LED #3. */
34140 	uint16_t	led3_color_caps;
34141 	/* reserved. */
34142 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_COLOR_CAPS_RSVD \
34143 		UINT32_C(0x1)
34144 	/*
34145 	 * If set to 1, Amber color is supported on this LED.
34146 	 * If set to 0, Amber color is not supported on this LED.
34147 	 */
34148 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_COLOR_CAPS_AMBER_SUPPORTED \
34149 		UINT32_C(0x2)
34150 	/*
34151 	 * If set to 1, Green color is supported on this LED.
34152 	 * If set to 0, Green color is not supported on this LED.
34153 	 */
34154 	#define HWRM_PORT_LED_QCAPS_OUTPUT_LED3_COLOR_CAPS_GREEN_SUPPORTED \
34155 		UINT32_C(0x4)
34156 	uint8_t	unused_4[3];
34157 	/*
34158 	 * This field is used in Output records to indicate that the output
34159 	 * is completely written to RAM. This field should be read as '1'
34160 	 * to indicate that the output has been completely written. When
34161 	 * writing a command completion or response to an internal processor,
34162 	 * the order of writes has to be such that this field is written last.
34163 	 */
34164 	uint8_t	valid;
34165 } __rte_packed_end;
34166 
34167 /***********************
34168  * hwrm_port_prbs_test *
34169  ***********************/
34170 
34171 
34172 /* hwrm_port_prbs_test_input (size:384b/48B) */
34173 struct __rte_packed_begin hwrm_port_prbs_test_input {
34174 	/* The HWRM command request type. */
34175 	uint16_t	req_type;
34176 	/*
34177 	 * The completion ring to send the completion event on. This should
34178 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34179 	 */
34180 	uint16_t	cmpl_ring;
34181 	/*
34182 	 * The sequence ID is used by the driver for tracking multiple
34183 	 * commands. This ID is treated as opaque data by the firmware and
34184 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34185 	 */
34186 	uint16_t	seq_id;
34187 	/*
34188 	 * The target ID of the command:
34189 	 * * 0x0-0xFFF8 - The function ID
34190 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34191 	 * * 0xFFFD - Reserved for user-space HWRM interface
34192 	 * * 0xFFFF - HWRM
34193 	 */
34194 	uint16_t	target_id;
34195 	/*
34196 	 * A physical address pointer pointing to a host buffer that the
34197 	 * command's response data will be written. This can be either a host
34198 	 * physical address (HPA) or a guest physical address (GPA) and must
34199 	 * point to a physically contiguous block of memory.
34200 	 */
34201 	uint64_t	resp_addr;
34202 	/* Host address data is to DMA'd to. */
34203 	uint64_t	resp_data_addr;
34204 	/*
34205 	 * Size of the buffer pointed to by resp_data_addr. The firmware may
34206 	 * use this entire buffer or less than the entire buffer, but never
34207 	 * more.
34208 	 */
34209 	uint16_t	data_len;
34210 	uint16_t	flags;
34211 	/*
34212 	 * If set, the port_id field should be interpreted as an internal
34213 	 * port. The internal port id range is returned in port_phy_qcaps
34214 	 * response internal_port_cnt field.
34215 	 */
34216 	#define HWRM_PORT_PRBS_TEST_INPUT_FLAGS_INTERNAL     UINT32_C(0x1)
34217 	uint32_t	unused_1;
34218 	/* Port ID of port where PRBS test to be run. */
34219 	uint16_t	port_id;
34220 	/* Polynomial selection for PRBS test. */
34221 	uint16_t	poly;
34222 	/* PRBS7 */
34223 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS7   UINT32_C(0x0)
34224 	/* PRBS9 */
34225 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS9   UINT32_C(0x1)
34226 	/* PRBS11 */
34227 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS11  UINT32_C(0x2)
34228 	/* PRBS15 */
34229 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS15  UINT32_C(0x3)
34230 	/* PRBS23 */
34231 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS23  UINT32_C(0x4)
34232 	/* PRBS31 */
34233 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS31  UINT32_C(0x5)
34234 	/* PRBS58 */
34235 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS58  UINT32_C(0x6)
34236 	/* PRBS49 */
34237 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS49  UINT32_C(0x7)
34238 	/* PRBS10 */
34239 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS10  UINT32_C(0x8)
34240 	/* PRBS20 */
34241 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS20  UINT32_C(0x9)
34242 	/* PRBS13 */
34243 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_PRBS13  UINT32_C(0xa)
34244 	/* Invalid */
34245 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_INVALID UINT32_C(0xff)
34246 	#define HWRM_PORT_PRBS_TEST_INPUT_POLY_LAST \
34247 		HWRM_PORT_PRBS_TEST_INPUT_POLY_INVALID
34248 	/*
34249 	 * Configuration bits for PRBS test.
34250 	 * Use enable bit to start/stop test.
34251 	 * Use tx/rx lane map bits to run test on specific lanes,
34252 	 * if set to 0 test will be run on all lanes.
34253 	 */
34254 	uint16_t	prbs_config;
34255 	/*
34256 	 * Set 0 to stop test currently in progress
34257 	 * Set 1 to start test with configuration provided.
34258 	 */
34259 	#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_START_STOP \
34260 		UINT32_C(0x1)
34261 	/*
34262 	 * If set to 1, tx_lane_map bitmap should have lane bits set.
34263 	 * If set to 0, test will be run on all lanes for this port.
34264 	 */
34265 	#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_TX_LANE_MAP_VALID \
34266 		UINT32_C(0x2)
34267 	/*
34268 	 * If set to 1, rx_lane_map bitmap should have lane bits set.
34269 	 * If set to 0, test will be run on all lanes for this port.
34270 	 */
34271 	#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_RX_LANE_MAP_VALID \
34272 		UINT32_C(0x4)
34273 	/* If set to 1, FEC stat t-code 0-7 registers are enabled. */
34274 	#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_FEC_STAT_T0_T7 \
34275 		UINT32_C(0x8)
34276 	/*
34277 	 * If set to 1, FEC stat t-code 8-15 registers are enabled.
34278 	 * If fec_stat_t0_t7 is set, fec_stat_t8_t15 field will be ignored.
34279 	 */
34280 	#define HWRM_PORT_PRBS_TEST_INPUT_PRBS_CONFIG_FEC_STAT_T8_T15 \
34281 		UINT32_C(0x10)
34282 	/* Duration in seconds to run the PRBS test. */
34283 	uint16_t	timeout;
34284 	/*
34285 	 * If tx_lane_map_valid is set to 1, this field is a bitmap
34286 	 * of tx lanes to run PRBS test. bit0 = lane0,
34287 	 * bit1 = lane1 ..bit31 = lane31
34288 	 */
34289 	uint32_t	tx_lane_map;
34290 	/*
34291 	 * If rx_lane_map_valid is set to 1, this field is a bitmap
34292 	 * of rx lanes to run PRBS test. bit0 = lane0,
34293 	 * bit1 = lane1 ..bit31 = lane31
34294 	 */
34295 	uint32_t	rx_lane_map;
34296 } __rte_packed_end;
34297 
34298 /* hwrm_port_prbs_test_output (size:128b/16B) */
34299 struct __rte_packed_begin hwrm_port_prbs_test_output {
34300 	/* The specific error status for the command. */
34301 	uint16_t	error_code;
34302 	/* The HWRM command request type. */
34303 	uint16_t	req_type;
34304 	/* The sequence ID from the original command. */
34305 	uint16_t	seq_id;
34306 	/* The length of the response data in number of bytes. */
34307 	uint16_t	resp_len;
34308 	/* Total length of stored data. */
34309 	uint16_t	total_data_len;
34310 	/* This field is used in Output records to indicate the output format */
34311 	uint8_t	ber_format;
34312 	/* BER_FORMAT_PRBS */
34313 	#define HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_PRBS UINT32_C(0x0)
34314 	/* BER_FORMAT_FEC */
34315 	#define HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_FEC  UINT32_C(0x1)
34316 	#define HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_LAST \
34317 		HWRM_PORT_PRBS_TEST_OUTPUT_BER_FORMAT_FEC
34318 	uint8_t	unused_0;
34319 	uint8_t	unused_1[3];
34320 	/*
34321 	 * This field is used in Output records to indicate that the output
34322 	 * is completely written to RAM. This field should be read as '1'
34323 	 * to indicate that the output has been completely written. When
34324 	 * writing a command completion or response to an internal processor,
34325 	 * the order of writes has to be such that this field is written last.
34326 	 */
34327 	uint8_t	valid;
34328 } __rte_packed_end;
34329 
34330 /**********************
34331  * hwrm_port_dsc_dump *
34332  **********************/
34333 
34334 
34335 /* hwrm_port_dsc_dump_input (size:320b/40B) */
34336 struct __rte_packed_begin hwrm_port_dsc_dump_input {
34337 	/* The HWRM command request type. */
34338 	uint16_t	req_type;
34339 	/*
34340 	 * The completion ring to send the completion event on. This should
34341 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34342 	 */
34343 	uint16_t	cmpl_ring;
34344 	/*
34345 	 * The sequence ID is used by the driver for tracking multiple
34346 	 * commands. This ID is treated as opaque data by the firmware and
34347 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34348 	 */
34349 	uint16_t	seq_id;
34350 	/*
34351 	 * The target ID of the command:
34352 	 * * 0x0-0xFFF8 - The function ID
34353 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34354 	 * * 0xFFFD - Reserved for user-space HWRM interface
34355 	 * * 0xFFFF - HWRM
34356 	 */
34357 	uint16_t	target_id;
34358 	/*
34359 	 * A physical address pointer pointing to a host buffer that the
34360 	 * command's response data will be written. This can be either a host
34361 	 * physical address (HPA) or a guest physical address (GPA) and must
34362 	 * point to a physically contiguous block of memory.
34363 	 */
34364 	uint64_t	resp_addr;
34365 	/* Host address where response diagnostic data is returned. */
34366 	uint64_t	resp_data_addr;
34367 	/*
34368 	 * Size of the host buffer pointed to by resp_data_addr. The firmware
34369 	 * may use this entire buffer or less than the entire buffer, but
34370 	 * never more.
34371 	 */
34372 	uint16_t	data_len;
34373 	uint16_t	unused_0;
34374 	/*
34375 	 * Ignored by the start command.
34376 	 * In legacy buffer mode, this is ignored. The transfer starts
34377 	 * at buffer offset zero and must be transferred in one command.
34378 	 * In big buffer mode, this is the offset into the NIC buffer for
34379 	 * the current retrieve command to start.
34380 	 */
34381 	uint32_t	data_offset;
34382 	/* Port ID of port where dsc dump to be collected. */
34383 	uint16_t	port_id;
34384 	/* Diag level specified by the user */
34385 	uint16_t	diag_level;
34386 	/* SRDS_DIAG_LANE */
34387 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_LANE \
34388 		UINT32_C(0x0)
34389 	/* SRDS_DIAG_CORE */
34390 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_CORE \
34391 		UINT32_C(0x1)
34392 	/* SRDS_DIAG_EVENT */
34393 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_EVENT \
34394 		UINT32_C(0x2)
34395 	/* SRDS_DIAG_EYE */
34396 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_EYE \
34397 		UINT32_C(0x3)
34398 	/* SRDS_DIAG_REG_CORE */
34399 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_REG_CORE \
34400 		UINT32_C(0x4)
34401 	/* SRDS_DIAG_REG_LANE */
34402 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_REG_LANE \
34403 		UINT32_C(0x5)
34404 	/* SRDS_DIAG_UC_CORE */
34405 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_UC_CORE \
34406 		UINT32_C(0x6)
34407 	/* SRDS_DIAG_UC_LANE */
34408 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_UC_LANE \
34409 		UINT32_C(0x7)
34410 	/* SRDS_DIAG_LANE_DEBUG */
34411 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_LANE_DEBUG \
34412 		UINT32_C(0x8)
34413 	/* SRDS_DIAG_BER_VERT */
34414 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_BER_VERT \
34415 		UINT32_C(0x9)
34416 	/* SRDS_DIAG_BER_HORZ */
34417 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_BER_HORZ \
34418 		UINT32_C(0xa)
34419 	/* SRDS_DIAG_EVENT_SAFE */
34420 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_EVENT_SAFE \
34421 		UINT32_C(0xb)
34422 	/* SRDS_DIAG_TIMESTAMP */
34423 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_TIMESTAMP \
34424 		UINT32_C(0xc)
34425 	#define HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_LAST \
34426 		HWRM_PORT_DSC_DUMP_INPUT_DIAG_LEVEL_SRDS_DIAG_TIMESTAMP
34427 	/*
34428 	 * This field is the lane number on which to collect the dsc dump.
34429 	 * If this is 0xFFFF, the dsc dump will be collected for all lanes,
34430 	 * if the hardware and firmware support this feature.
34431 	 */
34432 	uint16_t	lane_number;
34433 	/* Configuration bits. */
34434 	uint16_t	dsc_dump_config;
34435 	/*
34436 	 * Set 0 to retrieve the dsc dump
34437 	 * Set 1 to start the dsc dump
34438 	 * Some configuration parameter for the dscdump report are
34439 	 * set by the start request, and can not be modified until the
34440 	 * retrieve operation is complete, on the next start.
34441 	 */
34442 	#define HWRM_PORT_DSC_DUMP_INPUT_DSC_DUMP_CONFIG_START_RETRIEVE \
34443 		UINT32_C(0x1)
34444 	/*
34445 	 * Set 0 to limit the report size to 65535 bytes.
34446 	 * Set 1 to allow a larger buffer size.
34447 	 * This can only be set 1 in the start operation.
34448 	 * If this is set 0 in the start operation, the firmware will
34449 	 * assume it needs to only expose up to 65535 bytes of the report,
34450 	 * and only allow a single retrieve operation to retrieve the
34451 	 * entire report. This mode will truncate longer reports.
34452 	 * If this is set 1 in the start operation, the firmware will
34453 	 * report the full size of the report (up to the firmware's limit),
34454 	 * permit retrieve operations to hold the buffer using the config
34455 	 * defer_close, and honour the data_offset value so later data
34456 	 * in the report can be retrieved.
34457 	 */
34458 	#define HWRM_PORT_DSC_DUMP_INPUT_DSC_DUMP_CONFIG_BIG_BUFFER \
34459 		UINT32_C(0x2)
34460 	/*
34461 	 * Set 0 on the last 'retrieve' to release the firmware buffer
34462 	 * Set 1 on the other 'retrieve' to hold the firmware buffer
34463 	 * This only affects retrieve operations.
34464 	 * In big_buffer mode, this allows the driver or tool to tell
34465 	 * the firmware to keep the report around, as it intends to read
34466 	 * more of it in. The final read must set this to zero, to tell
34467 	 * the firmware the report buffer can be released.
34468 	 * This only works if the start request specified big_buffer as
34469 	 * one; it is ignored otherwise.
34470 	 */
34471 	#define HWRM_PORT_DSC_DUMP_INPUT_DSC_DUMP_CONFIG_DEFER_CLOSE \
34472 		UINT32_C(0x4)
34473 } __rte_packed_end;
34474 
34475 /* hwrm_port_dsc_dump_output (size:128b/16B) */
34476 struct __rte_packed_begin hwrm_port_dsc_dump_output {
34477 	/* The specific error status for the command. */
34478 	uint16_t	error_code;
34479 	/* The HWRM command request type. */
34480 	uint16_t	req_type;
34481 	/* The sequence ID from the original command. */
34482 	uint16_t	seq_id;
34483 	/* The length of the response data in number of bytes. */
34484 	uint16_t	resp_len;
34485 	/*
34486 	 * Total length of stored data; if big_buffer is one, this
34487 	 * only contains the lower 16 bits of the total length.
34488 	 * In legacy buffer mode, this is zero in the 'start' response.
34489 	 * In big buffer mode, this has the size of the report even
34490 	 * in the 'start' response.
34491 	 * In both modes, this contains the number of bytes written
34492 	 * to the host in 'retrieve' responses.
34493 	 */
34494 	uint16_t	total_data_len;
34495 	/*
34496 	 * The upper 16 bits of the total length of stored data.
34497 	 * In legacy buffer mode, this will always be zero.
34498 	 * In big buffer mode, this will be populated even in the
34499 	 * 'start' response.
34500 	 * This is always zero for 'retrieve' responses.
34501 	 */
34502 	uint16_t	total_data_len_high;
34503 	uint8_t	unused_1[2];
34504 	/* Result information bits. */
34505 	uint8_t	flags;
34506 	/*
34507 	 * Set according to the start request's input big_buffer.
34508 	 * If this is zero, it indicates the function is acting per
34509 	 * legacy behaviour -- it will report a buffer size up to almost
34510 	 * 64KiB, and allow only one retrieval request before releasing
34511 	 * the firmware buffer containing the report (total_data_len_high
34512 	 * will be zero). The request's data_offset field and defer_close
34513 	 * and use_offset config flags are ignored.
34514 	 * If this is one, it indicates support for (and request of)
34515 	 * support for larger reports. The full 32b report size (up to the
34516 	 * firmware buffer limit) is provided by the start response in
34517 	 * total_data_len (low 16b) and total_data_len_high (high 16b),
34518 	 * and retrieve requests may keep the buffer using the defer_close
34519 	 * flag, and retrieve the later parts of the report using the
34520 	 * data_offset field.
34521 	 */
34522 	#define HWRM_PORT_DSC_DUMP_OUTPUT_FLAGS_BIG_BUFFER     UINT32_C(0x1)
34523 	/*
34524 	 * This field is used in Output records to indicate that the output
34525 	 * is completely written to RAM. This field should be read as '1'
34526 	 * to indicate that the output has been completely written. When
34527 	 * writing a command completion or response to an internal processor,
34528 	 * the order of writes has to be such that this field is written last.
34529 	 */
34530 	uint8_t	valid;
34531 } __rte_packed_end;
34532 
34533 /******************************
34534  * hwrm_port_sfp_sideband_cfg *
34535  ******************************/
34536 
34537 
34538 /* hwrm_port_sfp_sideband_cfg_input (size:256b/32B) */
34539 struct __rte_packed_begin hwrm_port_sfp_sideband_cfg_input {
34540 	/* The HWRM command request type. */
34541 	uint16_t	req_type;
34542 	/*
34543 	 * The completion ring to send the completion event on. This should
34544 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34545 	 */
34546 	uint16_t	cmpl_ring;
34547 	/*
34548 	 * The sequence ID is used by the driver for tracking multiple
34549 	 * commands. This ID is treated as opaque data by the firmware and
34550 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34551 	 */
34552 	uint16_t	seq_id;
34553 	/*
34554 	 * The target ID of the command:
34555 	 * * 0x0-0xFFF8 - The function ID
34556 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34557 	 * * 0xFFFD - Reserved for user-space HWRM interface
34558 	 * * 0xFFFF - HWRM
34559 	 */
34560 	uint16_t	target_id;
34561 	/*
34562 	 * A physical address pointer pointing to a host buffer that the
34563 	 * command's response data will be written. This can be either a host
34564 	 * physical address (HPA) or a guest physical address (GPA) and must
34565 	 * point to a physically contiguous block of memory.
34566 	 */
34567 	uint64_t	resp_addr;
34568 	/* Port ID of port that is to be queried. */
34569 	uint16_t	port_id;
34570 	uint8_t	unused_0[6];
34571 	/*
34572 	 * This bitfield is used to specify which bits from the 'flags'
34573 	 * fields are being configured by the caller.
34574 	 */
34575 	uint32_t	enables;
34576 	/* This bit must be '1' for rs0 to be configured. */
34577 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_RS0 \
34578 		UINT32_C(0x1)
34579 	/* This bit must be '1' for rs1 to be configured. */
34580 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_RS1 \
34581 		UINT32_C(0x2)
34582 	/* This bit must be '1' for tx_disable to be configured. */
34583 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_TX_DIS \
34584 		UINT32_C(0x4)
34585 	/*
34586 	 * This bit must be '1' for mod_sel to be configured.
34587 	 * Valid only on QSFP modules
34588 	 */
34589 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_MOD_SEL \
34590 		UINT32_C(0x8)
34591 	/* This bit must be '1' for reset_l to be configured. */
34592 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_RESET_L \
34593 		UINT32_C(0x10)
34594 	/* This bit must be '1' for lp_mode to be configured. */
34595 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_LP_MODE \
34596 		UINT32_C(0x20)
34597 	/* This bit must be '1' for pwr_disable to be configured. */
34598 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_ENABLES_PWR_DIS \
34599 		UINT32_C(0x40)
34600 	/*
34601 	 * Only bits that have corresponding bits in the 'enables'
34602 	 * bitfield are processed by the firmware, all other bits
34603 	 * of 'flags' are ignored.
34604 	 */
34605 	uint32_t	flags;
34606 	/*
34607 	 * This bit along with rs1 configures the current speed of the dual
34608 	 * rate module. If these pins are GNDed then the speed can be changed
34609 	 * by directly writing to EEPROM.
34610 	 */
34611 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_RS0 \
34612 		UINT32_C(0x1)
34613 	/*
34614 	 * This bit along with rs0 configures the current speed of the dual
34615 	 * rate module. If these pins are GNDed then the speed can be changed
34616 	 * by directly writing to EEPROM.
34617 	 */
34618 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_RS1 \
34619 		UINT32_C(0x2)
34620 	/*
34621 	 * When this bit is set to '1', tx_disable is set.
34622 	 * On a 1G BASE-T module, if this bit is set,
34623 	 * module PHY registers will not be accessible.
34624 	 */
34625 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_TX_DIS \
34626 		UINT32_C(0x4)
34627 	/*
34628 	 * When this bit is set to '1', this module is selected.
34629 	 * Valid only on QSFP modules
34630 	 */
34631 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_MOD_SEL \
34632 		UINT32_C(0x8)
34633 	/*
34634 	 * If reset_l is set to 0, Module will be taken out of reset
34635 	 * and other signals will be set to their requested state once
34636 	 * the module is out of reset.
34637 	 * Valid only on QSFP modules
34638 	 */
34639 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_RESET_L \
34640 		UINT32_C(0x10)
34641 	/*
34642 	 * When this bit is set to '1', the module will be configured
34643 	 * in low power mode.
34644 	 * Valid only on QSFP modules
34645 	 */
34646 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_LP_MODE \
34647 		UINT32_C(0x20)
34648 	/* When this bit is set to '1', the module will be powered down. */
34649 	#define HWRM_PORT_SFP_SIDEBAND_CFG_INPUT_FLAGS_PWR_DIS \
34650 		UINT32_C(0x40)
34651 } __rte_packed_end;
34652 
34653 /* hwrm_port_sfp_sideband_cfg_output (size:128b/16B) */
34654 struct __rte_packed_begin hwrm_port_sfp_sideband_cfg_output {
34655 	/* The specific error status for the command. */
34656 	uint16_t	error_code;
34657 	/* The HWRM command request type. */
34658 	uint16_t	req_type;
34659 	/* The sequence ID from the original command. */
34660 	uint16_t	seq_id;
34661 	/* The length of the response data in number of bytes. */
34662 	uint16_t	resp_len;
34663 	uint8_t	unused[7];
34664 	/*
34665 	 * This field is used in Output records to indicate that the output
34666 	 * is completely written to RAM. This field should be read as '1'
34667 	 * to indicate that the output has been completely written. When
34668 	 * writing a command completion or response to an internal processor,
34669 	 * the order of writes has to be such that this field is written last.
34670 	 */
34671 	uint8_t	valid;
34672 } __rte_packed_end;
34673 
34674 /*******************************
34675  * hwrm_port_sfp_sideband_qcfg *
34676  *******************************/
34677 
34678 
34679 /* hwrm_port_sfp_sideband_qcfg_input (size:192b/24B) */
34680 struct __rte_packed_begin hwrm_port_sfp_sideband_qcfg_input {
34681 	/* The HWRM command request type. */
34682 	uint16_t	req_type;
34683 	/*
34684 	 * The completion ring to send the completion event on. This should
34685 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34686 	 */
34687 	uint16_t	cmpl_ring;
34688 	/*
34689 	 * The sequence ID is used by the driver for tracking multiple
34690 	 * commands. This ID is treated as opaque data by the firmware and
34691 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34692 	 */
34693 	uint16_t	seq_id;
34694 	/*
34695 	 * The target ID of the command:
34696 	 * * 0x0-0xFFF8 - The function ID
34697 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34698 	 * * 0xFFFD - Reserved for user-space HWRM interface
34699 	 * * 0xFFFF - HWRM
34700 	 */
34701 	uint16_t	target_id;
34702 	/*
34703 	 * A physical address pointer pointing to a host buffer that the
34704 	 * command's response data will be written. This can be either a host
34705 	 * physical address (HPA) or a guest physical address (GPA) and must
34706 	 * point to a physically contiguous block of memory.
34707 	 */
34708 	uint64_t	resp_addr;
34709 	/* Port ID of port that is to be queried. */
34710 	uint16_t	port_id;
34711 	uint8_t	unused_0[6];
34712 } __rte_packed_end;
34713 
34714 /* hwrm_port_sfp_sideband_qcfg_output (size:192b/24B) */
34715 struct __rte_packed_begin hwrm_port_sfp_sideband_qcfg_output {
34716 	/* The specific error status for the command. */
34717 	uint16_t	error_code;
34718 	/* The HWRM command request type. */
34719 	uint16_t	req_type;
34720 	/* The sequence ID from the original command. */
34721 	uint16_t	seq_id;
34722 	/* The length of the response data in number of bytes. */
34723 	uint16_t	resp_len;
34724 	/*
34725 	 * Bitmask indicating which sideband signals are valid.
34726 	 * This is based on the board and nvm cfg that is present on the board.
34727 	 */
34728 	uint32_t	supported_mask;
34729 	uint32_t	sideband_signals;
34730 	/* When this bit is set to '1', the Module is absent. */
34731 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_MOD_ABS \
34732 		UINT32_C(0x1)
34733 	/*
34734 	 * When this bit is set to '1', there is no valid signal on RX.
34735 	 * This signal is a filtered version of Signal Detect.
34736 	 */
34737 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_RX_LOS \
34738 		UINT32_C(0x2)
34739 	/*
34740 	 * This bit along with rs1 indicates the current speed of the dual
34741 	 * rate module.If these pins are grounded then the speed can be
34742 	 * changed by directly writing to EEPROM.
34743 	 */
34744 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_RS0 \
34745 		UINT32_C(0x4)
34746 	/*
34747 	 * This bit along with rs0 indicates the current speed of the dual
34748 	 * rate module.If these pins are grounded then the speed can be
34749 	 * changed by directly writing to EEPROM.
34750 	 */
34751 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_RS1 \
34752 		UINT32_C(0x8)
34753 	/*
34754 	 * When this bit is set to '1', tx_disable is set.
34755 	 * On a 1G BASE-T module, if this bit is set, module PHY
34756 	 * registers will not be accessible.
34757 	 */
34758 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_TX_DIS \
34759 		UINT32_C(0x10)
34760 	/* When this bit is set to '1', tx_fault is set. */
34761 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_TX_FAULT \
34762 		UINT32_C(0x20)
34763 	/*
34764 	 * When this bit is set to '1', module is selected.
34765 	 * Valid only on QSFP modules
34766 	 */
34767 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_MOD_SEL \
34768 		UINT32_C(0x40)
34769 	/*
34770 	 * When this bit is set to '0', the module is held in reset.
34771 	 * if reset_l is set to 1,first module is taken out of reset
34772 	 * and other signals will be set to their requested state.
34773 	 * Valid only on QSFP modules.
34774 	 */
34775 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_RESET_L \
34776 		UINT32_C(0x80)
34777 	/*
34778 	 * When this bit is set to '1', the module is in low power mode.
34779 	 * Valid only on QSFP modules
34780 	 */
34781 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_LP_MODE \
34782 		UINT32_C(0x100)
34783 	/* When this bit is set to '1', module is in power down state. */
34784 	#define HWRM_PORT_SFP_SIDEBAND_QCFG_OUTPUT_SIDEBAND_SIGNALS_PWR_DIS \
34785 		UINT32_C(0x200)
34786 	uint8_t	unused[7];
34787 	/*
34788 	 * This field is used in Output records to indicate that the output
34789 	 * is completely written to RAM. This field should be read as '1'
34790 	 * to indicate that the output has been completely written. When
34791 	 * writing a command completion or response to an internal processor,
34792 	 * the order of writes has to be such that this field is written last.
34793 	 */
34794 	uint8_t	valid;
34795 } __rte_packed_end;
34796 
34797 /**********************************
34798  * hwrm_port_phy_mdio_bus_acquire *
34799  **********************************/
34800 
34801 
34802 /* hwrm_port_phy_mdio_bus_acquire_input (size:192b/24B) */
34803 struct __rte_packed_begin hwrm_port_phy_mdio_bus_acquire_input {
34804 	/* The HWRM command request type. */
34805 	uint16_t	req_type;
34806 	/*
34807 	 * The completion ring to send the completion event on. This should
34808 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34809 	 */
34810 	uint16_t	cmpl_ring;
34811 	/*
34812 	 * The sequence ID is used by the driver for tracking multiple
34813 	 * commands. This ID is treated as opaque data by the firmware and
34814 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34815 	 */
34816 	uint16_t	seq_id;
34817 	/*
34818 	 * The target ID of the command:
34819 	 * * 0x0-0xFFF8 - The function ID
34820 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34821 	 * * 0xFFFD - Reserved for user-space HWRM interface
34822 	 * * 0xFFFF - HWRM
34823 	 */
34824 	uint16_t	target_id;
34825 	/*
34826 	 * A physical address pointer pointing to a host buffer that the
34827 	 * command's response data will be written. This can be either a host
34828 	 * physical address (HPA) or a guest physical address (GPA) and must
34829 	 * point to a physically contiguous block of memory.
34830 	 */
34831 	uint64_t	resp_addr;
34832 	/* Port ID of the port. */
34833 	uint16_t	port_id;
34834 	/*
34835 	 * client_id of the client requesting BUS access.
34836 	 * Any value from 0x10 to 0xFFFF can be used.
34837 	 * Client should make sure that the returned client_id
34838 	 * in response matches the client_id in request.
34839 	 * 0-0xF are reserved for internal use.
34840 	 */
34841 	uint16_t	client_id;
34842 	/*
34843 	 * Timeout in milliseconds, MDIO BUS will be released automatically
34844 	 * after this time, if another mdio acquire command is not received
34845 	 * within the timeout window from the same client.
34846 	 * A 0xFFFF will hold the bus until this bus is released.
34847 	 */
34848 	uint16_t	mdio_bus_timeout;
34849 	uint8_t	unused_0[2];
34850 } __rte_packed_end;
34851 
34852 /* hwrm_port_phy_mdio_bus_acquire_output (size:128b/16B) */
34853 struct __rte_packed_begin hwrm_port_phy_mdio_bus_acquire_output {
34854 	/* The specific error status for the command. */
34855 	uint16_t	error_code;
34856 	/* The HWRM command request type. */
34857 	uint16_t	req_type;
34858 	/* The sequence ID from the original command. */
34859 	uint16_t	seq_id;
34860 	/* The length of the response data in number of bytes. */
34861 	uint16_t	resp_len;
34862 	uint16_t	unused_0;
34863 	/*
34864 	 * client_id of the module holding the BUS.
34865 	 * 0-0xF are reserved for internal use.
34866 	 */
34867 	uint16_t	client_id;
34868 	uint8_t	unused_1[3];
34869 	/*
34870 	 * This field is used in Output records to indicate that the output
34871 	 * is completely written to RAM. This field should be read as '1'
34872 	 * to indicate that the output has been completely written. When
34873 	 * writing a command completion or response to an internal processor,
34874 	 * the order of writes has to be such that this field is written last.
34875 	 */
34876 	uint8_t	valid;
34877 } __rte_packed_end;
34878 
34879 /**********************************
34880  * hwrm_port_phy_mdio_bus_release *
34881  **********************************/
34882 
34883 
34884 /* hwrm_port_phy_mdio_bus_release_input (size:192b/24B) */
34885 struct __rte_packed_begin hwrm_port_phy_mdio_bus_release_input {
34886 	/* The HWRM command request type. */
34887 	uint16_t	req_type;
34888 	/*
34889 	 * The completion ring to send the completion event on. This should
34890 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34891 	 */
34892 	uint16_t	cmpl_ring;
34893 	/*
34894 	 * The sequence ID is used by the driver for tracking multiple
34895 	 * commands. This ID is treated as opaque data by the firmware and
34896 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34897 	 */
34898 	uint16_t	seq_id;
34899 	/*
34900 	 * The target ID of the command:
34901 	 * * 0x0-0xFFF8 - The function ID
34902 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34903 	 * * 0xFFFD - Reserved for user-space HWRM interface
34904 	 * * 0xFFFF - HWRM
34905 	 */
34906 	uint16_t	target_id;
34907 	/*
34908 	 * A physical address pointer pointing to a host buffer that the
34909 	 * command's response data will be written. This can be either a host
34910 	 * physical address (HPA) or a guest physical address (GPA) and must
34911 	 * point to a physically contiguous block of memory.
34912 	 */
34913 	uint64_t	resp_addr;
34914 	/* Port ID of the port. */
34915 	uint16_t	port_id;
34916 	/*
34917 	 * client_id of the client requesting BUS release.
34918 	 * A client should not release any other clients BUS.
34919 	 */
34920 	uint16_t	client_id;
34921 	uint8_t	unused_0[4];
34922 } __rte_packed_end;
34923 
34924 /* hwrm_port_phy_mdio_bus_release_output (size:128b/16B) */
34925 struct __rte_packed_begin hwrm_port_phy_mdio_bus_release_output {
34926 	/* The specific error status for the command. */
34927 	uint16_t	error_code;
34928 	/* The HWRM command request type. */
34929 	uint16_t	req_type;
34930 	/* The sequence ID from the original command. */
34931 	uint16_t	seq_id;
34932 	/* The length of the response data in number of bytes. */
34933 	uint16_t	resp_len;
34934 	uint16_t	unused_0;
34935 	/* The BUS is released if client_id matches the client_id in request. */
34936 	uint16_t	clients_id;
34937 	uint8_t	unused_1[3];
34938 	/*
34939 	 * This field is used in Output records to indicate that the output
34940 	 * is completely written to RAM. This field should be read as '1'
34941 	 * to indicate that the output has been completely written. When
34942 	 * writing a command completion or response to an internal processor,
34943 	 * the order of writes has to be such that this field is written last.
34944 	 */
34945 	uint8_t	valid;
34946 } __rte_packed_end;
34947 
34948 /************************
34949  * hwrm_port_tx_fir_cfg *
34950  ************************/
34951 
34952 
34953 /* hwrm_port_tx_fir_cfg_input (size:320b/40B) */
34954 struct __rte_packed_begin hwrm_port_tx_fir_cfg_input {
34955 	/* The HWRM command request type. */
34956 	uint16_t	req_type;
34957 	/*
34958 	 * The completion ring to send the completion event on. This should
34959 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
34960 	 */
34961 	uint16_t	cmpl_ring;
34962 	/*
34963 	 * The sequence ID is used by the driver for tracking multiple
34964 	 * commands. This ID is treated as opaque data by the firmware and
34965 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
34966 	 */
34967 	uint16_t	seq_id;
34968 	/*
34969 	 * The target ID of the command:
34970 	 * * 0x0-0xFFF8 - The function ID
34971 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
34972 	 * * 0xFFFD - Reserved for user-space HWRM interface
34973 	 * * 0xFFFF - HWRM
34974 	 */
34975 	uint16_t	target_id;
34976 	/*
34977 	 * A physical address pointer pointing to a host buffer that the
34978 	 * command's response data will be written. This can be either a host
34979 	 * physical address (HPA) or a guest physical address (GPA) and must
34980 	 * point to a physically contiguous block of memory.
34981 	 */
34982 	uint64_t	resp_addr;
34983 	/* Modulation types of TX FIR: NRZ, PAM4. */
34984 	uint8_t	mod_type;
34985 	/* For NRZ */
34986 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_NRZ           UINT32_C(0x0)
34987 	/* For PAM4 */
34988 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_PAM4          UINT32_C(0x1)
34989 	/* For Optical NRZ */
34990 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_C2M_NRZ       UINT32_C(0x2)
34991 	/* For Optical PAM4 */
34992 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_C2M_PAM4      UINT32_C(0x3)
34993 	/* For DAC PAM4 112G */
34994 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_PAM4_112      UINT32_C(0x4)
34995 	/* For Optical PAM4 112G */
34996 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_C2M_PAM4_112G UINT32_C(0x5)
34997 	/* For LPO PAM4 112G */
34998 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_LPO_PAM4_112G UINT32_C(0x6)
34999 	#define HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_LAST \
35000 		HWRM_PORT_TX_FIR_CFG_INPUT_MOD_TYPE_LPO_PAM4_112G
35001 	/* The lane mask of the lane TX FIR will be configured. */
35002 	uint8_t	lane_mask;
35003 	uint8_t	unused_0[2];
35004 	/* Value1 of TX FIR, required for NRZ or PAM4. */
35005 	uint32_t	txfir_val_1;
35006 	/* Value2 of TX FIR, required for NRZ or PAM4. */
35007 	uint32_t	txfir_val_2;
35008 	/* Value3 of TX FIR, required for PAM4. */
35009 	uint32_t	txfir_val_3;
35010 	/* Value4 of TX FIR, required for PAM4. */
35011 	uint32_t	txfir_val_4;
35012 	uint8_t	unused_1[4];
35013 } __rte_packed_end;
35014 
35015 /* hwrm_port_tx_fir_cfg_output (size:128b/16B) */
35016 struct __rte_packed_begin hwrm_port_tx_fir_cfg_output {
35017 	/* The specific error status for the command. */
35018 	uint16_t	error_code;
35019 	/* The HWRM command request type. */
35020 	uint16_t	req_type;
35021 	/* The sequence ID from the original command. */
35022 	uint16_t	seq_id;
35023 	/* The length of the response data in number of bytes. */
35024 	uint16_t	resp_len;
35025 	uint8_t	unused[7];
35026 	/*
35027 	 * This field is used in Output records to indicate that the output
35028 	 * is completely written to RAM. This field should be read as '1'
35029 	 * to indicate that the output has been completely written. When
35030 	 * writing a command completion or response to an internal processor,
35031 	 * the order of writes has to be such that this field is written last.
35032 	 */
35033 	uint8_t	valid;
35034 } __rte_packed_end;
35035 
35036 /*************************
35037  * hwrm_port_tx_fir_qcfg *
35038  *************************/
35039 
35040 
35041 /* hwrm_port_tx_fir_qcfg_input (size:192b/24B) */
35042 struct __rte_packed_begin hwrm_port_tx_fir_qcfg_input {
35043 	/* The HWRM command request type. */
35044 	uint16_t	req_type;
35045 	/*
35046 	 * The completion ring to send the completion event on. This should
35047 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
35048 	 */
35049 	uint16_t	cmpl_ring;
35050 	/*
35051 	 * The sequence ID is used by the driver for tracking multiple
35052 	 * commands. This ID is treated as opaque data by the firmware and
35053 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
35054 	 */
35055 	uint16_t	seq_id;
35056 	/*
35057 	 * The target ID of the command:
35058 	 * * 0x0-0xFFF8 - The function ID
35059 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
35060 	 * * 0xFFFD - Reserved for user-space HWRM interface
35061 	 * * 0xFFFF - HWRM
35062 	 */
35063 	uint16_t	target_id;
35064 	/*
35065 	 * A physical address pointer pointing to a host buffer that the
35066 	 * command's response data will be written. This can be either a host
35067 	 * physical address (HPA) or a guest physical address (GPA) and must
35068 	 * point to a physically contiguous block of memory.
35069 	 */
35070 	uint64_t	resp_addr;
35071 	/* Modulation types of TX FIR: NRZ, PAM4. */
35072 	uint8_t	mod_type;
35073 	/* For NRZ */
35074 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_NRZ          UINT32_C(0x0)
35075 	/* For PAM4 56G */
35076 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_PAM4         UINT32_C(0x1)
35077 	/* For Optical NRZ */
35078 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_C2M_NRZ      UINT32_C(0x2)
35079 	/* For Optical PAM4 56G */
35080 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_C2M_PAM4     UINT32_C(0x3)
35081 	/* For DAC PAM4 112G */
35082 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_PAM4_112     UINT32_C(0x4)
35083 	/* For Optical PAM4 112G */
35084 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_C2M_PAM4_112 UINT32_C(0x5)
35085 	/* For LPO PAM4 112G */
35086 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_LPO_PAM4_112 UINT32_C(0x6)
35087 	#define HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_LAST \
35088 		HWRM_PORT_TX_FIR_QCFG_INPUT_MOD_TYPE_LPO_PAM4_112
35089 	/* The ID of the lane TX FIR will be queried. */
35090 	uint8_t	lane_id;
35091 	uint8_t	unused[6];
35092 } __rte_packed_end;
35093 
35094 /* hwrm_port_tx_fir_qcfg_output (size:256b/32B) */
35095 struct __rte_packed_begin hwrm_port_tx_fir_qcfg_output {
35096 	/* The specific error status for the command. */
35097 	uint16_t	error_code;
35098 	/* The HWRM command request type. */
35099 	uint16_t	req_type;
35100 	/* The sequence ID from the original command. */
35101 	uint16_t	seq_id;
35102 	/* The length of the response data in number of bytes. */
35103 	uint16_t	resp_len;
35104 	/* Value1 of TX FIR, required for NRZ or PAM4. */
35105 	uint32_t	txfir_val_1;
35106 	/* Value2 of TX FIR, required for NRZ or PAM4. */
35107 	uint32_t	txfir_val_2;
35108 	/* Value3 of TX FIR, required for PAM4. */
35109 	uint32_t	txfir_val_3;
35110 	/* Value4 of TX FIR, required for PAM4. */
35111 	uint32_t	txfir_val_4;
35112 	uint8_t	unused[7];
35113 	/*
35114 	 * This field is used in Output records to indicate that the output
35115 	 * is completely written to RAM. This field should be read as '1'
35116 	 * to indicate that the output has been completely written. When
35117 	 * writing a command completion or response to an internal processor,
35118 	 * the order of writes has to be such that this field is written last.
35119 	 */
35120 	uint8_t	valid;
35121 } __rte_packed_end;
35122 
35123 /***********************
35124  * hwrm_port_ep_tx_cfg *
35125  ***********************/
35126 
35127 
35128 /* hwrm_port_ep_tx_cfg_input (size:256b/32B) */
35129 struct __rte_packed_begin hwrm_port_ep_tx_cfg_input {
35130 	/* The HWRM command request type. */
35131 	uint16_t	req_type;
35132 	/*
35133 	 * The completion ring to send the completion event on. This should
35134 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
35135 	 */
35136 	uint16_t	cmpl_ring;
35137 	/*
35138 	 * The sequence ID is used by the driver for tracking multiple
35139 	 * commands. This ID is treated as opaque data by the firmware and
35140 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
35141 	 */
35142 	uint16_t	seq_id;
35143 	/*
35144 	 * The target ID of the command:
35145 	 * * 0x0-0xFFF8 - The function ID
35146 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
35147 	 * * 0xFFFD - Reserved for user-space HWRM interface
35148 	 * * 0xFFFF - HWRM
35149 	 */
35150 	uint16_t	target_id;
35151 	/*
35152 	 * A physical address pointer pointing to a host buffer that the
35153 	 * command's response data will be written. This can be either a host
35154 	 * physical address (HPA) or a guest physical address (GPA) and must
35155 	 * point to a physically contiguous block of memory.
35156 	 */
35157 	uint64_t	resp_addr;
35158 	uint16_t	enables;
35159 	/* When this bit is '1', the value in the ep0_min_bw field is valid. */
35160 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP0_MIN_BW     UINT32_C(0x1)
35161 	/* When this bit is '1', the value in the ep0_max_bw field is valid. */
35162 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP0_MAX_BW     UINT32_C(0x2)
35163 	/* When this bit is '1', the value in the ep1_min_bw field is valid. */
35164 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP1_MIN_BW     UINT32_C(0x4)
35165 	/* When this bit is '1', the value in the ep1_max_bw field is valid. */
35166 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP1_MAX_BW     UINT32_C(0x8)
35167 	/* When this bit is '1', the value in the ep2_min_bw field is valid. */
35168 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP2_MIN_BW     UINT32_C(0x10)
35169 	/* When this bit is '1', the value in the ep2_max_bw field is valid. */
35170 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP2_MAX_BW     UINT32_C(0x20)
35171 	/* When this bit is '1', the value in the ep3_min_bw field is valid. */
35172 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP3_MIN_BW     UINT32_C(0x40)
35173 	/* When this bit is '1', the value in the ep3_max_bw field is valid. */
35174 	#define HWRM_PORT_EP_TX_CFG_INPUT_ENABLES_EP3_MAX_BW     UINT32_C(0x80)
35175 	/* A port index, from 0 to the number of front panel ports, minus 1. */
35176 	uint8_t	port_id;
35177 	uint8_t	unused;
35178 	/*
35179 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
35180 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 0 for
35181 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
35182 	 * minimum rate. The endpoint's min_bw must be less than or equal to
35183 	 * max_bw. The sum of all configured minimum bandwidths for a port must
35184 	 * be less than or equal to 100.
35185 	 */
35186 	uint8_t	ep0_min_bw;
35187 	/*
35188 	 * Specifies the maximum portion of the port's bandwidth that the set
35189 	 * of PFs and VFs on PCIe endpoint 0 may use. The value is a percentage
35190 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
35191 	 * maximum rate.
35192 	 */
35193 	uint8_t	ep0_max_bw;
35194 	/*
35195 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
35196 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 1 for
35197 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
35198 	 * minimum rate. The endpoint's min_bw must be less than or equal to
35199 	 * max_bw. The sum of all configured minimum bandwidths for a port must
35200 	 * be less than or equal to 100.
35201 	 */
35202 	uint8_t	ep1_min_bw;
35203 	/*
35204 	 * Specifies the maximum portion of the port's bandwidth that the set
35205 	 * of PFs and VFs on PCIe endpoint 1 may use. The value is a percentage
35206 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
35207 	 * maximum rate.
35208 	 */
35209 	uint8_t	ep1_max_bw;
35210 	/*
35211 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
35212 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 2 for
35213 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
35214 	 * minimum rate. The endpoint's min_bw must be less than or equal to
35215 	 * max_bw. The sum of all configured minimum bandwidths for a port must
35216 	 * be less than or equal to 100.
35217 	 */
35218 	uint8_t	ep2_min_bw;
35219 	/*
35220 	 * Specifies the maximum portion of the port's bandwidth that the set
35221 	 * of PFs and VFs on PCIe endpoint 2 may use. The value is a percentage
35222 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
35223 	 * maximum rate.
35224 	 */
35225 	uint8_t	ep2_max_bw;
35226 	/*
35227 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
35228 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 3 for
35229 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
35230 	 * minimum rate. The endpoint's min_bw must be less than or equal to
35231 	 * max_bw. The sum of all configured minimum bandwidths for a port must
35232 	 * be less than or equal to 100.
35233 	 */
35234 	uint8_t	ep3_min_bw;
35235 	/*
35236 	 * Specifies the maximum portion of the port's bandwidth that the set
35237 	 * of PFs and VFs on PCIe endpoint 3 may use. The value is a percentage
35238 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
35239 	 * maximum rate.
35240 	 */
35241 	uint8_t	ep3_max_bw;
35242 	uint8_t	unused_1[4];
35243 } __rte_packed_end;
35244 
35245 /* hwrm_port_ep_tx_cfg_output (size:128b/16B) */
35246 struct __rte_packed_begin hwrm_port_ep_tx_cfg_output {
35247 	/* The specific error status for the command. */
35248 	uint16_t	error_code;
35249 	/* The HWRM command request type. */
35250 	uint16_t	req_type;
35251 	/* The sequence ID from the original command. */
35252 	uint16_t	seq_id;
35253 	/* The length of the response data in number of bytes. */
35254 	uint16_t	resp_len;
35255 	uint8_t	unused_0[7];
35256 	/*
35257 	 * This field is used in output records to indicate that the output
35258 	 * is completely written to RAM. This field should be read as '1'
35259 	 * to indicate that the output has been completely written.
35260 	 * When writing a command completion or response to an internal
35261 	 * processor, the order of writes has to be such that this field
35262 	 * is written last.
35263 	 */
35264 	uint8_t	valid;
35265 } __rte_packed_end;
35266 
35267 /* hwrm_port_ep_tx_cfg_cmd_err (size:64b/8B) */
35268 struct __rte_packed_begin hwrm_port_ep_tx_cfg_cmd_err {
35269 	/*
35270 	 * command specific error codes for the cmd_err field in
35271 	 * hwrm_err_output
35272 	 */
35273 	uint8_t	code;
35274 	/* Unknown error. */
35275 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_UNKNOWN \
35276 		UINT32_C(0x0)
35277 	/* The port ID is invalid */
35278 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_PORT_ID_INVALID \
35279 		UINT32_C(0x1)
35280 	/* One of the PCIe endpoints configured is not active. */
35281 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_EP_INACTIVE \
35282 		UINT32_C(0x2)
35283 	/* A minimum bandwidth is out of range. */
35284 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_MIN_BW_RANGE \
35285 		UINT32_C(0x3)
35286 	/*
35287 	 * One endpoint's minimum bandwidth is more than its maximum
35288 	 * bandwidth.
35289 	 */
35290 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_MIN_MORE_THAN_MAX \
35291 		UINT32_C(0x4)
35292 	/* The sum of the minimum bandwidths on the port is more than 100%. */
35293 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_MIN_BW_SUM \
35294 		UINT32_C(0x5)
35295 	/*
35296 	 * The NIC does not support enforcement of a minimum guaranteed
35297 	 * bandwidth for an endpoint.
35298 	 */
35299 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_MIN_BW_UNSUPPORTED \
35300 		UINT32_C(0x6)
35301 	#define HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_LAST \
35302 		HWRM_PORT_EP_TX_CFG_CMD_ERR_CODE_MIN_BW_UNSUPPORTED
35303 	uint8_t	unused_0[7];
35304 } __rte_packed_end;
35305 
35306 /************************
35307  * hwrm_port_ep_tx_qcfg *
35308  ************************/
35309 
35310 
35311 /* hwrm_port_ep_tx_qcfg_input (size:192b/24B) */
35312 struct __rte_packed_begin hwrm_port_ep_tx_qcfg_input {
35313 	/* The HWRM command request type. */
35314 	uint16_t	req_type;
35315 	/*
35316 	 * The completion ring to send the completion event on. This should
35317 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
35318 	 */
35319 	uint16_t	cmpl_ring;
35320 	/*
35321 	 * The sequence ID is used by the driver for tracking multiple
35322 	 * commands. This ID is treated as opaque data by the firmware and
35323 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
35324 	 */
35325 	uint16_t	seq_id;
35326 	/*
35327 	 * The target ID of the command:
35328 	 * * 0x0-0xFFF8 - The function ID
35329 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
35330 	 * * 0xFFFD - Reserved for user-space HWRM interface
35331 	 * * 0xFFFF - HWRM
35332 	 */
35333 	uint16_t	target_id;
35334 	/*
35335 	 * A physical address pointer pointing to a host buffer that the
35336 	 * command's response data will be written. This can be either a host
35337 	 * physical address (HPA) or a guest physical address (GPA) and must
35338 	 * point to a physically contiguous block of memory.
35339 	 */
35340 	uint64_t	resp_addr;
35341 	/* The port whose endpoint rate limits are queried. */
35342 	uint8_t	port_id;
35343 	uint8_t	unused[7];
35344 } __rte_packed_end;
35345 
35346 /* hwrm_port_ep_tx_qcfg_output (size:192b/24B) */
35347 struct __rte_packed_begin hwrm_port_ep_tx_qcfg_output {
35348 	/* The specific error status for the command. */
35349 	uint16_t	error_code;
35350 	/* The HWRM command request type. */
35351 	uint16_t	req_type;
35352 	/* The sequence ID from the original command. */
35353 	uint16_t	seq_id;
35354 	/* The length of the response data in number of bytes. */
35355 	uint16_t	resp_len;
35356 	/*
35357 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
35358 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 0 for
35359 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
35360 	 * minimum rate. The endpoint's min_bw must be less than or equal to
35361 	 * max_bw. The sum of all configured minimum bandwidths for a port must
35362 	 * be less than or equal to 100.
35363 	 */
35364 	uint8_t	ep0_min_bw;
35365 	/*
35366 	 * Specifies the maximum portion of the port's bandwidth that the set
35367 	 * of PFs and VFs on PCIe endpoint 0 may use. The value is a percentage
35368 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
35369 	 * maximum rate.
35370 	 */
35371 	uint8_t	ep0_max_bw;
35372 	/*
35373 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
35374 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 1 for
35375 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
35376 	 * minimum rate. The endpoint's min_bw must be less than or equal to
35377 	 * max_bw. The sum of all configured minimum bandwidths for a port must
35378 	 * be less than or equal to 100.
35379 	 */
35380 	uint8_t	ep1_min_bw;
35381 	/*
35382 	 * Specifies the maximum portion of the port's bandwidth that the set
35383 	 * of PFs and VFs on PCIe endpoint 1 may use. The value is a percentage
35384 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
35385 	 * maximum rate.
35386 	 */
35387 	uint8_t	ep1_max_bw;
35388 	/*
35389 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
35390 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 2 for
35391 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
35392 	 * minimum rate. The endpoint's min_bw must be less than or equal to
35393 	 * max_bw. The sum of all configured minimum bandwidths for a port must
35394 	 * be less than or equal to 100.
35395 	 */
35396 	uint8_t	ep2_min_bw;
35397 	/*
35398 	 * Specifies the maximum portion of the port's bandwidth that the set
35399 	 * of PFs and VFs on PCIe endpoint 2 may use. The value is a percentage
35400 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
35401 	 * maximum rate.
35402 	 */
35403 	uint8_t	ep2_max_bw;
35404 	/*
35405 	 * Specifies a minimum guaranteed bandwidth, as a percentage of the
35406 	 * port bandwidth, for the set of PFs and VFs on PCIe endpoint 3 for
35407 	 * the specified port. The range is 0 to 100. A value of 0 indicates no
35408 	 * minimum rate. The endpoint's min_bw must be less than or equal to
35409 	 * max_bw. The sum of all configured minimum bandwidths for a port must
35410 	 * be less than or equal to 100.
35411 	 */
35412 	uint8_t	ep3_min_bw;
35413 	/*
35414 	 * Specifies the maximum portion of the port's bandwidth that the set
35415 	 * of PFs and VFs on PCIe endpoint 3 may use. The value is a percentage
35416 	 * of the link bandwidth, from 0 to 100. A value of 0 indicates no
35417 	 * maximum rate.
35418 	 */
35419 	uint8_t	ep3_max_bw;
35420 	uint8_t	unused_0[7];
35421 	/*
35422 	 * This field is used in output records to indicate that the output
35423 	 * is completely written to RAM. This field should be read as '1'
35424 	 * to indicate that the output has been completely written.
35425 	 * When writing a command completion or response to an internal
35426 	 * processor, the order of writes has to be such that this field is
35427 	 * written last.
35428 	 */
35429 	uint8_t	valid;
35430 } __rte_packed_end;
35431 
35432 /*****************
35433  * hwrm_port_cfg *
35434  *****************/
35435 
35436 
35437 /* hwrm_port_cfg_input (size:256b/32B) */
35438 struct __rte_packed_begin hwrm_port_cfg_input {
35439 	/* The HWRM command request type. */
35440 	uint16_t	req_type;
35441 	/*
35442 	 * The completion ring to send the completion event on. This should
35443 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
35444 	 */
35445 	uint16_t	cmpl_ring;
35446 	/*
35447 	 * The sequence ID is used by the driver for tracking multiple
35448 	 * commands. This ID is treated as opaque data by the firmware and
35449 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
35450 	 */
35451 	uint16_t	seq_id;
35452 	/*
35453 	 * The target ID of the command:
35454 	 * * 0x0-0xFFF8 - The function ID
35455 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
35456 	 * * 0xFFFD - Reserved for user-space HWRM interface
35457 	 * * 0xFFFF - HWRM
35458 	 */
35459 	uint16_t	target_id;
35460 	/*
35461 	 * A physical address pointer pointing to a host buffer that the
35462 	 * command's response data will be written. This can be either a host
35463 	 * physical address (HPA) or a guest physical address (GPA) and must
35464 	 * point to a physically contiguous block of memory.
35465 	 */
35466 	uint64_t	resp_addr;
35467 	uint32_t	flags;
35468 	uint32_t	enables;
35469 	/*
35470 	 * This bit must be '1' for the tx_rate_limit field to
35471 	 * be configured.
35472 	 */
35473 	#define HWRM_PORT_CFG_INPUT_ENABLES_TX_RATE_LIMIT     UINT32_C(0x1)
35474 	/* Port ID of port that is to be configured. */
35475 	uint16_t	port_id;
35476 	uint16_t	unused_0;
35477 	/*
35478 	 * Requested setting of TX rate limit in Mbps.
35479 	 * tx_rate_limit = 0 will cancel the rate limit if any.
35480 	 * This field is valid only when tx_rate_limit bit in 'enables'
35481 	 * field is '1'.
35482 	 */
35483 	uint32_t	tx_rate_limit;
35484 } __rte_packed_end;
35485 
35486 /* hwrm_port_cfg_output (size:128b/16B) */
35487 struct __rte_packed_begin hwrm_port_cfg_output {
35488 	/* The specific error status for the command. */
35489 	uint16_t	error_code;
35490 	/* The HWRM command request type. */
35491 	uint16_t	req_type;
35492 	/* The sequence ID from the original command. */
35493 	uint16_t	seq_id;
35494 	/* The length of the response data in number of bytes. */
35495 	uint16_t	resp_len;
35496 	uint8_t	unused_0[7];
35497 	/*
35498 	 * This field is used in Output records to indicate that the output
35499 	 * is completely written to RAM. This field should be read as '1'
35500 	 * to indicate that the output has been completely written. When
35501 	 * writing a command completion or response to an internal processor,
35502 	 * the order of writes has to be such that this field is written last.
35503 	 */
35504 	uint8_t	valid;
35505 } __rte_packed_end;
35506 
35507 /******************
35508  * hwrm_port_qcfg *
35509  ******************/
35510 
35511 
35512 /* hwrm_port_qcfg_input (size:192b/24B) */
35513 struct __rte_packed_begin hwrm_port_qcfg_input {
35514 	/* The HWRM command request type. */
35515 	uint16_t	req_type;
35516 	/*
35517 	 * The completion ring to send the completion event on. This should
35518 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
35519 	 */
35520 	uint16_t	cmpl_ring;
35521 	/*
35522 	 * The sequence ID is used by the driver for tracking multiple
35523 	 * commands. This ID is treated as opaque data by the firmware and
35524 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
35525 	 */
35526 	uint16_t	seq_id;
35527 	/*
35528 	 * The target ID of the command:
35529 	 * * 0x0-0xFFF8 - The function ID
35530 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
35531 	 * * 0xFFFD - Reserved for user-space HWRM interface
35532 	 * * 0xFFFF - HWRM
35533 	 */
35534 	uint16_t	target_id;
35535 	/*
35536 	 * A physical address pointer pointing to a host buffer that the
35537 	 * command's response data will be written. This can be either a host
35538 	 * physical address (HPA) or a guest physical address (GPA) and must
35539 	 * point to a physically contiguous block of memory.
35540 	 */
35541 	uint64_t	resp_addr;
35542 	/* Port ID of port that is to be queried. */
35543 	uint16_t	port_id;
35544 	uint8_t	unused_0[6];
35545 } __rte_packed_end;
35546 
35547 /* hwrm_port_qcfg_output (size:192b/24B) */
35548 struct __rte_packed_begin hwrm_port_qcfg_output {
35549 	/* The specific error status for the command. */
35550 	uint16_t	error_code;
35551 	/* The HWRM command request type. */
35552 	uint16_t	req_type;
35553 	/* The sequence ID from the original command. */
35554 	uint16_t	seq_id;
35555 	/* The length of the response data in number of bytes. */
35556 	uint16_t	resp_len;
35557 	uint32_t	supported;
35558 	/*
35559 	 * If set to '1', then this bit indicates that TX rate limit
35560 	 * could be configured via hwrm_port_cfg command.
35561 	 */
35562 	#define HWRM_PORT_QCFG_OUTPUT_SUPPORTED_TX_RATE_LIMIT     UINT32_C(0x1)
35563 	uint32_t	enabled;
35564 	/*
35565 	 * If set to '1', then this bit indicates that TX rate limit
35566 	 * is enabled and could be found in tx_rate_limit field.
35567 	 */
35568 	#define HWRM_PORT_QCFG_OUTPUT_ENABLED_TX_RATE_LIMIT     UINT32_C(0x1)
35569 	/*
35570 	 * Current setting of TX rate limit in Mbps.
35571 	 * This field is valid only when tx_rate_limit bit in 'enabled'
35572 	 * field is '1'.
35573 	 */
35574 	uint32_t	tx_rate_limit;
35575 	uint8_t	unused_0[3];
35576 	/*
35577 	 * This field is used in Output records to indicate that the output
35578 	 * is completely written to RAM. This field should be read as '1'
35579 	 * to indicate that the output has been completely written. When
35580 	 * writing a command completion or response to an internal processor,
35581 	 * the order of writes has to be such that this field is written last.
35582 	 */
35583 	uint8_t	valid;
35584 } __rte_packed_end;
35585 
35586 /***********************
35587  * hwrm_port_mac_qcaps *
35588  ***********************/
35589 
35590 
35591 /* hwrm_port_mac_qcaps_input (size:192b/24B) */
35592 struct __rte_packed_begin hwrm_port_mac_qcaps_input {
35593 	/* The HWRM command request type. */
35594 	uint16_t	req_type;
35595 	/*
35596 	 * The completion ring to send the completion event on. This should
35597 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
35598 	 */
35599 	uint16_t	cmpl_ring;
35600 	/*
35601 	 * The sequence ID is used by the driver for tracking multiple
35602 	 * commands. This ID is treated as opaque data by the firmware and
35603 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
35604 	 */
35605 	uint16_t	seq_id;
35606 	/*
35607 	 * The target ID of the command:
35608 	 * * 0x0-0xFFF8 - The function ID
35609 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
35610 	 * * 0xFFFD - Reserved for user-space HWRM interface
35611 	 * * 0xFFFF - HWRM
35612 	 */
35613 	uint16_t	target_id;
35614 	/*
35615 	 * A physical address pointer pointing to a host buffer that the
35616 	 * command's response data will be written. This can be either a host
35617 	 * physical address (HPA) or a guest physical address (GPA) and must
35618 	 * point to a physically contiguous block of memory.
35619 	 */
35620 	uint64_t	resp_addr;
35621 	/* Port ID of port that is being queried. */
35622 	uint16_t	port_id;
35623 	uint8_t	unused_0[6];
35624 } __rte_packed_end;
35625 
35626 /* hwrm_port_mac_qcaps_output (size:128b/16B) */
35627 struct __rte_packed_begin hwrm_port_mac_qcaps_output {
35628 	/* The specific error status for the command. */
35629 	uint16_t	error_code;
35630 	/* The HWRM command request type. */
35631 	uint16_t	req_type;
35632 	/* The sequence ID from the original command. */
35633 	uint16_t	seq_id;
35634 	/* The length of the response data in number of bytes. */
35635 	uint16_t	resp_len;
35636 	/* MAC capability flags */
35637 	uint8_t	flags;
35638 	/*
35639 	 * If set to 1, then this field indicates that the
35640 	 * MAC does not support local loopback.
35641 	 */
35642 	#define HWRM_PORT_MAC_QCAPS_OUTPUT_FLAGS_LOCAL_LPBK_NOT_SUPPORTED \
35643 		UINT32_C(0x1)
35644 	/*
35645 	 * If set to 1, then this field indicates that the
35646 	 * MAC is capable of supporting remote loopback.
35647 	 */
35648 	#define HWRM_PORT_MAC_QCAPS_OUTPUT_FLAGS_REMOTE_LPBK_SUPPORTED \
35649 		UINT32_C(0x2)
35650 	uint8_t	unused_0[6];
35651 	/*
35652 	 * This field is used in Output records to indicate that the output
35653 	 * is completely written to RAM. This field should be read as '1'
35654 	 * to indicate that the output has been completely written. When
35655 	 * writing a command completion or response to an internal processor,
35656 	 * the order of writes has to be such that this field is written last.
35657 	 */
35658 	uint8_t	valid;
35659 } __rte_packed_end;
35660 
35661 /***********************
35662  * hwrm_queue_qportcfg *
35663  ***********************/
35664 
35665 
35666 /* hwrm_queue_qportcfg_input (size:192b/24B) */
35667 struct __rte_packed_begin hwrm_queue_qportcfg_input {
35668 	/* The HWRM command request type. */
35669 	uint16_t	req_type;
35670 	/*
35671 	 * The completion ring to send the completion event on. This should
35672 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
35673 	 */
35674 	uint16_t	cmpl_ring;
35675 	/*
35676 	 * The sequence ID is used by the driver for tracking multiple
35677 	 * commands. This ID is treated as opaque data by the firmware and
35678 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
35679 	 */
35680 	uint16_t	seq_id;
35681 	/*
35682 	 * The target ID of the command:
35683 	 * * 0x0-0xFFF8 - The function ID
35684 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
35685 	 * * 0xFFFD - Reserved for user-space HWRM interface
35686 	 * * 0xFFFF - HWRM
35687 	 */
35688 	uint16_t	target_id;
35689 	/*
35690 	 * A physical address pointer pointing to a host buffer that the
35691 	 * command's response data will be written. This can be either a host
35692 	 * physical address (HPA) or a guest physical address (GPA) and must
35693 	 * point to a physically contiguous block of memory.
35694 	 */
35695 	uint64_t	resp_addr;
35696 	uint32_t	flags;
35697 	/*
35698 	 * Enumeration denoting the RX, TX type of the resource.
35699 	 * This enumeration is used for resources that are similar for both
35700 	 * TX and RX paths of the chip.
35701 	 */
35702 	#define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH     UINT32_C(0x1)
35703 	/* tx path */
35704 	#define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_TX    UINT32_C(0x0)
35705 	/* rx path */
35706 	#define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_RX    UINT32_C(0x1)
35707 	#define HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_LAST \
35708 		HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_RX
35709 	/*
35710 	 * Port ID of port for which the queue configuration is being
35711 	 * queried. This field is only required when sent by IPC.
35712 	 */
35713 	uint16_t	port_id;
35714 	/*
35715 	 * Drivers will set this capability when it can use
35716 	 * queue_idx_service_profile to map the queues to application.
35717 	 */
35718 	uint8_t	drv_qmap_cap;
35719 	/* disabled */
35720 	#define HWRM_QUEUE_QPORTCFG_INPUT_DRV_QMAP_CAP_DISABLED UINT32_C(0x0)
35721 	/* enabled */
35722 	#define HWRM_QUEUE_QPORTCFG_INPUT_DRV_QMAP_CAP_ENABLED  UINT32_C(0x1)
35723 	#define HWRM_QUEUE_QPORTCFG_INPUT_DRV_QMAP_CAP_LAST \
35724 		HWRM_QUEUE_QPORTCFG_INPUT_DRV_QMAP_CAP_ENABLED
35725 	uint8_t	unused_0;
35726 } __rte_packed_end;
35727 
35728 /* hwrm_queue_qportcfg_output (size:1344b/168B) */
35729 struct __rte_packed_begin hwrm_queue_qportcfg_output {
35730 	/* The specific error status for the command. */
35731 	uint16_t	error_code;
35732 	/* The HWRM command request type. */
35733 	uint16_t	req_type;
35734 	/* The sequence ID from the original command. */
35735 	uint16_t	seq_id;
35736 	/* The length of the response data in number of bytes. */
35737 	uint16_t	resp_len;
35738 	/*
35739 	 * The maximum number of queues that can be configured on this
35740 	 * port.
35741 	 * Valid values range from 1 through 8.
35742 	 */
35743 	uint8_t	max_configurable_queues;
35744 	/*
35745 	 * The maximum number of lossless queues that can be configured
35746 	 * on this port.
35747 	 * Valid values range from 0 through 8.
35748 	 */
35749 	uint8_t	max_configurable_lossless_queues;
35750 	/*
35751 	 * Bitmask indicating which queues can be configured by the
35752 	 * hwrm_queue_cfg command.
35753 	 *
35754 	 * Each bit represents a specific queue where bit 0 represents
35755 	 * queue 0 and bit 7 represents queue 7.
35756 	 * # A value of 0 indicates that the queue is not configurable
35757 	 * by the hwrm_queue_cfg command.
35758 	 * # A value of 1 indicates that the queue is configurable.
35759 	 * # A hwrm_queue_cfg command shall return error when trying to
35760 	 * configure a queue not configurable.
35761 	 */
35762 	uint8_t	queue_cfg_allowed;
35763 	/* Information about queue configuration. */
35764 	uint8_t	queue_cfg_info;
35765 	/*
35766 	 * If this flag is set to '1', then the queues are
35767 	 * configured asymmetrically on TX and RX sides.
35768 	 * If this flag is set to '0', then the queues are
35769 	 * configured symmetrically on TX and RX sides. For
35770 	 * symmetric configuration, the queue configuration
35771 	 * including queue ids and service profiles on the
35772 	 * TX side is the same as the corresponding queue
35773 	 * configuration on the RX side.
35774 	 */
35775 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_CFG_INFO_ASYM_CFG \
35776 		UINT32_C(0x1)
35777 	/*
35778 	 * If this flag is set to '1', then service_profile will carry
35779 	 * either lossy/lossless type and the new service_profile_type
35780 	 * field will be used to determine if the queue is for L2/ROCE/CNP.
35781 	 */
35782 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_CFG_INFO_USE_PROFILE_TYPE \
35783 		UINT32_C(0x2)
35784 	/*
35785 	 * Bitmask indicating which queues can be configured by the
35786 	 * hwrm_queue_pfcenable_cfg command.
35787 	 *
35788 	 * Each bit represents a specific priority where bit 0 represents
35789 	 * priority 0 and bit 7 represents priority 7.
35790 	 * # A value of 0 indicates that the priority is not configurable by
35791 	 * the hwrm_queue_pfcenable_cfg command.
35792 	 * # A value of 1 indicates that the priority is configurable.
35793 	 * # A hwrm_queue_pfcenable_cfg command shall return error when
35794 	 * trying to configure a priority that is not configurable.
35795 	 */
35796 	uint8_t	queue_pfcenable_cfg_allowed;
35797 	/*
35798 	 * Bitmask indicating which queues can be configured by the
35799 	 * hwrm_queue_pri2cos_cfg command.
35800 	 *
35801 	 * Each bit represents a specific queue where bit 0 represents
35802 	 * queue 0 and bit 7 represents queue 7.
35803 	 * # A value of 0 indicates that the queue is not configurable
35804 	 * by the hwrm_queue_pri2cos_cfg command.
35805 	 * # A value of 1 indicates that the queue is configurable.
35806 	 * # A hwrm_queue_pri2cos_cfg command shall return error when
35807 	 * trying to configure a queue that is not configurable.
35808 	 */
35809 	uint8_t	queue_pri2cos_cfg_allowed;
35810 	/*
35811 	 * Bitmask indicating which queues can be configured by the
35812 	 * hwrm_queue_pri2cos_cfg command.
35813 	 *
35814 	 * Each bit represents a specific queue where bit 0 represents
35815 	 * queue 0 and bit 7 represents queue 7.
35816 	 * # A value of 0 indicates that the queue is not configurable
35817 	 * by the hwrm_queue_pri2cos_cfg command.
35818 	 * # A value of 1 indicates that the queue is configurable.
35819 	 * # A hwrm_queue_pri2cos_cfg command shall return error when
35820 	 * trying to configure a queue not configurable.
35821 	 */
35822 	uint8_t	queue_cos2bw_cfg_allowed;
35823 	/*
35824 	 * ID of CoS Queue 0.
35825 	 * FF - Invalid id
35826 	 *
35827 	 * # This ID can be used on any subsequent call to an hwrm command
35828 	 * that takes a queue id.
35829 	 * # IDs must always be queried by this command before any use
35830 	 * by the driver or software.
35831 	 * # The CoS queue index is obtained by applying modulo 10 to the
35832 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
35833 	 * The CoS queue index is used to reference port statistics for the
35834 	 * CoS queue.
35835 	 * # A value of 0xff indicates that the queue is not available.
35836 	 * # Available queues may not be in sequential order.
35837 	 */
35838 	uint8_t	queue_id0;
35839 	/* This value specifies service profile kind for CoS queue */
35840 	uint8_t	queue_id0_service_profile;
35841 	/* Lossy (best-effort) */
35842 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSY \
35843 		UINT32_C(0x0)
35844 	/* Lossless */
35845 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS \
35846 		UINT32_C(0x1)
35847 	/* Lossless RoCE (deprecated) */
35848 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS_ROCE \
35849 		UINT32_C(0x1)
35850 	/* Lossy RoCE CNP (deprecated) */
35851 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSY_ROCE_CNP \
35852 		UINT32_C(0x2)
35853 	/* Lossless NIC (deprecated) */
35854 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSLESS_NIC \
35855 		UINT32_C(0x3)
35856 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
35857 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN \
35858 		UINT32_C(0xff)
35859 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LAST \
35860 		HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN
35861 	/*
35862 	 * ID of CoS Queue 1.
35863 	 * FF - Invalid id
35864 	 *
35865 	 * # This ID can be used on any subsequent call to an hwrm command
35866 	 * that takes a queue id.
35867 	 * # IDs must always be queried by this command before any use
35868 	 * by the driver or software.
35869 	 * # The CoS queue index is obtained by applying modulo 10 to the
35870 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
35871 	 * The CoS queue index is used to reference port statistics for the
35872 	 * CoS queue.
35873 	 * # A value of 0xff indicates that the queue is not available.
35874 	 * # Available queues may not be in sequential order.
35875 	 */
35876 	uint8_t	queue_id1;
35877 	/* This value specifies service profile kind for CoS queue */
35878 	uint8_t	queue_id1_service_profile;
35879 	/* Lossy (best-effort) */
35880 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSY \
35881 		UINT32_C(0x0)
35882 	/* Lossless */
35883 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS \
35884 		UINT32_C(0x1)
35885 	/* Lossless RoCE (deprecated) */
35886 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS_ROCE \
35887 		UINT32_C(0x1)
35888 	/* Lossy RoCE CNP (deprecated) */
35889 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSY_ROCE_CNP \
35890 		UINT32_C(0x2)
35891 	/* Lossless NIC (deprecated) */
35892 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LOSSLESS_NIC \
35893 		UINT32_C(0x3)
35894 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
35895 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_UNKNOWN \
35896 		UINT32_C(0xff)
35897 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_LAST \
35898 		HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_UNKNOWN
35899 	/*
35900 	 * ID of CoS Queue 2.
35901 	 * FF - Invalid id
35902 	 *
35903 	 * # This ID can be used on any subsequent call to an hwrm command
35904 	 * that takes a queue id.
35905 	 * # IDs must always be queried by this command before any use
35906 	 * by the driver or software.
35907 	 * # The CoS queue index is obtained by applying modulo 10 to the
35908 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
35909 	 * The CoS queue index is used to reference port statistics for the
35910 	 * CoS queue.
35911 	 * # A value of 0xff indicates that the queue is not available.
35912 	 * # Available queues may not be in sequential order.
35913 	 */
35914 	uint8_t	queue_id2;
35915 	/* This value specifies service profile kind for CoS queue */
35916 	uint8_t	queue_id2_service_profile;
35917 	/* Lossy (best-effort) */
35918 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSY \
35919 		UINT32_C(0x0)
35920 	/* Lossless */
35921 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS \
35922 		UINT32_C(0x1)
35923 	/* Lossless RoCE (deprecated) */
35924 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS_ROCE \
35925 		UINT32_C(0x1)
35926 	/* Lossy RoCE CNP (deprecated) */
35927 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSY_ROCE_CNP \
35928 		UINT32_C(0x2)
35929 	/* Lossless NIC (deprecated) */
35930 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LOSSLESS_NIC \
35931 		UINT32_C(0x3)
35932 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
35933 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_UNKNOWN \
35934 		UINT32_C(0xff)
35935 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_LAST \
35936 		HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_UNKNOWN
35937 	/*
35938 	 * ID of CoS Queue 3.
35939 	 * FF - Invalid id
35940 	 *
35941 	 * # This ID can be used on any subsequent call to an hwrm command
35942 	 * that takes a queue id.
35943 	 * # IDs must always be queried by this command before any use
35944 	 * by the driver or software.
35945 	 * # The CoS queue index is obtained by applying modulo 10 to the
35946 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
35947 	 * The CoS queue index is used to reference port statistics for the
35948 	 * CoS queue.
35949 	 * # A value of 0xff indicates that the queue is not available.
35950 	 * # Available queues may not be in sequential order.
35951 	 */
35952 	uint8_t	queue_id3;
35953 	/* This value specifies service profile kind for CoS queue */
35954 	uint8_t	queue_id3_service_profile;
35955 	/* Lossy (best-effort) */
35956 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSY \
35957 		UINT32_C(0x0)
35958 	/* Lossless */
35959 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS \
35960 		UINT32_C(0x1)
35961 	/* Lossless RoCE (deprecated) */
35962 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS_ROCE \
35963 		UINT32_C(0x1)
35964 	/* Lossy RoCE CNP (deprecated) */
35965 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSY_ROCE_CNP \
35966 		UINT32_C(0x2)
35967 	/* Lossless NIC (deprecated) */
35968 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LOSSLESS_NIC \
35969 		UINT32_C(0x3)
35970 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
35971 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_UNKNOWN \
35972 		UINT32_C(0xff)
35973 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_LAST \
35974 		HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_UNKNOWN
35975 	/*
35976 	 * ID of CoS Queue 4.
35977 	 * FF - Invalid id
35978 	 *
35979 	 * # This ID can be used on any subsequent call to an hwrm command
35980 	 * that takes a queue id.
35981 	 * # IDs must always be queried by this command before any use
35982 	 * by the driver or software.
35983 	 * # The CoS queue index is obtained by applying modulo 10 to the
35984 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
35985 	 * The CoS queue index is used to reference port statistics for the
35986 	 * CoS queue.
35987 	 * # A value of 0xff indicates that the queue is not available.
35988 	 * # Available queues may not be in sequential order.
35989 	 */
35990 	uint8_t	queue_id4;
35991 	/* This value specifies service profile kind for CoS queue */
35992 	uint8_t	queue_id4_service_profile;
35993 	/* Lossy (best-effort) */
35994 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSY \
35995 		UINT32_C(0x0)
35996 	/* Lossless */
35997 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS \
35998 		UINT32_C(0x1)
35999 	/* Lossless RoCE (deprecated) */
36000 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS_ROCE \
36001 		UINT32_C(0x1)
36002 	/* Lossy RoCE CNP (deprecated) */
36003 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSY_ROCE_CNP \
36004 		UINT32_C(0x2)
36005 	/* Lossless NIC (deprecated) */
36006 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LOSSLESS_NIC \
36007 		UINT32_C(0x3)
36008 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
36009 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_UNKNOWN \
36010 		UINT32_C(0xff)
36011 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_LAST \
36012 		HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_UNKNOWN
36013 	/*
36014 	 * ID of CoS Queue 5.
36015 	 * FF - Invalid id
36016 	 *
36017 	 * # This ID can be used on any subsequent call to an hwrm command
36018 	 * that takes a queue id.
36019 	 * # IDs must always be queried by this command before any use
36020 	 * by the driver or software.
36021 	 * # The CoS queue index is obtained by applying modulo 10 to the
36022 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
36023 	 * The CoS queue index is used to reference port statistics for the
36024 	 * CoS queue.
36025 	 * # A value of 0xff indicates that the queue is not available.
36026 	 * # Available queues may not be in sequential order.
36027 	 */
36028 	uint8_t	queue_id5;
36029 	/* This value specifies service profile kind for CoS queue */
36030 	uint8_t	queue_id5_service_profile;
36031 	/* Lossy (best-effort) */
36032 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSY \
36033 		UINT32_C(0x0)
36034 	/* Lossless */
36035 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS \
36036 		UINT32_C(0x1)
36037 	/* Lossless RoCE (deprecated) */
36038 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS_ROCE \
36039 		UINT32_C(0x1)
36040 	/* Lossy RoCE CNP (deprecated) */
36041 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSY_ROCE_CNP \
36042 		UINT32_C(0x2)
36043 	/* Lossless NIC (deprecated) */
36044 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LOSSLESS_NIC \
36045 		UINT32_C(0x3)
36046 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
36047 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_UNKNOWN \
36048 		UINT32_C(0xff)
36049 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_LAST \
36050 		HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_UNKNOWN
36051 	/*
36052 	 * ID of CoS Queue 6.
36053 	 * FF - Invalid id
36054 	 *
36055 	 * # This ID can be used on any subsequent call to an hwrm command
36056 	 * that takes a queue id.
36057 	 * # IDs must always be queried by this command before any use
36058 	 * by the driver or software.
36059 	 * # The CoS queue index is obtained by applying modulo 10 to the
36060 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
36061 	 * The CoS queue index is used to reference port statistics for the
36062 	 * CoS queue.
36063 	 * # A value of 0xff indicates that the queue is not available.
36064 	 * # Available queues may not be in sequential order.
36065 	 */
36066 	uint8_t	queue_id6;
36067 	/* This value specifies service profile kind for CoS queue */
36068 	uint8_t	queue_id6_service_profile;
36069 	/* Lossy (best-effort) */
36070 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSY \
36071 		UINT32_C(0x0)
36072 	/* Lossless */
36073 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS \
36074 		UINT32_C(0x1)
36075 	/* Lossless RoCE (deprecated) */
36076 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS_ROCE \
36077 		UINT32_C(0x1)
36078 	/* Lossy RoCE CNP (deprecated) */
36079 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSY_ROCE_CNP \
36080 		UINT32_C(0x2)
36081 	/* Lossless NIC (deprecated) */
36082 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LOSSLESS_NIC \
36083 		UINT32_C(0x3)
36084 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
36085 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_UNKNOWN \
36086 		UINT32_C(0xff)
36087 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_LAST \
36088 		HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_UNKNOWN
36089 	/*
36090 	 * ID of CoS Queue 7.
36091 	 * FF - Invalid id
36092 	 *
36093 	 * # This ID can be used on any subsequent call to an hwrm command
36094 	 * that takes a queue id.
36095 	 * # IDs must always be queried by this command before any use
36096 	 * by the driver or software.
36097 	 * # The CoS queue index is obtained by applying modulo 10 to the
36098 	 * CoS queue ID. Valid CoS queue indexes are in the range of 0 to 7.
36099 	 * The CoS queue index is used to reference port statistics for the
36100 	 * CoS queue.
36101 	 * # A value of 0xff indicates that the queue is not available.
36102 	 * # Available queues may not be in sequential order.
36103 	 */
36104 	uint8_t	queue_id7;
36105 	/* This value specifies service profile kind for CoS queue */
36106 	uint8_t	queue_id7_service_profile;
36107 	/* Lossy (best-effort) */
36108 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSY \
36109 		UINT32_C(0x0)
36110 	/* Lossless */
36111 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS \
36112 		UINT32_C(0x1)
36113 	/* Lossless RoCE (deprecated) */
36114 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS_ROCE \
36115 		UINT32_C(0x1)
36116 	/* Lossy RoCE CNP (deprecated) */
36117 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSY_ROCE_CNP \
36118 		UINT32_C(0x2)
36119 	/* Lossless NIC (deprecated) */
36120 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LOSSLESS_NIC \
36121 		UINT32_C(0x3)
36122 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
36123 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_UNKNOWN \
36124 		UINT32_C(0xff)
36125 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_LAST \
36126 		HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_UNKNOWN
36127 	/*
36128 	 * This value specifies traffic type for the service profile. We can
36129 	 * have a TC mapped to multiple traffic types. For example shared
36130 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
36131 	 * A value of zero is considered as invalid.
36132 	 */
36133 	uint8_t	queue_id0_service_profile_type;
36134 	/* Recommended to be used for RoCE traffic only. */
36135 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_TYPE_ROCE \
36136 		UINT32_C(0x1)
36137 	/* Recommended to be used for NIC/L2 traffic only. */
36138 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_TYPE_NIC \
36139 		UINT32_C(0x2)
36140 	/* Recommended to be used for CNP traffic only. */
36141 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_TYPE_CNP \
36142 		UINT32_C(0x4)
36143 	/*
36144 	 * Up to 16 bytes of null padded ASCII string describing this queue.
36145 	 * The queue name includes a CoS queue index and, in some cases, text
36146 	 * that distinguishes the queue from other queues in the group.
36147 	 */
36148 	char	qid0_name[16];
36149 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
36150 	char	qid1_name[16];
36151 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
36152 	char	qid2_name[16];
36153 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
36154 	char	qid3_name[16];
36155 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
36156 	char	qid4_name[16];
36157 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
36158 	char	qid5_name[16];
36159 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
36160 	char	qid6_name[16];
36161 	/* Up to 16 bytes of null padded ASCII string describing this queue. */
36162 	char	qid7_name[16];
36163 	/*
36164 	 * This value specifies traffic type for the service profile. We can
36165 	 * have a TC mapped to multiple traffic types. For example shared
36166 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
36167 	 * A value of zero is considered as invalid.
36168 	 */
36169 	uint8_t	queue_id1_service_profile_type;
36170 	/* Recommended to be used for RoCE traffic only. */
36171 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_TYPE_ROCE \
36172 		UINT32_C(0x1)
36173 	/* Recommended to be used for NIC/L2 traffic only. */
36174 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_TYPE_NIC \
36175 		UINT32_C(0x2)
36176 	/* Recommended to be used for CNP traffic only. */
36177 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID1_SERVICE_PROFILE_TYPE_CNP \
36178 		UINT32_C(0x4)
36179 	/*
36180 	 * This value specifies traffic type for the service profile. We can
36181 	 * have a TC mapped to multiple traffic types. For example shared
36182 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
36183 	 * A value of zero is considered as invalid.
36184 	 */
36185 	uint8_t	queue_id2_service_profile_type;
36186 	/* Recommended to be used for RoCE traffic only. */
36187 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_TYPE_ROCE \
36188 		UINT32_C(0x1)
36189 	/* Recommended to be used for NIC/L2 traffic only. */
36190 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_TYPE_NIC \
36191 		UINT32_C(0x2)
36192 	/* Recommended to be used for CNP traffic only. */
36193 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID2_SERVICE_PROFILE_TYPE_CNP \
36194 		UINT32_C(0x4)
36195 	/*
36196 	 * This value specifies traffic type for the service profile. We can
36197 	 * have a TC mapped to multiple traffic types. For example shared
36198 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
36199 	 * A value of zero is considered as invalid.
36200 	 */
36201 	uint8_t	queue_id3_service_profile_type;
36202 	/* Recommended to be used for RoCE traffic only. */
36203 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_TYPE_ROCE \
36204 		UINT32_C(0x1)
36205 	/* Recommended to be used for NIC/L2 traffic only. */
36206 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_TYPE_NIC \
36207 		UINT32_C(0x2)
36208 	/* Recommended to be used for CNP traffic only. */
36209 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID3_SERVICE_PROFILE_TYPE_CNP \
36210 		UINT32_C(0x4)
36211 	/*
36212 	 * This value specifies traffic type for the service profile. We can
36213 	 * have a TC mapped to multiple traffic types. For example shared
36214 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
36215 	 * A value of zero is considered as invalid.
36216 	 */
36217 	uint8_t	queue_id4_service_profile_type;
36218 	/* Recommended to be used for RoCE traffic only. */
36219 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_TYPE_ROCE \
36220 		UINT32_C(0x1)
36221 	/* Recommended to be used for NIC/L2 traffic only. */
36222 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_TYPE_NIC \
36223 		UINT32_C(0x2)
36224 	/* Recommended to be used for CNP traffic only. */
36225 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID4_SERVICE_PROFILE_TYPE_CNP \
36226 		UINT32_C(0x4)
36227 	/*
36228 	 * This value specifies traffic type for the service profile. We can
36229 	 * have a TC mapped to multiple traffic types. For example shared
36230 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
36231 	 * A value of zero is considered as invalid.
36232 	 */
36233 	uint8_t	queue_id5_service_profile_type;
36234 	/* Recommended to be used for RoCE traffic only. */
36235 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_TYPE_ROCE \
36236 		UINT32_C(0x1)
36237 	/* Recommended to be used for NIC/L2 traffic only. */
36238 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_TYPE_NIC \
36239 		UINT32_C(0x2)
36240 	/* Recommended to be used for CNP traffic only. */
36241 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID5_SERVICE_PROFILE_TYPE_CNP \
36242 		UINT32_C(0x4)
36243 	/*
36244 	 * This value specifies traffic type for the service profile. We can
36245 	 * have a TC mapped to multiple traffic types. For example shared
36246 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
36247 	 * A value of zero is considered as invalid.
36248 	 */
36249 	uint8_t	queue_id6_service_profile_type;
36250 	/* Recommended to be used for RoCE traffic only. */
36251 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_TYPE_ROCE \
36252 		UINT32_C(0x1)
36253 	/* Recommended to be used for NIC/L2 traffic only. */
36254 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_TYPE_NIC \
36255 		UINT32_C(0x2)
36256 	/* Recommended to be used for CNP traffic only. */
36257 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID6_SERVICE_PROFILE_TYPE_CNP \
36258 		UINT32_C(0x4)
36259 	/*
36260 	 * This value specifies traffic type for the service profile. We can
36261 	 * have a TC mapped to multiple traffic types. For example shared
36262 	 * CoS Q for CNP and NIC will have both cnp and nic bits set (0x6).
36263 	 * A value of zero is considered as invalid.
36264 	 */
36265 	uint8_t	queue_id7_service_profile_type;
36266 	/* Recommended to be used for RoCE traffic only. */
36267 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_TYPE_ROCE \
36268 		UINT32_C(0x1)
36269 	/* Recommended to be used for NIC/L2 traffic only. */
36270 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_TYPE_NIC \
36271 		UINT32_C(0x2)
36272 	/* Recommended to be used for CNP traffic only. */
36273 	#define HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID7_SERVICE_PROFILE_TYPE_CNP \
36274 		UINT32_C(0x4)
36275 	/*
36276 	 * This field is used in Output records to indicate that the output
36277 	 * is completely written to RAM. This field should be read as '1'
36278 	 * to indicate that the output has been completely written. When
36279 	 * writing a command completion or response to an internal processor,
36280 	 * the order of writes has to be such that this field is written last.
36281 	 */
36282 	uint8_t	valid;
36283 } __rte_packed_end;
36284 
36285 /*******************
36286  * hwrm_queue_qcfg *
36287  *******************/
36288 
36289 
36290 /* hwrm_queue_qcfg_input (size:192b/24B) */
36291 struct __rte_packed_begin hwrm_queue_qcfg_input {
36292 	/* The HWRM command request type. */
36293 	uint16_t	req_type;
36294 	/*
36295 	 * The completion ring to send the completion event on. This should
36296 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36297 	 */
36298 	uint16_t	cmpl_ring;
36299 	/*
36300 	 * The sequence ID is used by the driver for tracking multiple
36301 	 * commands. This ID is treated as opaque data by the firmware and
36302 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36303 	 */
36304 	uint16_t	seq_id;
36305 	/*
36306 	 * The target ID of the command:
36307 	 * * 0x0-0xFFF8 - The function ID
36308 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36309 	 * * 0xFFFD - Reserved for user-space HWRM interface
36310 	 * * 0xFFFF - HWRM
36311 	 */
36312 	uint16_t	target_id;
36313 	/*
36314 	 * A physical address pointer pointing to a host buffer that the
36315 	 * command's response data will be written. This can be either a host
36316 	 * physical address (HPA) or a guest physical address (GPA) and must
36317 	 * point to a physically contiguous block of memory.
36318 	 */
36319 	uint64_t	resp_addr;
36320 	uint32_t	flags;
36321 	/*
36322 	 * Enumeration denoting the RX, TX type of the resource.
36323 	 * This enumeration is used for resources that are similar for both
36324 	 * TX and RX paths of the chip.
36325 	 */
36326 	#define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH     UINT32_C(0x1)
36327 	/* tx path */
36328 	#define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_TX    UINT32_C(0x0)
36329 	/* rx path */
36330 	#define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_RX    UINT32_C(0x1)
36331 	#define HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_LAST \
36332 		HWRM_QUEUE_QCFG_INPUT_FLAGS_PATH_RX
36333 	/* Queue ID of the queue. */
36334 	uint32_t	queue_id;
36335 } __rte_packed_end;
36336 
36337 /* hwrm_queue_qcfg_output (size:128b/16B) */
36338 struct __rte_packed_begin hwrm_queue_qcfg_output {
36339 	/* The specific error status for the command. */
36340 	uint16_t	error_code;
36341 	/* The HWRM command request type. */
36342 	uint16_t	req_type;
36343 	/* The sequence ID from the original command. */
36344 	uint16_t	seq_id;
36345 	/* The length of the response data in number of bytes. */
36346 	uint16_t	resp_len;
36347 	/*
36348 	 * This value is the estimate packet length used in the
36349 	 * TX arbiter.
36350 	 */
36351 	uint32_t	queue_len;
36352 	/* This value is applicable to CoS queues only. */
36353 	uint8_t	service_profile;
36354 	/* Lossy (best-effort) */
36355 	#define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_LOSSY    UINT32_C(0x0)
36356 	/* Lossless */
36357 	#define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1)
36358 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
36359 	#define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_UNKNOWN  UINT32_C(0xff)
36360 	#define HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_LAST \
36361 		HWRM_QUEUE_QCFG_OUTPUT_SERVICE_PROFILE_UNKNOWN
36362 	/* Information about queue configuration. */
36363 	uint8_t	queue_cfg_info;
36364 	/*
36365 	 * If this flag is set to '1', then the queue is
36366 	 * configured asymmetrically on TX and RX sides.
36367 	 * If this flag is set to '0', then this queue is
36368 	 * configured symmetrically on TX and RX sides.
36369 	 */
36370 	#define HWRM_QUEUE_QCFG_OUTPUT_QUEUE_CFG_INFO_ASYM_CFG \
36371 		UINT32_C(0x1)
36372 	uint8_t	unused_0;
36373 	/*
36374 	 * This field is used in Output records to indicate that the output
36375 	 * is completely written to RAM. This field should be read as '1'
36376 	 * to indicate that the output has been completely written. When
36377 	 * writing a command completion or response to an internal processor,
36378 	 * the order of writes has to be such that this field is written last.
36379 	 */
36380 	uint8_t	valid;
36381 } __rte_packed_end;
36382 
36383 /******************
36384  * hwrm_queue_cfg *
36385  ******************/
36386 
36387 
36388 /* hwrm_queue_cfg_input (size:320b/40B) */
36389 struct __rte_packed_begin hwrm_queue_cfg_input {
36390 	/* The HWRM command request type. */
36391 	uint16_t	req_type;
36392 	/*
36393 	 * The completion ring to send the completion event on. This should
36394 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36395 	 */
36396 	uint16_t	cmpl_ring;
36397 	/*
36398 	 * The sequence ID is used by the driver for tracking multiple
36399 	 * commands. This ID is treated as opaque data by the firmware and
36400 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36401 	 */
36402 	uint16_t	seq_id;
36403 	/*
36404 	 * The target ID of the command:
36405 	 * * 0x0-0xFFF8 - The function ID
36406 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36407 	 * * 0xFFFD - Reserved for user-space HWRM interface
36408 	 * * 0xFFFF - HWRM
36409 	 */
36410 	uint16_t	target_id;
36411 	/*
36412 	 * A physical address pointer pointing to a host buffer that the
36413 	 * command's response data will be written. This can be either a host
36414 	 * physical address (HPA) or a guest physical address (GPA) and must
36415 	 * point to a physically contiguous block of memory.
36416 	 */
36417 	uint64_t	resp_addr;
36418 	uint32_t	flags;
36419 	/*
36420 	 * Enumeration denoting the RX, TX, or both directions applicable to
36421 	 * the resource. This enumeration is used for resources that are
36422 	 * similar for both TX and RX paths of the chip.
36423 	 */
36424 	#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_MASK UINT32_C(0x3)
36425 	#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_SFT  0
36426 	/* tx path */
36427 	#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_TX     UINT32_C(0x0)
36428 	/* rx path */
36429 	#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_RX     UINT32_C(0x1)
36430 	/* Bi-directional (Symmetrically applicable to TX and RX paths) */
36431 	#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_BIDIR  UINT32_C(0x2)
36432 	#define HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_LAST \
36433 		HWRM_QUEUE_CFG_INPUT_FLAGS_PATH_BIDIR
36434 	uint32_t	enables;
36435 	/*
36436 	 * This bit must be '1' for the dflt_len field to be
36437 	 * configured.
36438 	 */
36439 	#define HWRM_QUEUE_CFG_INPUT_ENABLES_DFLT_LEN            UINT32_C(0x1)
36440 	/*
36441 	 * This bit must be '1' for the service_profile field to be
36442 	 * configured.
36443 	 */
36444 	#define HWRM_QUEUE_CFG_INPUT_ENABLES_SERVICE_PROFILE     UINT32_C(0x2)
36445 	/* Queue ID of queue that is to be configured by this function. */
36446 	uint32_t	queue_id;
36447 	/*
36448 	 * This value is a the estimate packet length used in the
36449 	 * TX arbiter.
36450 	 * Set to 0xFF... (All Fs) to not adjust this value.
36451 	 */
36452 	uint32_t	dflt_len;
36453 	/* This value is applicable to CoS queues only. */
36454 	uint8_t	service_profile;
36455 	/* Lossy (best-effort) */
36456 	#define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_LOSSY    UINT32_C(0x0)
36457 	/* Lossless */
36458 	#define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_LOSSLESS UINT32_C(0x1)
36459 	/* Set to 0xFF... (All Fs) if there is no service profile specified */
36460 	#define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_UNKNOWN  UINT32_C(0xff)
36461 	#define HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_LAST \
36462 		HWRM_QUEUE_CFG_INPUT_SERVICE_PROFILE_UNKNOWN
36463 	uint8_t	unused_0[7];
36464 } __rte_packed_end;
36465 
36466 /* hwrm_queue_cfg_output (size:128b/16B) */
36467 struct __rte_packed_begin hwrm_queue_cfg_output {
36468 	/* The specific error status for the command. */
36469 	uint16_t	error_code;
36470 	/* The HWRM command request type. */
36471 	uint16_t	req_type;
36472 	/* The sequence ID from the original command. */
36473 	uint16_t	seq_id;
36474 	/* The length of the response data in number of bytes. */
36475 	uint16_t	resp_len;
36476 	uint8_t	unused_0[7];
36477 	/*
36478 	 * This field is used in Output records to indicate that the output
36479 	 * is completely written to RAM. This field should be read as '1'
36480 	 * to indicate that the output has been completely written. When
36481 	 * writing a command completion or response to an internal processor,
36482 	 * the order of writes has to be such that this field is written last.
36483 	 */
36484 	uint8_t	valid;
36485 } __rte_packed_end;
36486 
36487 /*****************************
36488  * hwrm_queue_pfcenable_qcfg *
36489  *****************************/
36490 
36491 
36492 /* hwrm_queue_pfcenable_qcfg_input (size:192b/24B) */
36493 struct __rte_packed_begin hwrm_queue_pfcenable_qcfg_input {
36494 	/* The HWRM command request type. */
36495 	uint16_t	req_type;
36496 	/*
36497 	 * The completion ring to send the completion event on. This should
36498 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36499 	 */
36500 	uint16_t	cmpl_ring;
36501 	/*
36502 	 * The sequence ID is used by the driver for tracking multiple
36503 	 * commands. This ID is treated as opaque data by the firmware and
36504 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36505 	 */
36506 	uint16_t	seq_id;
36507 	/*
36508 	 * The target ID of the command:
36509 	 * * 0x0-0xFFF8 - The function ID
36510 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36511 	 * * 0xFFFD - Reserved for user-space HWRM interface
36512 	 * * 0xFFFF - HWRM
36513 	 */
36514 	uint16_t	target_id;
36515 	/*
36516 	 * A physical address pointer pointing to a host buffer that the
36517 	 * command's response data will be written. This can be either a host
36518 	 * physical address (HPA) or a guest physical address (GPA) and must
36519 	 * point to a physically contiguous block of memory.
36520 	 */
36521 	uint64_t	resp_addr;
36522 	/*
36523 	 * Port ID of port for which the table is being configured.
36524 	 * The HWRM needs to check whether this function is allowed
36525 	 * to configure pri2cos mapping on this port.
36526 	 */
36527 	uint16_t	port_id;
36528 	uint8_t	unused_0[6];
36529 } __rte_packed_end;
36530 
36531 /* hwrm_queue_pfcenable_qcfg_output (size:128b/16B) */
36532 struct __rte_packed_begin hwrm_queue_pfcenable_qcfg_output {
36533 	/* The specific error status for the command. */
36534 	uint16_t	error_code;
36535 	/* The HWRM command request type. */
36536 	uint16_t	req_type;
36537 	/* The sequence ID from the original command. */
36538 	uint16_t	seq_id;
36539 	/* The length of the response data in number of bytes. */
36540 	uint16_t	resp_len;
36541 	uint32_t	flags;
36542 	/* If set to 1, then PFC is enabled on PRI 0. */
36543 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI0_PFC_ENABLED \
36544 		UINT32_C(0x1)
36545 	/* If set to 1, then PFC is enabled on PRI 1. */
36546 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI1_PFC_ENABLED \
36547 		UINT32_C(0x2)
36548 	/* If set to 1, then PFC is enabled on PRI 2. */
36549 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI2_PFC_ENABLED \
36550 		UINT32_C(0x4)
36551 	/* If set to 1, then PFC is enabled on PRI 3. */
36552 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI3_PFC_ENABLED \
36553 		UINT32_C(0x8)
36554 	/* If set to 1, then PFC is enabled on PRI 4. */
36555 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI4_PFC_ENABLED \
36556 		UINT32_C(0x10)
36557 	/* If set to 1, then PFC is enabled on PRI 5. */
36558 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI5_PFC_ENABLED \
36559 		UINT32_C(0x20)
36560 	/* If set to 1, then PFC is enabled on PRI 6. */
36561 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI6_PFC_ENABLED \
36562 		UINT32_C(0x40)
36563 	/* If set to 1, then PFC is enabled on PRI 7. */
36564 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI7_PFC_ENABLED \
36565 		UINT32_C(0x80)
36566 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI0. */
36567 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI0_PFC_WATCHDOG_ENABLED \
36568 		UINT32_C(0x100)
36569 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI1. */
36570 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI1_PFC_WATCHDOG_ENABLED \
36571 		UINT32_C(0x200)
36572 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI2. */
36573 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI2_PFC_WATCHDOG_ENABLED \
36574 		UINT32_C(0x400)
36575 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI3. */
36576 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI3_PFC_WATCHDOG_ENABLED \
36577 		UINT32_C(0x800)
36578 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI4. */
36579 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI4_PFC_WATCHDOG_ENABLED \
36580 		UINT32_C(0x1000)
36581 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI5. */
36582 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI5_PFC_WATCHDOG_ENABLED \
36583 		UINT32_C(0x2000)
36584 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI6. */
36585 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI6_PFC_WATCHDOG_ENABLED \
36586 		UINT32_C(0x4000)
36587 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI7. */
36588 	#define HWRM_QUEUE_PFCENABLE_QCFG_OUTPUT_FLAGS_PRI7_PFC_WATCHDOG_ENABLED \
36589 		UINT32_C(0x8000)
36590 	uint8_t	unused_0[3];
36591 	/*
36592 	 * This field is used in Output records to indicate that the output
36593 	 * is completely written to RAM. This field should be read as '1'
36594 	 * to indicate that the output has been completely written. When
36595 	 * writing a command completion or response to an internal processor,
36596 	 * the order of writes has to be such that this field is written last.
36597 	 */
36598 	uint8_t	valid;
36599 } __rte_packed_end;
36600 
36601 /****************************
36602  * hwrm_queue_pfcenable_cfg *
36603  ****************************/
36604 
36605 
36606 /* hwrm_queue_pfcenable_cfg_input (size:192b/24B) */
36607 struct __rte_packed_begin hwrm_queue_pfcenable_cfg_input {
36608 	/* The HWRM command request type. */
36609 	uint16_t	req_type;
36610 	/*
36611 	 * The completion ring to send the completion event on. This should
36612 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36613 	 */
36614 	uint16_t	cmpl_ring;
36615 	/*
36616 	 * The sequence ID is used by the driver for tracking multiple
36617 	 * commands. This ID is treated as opaque data by the firmware and
36618 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36619 	 */
36620 	uint16_t	seq_id;
36621 	/*
36622 	 * The target ID of the command:
36623 	 * * 0x0-0xFFF8 - The function ID
36624 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36625 	 * * 0xFFFD - Reserved for user-space HWRM interface
36626 	 * * 0xFFFF - HWRM
36627 	 */
36628 	uint16_t	target_id;
36629 	/*
36630 	 * A physical address pointer pointing to a host buffer that the
36631 	 * command's response data will be written. This can be either a host
36632 	 * physical address (HPA) or a guest physical address (GPA) and must
36633 	 * point to a physically contiguous block of memory.
36634 	 */
36635 	uint64_t	resp_addr;
36636 	uint32_t	flags;
36637 	/* If set to 1, then PFC is requested to be enabled on PRI 0. */
36638 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI0_PFC_ENABLED \
36639 		UINT32_C(0x1)
36640 	/* If set to 1, then PFC is requested to be enabled on PRI 1. */
36641 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI1_PFC_ENABLED \
36642 		UINT32_C(0x2)
36643 	/* If set to 1, then PFC is requested to be enabled on PRI 2. */
36644 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI2_PFC_ENABLED \
36645 		UINT32_C(0x4)
36646 	/* If set to 1, then PFC is requested to be enabled on PRI 3. */
36647 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI3_PFC_ENABLED \
36648 		UINT32_C(0x8)
36649 	/* If set to 1, then PFC is requested to be enabled on PRI 4. */
36650 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI4_PFC_ENABLED \
36651 		UINT32_C(0x10)
36652 	/* If set to 1, then PFC is requested to be enabled on PRI 5. */
36653 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI5_PFC_ENABLED \
36654 		UINT32_C(0x20)
36655 	/* If set to 1, then PFC is requested to be enabled on PRI 6. */
36656 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI6_PFC_ENABLED \
36657 		UINT32_C(0x40)
36658 	/* If set to 1, then PFC is requested to be enabled on PRI 7. */
36659 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI7_PFC_ENABLED \
36660 		UINT32_C(0x80)
36661 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI0. */
36662 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI0_PFC_WATCHDOG_ENABLED \
36663 		UINT32_C(0x100)
36664 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI1. */
36665 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI1_PFC_WATCHDOG_ENABLED \
36666 		UINT32_C(0x200)
36667 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI2. */
36668 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI2_PFC_WATCHDOG_ENABLED \
36669 		UINT32_C(0x400)
36670 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI3. */
36671 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI3_PFC_WATCHDOG_ENABLED \
36672 		UINT32_C(0x800)
36673 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI4. */
36674 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI4_PFC_WATCHDOG_ENABLED \
36675 		UINT32_C(0x1000)
36676 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI5. */
36677 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI5_PFC_WATCHDOG_ENABLED \
36678 		UINT32_C(0x2000)
36679 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI6. */
36680 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI6_PFC_WATCHDOG_ENABLED \
36681 		UINT32_C(0x4000)
36682 	/* If set to 1, then PFC WatchDog is requested to be enabled on PRI7. */
36683 	#define HWRM_QUEUE_PFCENABLE_CFG_INPUT_FLAGS_PRI7_PFC_WATCHDOG_ENABLED \
36684 		UINT32_C(0x8000)
36685 	/*
36686 	 * Port ID of port for which the table is being configured.
36687 	 * The HWRM needs to check whether this function is allowed
36688 	 * to configure pri2cos mapping on this port.
36689 	 */
36690 	uint16_t	port_id;
36691 	uint8_t	unused_0[2];
36692 } __rte_packed_end;
36693 
36694 /* hwrm_queue_pfcenable_cfg_output (size:128b/16B) */
36695 struct __rte_packed_begin hwrm_queue_pfcenable_cfg_output {
36696 	/* The specific error status for the command. */
36697 	uint16_t	error_code;
36698 	/* The HWRM command request type. */
36699 	uint16_t	req_type;
36700 	/* The sequence ID from the original command. */
36701 	uint16_t	seq_id;
36702 	/* The length of the response data in number of bytes. */
36703 	uint16_t	resp_len;
36704 	uint8_t	unused_0[7];
36705 	/*
36706 	 * This field is used in Output records to indicate that the output
36707 	 * is completely written to RAM. This field should be read as '1'
36708 	 * to indicate that the output has been completely written. When
36709 	 * writing a command completion or response to an internal processor,
36710 	 * the order of writes has to be such that this field is written last.
36711 	 */
36712 	uint8_t	valid;
36713 } __rte_packed_end;
36714 
36715 /***************************
36716  * hwrm_queue_pri2cos_qcfg *
36717  ***************************/
36718 
36719 
36720 /* hwrm_queue_pri2cos_qcfg_input (size:192b/24B) */
36721 struct __rte_packed_begin hwrm_queue_pri2cos_qcfg_input {
36722 	/* The HWRM command request type. */
36723 	uint16_t	req_type;
36724 	/*
36725 	 * The completion ring to send the completion event on. This should
36726 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36727 	 */
36728 	uint16_t	cmpl_ring;
36729 	/*
36730 	 * The sequence ID is used by the driver for tracking multiple
36731 	 * commands. This ID is treated as opaque data by the firmware and
36732 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36733 	 */
36734 	uint16_t	seq_id;
36735 	/*
36736 	 * The target ID of the command:
36737 	 * * 0x0-0xFFF8 - The function ID
36738 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36739 	 * * 0xFFFD - Reserved for user-space HWRM interface
36740 	 * * 0xFFFF - HWRM
36741 	 */
36742 	uint16_t	target_id;
36743 	/*
36744 	 * A physical address pointer pointing to a host buffer that the
36745 	 * command's response data will be written. This can be either a host
36746 	 * physical address (HPA) or a guest physical address (GPA) and must
36747 	 * point to a physically contiguous block of memory.
36748 	 */
36749 	uint64_t	resp_addr;
36750 	uint32_t	flags;
36751 	/*
36752 	 * Enumeration denoting the RX, TX type of the resource.
36753 	 * This enumeration is used for resources that are similar for both
36754 	 * TX and RX paths of the chip.
36755 	 */
36756 	#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH      UINT32_C(0x1)
36757 	/* tx path */
36758 	#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_TX     UINT32_C(0x0)
36759 	/* rx path */
36760 	#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_RX     UINT32_C(0x1)
36761 	#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_LAST \
36762 		HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_PATH_RX
36763 	/*
36764 	 * When this bit is set to '0', the query is
36765 	 * for PRI from tunnel headers.
36766 	 * When this bit is set to '1', the query is
36767 	 * for PRI from inner packet headers.
36768 	 */
36769 	#define HWRM_QUEUE_PRI2COS_QCFG_INPUT_FLAGS_IVLAN     UINT32_C(0x2)
36770 	/*
36771 	 * Port ID of port for which the table is being configured.
36772 	 * The HWRM needs to check whether this function is allowed
36773 	 * to configure pri2cos mapping on this port.
36774 	 */
36775 	uint8_t	port_id;
36776 	uint8_t	unused_0[3];
36777 } __rte_packed_end;
36778 
36779 /* hwrm_queue_pri2cos_qcfg_output (size:192b/24B) */
36780 struct __rte_packed_begin hwrm_queue_pri2cos_qcfg_output {
36781 	/* The specific error status for the command. */
36782 	uint16_t	error_code;
36783 	/* The HWRM command request type. */
36784 	uint16_t	req_type;
36785 	/* The sequence ID from the original command. */
36786 	uint16_t	seq_id;
36787 	/* The length of the response data in number of bytes. */
36788 	uint16_t	resp_len;
36789 	/*
36790 	 * CoS Queue assigned to priority 0. This value can only
36791 	 * be changed before traffic has started.
36792 	 * A value of 0xff indicates that no CoS queue is assigned to the
36793 	 * specified priority.
36794 	 */
36795 	uint8_t	pri0_cos_queue_id;
36796 	/*
36797 	 * CoS Queue assigned to priority 1. This value can only
36798 	 * be changed before traffic has started.
36799 	 * A value of 0xff indicates that no CoS queue is assigned to the
36800 	 * specified priority.
36801 	 */
36802 	uint8_t	pri1_cos_queue_id;
36803 	/*
36804 	 * CoS Queue assigned to priority 2. This value can only
36805 	 * be changed before traffic has started.
36806 	 * A value of 0xff indicates that no CoS queue is assigned to the
36807 	 * specified priority.
36808 	 */
36809 	uint8_t	pri2_cos_queue_id;
36810 	/*
36811 	 * CoS Queue assigned to priority 3. This value can only
36812 	 * be changed before traffic has started.
36813 	 * A value of 0xff indicates that no CoS queue is assigned to the
36814 	 * specified priority.
36815 	 */
36816 	uint8_t	pri3_cos_queue_id;
36817 	/*
36818 	 * CoS Queue assigned to priority 4. This value can only
36819 	 * be changed before traffic has started.
36820 	 * A value of 0xff indicates that no CoS queue is assigned to the
36821 	 * specified priority.
36822 	 */
36823 	uint8_t	pri4_cos_queue_id;
36824 	/*
36825 	 * CoS Queue assigned to priority 5. This value can only
36826 	 * be changed before traffic has started.
36827 	 * A value of 0xff indicates that no CoS queue is assigned to the
36828 	 * specified priority.
36829 	 */
36830 	uint8_t	pri5_cos_queue_id;
36831 	/*
36832 	 * CoS Queue assigned to priority 6. This value can only
36833 	 * be changed before traffic has started.
36834 	 * A value of 0xff indicates that no CoS queue is assigned to the
36835 	 * specified priority.
36836 	 */
36837 	uint8_t	pri6_cos_queue_id;
36838 	/*
36839 	 * CoS Queue assigned to priority 7. This value can only
36840 	 * be changed before traffic has started.
36841 	 * A value of 0xff indicates that no CoS queue is assigned to the
36842 	 * specified priority.
36843 	 */
36844 	uint8_t	pri7_cos_queue_id;
36845 	/* Information about queue configuration. */
36846 	uint8_t	queue_cfg_info;
36847 	/*
36848 	 * If this flag is set to '1', then the PRI to CoS
36849 	 * configuration is asymmetric on TX and RX sides.
36850 	 * If this flag is set to '0', then PRI to CoS configuration
36851 	 * is symmetric on TX and RX sides.
36852 	 */
36853 	#define HWRM_QUEUE_PRI2COS_QCFG_OUTPUT_QUEUE_CFG_INFO_ASYM_CFG \
36854 		UINT32_C(0x1)
36855 	uint8_t	unused_0[6];
36856 	/*
36857 	 * This field is used in Output records to indicate that the output
36858 	 * is completely written to RAM. This field should be read as '1'
36859 	 * to indicate that the output has been completely written. When
36860 	 * writing a command completion or response to an internal processor,
36861 	 * the order of writes has to be such that this field is written last.
36862 	 */
36863 	uint8_t	valid;
36864 } __rte_packed_end;
36865 
36866 /**************************
36867  * hwrm_queue_pri2cos_cfg *
36868  **************************/
36869 
36870 
36871 /* hwrm_queue_pri2cos_cfg_input (size:320b/40B) */
36872 struct __rte_packed_begin hwrm_queue_pri2cos_cfg_input {
36873 	/* The HWRM command request type. */
36874 	uint16_t	req_type;
36875 	/*
36876 	 * The completion ring to send the completion event on. This should
36877 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
36878 	 */
36879 	uint16_t	cmpl_ring;
36880 	/*
36881 	 * The sequence ID is used by the driver for tracking multiple
36882 	 * commands. This ID is treated as opaque data by the firmware and
36883 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
36884 	 */
36885 	uint16_t	seq_id;
36886 	/*
36887 	 * The target ID of the command:
36888 	 * * 0x0-0xFFF8 - The function ID
36889 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
36890 	 * * 0xFFFD - Reserved for user-space HWRM interface
36891 	 * * 0xFFFF - HWRM
36892 	 */
36893 	uint16_t	target_id;
36894 	/*
36895 	 * A physical address pointer pointing to a host buffer that the
36896 	 * command's response data will be written. This can be either a host
36897 	 * physical address (HPA) or a guest physical address (GPA) and must
36898 	 * point to a physically contiguous block of memory.
36899 	 */
36900 	uint64_t	resp_addr;
36901 	uint32_t	flags;
36902 	/*
36903 	 * Enumeration denoting the RX, TX, or both directions applicable to
36904 	 * the resource. This enumeration is used for resources that are
36905 	 * similar for both TX and RX paths of the chip.
36906 	 */
36907 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_MASK UINT32_C(0x3)
36908 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_SFT  0
36909 	/* tx path */
36910 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_TX     UINT32_C(0x0)
36911 	/* rx path */
36912 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_RX     UINT32_C(0x1)
36913 	/* Bi-directional (Symmetrically applicable to TX and RX paths) */
36914 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_BIDIR  UINT32_C(0x2)
36915 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_LAST \
36916 		HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_PATH_BIDIR
36917 	/*
36918 	 * When this bit is set to '0', the mapping is requested
36919 	 * for PRI from tunnel headers.
36920 	 * When this bit is set to '1', the mapping is requested
36921 	 * for PRI from inner packet headers.
36922 	 */
36923 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_FLAGS_IVLAN     UINT32_C(0x4)
36924 	uint32_t	enables;
36925 	/*
36926 	 * This bit must be '1' for the pri0_cos_queue_id field to be
36927 	 * configured.
36928 	 */
36929 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI0_COS_QUEUE_ID \
36930 		UINT32_C(0x1)
36931 	/*
36932 	 * This bit must be '1' for the pri1_cos_queue_id field to be
36933 	 * configured.
36934 	 */
36935 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI1_COS_QUEUE_ID \
36936 		UINT32_C(0x2)
36937 	/*
36938 	 * This bit must be '1' for the pri2_cos_queue_id field to be
36939 	 * configured.
36940 	 */
36941 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI2_COS_QUEUE_ID \
36942 		UINT32_C(0x4)
36943 	/*
36944 	 * This bit must be '1' for the pri3_cos_queue_id field to be
36945 	 * configured.
36946 	 */
36947 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI3_COS_QUEUE_ID \
36948 		UINT32_C(0x8)
36949 	/*
36950 	 * This bit must be '1' for the pri4_cos_queue_id field to be
36951 	 * configured.
36952 	 */
36953 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI4_COS_QUEUE_ID \
36954 		UINT32_C(0x10)
36955 	/*
36956 	 * This bit must be '1' for the pri5_cos_queue_id field to be
36957 	 * configured.
36958 	 */
36959 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI5_COS_QUEUE_ID \
36960 		UINT32_C(0x20)
36961 	/*
36962 	 * This bit must be '1' for the pri6_cos_queue_id field to be
36963 	 * configured.
36964 	 */
36965 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI6_COS_QUEUE_ID \
36966 		UINT32_C(0x40)
36967 	/*
36968 	 * This bit must be '1' for the pri7_cos_queue_id field to be
36969 	 * configured.
36970 	 */
36971 	#define HWRM_QUEUE_PRI2COS_CFG_INPUT_ENABLES_PRI7_COS_QUEUE_ID \
36972 		UINT32_C(0x80)
36973 	/*
36974 	 * Port ID of port for which the table is being configured.
36975 	 * The HWRM needs to check whether this function is allowed
36976 	 * to configure pri2cos mapping on this port.
36977 	 */
36978 	uint8_t	port_id;
36979 	/*
36980 	 * CoS Queue assigned to priority 0. This value can only
36981 	 * be changed before traffic has started.
36982 	 */
36983 	uint8_t	pri0_cos_queue_id;
36984 	/*
36985 	 * CoS Queue assigned to priority 1. This value can only
36986 	 * be changed before traffic has started.
36987 	 */
36988 	uint8_t	pri1_cos_queue_id;
36989 	/*
36990 	 * CoS Queue assigned to priority 2. This value can only
36991 	 * be changed before traffic has started.
36992 	 */
36993 	uint8_t	pri2_cos_queue_id;
36994 	/*
36995 	 * CoS Queue assigned to priority 3. This value can only
36996 	 * be changed before traffic has started.
36997 	 */
36998 	uint8_t	pri3_cos_queue_id;
36999 	/*
37000 	 * CoS Queue assigned to priority 4. This value can only
37001 	 * be changed before traffic has started.
37002 	 */
37003 	uint8_t	pri4_cos_queue_id;
37004 	/*
37005 	 * CoS Queue assigned to priority 5. This value can only
37006 	 * be changed before traffic has started.
37007 	 */
37008 	uint8_t	pri5_cos_queue_id;
37009 	/*
37010 	 * CoS Queue assigned to priority 6. This value can only
37011 	 * be changed before traffic has started.
37012 	 */
37013 	uint8_t	pri6_cos_queue_id;
37014 	/*
37015 	 * CoS Queue assigned to priority 7. This value can only
37016 	 * be changed before traffic has started.
37017 	 */
37018 	uint8_t	pri7_cos_queue_id;
37019 	uint8_t	unused_0[7];
37020 } __rte_packed_end;
37021 
37022 /* hwrm_queue_pri2cos_cfg_output (size:128b/16B) */
37023 struct __rte_packed_begin hwrm_queue_pri2cos_cfg_output {
37024 	/* The specific error status for the command. */
37025 	uint16_t	error_code;
37026 	/* The HWRM command request type. */
37027 	uint16_t	req_type;
37028 	/* The sequence ID from the original command. */
37029 	uint16_t	seq_id;
37030 	/* The length of the response data in number of bytes. */
37031 	uint16_t	resp_len;
37032 	uint8_t	unused_0[7];
37033 	/*
37034 	 * This field is used in Output records to indicate that the output
37035 	 * is completely written to RAM. This field should be read as '1'
37036 	 * to indicate that the output has been completely written. When
37037 	 * writing a command completion or response to an internal processor,
37038 	 * the order of writes has to be such that this field is written last.
37039 	 */
37040 	uint8_t	valid;
37041 } __rte_packed_end;
37042 
37043 /**************************
37044  * hwrm_queue_cos2bw_qcfg *
37045  **************************/
37046 
37047 
37048 /* hwrm_queue_cos2bw_qcfg_input (size:192b/24B) */
37049 struct __rte_packed_begin hwrm_queue_cos2bw_qcfg_input {
37050 	/* The HWRM command request type. */
37051 	uint16_t	req_type;
37052 	/*
37053 	 * The completion ring to send the completion event on. This should
37054 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
37055 	 */
37056 	uint16_t	cmpl_ring;
37057 	/*
37058 	 * The sequence ID is used by the driver for tracking multiple
37059 	 * commands. This ID is treated as opaque data by the firmware and
37060 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
37061 	 */
37062 	uint16_t	seq_id;
37063 	/*
37064 	 * The target ID of the command:
37065 	 * * 0x0-0xFFF8 - The function ID
37066 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
37067 	 * * 0xFFFD - Reserved for user-space HWRM interface
37068 	 * * 0xFFFF - HWRM
37069 	 */
37070 	uint16_t	target_id;
37071 	/*
37072 	 * A physical address pointer pointing to a host buffer that the
37073 	 * command's response data will be written. This can be either a host
37074 	 * physical address (HPA) or a guest physical address (GPA) and must
37075 	 * point to a physically contiguous block of memory.
37076 	 */
37077 	uint64_t	resp_addr;
37078 	/*
37079 	 * Port ID of port for which the table is being configured.
37080 	 * The HWRM needs to check whether this function is allowed
37081 	 * to configure TC BW assignment on this port.
37082 	 */
37083 	uint16_t	port_id;
37084 	uint8_t	unused_0[6];
37085 } __rte_packed_end;
37086 
37087 /* hwrm_queue_cos2bw_qcfg_output (size:896b/112B) */
37088 struct __rte_packed_begin hwrm_queue_cos2bw_qcfg_output {
37089 	/* The specific error status for the command. */
37090 	uint16_t	error_code;
37091 	/* The HWRM command request type. */
37092 	uint16_t	req_type;
37093 	/* The sequence ID from the original command. */
37094 	uint16_t	seq_id;
37095 	/* The length of the response data in number of bytes. */
37096 	uint16_t	resp_len;
37097 	/* ID of CoS Queue 0. */
37098 	uint8_t	queue_id0;
37099 	uint8_t	unused_0;
37100 	uint16_t	unused_1;
37101 	/*
37102 	 * Minimum BW allocated to CoS Queue.
37103 	 * The HWRM will translate this value into byte counter and
37104 	 * time interval used for this COS inside the device.
37105 	 */
37106 	uint32_t	queue_id0_min_bw;
37107 	/* The bandwidth value. */
37108 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_MASK \
37109 		UINT32_C(0xfffffff)
37110 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_SFT \
37111 		0
37112 	/* The granularity of the value (bits or bytes). */
37113 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_SCALE \
37114 		UINT32_C(0x10000000)
37115 	/* Value is in bits. */
37116 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_SCALE_BITS \
37117 		(UINT32_C(0x0) << 28)
37118 	/* Value is in bytes. */
37119 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_SCALE_BYTES \
37120 		(UINT32_C(0x1) << 28)
37121 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_SCALE_LAST \
37122 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_SCALE_BYTES
37123 	/* bw_value_unit is 3 b */
37124 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MASK \
37125 		UINT32_C(0xe0000000)
37126 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_SFT \
37127 		29
37128 	/* Value is in Mb or MB (base 10). */
37129 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MEGA \
37130 		(UINT32_C(0x0) << 29)
37131 	/* Value is in Kb or KB (base 10). */
37132 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_KILO \
37133 		(UINT32_C(0x2) << 29)
37134 	/* Value is in bits or bytes. */
37135 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_BASE \
37136 		(UINT32_C(0x4) << 29)
37137 	/* Value is in Gb or GB (base 10). */
37138 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_GIGA \
37139 		(UINT32_C(0x6) << 29)
37140 	/* Value is in 1/100th of a percentage of total bandwidth. */
37141 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
37142 		(UINT32_C(0x1) << 29)
37143 	/* Invalid unit */
37144 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID \
37145 		(UINT32_C(0x7) << 29)
37146 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_LAST \
37147 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID
37148 	/*
37149 	 * Maximum BW allocated to CoS Queue.
37150 	 * The HWRM will translate this value into byte counter and
37151 	 * time interval used for this COS inside the device.
37152 	 */
37153 	uint32_t	queue_id0_max_bw;
37154 	/* The bandwidth value. */
37155 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_MASK \
37156 		UINT32_C(0xfffffff)
37157 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_SFT \
37158 		0
37159 	/* The granularity of the value (bits or bytes). */
37160 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_SCALE \
37161 		UINT32_C(0x10000000)
37162 	/* Value is in bits. */
37163 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_SCALE_BITS \
37164 		(UINT32_C(0x0) << 28)
37165 	/* Value is in bytes. */
37166 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_SCALE_BYTES \
37167 		(UINT32_C(0x1) << 28)
37168 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_SCALE_LAST \
37169 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_SCALE_BYTES
37170 	/* bw_value_unit is 3 b */
37171 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MASK \
37172 		UINT32_C(0xe0000000)
37173 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_SFT \
37174 		29
37175 	/* Value is in Mb or MB (base 10). */
37176 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MEGA \
37177 		(UINT32_C(0x0) << 29)
37178 	/* Value is in Kb or KB (base 10). */
37179 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_KILO \
37180 		(UINT32_C(0x2) << 29)
37181 	/* Value is in bits or bytes. */
37182 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_BASE \
37183 		(UINT32_C(0x4) << 29)
37184 	/* Value is in Gb or GB (base 10). */
37185 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_GIGA \
37186 		(UINT32_C(0x6) << 29)
37187 	/* Value is in 1/100th of a percentage of total bandwidth. */
37188 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
37189 		(UINT32_C(0x1) << 29)
37190 	/* Invalid unit */
37191 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID \
37192 		(UINT32_C(0x7) << 29)
37193 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_LAST \
37194 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID
37195 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
37196 	uint8_t	queue_id0_tsa_assign;
37197 	/* Strict Priority */
37198 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_SP \
37199 		UINT32_C(0x0)
37200 	/* Enhanced Transmission Selection */
37201 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_ETS \
37202 		UINT32_C(0x1)
37203 	/* reserved. */
37204 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_FIRST \
37205 		UINT32_C(0x2)
37206 	/* reserved. */
37207 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_LAST \
37208 		UINT32_C(0xff)
37209 	/*
37210 	 * Priority level for strict priority. Valid only when the
37211 	 * tsa_assign is 0 - Strict Priority (SP)
37212 	 * 0..7 - Valid values.
37213 	 * 8..255 - Reserved.
37214 	 */
37215 	uint8_t	queue_id0_pri_lvl;
37216 	/*
37217 	 * Weight used to allocate remaining BW for this COS after
37218 	 * servicing guaranteed bandwidths for all COS.
37219 	 */
37220 	uint8_t	queue_id0_bw_weight;
37221 	/* ID of CoS Queue 1. */
37222 	uint8_t	queue_id1;
37223 	/*
37224 	 * Minimum BW allocated to CoS Queue.
37225 	 * The HWRM will translate this value into byte counter and
37226 	 * time interval used for this COS inside the device.
37227 	 */
37228 	uint32_t	queue_id1_min_bw;
37229 	/* The bandwidth value. */
37230 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_MASK \
37231 		UINT32_C(0xfffffff)
37232 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_SFT \
37233 		0
37234 	/* The granularity of the value (bits or bytes). */
37235 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_SCALE \
37236 		UINT32_C(0x10000000)
37237 	/* Value is in bits. */
37238 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_SCALE_BITS \
37239 		(UINT32_C(0x0) << 28)
37240 	/* Value is in bytes. */
37241 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_SCALE_BYTES \
37242 		(UINT32_C(0x1) << 28)
37243 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_SCALE_LAST \
37244 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_SCALE_BYTES
37245 	/* bw_value_unit is 3 b */
37246 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MASK \
37247 		UINT32_C(0xe0000000)
37248 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_SFT \
37249 		29
37250 	/* Value is in Mb or MB (base 10). */
37251 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MEGA \
37252 		(UINT32_C(0x0) << 29)
37253 	/* Value is in Kb or KB (base 10). */
37254 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_KILO \
37255 		(UINT32_C(0x2) << 29)
37256 	/* Value is in bits or bytes. */
37257 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_BASE \
37258 		(UINT32_C(0x4) << 29)
37259 	/* Value is in Gb or GB (base 10). */
37260 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_GIGA \
37261 		(UINT32_C(0x6) << 29)
37262 	/* Value is in 1/100th of a percentage of total bandwidth. */
37263 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
37264 		(UINT32_C(0x1) << 29)
37265 	/* Invalid unit */
37266 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID \
37267 		(UINT32_C(0x7) << 29)
37268 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_LAST \
37269 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID
37270 	/*
37271 	 * Maximum BW allocated to CoS queue.
37272 	 * The HWRM will translate this value into byte counter and
37273 	 * time interval used for this COS inside the device.
37274 	 */
37275 	uint32_t	queue_id1_max_bw;
37276 	/* The bandwidth value. */
37277 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_MASK \
37278 		UINT32_C(0xfffffff)
37279 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_SFT \
37280 		0
37281 	/* The granularity of the value (bits or bytes). */
37282 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_SCALE \
37283 		UINT32_C(0x10000000)
37284 	/* Value is in bits. */
37285 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_SCALE_BITS \
37286 		(UINT32_C(0x0) << 28)
37287 	/* Value is in bytes. */
37288 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_SCALE_BYTES \
37289 		(UINT32_C(0x1) << 28)
37290 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_SCALE_LAST \
37291 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_SCALE_BYTES
37292 	/* bw_value_unit is 3 b */
37293 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MASK \
37294 		UINT32_C(0xe0000000)
37295 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_SFT \
37296 		29
37297 	/* Value is in Mb or MB (base 10). */
37298 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MEGA \
37299 		(UINT32_C(0x0) << 29)
37300 	/* Value is in Kb or KB (base 10). */
37301 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_KILO \
37302 		(UINT32_C(0x2) << 29)
37303 	/* Value is in bits or bytes. */
37304 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_BASE \
37305 		(UINT32_C(0x4) << 29)
37306 	/* Value is in Gb or GB (base 10). */
37307 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_GIGA \
37308 		(UINT32_C(0x6) << 29)
37309 	/* Value is in 1/100th of a percentage of total bandwidth. */
37310 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
37311 		(UINT32_C(0x1) << 29)
37312 	/* Invalid unit */
37313 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID \
37314 		(UINT32_C(0x7) << 29)
37315 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_LAST \
37316 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID
37317 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
37318 	uint8_t	queue_id1_tsa_assign;
37319 	/* Strict Priority */
37320 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_SP \
37321 		UINT32_C(0x0)
37322 	/* Enhanced Transmission Selection */
37323 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_ETS \
37324 		UINT32_C(0x1)
37325 	/* reserved. */
37326 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_FIRST \
37327 		UINT32_C(0x2)
37328 	/* reserved. */
37329 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_LAST \
37330 		UINT32_C(0xff)
37331 	/*
37332 	 * Priority level for strict priority. Valid only when the
37333 	 * tsa_assign is 0 - Strict Priority (SP)
37334 	 * 0..7 - Valid values.
37335 	 * 8..255 - Reserved.
37336 	 */
37337 	uint8_t	queue_id1_pri_lvl;
37338 	/*
37339 	 * Weight used to allocate remaining BW for this COS after
37340 	 * servicing guaranteed bandwidths for all COS.
37341 	 */
37342 	uint8_t	queue_id1_bw_weight;
37343 	/* ID of CoS Queue 2. */
37344 	uint8_t	queue_id2;
37345 	/*
37346 	 * Minimum BW allocated to CoS Queue.
37347 	 * The HWRM will translate this value into byte counter and
37348 	 * time interval used for this COS inside the device.
37349 	 */
37350 	uint32_t	queue_id2_min_bw;
37351 	/* The bandwidth value. */
37352 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_MASK \
37353 		UINT32_C(0xfffffff)
37354 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_SFT \
37355 		0
37356 	/* The granularity of the value (bits or bytes). */
37357 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_SCALE \
37358 		UINT32_C(0x10000000)
37359 	/* Value is in bits. */
37360 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_SCALE_BITS \
37361 		(UINT32_C(0x0) << 28)
37362 	/* Value is in bytes. */
37363 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_SCALE_BYTES \
37364 		(UINT32_C(0x1) << 28)
37365 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_SCALE_LAST \
37366 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_SCALE_BYTES
37367 	/* bw_value_unit is 3 b */
37368 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MASK \
37369 		UINT32_C(0xe0000000)
37370 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_SFT \
37371 		29
37372 	/* Value is in Mb or MB (base 10). */
37373 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MEGA \
37374 		(UINT32_C(0x0) << 29)
37375 	/* Value is in Kb or KB (base 10). */
37376 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_KILO \
37377 		(UINT32_C(0x2) << 29)
37378 	/* Value is in bits or bytes. */
37379 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_BASE \
37380 		(UINT32_C(0x4) << 29)
37381 	/* Value is in Gb or GB (base 10). */
37382 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_GIGA \
37383 		(UINT32_C(0x6) << 29)
37384 	/* Value is in 1/100th of a percentage of total bandwidth. */
37385 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
37386 		(UINT32_C(0x1) << 29)
37387 	/* Invalid unit */
37388 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID \
37389 		(UINT32_C(0x7) << 29)
37390 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_LAST \
37391 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID
37392 	/*
37393 	 * Maximum BW allocated to CoS queue.
37394 	 * The HWRM will translate this value into byte counter and
37395 	 * time interval used for this COS inside the device.
37396 	 */
37397 	uint32_t	queue_id2_max_bw;
37398 	/* The bandwidth value. */
37399 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_MASK \
37400 		UINT32_C(0xfffffff)
37401 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_SFT \
37402 		0
37403 	/* The granularity of the value (bits or bytes). */
37404 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_SCALE \
37405 		UINT32_C(0x10000000)
37406 	/* Value is in bits. */
37407 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_SCALE_BITS \
37408 		(UINT32_C(0x0) << 28)
37409 	/* Value is in bytes. */
37410 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_SCALE_BYTES \
37411 		(UINT32_C(0x1) << 28)
37412 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_SCALE_LAST \
37413 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_SCALE_BYTES
37414 	/* bw_value_unit is 3 b */
37415 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MASK \
37416 		UINT32_C(0xe0000000)
37417 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_SFT \
37418 		29
37419 	/* Value is in Mb or MB (base 10). */
37420 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MEGA \
37421 		(UINT32_C(0x0) << 29)
37422 	/* Value is in Kb or KB (base 10). */
37423 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_KILO \
37424 		(UINT32_C(0x2) << 29)
37425 	/* Value is in bits or bytes. */
37426 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_BASE \
37427 		(UINT32_C(0x4) << 29)
37428 	/* Value is in Gb or GB (base 10). */
37429 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_GIGA \
37430 		(UINT32_C(0x6) << 29)
37431 	/* Value is in 1/100th of a percentage of total bandwidth. */
37432 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
37433 		(UINT32_C(0x1) << 29)
37434 	/* Invalid unit */
37435 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID \
37436 		(UINT32_C(0x7) << 29)
37437 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_LAST \
37438 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID
37439 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
37440 	uint8_t	queue_id2_tsa_assign;
37441 	/* Strict Priority */
37442 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_SP \
37443 		UINT32_C(0x0)
37444 	/* Enhanced Transmission Selection */
37445 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_ETS \
37446 		UINT32_C(0x1)
37447 	/* reserved. */
37448 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_FIRST \
37449 		UINT32_C(0x2)
37450 	/* reserved. */
37451 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_LAST \
37452 		UINT32_C(0xff)
37453 	/*
37454 	 * Priority level for strict priority. Valid only when the
37455 	 * tsa_assign is 0 - Strict Priority (SP)
37456 	 * 0..7 - Valid values.
37457 	 * 8..255 - Reserved.
37458 	 */
37459 	uint8_t	queue_id2_pri_lvl;
37460 	/*
37461 	 * Weight used to allocate remaining BW for this COS after
37462 	 * servicing guaranteed bandwidths for all COS.
37463 	 */
37464 	uint8_t	queue_id2_bw_weight;
37465 	/* ID of CoS Queue 3. */
37466 	uint8_t	queue_id3;
37467 	/*
37468 	 * Minimum BW allocated to CoS Queue.
37469 	 * The HWRM will translate this value into byte counter and
37470 	 * time interval used for this COS inside the device.
37471 	 */
37472 	uint32_t	queue_id3_min_bw;
37473 	/* The bandwidth value. */
37474 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_MASK \
37475 		UINT32_C(0xfffffff)
37476 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_SFT \
37477 		0
37478 	/* The granularity of the value (bits or bytes). */
37479 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_SCALE \
37480 		UINT32_C(0x10000000)
37481 	/* Value is in bits. */
37482 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_SCALE_BITS \
37483 		(UINT32_C(0x0) << 28)
37484 	/* Value is in bytes. */
37485 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_SCALE_BYTES \
37486 		(UINT32_C(0x1) << 28)
37487 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_SCALE_LAST \
37488 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_SCALE_BYTES
37489 	/* bw_value_unit is 3 b */
37490 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MASK \
37491 		UINT32_C(0xe0000000)
37492 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_SFT \
37493 		29
37494 	/* Value is in Mb or MB (base 10). */
37495 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MEGA \
37496 		(UINT32_C(0x0) << 29)
37497 	/* Value is in Kb or KB (base 10). */
37498 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_KILO \
37499 		(UINT32_C(0x2) << 29)
37500 	/* Value is in bits or bytes. */
37501 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_BASE \
37502 		(UINT32_C(0x4) << 29)
37503 	/* Value is in Gb or GB (base 10). */
37504 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_GIGA \
37505 		(UINT32_C(0x6) << 29)
37506 	/* Value is in 1/100th of a percentage of total bandwidth. */
37507 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
37508 		(UINT32_C(0x1) << 29)
37509 	/* Invalid unit */
37510 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID \
37511 		(UINT32_C(0x7) << 29)
37512 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_LAST \
37513 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID
37514 	/*
37515 	 * Maximum BW allocated to CoS queue.
37516 	 * The HWRM will translate this value into byte counter and
37517 	 * time interval used for this COS inside the device.
37518 	 */
37519 	uint32_t	queue_id3_max_bw;
37520 	/* The bandwidth value. */
37521 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_MASK \
37522 		UINT32_C(0xfffffff)
37523 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_SFT \
37524 		0
37525 	/* The granularity of the value (bits or bytes). */
37526 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_SCALE \
37527 		UINT32_C(0x10000000)
37528 	/* Value is in bits. */
37529 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_SCALE_BITS \
37530 		(UINT32_C(0x0) << 28)
37531 	/* Value is in bytes. */
37532 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_SCALE_BYTES \
37533 		(UINT32_C(0x1) << 28)
37534 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_SCALE_LAST \
37535 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_SCALE_BYTES
37536 	/* bw_value_unit is 3 b */
37537 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MASK \
37538 		UINT32_C(0xe0000000)
37539 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_SFT \
37540 		29
37541 	/* Value is in Mb or MB (base 10). */
37542 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MEGA \
37543 		(UINT32_C(0x0) << 29)
37544 	/* Value is in Kb or KB (base 10). */
37545 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_KILO \
37546 		(UINT32_C(0x2) << 29)
37547 	/* Value is in bits or bytes. */
37548 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_BASE \
37549 		(UINT32_C(0x4) << 29)
37550 	/* Value is in Gb or GB (base 10). */
37551 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_GIGA \
37552 		(UINT32_C(0x6) << 29)
37553 	/* Value is in 1/100th of a percentage of total bandwidth. */
37554 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
37555 		(UINT32_C(0x1) << 29)
37556 	/* Invalid unit */
37557 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID \
37558 		(UINT32_C(0x7) << 29)
37559 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_LAST \
37560 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID
37561 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
37562 	uint8_t	queue_id3_tsa_assign;
37563 	/* Strict Priority */
37564 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_SP \
37565 		UINT32_C(0x0)
37566 	/* Enhanced Transmission Selection */
37567 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_ETS \
37568 		UINT32_C(0x1)
37569 	/* reserved. */
37570 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_FIRST \
37571 		UINT32_C(0x2)
37572 	/* reserved. */
37573 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_LAST \
37574 		UINT32_C(0xff)
37575 	/*
37576 	 * Priority level for strict priority. Valid only when the
37577 	 * tsa_assign is 0 - Strict Priority (SP)
37578 	 * 0..7 - Valid values.
37579 	 * 8..255 - Reserved.
37580 	 */
37581 	uint8_t	queue_id3_pri_lvl;
37582 	/*
37583 	 * Weight used to allocate remaining BW for this COS after
37584 	 * servicing guaranteed bandwidths for all COS.
37585 	 */
37586 	uint8_t	queue_id3_bw_weight;
37587 	/* ID of CoS Queue 4. */
37588 	uint8_t	queue_id4;
37589 	/*
37590 	 * Minimum BW allocated to CoS Queue.
37591 	 * The HWRM will translate this value into byte counter and
37592 	 * time interval used for this COS inside the device.
37593 	 */
37594 	uint32_t	queue_id4_min_bw;
37595 	/* The bandwidth value. */
37596 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_MASK \
37597 		UINT32_C(0xfffffff)
37598 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_SFT \
37599 		0
37600 	/* The granularity of the value (bits or bytes). */
37601 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_SCALE \
37602 		UINT32_C(0x10000000)
37603 	/* Value is in bits. */
37604 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_SCALE_BITS \
37605 		(UINT32_C(0x0) << 28)
37606 	/* Value is in bytes. */
37607 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_SCALE_BYTES \
37608 		(UINT32_C(0x1) << 28)
37609 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_SCALE_LAST \
37610 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_SCALE_BYTES
37611 	/* bw_value_unit is 3 b */
37612 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MASK \
37613 		UINT32_C(0xe0000000)
37614 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_SFT \
37615 		29
37616 	/* Value is in Mb or MB (base 10). */
37617 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MEGA \
37618 		(UINT32_C(0x0) << 29)
37619 	/* Value is in Kb or KB (base 10). */
37620 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_KILO \
37621 		(UINT32_C(0x2) << 29)
37622 	/* Value is in bits or bytes. */
37623 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_BASE \
37624 		(UINT32_C(0x4) << 29)
37625 	/* Value is in Gb or GB (base 10). */
37626 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_GIGA \
37627 		(UINT32_C(0x6) << 29)
37628 	/* Value is in 1/100th of a percentage of total bandwidth. */
37629 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
37630 		(UINT32_C(0x1) << 29)
37631 	/* Invalid unit */
37632 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID \
37633 		(UINT32_C(0x7) << 29)
37634 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_LAST \
37635 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID
37636 	/*
37637 	 * Maximum BW allocated to CoS queue.
37638 	 * The HWRM will translate this value into byte counter and
37639 	 * time interval used for this COS inside the device.
37640 	 */
37641 	uint32_t	queue_id4_max_bw;
37642 	/* The bandwidth value. */
37643 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_MASK \
37644 		UINT32_C(0xfffffff)
37645 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_SFT \
37646 		0
37647 	/* The granularity of the value (bits or bytes). */
37648 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_SCALE \
37649 		UINT32_C(0x10000000)
37650 	/* Value is in bits. */
37651 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_SCALE_BITS \
37652 		(UINT32_C(0x0) << 28)
37653 	/* Value is in bytes. */
37654 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_SCALE_BYTES \
37655 		(UINT32_C(0x1) << 28)
37656 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_SCALE_LAST \
37657 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_SCALE_BYTES
37658 	/* bw_value_unit is 3 b */
37659 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MASK \
37660 		UINT32_C(0xe0000000)
37661 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_SFT \
37662 		29
37663 	/* Value is in Mb or MB (base 10). */
37664 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MEGA \
37665 		(UINT32_C(0x0) << 29)
37666 	/* Value is in Kb or KB (base 10). */
37667 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_KILO \
37668 		(UINT32_C(0x2) << 29)
37669 	/* Value is in bits or bytes. */
37670 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_BASE \
37671 		(UINT32_C(0x4) << 29)
37672 	/* Value is in Gb or GB (base 10). */
37673 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_GIGA \
37674 		(UINT32_C(0x6) << 29)
37675 	/* Value is in 1/100th of a percentage of total bandwidth. */
37676 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
37677 		(UINT32_C(0x1) << 29)
37678 	/* Invalid unit */
37679 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID \
37680 		(UINT32_C(0x7) << 29)
37681 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_LAST \
37682 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID
37683 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
37684 	uint8_t	queue_id4_tsa_assign;
37685 	/* Strict Priority */
37686 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_SP \
37687 		UINT32_C(0x0)
37688 	/* Enhanced Transmission Selection */
37689 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_ETS \
37690 		UINT32_C(0x1)
37691 	/* reserved. */
37692 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_FIRST \
37693 		UINT32_C(0x2)
37694 	/* reserved. */
37695 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_LAST \
37696 		UINT32_C(0xff)
37697 	/*
37698 	 * Priority level for strict priority. Valid only when the
37699 	 * tsa_assign is 0 - Strict Priority (SP)
37700 	 * 0..7 - Valid values.
37701 	 * 8..255 - Reserved.
37702 	 */
37703 	uint8_t	queue_id4_pri_lvl;
37704 	/*
37705 	 * Weight used to allocate remaining BW for this COS after
37706 	 * servicing guaranteed bandwidths for all COS.
37707 	 */
37708 	uint8_t	queue_id4_bw_weight;
37709 	/* ID of CoS Queue 5. */
37710 	uint8_t	queue_id5;
37711 	/*
37712 	 * Minimum BW allocated to CoS Queue.
37713 	 * The HWRM will translate this value into byte counter and
37714 	 * time interval used for this COS inside the device.
37715 	 */
37716 	uint32_t	queue_id5_min_bw;
37717 	/* The bandwidth value. */
37718 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_MASK \
37719 		UINT32_C(0xfffffff)
37720 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_SFT \
37721 		0
37722 	/* The granularity of the value (bits or bytes). */
37723 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_SCALE \
37724 		UINT32_C(0x10000000)
37725 	/* Value is in bits. */
37726 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_SCALE_BITS \
37727 		(UINT32_C(0x0) << 28)
37728 	/* Value is in bytes. */
37729 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_SCALE_BYTES \
37730 		(UINT32_C(0x1) << 28)
37731 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_SCALE_LAST \
37732 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_SCALE_BYTES
37733 	/* bw_value_unit is 3 b */
37734 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MASK \
37735 		UINT32_C(0xe0000000)
37736 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_SFT \
37737 		29
37738 	/* Value is in Mb or MB (base 10). */
37739 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MEGA \
37740 		(UINT32_C(0x0) << 29)
37741 	/* Value is in Kb or KB (base 10). */
37742 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_KILO \
37743 		(UINT32_C(0x2) << 29)
37744 	/* Value is in bits or bytes. */
37745 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_BASE \
37746 		(UINT32_C(0x4) << 29)
37747 	/* Value is in Gb or GB (base 10). */
37748 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_GIGA \
37749 		(UINT32_C(0x6) << 29)
37750 	/* Value is in 1/100th of a percentage of total bandwidth. */
37751 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
37752 		(UINT32_C(0x1) << 29)
37753 	/* Invalid unit */
37754 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID \
37755 		(UINT32_C(0x7) << 29)
37756 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_LAST \
37757 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID
37758 	/*
37759 	 * Maximum BW allocated to CoS queue.
37760 	 * The HWRM will translate this value into byte counter and
37761 	 * time interval used for this COS inside the device.
37762 	 */
37763 	uint32_t	queue_id5_max_bw;
37764 	/* The bandwidth value. */
37765 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_MASK \
37766 		UINT32_C(0xfffffff)
37767 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_SFT \
37768 		0
37769 	/* The granularity of the value (bits or bytes). */
37770 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_SCALE \
37771 		UINT32_C(0x10000000)
37772 	/* Value is in bits. */
37773 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_SCALE_BITS \
37774 		(UINT32_C(0x0) << 28)
37775 	/* Value is in bytes. */
37776 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_SCALE_BYTES \
37777 		(UINT32_C(0x1) << 28)
37778 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_SCALE_LAST \
37779 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_SCALE_BYTES
37780 	/* bw_value_unit is 3 b */
37781 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MASK \
37782 		UINT32_C(0xe0000000)
37783 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_SFT \
37784 		29
37785 	/* Value is in Mb or MB (base 10). */
37786 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MEGA \
37787 		(UINT32_C(0x0) << 29)
37788 	/* Value is in Kb or KB (base 10). */
37789 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_KILO \
37790 		(UINT32_C(0x2) << 29)
37791 	/* Value is in bits or bytes. */
37792 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_BASE \
37793 		(UINT32_C(0x4) << 29)
37794 	/* Value is in Gb or GB (base 10). */
37795 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_GIGA \
37796 		(UINT32_C(0x6) << 29)
37797 	/* Value is in 1/100th of a percentage of total bandwidth. */
37798 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
37799 		(UINT32_C(0x1) << 29)
37800 	/* Invalid unit */
37801 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID \
37802 		(UINT32_C(0x7) << 29)
37803 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_LAST \
37804 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID
37805 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
37806 	uint8_t	queue_id5_tsa_assign;
37807 	/* Strict Priority */
37808 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_SP \
37809 		UINT32_C(0x0)
37810 	/* Enhanced Transmission Selection */
37811 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_ETS \
37812 		UINT32_C(0x1)
37813 	/* reserved. */
37814 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_FIRST \
37815 		UINT32_C(0x2)
37816 	/* reserved. */
37817 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_LAST \
37818 		UINT32_C(0xff)
37819 	/*
37820 	 * Priority level for strict priority. Valid only when the
37821 	 * tsa_assign is 0 - Strict Priority (SP)
37822 	 * 0..7 - Valid values.
37823 	 * 8..255 - Reserved.
37824 	 */
37825 	uint8_t	queue_id5_pri_lvl;
37826 	/*
37827 	 * Weight used to allocate remaining BW for this COS after
37828 	 * servicing guaranteed bandwidths for all COS.
37829 	 */
37830 	uint8_t	queue_id5_bw_weight;
37831 	/* ID of CoS Queue 6. */
37832 	uint8_t	queue_id6;
37833 	/*
37834 	 * Minimum BW allocated to CoS Queue.
37835 	 * The HWRM will translate this value into byte counter and
37836 	 * time interval used for this COS inside the device.
37837 	 */
37838 	uint32_t	queue_id6_min_bw;
37839 	/* The bandwidth value. */
37840 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_MASK \
37841 		UINT32_C(0xfffffff)
37842 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_SFT \
37843 		0
37844 	/* The granularity of the value (bits or bytes). */
37845 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_SCALE \
37846 		UINT32_C(0x10000000)
37847 	/* Value is in bits. */
37848 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_SCALE_BITS \
37849 		(UINT32_C(0x0) << 28)
37850 	/* Value is in bytes. */
37851 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_SCALE_BYTES \
37852 		(UINT32_C(0x1) << 28)
37853 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_SCALE_LAST \
37854 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_SCALE_BYTES
37855 	/* bw_value_unit is 3 b */
37856 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MASK \
37857 		UINT32_C(0xe0000000)
37858 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_SFT \
37859 		29
37860 	/* Value is in Mb or MB (base 10). */
37861 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MEGA \
37862 		(UINT32_C(0x0) << 29)
37863 	/* Value is in Kb or KB (base 10). */
37864 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_KILO \
37865 		(UINT32_C(0x2) << 29)
37866 	/* Value is in bits or bytes. */
37867 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_BASE \
37868 		(UINT32_C(0x4) << 29)
37869 	/* Value is in Gb or GB (base 10). */
37870 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_GIGA \
37871 		(UINT32_C(0x6) << 29)
37872 	/* Value is in 1/100th of a percentage of total bandwidth. */
37873 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
37874 		(UINT32_C(0x1) << 29)
37875 	/* Invalid unit */
37876 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID \
37877 		(UINT32_C(0x7) << 29)
37878 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_LAST \
37879 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID
37880 	/*
37881 	 * Maximum BW allocated to CoS queue.
37882 	 * The HWRM will translate this value into byte counter and
37883 	 * time interval used for this COS inside the device.
37884 	 */
37885 	uint32_t	queue_id6_max_bw;
37886 	/* The bandwidth value. */
37887 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_MASK \
37888 		UINT32_C(0xfffffff)
37889 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_SFT \
37890 		0
37891 	/* The granularity of the value (bits or bytes). */
37892 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_SCALE \
37893 		UINT32_C(0x10000000)
37894 	/* Value is in bits. */
37895 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_SCALE_BITS \
37896 		(UINT32_C(0x0) << 28)
37897 	/* Value is in bytes. */
37898 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_SCALE_BYTES \
37899 		(UINT32_C(0x1) << 28)
37900 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_SCALE_LAST \
37901 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_SCALE_BYTES
37902 	/* bw_value_unit is 3 b */
37903 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MASK \
37904 		UINT32_C(0xe0000000)
37905 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_SFT \
37906 		29
37907 	/* Value is in Mb or MB (base 10). */
37908 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MEGA \
37909 		(UINT32_C(0x0) << 29)
37910 	/* Value is in Kb or KB (base 10). */
37911 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_KILO \
37912 		(UINT32_C(0x2) << 29)
37913 	/* Value is in bits or bytes. */
37914 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_BASE \
37915 		(UINT32_C(0x4) << 29)
37916 	/* Value is in Gb or GB (base 10). */
37917 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_GIGA \
37918 		(UINT32_C(0x6) << 29)
37919 	/* Value is in 1/100th of a percentage of total bandwidth. */
37920 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
37921 		(UINT32_C(0x1) << 29)
37922 	/* Invalid unit */
37923 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID \
37924 		(UINT32_C(0x7) << 29)
37925 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_LAST \
37926 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID
37927 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
37928 	uint8_t	queue_id6_tsa_assign;
37929 	/* Strict Priority */
37930 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_SP \
37931 		UINT32_C(0x0)
37932 	/* Enhanced Transmission Selection */
37933 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_ETS \
37934 		UINT32_C(0x1)
37935 	/* reserved. */
37936 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_FIRST \
37937 		UINT32_C(0x2)
37938 	/* reserved. */
37939 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_LAST \
37940 		UINT32_C(0xff)
37941 	/*
37942 	 * Priority level for strict priority. Valid only when the
37943 	 * tsa_assign is 0 - Strict Priority (SP)
37944 	 * 0..7 - Valid values.
37945 	 * 8..255 - Reserved.
37946 	 */
37947 	uint8_t	queue_id6_pri_lvl;
37948 	/*
37949 	 * Weight used to allocate remaining BW for this COS after
37950 	 * servicing guaranteed bandwidths for all COS.
37951 	 */
37952 	uint8_t	queue_id6_bw_weight;
37953 	/* ID of CoS Queue 7. */
37954 	uint8_t	queue_id7;
37955 	/*
37956 	 * Minimum BW allocated to CoS Queue.
37957 	 * The HWRM will translate this value into byte counter and
37958 	 * time interval used for this COS inside the device.
37959 	 */
37960 	uint32_t	queue_id7_min_bw;
37961 	/* The bandwidth value. */
37962 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_MASK \
37963 		UINT32_C(0xfffffff)
37964 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_SFT \
37965 		0
37966 	/* The granularity of the value (bits or bytes). */
37967 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_SCALE \
37968 		UINT32_C(0x10000000)
37969 	/* Value is in bits. */
37970 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_SCALE_BITS \
37971 		(UINT32_C(0x0) << 28)
37972 	/* Value is in bytes. */
37973 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_SCALE_BYTES \
37974 		(UINT32_C(0x1) << 28)
37975 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_SCALE_LAST \
37976 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_SCALE_BYTES
37977 	/* bw_value_unit is 3 b */
37978 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MASK \
37979 		UINT32_C(0xe0000000)
37980 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_SFT \
37981 		29
37982 	/* Value is in Mb or MB (base 10). */
37983 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MEGA \
37984 		(UINT32_C(0x0) << 29)
37985 	/* Value is in Kb or KB (base 10). */
37986 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_KILO \
37987 		(UINT32_C(0x2) << 29)
37988 	/* Value is in bits or bytes. */
37989 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_BASE \
37990 		(UINT32_C(0x4) << 29)
37991 	/* Value is in Gb or GB (base 10). */
37992 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_GIGA \
37993 		(UINT32_C(0x6) << 29)
37994 	/* Value is in 1/100th of a percentage of total bandwidth. */
37995 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
37996 		(UINT32_C(0x1) << 29)
37997 	/* Invalid unit */
37998 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID \
37999 		(UINT32_C(0x7) << 29)
38000 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_LAST \
38001 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID
38002 	/*
38003 	 * Maximum BW allocated to CoS queue.
38004 	 * The HWRM will translate this value into byte counter and
38005 	 * time interval used for this COS inside the device.
38006 	 */
38007 	uint32_t	queue_id7_max_bw;
38008 	/* The bandwidth value. */
38009 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_MASK \
38010 		UINT32_C(0xfffffff)
38011 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_SFT \
38012 		0
38013 	/* The granularity of the value (bits or bytes). */
38014 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_SCALE \
38015 		UINT32_C(0x10000000)
38016 	/* Value is in bits. */
38017 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_SCALE_BITS \
38018 		(UINT32_C(0x0) << 28)
38019 	/* Value is in bytes. */
38020 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_SCALE_BYTES \
38021 		(UINT32_C(0x1) << 28)
38022 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_SCALE_LAST \
38023 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_SCALE_BYTES
38024 	/* bw_value_unit is 3 b */
38025 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MASK \
38026 		UINT32_C(0xe0000000)
38027 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_SFT \
38028 		29
38029 	/* Value is in Mb or MB (base 10). */
38030 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MEGA \
38031 		(UINT32_C(0x0) << 29)
38032 	/* Value is in Kb or KB (base 10). */
38033 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_KILO \
38034 		(UINT32_C(0x2) << 29)
38035 	/* Value is in bits or bytes. */
38036 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_BASE \
38037 		(UINT32_C(0x4) << 29)
38038 	/* Value is in Gb or GB (base 10). */
38039 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_GIGA \
38040 		(UINT32_C(0x6) << 29)
38041 	/* Value is in 1/100th of a percentage of total bandwidth. */
38042 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
38043 		(UINT32_C(0x1) << 29)
38044 	/* Invalid unit */
38045 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID \
38046 		(UINT32_C(0x7) << 29)
38047 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_LAST \
38048 		HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID
38049 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
38050 	uint8_t	queue_id7_tsa_assign;
38051 	/* Strict Priority */
38052 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_SP \
38053 		UINT32_C(0x0)
38054 	/* Enhanced Transmission Selection */
38055 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_ETS \
38056 		UINT32_C(0x1)
38057 	/* reserved. */
38058 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_FIRST \
38059 		UINT32_C(0x2)
38060 	/* reserved. */
38061 	#define HWRM_QUEUE_COS2BW_QCFG_OUTPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_LAST \
38062 		UINT32_C(0xff)
38063 	/*
38064 	 * Priority level for strict priority. Valid only when the
38065 	 * tsa_assign is 0 - Strict Priority (SP)
38066 	 * 0..7 - Valid values.
38067 	 * 8..255 - Reserved.
38068 	 */
38069 	uint8_t	queue_id7_pri_lvl;
38070 	/*
38071 	 * Weight used to allocate remaining BW for this COS after
38072 	 * servicing guaranteed bandwidths for all COS.
38073 	 */
38074 	uint8_t	queue_id7_bw_weight;
38075 	uint8_t	unused_2[4];
38076 	/*
38077 	 * This field is used in Output records to indicate that the output
38078 	 * is completely written to RAM. This field should be read as '1'
38079 	 * to indicate that the output has been completely written. When
38080 	 * writing a command completion or response to an internal processor,
38081 	 * the order of writes has to be such that this field is written last.
38082 	 */
38083 	uint8_t	valid;
38084 } __rte_packed_end;
38085 
38086 /*************************
38087  * hwrm_queue_cos2bw_cfg *
38088  *************************/
38089 
38090 
38091 /* hwrm_queue_cos2bw_cfg_input (size:1024b/128B) */
38092 struct __rte_packed_begin hwrm_queue_cos2bw_cfg_input {
38093 	/* The HWRM command request type. */
38094 	uint16_t	req_type;
38095 	/*
38096 	 * The completion ring to send the completion event on. This should
38097 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
38098 	 */
38099 	uint16_t	cmpl_ring;
38100 	/*
38101 	 * The sequence ID is used by the driver for tracking multiple
38102 	 * commands. This ID is treated as opaque data by the firmware and
38103 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
38104 	 */
38105 	uint16_t	seq_id;
38106 	/*
38107 	 * The target ID of the command:
38108 	 * * 0x0-0xFFF8 - The function ID
38109 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
38110 	 * * 0xFFFD - Reserved for user-space HWRM interface
38111 	 * * 0xFFFF - HWRM
38112 	 */
38113 	uint16_t	target_id;
38114 	/*
38115 	 * A physical address pointer pointing to a host buffer that the
38116 	 * command's response data will be written. This can be either a host
38117 	 * physical address (HPA) or a guest physical address (GPA) and must
38118 	 * point to a physically contiguous block of memory.
38119 	 */
38120 	uint64_t	resp_addr;
38121 	uint32_t	flags;
38122 	uint32_t	enables;
38123 	/*
38124 	 * If this bit is set to 1, then all queue_id0 related
38125 	 * parameters in this command are valid.
38126 	 */
38127 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID0_VALID \
38128 		UINT32_C(0x1)
38129 	/*
38130 	 * If this bit is set to 1, then all queue_id1 related
38131 	 * parameters in this command are valid.
38132 	 */
38133 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID1_VALID \
38134 		UINT32_C(0x2)
38135 	/*
38136 	 * If this bit is set to 1, then all queue_id2 related
38137 	 * parameters in this command are valid.
38138 	 */
38139 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID2_VALID \
38140 		UINT32_C(0x4)
38141 	/*
38142 	 * If this bit is set to 1, then all queue_id3 related
38143 	 * parameters in this command are valid.
38144 	 */
38145 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID3_VALID \
38146 		UINT32_C(0x8)
38147 	/*
38148 	 * If this bit is set to 1, then all queue_id4 related
38149 	 * parameters in this command are valid.
38150 	 */
38151 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID4_VALID \
38152 		UINT32_C(0x10)
38153 	/*
38154 	 * If this bit is set to 1, then all queue_id5 related
38155 	 * parameters in this command are valid.
38156 	 */
38157 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID5_VALID \
38158 		UINT32_C(0x20)
38159 	/*
38160 	 * If this bit is set to 1, then all queue_id6 related
38161 	 * parameters in this command are valid.
38162 	 */
38163 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID6_VALID \
38164 		UINT32_C(0x40)
38165 	/*
38166 	 * If this bit is set to 1, then all queue_id7 related
38167 	 * parameters in this command are valid.
38168 	 */
38169 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_ENABLES_COS_QUEUE_ID7_VALID \
38170 		UINT32_C(0x80)
38171 	/*
38172 	 * Port ID of port for which the table is being configured.
38173 	 * The HWRM needs to check whether this function is allowed
38174 	 * to configure TC BW assignment on this port.
38175 	 */
38176 	uint16_t	port_id;
38177 	/* ID of CoS Queue 0. */
38178 	uint8_t	queue_id0;
38179 	uint8_t	unused_0;
38180 	/*
38181 	 * Minimum BW allocated to CoS Queue.
38182 	 * The HWRM will translate this value into byte counter and
38183 	 * time interval used for this COS inside the device.
38184 	 */
38185 	uint32_t	queue_id0_min_bw;
38186 	/* The bandwidth value. */
38187 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_MASK \
38188 		UINT32_C(0xfffffff)
38189 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_SFT \
38190 		0
38191 	/* The granularity of the value (bits or bytes). */
38192 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_SCALE \
38193 		UINT32_C(0x10000000)
38194 	/* Value is in bits. */
38195 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_SCALE_BITS \
38196 		(UINT32_C(0x0) << 28)
38197 	/* Value is in bytes. */
38198 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_SCALE_BYTES \
38199 		(UINT32_C(0x1) << 28)
38200 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_SCALE_LAST \
38201 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_SCALE_BYTES
38202 	/* bw_value_unit is 3 b */
38203 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MASK \
38204 		UINT32_C(0xe0000000)
38205 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_SFT \
38206 		29
38207 	/* Value is in Mb or MB (base 10). */
38208 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_MEGA \
38209 		(UINT32_C(0x0) << 29)
38210 	/* Value is in Kb or KB (base 10). */
38211 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_KILO \
38212 		(UINT32_C(0x2) << 29)
38213 	/* Value is in bits or bytes. */
38214 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_BASE \
38215 		(UINT32_C(0x4) << 29)
38216 	/* Value is in Gb or GB (base 10). */
38217 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_GIGA \
38218 		(UINT32_C(0x6) << 29)
38219 	/* Value is in 1/100th of a percentage of total bandwidth. */
38220 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
38221 		(UINT32_C(0x1) << 29)
38222 	/* Invalid unit */
38223 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID \
38224 		(UINT32_C(0x7) << 29)
38225 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_LAST \
38226 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MIN_BW_BW_VALUE_UNIT_INVALID
38227 	/*
38228 	 * Maximum BW allocated to CoS Queue.
38229 	 * The HWRM will translate this value into byte counter and
38230 	 * time interval used for this COS inside the device.
38231 	 */
38232 	uint32_t	queue_id0_max_bw;
38233 	/* The bandwidth value. */
38234 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_MASK \
38235 		UINT32_C(0xfffffff)
38236 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_SFT \
38237 		0
38238 	/* The granularity of the value (bits or bytes). */
38239 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_SCALE \
38240 		UINT32_C(0x10000000)
38241 	/* Value is in bits. */
38242 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_SCALE_BITS \
38243 		(UINT32_C(0x0) << 28)
38244 	/* Value is in bytes. */
38245 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_SCALE_BYTES \
38246 		(UINT32_C(0x1) << 28)
38247 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_SCALE_LAST \
38248 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_SCALE_BYTES
38249 	/* bw_value_unit is 3 b */
38250 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MASK \
38251 		UINT32_C(0xe0000000)
38252 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_SFT \
38253 		29
38254 	/* Value is in Mb or MB (base 10). */
38255 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_MEGA \
38256 		(UINT32_C(0x0) << 29)
38257 	/* Value is in Kb or KB (base 10). */
38258 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_KILO \
38259 		(UINT32_C(0x2) << 29)
38260 	/* Value is in bits or bytes. */
38261 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_BASE \
38262 		(UINT32_C(0x4) << 29)
38263 	/* Value is in Gb or GB (base 10). */
38264 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_GIGA \
38265 		(UINT32_C(0x6) << 29)
38266 	/* Value is in 1/100th of a percentage of total bandwidth. */
38267 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
38268 		(UINT32_C(0x1) << 29)
38269 	/* Invalid unit */
38270 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID \
38271 		(UINT32_C(0x7) << 29)
38272 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_LAST \
38273 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_MAX_BW_BW_VALUE_UNIT_INVALID
38274 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
38275 	uint8_t	queue_id0_tsa_assign;
38276 	/* Strict Priority */
38277 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_SP \
38278 		UINT32_C(0x0)
38279 	/* Enhanced Transmission Selection */
38280 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_ETS \
38281 		UINT32_C(0x1)
38282 	/* reserved. */
38283 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_FIRST \
38284 		UINT32_C(0x2)
38285 	/* reserved. */
38286 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID0_TSA_ASSIGN_RESERVED_LAST \
38287 		UINT32_C(0xff)
38288 	/*
38289 	 * Priority level for strict priority. Valid only when the
38290 	 * tsa_assign is 0 - Strict Priority (SP)
38291 	 * 0..7 - Valid values.
38292 	 * 8..255 - Reserved.
38293 	 */
38294 	uint8_t	queue_id0_pri_lvl;
38295 	/*
38296 	 * Weight used to allocate remaining BW for this COS after
38297 	 * servicing guaranteed bandwidths for all COS.
38298 	 */
38299 	uint8_t	queue_id0_bw_weight;
38300 	/* ID of CoS Queue 1. */
38301 	uint8_t	queue_id1;
38302 	/*
38303 	 * Minimum BW allocated to CoS Queue.
38304 	 * The HWRM will translate this value into byte counter and
38305 	 * time interval used for this COS inside the device.
38306 	 */
38307 	uint32_t	queue_id1_min_bw;
38308 	/* The bandwidth value. */
38309 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_MASK \
38310 		UINT32_C(0xfffffff)
38311 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_SFT \
38312 		0
38313 	/* The granularity of the value (bits or bytes). */
38314 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_SCALE \
38315 		UINT32_C(0x10000000)
38316 	/* Value is in bits. */
38317 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_SCALE_BITS \
38318 		(UINT32_C(0x0) << 28)
38319 	/* Value is in bytes. */
38320 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_SCALE_BYTES \
38321 		(UINT32_C(0x1) << 28)
38322 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_SCALE_LAST \
38323 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_SCALE_BYTES
38324 	/* bw_value_unit is 3 b */
38325 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MASK \
38326 		UINT32_C(0xe0000000)
38327 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_SFT \
38328 		29
38329 	/* Value is in Mb or MB (base 10). */
38330 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_MEGA \
38331 		(UINT32_C(0x0) << 29)
38332 	/* Value is in Kb or KB (base 10). */
38333 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_KILO \
38334 		(UINT32_C(0x2) << 29)
38335 	/* Value is in bits or bytes. */
38336 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_BASE \
38337 		(UINT32_C(0x4) << 29)
38338 	/* Value is in Gb or GB (base 10). */
38339 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_GIGA \
38340 		(UINT32_C(0x6) << 29)
38341 	/* Value is in 1/100th of a percentage of total bandwidth. */
38342 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
38343 		(UINT32_C(0x1) << 29)
38344 	/* Invalid unit */
38345 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID \
38346 		(UINT32_C(0x7) << 29)
38347 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_LAST \
38348 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MIN_BW_BW_VALUE_UNIT_INVALID
38349 	/*
38350 	 * Maximum BW allocated to CoS queue.
38351 	 * The HWRM will translate this value into byte counter and
38352 	 * time interval used for this COS inside the device.
38353 	 */
38354 	uint32_t	queue_id1_max_bw;
38355 	/* The bandwidth value. */
38356 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_MASK \
38357 		UINT32_C(0xfffffff)
38358 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_SFT \
38359 		0
38360 	/* The granularity of the value (bits or bytes). */
38361 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_SCALE \
38362 		UINT32_C(0x10000000)
38363 	/* Value is in bits. */
38364 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_SCALE_BITS \
38365 		(UINT32_C(0x0) << 28)
38366 	/* Value is in bytes. */
38367 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_SCALE_BYTES \
38368 		(UINT32_C(0x1) << 28)
38369 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_SCALE_LAST \
38370 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_SCALE_BYTES
38371 	/* bw_value_unit is 3 b */
38372 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MASK \
38373 		UINT32_C(0xe0000000)
38374 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_SFT \
38375 		29
38376 	/* Value is in Mb or MB (base 10). */
38377 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_MEGA \
38378 		(UINT32_C(0x0) << 29)
38379 	/* Value is in Kb or KB (base 10). */
38380 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_KILO \
38381 		(UINT32_C(0x2) << 29)
38382 	/* Value is in bits or bytes. */
38383 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_BASE \
38384 		(UINT32_C(0x4) << 29)
38385 	/* Value is in Gb or GB (base 10). */
38386 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_GIGA \
38387 		(UINT32_C(0x6) << 29)
38388 	/* Value is in 1/100th of a percentage of total bandwidth. */
38389 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
38390 		(UINT32_C(0x1) << 29)
38391 	/* Invalid unit */
38392 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID \
38393 		(UINT32_C(0x7) << 29)
38394 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_LAST \
38395 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_MAX_BW_BW_VALUE_UNIT_INVALID
38396 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
38397 	uint8_t	queue_id1_tsa_assign;
38398 	/* Strict Priority */
38399 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_SP \
38400 		UINT32_C(0x0)
38401 	/* Enhanced Transmission Selection */
38402 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_ETS \
38403 		UINT32_C(0x1)
38404 	/* reserved. */
38405 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_FIRST \
38406 		UINT32_C(0x2)
38407 	/* reserved. */
38408 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID1_TSA_ASSIGN_RESERVED_LAST \
38409 		UINT32_C(0xff)
38410 	/*
38411 	 * Priority level for strict priority. Valid only when the
38412 	 * tsa_assign is 0 - Strict Priority (SP)
38413 	 * 0..7 - Valid values.
38414 	 * 8..255 - Reserved.
38415 	 */
38416 	uint8_t	queue_id1_pri_lvl;
38417 	/*
38418 	 * Weight used to allocate remaining BW for this COS after
38419 	 * servicing guaranteed bandwidths for all COS.
38420 	 */
38421 	uint8_t	queue_id1_bw_weight;
38422 	/* ID of CoS Queue 2. */
38423 	uint8_t	queue_id2;
38424 	/*
38425 	 * Minimum BW allocated to CoS Queue.
38426 	 * The HWRM will translate this value into byte counter and
38427 	 * time interval used for this COS inside the device.
38428 	 */
38429 	uint32_t	queue_id2_min_bw;
38430 	/* The bandwidth value. */
38431 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_MASK \
38432 		UINT32_C(0xfffffff)
38433 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_SFT \
38434 		0
38435 	/* The granularity of the value (bits or bytes). */
38436 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_SCALE \
38437 		UINT32_C(0x10000000)
38438 	/* Value is in bits. */
38439 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_SCALE_BITS \
38440 		(UINT32_C(0x0) << 28)
38441 	/* Value is in bytes. */
38442 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_SCALE_BYTES \
38443 		(UINT32_C(0x1) << 28)
38444 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_SCALE_LAST \
38445 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_SCALE_BYTES
38446 	/* bw_value_unit is 3 b */
38447 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MASK \
38448 		UINT32_C(0xe0000000)
38449 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_SFT \
38450 		29
38451 	/* Value is in Mb or MB (base 10). */
38452 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_MEGA \
38453 		(UINT32_C(0x0) << 29)
38454 	/* Value is in Kb or KB (base 10). */
38455 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_KILO \
38456 		(UINT32_C(0x2) << 29)
38457 	/* Value is in bits or bytes. */
38458 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_BASE \
38459 		(UINT32_C(0x4) << 29)
38460 	/* Value is in Gb or GB (base 10). */
38461 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_GIGA \
38462 		(UINT32_C(0x6) << 29)
38463 	/* Value is in 1/100th of a percentage of total bandwidth. */
38464 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
38465 		(UINT32_C(0x1) << 29)
38466 	/* Invalid unit */
38467 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID \
38468 		(UINT32_C(0x7) << 29)
38469 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_LAST \
38470 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MIN_BW_BW_VALUE_UNIT_INVALID
38471 	/*
38472 	 * Maximum BW allocated to CoS queue.
38473 	 * The HWRM will translate this value into byte counter and
38474 	 * time interval used for this COS inside the device.
38475 	 */
38476 	uint32_t	queue_id2_max_bw;
38477 	/* The bandwidth value. */
38478 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_MASK \
38479 		UINT32_C(0xfffffff)
38480 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_SFT \
38481 		0
38482 	/* The granularity of the value (bits or bytes). */
38483 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_SCALE \
38484 		UINT32_C(0x10000000)
38485 	/* Value is in bits. */
38486 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_SCALE_BITS \
38487 		(UINT32_C(0x0) << 28)
38488 	/* Value is in bytes. */
38489 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_SCALE_BYTES \
38490 		(UINT32_C(0x1) << 28)
38491 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_SCALE_LAST \
38492 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_SCALE_BYTES
38493 	/* bw_value_unit is 3 b */
38494 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MASK \
38495 		UINT32_C(0xe0000000)
38496 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_SFT \
38497 		29
38498 	/* Value is in Mb or MB (base 10). */
38499 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_MEGA \
38500 		(UINT32_C(0x0) << 29)
38501 	/* Value is in Kb or KB (base 10). */
38502 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_KILO \
38503 		(UINT32_C(0x2) << 29)
38504 	/* Value is in bits or bytes. */
38505 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_BASE \
38506 		(UINT32_C(0x4) << 29)
38507 	/* Value is in Gb or GB (base 10). */
38508 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_GIGA \
38509 		(UINT32_C(0x6) << 29)
38510 	/* Value is in 1/100th of a percentage of total bandwidth. */
38511 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
38512 		(UINT32_C(0x1) << 29)
38513 	/* Invalid unit */
38514 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID \
38515 		(UINT32_C(0x7) << 29)
38516 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_LAST \
38517 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_MAX_BW_BW_VALUE_UNIT_INVALID
38518 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
38519 	uint8_t	queue_id2_tsa_assign;
38520 	/* Strict Priority */
38521 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_SP \
38522 		UINT32_C(0x0)
38523 	/* Enhanced Transmission Selection */
38524 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_ETS \
38525 		UINT32_C(0x1)
38526 	/* reserved. */
38527 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_FIRST \
38528 		UINT32_C(0x2)
38529 	/* reserved. */
38530 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID2_TSA_ASSIGN_RESERVED_LAST \
38531 		UINT32_C(0xff)
38532 	/*
38533 	 * Priority level for strict priority. Valid only when the
38534 	 * tsa_assign is 0 - Strict Priority (SP)
38535 	 * 0..7 - Valid values.
38536 	 * 8..255 - Reserved.
38537 	 */
38538 	uint8_t	queue_id2_pri_lvl;
38539 	/*
38540 	 * Weight used to allocate remaining BW for this COS after
38541 	 * servicing guaranteed bandwidths for all COS.
38542 	 */
38543 	uint8_t	queue_id2_bw_weight;
38544 	/* ID of CoS Queue 3. */
38545 	uint8_t	queue_id3;
38546 	/*
38547 	 * Minimum BW allocated to CoS Queue.
38548 	 * The HWRM will translate this value into byte counter and
38549 	 * time interval used for this COS inside the device.
38550 	 */
38551 	uint32_t	queue_id3_min_bw;
38552 	/* The bandwidth value. */
38553 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_MASK \
38554 		UINT32_C(0xfffffff)
38555 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_SFT \
38556 		0
38557 	/* The granularity of the value (bits or bytes). */
38558 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_SCALE \
38559 		UINT32_C(0x10000000)
38560 	/* Value is in bits. */
38561 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_SCALE_BITS \
38562 		(UINT32_C(0x0) << 28)
38563 	/* Value is in bytes. */
38564 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_SCALE_BYTES \
38565 		(UINT32_C(0x1) << 28)
38566 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_SCALE_LAST \
38567 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_SCALE_BYTES
38568 	/* bw_value_unit is 3 b */
38569 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MASK \
38570 		UINT32_C(0xe0000000)
38571 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_SFT \
38572 		29
38573 	/* Value is in Mb or MB (base 10). */
38574 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_MEGA \
38575 		(UINT32_C(0x0) << 29)
38576 	/* Value is in Kb or KB (base 10). */
38577 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_KILO \
38578 		(UINT32_C(0x2) << 29)
38579 	/* Value is in bits or bytes. */
38580 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_BASE \
38581 		(UINT32_C(0x4) << 29)
38582 	/* Value is in Gb or GB (base 10). */
38583 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_GIGA \
38584 		(UINT32_C(0x6) << 29)
38585 	/* Value is in 1/100th of a percentage of total bandwidth. */
38586 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
38587 		(UINT32_C(0x1) << 29)
38588 	/* Invalid unit */
38589 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID \
38590 		(UINT32_C(0x7) << 29)
38591 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_LAST \
38592 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MIN_BW_BW_VALUE_UNIT_INVALID
38593 	/*
38594 	 * Maximum BW allocated to CoS queue.
38595 	 * The HWRM will translate this value into byte counter and
38596 	 * time interval used for this COS inside the device.
38597 	 */
38598 	uint32_t	queue_id3_max_bw;
38599 	/* The bandwidth value. */
38600 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_MASK \
38601 		UINT32_C(0xfffffff)
38602 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_SFT \
38603 		0
38604 	/* The granularity of the value (bits or bytes). */
38605 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_SCALE \
38606 		UINT32_C(0x10000000)
38607 	/* Value is in bits. */
38608 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_SCALE_BITS \
38609 		(UINT32_C(0x0) << 28)
38610 	/* Value is in bytes. */
38611 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_SCALE_BYTES \
38612 		(UINT32_C(0x1) << 28)
38613 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_SCALE_LAST \
38614 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_SCALE_BYTES
38615 	/* bw_value_unit is 3 b */
38616 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MASK \
38617 		UINT32_C(0xe0000000)
38618 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_SFT \
38619 		29
38620 	/* Value is in Mb or MB (base 10). */
38621 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_MEGA \
38622 		(UINT32_C(0x0) << 29)
38623 	/* Value is in Kb or KB (base 10). */
38624 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_KILO \
38625 		(UINT32_C(0x2) << 29)
38626 	/* Value is in bits or bytes. */
38627 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_BASE \
38628 		(UINT32_C(0x4) << 29)
38629 	/* Value is in Gb or GB (base 10). */
38630 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_GIGA \
38631 		(UINT32_C(0x6) << 29)
38632 	/* Value is in 1/100th of a percentage of total bandwidth. */
38633 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
38634 		(UINT32_C(0x1) << 29)
38635 	/* Invalid unit */
38636 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID \
38637 		(UINT32_C(0x7) << 29)
38638 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_LAST \
38639 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_MAX_BW_BW_VALUE_UNIT_INVALID
38640 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
38641 	uint8_t	queue_id3_tsa_assign;
38642 	/* Strict Priority */
38643 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_SP \
38644 		UINT32_C(0x0)
38645 	/* Enhanced Transmission Selection */
38646 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_ETS \
38647 		UINT32_C(0x1)
38648 	/* reserved. */
38649 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_FIRST \
38650 		UINT32_C(0x2)
38651 	/* reserved. */
38652 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID3_TSA_ASSIGN_RESERVED_LAST \
38653 		UINT32_C(0xff)
38654 	/*
38655 	 * Priority level for strict priority. Valid only when the
38656 	 * tsa_assign is 0 - Strict Priority (SP)
38657 	 * 0..7 - Valid values.
38658 	 * 8..255 - Reserved.
38659 	 */
38660 	uint8_t	queue_id3_pri_lvl;
38661 	/*
38662 	 * Weight used to allocate remaining BW for this COS after
38663 	 * servicing guaranteed bandwidths for all COS.
38664 	 */
38665 	uint8_t	queue_id3_bw_weight;
38666 	/* ID of CoS Queue 4. */
38667 	uint8_t	queue_id4;
38668 	/*
38669 	 * Minimum BW allocated to CoS Queue.
38670 	 * The HWRM will translate this value into byte counter and
38671 	 * time interval used for this COS inside the device.
38672 	 */
38673 	uint32_t	queue_id4_min_bw;
38674 	/* The bandwidth value. */
38675 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_MASK \
38676 		UINT32_C(0xfffffff)
38677 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_SFT \
38678 		0
38679 	/* The granularity of the value (bits or bytes). */
38680 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_SCALE \
38681 		UINT32_C(0x10000000)
38682 	/* Value is in bits. */
38683 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_SCALE_BITS \
38684 		(UINT32_C(0x0) << 28)
38685 	/* Value is in bytes. */
38686 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_SCALE_BYTES \
38687 		(UINT32_C(0x1) << 28)
38688 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_SCALE_LAST \
38689 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_SCALE_BYTES
38690 	/* bw_value_unit is 3 b */
38691 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MASK \
38692 		UINT32_C(0xe0000000)
38693 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_SFT \
38694 		29
38695 	/* Value is in Mb or MB (base 10). */
38696 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_MEGA \
38697 		(UINT32_C(0x0) << 29)
38698 	/* Value is in Kb or KB (base 10). */
38699 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_KILO \
38700 		(UINT32_C(0x2) << 29)
38701 	/* Value is in bits or bytes. */
38702 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_BASE \
38703 		(UINT32_C(0x4) << 29)
38704 	/* Value is in Gb or GB (base 10). */
38705 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_GIGA \
38706 		(UINT32_C(0x6) << 29)
38707 	/* Value is in 1/100th of a percentage of total bandwidth. */
38708 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
38709 		(UINT32_C(0x1) << 29)
38710 	/* Invalid unit */
38711 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID \
38712 		(UINT32_C(0x7) << 29)
38713 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_LAST \
38714 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MIN_BW_BW_VALUE_UNIT_INVALID
38715 	/*
38716 	 * Maximum BW allocated to CoS queue.
38717 	 * The HWRM will translate this value into byte counter and
38718 	 * time interval used for this COS inside the device.
38719 	 */
38720 	uint32_t	queue_id4_max_bw;
38721 	/* The bandwidth value. */
38722 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_MASK \
38723 		UINT32_C(0xfffffff)
38724 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_SFT \
38725 		0
38726 	/* The granularity of the value (bits or bytes). */
38727 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_SCALE \
38728 		UINT32_C(0x10000000)
38729 	/* Value is in bits. */
38730 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_SCALE_BITS \
38731 		(UINT32_C(0x0) << 28)
38732 	/* Value is in bytes. */
38733 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_SCALE_BYTES \
38734 		(UINT32_C(0x1) << 28)
38735 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_SCALE_LAST \
38736 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_SCALE_BYTES
38737 	/* bw_value_unit is 3 b */
38738 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MASK \
38739 		UINT32_C(0xe0000000)
38740 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_SFT \
38741 		29
38742 	/* Value is in Mb or MB (base 10). */
38743 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_MEGA \
38744 		(UINT32_C(0x0) << 29)
38745 	/* Value is in Kb or KB (base 10). */
38746 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_KILO \
38747 		(UINT32_C(0x2) << 29)
38748 	/* Value is in bits or bytes. */
38749 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_BASE \
38750 		(UINT32_C(0x4) << 29)
38751 	/* Value is in Gb or GB (base 10). */
38752 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_GIGA \
38753 		(UINT32_C(0x6) << 29)
38754 	/* Value is in 1/100th of a percentage of total bandwidth. */
38755 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
38756 		(UINT32_C(0x1) << 29)
38757 	/* Invalid unit */
38758 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID \
38759 		(UINT32_C(0x7) << 29)
38760 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_LAST \
38761 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_MAX_BW_BW_VALUE_UNIT_INVALID
38762 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
38763 	uint8_t	queue_id4_tsa_assign;
38764 	/* Strict Priority */
38765 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_SP \
38766 		UINT32_C(0x0)
38767 	/* Enhanced Transmission Selection */
38768 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_ETS \
38769 		UINT32_C(0x1)
38770 	/* reserved. */
38771 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_FIRST \
38772 		UINT32_C(0x2)
38773 	/* reserved. */
38774 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID4_TSA_ASSIGN_RESERVED_LAST \
38775 		UINT32_C(0xff)
38776 	/*
38777 	 * Priority level for strict priority. Valid only when the
38778 	 * tsa_assign is 0 - Strict Priority (SP)
38779 	 * 0..7 - Valid values.
38780 	 * 8..255 - Reserved.
38781 	 */
38782 	uint8_t	queue_id4_pri_lvl;
38783 	/*
38784 	 * Weight used to allocate remaining BW for this COS after
38785 	 * servicing guaranteed bandwidths for all COS.
38786 	 */
38787 	uint8_t	queue_id4_bw_weight;
38788 	/* ID of CoS Queue 5. */
38789 	uint8_t	queue_id5;
38790 	/*
38791 	 * Minimum BW allocated to CoS Queue.
38792 	 * The HWRM will translate this value into byte counter and
38793 	 * time interval used for this COS inside the device.
38794 	 */
38795 	uint32_t	queue_id5_min_bw;
38796 	/* The bandwidth value. */
38797 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_MASK \
38798 		UINT32_C(0xfffffff)
38799 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_SFT \
38800 		0
38801 	/* The granularity of the value (bits or bytes). */
38802 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_SCALE \
38803 		UINT32_C(0x10000000)
38804 	/* Value is in bits. */
38805 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_SCALE_BITS \
38806 		(UINT32_C(0x0) << 28)
38807 	/* Value is in bytes. */
38808 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_SCALE_BYTES \
38809 		(UINT32_C(0x1) << 28)
38810 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_SCALE_LAST \
38811 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_SCALE_BYTES
38812 	/* bw_value_unit is 3 b */
38813 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MASK \
38814 		UINT32_C(0xe0000000)
38815 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_SFT \
38816 		29
38817 	/* Value is in Mb or MB (base 10). */
38818 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_MEGA \
38819 		(UINT32_C(0x0) << 29)
38820 	/* Value is in Kb or KB (base 10). */
38821 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_KILO \
38822 		(UINT32_C(0x2) << 29)
38823 	/* Value is in bits or bytes. */
38824 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_BASE \
38825 		(UINT32_C(0x4) << 29)
38826 	/* Value is in Gb or GB (base 10). */
38827 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_GIGA \
38828 		(UINT32_C(0x6) << 29)
38829 	/* Value is in 1/100th of a percentage of total bandwidth. */
38830 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
38831 		(UINT32_C(0x1) << 29)
38832 	/* Invalid unit */
38833 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID \
38834 		(UINT32_C(0x7) << 29)
38835 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_LAST \
38836 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MIN_BW_BW_VALUE_UNIT_INVALID
38837 	/*
38838 	 * Maximum BW allocated to CoS queue.
38839 	 * The HWRM will translate this value into byte counter and
38840 	 * time interval used for this COS inside the device.
38841 	 */
38842 	uint32_t	queue_id5_max_bw;
38843 	/* The bandwidth value. */
38844 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_MASK \
38845 		UINT32_C(0xfffffff)
38846 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_SFT \
38847 		0
38848 	/* The granularity of the value (bits or bytes). */
38849 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_SCALE \
38850 		UINT32_C(0x10000000)
38851 	/* Value is in bits. */
38852 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_SCALE_BITS \
38853 		(UINT32_C(0x0) << 28)
38854 	/* Value is in bytes. */
38855 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_SCALE_BYTES \
38856 		(UINT32_C(0x1) << 28)
38857 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_SCALE_LAST \
38858 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_SCALE_BYTES
38859 	/* bw_value_unit is 3 b */
38860 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MASK \
38861 		UINT32_C(0xe0000000)
38862 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_SFT \
38863 		29
38864 	/* Value is in Mb or MB (base 10). */
38865 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_MEGA \
38866 		(UINT32_C(0x0) << 29)
38867 	/* Value is in Kb or KB (base 10). */
38868 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_KILO \
38869 		(UINT32_C(0x2) << 29)
38870 	/* Value is in bits or bytes. */
38871 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_BASE \
38872 		(UINT32_C(0x4) << 29)
38873 	/* Value is in Gb or GB (base 10). */
38874 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_GIGA \
38875 		(UINT32_C(0x6) << 29)
38876 	/* Value is in 1/100th of a percentage of total bandwidth. */
38877 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
38878 		(UINT32_C(0x1) << 29)
38879 	/* Invalid unit */
38880 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID \
38881 		(UINT32_C(0x7) << 29)
38882 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_LAST \
38883 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_MAX_BW_BW_VALUE_UNIT_INVALID
38884 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
38885 	uint8_t	queue_id5_tsa_assign;
38886 	/* Strict Priority */
38887 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_SP \
38888 		UINT32_C(0x0)
38889 	/* Enhanced Transmission Selection */
38890 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_ETS \
38891 		UINT32_C(0x1)
38892 	/* reserved. */
38893 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_FIRST \
38894 		UINT32_C(0x2)
38895 	/* reserved. */
38896 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID5_TSA_ASSIGN_RESERVED_LAST \
38897 		UINT32_C(0xff)
38898 	/*
38899 	 * Priority level for strict priority. Valid only when the
38900 	 * tsa_assign is 0 - Strict Priority (SP)
38901 	 * 0..7 - Valid values.
38902 	 * 8..255 - Reserved.
38903 	 */
38904 	uint8_t	queue_id5_pri_lvl;
38905 	/*
38906 	 * Weight used to allocate remaining BW for this COS after
38907 	 * servicing guaranteed bandwidths for all COS.
38908 	 */
38909 	uint8_t	queue_id5_bw_weight;
38910 	/* ID of CoS Queue 6. */
38911 	uint8_t	queue_id6;
38912 	/*
38913 	 * Minimum BW allocated to CoS Queue.
38914 	 * The HWRM will translate this value into byte counter and
38915 	 * time interval used for this COS inside the device.
38916 	 */
38917 	uint32_t	queue_id6_min_bw;
38918 	/* The bandwidth value. */
38919 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_MASK \
38920 		UINT32_C(0xfffffff)
38921 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_SFT \
38922 		0
38923 	/* The granularity of the value (bits or bytes). */
38924 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_SCALE \
38925 		UINT32_C(0x10000000)
38926 	/* Value is in bits. */
38927 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_SCALE_BITS \
38928 		(UINT32_C(0x0) << 28)
38929 	/* Value is in bytes. */
38930 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_SCALE_BYTES \
38931 		(UINT32_C(0x1) << 28)
38932 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_SCALE_LAST \
38933 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_SCALE_BYTES
38934 	/* bw_value_unit is 3 b */
38935 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MASK \
38936 		UINT32_C(0xe0000000)
38937 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_SFT \
38938 		29
38939 	/* Value is in Mb or MB (base 10). */
38940 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_MEGA \
38941 		(UINT32_C(0x0) << 29)
38942 	/* Value is in Kb or KB (base 10). */
38943 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_KILO \
38944 		(UINT32_C(0x2) << 29)
38945 	/* Value is in bits or bytes. */
38946 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_BASE \
38947 		(UINT32_C(0x4) << 29)
38948 	/* Value is in Gb or GB (base 10). */
38949 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_GIGA \
38950 		(UINT32_C(0x6) << 29)
38951 	/* Value is in 1/100th of a percentage of total bandwidth. */
38952 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
38953 		(UINT32_C(0x1) << 29)
38954 	/* Invalid unit */
38955 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID \
38956 		(UINT32_C(0x7) << 29)
38957 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_LAST \
38958 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MIN_BW_BW_VALUE_UNIT_INVALID
38959 	/*
38960 	 * Maximum BW allocated to CoS queue.
38961 	 * The HWRM will translate this value into byte counter and
38962 	 * time interval used for this COS inside the device.
38963 	 */
38964 	uint32_t	queue_id6_max_bw;
38965 	/* The bandwidth value. */
38966 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_MASK \
38967 		UINT32_C(0xfffffff)
38968 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_SFT \
38969 		0
38970 	/* The granularity of the value (bits or bytes). */
38971 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_SCALE \
38972 		UINT32_C(0x10000000)
38973 	/* Value is in bits. */
38974 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_SCALE_BITS \
38975 		(UINT32_C(0x0) << 28)
38976 	/* Value is in bytes. */
38977 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_SCALE_BYTES \
38978 		(UINT32_C(0x1) << 28)
38979 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_SCALE_LAST \
38980 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_SCALE_BYTES
38981 	/* bw_value_unit is 3 b */
38982 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MASK \
38983 		UINT32_C(0xe0000000)
38984 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_SFT \
38985 		29
38986 	/* Value is in Mb or MB (base 10). */
38987 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_MEGA \
38988 		(UINT32_C(0x0) << 29)
38989 	/* Value is in Kb or KB (base 10). */
38990 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_KILO \
38991 		(UINT32_C(0x2) << 29)
38992 	/* Value is in bits or bytes. */
38993 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_BASE \
38994 		(UINT32_C(0x4) << 29)
38995 	/* Value is in Gb or GB (base 10). */
38996 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_GIGA \
38997 		(UINT32_C(0x6) << 29)
38998 	/* Value is in 1/100th of a percentage of total bandwidth. */
38999 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
39000 		(UINT32_C(0x1) << 29)
39001 	/* Invalid unit */
39002 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID \
39003 		(UINT32_C(0x7) << 29)
39004 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_LAST \
39005 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_MAX_BW_BW_VALUE_UNIT_INVALID
39006 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
39007 	uint8_t	queue_id6_tsa_assign;
39008 	/* Strict Priority */
39009 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_SP \
39010 		UINT32_C(0x0)
39011 	/* Enhanced Transmission Selection */
39012 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_ETS \
39013 		UINT32_C(0x1)
39014 	/* reserved. */
39015 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_FIRST \
39016 		UINT32_C(0x2)
39017 	/* reserved. */
39018 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID6_TSA_ASSIGN_RESERVED_LAST \
39019 		UINT32_C(0xff)
39020 	/*
39021 	 * Priority level for strict priority. Valid only when the
39022 	 * tsa_assign is 0 - Strict Priority (SP)
39023 	 * 0..7 - Valid values.
39024 	 * 8..255 - Reserved.
39025 	 */
39026 	uint8_t	queue_id6_pri_lvl;
39027 	/*
39028 	 * Weight used to allocate remaining BW for this COS after
39029 	 * servicing guaranteed bandwidths for all COS.
39030 	 */
39031 	uint8_t	queue_id6_bw_weight;
39032 	/* ID of CoS Queue 7. */
39033 	uint8_t	queue_id7;
39034 	/*
39035 	 * Minimum BW allocated to CoS Queue.
39036 	 * The HWRM will translate this value into byte counter and
39037 	 * time interval used for this COS inside the device.
39038 	 */
39039 	uint32_t	queue_id7_min_bw;
39040 	/* The bandwidth value. */
39041 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_MASK \
39042 		UINT32_C(0xfffffff)
39043 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_SFT \
39044 		0
39045 	/* The granularity of the value (bits or bytes). */
39046 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_SCALE \
39047 		UINT32_C(0x10000000)
39048 	/* Value is in bits. */
39049 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_SCALE_BITS \
39050 		(UINT32_C(0x0) << 28)
39051 	/* Value is in bytes. */
39052 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_SCALE_BYTES \
39053 		(UINT32_C(0x1) << 28)
39054 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_SCALE_LAST \
39055 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_SCALE_BYTES
39056 	/* bw_value_unit is 3 b */
39057 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MASK \
39058 		UINT32_C(0xe0000000)
39059 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_SFT \
39060 		29
39061 	/* Value is in Mb or MB (base 10). */
39062 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_MEGA \
39063 		(UINT32_C(0x0) << 29)
39064 	/* Value is in Kb or KB (base 10). */
39065 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_KILO \
39066 		(UINT32_C(0x2) << 29)
39067 	/* Value is in bits or bytes. */
39068 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_BASE \
39069 		(UINT32_C(0x4) << 29)
39070 	/* Value is in Gb or GB (base 10). */
39071 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_GIGA \
39072 		(UINT32_C(0x6) << 29)
39073 	/* Value is in 1/100th of a percentage of total bandwidth. */
39074 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_PERCENT1_100 \
39075 		(UINT32_C(0x1) << 29)
39076 	/* Invalid unit */
39077 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID \
39078 		(UINT32_C(0x7) << 29)
39079 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_LAST \
39080 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MIN_BW_BW_VALUE_UNIT_INVALID
39081 	/*
39082 	 * Maximum BW allocated to CoS queue.
39083 	 * The HWRM will translate this value into byte counter and
39084 	 * time interval used for this COS inside the device.
39085 	 */
39086 	uint32_t	queue_id7_max_bw;
39087 	/* The bandwidth value. */
39088 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_MASK \
39089 		UINT32_C(0xfffffff)
39090 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_SFT \
39091 		0
39092 	/* The granularity of the value (bits or bytes). */
39093 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_SCALE \
39094 		UINT32_C(0x10000000)
39095 	/* Value is in bits. */
39096 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_SCALE_BITS \
39097 		(UINT32_C(0x0) << 28)
39098 	/* Value is in bytes. */
39099 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_SCALE_BYTES \
39100 		(UINT32_C(0x1) << 28)
39101 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_SCALE_LAST \
39102 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_SCALE_BYTES
39103 	/* bw_value_unit is 3 b */
39104 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MASK \
39105 		UINT32_C(0xe0000000)
39106 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_SFT \
39107 		29
39108 	/* Value is in Mb or MB (base 10). */
39109 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_MEGA \
39110 		(UINT32_C(0x0) << 29)
39111 	/* Value is in Kb or KB (base 10). */
39112 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_KILO \
39113 		(UINT32_C(0x2) << 29)
39114 	/* Value is in bits or bytes. */
39115 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_BASE \
39116 		(UINT32_C(0x4) << 29)
39117 	/* Value is in Gb or GB (base 10). */
39118 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_GIGA \
39119 		(UINT32_C(0x6) << 29)
39120 	/* Value is in 1/100th of a percentage of total bandwidth. */
39121 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
39122 		(UINT32_C(0x1) << 29)
39123 	/* Invalid unit */
39124 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID \
39125 		(UINT32_C(0x7) << 29)
39126 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_LAST \
39127 		HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_MAX_BW_BW_VALUE_UNIT_INVALID
39128 	/* Transmission Selection Algorithm (TSA) for CoS Queue. */
39129 	uint8_t	queue_id7_tsa_assign;
39130 	/* Strict Priority */
39131 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_SP \
39132 		UINT32_C(0x0)
39133 	/* Enhanced Transmission Selection */
39134 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_ETS \
39135 		UINT32_C(0x1)
39136 	/* reserved. */
39137 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_FIRST \
39138 		UINT32_C(0x2)
39139 	/* reserved. */
39140 	#define HWRM_QUEUE_COS2BW_CFG_INPUT_QUEUE_ID7_TSA_ASSIGN_RESERVED_LAST \
39141 		UINT32_C(0xff)
39142 	/*
39143 	 * Priority level for strict priority. Valid only when the
39144 	 * tsa_assign is 0 - Strict Priority (SP)
39145 	 * 0..7 - Valid values.
39146 	 * 8..255 - Reserved.
39147 	 */
39148 	uint8_t	queue_id7_pri_lvl;
39149 	/*
39150 	 * Weight used to allocate remaining BW for this COS after
39151 	 * servicing guaranteed bandwidths for all COS.
39152 	 */
39153 	uint8_t	queue_id7_bw_weight;
39154 	uint8_t	unused_1[5];
39155 } __rte_packed_end;
39156 
39157 /* hwrm_queue_cos2bw_cfg_output (size:128b/16B) */
39158 struct __rte_packed_begin hwrm_queue_cos2bw_cfg_output {
39159 	/* The specific error status for the command. */
39160 	uint16_t	error_code;
39161 	/* The HWRM command request type. */
39162 	uint16_t	req_type;
39163 	/* The sequence ID from the original command. */
39164 	uint16_t	seq_id;
39165 	/* The length of the response data in number of bytes. */
39166 	uint16_t	resp_len;
39167 	uint8_t	unused_0[7];
39168 	/*
39169 	 * This field is used in Output records to indicate that the output
39170 	 * is completely written to RAM. This field should be read as '1'
39171 	 * to indicate that the output has been completely written. When
39172 	 * writing a command completion or response to an internal processor,
39173 	 * the order of writes has to be such that this field is written last.
39174 	 */
39175 	uint8_t	valid;
39176 } __rte_packed_end;
39177 
39178 /*************************
39179  * hwrm_queue_dscp_qcaps *
39180  *************************/
39181 
39182 
39183 /* hwrm_queue_dscp_qcaps_input (size:192b/24B) */
39184 struct __rte_packed_begin hwrm_queue_dscp_qcaps_input {
39185 	/* The HWRM command request type. */
39186 	uint16_t	req_type;
39187 	/*
39188 	 * The completion ring to send the completion event on. This should
39189 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39190 	 */
39191 	uint16_t	cmpl_ring;
39192 	/*
39193 	 * The sequence ID is used by the driver for tracking multiple
39194 	 * commands. This ID is treated as opaque data by the firmware and
39195 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39196 	 */
39197 	uint16_t	seq_id;
39198 	/*
39199 	 * The target ID of the command:
39200 	 * * 0x0-0xFFF8 - The function ID
39201 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39202 	 * * 0xFFFD - Reserved for user-space HWRM interface
39203 	 * * 0xFFFF - HWRM
39204 	 */
39205 	uint16_t	target_id;
39206 	/*
39207 	 * A physical address pointer pointing to a host buffer that the
39208 	 * command's response data will be written. This can be either a host
39209 	 * physical address (HPA) or a guest physical address (GPA) and must
39210 	 * point to a physically contiguous block of memory.
39211 	 */
39212 	uint64_t	resp_addr;
39213 	/*
39214 	 * Port ID of port for which the table is being configured.
39215 	 * The HWRM needs to check whether this function is allowed
39216 	 * to configure pri2cos mapping on this port.
39217 	 */
39218 	uint8_t	port_id;
39219 	uint8_t	unused_0[7];
39220 } __rte_packed_end;
39221 
39222 /* hwrm_queue_dscp_qcaps_output (size:128b/16B) */
39223 struct __rte_packed_begin hwrm_queue_dscp_qcaps_output {
39224 	/* The specific error status for the command. */
39225 	uint16_t	error_code;
39226 	/* The HWRM command request type. */
39227 	uint16_t	req_type;
39228 	/* The sequence ID from the original command. */
39229 	uint16_t	seq_id;
39230 	/* The length of the response data in number of bytes. */
39231 	uint16_t	resp_len;
39232 	/* The number of bits provided by the hardware for the DSCP value. */
39233 	uint8_t	num_dscp_bits;
39234 	uint8_t	unused_0;
39235 	/* Max number of DSCP-MASK-PRI entries supported. */
39236 	uint16_t	max_entries;
39237 	uint8_t	unused_1[3];
39238 	/*
39239 	 * This field is used in Output records to indicate that the output
39240 	 * is completely written to RAM. This field should be read as '1'
39241 	 * to indicate that the output has been completely written. When
39242 	 * writing a command completion or response to an internal processor,
39243 	 * the order of writes has to be such that this field is written last.
39244 	 */
39245 	uint8_t	valid;
39246 } __rte_packed_end;
39247 
39248 /****************************
39249  * hwrm_queue_dscp2pri_qcfg *
39250  ****************************/
39251 
39252 
39253 /* hwrm_queue_dscp2pri_qcfg_input (size:256b/32B) */
39254 struct __rte_packed_begin hwrm_queue_dscp2pri_qcfg_input {
39255 	/* The HWRM command request type. */
39256 	uint16_t	req_type;
39257 	/*
39258 	 * The completion ring to send the completion event on. This should
39259 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39260 	 */
39261 	uint16_t	cmpl_ring;
39262 	/*
39263 	 * The sequence ID is used by the driver for tracking multiple
39264 	 * commands. This ID is treated as opaque data by the firmware and
39265 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39266 	 */
39267 	uint16_t	seq_id;
39268 	/*
39269 	 * The target ID of the command:
39270 	 * * 0x0-0xFFF8 - The function ID
39271 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39272 	 * * 0xFFFD - Reserved for user-space HWRM interface
39273 	 * * 0xFFFF - HWRM
39274 	 */
39275 	uint16_t	target_id;
39276 	/*
39277 	 * A physical address pointer pointing to a host buffer that the
39278 	 * command's response data will be written. This can be either a host
39279 	 * physical address (HPA) or a guest physical address (GPA) and must
39280 	 * point to a physically contiguous block of memory.
39281 	 */
39282 	uint64_t	resp_addr;
39283 	/*
39284 	 * This is the host address where the 24-bits DSCP-MASK-PRI
39285 	 * tuple(s) will be copied to.
39286 	 */
39287 	uint64_t	dest_data_addr;
39288 	/*
39289 	 * Port ID of port for which the table is being configured.
39290 	 * The HWRM needs to check whether this function is allowed
39291 	 * to configure pri2cos mapping on this port.
39292 	 */
39293 	uint8_t	port_id;
39294 	uint8_t	unused_0;
39295 	/* Size of the buffer pointed to by dest_data_addr. */
39296 	uint16_t	dest_data_buffer_size;
39297 	uint8_t	unused_1[4];
39298 } __rte_packed_end;
39299 
39300 /* hwrm_queue_dscp2pri_qcfg_output (size:128b/16B) */
39301 struct __rte_packed_begin hwrm_queue_dscp2pri_qcfg_output {
39302 	/* The specific error status for the command. */
39303 	uint16_t	error_code;
39304 	/* The HWRM command request type. */
39305 	uint16_t	req_type;
39306 	/* The sequence ID from the original command. */
39307 	uint16_t	seq_id;
39308 	/* The length of the response data in number of bytes. */
39309 	uint16_t	resp_len;
39310 	/*
39311 	 * A count of the number of DSCP-MASK-PRI tuple(s) pointed to
39312 	 * by the dest_data_addr.
39313 	 */
39314 	uint16_t	entry_cnt;
39315 	/*
39316 	 * This is the default PRI which un-initialized DSCP values are
39317 	 * mapped to.
39318 	 */
39319 	uint8_t	default_pri;
39320 	uint8_t	unused_0[4];
39321 	/*
39322 	 * This field is used in Output records to indicate that the output
39323 	 * is completely written to RAM. This field should be read as '1'
39324 	 * to indicate that the output has been completely written. When
39325 	 * writing a command completion or response to an internal processor,
39326 	 * the order of writes has to be such that this field is written last.
39327 	 */
39328 	uint8_t	valid;
39329 } __rte_packed_end;
39330 
39331 /***************************
39332  * hwrm_queue_dscp2pri_cfg *
39333  ***************************/
39334 
39335 
39336 /* hwrm_queue_dscp2pri_cfg_input (size:320b/40B) */
39337 struct __rte_packed_begin hwrm_queue_dscp2pri_cfg_input {
39338 	/* The HWRM command request type. */
39339 	uint16_t	req_type;
39340 	/*
39341 	 * The completion ring to send the completion event on. This should
39342 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39343 	 */
39344 	uint16_t	cmpl_ring;
39345 	/*
39346 	 * The sequence ID is used by the driver for tracking multiple
39347 	 * commands. This ID is treated as opaque data by the firmware and
39348 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39349 	 */
39350 	uint16_t	seq_id;
39351 	/*
39352 	 * The target ID of the command:
39353 	 * * 0x0-0xFFF8 - The function ID
39354 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39355 	 * * 0xFFFD - Reserved for user-space HWRM interface
39356 	 * * 0xFFFF - HWRM
39357 	 */
39358 	uint16_t	target_id;
39359 	/*
39360 	 * A physical address pointer pointing to a host buffer that the
39361 	 * command's response data will be written. This can be either a host
39362 	 * physical address (HPA) or a guest physical address (GPA) and must
39363 	 * point to a physically contiguous block of memory.
39364 	 */
39365 	uint64_t	resp_addr;
39366 	/*
39367 	 * This is the host address where the 24-bits DSCP-MASK-PRI tuple
39368 	 * will be copied from. A non-zero mask "adds" a tuple, while
39369 	 * a mask equal to 0 triggers the firmware to remove a tuple.
39370 	 * Only tuples with unique DSCP values are stored. On chips
39371 	 * prior to Thor a mask can be 0 - 0x3f, while on Thor it can
39372 	 * be 0 or 0x3f.
39373 	 */
39374 	uint64_t	src_data_addr;
39375 	uint32_t	flags;
39376 	/* use_hw_default_pri is 1 b */
39377 	#define HWRM_QUEUE_DSCP2PRI_CFG_INPUT_FLAGS_USE_HW_DEFAULT_PRI \
39378 		UINT32_C(0x1)
39379 	uint32_t	enables;
39380 	/*
39381 	 * This bit must be '1' for the default_pri field to be
39382 	 * configured.
39383 	 */
39384 	#define HWRM_QUEUE_DSCP2PRI_CFG_INPUT_ENABLES_DEFAULT_PRI \
39385 		UINT32_C(0x1)
39386 	/*
39387 	 * Port ID of port for which the table is being configured.
39388 	 * The HWRM needs to check whether this function is allowed
39389 	 * to configure pri2cos mapping on this port.
39390 	 */
39391 	uint8_t	port_id;
39392 	/*
39393 	 * This is the default PRI which un-initialized DSCP values will be
39394 	 * mapped to.
39395 	 */
39396 	uint8_t	default_pri;
39397 	/*
39398 	 * A count of the number of DSCP-MASK-PRI tuple(s) in the data pointed
39399 	 * to by src_data_addr.
39400 	 */
39401 	uint16_t	entry_cnt;
39402 	uint8_t	unused_0[4];
39403 } __rte_packed_end;
39404 
39405 /* hwrm_queue_dscp2pri_cfg_output (size:128b/16B) */
39406 struct __rte_packed_begin hwrm_queue_dscp2pri_cfg_output {
39407 	/* The specific error status for the command. */
39408 	uint16_t	error_code;
39409 	/* The HWRM command request type. */
39410 	uint16_t	req_type;
39411 	/* The sequence ID from the original command. */
39412 	uint16_t	seq_id;
39413 	/* The length of the response data in number of bytes. */
39414 	uint16_t	resp_len;
39415 	uint8_t	unused_0[7];
39416 	/*
39417 	 * This field is used in Output records to indicate that the output
39418 	 * is completely written to RAM. This field should be read as '1'
39419 	 * to indicate that the output has been completely written. When
39420 	 * writing a command completion or response to an internal processor,
39421 	 * the order of writes has to be such that this field is written last.
39422 	 */
39423 	uint8_t	valid;
39424 } __rte_packed_end;
39425 
39426 /*************************
39427  * hwrm_queue_mpls_qcaps *
39428  *************************/
39429 
39430 
39431 /* hwrm_queue_mpls_qcaps_input (size:192b/24B) */
39432 struct __rte_packed_begin hwrm_queue_mpls_qcaps_input {
39433 	/* The HWRM command request type. */
39434 	uint16_t	req_type;
39435 	/*
39436 	 * The completion ring to send the completion event on. This should
39437 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39438 	 */
39439 	uint16_t	cmpl_ring;
39440 	/*
39441 	 * The sequence ID is used by the driver for tracking multiple
39442 	 * commands. This ID is treated as opaque data by the firmware and
39443 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39444 	 */
39445 	uint16_t	seq_id;
39446 	/*
39447 	 * The target ID of the command:
39448 	 * * 0x0-0xFFF8 - The function ID
39449 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39450 	 * * 0xFFFD - Reserved for user-space HWRM interface
39451 	 * * 0xFFFF - HWRM
39452 	 */
39453 	uint16_t	target_id;
39454 	/*
39455 	 * A physical address pointer pointing to a host buffer that the
39456 	 * command's response data will be written. This can be either a host
39457 	 * physical address (HPA) or a guest physical address (GPA) and must
39458 	 * point to a physically contiguous block of memory.
39459 	 */
39460 	uint64_t	resp_addr;
39461 	/*
39462 	 * Port ID of port for which the table is being configured.
39463 	 * The HWRM needs to check whether this function is allowed
39464 	 * to configure MPLS TC(EXP) to pri mapping on this port.
39465 	 */
39466 	uint8_t	port_id;
39467 	uint8_t	unused_0[7];
39468 } __rte_packed_end;
39469 
39470 /* hwrm_queue_mpls_qcaps_output (size:128b/16B) */
39471 struct __rte_packed_begin hwrm_queue_mpls_qcaps_output {
39472 	/* The specific error status for the command. */
39473 	uint16_t	error_code;
39474 	/* The HWRM command request type. */
39475 	uint16_t	req_type;
39476 	/* The sequence ID from the original command. */
39477 	uint16_t	seq_id;
39478 	/* The length of the response data in number of bytes. */
39479 	uint16_t	resp_len;
39480 	/*
39481 	 * Bitmask indicating which queues can be configured by the
39482 	 * hwrm_queue_mplstc2pri_cfg command.
39483 	 *
39484 	 * Each bit represents a specific pri where bit 0 represents
39485 	 * pri 0 and bit 7 represents pri 7.
39486 	 * # A value of 0 indicates that the pri is not configurable
39487 	 * by the hwrm_queue_mplstc2pri_cfg command.
39488 	 * # A value of 1 indicates that the pri is configurable.
39489 	 * # A hwrm_queue_mplstc2pri_cfg command shall return error when
39490 	 * trying to configure a pri that is not configurable.
39491 	 */
39492 	uint8_t	queue_mplstc2pri_cfg_allowed;
39493 	/*
39494 	 * This is the default PRI which un-initialized MPLS values will be
39495 	 * mapped to.
39496 	 */
39497 	uint8_t	hw_default_pri;
39498 	uint8_t	unused_0[5];
39499 	/*
39500 	 * This field is used in Output records to indicate that the output
39501 	 * is completely written to RAM. This field should be read as '1'
39502 	 * to indicate that the output has been completely written. When
39503 	 * writing a command completion or response to an internal processor,
39504 	 * the order of writes has to be such that this field is written last.
39505 	 */
39506 	uint8_t	valid;
39507 } __rte_packed_end;
39508 
39509 /******************************
39510  * hwrm_queue_mplstc2pri_qcfg *
39511  ******************************/
39512 
39513 
39514 /* hwrm_queue_mplstc2pri_qcfg_input (size:192b/24B) */
39515 struct __rte_packed_begin hwrm_queue_mplstc2pri_qcfg_input {
39516 	/* The HWRM command request type. */
39517 	uint16_t	req_type;
39518 	/*
39519 	 * The completion ring to send the completion event on. This should
39520 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39521 	 */
39522 	uint16_t	cmpl_ring;
39523 	/*
39524 	 * The sequence ID is used by the driver for tracking multiple
39525 	 * commands. This ID is treated as opaque data by the firmware and
39526 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39527 	 */
39528 	uint16_t	seq_id;
39529 	/*
39530 	 * The target ID of the command:
39531 	 * * 0x0-0xFFF8 - The function ID
39532 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39533 	 * * 0xFFFD - Reserved for user-space HWRM interface
39534 	 * * 0xFFFF - HWRM
39535 	 */
39536 	uint16_t	target_id;
39537 	/*
39538 	 * A physical address pointer pointing to a host buffer that the
39539 	 * command's response data will be written. This can be either a host
39540 	 * physical address (HPA) or a guest physical address (GPA) and must
39541 	 * point to a physically contiguous block of memory.
39542 	 */
39543 	uint64_t	resp_addr;
39544 	/*
39545 	 * Port ID of port for which the table is being configured.
39546 	 * The HWRM needs to check whether this function is allowed
39547 	 * to configure MPLS TC(EXP) to pri mapping on this port.
39548 	 */
39549 	uint8_t	port_id;
39550 	uint8_t	unused_0[7];
39551 } __rte_packed_end;
39552 
39553 /* hwrm_queue_mplstc2pri_qcfg_output (size:192b/24B) */
39554 struct __rte_packed_begin hwrm_queue_mplstc2pri_qcfg_output {
39555 	/* The specific error status for the command. */
39556 	uint16_t	error_code;
39557 	/* The HWRM command request type. */
39558 	uint16_t	req_type;
39559 	/* The sequence ID from the original command. */
39560 	uint16_t	seq_id;
39561 	/* The length of the response data in number of bytes. */
39562 	uint16_t	resp_len;
39563 	/*
39564 	 * pri assigned to MPLS TC(EXP) 0. This value can only be changed
39565 	 * before traffic has started.
39566 	 * A value of 0xff indicates that no pri is assigned to the
39567 	 * MPLS TC(EXP) 0.
39568 	 */
39569 	uint8_t	tc0_pri_queue_id;
39570 	/*
39571 	 * pri assigned to MPLS TC(EXP) 1. This value can only be changed
39572 	 * before traffic has started.
39573 	 * A value of 0xff indicates that no pri is assigned to the
39574 	 * MPLS TC(EXP) 1.
39575 	 */
39576 	uint8_t	tc1_pri_queue_id;
39577 	/*
39578 	 * pri assigned to MPLS TC(EXP) 2. This value can only be changed
39579 	 * before traffic has started.
39580 	 * A value of 0xff indicates that no pri is assigned to the
39581 	 * MPLS TC(EXP) 2.
39582 	 */
39583 	uint8_t	tc2_pri_queue_id;
39584 	/*
39585 	 * pri assigned to MPLS TC(EXP) 3. This value can only be changed
39586 	 * before traffic has started.
39587 	 * A value of 0xff indicates that no pri is assigned to the
39588 	 * MPLS TC(EXP) 3.
39589 	 */
39590 	uint8_t	tc3_pri_queue_id;
39591 	/*
39592 	 * pri assigned to MPLS TC(EXP) 4. This value can only be changed
39593 	 * before traffic has started.
39594 	 * A value of 0xff indicates that no pri is assigned to the
39595 	 * MPLS TC(EXP) 4.
39596 	 */
39597 	uint8_t	tc4_pri_queue_id;
39598 	/*
39599 	 * pri assigned to MPLS TC(EXP) 5. This value can only be changed
39600 	 * before traffic has started.
39601 	 * A value of 0xff indicates that no pri is assigned to the
39602 	 * MPLS TC(EXP) 5.
39603 	 */
39604 	uint8_t	tc5_pri_queue_id;
39605 	/*
39606 	 * pri assigned to MPLS TC(EXP) 6. This value can only
39607 	 * be changed before traffic has started.
39608 	 * A value of 0xff indicates that no pri is assigned to the
39609 	 * MPLS TC(EXP) 6.
39610 	 */
39611 	uint8_t	tc6_pri_queue_id;
39612 	/*
39613 	 * pri assigned to MPLS TC(EXP) 7. This value can only
39614 	 * be changed before traffic has started.
39615 	 * A value of 0xff indicates that no pri is assigned to the
39616 	 * MPLS TC(EXP) 7.
39617 	 */
39618 	uint8_t	tc7_pri_queue_id;
39619 	uint8_t	unused_0[7];
39620 	/*
39621 	 * This field is used in Output records to indicate that the output
39622 	 * is completely written to RAM. This field should be read as '1'
39623 	 * to indicate that the output has been completely written. When
39624 	 * writing a command completion or response to an internal processor,
39625 	 * the order of writes has to be such that this field is written last.
39626 	 */
39627 	uint8_t	valid;
39628 } __rte_packed_end;
39629 
39630 /*****************************
39631  * hwrm_queue_mplstc2pri_cfg *
39632  *****************************/
39633 
39634 
39635 /* hwrm_queue_mplstc2pri_cfg_input (size:256b/32B) */
39636 struct __rte_packed_begin hwrm_queue_mplstc2pri_cfg_input {
39637 	/* The HWRM command request type. */
39638 	uint16_t	req_type;
39639 	/*
39640 	 * The completion ring to send the completion event on. This should
39641 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39642 	 */
39643 	uint16_t	cmpl_ring;
39644 	/*
39645 	 * The sequence ID is used by the driver for tracking multiple
39646 	 * commands. This ID is treated as opaque data by the firmware and
39647 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39648 	 */
39649 	uint16_t	seq_id;
39650 	/*
39651 	 * The target ID of the command:
39652 	 * * 0x0-0xFFF8 - The function ID
39653 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39654 	 * * 0xFFFD - Reserved for user-space HWRM interface
39655 	 * * 0xFFFF - HWRM
39656 	 */
39657 	uint16_t	target_id;
39658 	/*
39659 	 * A physical address pointer pointing to a host buffer that the
39660 	 * command's response data will be written. This can be either a host
39661 	 * physical address (HPA) or a guest physical address (GPA) and must
39662 	 * point to a physically contiguous block of memory.
39663 	 */
39664 	uint64_t	resp_addr;
39665 	uint32_t	enables;
39666 	/*
39667 	 * This bit must be '1' for the mplstc0_pri_queue_id field to be
39668 	 * configured.
39669 	 */
39670 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC0_PRI_QUEUE_ID \
39671 		UINT32_C(0x1)
39672 	/*
39673 	 * This bit must be '1' for the mplstc1_pri_queue_id field to be
39674 	 * configured.
39675 	 */
39676 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC1_PRI_QUEUE_ID \
39677 		UINT32_C(0x2)
39678 	/*
39679 	 * This bit must be '1' for the mplstc2_pri_queue_id field to be
39680 	 * configured.
39681 	 */
39682 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC2_PRI_QUEUE_ID \
39683 		UINT32_C(0x4)
39684 	/*
39685 	 * This bit must be '1' for the mplstc3_pri_queue_id field to be
39686 	 * configured.
39687 	 */
39688 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC3_PRI_QUEUE_ID \
39689 		UINT32_C(0x8)
39690 	/*
39691 	 * This bit must be '1' for the mplstc4_pri_queue_id field to be
39692 	 * configured.
39693 	 */
39694 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC4_PRI_QUEUE_ID \
39695 		UINT32_C(0x10)
39696 	/*
39697 	 * This bit must be '1' for the mplstc5_pri_queue_id field to be
39698 	 * configured.
39699 	 */
39700 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC5_PRI_QUEUE_ID \
39701 		UINT32_C(0x20)
39702 	/*
39703 	 * This bit must be '1' for the mplstc6_pri_queue_id field to be
39704 	 * configured.
39705 	 */
39706 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC6_PRI_QUEUE_ID \
39707 		UINT32_C(0x40)
39708 	/*
39709 	 * This bit must be '1' for the mplstc7_pri_queue_id field to be
39710 	 * configured.
39711 	 */
39712 	#define HWRM_QUEUE_MPLSTC2PRI_CFG_INPUT_ENABLES_TC7_PRI_QUEUE_ID \
39713 		UINT32_C(0x80)
39714 	/*
39715 	 * Port ID of port for which the table is being configured.
39716 	 * The HWRM needs to check whether this function is allowed
39717 	 * to configure MPLS TC(EXP)to pri mapping on this port.
39718 	 */
39719 	uint8_t	port_id;
39720 	uint8_t	unused_0[3];
39721 	/*
39722 	 * pri assigned to MPLS TC(EXP) 0. This value can only
39723 	 * be changed before traffic has started.
39724 	 */
39725 	uint8_t	tc0_pri_queue_id;
39726 	/*
39727 	 * pri assigned to MPLS TC(EXP) 1. This value can only
39728 	 * be changed before traffic has started.
39729 	 */
39730 	uint8_t	tc1_pri_queue_id;
39731 	/*
39732 	 * pri assigned to MPLS TC(EXP) 2. This value can only
39733 	 * be changed before traffic has started.
39734 	 */
39735 	uint8_t	tc2_pri_queue_id;
39736 	/*
39737 	 * pri assigned to MPLS TC(EXP) 3. This value can only
39738 	 * be changed before traffic has started.
39739 	 */
39740 	uint8_t	tc3_pri_queue_id;
39741 	/*
39742 	 * pri assigned to MPLS TC(EXP) 4. This value can only
39743 	 * be changed before traffic has started.
39744 	 */
39745 	uint8_t	tc4_pri_queue_id;
39746 	/*
39747 	 * pri assigned to MPLS TC(EXP) 5. This value can only
39748 	 * be changed before traffic has started.
39749 	 */
39750 	uint8_t	tc5_pri_queue_id;
39751 	/*
39752 	 * pri assigned to MPLS TC(EXP) 6. This value can only
39753 	 * be changed before traffic has started.
39754 	 */
39755 	uint8_t	tc6_pri_queue_id;
39756 	/*
39757 	 * pri assigned to MPLS TC(EXP) 7. This value can only
39758 	 * be changed before traffic has started.
39759 	 */
39760 	uint8_t	tc7_pri_queue_id;
39761 } __rte_packed_end;
39762 
39763 /* hwrm_queue_mplstc2pri_cfg_output (size:128b/16B) */
39764 struct __rte_packed_begin hwrm_queue_mplstc2pri_cfg_output {
39765 	/* The specific error status for the command. */
39766 	uint16_t	error_code;
39767 	/* The HWRM command request type. */
39768 	uint16_t	req_type;
39769 	/* The sequence ID from the original command. */
39770 	uint16_t	seq_id;
39771 	/* The length of the response data in number of bytes. */
39772 	uint16_t	resp_len;
39773 	uint8_t	unused_0[7];
39774 	/*
39775 	 * This field is used in Output records to indicate that the output
39776 	 * is completely written to RAM. This field should be read as '1'
39777 	 * to indicate that the output has been completely written. When
39778 	 * writing a command completion or response to an internal processor,
39779 	 * the order of writes has to be such that this field is written last.
39780 	 */
39781 	uint8_t	valid;
39782 } __rte_packed_end;
39783 
39784 /****************************
39785  * hwrm_queue_vlanpri_qcaps *
39786  ****************************/
39787 
39788 
39789 /* hwrm_queue_vlanpri_qcaps_input (size:192b/24B) */
39790 struct __rte_packed_begin hwrm_queue_vlanpri_qcaps_input {
39791 	/* The HWRM command request type. */
39792 	uint16_t	req_type;
39793 	/*
39794 	 * The completion ring to send the completion event on. This should
39795 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39796 	 */
39797 	uint16_t	cmpl_ring;
39798 	/*
39799 	 * The sequence ID is used by the driver for tracking multiple
39800 	 * commands. This ID is treated as opaque data by the firmware and
39801 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39802 	 */
39803 	uint16_t	seq_id;
39804 	/*
39805 	 * The target ID of the command:
39806 	 * * 0x0-0xFFF8 - The function ID
39807 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39808 	 * * 0xFFFD - Reserved for user-space HWRM interface
39809 	 * * 0xFFFF - HWRM
39810 	 */
39811 	uint16_t	target_id;
39812 	/*
39813 	 * A physical address pointer pointing to a host buffer that the
39814 	 * command's response data will be written. This can be either a host
39815 	 * physical address (HPA) or a guest physical address (GPA) and must
39816 	 * point to a physically contiguous block of memory.
39817 	 */
39818 	uint64_t	resp_addr;
39819 	/*
39820 	 * Port ID of port for which the table is being configured.
39821 	 * The HWRM needs to check whether this function is allowed
39822 	 * to configure VLAN priority to user priority mapping on this port.
39823 	 */
39824 	uint8_t	port_id;
39825 	uint8_t	unused_0[7];
39826 } __rte_packed_end;
39827 
39828 /* hwrm_queue_vlanpri_qcaps_output (size:128b/16B) */
39829 struct __rte_packed_begin hwrm_queue_vlanpri_qcaps_output {
39830 	/* The specific error status for the command. */
39831 	uint16_t	error_code;
39832 	/* The HWRM command request type. */
39833 	uint16_t	req_type;
39834 	/* The sequence ID from the original command. */
39835 	uint16_t	seq_id;
39836 	/* The length of the response data in number of bytes. */
39837 	uint16_t	resp_len;
39838 	/*
39839 	 * This is the default user priority which all VLAN priority values
39840 	 * are mapped to if there is no VLAN priority to user priority mapping.
39841 	 */
39842 	uint8_t	hw_default_pri;
39843 	uint8_t	unused_0[6];
39844 	/*
39845 	 * This field is used in Output records to indicate that the output
39846 	 * is completely written to RAM. This field should be read as '1'
39847 	 * to indicate that the output has been completely written. When
39848 	 * writing a command completion or response to an internal processor,
39849 	 * the order of writes has to be such that this field is written last.
39850 	 */
39851 	uint8_t	valid;
39852 } __rte_packed_end;
39853 
39854 /*******************************
39855  * hwrm_queue_vlanpri2pri_qcfg *
39856  *******************************/
39857 
39858 
39859 /* hwrm_queue_vlanpri2pri_qcfg_input (size:192b/24B) */
39860 struct __rte_packed_begin hwrm_queue_vlanpri2pri_qcfg_input {
39861 	/* The HWRM command request type. */
39862 	uint16_t	req_type;
39863 	/*
39864 	 * The completion ring to send the completion event on. This should
39865 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39866 	 */
39867 	uint16_t	cmpl_ring;
39868 	/*
39869 	 * The sequence ID is used by the driver for tracking multiple
39870 	 * commands. This ID is treated as opaque data by the firmware and
39871 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39872 	 */
39873 	uint16_t	seq_id;
39874 	/*
39875 	 * The target ID of the command:
39876 	 * * 0x0-0xFFF8 - The function ID
39877 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39878 	 * * 0xFFFD - Reserved for user-space HWRM interface
39879 	 * * 0xFFFF - HWRM
39880 	 */
39881 	uint16_t	target_id;
39882 	/*
39883 	 * A physical address pointer pointing to a host buffer that the
39884 	 * command's response data will be written. This can be either a host
39885 	 * physical address (HPA) or a guest physical address (GPA) and must
39886 	 * point to a physically contiguous block of memory.
39887 	 */
39888 	uint64_t	resp_addr;
39889 	/*
39890 	 * Port ID of port for which the table is being configured.
39891 	 * The HWRM needs to check whether this function is allowed
39892 	 * to configure VLAN priority to user priority mapping on this port.
39893 	 */
39894 	uint8_t	port_id;
39895 	uint8_t	unused_0[7];
39896 } __rte_packed_end;
39897 
39898 /* hwrm_queue_vlanpri2pri_qcfg_output (size:192b/24B) */
39899 struct __rte_packed_begin hwrm_queue_vlanpri2pri_qcfg_output {
39900 	/* The specific error status for the command. */
39901 	uint16_t	error_code;
39902 	/* The HWRM command request type. */
39903 	uint16_t	req_type;
39904 	/* The sequence ID from the original command. */
39905 	uint16_t	seq_id;
39906 	/* The length of the response data in number of bytes. */
39907 	uint16_t	resp_len;
39908 	/*
39909 	 * User priority assigned to VLAN priority 0. A value of 0xff
39910 	 * indicates that no user priority is assigned. The default user
39911 	 * priority will be used.
39912 	 */
39913 	uint8_t	vlanpri0_user_pri_id;
39914 	/*
39915 	 * User priority assigned to VLAN priority 1. A value of 0xff
39916 	 * indicates that no user priority is assigned. The default user
39917 	 * priority will be used.
39918 	 */
39919 	uint8_t	vlanpri1_user_pri_id;
39920 	/*
39921 	 * User priority assigned to VLAN priority 2. A value of 0xff
39922 	 * indicates that no user priority is assigned. The default user
39923 	 * priority will be used.
39924 	 */
39925 	uint8_t	vlanpri2_user_pri_id;
39926 	/*
39927 	 * User priority assigned to VLAN priority 3. A value of 0xff
39928 	 * indicates that no user priority is assigned. The default user
39929 	 * priority will be used.
39930 	 */
39931 	uint8_t	vlanpri3_user_pri_id;
39932 	/*
39933 	 * User priority assigned to VLAN priority 4. A value of 0xff
39934 	 * indicates that no user priority is assigned. The default user
39935 	 * priority will be used.
39936 	 */
39937 	uint8_t	vlanpri4_user_pri_id;
39938 	/*
39939 	 * User priority assigned to VLAN priority 5. A value of 0xff
39940 	 * indicates that no user priority is assigned. The default user
39941 	 * priority will be used.
39942 	 */
39943 	uint8_t	vlanpri5_user_pri_id;
39944 	/*
39945 	 * User priority assigned to VLAN priority 6. A value of 0xff
39946 	 * indicates that no user priority is assigned. The default user
39947 	 * priority will be used.
39948 	 */
39949 	uint8_t	vlanpri6_user_pri_id;
39950 	/*
39951 	 * User priority assigned to VLAN priority 7. A value of 0xff
39952 	 * indicates that no user priority is assigned. The default user
39953 	 * priority will be used.
39954 	 */
39955 	uint8_t	vlanpri7_user_pri_id;
39956 	uint8_t	unused_0[7];
39957 	/*
39958 	 * This field is used in Output records to indicate that the output
39959 	 * is completely written to RAM. This field should be read as '1'
39960 	 * to indicate that the output has been completely written. When
39961 	 * writing a command completion or response to an internal processor,
39962 	 * the order of writes has to be such that this field is written last.
39963 	 */
39964 	uint8_t	valid;
39965 } __rte_packed_end;
39966 
39967 /******************************
39968  * hwrm_queue_vlanpri2pri_cfg *
39969  ******************************/
39970 
39971 
39972 /* hwrm_queue_vlanpri2pri_cfg_input (size:256b/32B) */
39973 struct __rte_packed_begin hwrm_queue_vlanpri2pri_cfg_input {
39974 	/* The HWRM command request type. */
39975 	uint16_t	req_type;
39976 	/*
39977 	 * The completion ring to send the completion event on. This should
39978 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
39979 	 */
39980 	uint16_t	cmpl_ring;
39981 	/*
39982 	 * The sequence ID is used by the driver for tracking multiple
39983 	 * commands. This ID is treated as opaque data by the firmware and
39984 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
39985 	 */
39986 	uint16_t	seq_id;
39987 	/*
39988 	 * The target ID of the command:
39989 	 * * 0x0-0xFFF8 - The function ID
39990 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
39991 	 * * 0xFFFD - Reserved for user-space HWRM interface
39992 	 * * 0xFFFF - HWRM
39993 	 */
39994 	uint16_t	target_id;
39995 	/*
39996 	 * A physical address pointer pointing to a host buffer that the
39997 	 * command's response data will be written. This can be either a host
39998 	 * physical address (HPA) or a guest physical address (GPA) and must
39999 	 * point to a physically contiguous block of memory.
40000 	 */
40001 	uint64_t	resp_addr;
40002 	uint32_t	enables;
40003 	/*
40004 	 * This bit must be '1' for the vlanpri0_user_pri_id field to be
40005 	 * configured.
40006 	 */
40007 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI0_USER_PRI_ID \
40008 		UINT32_C(0x1)
40009 	/*
40010 	 * This bit must be '1' for the vlanpri1_user_pri_id field to be
40011 	 * configured.
40012 	 */
40013 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI1_USER_PRI_ID \
40014 		UINT32_C(0x2)
40015 	/*
40016 	 * This bit must be '1' for the vlanpri2_user_pri_id field to be
40017 	 * configured.
40018 	 */
40019 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI2_USER_PRI_ID \
40020 		UINT32_C(0x4)
40021 	/*
40022 	 * This bit must be '1' for the vlanpri3_user_pri_id field to be
40023 	 * configured.
40024 	 */
40025 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI3_USER_PRI_ID \
40026 		UINT32_C(0x8)
40027 	/*
40028 	 * This bit must be '1' for the vlanpri4_user_pri_id field to be
40029 	 * configured.
40030 	 */
40031 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI4_USER_PRI_ID \
40032 		UINT32_C(0x10)
40033 	/*
40034 	 * This bit must be '1' for the vlanpri5_user_pri_id field to be
40035 	 * configured.
40036 	 */
40037 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI5_USER_PRI_ID \
40038 		UINT32_C(0x20)
40039 	/*
40040 	 * This bit must be '1' for the vlanpri6_user_pri_id field to be
40041 	 * configured.
40042 	 */
40043 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI6_USER_PRI_ID \
40044 		UINT32_C(0x40)
40045 	/*
40046 	 * This bit must be '1' for the vlanpri7_user_pri_id field to be
40047 	 * configured.
40048 	 */
40049 	#define HWRM_QUEUE_VLANPRI2PRI_CFG_INPUT_ENABLES_VLANPRI7_USER_PRI_ID \
40050 		UINT32_C(0x80)
40051 	/*
40052 	 * Port ID of port for which the table is being configured.
40053 	 * The HWRM needs to check whether this function is allowed
40054 	 * to configure VLAN priority to user priority mapping on this port.
40055 	 */
40056 	uint8_t	port_id;
40057 	uint8_t	unused_0[3];
40058 	/*
40059 	 * User priority assigned to VLAN priority 0. This value can only
40060 	 * be changed before traffic has started.
40061 	 */
40062 	uint8_t	vlanpri0_user_pri_id;
40063 	/*
40064 	 * User priority assigned to VLAN priority 1. This value can only
40065 	 * be changed before traffic has started.
40066 	 */
40067 	uint8_t	vlanpri1_user_pri_id;
40068 	/*
40069 	 * User priority assigned to VLAN priority 2. This value can only
40070 	 * be changed before traffic has started.
40071 	 */
40072 	uint8_t	vlanpri2_user_pri_id;
40073 	/*
40074 	 * User priority assigned to VLAN priority 3. This value can only
40075 	 * be changed before traffic has started.
40076 	 */
40077 	uint8_t	vlanpri3_user_pri_id;
40078 	/*
40079 	 * User priority assigned to VLAN priority 4. This value can only
40080 	 * be changed before traffic has started.
40081 	 */
40082 	uint8_t	vlanpri4_user_pri_id;
40083 	/*
40084 	 * User priority assigned to VLAN priority 5. This value can only
40085 	 * be changed before traffic has started.
40086 	 */
40087 	uint8_t	vlanpri5_user_pri_id;
40088 	/*
40089 	 * User priority assigned to VLAN priority 6. This value can only
40090 	 * be changed before traffic has started.
40091 	 */
40092 	uint8_t	vlanpri6_user_pri_id;
40093 	/*
40094 	 * User priority assigned to VLAN priority 7. This value can only
40095 	 * be changed before traffic has started.
40096 	 */
40097 	uint8_t	vlanpri7_user_pri_id;
40098 } __rte_packed_end;
40099 
40100 /* hwrm_queue_vlanpri2pri_cfg_output (size:128b/16B) */
40101 struct __rte_packed_begin hwrm_queue_vlanpri2pri_cfg_output {
40102 	/* The specific error status for the command. */
40103 	uint16_t	error_code;
40104 	/* The HWRM command request type. */
40105 	uint16_t	req_type;
40106 	/* The sequence ID from the original command. */
40107 	uint16_t	seq_id;
40108 	/* The length of the response data in number of bytes. */
40109 	uint16_t	resp_len;
40110 	uint8_t	unused_0[7];
40111 	/*
40112 	 * This field is used in Output records to indicate that the output
40113 	 * is completely written to RAM. This field should be read as '1'
40114 	 * to indicate that the output has been completely written. When
40115 	 * writing a command completion or response to an internal processor,
40116 	 * the order of writes has to be such that this field is written last.
40117 	 */
40118 	uint8_t	valid;
40119 } __rte_packed_end;
40120 
40121 /*************************
40122  * hwrm_queue_global_cfg *
40123  *************************/
40124 
40125 
40126 /* hwrm_queue_global_cfg_input (size:192b/24B) */
40127 struct __rte_packed_begin hwrm_queue_global_cfg_input {
40128 	/* The HWRM command request type. */
40129 	uint16_t	req_type;
40130 	/*
40131 	 * The completion ring to send the completion event on. This should
40132 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
40133 	 */
40134 	uint16_t	cmpl_ring;
40135 	/*
40136 	 * The sequence ID is used by the driver for tracking multiple
40137 	 * commands. This ID is treated as opaque data by the firmware and
40138 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
40139 	 */
40140 	uint16_t	seq_id;
40141 	/*
40142 	 * The target ID of the command:
40143 	 * * 0x0-0xFFF8 - The function ID
40144 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
40145 	 * * 0xFFFD - Reserved for user-space HWRM interface
40146 	 * * 0xFFFF - HWRM
40147 	 */
40148 	uint16_t	target_id;
40149 	/*
40150 	 * A physical address pointer pointing to a host buffer that the
40151 	 * command's response data will be written. This can be either a host
40152 	 * physical address (HPA) or a guest physical address (GPA) and must
40153 	 * point to a physically contiguous block of memory.
40154 	 */
40155 	uint64_t	resp_addr;
40156 	/*
40157 	 * Configuration mode for rx cos queues, configuring whether they
40158 	 * use one shared buffer pool (across ports or PCIe endpoints) or
40159 	 * independent per port or per endpoint buffer pools.
40160 	 */
40161 	uint8_t	mode;
40162 	/* One shared buffer pool to be used by all RX CoS queues */
40163 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_MODE_SHARED      UINT32_C(0x0)
40164 	/*
40165 	 * Each port or PCIe endpoint to use an independent buffer pool
40166 	 * for its RX CoS queues
40167 	 */
40168 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_MODE_INDEPENDENT UINT32_C(0x1)
40169 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_MODE_LAST \
40170 		HWRM_QUEUE_GLOBAL_CFG_INPUT_MODE_INDEPENDENT
40171 	uint8_t	unused_0;
40172 	uint16_t	enables;
40173 	/* This bit must be '1' when the mode field is configured. */
40174 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_ENABLES_MODE          UINT32_C(0x1)
40175 	/*
40176 	 * This bit must be '1' when the maximum bandwidth for queue group 0
40177 	 * (g0_max_bw) is configured.
40178 	 */
40179 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_ENABLES_G0_MAX_BW     UINT32_C(0x2)
40180 	/*
40181 	 * This bit must be '1' when the maximum bandwidth for queue group 1
40182 	 * (g1_max_bw) is configured.
40183 	 */
40184 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_ENABLES_G1_MAX_BW     UINT32_C(0x4)
40185 	/*
40186 	 * This bit must be '1' when the maximum bandwidth for queue group 2
40187 	 * (g2_max_bw) is configured.
40188 	 */
40189 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_ENABLES_G2_MAX_BW     UINT32_C(0x8)
40190 	/*
40191 	 * This bit must be '1' when the maximum bandwidth for queue group 3
40192 	 * (g3_max_bw) is configured.
40193 	 */
40194 	#define HWRM_QUEUE_GLOBAL_CFG_INPUT_ENABLES_G3_MAX_BW \
40195 		UINT32_C(0x10)
40196 	/*
40197 	 * Specifies the maximum receive rate, as a percentage of total link
40198 	 * bandwidth, of the receive traffic through queue group 0. A value
40199 	 * of 0 indicates no rate limit.
40200 	 *
40201 	 * A queue group is a set of queues, one per traffic class. In
40202 	 * single-host mode, each panel port has its own queue group, and thus,
40203 	 * this rate limit shapes the traffic received on a port, in this case,
40204 	 * through port 0. In multi-root or multi-host mode, each PCIe endpoint
40205 	 * on the NIC has its own queue group. In these cases, the rate limit
40206 	 * shapes the traffic sent to the host through one of the PCIe
40207 	 * endpoints, in this case endpoint 0.
40208 	 */
40209 	uint8_t	g0_max_bw;
40210 	/*
40211 	 * Specifies the maximum rate of the traffic through receive CoS queue
40212 	 * group 1 (for port 1 or PCIe endpoint 1). The rate is a percentage of
40213 	 * total link bandwidth (the sum of the bandwidths of all links). A
40214 	 * value of 0 indicates no rate limit.
40215 	 */
40216 	uint8_t	g1_max_bw;
40217 	/*
40218 	 * Specifies the maximum rate of the traffic through receive CoS queue
40219 	 * group 2 (for port 2 or PCIe endpoint 2). The rate is a percentage of
40220 	 * total link bandwidth (the sum of the bandwidths of all links). A
40221 	 * value of 0 indicates no rate limit.
40222 	 */
40223 	uint8_t	g2_max_bw;
40224 	/*
40225 	 * Specifies the maximum receive rate, in Mbps, of the receive traffic
40226 	 * through queue group 3 (for port 3 or PCIe endpoint 3). A value of 0
40227 	 * indicates no rate limit.
40228 	 */
40229 	uint8_t	g3_max_bw;
40230 } __rte_packed_end;
40231 
40232 /* hwrm_queue_global_cfg_output (size:128b/16B) */
40233 struct __rte_packed_begin hwrm_queue_global_cfg_output {
40234 	/* The specific error status for the command. */
40235 	uint16_t	error_code;
40236 	/* The HWRM command request type. */
40237 	uint16_t	req_type;
40238 	/* The sequence ID from the original command. */
40239 	uint16_t	seq_id;
40240 	/* The length of the response data in number of bytes. */
40241 	uint16_t	resp_len;
40242 	uint8_t	unused_0[7];
40243 	/*
40244 	 * This field is used in Output records to indicate that the output
40245 	 * is completely written to RAM. This field should be read as '1'
40246 	 * to indicate that the output has been completely written. When
40247 	 * writing a command completion or response to an internal processor,
40248 	 * the order of writes has to be such that this field is written last.
40249 	 */
40250 	uint8_t	valid;
40251 } __rte_packed_end;
40252 
40253 /**************************
40254  * hwrm_queue_global_qcfg *
40255  **************************/
40256 
40257 
40258 /* hwrm_queue_global_qcfg_input (size:128b/16B) */
40259 struct __rte_packed_begin hwrm_queue_global_qcfg_input {
40260 	/* The HWRM command request type. */
40261 	uint16_t	req_type;
40262 	/*
40263 	 * The completion ring to send the completion event on. This should
40264 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
40265 	 */
40266 	uint16_t	cmpl_ring;
40267 	/*
40268 	 * The sequence ID is used by the driver for tracking multiple
40269 	 * commands. This ID is treated as opaque data by the firmware and
40270 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
40271 	 */
40272 	uint16_t	seq_id;
40273 	/*
40274 	 * The target ID of the command:
40275 	 * * 0x0-0xFFF8 - The function ID
40276 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
40277 	 * * 0xFFFD - Reserved for user-space HWRM interface
40278 	 * * 0xFFFF - HWRM
40279 	 */
40280 	uint16_t	target_id;
40281 	/*
40282 	 * A physical address pointer pointing to a host buffer that the
40283 	 * command's response data will be written. This can be either a host
40284 	 * physical address (HPA) or a guest physical address (GPA) and must
40285 	 * point to a physically contiguous block of memory.
40286 	 */
40287 	uint64_t	resp_addr;
40288 } __rte_packed_end;
40289 
40290 /* hwrm_queue_global_qcfg_output (size:320b/40B) */
40291 struct __rte_packed_begin hwrm_queue_global_qcfg_output {
40292 	/* The specific error status for the command. */
40293 	uint16_t	error_code;
40294 	/* The HWRM command request type. */
40295 	uint16_t	req_type;
40296 	/* The sequence ID from the original command. */
40297 	uint16_t	seq_id;
40298 	/* The length of the response data in number of bytes. */
40299 	uint16_t	resp_len;
40300 	/* Port or PCIe endpoint id to be mapped for buffer pool 0. */
40301 	uint8_t	buffer_pool_id0_map;
40302 	/* Port or PCIe endpoint id to be mapped for buffer pool 1. */
40303 	uint8_t	buffer_pool_id1_map;
40304 	/* Port or PCIe endpoint id to be mapped for buffer pool 2. */
40305 	uint8_t	buffer_pool_id2_map;
40306 	/* Port or PCIe endpoint id to be mapped for buffer pool 3. */
40307 	uint8_t	buffer_pool_id3_map;
40308 	/* Size of buffer pool 0 (KBytes). */
40309 	uint32_t	buffer_pool_id0_size;
40310 	/* Size of buffer pool 1 (KBytes). */
40311 	uint32_t	buffer_pool_id1_size;
40312 	/* Size of buffer pool 2 (KBytes). */
40313 	uint32_t	buffer_pool_id2_size;
40314 	/* Size of buffer pool 3 (KBytes). */
40315 	uint32_t	buffer_pool_id3_size;
40316 	uint16_t	flags;
40317 	/*
40318 	 * Enumeration denoting whether the rx buffer pool mapping is
40319 	 * per port or per PCIe endpoint
40320 	 */
40321 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_FLAGS_MAPPING \
40322 		UINT32_C(0x1)
40323 	/*
40324 	 * The buffer_pool_id[0-3]_map field represents mapping of rx
40325 	 * buffer pools to a port.
40326 	 */
40327 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_FLAGS_MAPPING_MAPPING_PER_PORT \
40328 		UINT32_C(0x0)
40329 	/*
40330 	 * The buffer_pool_id[0-3]_map field represents mapping of rx
40331 	 * buffer pools to a PCIe endpoint.
40332 	 */
40333 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_FLAGS_MAPPING_MAPPING_PER_ENDPOINT \
40334 		UINT32_C(0x1)
40335 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_FLAGS_MAPPING_LAST \
40336 		HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_FLAGS_MAPPING_MAPPING_PER_ENDPOINT
40337 	/*
40338 	 * Configuration mode for rx cos queues, configuring whether they
40339 	 * use one shared buffer pool (across ports or PCIe endpoints) or
40340 	 * independent per port or per endpoint buffer pools.
40341 	 */
40342 	uint8_t	mode;
40343 	/* One shared buffer pool to be used by all RX CoS queues */
40344 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_MODE_SHARED      UINT32_C(0x0)
40345 	/*
40346 	 * Each port or PCIe endpoint to use an independent buffer pool
40347 	 * for its RX CoS queues
40348 	 */
40349 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_MODE_INDEPENDENT UINT32_C(0x1)
40350 	#define HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_MODE_LAST \
40351 		HWRM_QUEUE_GLOBAL_QCFG_OUTPUT_MODE_INDEPENDENT
40352 	uint8_t	unused_0;
40353 	/*
40354 	 * Reports the rate limit applied to traffic through receive CoS queue
40355 	 * group 0. The rate limit is a percentage of total link bandwidth. A
40356 	 * value of 0 indicates no rate limit.
40357 	 *
40358 	 * A queue group is a set of queues, one per traffic class. In
40359 	 * single-host mode, each panel port has its own queue group, and thus,
40360 	 * this rate limit shapes the traffic received on a port, in this case,
40361 	 * through port 0. In multi-root or multi-host mode, each PCIe endpoint
40362 	 * on the NIC has its own queue group. In these cases, the rate limit
40363 	 * shapes the traffic sent to the host through one of the PCIe
40364 	 * endpoints, in this case endpoint 0.
40365 	 */
40366 	uint8_t	g0_max_bw;
40367 	/*
40368 	 * Reports the rate limit applied to traffic through receive CoS queue
40369 	 * group 1 (for port 1 or PCIe endpoint 1). The rate limit is a
40370 	 * percentage of total link bandwidth. A value of 0 indicates no rate
40371 	 * limit.
40372 	 */
40373 	uint8_t	g1_max_bw;
40374 	/*
40375 	 * Reports the rate limit applied to traffic through receive CoS queue
40376 	 * group 2 (for port 2 or PCIe endpoint 2). The rate limit is a
40377 	 * percentage of total link bandwidth. A value of 0 indicates no rate
40378 	 * limit.
40379 	 */
40380 	uint8_t	g2_max_bw;
40381 	/*
40382 	 * Reports the rate limit applied to traffic through receive CoS queue
40383 	 * group 3 (for port 3 or PCIe endpoint 3). The rate limit is a
40384 	 * percentage of total link bandwidth. A value of 0 indicates no rate
40385 	 * limit.
40386 	 */
40387 	uint8_t	g3_max_bw;
40388 	uint8_t	unused_1[3];
40389 	/*
40390 	 * This field is used in Output records to indicate that the output
40391 	 * is completely written to RAM. This field should be read as '1'
40392 	 * to indicate that the output has been completely written. When
40393 	 * writing a command completion or response to an internal processor,
40394 	 * the order of writes has to be such that this field is written last.
40395 	 */
40396 	uint8_t	valid;
40397 } __rte_packed_end;
40398 
40399 /****************************************
40400  * hwrm_queue_adptv_qos_rx_feature_qcfg *
40401  ****************************************/
40402 
40403 
40404 /* hwrm_queue_adptv_qos_rx_feature_qcfg_input (size:128b/16B) */
40405 struct __rte_packed_begin hwrm_queue_adptv_qos_rx_feature_qcfg_input {
40406 	/* The HWRM command request type. */
40407 	uint16_t	req_type;
40408 	/*
40409 	 * The completion ring to send the completion event on. This should
40410 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
40411 	 */
40412 	uint16_t	cmpl_ring;
40413 	/*
40414 	 * The sequence ID is used by the driver for tracking multiple
40415 	 * commands. This ID is treated as opaque data by the firmware and
40416 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
40417 	 */
40418 	uint16_t	seq_id;
40419 	/*
40420 	 * The target ID of the command:
40421 	 * * 0x0-0xFFF8 - The function ID
40422 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
40423 	 * * 0xFFFD - Reserved for user-space HWRM interface
40424 	 * * 0xFFFF - HWRM
40425 	 */
40426 	uint16_t	target_id;
40427 	/*
40428 	 * A physical address pointer pointing to a host buffer that the
40429 	 * command's response data will be written. This can be either a host
40430 	 * physical address (HPA) or a guest physical address (GPA) and must
40431 	 * point to a physically contiguous block of memory.
40432 	 */
40433 	uint64_t	resp_addr;
40434 } __rte_packed_end;
40435 
40436 /* hwrm_queue_adptv_qos_rx_feature_qcfg_output (size:128b/16B) */
40437 struct __rte_packed_begin hwrm_queue_adptv_qos_rx_feature_qcfg_output {
40438 	/* The specific error status for the command. */
40439 	uint16_t	error_code;
40440 	/* The HWRM command request type. */
40441 	uint16_t	req_type;
40442 	/* The sequence ID from the original command. */
40443 	uint16_t	seq_id;
40444 	/* The length of the response data in number of bytes. */
40445 	uint16_t	resp_len;
40446 	/*
40447 	 * Bitmask indicating which RX CoS queues are enabled or disabled.
40448 	 *
40449 	 * Each bit represents a specific queue where bit 0 represents
40450 	 * queue 0 and bit 7 represents queue 7.
40451 	 * A value of 0 indicates that the queue is not enabled.
40452 	 * A value of 1 indicates that the queue is enabled.
40453 	 */
40454 	uint8_t	queue_enable;
40455 	/* If set to 1, then the queue is enabled. */
40456 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE \
40457 		UINT32_C(0x1)
40458 	/* Queue is disabled. */
40459 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_DISABLED \
40460 		UINT32_C(0x0)
40461 	/* Queue is enabled. */
40462 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED \
40463 		UINT32_C(0x1)
40464 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_LAST \
40465 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED
40466 	/* If set to 1, then the queue is enabled. */
40467 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE \
40468 		UINT32_C(0x2)
40469 	/* Queue is disabled. */
40470 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_DISABLED \
40471 		(UINT32_C(0x0) << 1)
40472 	/* Queue is enabled. */
40473 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED \
40474 		(UINT32_C(0x1) << 1)
40475 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_LAST \
40476 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED
40477 	/* If set to 1, then the queue is enabled. */
40478 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE \
40479 		UINT32_C(0x4)
40480 	/* Queue is disabled. */
40481 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_DISABLED \
40482 		(UINT32_C(0x0) << 2)
40483 	/* Queue is enabled. */
40484 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED \
40485 		(UINT32_C(0x1) << 2)
40486 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_LAST \
40487 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED
40488 	/* If set to 1, then the queue is enabled. */
40489 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE \
40490 		UINT32_C(0x8)
40491 	/* Queue is disabled. */
40492 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_DISABLED \
40493 		(UINT32_C(0x0) << 3)
40494 	/* Queue is enabled. */
40495 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED \
40496 		(UINT32_C(0x1) << 3)
40497 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_LAST \
40498 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED
40499 	/* If set to 1, then the queue is enabled. */
40500 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE \
40501 		UINT32_C(0x10)
40502 	/* Queue is disabled. */
40503 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_DISABLED \
40504 		(UINT32_C(0x0) << 4)
40505 	/* Queue is enabled. */
40506 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED \
40507 		(UINT32_C(0x1) << 4)
40508 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_LAST \
40509 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED
40510 	/* If set to 1, then the queue is enabled. */
40511 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE \
40512 		UINT32_C(0x20)
40513 	/* Queue is disabled. */
40514 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_DISABLED \
40515 		(UINT32_C(0x0) << 5)
40516 	/* Queue is enabled. */
40517 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED \
40518 		(UINT32_C(0x1) << 5)
40519 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_LAST \
40520 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED
40521 	/* If set to 1, then the queue is enabled. */
40522 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE \
40523 		UINT32_C(0x40)
40524 	/* Queue is disabled. */
40525 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_DISABLED \
40526 		(UINT32_C(0x0) << 6)
40527 	/* Queue is enabled. */
40528 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED \
40529 		(UINT32_C(0x1) << 6)
40530 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_LAST \
40531 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED
40532 	/* If set to 1, then the queue is enabled. */
40533 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE \
40534 		UINT32_C(0x80)
40535 	/* Queue is disabled. */
40536 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_DISABLED \
40537 		(UINT32_C(0x0) << 7)
40538 	/* Queue is enabled. */
40539 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED \
40540 		(UINT32_C(0x1) << 7)
40541 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_LAST \
40542 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED
40543 	/*
40544 	 * Bitmask indicating which CoS queues are lossy or lossless.
40545 	 * This setting is kept same across Rx and Tx directions, despite
40546 	 * the name mentioning only Rx. Each bit represents a specific queue
40547 	 * where bit 0 represents queue 0 and bit 7 represents queue 7.
40548 	 * A value of 0 indicates that the queue is lossy.
40549 	 * A value of 1 indicates that the queue is lossless.
40550 	 */
40551 	uint8_t	queue_mode;
40552 	/* If set to 0, then the queue is lossy, else lossless. */
40553 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID0_MODE \
40554 		UINT32_C(0x1)
40555 	/* Lossy (best-effort). */
40556 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID0_MODE_LOSSY \
40557 		UINT32_C(0x0)
40558 	/* Lossless. */
40559 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID0_MODE_LOSSLESS \
40560 		UINT32_C(0x1)
40561 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID0_MODE_LAST \
40562 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID0_MODE_LOSSLESS
40563 	/* If set to 0, then the queue is lossy, else lossless. */
40564 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID1_MODE \
40565 		UINT32_C(0x2)
40566 	/* Lossy (best-effort). */
40567 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID1_MODE_LOSSY \
40568 		(UINT32_C(0x0) << 1)
40569 	/* Lossless. */
40570 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID1_MODE_LOSSLESS \
40571 		(UINT32_C(0x1) << 1)
40572 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID1_MODE_LAST \
40573 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID1_MODE_LOSSLESS
40574 	/* If set to 0, then the queue is lossy, else lossless. */
40575 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID2_MODE \
40576 		UINT32_C(0x4)
40577 	/* Lossy (best-effort). */
40578 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID2_MODE_LOSSY \
40579 		(UINT32_C(0x0) << 2)
40580 	/* Lossless. */
40581 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID2_MODE_LOSSLESS \
40582 		(UINT32_C(0x1) << 2)
40583 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID2_MODE_LAST \
40584 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID2_MODE_LOSSLESS
40585 	/* If set to 0, then the queue is lossy, else lossless. */
40586 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID3_MODE \
40587 		UINT32_C(0x8)
40588 	/* Lossy (best-effort). */
40589 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID3_MODE_LOSSY \
40590 		(UINT32_C(0x0) << 3)
40591 	/* Lossless. */
40592 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID3_MODE_LOSSLESS \
40593 		(UINT32_C(0x1) << 3)
40594 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID3_MODE_LAST \
40595 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID3_MODE_LOSSLESS
40596 	/* If set to 0, then the queue is lossy, else lossless. */
40597 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID4_MODE \
40598 		UINT32_C(0x10)
40599 	/* Lossy (best-effort). */
40600 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID4_MODE_LOSSY \
40601 		(UINT32_C(0x0) << 4)
40602 	/* Lossless. */
40603 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID4_MODE_LOSSLESS \
40604 		(UINT32_C(0x1) << 4)
40605 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID4_MODE_LAST \
40606 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID4_MODE_LOSSLESS
40607 	/* If set to 0, then the queue is lossy, else lossless. */
40608 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID5_MODE \
40609 		UINT32_C(0x20)
40610 	/* Lossy (best-effort). */
40611 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID5_MODE_LOSSY \
40612 		(UINT32_C(0x0) << 5)
40613 	/* Lossless. */
40614 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID5_MODE_LOSSLESS \
40615 		(UINT32_C(0x1) << 5)
40616 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID5_MODE_LAST \
40617 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID5_MODE_LOSSLESS
40618 	/* If set to 0, then the queue is lossy, else lossless. */
40619 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID6_MODE \
40620 		UINT32_C(0x40)
40621 	/* Lossy (best-effort). */
40622 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID6_MODE_LOSSY \
40623 		(UINT32_C(0x0) << 6)
40624 	/* Lossless. */
40625 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID6_MODE_LOSSLESS \
40626 		(UINT32_C(0x1) << 6)
40627 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID6_MODE_LAST \
40628 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID6_MODE_LOSSLESS
40629 	/* If set to 0, then the queue is lossy, else lossless. */
40630 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID7_MODE \
40631 		UINT32_C(0x80)
40632 	/* Lossy (best-effort). */
40633 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID7_MODE_LOSSY \
40634 		(UINT32_C(0x0) << 7)
40635 	/* Lossless. */
40636 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID7_MODE_LOSSLESS \
40637 		(UINT32_C(0x1) << 7)
40638 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID7_MODE_LAST \
40639 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_QCFG_OUTPUT_QUEUE_MODE_QID7_MODE_LOSSLESS
40640 	uint8_t	unused_0[5];
40641 	/*
40642 	 * This field is used in Output records to indicate that the output
40643 	 * is completely written to RAM. This field should be read as '1'
40644 	 * to indicate that the output has been completely written. When
40645 	 * writing a command completion or response to an internal processor,
40646 	 * the order of writes has to be such that this field is written last.
40647 	 */
40648 	uint8_t	valid;
40649 } __rte_packed_end;
40650 
40651 /***************************************
40652  * hwrm_queue_adptv_qos_rx_feature_cfg *
40653  ***************************************/
40654 
40655 
40656 /* hwrm_queue_adptv_qos_rx_feature_cfg_input (size:192b/24B) */
40657 struct __rte_packed_begin hwrm_queue_adptv_qos_rx_feature_cfg_input {
40658 	/* The HWRM command request type. */
40659 	uint16_t	req_type;
40660 	/*
40661 	 * The completion ring to send the completion event on. This should
40662 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
40663 	 */
40664 	uint16_t	cmpl_ring;
40665 	/*
40666 	 * The sequence ID is used by the driver for tracking multiple
40667 	 * commands. This ID is treated as opaque data by the firmware and
40668 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
40669 	 */
40670 	uint16_t	seq_id;
40671 	/*
40672 	 * The target ID of the command:
40673 	 * * 0x0-0xFFF8 - The function ID
40674 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
40675 	 * * 0xFFFD - Reserved for user-space HWRM interface
40676 	 * * 0xFFFF - HWRM
40677 	 */
40678 	uint16_t	target_id;
40679 	/*
40680 	 * A physical address pointer pointing to a host buffer that the
40681 	 * command's response data will be written. This can be either a host
40682 	 * physical address (HPA) or a guest physical address (GPA) and must
40683 	 * point to a physically contiguous block of memory.
40684 	 */
40685 	uint64_t	resp_addr;
40686 	uint32_t	enables;
40687 	/* This bit must be '1' for the queue_enable field to be configured. */
40688 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_ENABLES_QUEUE_ENABLE \
40689 		UINT32_C(0x1)
40690 	/* This bit must be '1' for the queue_mode field to be configured. */
40691 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_ENABLES_QUEUE_MODE \
40692 		UINT32_C(0x2)
40693 	/*
40694 	 * Bitmask indicating which RX CoS queues are enabled or disabled.
40695 	 *
40696 	 * Each bit represents a specific queue where bit 0 represents
40697 	 * queue 0 and bit 7 represents queue 7.
40698 	 * A value of 0 indicates that the queue is not enabled.
40699 	 * A value of 1 indicates that the queue is enabled.
40700 	 */
40701 	uint8_t	queue_enable;
40702 	/* If set to 1, then the queue is enabled. */
40703 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE \
40704 		UINT32_C(0x1)
40705 	/* Queue is disabled. */
40706 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_DISABLED \
40707 		UINT32_C(0x0)
40708 	/* Queue is enabled. */
40709 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED \
40710 		UINT32_C(0x1)
40711 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_LAST \
40712 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED
40713 	/* If set to 1, then the queue is enabled. */
40714 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE \
40715 		UINT32_C(0x2)
40716 	/* Queue is disabled. */
40717 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_DISABLED \
40718 		(UINT32_C(0x0) << 1)
40719 	/* Queue is enabled. */
40720 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED \
40721 		(UINT32_C(0x1) << 1)
40722 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_LAST \
40723 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED
40724 	/* If set to 1, then the queue is enabled. */
40725 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE \
40726 		UINT32_C(0x4)
40727 	/* Queue is disabled. */
40728 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_DISABLED \
40729 		(UINT32_C(0x0) << 2)
40730 	/* Queue is enabled. */
40731 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED \
40732 		(UINT32_C(0x1) << 2)
40733 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_LAST \
40734 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED
40735 	/* If set to 1, then the queue is enabled. */
40736 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE \
40737 		UINT32_C(0x8)
40738 	/* Queue is disabled. */
40739 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_DISABLED \
40740 		(UINT32_C(0x0) << 3)
40741 	/* Queue is enabled. */
40742 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED \
40743 		(UINT32_C(0x1) << 3)
40744 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_LAST \
40745 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED
40746 	/* If set to 1, then the queue is enabled. */
40747 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE \
40748 		UINT32_C(0x10)
40749 	/* Queue is disabled. */
40750 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_DISABLED \
40751 		(UINT32_C(0x0) << 4)
40752 	/* Queue is enabled. */
40753 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED \
40754 		(UINT32_C(0x1) << 4)
40755 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_LAST \
40756 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED
40757 	/* If set to 1, then the queue is enabled. */
40758 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE \
40759 		UINT32_C(0x20)
40760 	/* Queue is disabled. */
40761 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_DISABLED \
40762 		(UINT32_C(0x0) << 5)
40763 	/* Queue is enabled. */
40764 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED \
40765 		(UINT32_C(0x1) << 5)
40766 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_LAST \
40767 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED
40768 	/* If set to 1, then the queue is enabled. */
40769 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE \
40770 		UINT32_C(0x40)
40771 	/* Queue is disabled. */
40772 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_DISABLED \
40773 		(UINT32_C(0x0) << 6)
40774 	/* Queue is enabled. */
40775 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED \
40776 		(UINT32_C(0x1) << 6)
40777 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_LAST \
40778 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED
40779 	/* If set to 1, then the queue is enabled. */
40780 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE \
40781 		UINT32_C(0x80)
40782 	/* Queue is disabled. */
40783 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_DISABLED \
40784 		(UINT32_C(0x0) << 7)
40785 	/* Queue is enabled. */
40786 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED \
40787 		(UINT32_C(0x1) << 7)
40788 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_LAST \
40789 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED
40790 	/*
40791 	 * Bitmask indicating which CoS queues are lossy or lossless.
40792 	 * This setting is kept symmetric (or same) across Tx and Rx.
40793 	 * Each bit represents a specific queue where bit 0 represents
40794 	 * queue 0 and bit 7 represents queue 7.
40795 	 * A value of 0 indicates that the queue is lossy.
40796 	 * A value of 1 indicates that the queue is lossless.
40797 	 */
40798 	uint8_t	queue_mode;
40799 	/* If set to 0, then the queue is lossy, else lossless. */
40800 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID0_MODE \
40801 		UINT32_C(0x1)
40802 	/* Lossy (best-effort). */
40803 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID0_MODE_LOSSY \
40804 		UINT32_C(0x0)
40805 	/* Lossless. */
40806 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID0_MODE_LOSSLESS \
40807 		UINT32_C(0x1)
40808 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID0_MODE_LAST \
40809 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID0_MODE_LOSSLESS
40810 	/* If set to 0, then the queue is lossy, else lossless. */
40811 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID1_MODE \
40812 		UINT32_C(0x2)
40813 	/* Lossy (best-effort). */
40814 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID1_MODE_LOSSY \
40815 		(UINT32_C(0x0) << 1)
40816 	/* Lossless. */
40817 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID1_MODE_LOSSLESS \
40818 		(UINT32_C(0x1) << 1)
40819 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID1_MODE_LAST \
40820 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID1_MODE_LOSSLESS
40821 	/* If set to 0, then the queue is lossy, else lossless. */
40822 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID2_MODE \
40823 		UINT32_C(0x4)
40824 	/* Lossy (best-effort). */
40825 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID2_MODE_LOSSY \
40826 		(UINT32_C(0x0) << 2)
40827 	/* Lossless. */
40828 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID2_MODE_LOSSLESS \
40829 		(UINT32_C(0x1) << 2)
40830 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID2_MODE_LAST \
40831 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID2_MODE_LOSSLESS
40832 	/* If set to 0, then the queue is lossy, else lossless. */
40833 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID3_MODE \
40834 		UINT32_C(0x8)
40835 	/* Lossy (best-effort). */
40836 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID3_MODE_LOSSY \
40837 		(UINT32_C(0x0) << 3)
40838 	/* Lossless. */
40839 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID3_MODE_LOSSLESS \
40840 		(UINT32_C(0x1) << 3)
40841 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID3_MODE_LAST \
40842 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID3_MODE_LOSSLESS
40843 	/* If set to 0, then the queue is lossy, else lossless. */
40844 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID4_MODE \
40845 		UINT32_C(0x10)
40846 	/* Lossy (best-effort). */
40847 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID4_MODE_LOSSY \
40848 		(UINT32_C(0x0) << 4)
40849 	/* Lossless. */
40850 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID4_MODE_LOSSLESS \
40851 		(UINT32_C(0x1) << 4)
40852 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID4_MODE_LAST \
40853 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID4_MODE_LOSSLESS
40854 	/* If set to 0, then the queue is lossy, else lossless. */
40855 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID5_MODE \
40856 		UINT32_C(0x20)
40857 	/* Lossy (best-effort). */
40858 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID5_MODE_LOSSY \
40859 		(UINT32_C(0x0) << 5)
40860 	/* Lossless. */
40861 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID5_MODE_LOSSLESS \
40862 		(UINT32_C(0x1) << 5)
40863 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID5_MODE_LAST \
40864 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID5_MODE_LOSSLESS
40865 	/* If set to 0, then the queue is lossy, else lossless. */
40866 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID6_MODE \
40867 		UINT32_C(0x40)
40868 	/* Lossy (best-effort). */
40869 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID6_MODE_LOSSY \
40870 		(UINT32_C(0x0) << 6)
40871 	/* Lossless. */
40872 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID6_MODE_LOSSLESS \
40873 		(UINT32_C(0x1) << 6)
40874 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID6_MODE_LAST \
40875 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID6_MODE_LOSSLESS
40876 	/* If set to 0, then the queue is lossy, else lossless. */
40877 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID7_MODE \
40878 		UINT32_C(0x80)
40879 	/* Lossy (best-effort). */
40880 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID7_MODE_LOSSY \
40881 		(UINT32_C(0x0) << 7)
40882 	/* Lossless. */
40883 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID7_MODE_LOSSLESS \
40884 		(UINT32_C(0x1) << 7)
40885 	#define HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID7_MODE_LAST \
40886 		HWRM_QUEUE_ADPTV_QOS_RX_FEATURE_CFG_INPUT_QUEUE_MODE_QID7_MODE_LOSSLESS
40887 	uint8_t	unused_0[2];
40888 } __rte_packed_end;
40889 
40890 /* hwrm_queue_adptv_qos_rx_feature_cfg_output (size:128b/16B) */
40891 struct __rte_packed_begin hwrm_queue_adptv_qos_rx_feature_cfg_output {
40892 	/* The specific error status for the command. */
40893 	uint16_t	error_code;
40894 	/* The HWRM command request type. */
40895 	uint16_t	req_type;
40896 	/* The sequence ID from the original command. */
40897 	uint16_t	seq_id;
40898 	/* The length of the response data in number of bytes. */
40899 	uint16_t	resp_len;
40900 	uint8_t	unused_0[7];
40901 	/*
40902 	 * This field is used in Output records to indicate that the output
40903 	 * is completely written to RAM. This field should be read as '1'
40904 	 * to indicate that the output has been completely written. When
40905 	 * writing a command completion or response to an internal processor,
40906 	 * the order of writes has to be such that this field is written last.
40907 	 */
40908 	uint8_t	valid;
40909 } __rte_packed_end;
40910 
40911 /****************************************
40912  * hwrm_queue_adptv_qos_tx_feature_qcfg *
40913  ****************************************/
40914 
40915 
40916 /* hwrm_queue_adptv_qos_tx_feature_qcfg_input (size:128b/16B) */
40917 struct __rte_packed_begin hwrm_queue_adptv_qos_tx_feature_qcfg_input {
40918 	/* The HWRM command request type. */
40919 	uint16_t	req_type;
40920 	/*
40921 	 * The completion ring to send the completion event on. This should
40922 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
40923 	 */
40924 	uint16_t	cmpl_ring;
40925 	/*
40926 	 * The sequence ID is used by the driver for tracking multiple
40927 	 * commands. This ID is treated as opaque data by the firmware and
40928 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
40929 	 */
40930 	uint16_t	seq_id;
40931 	/*
40932 	 * The target ID of the command:
40933 	 * * 0x0-0xFFF8 - The function ID
40934 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
40935 	 * * 0xFFFD - Reserved for user-space HWRM interface
40936 	 * * 0xFFFF - HWRM
40937 	 */
40938 	uint16_t	target_id;
40939 	/*
40940 	 * A physical address pointer pointing to a host buffer that the
40941 	 * command's response data will be written. This can be either a host
40942 	 * physical address (HPA) or a guest physical address (GPA) and must
40943 	 * point to a physically contiguous block of memory.
40944 	 */
40945 	uint64_t	resp_addr;
40946 } __rte_packed_end;
40947 
40948 /* hwrm_queue_adptv_qos_tx_feature_qcfg_output (size:128b/16B) */
40949 struct __rte_packed_begin hwrm_queue_adptv_qos_tx_feature_qcfg_output {
40950 	/* The specific error status for the command. */
40951 	uint16_t	error_code;
40952 	/* The HWRM command request type. */
40953 	uint16_t	req_type;
40954 	/* The sequence ID from the original command. */
40955 	uint16_t	seq_id;
40956 	/* The length of the response data in number of bytes. */
40957 	uint16_t	resp_len;
40958 	/*
40959 	 * Bitmask indicating which TX CoS queues are enabled or disabled.
40960 	 *
40961 	 * Each bit represents a specific queue where bit 0 represents
40962 	 * queue 0 and bit 7 represents queue 7.
40963 	 * A value of 0 indicates that the queue is not enabled.
40964 	 * A value of 1 indicates that the queue is enabled.
40965 	 */
40966 	uint8_t	queue_enable;
40967 	/* If set to 1, then the queue is enabled. */
40968 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE \
40969 		UINT32_C(0x1)
40970 	/* Queue is disabled. */
40971 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_DISABLED \
40972 		UINT32_C(0x0)
40973 	/* Queue is enabled. */
40974 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED \
40975 		UINT32_C(0x1)
40976 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_LAST \
40977 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED
40978 	/* If set to 1, then the queue is enabled. */
40979 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE \
40980 		UINT32_C(0x2)
40981 	/* Queue is disabled. */
40982 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_DISABLED \
40983 		(UINT32_C(0x0) << 1)
40984 	/* Queue is enabled. */
40985 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED \
40986 		(UINT32_C(0x1) << 1)
40987 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_LAST \
40988 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED
40989 	/* If set to 1, then the queue is enabled. */
40990 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE \
40991 		UINT32_C(0x4)
40992 	/* Queue is disabled. */
40993 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_DISABLED \
40994 		(UINT32_C(0x0) << 2)
40995 	/* Queue is enabled. */
40996 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED \
40997 		(UINT32_C(0x1) << 2)
40998 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_LAST \
40999 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED
41000 	/* If set to 1, then the queue is enabled. */
41001 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE \
41002 		UINT32_C(0x8)
41003 	/* Queue is disabled. */
41004 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_DISABLED \
41005 		(UINT32_C(0x0) << 3)
41006 	/* Queue is enabled. */
41007 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED \
41008 		(UINT32_C(0x1) << 3)
41009 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_LAST \
41010 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED
41011 	/* If set to 1, then the queue is enabled. */
41012 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE \
41013 		UINT32_C(0x10)
41014 	/* Queue is disabled. */
41015 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_DISABLED \
41016 		(UINT32_C(0x0) << 4)
41017 	/* Queue is enabled. */
41018 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED \
41019 		(UINT32_C(0x1) << 4)
41020 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_LAST \
41021 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED
41022 	/* If set to 1, then the queue is enabled. */
41023 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE \
41024 		UINT32_C(0x20)
41025 	/* Queue is disabled. */
41026 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_DISABLED \
41027 		(UINT32_C(0x0) << 5)
41028 	/* Queue is enabled. */
41029 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED \
41030 		(UINT32_C(0x1) << 5)
41031 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_LAST \
41032 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED
41033 	/* If set to 1, then the queue is enabled. */
41034 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE \
41035 		UINT32_C(0x40)
41036 	/* Queue is disabled. */
41037 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_DISABLED \
41038 		(UINT32_C(0x0) << 6)
41039 	/* Queue is enabled. */
41040 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED \
41041 		(UINT32_C(0x1) << 6)
41042 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_LAST \
41043 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED
41044 	/* If set to 1, then the queue is enabled. */
41045 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE \
41046 		UINT32_C(0x80)
41047 	/* Queue is disabled. */
41048 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_DISABLED \
41049 		(UINT32_C(0x0) << 7)
41050 	/* Queue is enabled. */
41051 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED \
41052 		(UINT32_C(0x1) << 7)
41053 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_LAST \
41054 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_QCFG_OUTPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED
41055 	uint8_t	unused_0[6];
41056 	/*
41057 	 * This field is used in Output records to indicate that the output
41058 	 * is completely written to RAM. This field should be read as '1'
41059 	 * to indicate that the output has been completely written. When
41060 	 * writing a command completion or response to an internal processor,
41061 	 * the order of writes has to be such that this field is written last.
41062 	 */
41063 	uint8_t	valid;
41064 } __rte_packed_end;
41065 
41066 /***************************************
41067  * hwrm_queue_adptv_qos_tx_feature_cfg *
41068  ***************************************/
41069 
41070 
41071 /* hwrm_queue_adptv_qos_tx_feature_cfg_input (size:192b/24B) */
41072 struct __rte_packed_begin hwrm_queue_adptv_qos_tx_feature_cfg_input {
41073 	/* The HWRM command request type. */
41074 	uint16_t	req_type;
41075 	/*
41076 	 * The completion ring to send the completion event on. This should
41077 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41078 	 */
41079 	uint16_t	cmpl_ring;
41080 	/*
41081 	 * The sequence ID is used by the driver for tracking multiple
41082 	 * commands. This ID is treated as opaque data by the firmware and
41083 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41084 	 */
41085 	uint16_t	seq_id;
41086 	/*
41087 	 * The target ID of the command:
41088 	 * * 0x0-0xFFF8 - The function ID
41089 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41090 	 * * 0xFFFD - Reserved for user-space HWRM interface
41091 	 * * 0xFFFF - HWRM
41092 	 */
41093 	uint16_t	target_id;
41094 	/*
41095 	 * A physical address pointer pointing to a host buffer that the
41096 	 * command's response data will be written. This can be either a host
41097 	 * physical address (HPA) or a guest physical address (GPA) and must
41098 	 * point to a physically contiguous block of memory.
41099 	 */
41100 	uint64_t	resp_addr;
41101 	uint32_t	enables;
41102 	/* This bit must be '1' for the queue_enable field to be configured. */
41103 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_ENABLES_QUEUE_ENABLE \
41104 		UINT32_C(0x1)
41105 	/*
41106 	 * Bitmask indicating which TX CoS queues are enabled or disabled.
41107 	 *
41108 	 * Each bit represents a specific queue where bit 0 represents
41109 	 * queue 0 and bit 7 represents queue 7.
41110 	 * A value of 0 indicates that the queue is not enabled.
41111 	 * A value of 1 indicates that the queue is enabled.
41112 	 */
41113 	uint8_t	queue_enable;
41114 	/* If set to 1, then the queue is enabled. */
41115 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE \
41116 		UINT32_C(0x1)
41117 	/* Queue is disabled. */
41118 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_DISABLED \
41119 		UINT32_C(0x0)
41120 	/* Queue is enabled. */
41121 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED \
41122 		UINT32_C(0x1)
41123 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_LAST \
41124 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID0_ENABLE_ENABLED
41125 	/* If set to 1, then the queue is enabled. */
41126 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE \
41127 		UINT32_C(0x2)
41128 	/* Queue is disabled. */
41129 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_DISABLED \
41130 		(UINT32_C(0x0) << 1)
41131 	/* Queue is enabled. */
41132 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED \
41133 		(UINT32_C(0x1) << 1)
41134 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_LAST \
41135 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID1_ENABLE_ENABLED
41136 	/* If set to 1, then the queue is enabled. */
41137 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE \
41138 		UINT32_C(0x4)
41139 	/* Queue is disabled. */
41140 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_DISABLED \
41141 		(UINT32_C(0x0) << 2)
41142 	/* Queue is enabled. */
41143 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED \
41144 		(UINT32_C(0x1) << 2)
41145 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_LAST \
41146 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID2_ENABLE_ENABLED
41147 	/* If set to 1, then the queue is enabled. */
41148 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE \
41149 		UINT32_C(0x8)
41150 	/* Queue is disabled. */
41151 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_DISABLED \
41152 		(UINT32_C(0x0) << 3)
41153 	/* Queue is enabled. */
41154 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED \
41155 		(UINT32_C(0x1) << 3)
41156 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_LAST \
41157 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID3_ENABLE_ENABLED
41158 	/* If set to 1, then the queue is enabled. */
41159 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE \
41160 		UINT32_C(0x10)
41161 	/* Queue is disabled. */
41162 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_DISABLED \
41163 		(UINT32_C(0x0) << 4)
41164 	/* Queue is enabled. */
41165 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED \
41166 		(UINT32_C(0x1) << 4)
41167 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_LAST \
41168 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID4_ENABLE_ENABLED
41169 	/* If set to 1, then the queue is enabled. */
41170 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE \
41171 		UINT32_C(0x20)
41172 	/* Queue is disabled. */
41173 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_DISABLED \
41174 		(UINT32_C(0x0) << 5)
41175 	/* Queue is enabled. */
41176 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED \
41177 		(UINT32_C(0x1) << 5)
41178 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_LAST \
41179 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID5_ENABLE_ENABLED
41180 	/* If set to 1, then the queue is enabled. */
41181 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE \
41182 		UINT32_C(0x40)
41183 	/* Queue is disabled. */
41184 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_DISABLED \
41185 		(UINT32_C(0x0) << 6)
41186 	/* Queue is enabled. */
41187 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED \
41188 		(UINT32_C(0x1) << 6)
41189 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_LAST \
41190 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID6_ENABLE_ENABLED
41191 	/* If set to 1, then the queue is enabled. */
41192 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE \
41193 		UINT32_C(0x80)
41194 	/* Queue is disabled. */
41195 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_DISABLED \
41196 		(UINT32_C(0x0) << 7)
41197 	/* Queue is enabled. */
41198 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED \
41199 		(UINT32_C(0x1) << 7)
41200 	#define HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_LAST \
41201 		HWRM_QUEUE_ADPTV_QOS_TX_FEATURE_CFG_INPUT_QUEUE_ENABLE_QID7_ENABLE_ENABLED
41202 	uint8_t	unused_0[3];
41203 } __rte_packed_end;
41204 
41205 /* hwrm_queue_adptv_qos_tx_feature_cfg_output (size:128b/16B) */
41206 struct __rte_packed_begin hwrm_queue_adptv_qos_tx_feature_cfg_output {
41207 	/* The specific error status for the command. */
41208 	uint16_t	error_code;
41209 	/* The HWRM command request type. */
41210 	uint16_t	req_type;
41211 	/* The sequence ID from the original command. */
41212 	uint16_t	seq_id;
41213 	/* The length of the response data in number of bytes. */
41214 	uint16_t	resp_len;
41215 	uint8_t	unused_0[7];
41216 	/*
41217 	 * This field is used in Output records to indicate that the output
41218 	 * is completely written to RAM. This field should be read as '1'
41219 	 * to indicate that the output has been completely written. When
41220 	 * writing a command completion or response to an internal processor,
41221 	 * the order of writes has to be such that this field is written last.
41222 	 */
41223 	uint8_t	valid;
41224 } __rte_packed_end;
41225 
41226 /********************
41227  * hwrm_queue_qcaps *
41228  ********************/
41229 
41230 
41231 /* hwrm_queue_qcaps_input (size:128b/16B) */
41232 struct __rte_packed_begin hwrm_queue_qcaps_input {
41233 	/* The HWRM command request type. */
41234 	uint16_t	req_type;
41235 	/*
41236 	 * The completion ring to send the completion event on. This should
41237 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41238 	 */
41239 	uint16_t	cmpl_ring;
41240 	/*
41241 	 * The sequence ID is used by the driver for tracking multiple
41242 	 * commands. This ID is treated as opaque data by the firmware and
41243 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41244 	 */
41245 	uint16_t	seq_id;
41246 	/*
41247 	 * The target ID of the command:
41248 	 * * 0x0-0xFFF8 - The function ID
41249 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41250 	 * * 0xFFFD - Reserved for user-space HWRM interface
41251 	 * * 0xFFFF - HWRM
41252 	 */
41253 	uint16_t	target_id;
41254 	/*
41255 	 * A physical address pointer pointing to a host buffer that the
41256 	 * command's response data will be written. This can be either a host
41257 	 * physical address (HPA) or a guest physical address (GPA) and must
41258 	 * point to a physically contiguous block of memory.
41259 	 */
41260 	uint64_t	resp_addr;
41261 } __rte_packed_end;
41262 
41263 /* hwrm_queue_qcaps_output (size:256b/32B) */
41264 struct __rte_packed_begin hwrm_queue_qcaps_output {
41265 	/* The specific error status for the command. */
41266 	uint16_t	error_code;
41267 	/* The HWRM command request type. */
41268 	uint16_t	req_type;
41269 	/* The sequence ID from the original command. */
41270 	uint16_t	seq_id;
41271 	/* The length of the response data in number of bytes. */
41272 	uint16_t	resp_len;
41273 	/* Adaptive QoS RX feature parameter capability flags. */
41274 	uint32_t	rx_feature_params;
41275 	/*
41276 	 * When this bit is '1' the capability to configure queue_enable
41277 	 * is supported.
41278 	 * If set to '0', then the capability to configure queue_enable
41279 	 * is not supported.
41280 	 */
41281 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_FEATURE_PARAMS_QUEUE_ENABLE_CAP \
41282 		UINT32_C(0x1)
41283 	/*
41284 	 * When this bit is '1' the capability to configure queue_mode
41285 	 * is supported.
41286 	 * If set to '0', then the capability to configure queue_mode
41287 	 * is not supported.
41288 	 */
41289 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_FEATURE_PARAMS_QUEUE_MODE_CAP \
41290 		UINT32_C(0x2)
41291 	/* Adaptive QoS TX feature parameter capability flags. */
41292 	uint32_t	tx_feature_params;
41293 	/*
41294 	 * When this bit is '1' the capability to configure queue_enable
41295 	 * is supported.
41296 	 * If set to '0', then the capability to configure queue_enable
41297 	 * is not supported.
41298 	 */
41299 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_FEATURE_PARAMS_QUEUE_ENABLE_CAP \
41300 		UINT32_C(0x1)
41301 	/*
41302 	 * The maximum number of queues that can be configured on this device.
41303 	 * Valid values range from 1 through 8.
41304 	 */
41305 	uint8_t	max_configurable_queues;
41306 	uint8_t	unused_0[3];
41307 	/* Adaptive QoS RX tuning parameter capability flags. */
41308 	uint32_t	rx_tuning_params;
41309 	/*
41310 	 * When this bit is '1' the capability to configure the option
41311 	 * is supported.
41312 	 * If set to '0', then the capability to configure the option
41313 	 * is not supported.
41314 	 */
41315 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_WFQ_COST_CAP \
41316 		UINT32_C(0x1)
41317 	/*
41318 	 * When this bit is '1' the capability to configure the option
41319 	 * is supported.
41320 	 * If set to '0', then the capability to configure the option
41321 	 * is not supported.
41322 	 */
41323 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_WFQ_UPPER_FACTOR_CAP \
41324 		UINT32_C(0x2)
41325 	/*
41326 	 * When this bit is '1' the capability to configure the option
41327 	 * is supported.
41328 	 * If set to '0', then the capability to configure the option
41329 	 * is not supported.
41330 	 */
41331 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_HYST_WINDOW_SIZE_FACTOR_CAP \
41332 		UINT32_C(0x4)
41333 	/*
41334 	 * When this bit is '1' the capability to configure the option
41335 	 * is supported.
41336 	 * If set to '0', then the capability to configure the option
41337 	 * is not supported.
41338 	 */
41339 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_PCIE_BW_EFF_CAP \
41340 		UINT32_C(0x8)
41341 	/*
41342 	 * When this bit is '1' the capability to configure the option
41343 	 * is supported.
41344 	 * If set to '0', then the capability to configure the option
41345 	 * is not supported.
41346 	 */
41347 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_XOFF_HEADROOM_FACTOR_CAP \
41348 		UINT32_C(0x10)
41349 	/*
41350 	 * When this bit is '1' the capability to configure the option
41351 	 * is supported.
41352 	 * If set to '0', then the capability to configure the option
41353 	 * is not supported.
41354 	 */
41355 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_L2_MIN_LATENCY_CAP \
41356 		UINT32_C(0x20)
41357 	/*
41358 	 * When this bit is '1' the capability to configure the option
41359 	 * is supported.
41360 	 * If set to '0', then the capability to configure the option
41361 	 * is not supported.
41362 	 */
41363 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_L2_MAX_LATENCY_CAP \
41364 		UINT32_C(0x40)
41365 	/*
41366 	 * When this bit is '1' the capability to configure the option
41367 	 * is supported.
41368 	 * If set to '0', then the capability to configure the option
41369 	 * is not supported.
41370 	 */
41371 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_ROCE_MIN_LATENCY_CAP \
41372 		UINT32_C(0x80)
41373 	/*
41374 	 * When this bit is '1' the capability to configure the option
41375 	 * is supported.
41376 	 * If set to '0', then the capability to configure the option
41377 	 * is not supported.
41378 	 */
41379 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_ROCE_MAX_LATENCY_CAP \
41380 		UINT32_C(0x100)
41381 	/*
41382 	 * When this bit is '1' the capability to configure the option
41383 	 * is supported.
41384 	 * If set to '0', then the capability to configure the option
41385 	 * is not supported.
41386 	 */
41387 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_L2_PIPE_COS_LATENCY_CAP \
41388 		UINT32_C(0x200)
41389 	/*
41390 	 * When this bit is '1' the capability to configure the option
41391 	 * is supported.
41392 	 * If set to '0', then the capability to configure the option
41393 	 * is not supported.
41394 	 */
41395 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_ROCE_PIPE_COS_LATENCY_CAP \
41396 		UINT32_C(0x400)
41397 	/*
41398 	 * When this bit is '1' the capability to configure the option
41399 	 * is supported.
41400 	 * If set to '0', then the capability to configure the option
41401 	 * is not supported.
41402 	 */
41403 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_COS_SHARED_MIN_RATIO_CAP \
41404 		UINT32_C(0x800)
41405 	/*
41406 	 * When this bit is '1' the capability to configure the option
41407 	 * is supported.
41408 	 * If set to '0', then the capability to configure the option
41409 	 * is not supported.
41410 	 */
41411 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_RSVD_CELLS_LIMIT_RATIO_CAP \
41412 		UINT32_C(0x1000)
41413 	/*
41414 	 * When this bit is '1' the capability to configure the option
41415 	 * is supported.
41416 	 * If set to '0', then the capability to configure the option
41417 	 * is not supported.
41418 	 */
41419 	#define HWRM_QUEUE_QCAPS_OUTPUT_RX_TUNING_PARAMS_SHAPER_REFILL_TIMER_CAP \
41420 		UINT32_C(0x2000)
41421 	/* Adaptive QoS TX tuning parameter capability flags. */
41422 	uint32_t	tx_tuning_params;
41423 	/*
41424 	 * When this bit is '1' the capability to configure the option
41425 	 * is supported.
41426 	 * If set to '0', then the capability to configure the option
41427 	 * is not supported.
41428 	 */
41429 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_WFQ_COST_CAP \
41430 		UINT32_C(0x1)
41431 	/*
41432 	 * When this bit is '1' the capability to configure the option
41433 	 * is supported.
41434 	 * If set to '0', then the capability to configure the option
41435 	 * is not supported.
41436 	 */
41437 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_WFQ_UPPER_FACTOR_CAP \
41438 		UINT32_C(0x2)
41439 	/*
41440 	 * When this bit is '1' the capability to configure the option
41441 	 * is supported.
41442 	 * If set to '0', then the capability to configure the option
41443 	 * is not supported.
41444 	 */
41445 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_HYST_WINDOW_SIZE_FACTOR_CAP \
41446 		UINT32_C(0x4)
41447 	/*
41448 	 * When this bit is '1' the capability to configure the option
41449 	 * is supported.
41450 	 * If set to '0', then the capability to configure the option
41451 	 * is not supported.
41452 	 */
41453 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_RSVD_CELLS_LIMIT_RATIO_CAP \
41454 		UINT32_C(0x8)
41455 	/*
41456 	 * When this bit is '1' the capability to configure the option
41457 	 * is supported.
41458 	 * If set to '0', then the capability to configure the option
41459 	 * is not supported.
41460 	 */
41461 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_L2_MIN_LATENCY_CAP \
41462 		UINT32_C(0x10)
41463 	/*
41464 	 * When this bit is '1' the capability to configure the option
41465 	 * is supported.
41466 	 * If set to '0', then the capability to configure the option
41467 	 * is not supported.
41468 	 */
41469 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_L2_MAX_LATENCY_CAP \
41470 		UINT32_C(0x20)
41471 	/*
41472 	 * When this bit is '1' the capability to configure the option
41473 	 * is supported.
41474 	 * If set to '0', then the capability to configure the option
41475 	 * is not supported.
41476 	 */
41477 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_ROCE_MIN_LATENCY_CAP \
41478 		UINT32_C(0x40)
41479 	/*
41480 	 * When this bit is '1' the capability to configure the option
41481 	 * is supported.
41482 	 * If set to '0', then the capability to configure the option
41483 	 * is not supported.
41484 	 */
41485 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_ROCE_MAX_LATENCY_CAP \
41486 		UINT32_C(0x80)
41487 	/*
41488 	 * When this bit is '1' the capability to configure the option
41489 	 * is supported.
41490 	 * If set to '0', then the capability to configure the option
41491 	 * is not supported.
41492 	 */
41493 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_MAX_TBM_CELLS_PRERESERVED_CAP \
41494 		UINT32_C(0x100)
41495 	/*
41496 	 * When this bit is '1' the capability to configure the option
41497 	 * is supported.
41498 	 * If set to '0', then the capability to configure the option
41499 	 * is not supported.
41500 	 */
41501 	#define HWRM_QUEUE_QCAPS_OUTPUT_TX_TUNING_PARAMS_SHAPER_REFILL_TIMER_CAP \
41502 		UINT32_C(0x200)
41503 	uint8_t	unused_1[3];
41504 	/*
41505 	 * This field is used in Output records to indicate that the output
41506 	 * is completely written to RAM. This field should be read as '1'
41507 	 * to indicate that the output has been completely written. When
41508 	 * writing a command completion or response to an internal processor,
41509 	 * the order of writes has to be such that this field is written last.
41510 	 */
41511 	uint8_t	valid;
41512 } __rte_packed_end;
41513 
41514 /***************************************
41515  * hwrm_queue_adptv_qos_rx_tuning_qcfg *
41516  ***************************************/
41517 
41518 
41519 /* hwrm_queue_adptv_qos_rx_tuning_qcfg_input (size:128b/16B) */
41520 struct __rte_packed_begin hwrm_queue_adptv_qos_rx_tuning_qcfg_input {
41521 	/* The HWRM command request type. */
41522 	uint16_t	req_type;
41523 	/*
41524 	 * The completion ring to send the completion event on. This should
41525 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41526 	 */
41527 	uint16_t	cmpl_ring;
41528 	/*
41529 	 * The sequence ID is used by the driver for tracking multiple
41530 	 * commands. This ID is treated as opaque data by the firmware and
41531 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41532 	 */
41533 	uint16_t	seq_id;
41534 	/*
41535 	 * The target ID of the command:
41536 	 * * 0x0-0xFFF8 - The function ID
41537 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41538 	 * * 0xFFFD - Reserved for user-space HWRM interface
41539 	 * * 0xFFFF - HWRM
41540 	 */
41541 	uint16_t	target_id;
41542 	/*
41543 	 * A physical address pointer pointing to a host buffer that the
41544 	 * command's response data will be written. This can be either a host
41545 	 * physical address (HPA) or a guest physical address (GPA) and must
41546 	 * point to a physically contiguous block of memory.
41547 	 */
41548 	uint64_t	resp_addr;
41549 } __rte_packed_end;
41550 
41551 /* hwrm_queue_adptv_qos_rx_tuning_qcfg_output (size:576b/72B) */
41552 struct __rte_packed_begin hwrm_queue_adptv_qos_rx_tuning_qcfg_output {
41553 	/* The specific error status for the command. */
41554 	uint16_t	error_code;
41555 	/* The HWRM command request type. */
41556 	uint16_t	req_type;
41557 	/* The sequence ID from the original command. */
41558 	uint16_t	seq_id;
41559 	/* The length of the response data in number of bytes. */
41560 	uint16_t	resp_len;
41561 	/* Indicates max credit as required by hardware. */
41562 	uint32_t	wfq_cost;
41563 	/*
41564 	 * Specifies a factor that determines the upper bound for each
41565 	 * cos_wfq_credit_weight.
41566 	 */
41567 	uint32_t	wfq_upper_factor;
41568 	/*
41569 	 * The algorithm multiplies this factor by the MRU size to compute the
41570 	 * hysteresis window size which in turn is used in deassert
41571 	 * threshold calculations.
41572 	 */
41573 	uint32_t	hyst_window_size_factor;
41574 	/*
41575 	 * Specifies PCIe BW efficiency in the range of 0-100%. System
41576 	 * characterization determines the value of this parameter. A value of
41577 	 * less than 100% accounts for internal PCIe over-subscription. The
41578 	 * algorithm uses this parameter to determine the PCIe BW available
41579 	 * for transferring received packets to the host.
41580 	 */
41581 	uint32_t	pcie_bw_eff;
41582 	/* Scales the number of cells for xoff. */
41583 	uint32_t	xoff_headroom_factor;
41584 	/*
41585 	 * It is used to calculate the number of reserved cells for cos queues
41586 	 * configured for L2. Its value is derived from system
41587 	 * characterization.
41588 	 */
41589 	uint32_t	l2_min_latency;
41590 	/*
41591 	 * It is used to calculate the number of shared cells for cos queues
41592 	 * configured for L2. Its value is derived from system
41593 	 * characterization.
41594 	 */
41595 	uint32_t	l2_max_latency;
41596 	/*
41597 	 * It is used to calculate the number of reserved cells for cos queues
41598 	 * configured for RoCE. Its value is derived from system
41599 	 * characterization.
41600 	 */
41601 	uint32_t	roce_min_latency;
41602 	/*
41603 	 * It is used to calculate the number of shared cells for cos queues
41604 	 * configured for RoCE. Its value is derived from system
41605 	 * characterization.
41606 	 */
41607 	uint32_t	roce_max_latency;
41608 	/*
41609 	 * The algorithm uses this parameter to calculate the number of cells
41610 	 * to be excluded from the total buffer pool to account for the
41611 	 * latency of pipeline post RE_DEC to PCIe block. Its value is derived
41612 	 * from system characterization.
41613 	 */
41614 	uint32_t	l2_pipe_cos_latency;
41615 	/*
41616 	 * The algorithm uses this parameter to calculate the number of cells
41617 	 * to be excluded from the total buffer pool to account for the
41618 	 * latency of pipeline post RE_DEC to PCIe block. Its value is derived
41619 	 * from system characterization.
41620 	 */
41621 	uint32_t	roce_pipe_cos_latency;
41622 	/* Sets the minimum number of shared cells each cos queue can have. */
41623 	uint32_t	cos_shared_min_ratio;
41624 	/*
41625 	 * The parameter limits the total reserved cells. If the computed
41626 	 * total reserved cells becomes larger than rsvd_cells_limit_ratio x
41627 	 * port_cells_avail, then the reserved cells are set to the limit
41628 	 * value. Its range of values is 0-50%.
41629 	 */
41630 	uint32_t	rsvd_cells_limit_ratio;
41631 	/*
41632 	 * This parameter is used to compute the time interval for
41633 	 * replenishing the shaper credit buckets for all RX cos queues.
41634 	 */
41635 	uint32_t	shaper_refill_timer;
41636 	uint8_t	unused_0[7];
41637 	/*
41638 	 * This field is used in Output records to indicate that the output
41639 	 * is completely written to RAM. This field should be read as '1'
41640 	 * to indicate that the output has been completely written. When
41641 	 * writing a command completion or response to an internal processor,
41642 	 * the order of writes has to be such that this field is written last.
41643 	 */
41644 	uint8_t	valid;
41645 } __rte_packed_end;
41646 
41647 /**************************************
41648  * hwrm_queue_adptv_qos_rx_tuning_cfg *
41649  **************************************/
41650 
41651 
41652 /* hwrm_queue_adptv_qos_rx_tuning_cfg_input (size:640b/80B) */
41653 struct __rte_packed_begin hwrm_queue_adptv_qos_rx_tuning_cfg_input {
41654 	/* The HWRM command request type. */
41655 	uint16_t	req_type;
41656 	/*
41657 	 * The completion ring to send the completion event on. This should
41658 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41659 	 */
41660 	uint16_t	cmpl_ring;
41661 	/*
41662 	 * The sequence ID is used by the driver for tracking multiple
41663 	 * commands. This ID is treated as opaque data by the firmware and
41664 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41665 	 */
41666 	uint16_t	seq_id;
41667 	/*
41668 	 * The target ID of the command:
41669 	 * * 0x0-0xFFF8 - The function ID
41670 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41671 	 * * 0xFFFD - Reserved for user-space HWRM interface
41672 	 * * 0xFFFF - HWRM
41673 	 */
41674 	uint16_t	target_id;
41675 	/*
41676 	 * A physical address pointer pointing to a host buffer that the
41677 	 * command's response data will be written. This can be either a host
41678 	 * physical address (HPA) or a guest physical address (GPA) and must
41679 	 * point to a physically contiguous block of memory.
41680 	 */
41681 	uint64_t	resp_addr;
41682 	uint32_t	enables;
41683 	/* This bit must be '1' for the option to be configured. */
41684 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_WFQ_COST \
41685 		UINT32_C(0x1)
41686 	/* This bit must be '1' for the option to be configured. */
41687 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_WFQ_UPPER_FACTOR \
41688 		UINT32_C(0x2)
41689 	/* This bit must be '1' for the option to be configured. */
41690 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_HYST_WINDOW_SIZE_FACTOR \
41691 		UINT32_C(0x4)
41692 	/* This bit must be '1' for the option to be configured. */
41693 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_PCIE_BW_EFF \
41694 		UINT32_C(0x8)
41695 	/* This bit must be '1' for the option to be configured. */
41696 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_XOFF_HEADROOM_FACTOR \
41697 		UINT32_C(0x10)
41698 	/* This bit must be '1' for the option to be configured. */
41699 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_L2_MIN_LATENCY \
41700 		UINT32_C(0x20)
41701 	/* This bit must be '1' for the option to be configured. */
41702 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_L2_MAX_LATENCY \
41703 		UINT32_C(0x40)
41704 	/* This bit must be '1' for the option to be configured. */
41705 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_ROCE_MIN_LATENCY \
41706 		UINT32_C(0x80)
41707 	/* This bit must be '1' for the option to be configured. */
41708 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_ROCE_MAX_LATENCY \
41709 		UINT32_C(0x100)
41710 	/* This bit must be '1' for the option to be configured. */
41711 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_L2_PIPE_COS_LATENCY \
41712 		UINT32_C(0x200)
41713 	/* This bit must be '1' for the option to be configured. */
41714 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_ROCE_PIPE_COS_LATENCY \
41715 		UINT32_C(0x400)
41716 	/* This bit must be '1' for the option to be configured. */
41717 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_COS_SHARED_MIN_RATIO \
41718 		UINT32_C(0x800)
41719 	/* This bit must be '1' for the option to be configured. */
41720 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_RSVD_CELLS_LIMIT_RATIO \
41721 		UINT32_C(0x1000)
41722 	/* This bit must be '1' for the option to be configured. */
41723 	#define HWRM_QUEUE_ADPTV_QOS_RX_TUNING_CFG_INPUT_ENABLES_SHAPER_REFILL_TIMER \
41724 		UINT32_C(0x2000)
41725 	/* Indicates max credit as required by hardware. */
41726 	uint32_t	wfq_cost;
41727 	/*
41728 	 * Specifies a factor that determines the upper bound for each
41729 	 * cos_wfq_credit_weight.
41730 	 */
41731 	uint32_t	wfq_upper_factor;
41732 	/*
41733 	 * The algorithm multiplies this factor by the MRU size to compute the
41734 	 * hysteresis window size which in turn is used in deassert
41735 	 * threshold calculations.
41736 	 */
41737 	uint32_t	hyst_window_size_factor;
41738 	/*
41739 	 * Specifies PCIe BW efficiency in the range of 0-100%. System
41740 	 * characterization determines the value of this parameter. A value of
41741 	 * less than 100% accounts for internal PCIe over-subscription. The
41742 	 * algorithm uses this parameter to determine the PCIe BW available
41743 	 * for transferring received packets to the host.
41744 	 */
41745 	uint32_t	pcie_bw_eff;
41746 	/* Scales the number of cells for xoff. */
41747 	uint32_t	xoff_headroom_factor;
41748 	/*
41749 	 * It is used to calculate the number of reserved cells for cos queues
41750 	 * configured for L2. Its value is derived from system
41751 	 * characterization.
41752 	 */
41753 	uint32_t	l2_min_latency;
41754 	/*
41755 	 * It is used to calculate the number of shared cells for cos queues
41756 	 * configured for L2. Its value is derived from system
41757 	 * characterization.
41758 	 */
41759 	uint32_t	l2_max_latency;
41760 	/*
41761 	 * It is used to calculate the number of reserved cells for cos queues
41762 	 * configured for RoCE. Its value is derived from system
41763 	 * characterization.
41764 	 */
41765 	uint32_t	roce_min_latency;
41766 	/*
41767 	 * It is used to calculate the number of shared cells for cos queues
41768 	 * configured for RoCE. Its value is derived from system
41769 	 * characterization.
41770 	 */
41771 	uint32_t	roce_max_latency;
41772 	/*
41773 	 * The algorithm uses this parameter to calculate the number of cells
41774 	 * to be excluded from the total buffer pool to account for the
41775 	 * latency of pipeline post RE_DEC to PCIe block. Its value is derived
41776 	 * from system characterization.
41777 	 */
41778 	uint32_t	l2_pipe_cos_latency;
41779 	/*
41780 	 * The algorithm uses this parameter to calculate the number of cells
41781 	 * to be excluded from the total buffer pool to account for the
41782 	 * latency of pipeline post RE_DEC to PCIe block. Its value is derived
41783 	 * from system characterization.
41784 	 */
41785 	uint32_t	roce_pipe_cos_latency;
41786 	/* Sets the minimum number of shared cells each cos queue can have. */
41787 	uint32_t	cos_shared_min_ratio;
41788 	/*
41789 	 * The parameter limits the total reserved cells. If the computed
41790 	 * total reserved cells becomes larger than rsvd_cells_limit_ratio x
41791 	 * port_cells_avail, then the reserved cells are set to the limit
41792 	 * value. Its range of values is 0-50%.
41793 	 */
41794 	uint32_t	rsvd_cells_limit_ratio;
41795 	/*
41796 	 * This parameter is used to compute the time interval for
41797 	 * replenishing the shaper credit buckets for all RX cos queues.
41798 	 */
41799 	uint32_t	shaper_refill_timer;
41800 	uint8_t	unused_0[4];
41801 } __rte_packed_end;
41802 
41803 /* hwrm_queue_adptv_qos_rx_tuning_cfg_output (size:128b/16B) */
41804 struct __rte_packed_begin hwrm_queue_adptv_qos_rx_tuning_cfg_output {
41805 	/* The specific error status for the command. */
41806 	uint16_t	error_code;
41807 	/* The HWRM command request type. */
41808 	uint16_t	req_type;
41809 	/* The sequence ID from the original command. */
41810 	uint16_t	seq_id;
41811 	/* The length of the response data in number of bytes. */
41812 	uint16_t	resp_len;
41813 	uint8_t	unused_0[7];
41814 	/*
41815 	 * This field is used in Output records to indicate that the output
41816 	 * is completely written to RAM. This field should be read as '1'
41817 	 * to indicate that the output has been completely written. When
41818 	 * writing a command completion or response to an internal processor,
41819 	 * the order of writes has to be such that this field is written last.
41820 	 */
41821 	uint8_t	valid;
41822 } __rte_packed_end;
41823 
41824 /***************************************
41825  * hwrm_queue_adptv_qos_tx_tuning_qcfg *
41826  ***************************************/
41827 
41828 
41829 /* hwrm_queue_adptv_qos_tx_tuning_qcfg_input (size:128b/16B) */
41830 struct __rte_packed_begin hwrm_queue_adptv_qos_tx_tuning_qcfg_input {
41831 	/* The HWRM command request type. */
41832 	uint16_t	req_type;
41833 	/*
41834 	 * The completion ring to send the completion event on. This should
41835 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41836 	 */
41837 	uint16_t	cmpl_ring;
41838 	/*
41839 	 * The sequence ID is used by the driver for tracking multiple
41840 	 * commands. This ID is treated as opaque data by the firmware and
41841 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41842 	 */
41843 	uint16_t	seq_id;
41844 	/*
41845 	 * The target ID of the command:
41846 	 * * 0x0-0xFFF8 - The function ID
41847 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41848 	 * * 0xFFFD - Reserved for user-space HWRM interface
41849 	 * * 0xFFFF - HWRM
41850 	 */
41851 	uint16_t	target_id;
41852 	/*
41853 	 * A physical address pointer pointing to a host buffer that the
41854 	 * command's response data will be written. This can be either a host
41855 	 * physical address (HPA) or a guest physical address (GPA) and must
41856 	 * point to a physically contiguous block of memory.
41857 	 */
41858 	uint64_t	resp_addr;
41859 } __rte_packed_end;
41860 
41861 /* hwrm_queue_adptv_qos_tx_tuning_qcfg_output (size:448b/56B) */
41862 struct __rte_packed_begin hwrm_queue_adptv_qos_tx_tuning_qcfg_output {
41863 	/* The specific error status for the command. */
41864 	uint16_t	error_code;
41865 	/* The HWRM command request type. */
41866 	uint16_t	req_type;
41867 	/* The sequence ID from the original command. */
41868 	uint16_t	seq_id;
41869 	/* The length of the response data in number of bytes. */
41870 	uint16_t	resp_len;
41871 	/* Indicates max credit as required by hardware. */
41872 	uint32_t	wfq_cost;
41873 	/*
41874 	 * Specifies a factor that determines the upper bound for each
41875 	 * cos_wfq_credit_weight.
41876 	 */
41877 	uint32_t	wfq_upper_factor;
41878 	/*
41879 	 * The algorithm multiplies this factor by the MRU size to compute the
41880 	 * hysteresis window size which in turn is used in deassert
41881 	 * threshold calculations.
41882 	 */
41883 	uint32_t	hyst_window_size_factor;
41884 	/*
41885 	 * The parameter limits the total reserved cells. If the computed
41886 	 * total reserved cells becomes larger than rsvd_cells_limit_ratio x
41887 	 * port_cells_avail, then the reserved cells are set to the limit
41888 	 * value. Its range of values is 0-50%.
41889 	 */
41890 	uint32_t	rsvd_cells_limit_ratio;
41891 	/*
41892 	 * It is used to calculate the number of reserved cells for cos queues
41893 	 * configured for L2. Its value is derived from system
41894 	 * characterization.
41895 	 */
41896 	uint32_t	l2_min_latency;
41897 	/*
41898 	 * It is used to calculate the number of shared cells for cos queues
41899 	 * configured for L2. Its value is derived from system
41900 	 * characterization.
41901 	 */
41902 	uint32_t	l2_max_latency;
41903 	/*
41904 	 * It is used to calculate the number of reserved cells for cos queues
41905 	 * configured for RoCE. Its value is derived from system
41906 	 * characterization.
41907 	 */
41908 	uint32_t	roce_min_latency;
41909 	/*
41910 	 * It is used to calculate the number of shared cells for cos queues
41911 	 * configured for RoCE. Its value is derived from system
41912 	 * characterization.
41913 	 */
41914 	uint32_t	roce_max_latency;
41915 	/* Specifies the number of reserved cells TRP requires per cos queue. */
41916 	uint32_t	max_tbm_cells_prereserved;
41917 	/*
41918 	 * This parameter is used to compute the time interval for
41919 	 * replenishing the shaper credit buckets for all TX cos queues.
41920 	 */
41921 	uint32_t	shaper_refill_timer;
41922 	uint8_t	unused_0[7];
41923 	/*
41924 	 * This field is used in Output records to indicate that the output
41925 	 * is completely written to RAM. This field should be read as '1'
41926 	 * to indicate that the output has been completely written. When
41927 	 * writing a command completion or response to an internal processor,
41928 	 * the order of writes has to be such that this field is written last.
41929 	 */
41930 	uint8_t	valid;
41931 } __rte_packed_end;
41932 
41933 /**************************************
41934  * hwrm_queue_adptv_qos_tx_tuning_cfg *
41935  **************************************/
41936 
41937 
41938 /* hwrm_queue_adptv_qos_tx_tuning_cfg_input (size:512b/64B) */
41939 struct __rte_packed_begin hwrm_queue_adptv_qos_tx_tuning_cfg_input {
41940 	/* The HWRM command request type. */
41941 	uint16_t	req_type;
41942 	/*
41943 	 * The completion ring to send the completion event on. This should
41944 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
41945 	 */
41946 	uint16_t	cmpl_ring;
41947 	/*
41948 	 * The sequence ID is used by the driver for tracking multiple
41949 	 * commands. This ID is treated as opaque data by the firmware and
41950 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
41951 	 */
41952 	uint16_t	seq_id;
41953 	/*
41954 	 * The target ID of the command:
41955 	 * * 0x0-0xFFF8 - The function ID
41956 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
41957 	 * * 0xFFFD - Reserved for user-space HWRM interface
41958 	 * * 0xFFFF - HWRM
41959 	 */
41960 	uint16_t	target_id;
41961 	/*
41962 	 * A physical address pointer pointing to a host buffer that the
41963 	 * command's response data will be written. This can be either a host
41964 	 * physical address (HPA) or a guest physical address (GPA) and must
41965 	 * point to a physically contiguous block of memory.
41966 	 */
41967 	uint64_t	resp_addr;
41968 	uint32_t	enables;
41969 	/* This bit must be '1' for the option to be configured. */
41970 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_WFQ_COST \
41971 		UINT32_C(0x1)
41972 	/* This bit must be '1' for the option to be configured. */
41973 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_WFQ_UPPER_FACTOR \
41974 		UINT32_C(0x2)
41975 	/* This bit must be '1' for the option to be configured. */
41976 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_HYST_WINDOW_SIZE_FACTOR \
41977 		UINT32_C(0x4)
41978 	/* This bit must be '1' for the option to be configured. */
41979 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_RSVD_CELLS_LIMIT_RATIO \
41980 		UINT32_C(0x8)
41981 	/* This bit must be '1' for the option to be configured. */
41982 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_L2_MIN_LATENCY \
41983 		UINT32_C(0x10)
41984 	/* This bit must be '1' for the option to be configured. */
41985 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_L2_MAX_LATENCY \
41986 		UINT32_C(0x20)
41987 	/* This bit must be '1' for the option to be configured. */
41988 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_ROCE_MIN_LATENCY \
41989 		UINT32_C(0x40)
41990 	/* This bit must be '1' for the option to be configured. */
41991 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_ROCE_MAX_LATENCY \
41992 		UINT32_C(0x80)
41993 	/* This bit must be '1' for the option to be configured. */
41994 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_MAX_TBM_CELLS_PRERESERVED \
41995 		UINT32_C(0x100)
41996 	/* This bit must be '1' for the option to be configured. */
41997 	#define HWRM_QUEUE_ADPTV_QOS_TX_TUNING_CFG_INPUT_ENABLES_SHAPER_REFILL_TIMER \
41998 		UINT32_C(0x200)
41999 	/* Indicates max credit as required by hardware. */
42000 	uint32_t	wfq_cost;
42001 	/*
42002 	 * Specifies a factor that determines the upper bound for each
42003 	 * cos_wfq_credit_weight.
42004 	 */
42005 	uint32_t	wfq_upper_factor;
42006 	/*
42007 	 * The algorithm multiplies this factor by the MRU size to compute the
42008 	 * hysteresis window size which in turn is used in deassert
42009 	 * threshold calculations.
42010 	 */
42011 	uint32_t	hyst_window_size_factor;
42012 	/*
42013 	 * The parameter limits the total reserved cells. If the computed
42014 	 * total reserved cells becomes larger than rsvd_cells_limit_ratio x
42015 	 * port_cells_avail, then the reserved cells are set to the limit
42016 	 * value. Its range of values is 0-50%.
42017 	 */
42018 	uint32_t	rsvd_cells_limit_ratio;
42019 	/*
42020 	 * It is used to calculate the number of reserved cells for cos queues
42021 	 * configured for L2. Its value is derived from system
42022 	 * characterization.
42023 	 */
42024 	uint32_t	l2_min_latency;
42025 	/*
42026 	 * It is used to calculate the number of shared cells for cos queues
42027 	 * configured for L2. Its value is derived from system
42028 	 * characterization.
42029 	 */
42030 	uint32_t	l2_max_latency;
42031 	/*
42032 	 * It is used to calculate the number of reserved cells for cos queues
42033 	 * configured for RoCE. Its value is derived from system
42034 	 * characterization.
42035 	 */
42036 	uint32_t	roce_min_latency;
42037 	/*
42038 	 * It is used to calculate the number of shared cells for cos queues
42039 	 * configured for RoCE. Its value is derived from system
42040 	 * characterization.
42041 	 */
42042 	uint32_t	roce_max_latency;
42043 	/* Specifies the number of reserved cells TRP requires per cos queue. */
42044 	uint32_t	max_tbm_cells_prereserved;
42045 	/*
42046 	 * This parameter is used to compute the time interval for
42047 	 * replenishing the shaper credit buckets for all TX cos queues.
42048 	 */
42049 	uint32_t	shaper_refill_timer;
42050 	uint8_t	unused_0[4];
42051 } __rte_packed_end;
42052 
42053 /* hwrm_queue_adptv_qos_tx_tuning_cfg_output (size:128b/16B) */
42054 struct __rte_packed_begin hwrm_queue_adptv_qos_tx_tuning_cfg_output {
42055 	/* The specific error status for the command. */
42056 	uint16_t	error_code;
42057 	/* The HWRM command request type. */
42058 	uint16_t	req_type;
42059 	/* The sequence ID from the original command. */
42060 	uint16_t	seq_id;
42061 	/* The length of the response data in number of bytes. */
42062 	uint16_t	resp_len;
42063 	uint8_t	unused_0[7];
42064 	/*
42065 	 * This field is used in Output records to indicate that the output
42066 	 * is completely written to RAM. This field should be read as '1'
42067 	 * to indicate that the output has been completely written. When
42068 	 * writing a command completion or response to an internal processor,
42069 	 * the order of writes has to be such that this field is written last.
42070 	 */
42071 	uint8_t	valid;
42072 } __rte_packed_end;
42073 
42074 /**********************************
42075  * hwrm_queue_pfcwd_timeout_qcaps *
42076  **********************************/
42077 
42078 
42079 /* hwrm_queue_pfcwd_timeout_qcaps_input (size:128b/16B) */
42080 struct __rte_packed_begin hwrm_queue_pfcwd_timeout_qcaps_input {
42081 	/* The HWRM command request type. */
42082 	uint16_t	req_type;
42083 	/*
42084 	 * The completion ring to send the completion event on. This should
42085 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42086 	 */
42087 	uint16_t	cmpl_ring;
42088 	/*
42089 	 * The sequence ID is used by the driver for tracking multiple
42090 	 * commands. This ID is treated as opaque data by the firmware and
42091 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42092 	 */
42093 	uint16_t	seq_id;
42094 	/*
42095 	 * The target ID of the command:
42096 	 * * 0x0-0xFFF8 - The function ID
42097 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42098 	 * * 0xFFFD - Reserved for user-space HWRM interface
42099 	 * * 0xFFFF - HWRM
42100 	 */
42101 	uint16_t	target_id;
42102 	/*
42103 	 * A physical address pointer pointing to a host buffer that the
42104 	 * command's response data will be written. This can be either a host
42105 	 * physical address (HPA) or a guest physical address (GPA) and must
42106 	 * point to a physically contiguous block of memory.
42107 	 */
42108 	uint64_t	resp_addr;
42109 } __rte_packed_end;
42110 
42111 /* hwrm_queue_pfcwd_timeout_qcaps_output (size:128b/16B) */
42112 struct __rte_packed_begin hwrm_queue_pfcwd_timeout_qcaps_output {
42113 	/* The specific error status for the command. */
42114 	uint16_t	error_code;
42115 	/* The HWRM command request type. */
42116 	uint16_t	req_type;
42117 	/* The sequence ID from the original command. */
42118 	uint16_t	seq_id;
42119 	/* The length of the response data in number of bytes. */
42120 	uint16_t	resp_len;
42121 	/* Max configurable pfc watchdog timeout value in msec. */
42122 	uint32_t	max_pfcwd_timeout;
42123 	uint8_t	unused_0[3];
42124 	/*
42125 	 * This field is used in Output records to indicate that the output
42126 	 * is completely written to RAM. This field should be read as '1'
42127 	 * to indicate that the output has been completely written. When
42128 	 * writing a command completion or response to an internal processor,
42129 	 * the order of writes has to be such that this field is written last.
42130 	 */
42131 	uint8_t	valid;
42132 } __rte_packed_end;
42133 
42134 /********************************
42135  * hwrm_queue_pfcwd_timeout_cfg *
42136  ********************************/
42137 
42138 
42139 /* hwrm_queue_pfcwd_timeout_cfg_input (size:192b/24B) */
42140 struct __rte_packed_begin hwrm_queue_pfcwd_timeout_cfg_input {
42141 	/* The HWRM command request type. */
42142 	uint16_t	req_type;
42143 	/*
42144 	 * The completion ring to send the completion event on. This should
42145 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42146 	 */
42147 	uint16_t	cmpl_ring;
42148 	/*
42149 	 * The sequence ID is used by the driver for tracking multiple
42150 	 * commands. This ID is treated as opaque data by the firmware and
42151 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42152 	 */
42153 	uint16_t	seq_id;
42154 	/*
42155 	 * The target ID of the command:
42156 	 * * 0x0-0xFFF8 - The function ID
42157 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42158 	 * * 0xFFFD - Reserved for user-space HWRM interface
42159 	 * * 0xFFFF - HWRM
42160 	 */
42161 	uint16_t	target_id;
42162 	/*
42163 	 * A physical address pointer pointing to a host buffer that the
42164 	 * command's response data will be written. This can be either a host
42165 	 * physical address (HPA) or a guest physical address (GPA) and must
42166 	 * point to a physically contiguous block of memory.
42167 	 */
42168 	uint64_t	resp_addr;
42169 	/* pfc watchdog timeout value in msec. */
42170 	uint32_t	pfcwd_timeout_value;
42171 	uint8_t	unused_0[4];
42172 } __rte_packed_end;
42173 
42174 /* hwrm_queue_pfcwd_timeout_cfg_output (size:128b/16B) */
42175 struct __rte_packed_begin hwrm_queue_pfcwd_timeout_cfg_output {
42176 	/* The specific error status for the command. */
42177 	uint16_t	error_code;
42178 	/* The HWRM command request type. */
42179 	uint16_t	req_type;
42180 	/* The sequence ID from the original command. */
42181 	uint16_t	seq_id;
42182 	/* The length of the response data in number of bytes. */
42183 	uint16_t	resp_len;
42184 	uint8_t	unused_0[7];
42185 	/*
42186 	 * This field is used in Output records to indicate that the output
42187 	 * is completely written to RAM. This field should be read as '1'
42188 	 * to indicate that the output has been completely written. When
42189 	 * writing a command completion or response to an internal processor,
42190 	 * the order of writes has to be such that this field is written last.
42191 	 */
42192 	uint8_t	valid;
42193 } __rte_packed_end;
42194 
42195 /*********************************
42196  * hwrm_queue_pfcwd_timeout_qcfg *
42197  *********************************/
42198 
42199 
42200 /* hwrm_queue_pfcwd_timeout_qcfg_input (size:128b/16B) */
42201 struct __rte_packed_begin hwrm_queue_pfcwd_timeout_qcfg_input {
42202 	/* The HWRM command request type. */
42203 	uint16_t	req_type;
42204 	/*
42205 	 * The completion ring to send the completion event on. This should
42206 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42207 	 */
42208 	uint16_t	cmpl_ring;
42209 	/*
42210 	 * The sequence ID is used by the driver for tracking multiple
42211 	 * commands. This ID is treated as opaque data by the firmware and
42212 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42213 	 */
42214 	uint16_t	seq_id;
42215 	/*
42216 	 * The target ID of the command:
42217 	 * * 0x0-0xFFF8 - The function ID
42218 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42219 	 * * 0xFFFD - Reserved for user-space HWRM interface
42220 	 * * 0xFFFF - HWRM
42221 	 */
42222 	uint16_t	target_id;
42223 	/*
42224 	 * A physical address pointer pointing to a host buffer that the
42225 	 * command's response data will be written. This can be either a host
42226 	 * physical address (HPA) or a guest physical address (GPA) and must
42227 	 * point to a physically contiguous block of memory.
42228 	 */
42229 	uint64_t	resp_addr;
42230 } __rte_packed_end;
42231 
42232 /* hwrm_queue_pfcwd_timeout_qcfg_output (size:128b/16B) */
42233 struct __rte_packed_begin hwrm_queue_pfcwd_timeout_qcfg_output {
42234 	/* The specific error status for the command. */
42235 	uint16_t	error_code;
42236 	/* The HWRM command request type. */
42237 	uint16_t	req_type;
42238 	/* The sequence ID from the original command. */
42239 	uint16_t	seq_id;
42240 	/* The length of the response data in number of bytes. */
42241 	uint16_t	resp_len;
42242 	/* Current configured pfc watchdog timeout value in msec. */
42243 	uint32_t	pfcwd_timeout_value;
42244 	uint8_t	unused_0[3];
42245 	/*
42246 	 * This field is used in Output records to indicate that the output
42247 	 * is completely written to RAM. This field should be read as '1'
42248 	 * to indicate that the output has been completely written. When
42249 	 * writing a command completion or response to an internal processor,
42250 	 * the order of writes has to be such that this field is written last.
42251 	 */
42252 	uint8_t	valid;
42253 } __rte_packed_end;
42254 
42255 /*******************
42256  * hwrm_vnic_alloc *
42257  *******************/
42258 
42259 
42260 /* hwrm_vnic_alloc_input (size:192b/24B) */
42261 struct __rte_packed_begin hwrm_vnic_alloc_input {
42262 	/* The HWRM command request type. */
42263 	uint16_t	req_type;
42264 	/*
42265 	 * The completion ring to send the completion event on. This should
42266 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42267 	 */
42268 	uint16_t	cmpl_ring;
42269 	/*
42270 	 * The sequence ID is used by the driver for tracking multiple
42271 	 * commands. This ID is treated as opaque data by the firmware and
42272 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42273 	 */
42274 	uint16_t	seq_id;
42275 	/*
42276 	 * The target ID of the command:
42277 	 * * 0x0-0xFFF8 - The function ID
42278 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42279 	 * * 0xFFFD - Reserved for user-space HWRM interface
42280 	 * * 0xFFFF - HWRM
42281 	 */
42282 	uint16_t	target_id;
42283 	/*
42284 	 * A physical address pointer pointing to a host buffer that the
42285 	 * command's response data will be written. This can be either a host
42286 	 * physical address (HPA) or a guest physical address (GPA) and must
42287 	 * point to a physically contiguous block of memory.
42288 	 */
42289 	uint64_t	resp_addr;
42290 	uint32_t	flags;
42291 	/*
42292 	 * When this bit is '1', this VNIC is requested to
42293 	 * be the default VNIC for this function.
42294 	 */
42295 	#define HWRM_VNIC_ALLOC_INPUT_FLAGS_DEFAULT \
42296 		UINT32_C(0x1)
42297 	/*
42298 	 * When this bit is '1', proxy VEE PF is requesting
42299 	 * allocation of a default VNIC on behalf of virtio-net
42300 	 * function given in virtio_net_fid field.
42301 	 */
42302 	#define HWRM_VNIC_ALLOC_INPUT_FLAGS_VIRTIO_NET_FID_VALID \
42303 		UINT32_C(0x2)
42304 	/*
42305 	 * Virtio-net function's FID.
42306 	 * This virtio-net function is requesting allocation of default
42307 	 * VNIC through proxy VEE PF.
42308 	 */
42309 	uint16_t	virtio_net_fid;
42310 	uint8_t	unused_0[2];
42311 } __rte_packed_end;
42312 
42313 /* hwrm_vnic_alloc_output (size:128b/16B) */
42314 struct __rte_packed_begin hwrm_vnic_alloc_output {
42315 	/* The specific error status for the command. */
42316 	uint16_t	error_code;
42317 	/* The HWRM command request type. */
42318 	uint16_t	req_type;
42319 	/* The sequence ID from the original command. */
42320 	uint16_t	seq_id;
42321 	/* The length of the response data in number of bytes. */
42322 	uint16_t	resp_len;
42323 	/* Logical vnic ID */
42324 	uint32_t	vnic_id;
42325 	uint8_t	unused_0[3];
42326 	/*
42327 	 * This field is used in Output records to indicate that the output
42328 	 * is completely written to RAM. This field should be read as '1'
42329 	 * to indicate that the output has been completely written. When
42330 	 * writing a command completion or response to an internal processor,
42331 	 * the order of writes has to be such that this field is written last.
42332 	 */
42333 	uint8_t	valid;
42334 } __rte_packed_end;
42335 
42336 /********************
42337  * hwrm_vnic_update *
42338  ********************/
42339 
42340 
42341 /* hwrm_vnic_update_input (size:256b/32B) */
42342 struct __rte_packed_begin hwrm_vnic_update_input {
42343 	/* The HWRM command request type. */
42344 	uint16_t	req_type;
42345 	/*
42346 	 * The completion ring to send the completion event on. This should
42347 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42348 	 */
42349 	uint16_t	cmpl_ring;
42350 	/*
42351 	 * The sequence ID is used by the driver for tracking multiple
42352 	 * commands. This ID is treated as opaque data by the firmware and
42353 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42354 	 */
42355 	uint16_t	seq_id;
42356 	/*
42357 	 * The target ID of the command:
42358 	 * * 0x0-0xFFF8 - The function ID
42359 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42360 	 * * 0xFFFD - Reserved for user-space HWRM interface
42361 	 * * 0xFFFF - HWRM
42362 	 */
42363 	uint16_t	target_id;
42364 	/*
42365 	 * A physical address pointer pointing to a host buffer that the
42366 	 * command's response data will be written. This can be either a host
42367 	 * physical address (HPA) or a guest physical address (GPA) and must
42368 	 * point to a physically contiguous block of memory.
42369 	 */
42370 	uint64_t	resp_addr;
42371 	/* Logical vnic ID */
42372 	uint32_t	vnic_id;
42373 	uint32_t	enables;
42374 	/*
42375 	 * This bit must be '1' for the vnic_state field to be
42376 	 * configured.
42377 	 */
42378 	#define HWRM_VNIC_UPDATE_INPUT_ENABLES_VNIC_STATE_VALID \
42379 		UINT32_C(0x1)
42380 	/*
42381 	 * This bit must be '1' for the mru field to be
42382 	 * configured.
42383 	 */
42384 	#define HWRM_VNIC_UPDATE_INPUT_ENABLES_MRU_VALID \
42385 		UINT32_C(0x2)
42386 	/*
42387 	 * This bit must be '1' for the metadata_format_type field to be
42388 	 * configured.
42389 	 */
42390 	#define HWRM_VNIC_UPDATE_INPUT_ENABLES_METADATA_FORMAT_TYPE_VALID \
42391 		UINT32_C(0x4)
42392 	/*
42393 	 * This will update the context variable with the same name if
42394 	 * the corresponding enable is set.
42395 	 */
42396 	uint8_t	vnic_state;
42397 	/* Normal operation state for the VNIC. */
42398 	#define HWRM_VNIC_UPDATE_INPUT_VNIC_STATE_NORMAL UINT32_C(0x0)
42399 	/* All packets are dropped in this state. */
42400 	#define HWRM_VNIC_UPDATE_INPUT_VNIC_STATE_DROP   UINT32_C(0x1)
42401 	#define HWRM_VNIC_UPDATE_INPUT_VNIC_STATE_LAST \
42402 		HWRM_VNIC_UPDATE_INPUT_VNIC_STATE_DROP
42403 	/*
42404 	 * The metadata format type used in all the RX packet completions
42405 	 * going through this VNIC. This value is product specific. Refer to
42406 	 * the L2 HSI completion ring structures for the detailed
42407 	 * descriptions. For Thor and Thor2, it corresponds to 'meta_format'
42408 	 * in 'rx_pkt_cmpl_hi' and 'rx_pkt_v3_cmpl_hi', respectively.
42409 	 */
42410 	uint8_t	metadata_format_type;
42411 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_0 UINT32_C(0x0)
42412 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_1 UINT32_C(0x1)
42413 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_2 UINT32_C(0x2)
42414 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_3 UINT32_C(0x3)
42415 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_4 UINT32_C(0x4)
42416 	#define HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_LAST \
42417 		HWRM_VNIC_UPDATE_INPUT_METADATA_FORMAT_TYPE_4
42418 	/*
42419 	 * The maximum receive unit of the vnic.
42420 	 * Each vnic is associated with a function.
42421 	 * The vnic mru value overwrites the mru setting of the
42422 	 * associated function.
42423 	 * The HWRM shall make sure that vnic mru does not exceed
42424 	 * the mru of the port the function is associated with.
42425 	 */
42426 	uint16_t	mru;
42427 	uint8_t	unused_1[4];
42428 } __rte_packed_end;
42429 
42430 /* hwrm_vnic_update_output (size:128b/16B) */
42431 struct __rte_packed_begin hwrm_vnic_update_output {
42432 	/* The specific error status for the command. */
42433 	uint16_t	error_code;
42434 	/* The HWRM command request type. */
42435 	uint16_t	req_type;
42436 	/* The sequence ID from the original command. */
42437 	uint16_t	seq_id;
42438 	/* The length of the response data in number of bytes. */
42439 	uint16_t	resp_len;
42440 	uint8_t	unused_0[7];
42441 	/*
42442 	 * This field is used in Output records to indicate that the output
42443 	 * is completely written to RAM. This field should be read as '1'
42444 	 * to indicate that the output has been completely written.
42445 	 * When writing a command completion or response to an internal
42446 	 * processor, the order of writes has to be such that this field is
42447 	 * written last.
42448 	 */
42449 	uint8_t	valid;
42450 } __rte_packed_end;
42451 
42452 /******************
42453  * hwrm_vnic_free *
42454  ******************/
42455 
42456 
42457 /* hwrm_vnic_free_input (size:192b/24B) */
42458 struct __rte_packed_begin hwrm_vnic_free_input {
42459 	/* The HWRM command request type. */
42460 	uint16_t	req_type;
42461 	/*
42462 	 * The completion ring to send the completion event on. This should
42463 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42464 	 */
42465 	uint16_t	cmpl_ring;
42466 	/*
42467 	 * The sequence ID is used by the driver for tracking multiple
42468 	 * commands. This ID is treated as opaque data by the firmware and
42469 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42470 	 */
42471 	uint16_t	seq_id;
42472 	/*
42473 	 * The target ID of the command:
42474 	 * * 0x0-0xFFF8 - The function ID
42475 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42476 	 * * 0xFFFD - Reserved for user-space HWRM interface
42477 	 * * 0xFFFF - HWRM
42478 	 */
42479 	uint16_t	target_id;
42480 	/*
42481 	 * A physical address pointer pointing to a host buffer that the
42482 	 * command's response data will be written. This can be either a host
42483 	 * physical address (HPA) or a guest physical address (GPA) and must
42484 	 * point to a physically contiguous block of memory.
42485 	 */
42486 	uint64_t	resp_addr;
42487 	/* Logical vnic ID */
42488 	uint32_t	vnic_id;
42489 	uint8_t	unused_0[4];
42490 } __rte_packed_end;
42491 
42492 /* hwrm_vnic_free_output (size:128b/16B) */
42493 struct __rte_packed_begin hwrm_vnic_free_output {
42494 	/* The specific error status for the command. */
42495 	uint16_t	error_code;
42496 	/* The HWRM command request type. */
42497 	uint16_t	req_type;
42498 	/* The sequence ID from the original command. */
42499 	uint16_t	seq_id;
42500 	/* The length of the response data in number of bytes. */
42501 	uint16_t	resp_len;
42502 	uint8_t	unused_0[7];
42503 	/*
42504 	 * This field is used in Output records to indicate that the output
42505 	 * is completely written to RAM. This field should be read as '1'
42506 	 * to indicate that the output has been completely written. When
42507 	 * writing a command completion or response to an internal processor,
42508 	 * the order of writes has to be such that this field is written last.
42509 	 */
42510 	uint8_t	valid;
42511 } __rte_packed_end;
42512 
42513 /*****************
42514  * hwrm_vnic_cfg *
42515  *****************/
42516 
42517 
42518 /* hwrm_vnic_cfg_input (size:384b/48B) */
42519 struct __rte_packed_begin hwrm_vnic_cfg_input {
42520 	/* The HWRM command request type. */
42521 	uint16_t	req_type;
42522 	/*
42523 	 * The completion ring to send the completion event on. This should
42524 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42525 	 */
42526 	uint16_t	cmpl_ring;
42527 	/*
42528 	 * The sequence ID is used by the driver for tracking multiple
42529 	 * commands. This ID is treated as opaque data by the firmware and
42530 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42531 	 */
42532 	uint16_t	seq_id;
42533 	/*
42534 	 * The target ID of the command:
42535 	 * * 0x0-0xFFF8 - The function ID
42536 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42537 	 * * 0xFFFD - Reserved for user-space HWRM interface
42538 	 * * 0xFFFF - HWRM
42539 	 */
42540 	uint16_t	target_id;
42541 	/*
42542 	 * A physical address pointer pointing to a host buffer that the
42543 	 * command's response data will be written. This can be either a host
42544 	 * physical address (HPA) or a guest physical address (GPA) and must
42545 	 * point to a physically contiguous block of memory.
42546 	 */
42547 	uint64_t	resp_addr;
42548 	uint32_t	flags;
42549 	/*
42550 	 * When this bit is '1', the VNIC is requested to
42551 	 * be the default VNIC for the function.
42552 	 */
42553 	#define HWRM_VNIC_CFG_INPUT_FLAGS_DEFAULT \
42554 		UINT32_C(0x1)
42555 	/*
42556 	 * When this bit is '1', the VNIC is being configured to
42557 	 * strip VLAN in the RX path.
42558 	 * If set to '0', then VLAN stripping is disabled on
42559 	 * this VNIC.
42560 	 */
42561 	#define HWRM_VNIC_CFG_INPUT_FLAGS_VLAN_STRIP_MODE \
42562 		UINT32_C(0x2)
42563 	/*
42564 	 * When this bit is '1', the VNIC is being configured to
42565 	 * buffer receive packets in the hardware until the host
42566 	 * posts new receive buffers.
42567 	 * If set to '0', then bd_stall is being configured to be
42568 	 * disabled on this VNIC.
42569 	 */
42570 	#define HWRM_VNIC_CFG_INPUT_FLAGS_BD_STALL_MODE \
42571 		UINT32_C(0x4)
42572 	/*
42573 	 * When this bit is '1', the VNIC is being configured to
42574 	 * receive both RoCE and non-RoCE traffic.
42575 	 * If set to '0', then this VNIC is not configured to be
42576 	 * operating in dual VNIC mode.
42577 	 */
42578 	#define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_DUAL_VNIC_MODE \
42579 		UINT32_C(0x8)
42580 	/*
42581 	 * When this flag is set to '1', the VNIC is requested to
42582 	 * be configured to receive only RoCE traffic.
42583 	 * If this flag is set to '0', then this flag shall be
42584 	 * ignored by the HWRM.
42585 	 * If roce_dual_vnic_mode flag is set to '1'
42586 	 * or roce_mirroring_capable_vnic_mode flag to 1,
42587 	 * then the HWRM client shall not set this flag to '1'.
42588 	 */
42589 	#define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_ONLY_VNIC_MODE \
42590 		UINT32_C(0x10)
42591 	/*
42592 	 * When a VNIC uses one destination ring group for certain
42593 	 * application (e.g. Receive Flow Steering) where
42594 	 * exact match is used to direct packets to a VNIC with one
42595 	 * destination ring group only, there is no need to configure
42596 	 * RSS indirection table for that VNIC as only one destination
42597 	 * ring group is used.
42598 	 *
42599 	 * This flag is used to enable a mode where
42600 	 * RSS is enabled in the VNIC using a RSS context
42601 	 * for computing RSS hash but the RSS indirection table is
42602 	 * not configured using hwrm_vnic_rss_cfg.
42603 	 *
42604 	 * If this mode is enabled, then the driver should not program
42605 	 * RSS indirection table for the RSS context that is used for
42606 	 * computing RSS hash only.
42607 	 */
42608 	#define HWRM_VNIC_CFG_INPUT_FLAGS_RSS_DFLT_CR_MODE \
42609 		UINT32_C(0x20)
42610 	/*
42611 	 * When this bit is '1', the VNIC is being configured to
42612 	 * receive both RoCE and non-RoCE traffic, but forward only the
42613 	 * RoCE traffic further. Also, RoCE traffic can be mirrored to
42614 	 * L2 driver.
42615 	 */
42616 	#define HWRM_VNIC_CFG_INPUT_FLAGS_ROCE_MIRRORING_CAPABLE_VNIC_MODE \
42617 		UINT32_C(0x40)
42618 	/*
42619 	 * When this bit is '1' it enables ring selection using the incoming
42620 	 * spif and lcos for the packet.
42621 	 */
42622 	#define HWRM_VNIC_CFG_INPUT_FLAGS_PORTCOS_MAPPING_MODE \
42623 		UINT32_C(0x80)
42624 	uint32_t	enables;
42625 	/*
42626 	 * This bit must be '1' for the dflt_ring_grp field to be
42627 	 * configured.
42628 	 */
42629 	#define HWRM_VNIC_CFG_INPUT_ENABLES_DFLT_RING_GRP \
42630 		UINT32_C(0x1)
42631 	/*
42632 	 * This bit must be '1' for the rss_rule field to be
42633 	 * configured.
42634 	 */
42635 	#define HWRM_VNIC_CFG_INPUT_ENABLES_RSS_RULE \
42636 		UINT32_C(0x2)
42637 	/*
42638 	 * This bit must be '1' for the cos_rule field to be
42639 	 * configured.
42640 	 */
42641 	#define HWRM_VNIC_CFG_INPUT_ENABLES_COS_RULE \
42642 		UINT32_C(0x4)
42643 	/*
42644 	 * This bit must be '1' for the lb_rule field to be
42645 	 * configured.
42646 	 */
42647 	#define HWRM_VNIC_CFG_INPUT_ENABLES_LB_RULE \
42648 		UINT32_C(0x8)
42649 	/*
42650 	 * This bit must be '1' for the mru field to be
42651 	 * configured.
42652 	 */
42653 	#define HWRM_VNIC_CFG_INPUT_ENABLES_MRU \
42654 		UINT32_C(0x10)
42655 	/*
42656 	 * This bit must be '1' for the default_rx_ring_id field to be
42657 	 * configured.
42658 	 */
42659 	#define HWRM_VNIC_CFG_INPUT_ENABLES_DEFAULT_RX_RING_ID \
42660 		UINT32_C(0x20)
42661 	/*
42662 	 * This bit must be '1' for the default_cmpl_ring_id field to be
42663 	 * configured.
42664 	 */
42665 	#define HWRM_VNIC_CFG_INPUT_ENABLES_DEFAULT_CMPL_RING_ID \
42666 		UINT32_C(0x40)
42667 	/* This bit must be '1' for the queue_id field to be configured. */
42668 	#define HWRM_VNIC_CFG_INPUT_ENABLES_QUEUE_ID \
42669 		UINT32_C(0x80)
42670 	/*
42671 	 * This bit must be '1' for the rx_csum_v2_mode field to be
42672 	 * configured.
42673 	 */
42674 	#define HWRM_VNIC_CFG_INPUT_ENABLES_RX_CSUM_V2_MODE \
42675 		UINT32_C(0x100)
42676 	/* This bit must be '1' for the l2_cqe_mode field to be configured. */
42677 	#define HWRM_VNIC_CFG_INPUT_ENABLES_L2_CQE_MODE \
42678 		UINT32_C(0x200)
42679 	/* Logical vnic ID */
42680 	uint16_t	vnic_id;
42681 	/*
42682 	 * Default Completion ring for the VNIC. This ring will
42683 	 * be chosen if packet does not match any RSS rules and if
42684 	 * there is no COS rule.
42685 	 */
42686 	uint16_t	dflt_ring_grp;
42687 	/*
42688 	 * RSS ID for RSS rule/table structure. 0xFF... (All Fs) if
42689 	 * there is no RSS rule.
42690 	 */
42691 	uint16_t	rss_rule;
42692 	/*
42693 	 * RSS ID for COS rule/table structure. 0xFF... (All Fs) if
42694 	 * there is no COS rule.
42695 	 */
42696 	uint16_t	cos_rule;
42697 	/*
42698 	 * RSS ID for load balancing rule/table structure.
42699 	 * 0xFF... (All Fs) if there is no LB rule.
42700 	 */
42701 	uint16_t	lb_rule;
42702 	/*
42703 	 * The maximum receive unit of the vnic.
42704 	 * Each vnic is associated with a function.
42705 	 * The vnic mru value overwrites the mru setting of the
42706 	 * associated function.
42707 	 * The HWRM shall make sure that vnic mru does not exceed
42708 	 * the mru of the port the function is associated with.
42709 	 */
42710 	uint16_t	mru;
42711 	/*
42712 	 * Default Rx ring for the VNIC. This ring will
42713 	 * be chosen if packet does not match any RSS rules.
42714 	 * The aggregation ring associated with the Rx ring is
42715 	 * implied based on the Rx ring specified when the
42716 	 * aggregation ring was allocated.
42717 	 */
42718 	uint16_t	default_rx_ring_id;
42719 	/*
42720 	 * Default completion ring for the VNIC. This ring will
42721 	 * be chosen if packet does not match any RSS rules.
42722 	 */
42723 	uint16_t	default_cmpl_ring_id;
42724 	/*
42725 	 * When specified, only incoming packets classified to the specified
42726 	 * CoS queue ID will be arriving on this VNIC. Packet priority to CoS
42727 	 * mapping rules can be specified using HWRM_QUEUE_PRI2COS_CFG. In this
42728 	 * mode, ntuple filters with VNIC destination specified are invalid
42729 	 * since they conflict with the CoS to VNIC steering rules in this
42730 	 * mode.
42731 	 *
42732 	 * If this field is not specified, packet to VNIC steering will be
42733 	 * subject to the standard L2 filter rules and any additional ntuple
42734 	 * filter rules with destination VNIC specified.
42735 	 */
42736 	uint16_t	queue_id;
42737 	/*
42738 	 * If the device supports the RX V2 and RX TPA start V2 completion
42739 	 * records as indicated by the HWRM_VNIC_QCAPS command, this field is
42740 	 * used to specify the two RX checksum modes supported by these
42741 	 * completion records.
42742 	 */
42743 	uint8_t	rx_csum_v2_mode;
42744 	/*
42745 	 * When configured with this checksum mode, the number of header
42746 	 * groups in the delivered packet with a valid IP checksum and
42747 	 * the number of header groups in the delivered packet with a valid
42748 	 * L4 checksum are reported. Valid checksums are counted from the
42749 	 * outermost header group to the innermost header group, stopping at
42750 	 * the first error. This is the default checksum mode supported if
42751 	 * the driver doesn't explicitly configure the RX checksum mode.
42752 	 */
42753 	#define HWRM_VNIC_CFG_INPUT_RX_CSUM_V2_MODE_DEFAULT UINT32_C(0x0)
42754 	/*
42755 	 * When configured with this checksum mode, the checksum status is
42756 	 * reported using 'all ok' mode. In the RX completion record, one
42757 	 * bit indicates if the IP checksum is valid for all the parsed
42758 	 * header groups with an IP checksum. Another bit indicates if the
42759 	 * L4 checksum is valid for all the parsed header groups with an L4
42760 	 * checksum. The number of header groups that were parsed by the
42761 	 * chip and passed in the delivered packet is also reported.
42762 	 */
42763 	#define HWRM_VNIC_CFG_INPUT_RX_CSUM_V2_MODE_ALL_OK  UINT32_C(0x1)
42764 	/*
42765 	 * Any rx_csum_v2_mode value larger than or equal to this is not
42766 	 * valid
42767 	 */
42768 	#define HWRM_VNIC_CFG_INPUT_RX_CSUM_V2_MODE_MAX     UINT32_C(0x2)
42769 	#define HWRM_VNIC_CFG_INPUT_RX_CSUM_V2_MODE_LAST \
42770 		HWRM_VNIC_CFG_INPUT_RX_CSUM_V2_MODE_MAX
42771 	/*
42772 	 * If the device supports different L2 RX CQE modes, as indicated by
42773 	 * the HWRM_VNIC_QCAPS command, this field is used to configure the
42774 	 * CQE mode.
42775 	 */
42776 	uint8_t	l2_cqe_mode;
42777 	/*
42778 	 * When configured with this cqe mode, A normal (32B) CQE
42779 	 * will be generated. This is the default mode.
42780 	 */
42781 	#define HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_DEFAULT    UINT32_C(0x0)
42782 	/*
42783 	 * When configured with this cqe mode, A compressed (16B) CQE
42784 	 * will be generated. In this mode TPA and HDS are not supported.
42785 	 * Host drivers should not configure the TPA and HDS along with
42786 	 * compressed mode, per VNIC. FW returns error, if host drivers
42787 	 * try to configure the VNIC with compressed mode and (TPA or HDS).
42788 	 * The compressed completion does not include PTP data. Host
42789 	 * drivers should not use this mode to receive the PTP data.
42790 	 */
42791 	#define HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_COMPRESSED UINT32_C(0x1)
42792 	/*
42793 	 * When configured with this cqe mode, HW generates either a 32B
42794 	 * completion or a 16B completion depending on use case within a
42795 	 * VNIC. For ex. a simple L2 packet could use the compressed form
42796 	 * while a PTP packet on the same VNIC would use the 32B form.
42797 	 */
42798 	#define HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_MIXED      UINT32_C(0x2)
42799 	#define HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_LAST \
42800 		HWRM_VNIC_CFG_INPUT_L2_CQE_MODE_MIXED
42801 	uint8_t	unused0[4];
42802 } __rte_packed_end;
42803 
42804 /* hwrm_vnic_cfg_output (size:128b/16B) */
42805 struct __rte_packed_begin hwrm_vnic_cfg_output {
42806 	/* The specific error status for the command. */
42807 	uint16_t	error_code;
42808 	/* The HWRM command request type. */
42809 	uint16_t	req_type;
42810 	/* The sequence ID from the original command. */
42811 	uint16_t	seq_id;
42812 	/* The length of the response data in number of bytes. */
42813 	uint16_t	resp_len;
42814 	uint8_t	unused_0[7];
42815 	/*
42816 	 * This field is used in Output records to indicate that the output
42817 	 * is completely written to RAM. This field should be read as '1'
42818 	 * to indicate that the output has been completely written. When
42819 	 * writing a command completion or response to an internal processor,
42820 	 * the order of writes has to be such that this field is written last.
42821 	 */
42822 	uint8_t	valid;
42823 } __rte_packed_end;
42824 
42825 /******************
42826  * hwrm_vnic_qcfg *
42827  ******************/
42828 
42829 
42830 /* hwrm_vnic_qcfg_input (size:256b/32B) */
42831 struct __rte_packed_begin hwrm_vnic_qcfg_input {
42832 	/* The HWRM command request type. */
42833 	uint16_t	req_type;
42834 	/*
42835 	 * The completion ring to send the completion event on. This should
42836 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
42837 	 */
42838 	uint16_t	cmpl_ring;
42839 	/*
42840 	 * The sequence ID is used by the driver for tracking multiple
42841 	 * commands. This ID is treated as opaque data by the firmware and
42842 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
42843 	 */
42844 	uint16_t	seq_id;
42845 	/*
42846 	 * The target ID of the command:
42847 	 * * 0x0-0xFFF8 - The function ID
42848 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
42849 	 * * 0xFFFD - Reserved for user-space HWRM interface
42850 	 * * 0xFFFF - HWRM
42851 	 */
42852 	uint16_t	target_id;
42853 	/*
42854 	 * A physical address pointer pointing to a host buffer that the
42855 	 * command's response data will be written. This can be either a host
42856 	 * physical address (HPA) or a guest physical address (GPA) and must
42857 	 * point to a physically contiguous block of memory.
42858 	 */
42859 	uint64_t	resp_addr;
42860 	uint32_t	enables;
42861 	/*
42862 	 * This bit must be '1' for the vf_id_valid field to be
42863 	 * configured.
42864 	 */
42865 	#define HWRM_VNIC_QCFG_INPUT_ENABLES_VF_ID_VALID     UINT32_C(0x1)
42866 	/* Logical vnic ID */
42867 	uint32_t	vnic_id;
42868 	/* ID of Virtual Function whose VNIC resource is being queried. */
42869 	uint16_t	vf_id;
42870 	uint8_t	unused_0[6];
42871 } __rte_packed_end;
42872 
42873 /* hwrm_vnic_qcfg_output (size:256b/32B) */
42874 struct __rte_packed_begin hwrm_vnic_qcfg_output {
42875 	/* The specific error status for the command. */
42876 	uint16_t	error_code;
42877 	/* The HWRM command request type. */
42878 	uint16_t	req_type;
42879 	/* The sequence ID from the original command. */
42880 	uint16_t	seq_id;
42881 	/* The length of the response data in number of bytes. */
42882 	uint16_t	resp_len;
42883 	/* Default Completion ring for the VNIC. */
42884 	uint16_t	dflt_ring_grp;
42885 	/*
42886 	 * RSS ID for RSS rule/table structure. 0xFF... (All Fs) if
42887 	 * there is no RSS rule.
42888 	 */
42889 	uint16_t	rss_rule;
42890 	/*
42891 	 * RSS ID for COS rule/table structure. 0xFF... (All Fs) if
42892 	 * there is no COS rule.
42893 	 */
42894 	uint16_t	cos_rule;
42895 	/*
42896 	 * RSS ID for load balancing rule/table structure.
42897 	 * 0xFF... (All Fs) if there is no LB rule.
42898 	 */
42899 	uint16_t	lb_rule;
42900 	/* The maximum receive unit of the vnic. */
42901 	uint16_t	mru;
42902 	uint8_t	unused_0[2];
42903 	uint32_t	flags;
42904 	/*
42905 	 * When this bit is '1', the VNIC is the default VNIC for
42906 	 * the function.
42907 	 */
42908 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_DEFAULT \
42909 		UINT32_C(0x1)
42910 	/*
42911 	 * When this bit is '1', the VNIC is configured to
42912 	 * strip VLAN in the RX path.
42913 	 * If set to '0', then VLAN stripping is disabled on
42914 	 * this VNIC.
42915 	 */
42916 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_VLAN_STRIP_MODE \
42917 		UINT32_C(0x2)
42918 	/*
42919 	 * When this bit is '1', the VNIC is configured to
42920 	 * buffer receive packets in the hardware until the host
42921 	 * posts new receive buffers.
42922 	 * If set to '0', then bd_stall is disabled on
42923 	 * this VNIC.
42924 	 */
42925 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_BD_STALL_MODE \
42926 		UINT32_C(0x4)
42927 	/*
42928 	 * When this bit is '1', the VNIC is configured to
42929 	 * receive both RoCE and non-RoCE traffic.
42930 	 * If set to '0', then this VNIC is not configured to
42931 	 * operate in dual VNIC mode.
42932 	 */
42933 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_DUAL_VNIC_MODE \
42934 		UINT32_C(0x8)
42935 	/*
42936 	 * When this flag is set to '1', the VNIC is configured to
42937 	 * receive only RoCE traffic.
42938 	 * When this flag is set to '0', the VNIC is not configured
42939 	 * to receive only RoCE traffic.
42940 	 * If roce_dual_vnic_mode flag and this flag both are set
42941 	 * to '1', then it is an invalid configuration of the
42942 	 * VNIC. The HWRM should not allow that type of
42943 	 * mis-configuration by HWRM clients.
42944 	 */
42945 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_ONLY_VNIC_MODE \
42946 		UINT32_C(0x10)
42947 	/*
42948 	 * When a VNIC uses one destination ring group for certain
42949 	 * application (e.g. Receive Flow Steering) where
42950 	 * exact match is used to direct packets to a VNIC with one
42951 	 * destination ring group only, there is no need to configure
42952 	 * RSS indirection table for that VNIC as only one destination
42953 	 * ring group is used.
42954 	 *
42955 	 * When this bit is set to '1', then the VNIC is enabled in a
42956 	 * mode where RSS is enabled in the VNIC using a RSS context
42957 	 * for computing RSS hash but the RSS indirection table is
42958 	 * not configured.
42959 	 */
42960 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_RSS_DFLT_CR_MODE \
42961 		UINT32_C(0x20)
42962 	/*
42963 	 * When this bit is '1', the VNIC is configured to
42964 	 * receive both RoCE and non-RoCE traffic, but forward only
42965 	 * RoCE traffic further. Also RoCE traffic can be mirrored to
42966 	 * L2 driver.
42967 	 */
42968 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_ROCE_MIRRORING_CAPABLE_VNIC_MODE \
42969 		UINT32_C(0x40)
42970 	/*
42971 	 * When this bit is '0', VNIC is in normal operation state.
42972 	 * When this bit is '1', VNIC drops all the received packets.
42973 	 */
42974 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_OPERATION_STATE \
42975 		UINT32_C(0x80)
42976 	/* When this bit is '1' it indicates port cos_mapping_mode enabled. */
42977 	#define HWRM_VNIC_QCFG_OUTPUT_FLAGS_PORTCOS_MAPPING_MODE \
42978 		UINT32_C(0x100)
42979 	/*
42980 	 * When returned with a valid CoS Queue id, the CoS Queue/VNIC
42981 	 * association is valid. Otherwise it will return 0xFFFF to indicate no
42982 	 * VNIC/CoS queue association.
42983 	 */
42984 	uint16_t	queue_id;
42985 	/*
42986 	 * If the device supports the RX V2 and RX TPA start V2 completion
42987 	 * records as indicated by the HWRM_VNIC_QCAPS command, this field is
42988 	 * used to specify the current RX checksum mode configured for all the
42989 	 * RX rings of a VNIC.
42990 	 */
42991 	uint8_t	rx_csum_v2_mode;
42992 	/*
42993 	 * This value indicates that the VNIC is configured to use the
42994 	 * default RX checksum mode for all the rings associated with this
42995 	 * VNIC.
42996 	 */
42997 	#define HWRM_VNIC_QCFG_OUTPUT_RX_CSUM_V2_MODE_DEFAULT UINT32_C(0x0)
42998 	/*
42999 	 * This value indicates that the VNIC is configured to use the RX
43000 	 * checksum 'all_ok' mode for all the rings associated with this
43001 	 * VNIC.
43002 	 */
43003 	#define HWRM_VNIC_QCFG_OUTPUT_RX_CSUM_V2_MODE_ALL_OK  UINT32_C(0x1)
43004 	/*
43005 	 * Any rx_csum_v2_mode value larger than or equal to this is not
43006 	 * valid
43007 	 */
43008 	#define HWRM_VNIC_QCFG_OUTPUT_RX_CSUM_V2_MODE_MAX     UINT32_C(0x2)
43009 	#define HWRM_VNIC_QCFG_OUTPUT_RX_CSUM_V2_MODE_LAST \
43010 		HWRM_VNIC_QCFG_OUTPUT_RX_CSUM_V2_MODE_MAX
43011 	/*
43012 	 * If the device supports different L2 RX CQE modes, as indicated by
43013 	 * the HWRM_VNIC_QCAPS command, this field is used to convey the
43014 	 * configured CQE mode.
43015 	 */
43016 	uint8_t	l2_cqe_mode;
43017 	/*
43018 	 * This value indicates that the VNIC is configured with normal
43019 	 * (32B) CQE mode.
43020 	 */
43021 	#define HWRM_VNIC_QCFG_OUTPUT_L2_CQE_MODE_DEFAULT    UINT32_C(0x0)
43022 	/*
43023 	 * This value indicates that the VNIC is configured with compressed
43024 	 * (16B) CQE mode.
43025 	 */
43026 	#define HWRM_VNIC_QCFG_OUTPUT_L2_CQE_MODE_COMPRESSED UINT32_C(0x1)
43027 	/*
43028 	 * This value indicates that the VNIC is configured with mixed
43029 	 * CQE mode. HW generates either a 32B completion or a 16B
43030 	 * completion depending on use case within a VNIC.
43031 	 */
43032 	#define HWRM_VNIC_QCFG_OUTPUT_L2_CQE_MODE_MIXED      UINT32_C(0x2)
43033 	#define HWRM_VNIC_QCFG_OUTPUT_L2_CQE_MODE_LAST \
43034 		HWRM_VNIC_QCFG_OUTPUT_L2_CQE_MODE_MIXED
43035 	/*
43036 	 * This field conveys the metadata format type that has been
43037 	 * configured. This value is product specific. Refer to the L2 HSI
43038 	 * completion ring structures for the detailed descriptions. For Thor
43039 	 * and Thor2, it corresponds to 'meta_format' in 'rx_pkt_cmpl_hi' and
43040 	 * 'rx_pkt_v3_cmpl_hi', respectively.
43041 	 */
43042 	uint8_t	metadata_format_type;
43043 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_0 UINT32_C(0x0)
43044 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_1 UINT32_C(0x1)
43045 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_2 UINT32_C(0x2)
43046 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_3 UINT32_C(0x3)
43047 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_4 UINT32_C(0x4)
43048 	#define HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_LAST \
43049 		HWRM_VNIC_QCFG_OUTPUT_METADATA_FORMAT_TYPE_4
43050 	/* This field conveys the VNIC operation state. */
43051 	uint8_t	vnic_state;
43052 	/* Normal operation state. */
43053 	#define HWRM_VNIC_QCFG_OUTPUT_VNIC_STATE_NORMAL UINT32_C(0x0)
43054 	/* Drop all packets. */
43055 	#define HWRM_VNIC_QCFG_OUTPUT_VNIC_STATE_DROP   UINT32_C(0x1)
43056 	#define HWRM_VNIC_QCFG_OUTPUT_VNIC_STATE_LAST \
43057 		HWRM_VNIC_QCFG_OUTPUT_VNIC_STATE_DROP
43058 	uint8_t	unused_1;
43059 	/*
43060 	 * This field is used in Output records to indicate that the output
43061 	 * is completely written to RAM. This field should be read as '1'
43062 	 * to indicate that the output has been completely written. When
43063 	 * writing a command completion or response to an internal processor,
43064 	 * the order of writes has to be such that this field is written last.
43065 	 */
43066 	uint8_t	valid;
43067 } __rte_packed_end;
43068 
43069 /*******************
43070  * hwrm_vnic_qcaps *
43071  *******************/
43072 
43073 
43074 /* hwrm_vnic_qcaps_input (size:192b/24B) */
43075 struct __rte_packed_begin hwrm_vnic_qcaps_input {
43076 	/* The HWRM command request type. */
43077 	uint16_t	req_type;
43078 	/*
43079 	 * The completion ring to send the completion event on. This should
43080 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
43081 	 */
43082 	uint16_t	cmpl_ring;
43083 	/*
43084 	 * The sequence ID is used by the driver for tracking multiple
43085 	 * commands. This ID is treated as opaque data by the firmware and
43086 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
43087 	 */
43088 	uint16_t	seq_id;
43089 	/*
43090 	 * The target ID of the command:
43091 	 * * 0x0-0xFFF8 - The function ID
43092 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
43093 	 * * 0xFFFD - Reserved for user-space HWRM interface
43094 	 * * 0xFFFF - HWRM
43095 	 */
43096 	uint16_t	target_id;
43097 	/*
43098 	 * A physical address pointer pointing to a host buffer that the
43099 	 * command's response data will be written. This can be either a host
43100 	 * physical address (HPA) or a guest physical address (GPA) and must
43101 	 * point to a physically contiguous block of memory.
43102 	 */
43103 	uint64_t	resp_addr;
43104 	uint32_t	enables;
43105 	uint8_t	unused_0[4];
43106 } __rte_packed_end;
43107 
43108 /* hwrm_vnic_qcaps_output (size:192b/24B) */
43109 struct __rte_packed_begin hwrm_vnic_qcaps_output {
43110 	/* The specific error status for the command. */
43111 	uint16_t	error_code;
43112 	/* The HWRM command request type. */
43113 	uint16_t	req_type;
43114 	/* The sequence ID from the original command. */
43115 	uint16_t	seq_id;
43116 	/* The length of the response data in number of bytes. */
43117 	uint16_t	resp_len;
43118 	/* The maximum receive unit that is settable on a vnic. */
43119 	uint16_t	mru;
43120 	uint8_t	unused_0[2];
43121 	uint32_t	flags;
43122 	/* Unused. */
43123 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_UNUSED \
43124 		UINT32_C(0x1)
43125 	/*
43126 	 * When this bit is '1', the capability of stripping VLAN in
43127 	 * the RX path is supported on VNIC(s).
43128 	 * If set to '0', then VLAN stripping capability is
43129 	 * not supported on VNIC(s).
43130 	 */
43131 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VLAN_STRIP_CAP \
43132 		UINT32_C(0x2)
43133 	/*
43134 	 * When this bit is '1', the capability to buffer receive
43135 	 * packets in the hardware until the host posts new receive buffers
43136 	 * is supported on VNIC(s).
43137 	 * If set to '0', then bd_stall capability is not supported
43138 	 * on VNIC(s).
43139 	 */
43140 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_BD_STALL_CAP \
43141 		UINT32_C(0x4)
43142 	/*
43143 	 * When this bit is '1', the capability to
43144 	 * receive both RoCE and non-RoCE traffic on VNIC(s) is
43145 	 * supported.
43146 	 * If set to '0', then the capability to receive
43147 	 * both RoCE and non-RoCE traffic on VNIC(s) is
43148 	 * not supported.
43149 	 */
43150 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_ROCE_DUAL_VNIC_CAP \
43151 		UINT32_C(0x8)
43152 	/*
43153 	 * When this bit is set to '1', the capability to configure
43154 	 * a VNIC to receive only RoCE traffic is supported.
43155 	 * When this flag is set to '0', the VNIC capability to
43156 	 * configure to receive only RoCE traffic is not supported.
43157 	 */
43158 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_ROCE_ONLY_VNIC_CAP \
43159 		UINT32_C(0x10)
43160 	/*
43161 	 * When this bit is set to '1', then the capability to enable
43162 	 * a VNIC in a mode where RSS context without configuring
43163 	 * RSS indirection table is supported (for RSS hash computation).
43164 	 * When this bit is set to '0', then a VNIC can not be configured
43165 	 * with a mode to enable RSS context without configuring RSS
43166 	 * indirection table.
43167 	 */
43168 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_DFLT_CR_CAP \
43169 		UINT32_C(0x20)
43170 	/*
43171 	 * When this bit is '1', the capability to
43172 	 * mirror the RoCE traffic is supported.
43173 	 * If set to '0', then the capability to mirror the
43174 	 * RoCE traffic is not supported.
43175 	 */
43176 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_ROCE_MIRRORING_CAPABLE_VNIC_CAP \
43177 		UINT32_C(0x40)
43178 	/*
43179 	 * When this bit is '1', the outermost RSS hashing capability
43180 	 * is supported. If set to '0', then the outermost RSS hashing
43181 	 * capability is not supported.
43182 	 */
43183 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_CAP \
43184 		UINT32_C(0x80)
43185 	/*
43186 	 * When this bit is '1', it indicates that firmware supports the
43187 	 * ability to steer incoming packets from one CoS queue to one
43188 	 * VNIC. This optional feature can then be enabled
43189 	 * using HWRM_VNIC_CFG on any VNIC. This feature is only
43190 	 * available when NVM option 'enable_cos_classification' is set
43191 	 * to 1. If set to '0', firmware does not support this feature.
43192 	 */
43193 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_COS_ASSIGNMENT_CAP \
43194 		UINT32_C(0x100)
43195 	/*
43196 	 * When this bit is '1', it indicates that HW and firmware supports
43197 	 * the use of RX V2 and RX TPA start V2 completion records for all
43198 	 * the RX rings of a VNIC. Once set, this feature is mandatory to
43199 	 * be used for the RX rings of the VNIC. Additionally, two new RX
43200 	 * checksum features supported by these completion records can be
43201 	 * configured using the HWRM_VNIC_CFG on a VNIC. If set to '0', the
43202 	 * HW and the firmware does not support this feature.
43203 	 */
43204 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V2_CAP \
43205 		UINT32_C(0x200)
43206 	/*
43207 	 * When this bit is '1', it indicates that HW and firmware support
43208 	 * vnic state change. Host drivers can change the vnic state using
43209 	 * HWRM_VNIC_UPDATE. If set to '0', the HW and firmware do not
43210 	 * support this feature.
43211 	 */
43212 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VNIC_STATE_CAP \
43213 		UINT32_C(0x400)
43214 	/*
43215 	 * When this bit is '1', it indicates that firmware supports
43216 	 * virtio-net functions default VNIC allocation using
43217 	 * HWRM_VNIC_ALLOC.
43218 	 * This capability is available only on Proxy VEE PF. If set to '0',
43219 	 * firmware does not support this feature.
43220 	 */
43221 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VIRTIO_NET_VNIC_ALLOC_CAP \
43222 		UINT32_C(0x800)
43223 	/*
43224 	 * When this bit is set '1', then the capability to configure the
43225 	 * metadata format in the RX completion is supported for the VNIC.
43226 	 * When this bit is set to '0', then the capability to configure
43227 	 * the metadata format in the RX completion is not supported for
43228 	 * the VNIC.
43229 	 */
43230 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_METADATA_FORMAT_CAP \
43231 		UINT32_C(0x1000)
43232 	/*
43233 	 * When this bit is set '1', it indicates that firmware returns
43234 	 * INVALID_PARAM error, if host drivers choose invalid hash type
43235 	 * bit combinations in vnic_rss_cfg.
43236 	 */
43237 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_STRICT_HASH_TYPE_CAP \
43238 		UINT32_C(0x2000)
43239 	/*
43240 	 * When this bit is set '1', it indicates that firmware supports
43241 	 * the hash_type include and exclude flags in hwrm_vnic_rss_cfg.
43242 	 */
43243 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_HASH_TYPE_DELTA_CAP \
43244 		UINT32_C(0x4000)
43245 	/*
43246 	 * When this bit is '1', it indicates that HW is capable of using
43247 	 * Toeplitz algorithm. This mode uses Toeplitz algorithm and
43248 	 * provided Toeplitz hash key to hash the packets according to the
43249 	 * configured hash type and hash mode. The Toeplitz hash results and
43250 	 * the provided Toeplitz RSS indirection table are used to determine
43251 	 * the RSS rings.
43252 	 */
43253 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RING_SELECT_MODE_TOEPLITZ_CAP \
43254 		UINT32_C(0x8000)
43255 	/*
43256 	 * When this bit is '1', it indicates that HW is capable of using
43257 	 * XOR algorithm. This mode uses 'XOR' algorithm to hash the packets
43258 	 * according to the configured hash type and hash mode. The XOR
43259 	 * hash results and the provided XOR RSS indirection table are
43260 	 * used to determine the RSS rings. Host drivers provided hash key
43261 	 * is not honored in this mode.
43262 	 */
43263 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RING_SELECT_MODE_XOR_CAP \
43264 		UINT32_C(0x10000)
43265 	/*
43266 	 * When this bit is '1', it indicates that HW is capable of using
43267 	 * checksum algorithm. In this mode, HW uses inner packets checksum
43268 	 * algorithm to distribute the packets across the rings and Toeplitz
43269 	 * algorithm to calculate the hash to convey it in the RX
43270 	 * completions. Host drivers should provide Toeplitz hash key.
43271 	 * As HW uses innermost packets checksum to distribute the packets
43272 	 * across the rings, host drivers can't convey hash mode to choose
43273 	 * outer headers to calculate Toeplitz hash. FW will fail such
43274 	 * configuration.
43275 	 */
43276 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RING_SELECT_MODE_TOEPLITZ_CHKSM_CAP \
43277 		UINT32_C(0x20000)
43278 	/*
43279 	 * When this bit is '1' HW supports hash calculation
43280 	 * based on IPV6 flow labels.
43281 	 */
43282 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPV6_FLOW_LABEL_CAP \
43283 		UINT32_C(0x40000)
43284 	/*
43285 	 * When this bit is '1', it indicates that HW and firmware supports
43286 	 * the use of RX V3 and RX TPA start V3 completion records for all
43287 	 * the RX rings of a VNIC. Once set, this feature is mandatory to
43288 	 * be used for the RX rings of the VNIC. If set to '0', the
43289 	 * HW and the firmware does not support this feature.
43290 	 */
43291 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RX_CMPL_V3_CAP \
43292 		UINT32_C(0x80000)
43293 	/*
43294 	 * When this bit is '1' HW supports different RX CQE record types.
43295 	 * Host drivers can choose the mode based on their application
43296 	 * requirements like performance, TPA, HDS and PTP.
43297 	 */
43298 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_L2_CQE_MODE_CAP \
43299 		UINT32_C(0x100000)
43300 	/*
43301 	 * When this bit is '1' HW supports hash calculation
43302 	 * based on IPv4 IPSEC AH SPI field.
43303 	 */
43304 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPSEC_AH_SPI_IPV4_CAP \
43305 		UINT32_C(0x200000)
43306 	/*
43307 	 * When this bit is '1' HW supports hash calculation
43308 	 * based on IPv4 IPSEC ESP SPI field.
43309 	 */
43310 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPSEC_ESP_SPI_IPV4_CAP \
43311 		UINT32_C(0x400000)
43312 	/*
43313 	 * When this bit is '1' HW supports hash calculation
43314 	 * based on IPv6 IPSEC AH SPI field.
43315 	 */
43316 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPSEC_AH_SPI_IPV6_CAP \
43317 		UINT32_C(0x800000)
43318 	/*
43319 	 * When this bit is '1' HW supports hash calculation
43320 	 * based on IPv6 IPSEC ESP SPI field.
43321 	 */
43322 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_IPSEC_ESP_SPI_IPV6_CAP \
43323 		UINT32_C(0x1000000)
43324 	/*
43325 	 * When outermost_rss_cap is '1' and this bit is '1', the outermost
43326 	 * RSS hash mode may be set on a PF or trusted VF.
43327 	 * When outermost_rss_cap is '1' and this bit is '0', the outermost
43328 	 * RSS hash mode may be set on a PF.
43329 	 */
43330 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_OUTERMOST_RSS_TRUSTED_VF_CAP \
43331 		UINT32_C(0x2000000)
43332 	/*
43333 	 * When this bit is '1' it indicates HW is capable of enabling ring
43334 	 * selection using the incoming spif and lcos for the packet.
43335 	 */
43336 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_PORTCOS_MAPPING_MODE \
43337 		UINT32_C(0x4000000)
43338 	/*
43339 	 * When this bit is '1', it indicates controller enabled
43340 	 * RSS profile TCAM mode.
43341 	 */
43342 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_RSS_PROF_TCAM_MODE_ENABLED \
43343 		UINT32_C(0x8000000)
43344 	/* When this bit is '1' FW supports VNIC hash mode. */
43345 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_VNIC_RSS_HASH_MODE_CAP \
43346 		UINT32_C(0x10000000)
43347 	/* When this bit is set to '1', hardware supports tunnel TPA. */
43348 	#define HWRM_VNIC_QCAPS_OUTPUT_FLAGS_HW_TUNNEL_TPA_CAP \
43349 		UINT32_C(0x20000000)
43350 	/*
43351 	 * This field advertises the maximum concurrent TPA aggregations
43352 	 * supported by the VNIC on new devices that support TPA v2 or v3.
43353 	 * '0' means that both the TPA v2 and v3 are not supported.
43354 	 */
43355 	uint16_t	max_aggs_supported;
43356 	uint8_t	unused_1[5];
43357 	/*
43358 	 * This field is used in Output records to indicate that the output
43359 	 * is completely written to RAM. This field should be read as '1'
43360 	 * to indicate that the output has been completely written. When
43361 	 * writing a command completion or response to an internal processor,
43362 	 * the order of writes has to be such that this field is written last.
43363 	 */
43364 	uint8_t	valid;
43365 } __rte_packed_end;
43366 
43367 /*********************
43368  * hwrm_vnic_tpa_cfg *
43369  *********************/
43370 
43371 
43372 /* hwrm_vnic_tpa_cfg_input (size:384b/48B) */
43373 struct __rte_packed_begin hwrm_vnic_tpa_cfg_input {
43374 	/* The HWRM command request type. */
43375 	uint16_t	req_type;
43376 	/*
43377 	 * The completion ring to send the completion event on. This should
43378 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
43379 	 */
43380 	uint16_t	cmpl_ring;
43381 	/*
43382 	 * The sequence ID is used by the driver for tracking multiple
43383 	 * commands. This ID is treated as opaque data by the firmware and
43384 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
43385 	 */
43386 	uint16_t	seq_id;
43387 	/*
43388 	 * The target ID of the command:
43389 	 * * 0x0-0xFFF8 - The function ID
43390 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
43391 	 * * 0xFFFD - Reserved for user-space HWRM interface
43392 	 * * 0xFFFF - HWRM
43393 	 */
43394 	uint16_t	target_id;
43395 	/*
43396 	 * A physical address pointer pointing to a host buffer that the
43397 	 * command's response data will be written. This can be either a host
43398 	 * physical address (HPA) or a guest physical address (GPA) and must
43399 	 * point to a physically contiguous block of memory.
43400 	 */
43401 	uint64_t	resp_addr;
43402 	uint32_t	flags;
43403 	/*
43404 	 * When this bit is '1', the VNIC shall be configured to
43405 	 * perform transparent packet aggregation (TPA) of
43406 	 * non-tunneled TCP packets.
43407 	 */
43408 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_TPA \
43409 		UINT32_C(0x1)
43410 	/*
43411 	 * When this bit is '1', the VNIC shall be configured to
43412 	 * perform transparent packet aggregation (TPA) of
43413 	 * tunneled TCP packets.
43414 	 */
43415 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_ENCAP_TPA \
43416 		UINT32_C(0x2)
43417 	/*
43418 	 * When this bit is '1', the VNIC shall be configured to
43419 	 * perform transparent packet aggregation (TPA) according
43420 	 * to Windows Receive Segment Coalescing (RSC) rules.
43421 	 */
43422 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_RSC_WND_UPDATE \
43423 		UINT32_C(0x4)
43424 	/*
43425 	 * When this bit is '1', the VNIC shall be configured to
43426 	 * perform transparent packet aggregation (TPA) according
43427 	 * to Linux Generic Receive Offload (GRO) rules.
43428 	 */
43429 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO \
43430 		UINT32_C(0x8)
43431 	/*
43432 	 * When this bit is '1', the VNIC shall be configured to
43433 	 * perform transparent packet aggregation (TPA) for TCP
43434 	 * packets with IP ECN set to non-zero.
43435 	 */
43436 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_ECN \
43437 		UINT32_C(0x10)
43438 	/*
43439 	 * When this bit is '1', the VNIC shall be configured to
43440 	 * perform transparent packet aggregation (TPA) for
43441 	 * GRE tunneled TCP packets only if all packets have the
43442 	 * same GRE sequence.
43443 	 */
43444 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ \
43445 		UINT32_C(0x20)
43446 	/*
43447 	 * When this bit is '1' and the GRO mode is enabled,
43448 	 * the VNIC shall be configured to
43449 	 * perform transparent packet aggregation (TPA) for
43450 	 * TCP/IPv4 packets with consecutively increasing IPIDs.
43451 	 * In other words, the last packet that is being
43452 	 * aggregated to an already existing aggregation context
43453 	 * shall have IPID 1 more than the IPID of the last packet
43454 	 * that was aggregated in that aggregation context.
43455 	 */
43456 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO_IPID_CHECK \
43457 		UINT32_C(0x40)
43458 	/*
43459 	 * When this bit is '1' and the GRO mode is enabled,
43460 	 * the VNIC shall be configured to
43461 	 * perform transparent packet aggregation (TPA) for
43462 	 * TCP packets with the same TTL (IPv4) or Hop limit (IPv6)
43463 	 * value.
43464 	 */
43465 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_GRO_TTL_CHECK \
43466 		UINT32_C(0x80)
43467 	/*
43468 	 * When this bit is '1' and the GRO mode is enabled,
43469 	 * the VNIC shall DMA payload data using GRO rules.
43470 	 * When this bit is '0', the VNIC shall DMA payload data
43471 	 * using the more efficient LRO rules of filling all
43472 	 * aggregation buffers.
43473 	 */
43474 	#define HWRM_VNIC_TPA_CFG_INPUT_FLAGS_AGG_PACK_AS_GRO \
43475 		UINT32_C(0x100)
43476 	uint32_t	enables;
43477 	/*
43478 	 * This bit must be '1' for the max_agg_segs field to be
43479 	 * configured.
43480 	 */
43481 	#define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_SEGS      UINT32_C(0x1)
43482 	/*
43483 	 * This bit must be '1' for the max_aggs field to be
43484 	 * configured.
43485 	 */
43486 	#define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGGS          UINT32_C(0x2)
43487 	/*
43488 	 * This bit must be '1' for the max_agg_timer field to be
43489 	 * configured.
43490 	 */
43491 	#define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MAX_AGG_TIMER     UINT32_C(0x4)
43492 	/* deprecated bit. Do not use!!! */
43493 	#define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_MIN_AGG_LEN       UINT32_C(0x8)
43494 	/*
43495 	 * This bit must be '1' for the tnl_tpa_en_bitmap field to be
43496 	 * configured.
43497 	 */
43498 	#define HWRM_VNIC_TPA_CFG_INPUT_ENABLES_TNL_TPA_EN \
43499 		UINT32_C(0x10)
43500 	/* Logical vnic ID */
43501 	uint16_t	vnic_id;
43502 	/*
43503 	 * This is the maximum number of TCP segments that can
43504 	 * be aggregated (unit is Log2). Max value is 31. On new
43505 	 * devices supporting TPA v2, the unit is multiples of 4 and
43506 	 * valid values are > 0 and <= 63.
43507 	 */
43508 	uint16_t	max_agg_segs;
43509 	/* 1 segment */
43510 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_1   UINT32_C(0x0)
43511 	/* 2 segments */
43512 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_2   UINT32_C(0x1)
43513 	/* 4 segments */
43514 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_4   UINT32_C(0x2)
43515 	/* 8 segments */
43516 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_8   UINT32_C(0x3)
43517 	/* Any segment size larger than this is not valid */
43518 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_MAX UINT32_C(0x1f)
43519 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_LAST \
43520 		HWRM_VNIC_TPA_CFG_INPUT_MAX_AGG_SEGS_MAX
43521 	/*
43522 	 * This is the maximum number of aggregations this VNIC is
43523 	 * allowed (unit is Log2). Max value is 7. On new devices
43524 	 * supporting TPA v2, this is in unit of 1 and must be > 0
43525 	 * and <= max_aggs_supported in the hwrm_vnic_qcaps response
43526 	 * to enable TPA v2.
43527 	 */
43528 	uint16_t	max_aggs;
43529 	/* 1 aggregation */
43530 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_1   UINT32_C(0x0)
43531 	/* 2 aggregations */
43532 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_2   UINT32_C(0x1)
43533 	/* 4 aggregations */
43534 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_4   UINT32_C(0x2)
43535 	/* 8 aggregations */
43536 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_8   UINT32_C(0x3)
43537 	/* 16 aggregations */
43538 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_16  UINT32_C(0x4)
43539 	/* Any aggregation size larger than this is not valid */
43540 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX UINT32_C(0x7)
43541 	#define HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_LAST \
43542 		HWRM_VNIC_TPA_CFG_INPUT_MAX_AGGS_MAX
43543 	uint8_t	unused_0[2];
43544 	/*
43545 	 * This is the maximum amount of time allowed for
43546 	 * an aggregation context to complete after it was initiated.
43547 	 */
43548 	uint32_t	max_agg_timer;
43549 	/*
43550 	 * This is the minimum amount of payload length required to
43551 	 * start an aggregation context. This field is deprecated and
43552 	 * should be set to 0. The minimum length is set by firmware
43553 	 * and can be queried using hwrm_vnic_tpa_qcfg.
43554 	 */
43555 	uint32_t	min_agg_len;
43556 	/*
43557 	 * If the device supports hardware tunnel TPA feature, as indicated by
43558 	 * the HWRM_VNIC_QCAPS command, this field is used to configure the
43559 	 * tunnel types to be enabled. Each bit corresponds to a specific
43560 	 * tunnel type. If a bit is set to '1', then the associated tunnel
43561 	 * type is enabled; otherwise, it is disabled.
43562 	 */
43563 	uint32_t	tnl_tpa_en_bitmap;
43564 	/*
43565 	 * When this bit is '1', enable VXLAN encapsulated packets for
43566 	 * aggregation.
43567 	 */
43568 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_VXLAN \
43569 		UINT32_C(0x1)
43570 	/*
43571 	 * When this bit is set to '1', enable GENEVE encapsulated packets
43572 	 * for aggregation.
43573 	 */
43574 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_GENEVE \
43575 		UINT32_C(0x2)
43576 	/*
43577 	 * When this bit is set to '1', enable NVGRE encapsulated packets
43578 	 * for aggregation..
43579 	 */
43580 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_NVGRE \
43581 		UINT32_C(0x4)
43582 	/*
43583 	 * When this bit is set to '1', enable GRE encapsulated packets
43584 	 * for aggregation..
43585 	 */
43586 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_GRE \
43587 		UINT32_C(0x8)
43588 	/*
43589 	 * When this bit is set to '1', enable IPV4 encapsulated packets
43590 	 * for aggregation..
43591 	 */
43592 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_IPV4 \
43593 		UINT32_C(0x10)
43594 	/*
43595 	 * When this bit is set to '1', enable IPV6 encapsulated packets
43596 	 * for aggregation..
43597 	 */
43598 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_IPV6 \
43599 		UINT32_C(0x20)
43600 	/*
43601 	 * When this bit is '1', enable VXLAN_GPE encapsulated packets for
43602 	 * aggregation.
43603 	 */
43604 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_VXLAN_GPE \
43605 		UINT32_C(0x40)
43606 	/*
43607 	 * When this bit is '1', enable VXLAN_CUSTOMER1 encapsulated packets
43608 	 * for aggregation.
43609 	 */
43610 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_VXLAN_CUST1 \
43611 		UINT32_C(0x80)
43612 	/*
43613 	 * When this bit is '1', enable GRE_CUSTOMER1 encapsulated packets
43614 	 * for aggregation.
43615 	 */
43616 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_GRE_CUST1 \
43617 		UINT32_C(0x100)
43618 	/*
43619 	 * When this bit is '1', enable UPAR1 encapsulated packets for
43620 	 * aggregation.
43621 	 */
43622 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR1 \
43623 		UINT32_C(0x200)
43624 	/*
43625 	 * When this bit is '1', enable UPAR2 encapsulated packets for
43626 	 * aggregation.
43627 	 */
43628 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR2 \
43629 		UINT32_C(0x400)
43630 	/*
43631 	 * When this bit is '1', enable UPAR3 encapsulated packets for
43632 	 * aggregation.
43633 	 */
43634 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR3 \
43635 		UINT32_C(0x800)
43636 	/*
43637 	 * When this bit is '1', enable UPAR4 encapsulated packets for
43638 	 * aggregation.
43639 	 */
43640 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR4 \
43641 		UINT32_C(0x1000)
43642 	/*
43643 	 * When this bit is '1', enable UPAR5 encapsulated packets for
43644 	 * aggregation.
43645 	 */
43646 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR5 \
43647 		UINT32_C(0x2000)
43648 	/*
43649 	 * When this bit is '1', enable UPAR6 encapsulated packets for
43650 	 * aggregation.
43651 	 */
43652 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR6 \
43653 		UINT32_C(0x4000)
43654 	/*
43655 	 * When this bit is '1', enable UPAR7 encapsulated packets for
43656 	 * aggregation.
43657 	 */
43658 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR7 \
43659 		UINT32_C(0x8000)
43660 	/*
43661 	 * When this bit is '1', enable UPAR8 encapsulated packets for
43662 	 * aggregation.
43663 	 */
43664 	#define HWRM_VNIC_TPA_CFG_INPUT_TNL_TPA_EN_BITMAP_UPAR8 \
43665 		UINT32_C(0x10000)
43666 	uint8_t	unused_1[4];
43667 } __rte_packed_end;
43668 
43669 /* hwrm_vnic_tpa_cfg_output (size:128b/16B) */
43670 struct __rte_packed_begin hwrm_vnic_tpa_cfg_output {
43671 	/* The specific error status for the command. */
43672 	uint16_t	error_code;
43673 	/* The HWRM command request type. */
43674 	uint16_t	req_type;
43675 	/* The sequence ID from the original command. */
43676 	uint16_t	seq_id;
43677 	/* The length of the response data in number of bytes. */
43678 	uint16_t	resp_len;
43679 	uint8_t	unused_0[7];
43680 	/*
43681 	 * This field is used in Output records to indicate that the output
43682 	 * is completely written to RAM. This field should be read as '1'
43683 	 * to indicate that the output has been completely written. When
43684 	 * writing a command completion or response to an internal processor,
43685 	 * the order of writes has to be such that this field is written last.
43686 	 */
43687 	uint8_t	valid;
43688 } __rte_packed_end;
43689 
43690 /**********************
43691  * hwrm_vnic_tpa_qcfg *
43692  **********************/
43693 
43694 
43695 /* hwrm_vnic_tpa_qcfg_input (size:192b/24B) */
43696 struct __rte_packed_begin hwrm_vnic_tpa_qcfg_input {
43697 	/* The HWRM command request type. */
43698 	uint16_t	req_type;
43699 	/*
43700 	 * The completion ring to send the completion event on. This should
43701 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
43702 	 */
43703 	uint16_t	cmpl_ring;
43704 	/*
43705 	 * The sequence ID is used by the driver for tracking multiple
43706 	 * commands. This ID is treated as opaque data by the firmware and
43707 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
43708 	 */
43709 	uint16_t	seq_id;
43710 	/*
43711 	 * The target ID of the command:
43712 	 * * 0x0-0xFFF8 - The function ID
43713 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
43714 	 * * 0xFFFD - Reserved for user-space HWRM interface
43715 	 * * 0xFFFF - HWRM
43716 	 */
43717 	uint16_t	target_id;
43718 	/*
43719 	 * A physical address pointer pointing to a host buffer that the
43720 	 * command's response data will be written. This can be either a host
43721 	 * physical address (HPA) or a guest physical address (GPA) and must
43722 	 * point to a physically contiguous block of memory.
43723 	 */
43724 	uint64_t	resp_addr;
43725 	/* Logical vnic ID */
43726 	uint16_t	vnic_id;
43727 	uint8_t	unused_0[6];
43728 } __rte_packed_end;
43729 
43730 /* hwrm_vnic_tpa_qcfg_output (size:256b/32B) */
43731 struct __rte_packed_begin hwrm_vnic_tpa_qcfg_output {
43732 	/* The specific error status for the command. */
43733 	uint16_t	error_code;
43734 	/* The HWRM command request type. */
43735 	uint16_t	req_type;
43736 	/* The sequence ID from the original command. */
43737 	uint16_t	seq_id;
43738 	/* The length of the response data in number of bytes. */
43739 	uint16_t	resp_len;
43740 	uint32_t	flags;
43741 	/*
43742 	 * When this bit is '1', the VNIC is configured to
43743 	 * perform transparent packet aggregation (TPA) of
43744 	 * non-tunneled TCP packets.
43745 	 */
43746 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_TPA \
43747 		UINT32_C(0x1)
43748 	/*
43749 	 * When this bit is '1', the VNIC is configured to
43750 	 * perform transparent packet aggregation (TPA) of
43751 	 * tunneled TCP packets.
43752 	 */
43753 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_ENCAP_TPA \
43754 		UINT32_C(0x2)
43755 	/*
43756 	 * When this bit is '1', the VNIC is configured to
43757 	 * perform transparent packet aggregation (TPA) according
43758 	 * to Windows Receive Segment Coalescing (RSC) rules.
43759 	 */
43760 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_RSC_WND_UPDATE \
43761 		UINT32_C(0x4)
43762 	/*
43763 	 * When this bit is '1', the VNIC is configured to
43764 	 * perform transparent packet aggregation (TPA) according
43765 	 * to Linux Generic Receive Offload (GRO) rules.
43766 	 */
43767 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_GRO \
43768 		UINT32_C(0x8)
43769 	/*
43770 	 * When this bit is '1', the VNIC is configured to
43771 	 * perform transparent packet aggregation (TPA) for TCP
43772 	 * packets with IP ECN set to non-zero.
43773 	 */
43774 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_AGG_WITH_ECN \
43775 		UINT32_C(0x10)
43776 	/*
43777 	 * When this bit is '1', the VNIC is configured to
43778 	 * perform transparent packet aggregation (TPA) for
43779 	 * GRE tunneled TCP packets only if all packets have the
43780 	 * same GRE sequence.
43781 	 */
43782 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_AGG_WITH_SAME_GRE_SEQ \
43783 		UINT32_C(0x20)
43784 	/*
43785 	 * When this bit is '1' and the GRO mode is enabled,
43786 	 * the VNIC is configured to
43787 	 * perform transparent packet aggregation (TPA) for
43788 	 * TCP/IPv4 packets with consecutively increasing IPIDs.
43789 	 * In other words, the last packet that is being
43790 	 * aggregated to an already existing aggregation context
43791 	 * shall have IPID 1 more than the IPID of the last packet
43792 	 * that was aggregated in that aggregation context.
43793 	 */
43794 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_GRO_IPID_CHECK \
43795 		UINT32_C(0x40)
43796 	/*
43797 	 * When this bit is '1' and the GRO mode is enabled,
43798 	 * the VNIC is configured to
43799 	 * perform transparent packet aggregation (TPA) for
43800 	 * TCP packets with the same TTL (IPv4) or Hop limit (IPv6)
43801 	 * value.
43802 	 */
43803 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_FLAGS_GRO_TTL_CHECK \
43804 		UINT32_C(0x80)
43805 	/*
43806 	 * This is the maximum number of TCP segments that can
43807 	 * be aggregated (unit is Log2). Max value is 31.
43808 	 */
43809 	uint16_t	max_agg_segs;
43810 	/* 1 segment */
43811 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_1   UINT32_C(0x0)
43812 	/* 2 segments */
43813 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_2   UINT32_C(0x1)
43814 	/* 4 segments */
43815 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_4   UINT32_C(0x2)
43816 	/* 8 segments */
43817 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_8   UINT32_C(0x3)
43818 	/* Any segment size larger than this is not valid */
43819 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_MAX UINT32_C(0x1f)
43820 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_LAST \
43821 		HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGG_SEGS_MAX
43822 	/*
43823 	 * This is the maximum number of aggregations this VNIC is
43824 	 * allowed (unit is Log2). Max value is 7
43825 	 */
43826 	uint16_t	max_aggs;
43827 	/* 1 aggregation */
43828 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_1   UINT32_C(0x0)
43829 	/* 2 aggregations */
43830 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_2   UINT32_C(0x1)
43831 	/* 4 aggregations */
43832 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_4   UINT32_C(0x2)
43833 	/* 8 aggregations */
43834 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_8   UINT32_C(0x3)
43835 	/* 16 aggregations */
43836 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_16  UINT32_C(0x4)
43837 	/* Any aggregation size larger than this is not valid */
43838 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_MAX UINT32_C(0x7)
43839 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_LAST \
43840 		HWRM_VNIC_TPA_QCFG_OUTPUT_MAX_AGGS_MAX
43841 	/*
43842 	 * This is the maximum amount of time allowed for
43843 	 * an aggregation context to complete after it was initiated.
43844 	 */
43845 	uint32_t	max_agg_timer;
43846 	/*
43847 	 * This is the minimum amount of payload length required to
43848 	 * start an aggregation context.
43849 	 */
43850 	uint32_t	min_agg_len;
43851 	/*
43852 	 * If the device supports hardware tunnel TPA feature, as indicated by
43853 	 * the HWRM_VNIC_QCAPS command, this field conveys the bitmap of the
43854 	 * tunnel types that have been configured. Each bit corresponds to a
43855 	 * specific tunnel type. If a bit is set to '1', then the associated
43856 	 * tunnel type is enabled; otherwise, it is disabled.
43857 	 */
43858 	uint32_t	tnl_tpa_en_bitmap;
43859 	/*
43860 	 * When this bit is '1', enable VXLAN encapsulated packets for
43861 	 * aggregation.
43862 	 */
43863 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_VXLAN \
43864 		UINT32_C(0x1)
43865 	/*
43866 	 * When this bit is set to '1', enable GENEVE encapsulated packets
43867 	 * for aggregation.
43868 	 */
43869 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_GENEVE \
43870 		UINT32_C(0x2)
43871 	/*
43872 	 * When this bit is set to '1', enable NVGRE encapsulated packets
43873 	 * for aggregation..
43874 	 */
43875 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_NVGRE \
43876 		UINT32_C(0x4)
43877 	/*
43878 	 * When this bit is set to '1', enable GRE encapsulated packets
43879 	 * for aggregation..
43880 	 */
43881 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_GRE \
43882 		UINT32_C(0x8)
43883 	/*
43884 	 * When this bit is set to '1', enable IPV4 encapsulated packets
43885 	 * for aggregation..
43886 	 */
43887 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_IPV4 \
43888 		UINT32_C(0x10)
43889 	/*
43890 	 * When this bit is set to '1', enable IPV6 encapsulated packets
43891 	 * for aggregation..
43892 	 */
43893 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_IPV6 \
43894 		UINT32_C(0x20)
43895 	/*
43896 	 * When this bit is '1', enable VXLAN_GPE encapsulated packets for
43897 	 * aggregation.
43898 	 */
43899 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_VXLAN_GPE \
43900 		UINT32_C(0x40)
43901 	/*
43902 	 * When this bit is '1', enable VXLAN_CUSTOMER1 encapsulated packets
43903 	 * for aggregation.
43904 	 */
43905 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_VXLAN_CUST1 \
43906 		UINT32_C(0x80)
43907 	/*
43908 	 * When this bit is '1', enable GRE_CUSTOMER1 encapsulated packets
43909 	 * for aggregation.
43910 	 */
43911 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_GRE_CUST1 \
43912 		UINT32_C(0x100)
43913 	/*
43914 	 * When this bit is '1', enable UPAR1 encapsulated packets for
43915 	 * aggregation.
43916 	 */
43917 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR1 \
43918 		UINT32_C(0x200)
43919 	/*
43920 	 * When this bit is '1', enable UPAR2 encapsulated packets for
43921 	 * aggregation.
43922 	 */
43923 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR2 \
43924 		UINT32_C(0x400)
43925 	/*
43926 	 * When this bit is '1', enable UPAR3 encapsulated packets for
43927 	 * aggregation.
43928 	 */
43929 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR3 \
43930 		UINT32_C(0x800)
43931 	/*
43932 	 * When this bit is '1', enable UPAR4 encapsulated packets for
43933 	 * aggregation.
43934 	 */
43935 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR4 \
43936 		UINT32_C(0x1000)
43937 	/*
43938 	 * When this bit is '1', enable UPAR5 encapsulated packets for
43939 	 * aggregation.
43940 	 */
43941 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR5 \
43942 		UINT32_C(0x2000)
43943 	/*
43944 	 * When this bit is '1', enable UPAR6 encapsulated packets for
43945 	 * aggregation.
43946 	 */
43947 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR6 \
43948 		UINT32_C(0x4000)
43949 	/*
43950 	 * When this bit is '1', enable UPAR7 encapsulated packets for
43951 	 * aggregation.
43952 	 */
43953 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR7 \
43954 		UINT32_C(0x8000)
43955 	/*
43956 	 * When this bit is '1', enable UPAR8 encapsulated packets for
43957 	 * aggregation.
43958 	 */
43959 	#define HWRM_VNIC_TPA_QCFG_OUTPUT_TNL_TPA_EN_BITMAP_UPAR8 \
43960 		UINT32_C(0x10000)
43961 	uint8_t	unused_0[3];
43962 	/*
43963 	 * This field is used in Output records to indicate that the output
43964 	 * is completely written to RAM. This field should be read as '1'
43965 	 * to indicate that the output has been completely written. When
43966 	 * writing a command completion or response to an internal processor,
43967 	 * the order of writes has to be such that this field is written last.
43968 	 */
43969 	uint8_t	valid;
43970 } __rte_packed_end;
43971 
43972 /*********************
43973  * hwrm_vnic_rss_cfg *
43974  *********************/
43975 
43976 
43977 /* hwrm_vnic_rss_cfg_input (size:384b/48B) */
43978 struct __rte_packed_begin hwrm_vnic_rss_cfg_input {
43979 	/* The HWRM command request type. */
43980 	uint16_t	req_type;
43981 	/*
43982 	 * The completion ring to send the completion event on. This should
43983 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
43984 	 */
43985 	uint16_t	cmpl_ring;
43986 	/*
43987 	 * The sequence ID is used by the driver for tracking multiple
43988 	 * commands. This ID is treated as opaque data by the firmware and
43989 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
43990 	 */
43991 	uint16_t	seq_id;
43992 	/*
43993 	 * The target ID of the command:
43994 	 * * 0x0-0xFFF8 - The function ID
43995 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
43996 	 * * 0xFFFD - Reserved for user-space HWRM interface
43997 	 * * 0xFFFF - HWRM
43998 	 */
43999 	uint16_t	target_id;
44000 	/*
44001 	 * A physical address pointer pointing to a host buffer that the
44002 	 * command's response data will be written. This can be either a host
44003 	 * physical address (HPA) or a guest physical address (GPA) and must
44004 	 * point to a physically contiguous block of memory.
44005 	 */
44006 	uint64_t	resp_addr;
44007 	uint32_t	hash_type;
44008 	/*
44009 	 * When this bit is '1', the RSS hash shall be computed
44010 	 * over source and destination IPv4 addresses of IPv4
44011 	 * packets.
44012 	 */
44013 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV4 \
44014 		UINT32_C(0x1)
44015 	/*
44016 	 * When this bit is '1', the RSS hash shall be computed
44017 	 * over source/destination IPv4 addresses and
44018 	 * source/destination ports of TCP/IPv4 packets.
44019 	 */
44020 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV4 \
44021 		UINT32_C(0x2)
44022 	/*
44023 	 * When this bit is '1', the RSS hash shall be computed
44024 	 * over source/destination IPv4 addresses and
44025 	 * source/destination ports of UDP/IPv4 packets.
44026 	 */
44027 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV4 \
44028 		UINT32_C(0x4)
44029 	/*
44030 	 * When this bit is '1', the RSS hash shall be computed
44031 	 * over source and destination IPv6 addresses of IPv6
44032 	 * packets.
44033 	 */
44034 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6 \
44035 		UINT32_C(0x8)
44036 	/*
44037 	 * When this bit is '1', the RSS hash shall be computed
44038 	 * over source/destination IPv6 addresses and
44039 	 * source/destination ports of TCP/IPv6 packets.
44040 	 */
44041 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_TCP_IPV6 \
44042 		UINT32_C(0x10)
44043 	/*
44044 	 * When this bit is '1', the RSS hash shall be computed
44045 	 * over source/destination IPv6 addresses and
44046 	 * source/destination ports of UDP/IPv6 packets.
44047 	 */
44048 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_UDP_IPV6 \
44049 		UINT32_C(0x20)
44050 	/*
44051 	 * When this bit is '1', the RSS hash shall be computed
44052 	 * over source, destination IPv6 addresses and flow label of IPv6
44053 	 * packets. Hash type ipv6 and ipv6_flow_label are mutually
44054 	 * exclusive. HW does not include the flow_label in hash
44055 	 * calculation for the packets that are matching tcp_ipv6 and
44056 	 * udp_ipv6 hash types. Host drivers should set this bit based on
44057 	 * rss_ipv6_flow_label_cap.
44058 	 */
44059 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_IPV6_FLOW_LABEL \
44060 		UINT32_C(0x40)
44061 	/*
44062 	 * When this bit is '1', the RSS hash shall be computed over
44063 	 * source/destination IPv4 addresses and IPSEC AH SPI field of IPSEC
44064 	 * AH/IPv4 packets. Host drivers should set this bit based on
44065 	 * rss_ipsec_ah_spi_ipv4_cap.
44066 	 */
44067 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_AH_SPI_IPV4 \
44068 		UINT32_C(0x80)
44069 	/*
44070 	 * When this bit is '1', the RSS hash shall be computed over
44071 	 * source/destination IPv4 addresses and IPSEC ESP SPI field of IPSEC
44072 	 * ESP/IPv4 packets. Host drivers should set this bit based on
44073 	 * rss_ipsec_esp_spi_ipv4_cap.
44074 	 */
44075 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_ESP_SPI_IPV4 \
44076 		UINT32_C(0x100)
44077 	/*
44078 	 * When this bit is '1', the RSS hash shall be computed over
44079 	 * source/destination IPv6 addresses and IPSEC AH SPI field of IPSEC
44080 	 * AH/IPv6 packets. Host drivers should set this bit based on
44081 	 * rss_ipsec_ah_spi_ipv6_cap.
44082 	 */
44083 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_AH_SPI_IPV6 \
44084 		UINT32_C(0x200)
44085 	/*
44086 	 * When this bit is '1', the RSS hash shall be computed over
44087 	 * source/destination IPv6 addresses and IPSEC ESP SPI field of IPSEC
44088 	 * ESP/IPv6 packets. Host drivers should set this bit based on
44089 	 * rss_ipsec_esp_spi_ipv6_cap.
44090 	 */
44091 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_TYPE_ESP_SPI_IPV6 \
44092 		UINT32_C(0x400)
44093 	/* VNIC ID of VNIC associated with RSS table being configured. */
44094 	uint16_t	vnic_id;
44095 	/*
44096 	 * Specifies which VNIC ring table pair to configure.
44097 	 * Valid values range from 0 to 7.
44098 	 */
44099 	uint8_t	ring_table_pair_index;
44100 	/*
44101 	 * Flags to specify different RSS hash modes. Global RSS hash mode is
44102 	 * indicated when vnic_id and rss_ctx_idx fields are set to value of
44103 	 * 0xffff. Only PF can initiate global RSS hash mode setting changes.
44104 	 * VNIC RSS hash mode is indicated with valid vnic_id and rss_ctx_idx,
44105 	 * if FW is VNIC_RSS_HASH_MODE capable. FW configures the mode based
44106 	 * on first come first serve order. Global RSS hash mode and VNIC RSS
44107 	 * hash modes are mutually exclusive. FW returns invalid error
44108 	 * if FW receives conflicting requests. To change the current hash
44109 	 * mode, the mode associated drivers need to be unloaded and apply
44110 	 * the new configuration.
44111 	 */
44112 	uint8_t	hash_mode_flags;
44113 	/*
44114 	 * When this bit is '1' and FW is VNIC_RSS_HASH_MODE capable,
44115 	 * innermost_4 and innermost_2 hash modes are used to configure
44116 	 * the tuple mode. When this bit is '1' and FW is not
44117 	 * VNIC_RSS_HASH_MODE capable, It indicates using current RSS hash
44118 	 * mode setting configured in the device otherwise.
44119 	 */
44120 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_DEFAULT \
44121 		UINT32_C(0x1)
44122 	/*
44123 	 * When this bit is '1', it indicates requesting support of
44124 	 * RSS hashing over innermost 4 tuples {l3.src, l3.dest,
44125 	 * l4.src, l4.dest} for tunnel packets. For none-tunnel
44126 	 * packets, the RSS hash is computed over the normal
44127 	 * src/dest l3 and src/dest l4 headers.
44128 	 */
44129 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_INNERMOST_4 \
44130 		UINT32_C(0x2)
44131 	/*
44132 	 * When this bit is '1', it indicates requesting support of
44133 	 * RSS hashing over innermost 2 tuples {l3.src, l3.dest} for
44134 	 * tunnel packets. For none-tunnel packets, the RSS hash is
44135 	 * computed over the normal src/dest l3 headers.
44136 	 */
44137 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_INNERMOST_2 \
44138 		UINT32_C(0x4)
44139 	/*
44140 	 * When this bit is '1', it indicates requesting support of
44141 	 * RSS hashing over outermost 4 tuples {t_l3.src, t_l3.dest,
44142 	 * t_l4.src, t_l4.dest} for tunnel packets. For none-tunnel
44143 	 * packets, the RSS hash is computed over the normal
44144 	 * src/dest l3 and src/dest l4 headers.
44145 	 */
44146 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_OUTERMOST_4 \
44147 		UINT32_C(0x8)
44148 	/*
44149 	 * When this bit is '1', it indicates requesting support of
44150 	 * RSS hashing over outermost 2 tuples {t_l3.src, t_l3.dest} for
44151 	 * tunnel packets. For none-tunnel packets, the RSS hash is
44152 	 * computed over the normal src/dest l3 headers.
44153 	 */
44154 	#define HWRM_VNIC_RSS_CFG_INPUT_HASH_MODE_FLAGS_OUTERMOST_2 \
44155 		UINT32_C(0x10)
44156 	/* This is the address for rss ring group table */
44157 	uint64_t	ring_grp_tbl_addr;
44158 	/* This is the address for rss hash key table */
44159 	uint64_t	hash_key_tbl_addr;
44160 	/* Index to the rss indirection table. */
44161 	uint16_t	rss_ctx_idx;
44162 	uint8_t	flags;
44163 	/*
44164 	 * When this bit is '1', it indicates that the hash_type field is
44165 	 * interpreted as a change relative the current configuration. Each
44166 	 * '1' bit in hash_type represents a header to add to the current
44167 	 * hash. Zeroes designate the hash_type state bits that should remain
44168 	 * unchanged, if possible. If this constraint on the existing state
44169 	 * cannot be satisfied, then the implementation should preference
44170 	 * adding other headers so as to honor the request to add the
44171 	 * specified headers. It is an error to set this flag concurrently
44172 	 * with hash_type_exclude.
44173 	 */
44174 	#define HWRM_VNIC_RSS_CFG_INPUT_FLAGS_HASH_TYPE_INCLUDE \
44175 		UINT32_C(0x1)
44176 	/*
44177 	 * When this bit is '1', it indicates that the hash_type field is
44178 	 * interpreted as a change relative the current configuration. Each
44179 	 * '1' bit in hash_type represents a header to remove from the
44180 	 * current hash. Zeroes designate the hash_type state bits that
44181 	 * should remain unchanged, if possible. If this constraint on the
44182 	 * existing state cannot be satisfied, then the implementation should
44183 	 * preference removing other headers so as to honor the request to
44184 	 * remove the specified headers. It is an error to set this flag
44185 	 * concurrently with hash_type_include.
44186 	 */
44187 	#define HWRM_VNIC_RSS_CFG_INPUT_FLAGS_HASH_TYPE_EXCLUDE \
44188 		UINT32_C(0x2)
44189 	/*
44190 	 * When this bit is '1', it indicates that the support of setting
44191 	 * ipsec hash_types by the host drivers.
44192 	 */
44193 	#define HWRM_VNIC_RSS_CFG_INPUT_FLAGS_IPSEC_HASH_TYPE_CFG_SUPPORT \
44194 		UINT32_C(0x4)
44195 	uint8_t	ring_select_mode;
44196 	/*
44197 	 * In this mode, HW uses Toeplitz algorithm and provided Toeplitz
44198 	 * hash key to hash the packets according to the configured hash
44199 	 * type and hash mode. The Toeplitz hash results and the provided
44200 	 * Toeplitz RSS indirection table are used to determine the RSS
44201 	 * rings.
44202 	 */
44203 	#define HWRM_VNIC_RSS_CFG_INPUT_RING_SELECT_MODE_TOEPLITZ \
44204 		UINT32_C(0x0)
44205 	/*
44206 	 * In this mode, HW uses XOR algorithm to hash the packets according
44207 	 * to the configured hash type and hash mode. The XOR hash results
44208 	 * and the provided XOR RSS indirection table are used to determine
44209 	 * the RSS rings. Host drivers provided hash key is not honored in
44210 	 * this mode.
44211 	 */
44212 	#define HWRM_VNIC_RSS_CFG_INPUT_RING_SELECT_MODE_XOR \
44213 		UINT32_C(0x1)
44214 	/*
44215 	 * In this mode, HW uses inner packets checksum algorithm to
44216 	 * distribute the packets across the rings and Toeplitz algorithm
44217 	 * to calculate the hash to convey it in the RX completions. Host
44218 	 * drivers should provide Toeplitz hash key. As HW uses innermost
44219 	 * packets checksum to distribute the packets across the rings,
44220 	 * host drivers can't convey hash mode to choose outer headers to
44221 	 * calculate Toeplitz hash. FW will fail such configuration.
44222 	 */
44223 	#define HWRM_VNIC_RSS_CFG_INPUT_RING_SELECT_MODE_TOEPLITZ_CHECKSUM \
44224 		UINT32_C(0x2)
44225 	#define HWRM_VNIC_RSS_CFG_INPUT_RING_SELECT_MODE_LAST \
44226 		HWRM_VNIC_RSS_CFG_INPUT_RING_SELECT_MODE_TOEPLITZ_CHECKSUM
44227 	uint8_t	unused_1[4];
44228 } __rte_packed_end;
44229 
44230 /* hwrm_vnic_rss_cfg_output (size:128b/16B) */
44231 struct __rte_packed_begin hwrm_vnic_rss_cfg_output {
44232 	/* The specific error status for the command. */
44233 	uint16_t	error_code;
44234 	/* The HWRM command request type. */
44235 	uint16_t	req_type;
44236 	/* The sequence ID from the original command. */
44237 	uint16_t	seq_id;
44238 	/* The length of the response data in number of bytes. */
44239 	uint16_t	resp_len;
44240 	uint8_t	unused_0[7];
44241 	/*
44242 	 * This field is used in Output records to indicate that the output
44243 	 * is completely written to RAM. This field should be read as '1'
44244 	 * to indicate that the output has been completely written. When
44245 	 * writing a command completion or response to an internal processor,
44246 	 * the order of writes has to be such that this field is written last.
44247 	 */
44248 	uint8_t	valid;
44249 } __rte_packed_end;
44250 
44251 /* hwrm_vnic_rss_cfg_cmd_err (size:64b/8B) */
44252 struct __rte_packed_begin hwrm_vnic_rss_cfg_cmd_err {
44253 	/*
44254 	 * command specific error codes that goes to
44255 	 * the cmd_err field in Common HWRM Error Response.
44256 	 */
44257 	uint8_t	code;
44258 	/* Unknown error */
44259 	#define HWRM_VNIC_RSS_CFG_CMD_ERR_CODE_UNKNOWN \
44260 		UINT32_C(0x0)
44261 	/*
44262 	 * Unable to change global RSS mode to outer due to all active
44263 	 * interfaces are not ready to support outer RSS hashing.
44264 	 */
44265 	#define HWRM_VNIC_RSS_CFG_CMD_ERR_CODE_INTERFACE_NOT_READY \
44266 		UINT32_C(0x1)
44267 	#define HWRM_VNIC_RSS_CFG_CMD_ERR_CODE_LAST \
44268 		HWRM_VNIC_RSS_CFG_CMD_ERR_CODE_INTERFACE_NOT_READY
44269 	uint8_t	unused_0[7];
44270 } __rte_packed_end;
44271 
44272 /**********************
44273  * hwrm_vnic_rss_qcfg *
44274  **********************/
44275 
44276 
44277 /* hwrm_vnic_rss_qcfg_input (size:192b/24B) */
44278 struct __rte_packed_begin hwrm_vnic_rss_qcfg_input {
44279 	/* The HWRM command request type. */
44280 	uint16_t	req_type;
44281 	/*
44282 	 * The completion ring to send the completion event on. This should
44283 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44284 	 */
44285 	uint16_t	cmpl_ring;
44286 	/*
44287 	 * The sequence ID is used by the driver for tracking multiple
44288 	 * commands. This ID is treated as opaque data by the firmware and
44289 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44290 	 */
44291 	uint16_t	seq_id;
44292 	/*
44293 	 * The target ID of the command:
44294 	 * * 0x0-0xFFF8 - The function ID
44295 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44296 	 * * 0xFFFD - Reserved for user-space HWRM interface
44297 	 * * 0xFFFF - HWRM
44298 	 */
44299 	uint16_t	target_id;
44300 	/*
44301 	 * A physical address pointer pointing to a host buffer that the
44302 	 * command's response data will be written. This can be either a host
44303 	 * physical address (HPA) or a guest physical address (GPA) and must
44304 	 * point to a physically contiguous block of memory.
44305 	 */
44306 	uint64_t	resp_addr;
44307 	/*
44308 	 * Index to the rss indirection table. This field is used as a lookup
44309 	 * for chips before Thor - i.e. Cumulus and Whitney.
44310 	 */
44311 	uint16_t	rss_ctx_idx;
44312 	/*
44313 	 * VNIC ID of VNIC associated with RSS table being queried. This field
44314 	 * is used as a lookup for Thor and later chips.
44315 	 */
44316 	uint16_t	vnic_id;
44317 	uint8_t	unused_0[4];
44318 } __rte_packed_end;
44319 
44320 /* hwrm_vnic_rss_qcfg_output (size:512b/64B) */
44321 struct __rte_packed_begin hwrm_vnic_rss_qcfg_output {
44322 	/* The specific error status for the command. */
44323 	uint16_t	error_code;
44324 	/* The HWRM command request type. */
44325 	uint16_t	req_type;
44326 	/* The sequence ID from the original command. */
44327 	uint16_t	seq_id;
44328 	/* The length of the response data in number of bytes. */
44329 	uint16_t	resp_len;
44330 	uint32_t	hash_type;
44331 	/*
44332 	 * When this bit is '1', the RSS hash shall be computed
44333 	 * over source and destination IPv4 addresses of IPv4
44334 	 * packets.
44335 	 */
44336 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_IPV4 \
44337 		UINT32_C(0x1)
44338 	/*
44339 	 * When this bit is '1', the RSS hash shall be computed
44340 	 * over source/destination IPv4 addresses and
44341 	 * source/destination ports of TCP/IPv4 packets.
44342 	 */
44343 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_TCP_IPV4 \
44344 		UINT32_C(0x2)
44345 	/*
44346 	 * When this bit is '1', the RSS hash shall be computed
44347 	 * over source/destination IPv4 addresses and
44348 	 * source/destination ports of UDP/IPv4 packets.
44349 	 */
44350 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_UDP_IPV4 \
44351 		UINT32_C(0x4)
44352 	/*
44353 	 * When this bit is '1', the RSS hash shall be computed
44354 	 * over source and destination IPv6 addresses of IPv6
44355 	 * packets.
44356 	 */
44357 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_IPV6 \
44358 		UINT32_C(0x8)
44359 	/*
44360 	 * When this bit is '1', the RSS hash shall be computed
44361 	 * over source/destination IPv6 addresses and
44362 	 * source/destination ports of TCP/IPv6 packets.
44363 	 */
44364 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_TCP_IPV6 \
44365 		UINT32_C(0x10)
44366 	/*
44367 	 * When this bit is '1', the RSS hash shall be computed
44368 	 * over source/destination IPv6 addresses and
44369 	 * source/destination ports of UDP/IPv6 packets.
44370 	 */
44371 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_UDP_IPV6 \
44372 		UINT32_C(0x20)
44373 	/*
44374 	 * When this bit is '1', the RSS hash shall be computed
44375 	 * over source, destination IPv6 addresses and flow label of IPv6
44376 	 * packets. Hash type ipv6 and ipv6_flow_label are mutually
44377 	 * exclusive. HW does not include the flow_label in hash
44378 	 * calculation for the packets that are matching tcp_ipv6 and
44379 	 * udp_ipv6 hash types. This bit will be '0' if
44380 	 * rss_ipv6_flow_label_cap is '0'.
44381 	 */
44382 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_IPV6_FLOW_LABEL \
44383 		UINT32_C(0x40)
44384 	/*
44385 	 * When this bit is '1', the RSS hash shall be computed over
44386 	 * source/destination IPv4 addresses and IPSEC AH SPI field of IPSEC
44387 	 * AH/IPv4 packets. This bit will be '0' if rss_ipsec_ah_spi_ipv4_cap
44388 	 * is '0'.
44389 	 */
44390 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_AH_SPI_IPV4 \
44391 		UINT32_C(0x80)
44392 	/*
44393 	 * When this bit is '1', the RSS hash shall be computed over
44394 	 * source/destination IPv4 addresses and IPSEC ESP SPI field of IPSEC
44395 	 * ESP/IPv4 packets. This bit will be '0' if
44396 	 * rss_ipsec_esp_spi_ipv4_cap is '0'.
44397 	 */
44398 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_ESP_SPI_IPV4 \
44399 		UINT32_C(0x100)
44400 	/*
44401 	 * When this bit is '1', the RSS hash shall be computed over
44402 	 * source/destination IPv6 addresses and IPSEC AH SPI field of IPSEC
44403 	 * AH/IPv6 packets. This bit will be '0' if
44404 	 * rss_ipsec_ah_spi_ipv6_cap is '0'.
44405 	 */
44406 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_AH_SPI_IPV6 \
44407 		UINT32_C(0x200)
44408 	/*
44409 	 * When this bit is '1', the RSS hash shall be computed over
44410 	 * source/destination IPv6 addresses and IPSEC ESP SPI field of IPSEC
44411 	 * ESP/IPv6 packets. This bit will be '0' if
44412 	 * rss_ipsec_esp_spi_ipv6_cap is '0'.
44413 	 */
44414 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_TYPE_ESP_SPI_IPV6 \
44415 		UINT32_C(0x400)
44416 	uint8_t	unused_0[4];
44417 	/* This is the value of rss hash key */
44418 	uint32_t	hash_key[10];
44419 	/*
44420 	 * Flags to specify different RSS hash modes. Setting rss_ctx_idx to
44421 	 * the value of 0xffff implies a global RSS configuration query.
44422 	 * hash_mode_flags are only valid for global RSS configuration query.
44423 	 * Only the PF can initiate a global RSS configuration query.
44424 	 * The query request fails if any VNIC is configured with hash mode
44425 	 * and rss_ctx_idx is 0xffff.
44426 	 */
44427 	uint8_t	hash_mode_flags;
44428 	/*
44429 	 * When this bit is '1' and FW is VNIC_RSS_HASH_MODE capable,
44430 	 * it indicates VNIC's configured RSS hash mode.
44431 	 * When this bit is '1' and FW is not VNIC_RSS_HASH_MODE capable,
44432 	 * It indicates using current RSS hash mode setting configured in the
44433 	 * device.
44434 	 */
44435 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_MODE_FLAGS_DEFAULT \
44436 		UINT32_C(0x1)
44437 	/*
44438 	 * When this bit is '1', it indicates requesting support of
44439 	 * RSS hashing over innermost 4 tuples {l3.src, l3.dest,
44440 	 * l4.src, l4.dest} for tunnel packets. For none-tunnel
44441 	 * packets, the RSS hash is computed over the normal
44442 	 * src/dest l3 and src/dest l4 headers.
44443 	 */
44444 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_MODE_FLAGS_INNERMOST_4 \
44445 		UINT32_C(0x2)
44446 	/*
44447 	 * When this bit is '1', it indicates requesting support of
44448 	 * RSS hashing over innermost 2 tuples {l3.src, l3.dest} for
44449 	 * tunnel packets. For none-tunnel packets, the RSS hash is
44450 	 * computed over the normal src/dest l3 headers.
44451 	 */
44452 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_MODE_FLAGS_INNERMOST_2 \
44453 		UINT32_C(0x4)
44454 	/*
44455 	 * When this bit is '1', it indicates requesting support of
44456 	 * RSS hashing over outermost 4 tuples {t_l3.src, t_l3.dest,
44457 	 * t_l4.src, t_l4.dest} for tunnel packets. For none-tunnel
44458 	 * packets, the RSS hash is computed over the normal
44459 	 * src/dest l3 and src/dest l4 headers.
44460 	 */
44461 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_MODE_FLAGS_OUTERMOST_4 \
44462 		UINT32_C(0x8)
44463 	/*
44464 	 * When this bit is '1', it indicates requesting support of
44465 	 * RSS hashing over outermost 2 tuples {t_l3.src, t_l3.dest} for
44466 	 * tunnel packets. For none-tunnel packets, the RSS hash is
44467 	 * computed over the normal src/dest l3 headers.
44468 	 */
44469 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_HASH_MODE_FLAGS_OUTERMOST_2 \
44470 		UINT32_C(0x10)
44471 	uint8_t	ring_select_mode;
44472 	/*
44473 	 * In this mode, HW uses Toeplitz algorithm and provided Toeplitz
44474 	 * hash key to hash the packets according to the configured hash
44475 	 * type and hash mode. The Toeplitz hash results and the provided
44476 	 * Toeplitz RSS indirection table are used to determine the RSS
44477 	 * rings.
44478 	 */
44479 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_RING_SELECT_MODE_TOEPLITZ \
44480 		UINT32_C(0x0)
44481 	/*
44482 	 * In this mode, HW uses XOR algorithm to hash the packets according
44483 	 * to the configured hash type and hash mode. The XOR hash results
44484 	 * and the provided XOR RSS indirection table are used to determine
44485 	 * the RSS rings. Host drivers provided hash key is not honored in
44486 	 * this mode.
44487 	 */
44488 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_RING_SELECT_MODE_XOR \
44489 		UINT32_C(0x1)
44490 	/*
44491 	 * In this mode, HW uses inner packets checksum algorithm to
44492 	 * distribute the packets across the rings and Toeplitz algorithm
44493 	 * to calculate the hash to convey it in the RX completions. Host
44494 	 * drivers should provide Toeplitz hash key. As HW uses innermost
44495 	 * packets checksum to distribute the packets across the rings,
44496 	 * host drivers can't convey hash mode to choose outer headers to
44497 	 * calculate Toeplitz hash. FW will fail such configuration.
44498 	 */
44499 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_RING_SELECT_MODE_TOEPLITZ_CHECKSUM \
44500 		UINT32_C(0x2)
44501 	#define HWRM_VNIC_RSS_QCFG_OUTPUT_RING_SELECT_MODE_LAST \
44502 		HWRM_VNIC_RSS_QCFG_OUTPUT_RING_SELECT_MODE_TOEPLITZ_CHECKSUM
44503 	uint8_t	unused_1[5];
44504 	/*
44505 	 * This field is used in Output records to indicate that the output
44506 	 * is completely written to RAM. This field should be read as '1'
44507 	 * to indicate that the output has been completely written. When
44508 	 * writing a command completion or response to an internal processor,
44509 	 * the order of writes has to be such that this field is written last.
44510 	 */
44511 	uint8_t	valid;
44512 } __rte_packed_end;
44513 
44514 /**************************
44515  * hwrm_vnic_plcmodes_cfg *
44516  **************************/
44517 
44518 
44519 /* hwrm_vnic_plcmodes_cfg_input (size:320b/40B) */
44520 struct __rte_packed_begin hwrm_vnic_plcmodes_cfg_input {
44521 	/* The HWRM command request type. */
44522 	uint16_t	req_type;
44523 	/*
44524 	 * The completion ring to send the completion event on. This should
44525 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44526 	 */
44527 	uint16_t	cmpl_ring;
44528 	/*
44529 	 * The sequence ID is used by the driver for tracking multiple
44530 	 * commands. This ID is treated as opaque data by the firmware and
44531 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44532 	 */
44533 	uint16_t	seq_id;
44534 	/*
44535 	 * The target ID of the command:
44536 	 * * 0x0-0xFFF8 - The function ID
44537 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44538 	 * * 0xFFFD - Reserved for user-space HWRM interface
44539 	 * * 0xFFFF - HWRM
44540 	 */
44541 	uint16_t	target_id;
44542 	/*
44543 	 * A physical address pointer pointing to a host buffer that the
44544 	 * command's response data will be written. This can be either a host
44545 	 * physical address (HPA) or a guest physical address (GPA) and must
44546 	 * point to a physically contiguous block of memory.
44547 	 */
44548 	uint64_t	resp_addr;
44549 	uint32_t	flags;
44550 	/*
44551 	 * When this bit is '1', the VNIC shall be configured to
44552 	 * use regular placement algorithm.
44553 	 * By default, the regular placement algorithm shall be
44554 	 * enabled on the VNIC.
44555 	 */
44556 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_REGULAR_PLACEMENT \
44557 		UINT32_C(0x1)
44558 	/*
44559 	 * When this bit is '1', the VNIC shall be configured
44560 	 * use the jumbo placement algorithm.
44561 	 */
44562 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_JUMBO_PLACEMENT \
44563 		UINT32_C(0x2)
44564 	/*
44565 	 * When this bit is '1', the VNIC shall be configured
44566 	 * to enable Header-Data split for IPv4 packets according
44567 	 * to the following rules:
44568 	 * # If the packet is identified as TCP/IPv4, then the
44569 	 * packet is split at the beginning of the TCP payload.
44570 	 * # If the packet is identified as UDP/IPv4, then the
44571 	 * packet is split at the beginning of UDP payload.
44572 	 * # If the packet is identified as non-TCP and non-UDP
44573 	 * IPv4 packet, then the packet is split at the beginning
44574 	 * of the upper layer protocol header carried in the IPv4
44575 	 * packet.
44576 	 */
44577 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_IPV4 \
44578 		UINT32_C(0x4)
44579 	/*
44580 	 * When this bit is '1', the VNIC shall be configured
44581 	 * to enable Header-Data split for IPv6 packets according
44582 	 * to the following rules:
44583 	 * # If the packet is identified as TCP/IPv6, then the
44584 	 * packet is split at the beginning of the TCP payload.
44585 	 * # If the packet is identified as UDP/IPv6, then the
44586 	 * packet is split at the beginning of UDP payload.
44587 	 * # If the packet is identified as non-TCP and non-UDP
44588 	 * IPv6 packet, then the packet is split at the beginning
44589 	 * of the upper layer protocol header carried in the IPv6
44590 	 * packet.
44591 	 */
44592 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_IPV6 \
44593 		UINT32_C(0x8)
44594 	/*
44595 	 * When this bit is '1', the VNIC shall be configured
44596 	 * to enable Header-Data split for FCoE packets at the
44597 	 * beginning of FC payload.
44598 	 */
44599 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_FCOE \
44600 		UINT32_C(0x10)
44601 	/*
44602 	 * When this bit is '1', the VNIC shall be configured
44603 	 * to enable Header-Data split for RoCE packets at the
44604 	 * beginning of RoCE payload (after BTH/GRH headers).
44605 	 */
44606 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_HDS_ROCE \
44607 		UINT32_C(0x20)
44608 	/*
44609 	 * When this bit is '1', the VNIC shall be configured use the virtio
44610 	 * placement algorithm. This feature can only be configured when
44611 	 * proxy mode is supported on the function.
44612 	 */
44613 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_FLAGS_VIRTIO_PLACEMENT \
44614 		UINT32_C(0x40)
44615 	uint32_t	enables;
44616 	/*
44617 	 * This bit must be '1' for the jumbo_thresh_valid field to be
44618 	 * configured.
44619 	 */
44620 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_JUMBO_THRESH_VALID \
44621 		UINT32_C(0x1)
44622 	/*
44623 	 * This bit must be '1' for the hds_offset_valid field to be
44624 	 * configured.
44625 	 */
44626 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_HDS_OFFSET_VALID \
44627 		UINT32_C(0x2)
44628 	/*
44629 	 * This bit must be '1' for the hds_threshold_valid field to be
44630 	 * configured.
44631 	 */
44632 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_HDS_THRESHOLD_VALID \
44633 		UINT32_C(0x4)
44634 	/*
44635 	 * This bit must be '1' for the max_bds_valid field to be
44636 	 * configured.
44637 	 */
44638 	#define HWRM_VNIC_PLCMODES_CFG_INPUT_ENABLES_MAX_BDS_VALID \
44639 		UINT32_C(0x8)
44640 	/* Logical vnic ID */
44641 	uint32_t	vnic_id;
44642 	/*
44643 	 * When jumbo placement algorithm is enabled, this value
44644 	 * is used to determine the threshold for jumbo placement.
44645 	 * Packets with length larger than this value will be
44646 	 * placed according to the jumbo placement algorithm.
44647 	 */
44648 	uint16_t	jumbo_thresh;
44649 	/*
44650 	 * This value is used to determine the offset into
44651 	 * packet buffer where the split data (payload) will be
44652 	 * placed according to one of HDS placement algorithm.
44653 	 *
44654 	 * The lengths of packet buffers provided for split data
44655 	 * shall be larger than this value.
44656 	 */
44657 	uint16_t	hds_offset;
44658 	/*
44659 	 * When one of the HDS placement algorithm is enabled, this
44660 	 * value is used to determine the threshold for HDS
44661 	 * placement.
44662 	 * Packets with length larger than this value will be
44663 	 * placed according to the HDS placement algorithm.
44664 	 * This value shall be in multiple of 4 bytes.
44665 	 */
44666 	uint16_t	hds_threshold;
44667 	/*
44668 	 * When virtio placement algorithm is enabled, this
44669 	 * value is used to determine the maximum number of BDs
44670 	 * that can be used to place an Rx Packet.
44671 	 * If an incoming packet does not fit in the buffers described
44672 	 * by the max BDs, the packet will be dropped and an error
44673 	 * will be reported in the completion. Valid values for this
44674 	 * field are between 1 and 8. If the VNIC uses header-data-
44675 	 * separation and/or TPA with buffer spanning enabled, valid
44676 	 * values for this field are between 2 and 8.
44677 	 * This feature can only be configured when proxy mode is
44678 	 * supported on the function.
44679 	 */
44680 	uint16_t	max_bds;
44681 	uint8_t	unused_0[4];
44682 } __rte_packed_end;
44683 
44684 /* hwrm_vnic_plcmodes_cfg_output (size:128b/16B) */
44685 struct __rte_packed_begin hwrm_vnic_plcmodes_cfg_output {
44686 	/* The specific error status for the command. */
44687 	uint16_t	error_code;
44688 	/* The HWRM command request type. */
44689 	uint16_t	req_type;
44690 	/* The sequence ID from the original command. */
44691 	uint16_t	seq_id;
44692 	/* The length of the response data in number of bytes. */
44693 	uint16_t	resp_len;
44694 	uint8_t	unused_0[7];
44695 	/*
44696 	 * This field is used in Output records to indicate that the output
44697 	 * is completely written to RAM. This field should be read as '1'
44698 	 * to indicate that the output has been completely written.
44699 	 * When writing a command completion or response to an internal
44700 	 * processor, the order of writes has to be such that this field is
44701 	 * written last.
44702 	 */
44703 	uint8_t	valid;
44704 } __rte_packed_end;
44705 
44706 /***************************
44707  * hwrm_vnic_plcmodes_qcfg *
44708  ***************************/
44709 
44710 
44711 /* hwrm_vnic_plcmodes_qcfg_input (size:192b/24B) */
44712 struct __rte_packed_begin hwrm_vnic_plcmodes_qcfg_input {
44713 	/* The HWRM command request type. */
44714 	uint16_t	req_type;
44715 	/*
44716 	 * The completion ring to send the completion event on. This should
44717 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44718 	 */
44719 	uint16_t	cmpl_ring;
44720 	/*
44721 	 * The sequence ID is used by the driver for tracking multiple
44722 	 * commands. This ID is treated as opaque data by the firmware and
44723 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44724 	 */
44725 	uint16_t	seq_id;
44726 	/*
44727 	 * The target ID of the command:
44728 	 * * 0x0-0xFFF8 - The function ID
44729 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44730 	 * * 0xFFFD - Reserved for user-space HWRM interface
44731 	 * * 0xFFFF - HWRM
44732 	 */
44733 	uint16_t	target_id;
44734 	/*
44735 	 * A physical address pointer pointing to a host buffer that the
44736 	 * command's response data will be written. This can be either a host
44737 	 * physical address (HPA) or a guest physical address (GPA) and must
44738 	 * point to a physically contiguous block of memory.
44739 	 */
44740 	uint64_t	resp_addr;
44741 	/* Logical vnic ID */
44742 	uint32_t	vnic_id;
44743 	uint8_t	unused_0[4];
44744 } __rte_packed_end;
44745 
44746 /* hwrm_vnic_plcmodes_qcfg_output (size:192b/24B) */
44747 struct __rte_packed_begin hwrm_vnic_plcmodes_qcfg_output {
44748 	/* The specific error status for the command. */
44749 	uint16_t	error_code;
44750 	/* The HWRM command request type. */
44751 	uint16_t	req_type;
44752 	/* The sequence ID from the original command. */
44753 	uint16_t	seq_id;
44754 	/* The length of the response data in number of bytes. */
44755 	uint16_t	resp_len;
44756 	uint32_t	flags;
44757 	/*
44758 	 * When this bit is '1', the VNIC is configured to
44759 	 * use regular placement algorithm.
44760 	 */
44761 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_REGULAR_PLACEMENT \
44762 		UINT32_C(0x1)
44763 	/*
44764 	 * When this bit is '1', the VNIC is configured to
44765 	 * use the jumbo placement algorithm.
44766 	 */
44767 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_JUMBO_PLACEMENT \
44768 		UINT32_C(0x2)
44769 	/*
44770 	 * When this bit is '1', the VNIC is configured
44771 	 * to enable Header-Data split for IPv4 packets.
44772 	 */
44773 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_IPV4 \
44774 		UINT32_C(0x4)
44775 	/*
44776 	 * When this bit is '1', the VNIC is configured
44777 	 * to enable Header-Data split for IPv6 packets.
44778 	 */
44779 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_IPV6 \
44780 		UINT32_C(0x8)
44781 	/*
44782 	 * When this bit is '1', the VNIC is configured
44783 	 * to enable Header-Data split for FCoE packets.
44784 	 */
44785 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_FCOE \
44786 		UINT32_C(0x10)
44787 	/*
44788 	 * When this bit is '1', the VNIC is configured
44789 	 * to enable Header-Data split for RoCE packets.
44790 	 */
44791 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_HDS_ROCE \
44792 		UINT32_C(0x20)
44793 	/*
44794 	 * When this bit is '1', the VNIC is configured
44795 	 * to be the default VNIC of the requesting function.
44796 	 */
44797 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_DFLT_VNIC \
44798 		UINT32_C(0x40)
44799 	/*
44800 	 * When this bit is '1', the VNIC is configured to use the virtio
44801 	 * placement algorithm. This feature can only be configured when
44802 	 * proxy mode is supported on the function.
44803 	 */
44804 	#define HWRM_VNIC_PLCMODES_QCFG_OUTPUT_FLAGS_VIRTIO_PLACEMENT \
44805 		UINT32_C(0x80)
44806 	/*
44807 	 * When jumbo placement algorithm is enabled, this value
44808 	 * is used to determine the threshold for jumbo placement.
44809 	 * Packets with length larger than this value will be
44810 	 * placed according to the jumbo placement algorithm.
44811 	 */
44812 	uint16_t	jumbo_thresh;
44813 	/*
44814 	 * This value is used to determine the offset into
44815 	 * packet buffer where the split data (payload) will be
44816 	 * placed according to one of HDS placement algorithm.
44817 	 *
44818 	 * The lengths of packet buffers provided for split data
44819 	 * shall be larger than this value.
44820 	 */
44821 	uint16_t	hds_offset;
44822 	/*
44823 	 * When one of the HDS placement algorithm is enabled, this
44824 	 * value is used to determine the threshold for HDS
44825 	 * placement.
44826 	 * Packets with length larger than this value will be
44827 	 * placed according to the HDS placement algorithm.
44828 	 * This value shall be in multiple of 4 bytes.
44829 	 */
44830 	uint16_t	hds_threshold;
44831 	/*
44832 	 * When virtio placement algorithm is enabled, this
44833 	 * value is used to determine the maximum number of BDs
44834 	 * that can be used to place an Rx Packet.
44835 	 * If an incoming packet does not fit in the buffers described
44836 	 * by the max BDs, the packet will be dropped and an error
44837 	 * will be reported in the completion. Valid values for this
44838 	 * field are between 1 and 8. If the VNIC uses header-data-
44839 	 * separation and/or TPA with buffer spanning enabled, valid
44840 	 * values for this field are between 2 and 8.
44841 	 * This feature can only be configured when proxy mode is supported
44842 	 * on the function
44843 	 */
44844 	uint16_t	max_bds;
44845 	uint8_t	unused_0[3];
44846 	/*
44847 	 * This field is used in Output records to indicate that the output
44848 	 * is completely written to RAM. This field should be read as '1'
44849 	 * to indicate that the output has been completely written.
44850 	 * When writing a command completion or response to an internal
44851 	 * processor, the order of writes has to be such that this field is
44852 	 * written last.
44853 	 */
44854 	uint8_t	valid;
44855 } __rte_packed_end;
44856 
44857 /**********************************
44858  * hwrm_vnic_rss_cos_lb_ctx_alloc *
44859  **********************************/
44860 
44861 
44862 /* hwrm_vnic_rss_cos_lb_ctx_alloc_input (size:128b/16B) */
44863 struct __rte_packed_begin hwrm_vnic_rss_cos_lb_ctx_alloc_input {
44864 	/* The HWRM command request type. */
44865 	uint16_t	req_type;
44866 	/*
44867 	 * The completion ring to send the completion event on. This should
44868 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44869 	 */
44870 	uint16_t	cmpl_ring;
44871 	/*
44872 	 * The sequence ID is used by the driver for tracking multiple
44873 	 * commands. This ID is treated as opaque data by the firmware and
44874 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44875 	 */
44876 	uint16_t	seq_id;
44877 	/*
44878 	 * The target ID of the command:
44879 	 * * 0x0-0xFFF8 - The function ID
44880 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44881 	 * * 0xFFFD - Reserved for user-space HWRM interface
44882 	 * * 0xFFFF - HWRM
44883 	 */
44884 	uint16_t	target_id;
44885 	/*
44886 	 * A physical address pointer pointing to a host buffer that the
44887 	 * command's response data will be written. This can be either a host
44888 	 * physical address (HPA) or a guest physical address (GPA) and must
44889 	 * point to a physically contiguous block of memory.
44890 	 */
44891 	uint64_t	resp_addr;
44892 } __rte_packed_end;
44893 
44894 /* hwrm_vnic_rss_cos_lb_ctx_alloc_output (size:128b/16B) */
44895 struct __rte_packed_begin hwrm_vnic_rss_cos_lb_ctx_alloc_output {
44896 	/* The specific error status for the command. */
44897 	uint16_t	error_code;
44898 	/* The HWRM command request type. */
44899 	uint16_t	req_type;
44900 	/* The sequence ID from the original command. */
44901 	uint16_t	seq_id;
44902 	/* The length of the response data in number of bytes. */
44903 	uint16_t	resp_len;
44904 	/* rss_cos_lb_ctx_id is 16 b */
44905 	uint16_t	rss_cos_lb_ctx_id;
44906 	uint8_t	unused_0[5];
44907 	/*
44908 	 * This field is used in Output records to indicate that the output
44909 	 * is completely written to RAM. This field should be read as '1'
44910 	 * to indicate that the output has been completely written. When
44911 	 * writing a command completion or response to an internal processor,
44912 	 * the order of writes has to be such that this field is written last.
44913 	 */
44914 	uint8_t	valid;
44915 } __rte_packed_end;
44916 
44917 /*********************************
44918  * hwrm_vnic_rss_cos_lb_ctx_free *
44919  *********************************/
44920 
44921 
44922 /* hwrm_vnic_rss_cos_lb_ctx_free_input (size:192b/24B) */
44923 struct __rte_packed_begin hwrm_vnic_rss_cos_lb_ctx_free_input {
44924 	/* The HWRM command request type. */
44925 	uint16_t	req_type;
44926 	/*
44927 	 * The completion ring to send the completion event on. This should
44928 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44929 	 */
44930 	uint16_t	cmpl_ring;
44931 	/*
44932 	 * The sequence ID is used by the driver for tracking multiple
44933 	 * commands. This ID is treated as opaque data by the firmware and
44934 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44935 	 */
44936 	uint16_t	seq_id;
44937 	/*
44938 	 * The target ID of the command:
44939 	 * * 0x0-0xFFF8 - The function ID
44940 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
44941 	 * * 0xFFFD - Reserved for user-space HWRM interface
44942 	 * * 0xFFFF - HWRM
44943 	 */
44944 	uint16_t	target_id;
44945 	/*
44946 	 * A physical address pointer pointing to a host buffer that the
44947 	 * command's response data will be written. This can be either a host
44948 	 * physical address (HPA) or a guest physical address (GPA) and must
44949 	 * point to a physically contiguous block of memory.
44950 	 */
44951 	uint64_t	resp_addr;
44952 	/* rss_cos_lb_ctx_id is 16 b */
44953 	uint16_t	rss_cos_lb_ctx_id;
44954 	uint8_t	unused_0[6];
44955 } __rte_packed_end;
44956 
44957 /* hwrm_vnic_rss_cos_lb_ctx_free_output (size:128b/16B) */
44958 struct __rte_packed_begin hwrm_vnic_rss_cos_lb_ctx_free_output {
44959 	/* The specific error status for the command. */
44960 	uint16_t	error_code;
44961 	/* The HWRM command request type. */
44962 	uint16_t	req_type;
44963 	/* The sequence ID from the original command. */
44964 	uint16_t	seq_id;
44965 	/* The length of the response data in number of bytes. */
44966 	uint16_t	resp_len;
44967 	uint8_t	unused_0[7];
44968 	/*
44969 	 * This field is used in Output records to indicate that the output
44970 	 * is completely written to RAM. This field should be read as '1'
44971 	 * to indicate that the output has been completely written. When
44972 	 * writing a command completion or response to an internal processor,
44973 	 * the order of writes has to be such that this field is written last.
44974 	 */
44975 	uint8_t	valid;
44976 } __rte_packed_end;
44977 
44978 /*******************
44979  * hwrm_ring_alloc *
44980  *******************/
44981 
44982 
44983 /* hwrm_ring_alloc_input (size:704b/88B) */
44984 struct __rte_packed_begin hwrm_ring_alloc_input {
44985 	/* The HWRM command request type. */
44986 	uint16_t	req_type;
44987 	/*
44988 	 * The completion ring to send the completion event on. This should
44989 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
44990 	 */
44991 	uint16_t	cmpl_ring;
44992 	/*
44993 	 * The sequence ID is used by the driver for tracking multiple
44994 	 * commands. This ID is treated as opaque data by the firmware and
44995 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
44996 	 */
44997 	uint16_t	seq_id;
44998 	/*
44999 	 * The target ID of the command:
45000 	 * * 0x0-0xFFF8 - The function ID
45001 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45002 	 * * 0xFFFD - Reserved for user-space HWRM interface
45003 	 * * 0xFFFF - HWRM
45004 	 */
45005 	uint16_t	target_id;
45006 	/*
45007 	 * A physical address pointer pointing to a host buffer that the
45008 	 * command's response data will be written. This can be either a host
45009 	 * physical address (HPA) or a guest physical address (GPA) and must
45010 	 * point to a physically contiguous block of memory.
45011 	 */
45012 	uint64_t	resp_addr;
45013 	uint32_t	enables;
45014 	/*
45015 	 * This bit must be '1' for the ring_arb_cfg field to be
45016 	 * configured.
45017 	 */
45018 	#define HWRM_RING_ALLOC_INPUT_ENABLES_RING_ARB_CFG \
45019 		UINT32_C(0x2)
45020 	/*
45021 	 * This bit must be '1' for the stat_ctx_id_valid field to be
45022 	 * configured.
45023 	 */
45024 	#define HWRM_RING_ALLOC_INPUT_ENABLES_STAT_CTX_ID_VALID \
45025 		UINT32_C(0x8)
45026 	/*
45027 	 * This bit must be '1' for the max_bw_valid field to be
45028 	 * configured.
45029 	 */
45030 	#define HWRM_RING_ALLOC_INPUT_ENABLES_MAX_BW_VALID \
45031 		UINT32_C(0x20)
45032 	/*
45033 	 * This bit must be '1' for the rx_ring_id field to be
45034 	 * configured.
45035 	 */
45036 	#define HWRM_RING_ALLOC_INPUT_ENABLES_RX_RING_ID_VALID \
45037 		UINT32_C(0x40)
45038 	/*
45039 	 * This bit must be '1' for the nq_ring_id field to be
45040 	 * configured.
45041 	 */
45042 	#define HWRM_RING_ALLOC_INPUT_ENABLES_NQ_RING_ID_VALID \
45043 		UINT32_C(0x80)
45044 	/*
45045 	 * This bit must be '1' for the rx_buf_size field to be
45046 	 * configured.
45047 	 */
45048 	#define HWRM_RING_ALLOC_INPUT_ENABLES_RX_BUF_SIZE_VALID \
45049 		UINT32_C(0x100)
45050 	/*
45051 	 * This bit must be '1' for the schq_id field to be
45052 	 * configured.
45053 	 */
45054 	#define HWRM_RING_ALLOC_INPUT_ENABLES_SCHQ_ID \
45055 		UINT32_C(0x200)
45056 	/*
45057 	 * This bit must be '1' for the mpc_chnls_type field to be
45058 	 * configured.
45059 	 */
45060 	#define HWRM_RING_ALLOC_INPUT_ENABLES_MPC_CHNLS_TYPE \
45061 		UINT32_C(0x400)
45062 	/*
45063 	 * This bit must be '1' for the steering_tag field to be
45064 	 * configured.
45065 	 */
45066 	#define HWRM_RING_ALLOC_INPUT_ENABLES_STEERING_TAG_VALID \
45067 		UINT32_C(0x800)
45068 	/*
45069 	 * This bit must be '1' for the rx_rate_profile_sel field to
45070 	 * be configured. This should only be used when
45071 	 * 'rx_rate_profile_sel_supported' bit is set in flags_ext3
45072 	 * field of FUNC_QCAPS response.
45073 	 */
45074 	#define HWRM_RING_ALLOC_INPUT_ENABLES_RX_RATE_PROFILE_VALID \
45075 		UINT32_C(0x1000)
45076 	/* Ring Type. */
45077 	uint8_t	ring_type;
45078 	/* L2 Completion Ring (CR) */
45079 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_L2_CMPL   UINT32_C(0x0)
45080 	/* TX Ring (TR) */
45081 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_TX        UINT32_C(0x1)
45082 	/* RX Ring (RR) */
45083 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_RX        UINT32_C(0x2)
45084 	/* RoCE Notification Completion Ring (ROCE_CR) */
45085 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_ROCE_CMPL UINT32_C(0x3)
45086 	/* RX Aggregation Ring */
45087 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_RX_AGG    UINT32_C(0x4)
45088 	/* Notification Queue */
45089 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_NQ        UINT32_C(0x5)
45090 	#define HWRM_RING_ALLOC_INPUT_RING_TYPE_LAST \
45091 		HWRM_RING_ALLOC_INPUT_RING_TYPE_NQ
45092 	/*
45093 	 * This field controls the number of packets transmitted before a TX
45094 	 * completion is generated. Non-zero values for the field are only
45095 	 * valid if HWRM_FUNC_QCAPS indicates that the TX coalesced completion
45096 	 * records capability is supported.
45097 	 */
45098 	uint8_t	cmpl_coal_cnt;
45099 	/* Generates a legacy TX completion on every packet. */
45100 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_OFF UINT32_C(0x0)
45101 	/* Generates a TX coalesced completion for up to 4 TX packets. */
45102 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_4   UINT32_C(0x1)
45103 	/* Generates a TX coalesced completion for up to 8 TX packets. */
45104 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_8   UINT32_C(0x2)
45105 	/* Generates a TX coalesced completion for up to 12 TX packets. */
45106 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_12  UINT32_C(0x3)
45107 	/* Generates a TX coalesced completion for up to 16 TX packets. */
45108 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_16  UINT32_C(0x4)
45109 	/* Generates a TX coalesced completion for up to 24 TX packets. */
45110 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_24  UINT32_C(0x5)
45111 	/* Generates a TX coalesced completion for up to 32 TX packets. */
45112 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_32  UINT32_C(0x6)
45113 	/* Generates a TX coalesced completion for up to 48 TX packets. */
45114 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_48  UINT32_C(0x7)
45115 	/* Generates a TX coalesced completion for up to 64 TX packets. */
45116 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_64  UINT32_C(0x8)
45117 	/* Generates a TX coalesced completion for up to 96 TX packets. */
45118 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_96  UINT32_C(0x9)
45119 	/* Generates a TX coalesced completion for up to 128 TX packets. */
45120 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_128 UINT32_C(0xa)
45121 	/* Generates a TX coalesced completion for up to 192 TX packets. */
45122 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_192 UINT32_C(0xb)
45123 	/* Generates a TX coalesced completion for up to 256 TX packets. */
45124 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_256 UINT32_C(0xc)
45125 	/* Generates a TX coalesced completion for up to 320 TX packets. */
45126 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_320 UINT32_C(0xd)
45127 	/* Generates a TX coalesced completion for up to 384 TX packets. */
45128 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_384 UINT32_C(0xe)
45129 	/* Generates a TX coalesced completion up to the last packet. (Maximum coalescing). */
45130 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_MAX UINT32_C(0xf)
45131 	#define HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_LAST \
45132 		HWRM_RING_ALLOC_INPUT_CMPL_COAL_CNT_COAL_MAX
45133 	/* Ring allocation flags. */
45134 	uint16_t	flags;
45135 	/*
45136 	 * For Rx rings, the incoming packet data can be placed at either
45137 	 * a 0B or 2B offset from the start of the Rx packet buffer. When
45138 	 * '1', the received packet will be padded with 2B of zeros at the
45139 	 * front of the packet. Note that this flag is only used for
45140 	 * Rx rings and is ignored for all other rings included Rx
45141 	 * Aggregation rings.
45142 	 */
45143 	#define HWRM_RING_ALLOC_INPUT_FLAGS_RX_SOP_PAD \
45144 		UINT32_C(0x1)
45145 	/*
45146 	 * When the HW Doorbell Drop Recovery feature is enabled,
45147 	 * HW can flag false CQ overflow when CQ consumer index
45148 	 * doorbells are dropped when there really wasn't any overflow.
45149 	 * The CQE values could have already been processed by the driver,
45150 	 * but HW doesn't know about this because of the doorbell drop.
45151 	 * To avoid false detection of CQ overflow events,
45152 	 * it is recommended that CQ overflow detection is disabled
45153 	 * by the driver when HW based doorbell recovery is enabled.
45154 	 */
45155 	#define HWRM_RING_ALLOC_INPUT_FLAGS_DISABLE_CQ_OVERFLOW_DETECTION \
45156 		UINT32_C(0x2)
45157 	/*
45158 	 * Used with enhanced Doorbell Pacing feature, when set to '1'
45159 	 * this flag indicates that the NQ id that's allocated should be
45160 	 * used for DBR pacing notifications.
45161 	 */
45162 	#define HWRM_RING_ALLOC_INPUT_FLAGS_NQ_DBR_PACING \
45163 		UINT32_C(0x4)
45164 	/*
45165 	 * Host driver should set this flag bit to '1' to enable
45166 	 * two-completion TX packet timestamp feature. By enabling this
45167 	 * per QP flag and enabling stamp bit in TX BD lflags, host drivers
45168 	 * expect two completions, one for regular TX completion and the
45169 	 * other completion with timestamp. For a QP with both completion
45170 	 * coalescing and timestamp completion features enabled, completion
45171 	 * coalescing takes place on regular TX completions. The timestamp
45172 	 * completions are not coalesced and a separate timestamp completion
45173 	 * is generated for each packet with stamp bit set in the TX BD
45174 	 * lflags.
45175 	 */
45176 	#define HWRM_RING_ALLOC_INPUT_FLAGS_TX_PKT_TS_CMPL_ENABLE \
45177 		UINT32_C(0x8)
45178 	/*
45179 	 * This value is a pointer to the page table for the
45180 	 * Ring.
45181 	 */
45182 	uint64_t	page_tbl_addr;
45183 	/* First Byte Offset of the first entry in the first page. */
45184 	uint32_t	fbo;
45185 	/*
45186 	 * Actual page size in 2^page_size. The supported range is increments
45187 	 * in powers of 2 from 16 bytes to 1GB.
45188 	 * - 4 = 16 B
45189 	 *     Page size is 16 B.
45190 	 * - 12 = 4 KB
45191 	 *     Page size is 4 KB.
45192 	 * - 13 = 8 KB
45193 	 *     Page size is 8 KB.
45194 	 * - 16 = 64 KB
45195 	 *     Page size is 64 KB.
45196 	 * - 21 = 2 MB
45197 	 *     Page size is 2 MB.
45198 	 * - 22 = 4 MB
45199 	 *     Page size is 4 MB.
45200 	 * - 30 = 1 GB
45201 	 *     Page size is 1 GB.
45202 	 */
45203 	uint8_t	page_size;
45204 	/*
45205 	 * This value indicates the depth of page table.
45206 	 * For this version of the specification, value other than 0 or
45207 	 * 1 shall be considered as an invalid value.
45208 	 * When the page_tbl_depth = 0, then it is treated as a
45209 	 * special case with the following.
45210 	 * 1. FBO and page size fields are not valid.
45211 	 * 2. page_tbl_addr is the physical address of the first
45212 	 *    element of the ring.
45213 	 */
45214 	uint8_t	page_tbl_depth;
45215 	/* Used by a PF driver to associate a SCHQ with one of its TX rings. */
45216 	uint16_t	schq_id;
45217 	/*
45218 	 * Number of 16B units in the ring. Minimum size for
45219 	 * a ring is 16 16B entries.
45220 	 */
45221 	uint32_t	length;
45222 	/*
45223 	 * Logical ring number for the ring to be allocated.
45224 	 * This value determines the position in the doorbell
45225 	 * area where the update to the ring will be made.
45226 	 *
45227 	 * For completion rings, this value is also the MSI-X
45228 	 * vector number for the function the completion ring is
45229 	 * associated with.
45230 	 */
45231 	uint16_t	logical_id;
45232 	/*
45233 	 * This field is used only when ring_type is a TX ring.
45234 	 * This value indicates what completion ring the TX ring
45235 	 * is associated with.
45236 	 */
45237 	uint16_t	cmpl_ring_id;
45238 	/*
45239 	 * This field is used only when ring_type is a TX ring.
45240 	 * This value indicates what CoS queue the TX ring
45241 	 * is associated with.
45242 	 */
45243 	uint16_t	queue_id;
45244 	/*
45245 	 * When allocating a Rx ring or Rx aggregation ring, this field
45246 	 * specifies the size of the buffer descriptors posted to the ring.
45247 	 */
45248 	uint16_t	rx_buf_size;
45249 	/*
45250 	 * When allocating an Rx aggregation ring, this field
45251 	 * specifies the associated Rx ring ID.
45252 	 */
45253 	uint16_t	rx_ring_id;
45254 	/*
45255 	 * When allocating a completion ring, this field
45256 	 * specifies the associated NQ ring ID.
45257 	 */
45258 	uint16_t	nq_ring_id;
45259 	/*
45260 	 * This field is used only when ring_type is a TX ring.
45261 	 * This field is used to configure arbitration related
45262 	 * parameters for a TX ring.
45263 	 */
45264 	uint16_t	ring_arb_cfg;
45265 	/* Arbitration policy used for the ring. */
45266 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_MASK \
45267 		UINT32_C(0xf)
45268 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_SFT       0
45269 	/*
45270 	 * Use strict priority for the TX ring.
45271 	 * Priority value is specified in arb_policy_param
45272 	 */
45273 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_SP \
45274 		UINT32_C(0x1)
45275 	/*
45276 	 * Use weighted fair queue arbitration for the TX ring.
45277 	 * Weight is specified in arb_policy_param
45278 	 */
45279 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_WFQ \
45280 		UINT32_C(0x2)
45281 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_LAST \
45282 		HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_WFQ
45283 	/* Reserved field. */
45284 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_RSVD_MASK \
45285 		UINT32_C(0xf0)
45286 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_RSVD_SFT             4
45287 	/*
45288 	 * Arbitration policy specific parameter.
45289 	 * # For strict priority arbitration policy, this field
45290 	 * represents a priority value. If set to 0, then the priority
45291 	 * is not specified and the HWRM is allowed to select
45292 	 * any priority for this TX ring.
45293 	 * # For weighted fair queue arbitration policy, this field
45294 	 * represents a weight value. If set to 0, then the weight
45295 	 * is not specified and the HWRM is allowed to select
45296 	 * any weight for this TX ring.
45297 	 */
45298 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_PARAM_MASK \
45299 		UINT32_C(0xff00)
45300 	#define HWRM_RING_ALLOC_INPUT_RING_ARB_CFG_ARB_POLICY_PARAM_SFT 8
45301 	/* Steering tag to use for memory transactions. */
45302 	uint16_t	steering_tag;
45303 	/*
45304 	 * This field is reserved for the future use.
45305 	 * It shall be set to 0.
45306 	 */
45307 	uint32_t	reserved3;
45308 	/*
45309 	 * This field is used only when ring_type is a TX ring.
45310 	 * This input indicates what statistics context this ring
45311 	 * should be associated with.
45312 	 */
45313 	uint32_t	stat_ctx_id;
45314 	/*
45315 	 * This field is reserved for the future use.
45316 	 * It shall be set to 0.
45317 	 */
45318 	uint32_t	reserved4;
45319 	/*
45320 	 * This field is used only when ring_type is a TX ring
45321 	 * to specify maximum BW allocated to the TX ring.
45322 	 * The HWRM will translate this value into byte counter and
45323 	 * time interval used for this ring inside the device.
45324 	 */
45325 	uint32_t	max_bw;
45326 	/* The bandwidth value. */
45327 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_MASK \
45328 		UINT32_C(0xfffffff)
45329 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_SFT              0
45330 	/* The granularity of the value (bits or bytes). */
45331 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_SCALE \
45332 		UINT32_C(0x10000000)
45333 	/* Value is in bits. */
45334 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_SCALE_BITS \
45335 		(UINT32_C(0x0) << 28)
45336 	/* Value is in bytes. */
45337 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_SCALE_BYTES \
45338 		(UINT32_C(0x1) << 28)
45339 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_SCALE_LAST \
45340 		HWRM_RING_ALLOC_INPUT_MAX_BW_SCALE_BYTES
45341 	/* bw_value_unit is 3 b */
45342 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_MASK \
45343 		UINT32_C(0xe0000000)
45344 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_SFT         29
45345 	/* Value is in Mb or MB (base 10). */
45346 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_MEGA \
45347 		(UINT32_C(0x0) << 29)
45348 	/* Value is in Kb or KB (base 10). */
45349 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_KILO \
45350 		(UINT32_C(0x2) << 29)
45351 	/* Value is in bits or bytes. */
45352 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_BASE \
45353 		(UINT32_C(0x4) << 29)
45354 	/* Value is in Gb or GB (base 10). */
45355 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_GIGA \
45356 		(UINT32_C(0x6) << 29)
45357 	/* Value is in 1/100th of a percentage of total bandwidth. */
45358 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_PERCENT1_100 \
45359 		(UINT32_C(0x1) << 29)
45360 	/* Invalid unit */
45361 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_INVALID \
45362 		(UINT32_C(0x7) << 29)
45363 	#define HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_LAST \
45364 		HWRM_RING_ALLOC_INPUT_MAX_BW_BW_VALUE_UNIT_INVALID
45365 	/*
45366 	 * This field is used only when ring_type is a Completion ring.
45367 	 * This value indicates what interrupt mode should be used
45368 	 * on this completion ring.
45369 	 * Note: In the legacy interrupt mode, no more than 16
45370 	 * completion rings are allowed.
45371 	 */
45372 	uint8_t	int_mode;
45373 	/* Legacy INTA (deprecated) */
45374 	#define HWRM_RING_ALLOC_INPUT_INT_MODE_LEGACY UINT32_C(0x0)
45375 	/* Reserved */
45376 	#define HWRM_RING_ALLOC_INPUT_INT_MODE_RSVD   UINT32_C(0x1)
45377 	/* MSI-X */
45378 	#define HWRM_RING_ALLOC_INPUT_INT_MODE_MSIX   UINT32_C(0x2)
45379 	/* No Interrupt - Polled mode */
45380 	#define HWRM_RING_ALLOC_INPUT_INT_MODE_POLL   UINT32_C(0x3)
45381 	#define HWRM_RING_ALLOC_INPUT_INT_MODE_LAST \
45382 		HWRM_RING_ALLOC_INPUT_INT_MODE_POLL
45383 	/* Midpath channel type */
45384 	uint8_t	mpc_chnls_type;
45385 	/*
45386 	 * Indicate the TX ring alloc MPC channel type is a MPC channel
45387 	 * with destination to the TX crypto engine block.
45388 	 */
45389 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_TCE     UINT32_C(0x0)
45390 	/*
45391 	 * Indicate the RX ring alloc MPC channel type is a MPC channel
45392 	 * with destination to the RX crypto engine block.
45393 	 */
45394 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_RCE     UINT32_C(0x1)
45395 	/*
45396 	 * Indicate the RX ring alloc MPC channel type is a MPC channel
45397 	 * with destination to the TX configurable flow processing block.
45398 	 */
45399 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_TE_CFA  UINT32_C(0x2)
45400 	/*
45401 	 * Indicate the RX ring alloc MPC channel type is a MPC channel
45402 	 * with destination to the RX configurable flow processing block.
45403 	 */
45404 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_RE_CFA  UINT32_C(0x3)
45405 	/*
45406 	 * Indicate the RX ring alloc MPC channel type is a MPC channel
45407 	 * with destination to the primate processor block.
45408 	 */
45409 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_PRIMATE UINT32_C(0x4)
45410 	#define HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_LAST \
45411 		HWRM_RING_ALLOC_INPUT_MPC_CHNLS_TYPE_PRIMATE
45412 	/* RX rate profile select */
45413 	uint8_t	rx_rate_profile_sel;
45414 	/*
45415 	 * Indicate default RX rate profile when allocating
45416 	 * RX or RX aggregation rings. This should only be
45417 	 * used when 'rx_rate_profile_sel_supported' bit is
45418 	 * set in flags_ext3 field of FUNC_QCAPS response.
45419 	 */
45420 	#define HWRM_RING_ALLOC_INPUT_RX_RATE_PROFILE_SEL_DEFAULT \
45421 		UINT32_C(0x0)
45422 	/*
45423 	 * Indicate poll_mode RX rate profile when allocating
45424 	 * RX or RX aggregation rings. This should only be
45425 	 * used when 'rx_rate_profile_sel_supported' bit is
45426 	 * set in flags_ext3 field of FUNC_QCAPS response.
45427 	 */
45428 	#define HWRM_RING_ALLOC_INPUT_RX_RATE_PROFILE_SEL_POLL_MODE \
45429 		UINT32_C(0x1)
45430 	#define HWRM_RING_ALLOC_INPUT_RX_RATE_PROFILE_SEL_LAST \
45431 		HWRM_RING_ALLOC_INPUT_RX_RATE_PROFILE_SEL_POLL_MODE
45432 	uint8_t	unused_4;
45433 	/*
45434 	 * The cq_handle is specified when allocating a completion ring. For
45435 	 * devices that support NQs, this cq_handle will be included in the
45436 	 * NQE to specify which CQ should be read to retrieve the completion
45437 	 * record.
45438 	 */
45439 	uint64_t	cq_handle;
45440 } __rte_packed_end;
45441 
45442 /* hwrm_ring_alloc_output (size:128b/16B) */
45443 struct __rte_packed_begin hwrm_ring_alloc_output {
45444 	/* The specific error status for the command. */
45445 	uint16_t	error_code;
45446 	/* The HWRM command request type. */
45447 	uint16_t	req_type;
45448 	/* The sequence ID from the original command. */
45449 	uint16_t	seq_id;
45450 	/* The length of the response data in number of bytes. */
45451 	uint16_t	resp_len;
45452 	/*
45453 	 * Physical number of ring allocated.
45454 	 * This value shall be unique for a ring type.
45455 	 */
45456 	uint16_t	ring_id;
45457 	/* Logical number of ring allocated. */
45458 	uint16_t	logical_ring_id;
45459 	/*
45460 	 * This field will tell whether to use ping or pong buffer
45461 	 * for first push operation.
45462 	 */
45463 	uint8_t	push_buffer_index;
45464 	/* Start push from ping buffer index */
45465 	#define HWRM_RING_ALLOC_OUTPUT_PUSH_BUFFER_INDEX_PING_BUFFER \
45466 		UINT32_C(0x0)
45467 	/* Start push from pong buffer index */
45468 	#define HWRM_RING_ALLOC_OUTPUT_PUSH_BUFFER_INDEX_PONG_BUFFER \
45469 		UINT32_C(0x1)
45470 	#define HWRM_RING_ALLOC_OUTPUT_PUSH_BUFFER_INDEX_LAST \
45471 		HWRM_RING_ALLOC_OUTPUT_PUSH_BUFFER_INDEX_PONG_BUFFER
45472 	uint8_t	unused_0[2];
45473 	/*
45474 	 * This field is used in Output records to indicate that the output
45475 	 * is completely written to RAM. This field should be read as '1'
45476 	 * to indicate that the output has been completely written. When
45477 	 * writing a command completion or response to an internal processor,
45478 	 * the order of writes has to be such that this field is written last.
45479 	 */
45480 	uint8_t	valid;
45481 } __rte_packed_end;
45482 
45483 /******************
45484  * hwrm_ring_free *
45485  ******************/
45486 
45487 
45488 /* hwrm_ring_free_input (size:256b/32B) */
45489 struct __rte_packed_begin hwrm_ring_free_input {
45490 	/* The HWRM command request type. */
45491 	uint16_t	req_type;
45492 	/*
45493 	 * The completion ring to send the completion event on. This should
45494 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45495 	 */
45496 	uint16_t	cmpl_ring;
45497 	/*
45498 	 * The sequence ID is used by the driver for tracking multiple
45499 	 * commands. This ID is treated as opaque data by the firmware and
45500 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45501 	 */
45502 	uint16_t	seq_id;
45503 	/*
45504 	 * The target ID of the command:
45505 	 * * 0x0-0xFFF8 - The function ID
45506 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45507 	 * * 0xFFFD - Reserved for user-space HWRM interface
45508 	 * * 0xFFFF - HWRM
45509 	 */
45510 	uint16_t	target_id;
45511 	/*
45512 	 * A physical address pointer pointing to a host buffer that the
45513 	 * command's response data will be written. This can be either a host
45514 	 * physical address (HPA) or a guest physical address (GPA) and must
45515 	 * point to a physically contiguous block of memory.
45516 	 */
45517 	uint64_t	resp_addr;
45518 	/* Ring Type. */
45519 	uint8_t	ring_type;
45520 	/* L2 Completion Ring (CR) */
45521 	#define HWRM_RING_FREE_INPUT_RING_TYPE_L2_CMPL   UINT32_C(0x0)
45522 	/* TX Ring (TR) */
45523 	#define HWRM_RING_FREE_INPUT_RING_TYPE_TX        UINT32_C(0x1)
45524 	/* RX Ring (RR) */
45525 	#define HWRM_RING_FREE_INPUT_RING_TYPE_RX        UINT32_C(0x2)
45526 	/* RoCE Notification Completion Ring (ROCE_CR) */
45527 	#define HWRM_RING_FREE_INPUT_RING_TYPE_ROCE_CMPL UINT32_C(0x3)
45528 	/* RX Aggregation Ring */
45529 	#define HWRM_RING_FREE_INPUT_RING_TYPE_RX_AGG    UINT32_C(0x4)
45530 	/* Notification Queue */
45531 	#define HWRM_RING_FREE_INPUT_RING_TYPE_NQ        UINT32_C(0x5)
45532 	#define HWRM_RING_FREE_INPUT_RING_TYPE_LAST \
45533 		HWRM_RING_FREE_INPUT_RING_TYPE_NQ
45534 	uint8_t	flags;
45535 	/*
45536 	 * If this bit is set to '1', ring_id in this command belongs to
45537 	 * virtio function. prod_idx in this command corresponds to doorbell
45538 	 * producer index. opaque field in this command needs to be inserted
45539 	 * by firmware in VEE_FLUSH completion record.
45540 	 * Firmware will poll the corresponding ring context to reach the
45541 	 * given producer index before sending successful response. It will
45542 	 * finish the completion using VEE_FLUSH completion record.
45543 	 *
45544 	 * If this bit is '0', firmware will not treat ring_id as virtio
45545 	 * ring and ignore prod_idx, opaque fields.
45546 	 *
45547 	 * This feature is not applicable for L2 or RoCE.
45548 	 */
45549 	#define HWRM_RING_FREE_INPUT_FLAGS_VIRTIO_RING_VALID UINT32_C(0x1)
45550 	#define HWRM_RING_FREE_INPUT_FLAGS_LAST \
45551 		HWRM_RING_FREE_INPUT_FLAGS_VIRTIO_RING_VALID
45552 	/* Physical number of ring allocated. */
45553 	uint16_t	ring_id;
45554 	/*
45555 	 * Ring BD producer index posted by the virtio block.
45556 	 * This field is valid if virtio_ring_valid flag is set.
45557 	 */
45558 	uint32_t	prod_idx;
45559 	/*
45560 	 * User defined opaque field to be inserted into VEE_FLUSH completion
45561 	 * record. This field is valid if virtio_ring_valid flag is set.
45562 	 */
45563 	uint32_t	opaque;
45564 	uint32_t	unused_1;
45565 } __rte_packed_end;
45566 
45567 /* hwrm_ring_free_output (size:128b/16B) */
45568 struct __rte_packed_begin hwrm_ring_free_output {
45569 	/* The specific error status for the command. */
45570 	uint16_t	error_code;
45571 	/* The HWRM command request type. */
45572 	uint16_t	req_type;
45573 	/* The sequence ID from the original command. */
45574 	uint16_t	seq_id;
45575 	/* The length of the response data in number of bytes. */
45576 	uint16_t	resp_len;
45577 	uint8_t	unused_0[7];
45578 	/*
45579 	 * This field is used in Output records to indicate that the output
45580 	 * is completely written to RAM. This field should be read as '1'
45581 	 * to indicate that the output has been completely written. When
45582 	 * writing a command completion or response to an internal processor,
45583 	 * the order of writes has to be such that this field is written last.
45584 	 */
45585 	uint8_t	valid;
45586 } __rte_packed_end;
45587 
45588 /*******************
45589  * hwrm_ring_reset *
45590  *******************/
45591 
45592 
45593 /* hwrm_ring_reset_input (size:192b/24B) */
45594 struct __rte_packed_begin hwrm_ring_reset_input {
45595 	/* The HWRM command request type. */
45596 	uint16_t	req_type;
45597 	/*
45598 	 * The completion ring to send the completion event on. This should
45599 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45600 	 */
45601 	uint16_t	cmpl_ring;
45602 	/*
45603 	 * The sequence ID is used by the driver for tracking multiple
45604 	 * commands. This ID is treated as opaque data by the firmware and
45605 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45606 	 */
45607 	uint16_t	seq_id;
45608 	/*
45609 	 * The target ID of the command:
45610 	 * * 0x0-0xFFF8 - The function ID
45611 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45612 	 * * 0xFFFD - Reserved for user-space HWRM interface
45613 	 * * 0xFFFF - HWRM
45614 	 */
45615 	uint16_t	target_id;
45616 	/*
45617 	 * A physical address pointer pointing to a host buffer that the
45618 	 * command's response data will be written. This can be either a host
45619 	 * physical address (HPA) or a guest physical address (GPA) and must
45620 	 * point to a physically contiguous block of memory.
45621 	 */
45622 	uint64_t	resp_addr;
45623 	/* Ring Type. */
45624 	uint8_t	ring_type;
45625 	/* L2 Completion Ring (CR) */
45626 	#define HWRM_RING_RESET_INPUT_RING_TYPE_L2_CMPL     UINT32_C(0x0)
45627 	/* TX Ring (TR) */
45628 	#define HWRM_RING_RESET_INPUT_RING_TYPE_TX          UINT32_C(0x1)
45629 	/* RX Ring (RR) */
45630 	#define HWRM_RING_RESET_INPUT_RING_TYPE_RX          UINT32_C(0x2)
45631 	/* RoCE Notification Completion Ring (ROCE_CR) */
45632 	#define HWRM_RING_RESET_INPUT_RING_TYPE_ROCE_CMPL   UINT32_C(0x3)
45633 	/*
45634 	 * Rx Ring Group. This is to reset rx and aggregation in an atomic
45635 	 * operation. Completion ring associated with this ring group is
45636 	 * not reset.
45637 	 */
45638 	#define HWRM_RING_RESET_INPUT_RING_TYPE_RX_RING_GRP UINT32_C(0x6)
45639 	#define HWRM_RING_RESET_INPUT_RING_TYPE_LAST \
45640 		HWRM_RING_RESET_INPUT_RING_TYPE_RX_RING_GRP
45641 	uint8_t	unused_0;
45642 	/*
45643 	 * Physical number of the ring. When ring type is rx_ring_grp, ring id
45644 	 * actually refers to ring group id.
45645 	 */
45646 	uint16_t	ring_id;
45647 	uint8_t	unused_1[4];
45648 } __rte_packed_end;
45649 
45650 /* hwrm_ring_reset_output (size:128b/16B) */
45651 struct __rte_packed_begin hwrm_ring_reset_output {
45652 	/* The specific error status for the command. */
45653 	uint16_t	error_code;
45654 	/* The HWRM command request type. */
45655 	uint16_t	req_type;
45656 	/* The sequence ID from the original command. */
45657 	uint16_t	seq_id;
45658 	/* The length of the response data in number of bytes. */
45659 	uint16_t	resp_len;
45660 	/*
45661 	 * This field will tell whether to use ping or pong buffer
45662 	 * for first push operation.
45663 	 */
45664 	uint8_t	push_buffer_index;
45665 	/* Start push from ping buffer index */
45666 	#define HWRM_RING_RESET_OUTPUT_PUSH_BUFFER_INDEX_PING_BUFFER \
45667 		UINT32_C(0x0)
45668 	/* Start push from pong buffer index */
45669 	#define HWRM_RING_RESET_OUTPUT_PUSH_BUFFER_INDEX_PONG_BUFFER \
45670 		UINT32_C(0x1)
45671 	#define HWRM_RING_RESET_OUTPUT_PUSH_BUFFER_INDEX_LAST \
45672 		HWRM_RING_RESET_OUTPUT_PUSH_BUFFER_INDEX_PONG_BUFFER
45673 	uint8_t	unused_0[3];
45674 	/* Position of consumer index after ring reset completes. */
45675 	uint8_t	consumer_idx[3];
45676 	/*
45677 	 * This field is used in Output records to indicate that the output
45678 	 * is completely written to RAM. This field should be read as '1'
45679 	 * to indicate that the output has been completely written. When
45680 	 * writing a command completion or response to an internal processor,
45681 	 * the order of writes has to be such that this field is written last.
45682 	 */
45683 	uint8_t	valid;
45684 } __rte_packed_end;
45685 
45686 /*****************
45687  * hwrm_ring_cfg *
45688  *****************/
45689 
45690 
45691 /* hwrm_ring_cfg_input (size:320b/40B) */
45692 struct __rte_packed_begin hwrm_ring_cfg_input {
45693 	/* The HWRM command request type. */
45694 	uint16_t	req_type;
45695 	/*
45696 	 * The completion ring to send the completion event on. This should
45697 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45698 	 */
45699 	uint16_t	cmpl_ring;
45700 	/*
45701 	 * The sequence ID is used by the driver for tracking multiple
45702 	 * commands. This ID is treated as opaque data by the firmware and
45703 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45704 	 */
45705 	uint16_t	seq_id;
45706 	/*
45707 	 * The target ID of the command:
45708 	 * * 0x0-0xFFF8 - The function ID
45709 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45710 	 * * 0xFFFD - Reserved for user-space HWRM interface
45711 	 * * 0xFFFF - HWRM
45712 	 */
45713 	uint16_t	target_id;
45714 	/*
45715 	 * A physical address pointer pointing to a host buffer that the
45716 	 * command's response data will be written. This can be either a host
45717 	 * physical address (HPA) or a guest physical address (GPA) and must
45718 	 * point to a physically contiguous block of memory.
45719 	 */
45720 	uint64_t	resp_addr;
45721 	/* Ring Type. */
45722 	uint8_t	ring_type;
45723 	/* TX Ring (TR) */
45724 	#define HWRM_RING_CFG_INPUT_RING_TYPE_TX UINT32_C(0x1)
45725 	/* RX Ring (RR) */
45726 	#define HWRM_RING_CFG_INPUT_RING_TYPE_RX UINT32_C(0x2)
45727 	#define HWRM_RING_CFG_INPUT_RING_TYPE_LAST \
45728 		HWRM_RING_CFG_INPUT_RING_TYPE_RX
45729 	uint8_t	unused_0;
45730 	/* Physical number of the ring. */
45731 	uint16_t	ring_id;
45732 	/* Ring config enable bits. */
45733 	uint16_t	enables;
45734 	/*
45735 	 * For Rx rings, the incoming packet data can be placed at either
45736 	 * a 0B, 2B, 10B or 12B offset from the start of the Rx packet
45737 	 * buffer.
45738 	 * When '1', the received packet will be padded with 2B, 10B or 12B
45739 	 * of zeros at the front of the packet. The exact offset is specified
45740 	 * by rx_sop_pad_bytes parameter.
45741 	 * When '0', the received packet will not be padded.
45742 	 * Note that this flag is only used for Rx rings and is ignored
45743 	 * for all other rings included Rx Aggregation rings.
45744 	 */
45745 	#define HWRM_RING_CFG_INPUT_ENABLES_RX_SOP_PAD_ENABLE \
45746 		UINT32_C(0x1)
45747 	/*
45748 	 * Proxy mode enable, for Tx, Rx and Rx aggregation rings only.
45749 	 * When rings are allocated, the PCI function on which driver issues
45750 	 * HWRM_RING_CFG command is assumed to own the rings. Hardware takes
45751 	 * the buffer descriptors (BDs) from those rings is assumed to issue
45752 	 * packet payload DMA using same PCI function. When proxy mode is
45753 	 * enabled, hardware can perform payload DMA using another PCI
45754 	 * function on same or different host.
45755 	 * When set to '0', the PCI function on which driver issues
45756 	 * HWRM_RING_CFG command is used for host payload DMA operation.
45757 	 * When set to '1', the host PCI function specified by proxy_fid is
45758 	 * used for host payload DMA operation.
45759 	 */
45760 	#define HWRM_RING_CFG_INPUT_ENABLES_PROXY_MODE_ENABLE \
45761 		UINT32_C(0x2)
45762 	/*
45763 	 * Tx ring packet source interface override, for Tx rings only.
45764 	 * When TX rings are allocated, the PCI function on which driver
45765 	 * issues HWRM_RING_CFG is assumed to be source interface of
45766 	 * packets sent from TX ring.
45767 	 * When set to '1', the host PCI function specified by proxy_fid
45768 	 * is used as source interface of the transmitted packets.
45769 	 */
45770 	#define HWRM_RING_CFG_INPUT_ENABLES_TX_PROXY_SRC_INTF_OVERRIDE \
45771 		UINT32_C(0x4)
45772 	/* The schq_id field is valid */
45773 	#define HWRM_RING_CFG_INPUT_ENABLES_SCHQ_ID \
45774 		UINT32_C(0x8)
45775 	/* Update completion ring ID associated with Tx or Rx ring. */
45776 	#define HWRM_RING_CFG_INPUT_ENABLES_CMPL_RING_ID_UPDATE \
45777 		UINT32_C(0x10)
45778 	/*
45779 	 * When set to '1', metadata value provided by tx_metadata
45780 	 * field in this command is inserted in the lb_header_metadata
45781 	 * QP context field. When set to '0', no change done to metadata.
45782 	 * Firmware rejects the tx ring metadata programming with
45783 	 * HWRM_ERR_CODE_UNSUPPORTED error if the per function CFA BD
45784 	 * metadata feature is not disabled.
45785 	 */
45786 	#define HWRM_RING_CFG_INPUT_ENABLES_TX_METADATA \
45787 		UINT32_C(0x20)
45788 	/*
45789 	 * Proxy function FID value.
45790 	 * This value is only used when either proxy_mode_enable flag or
45791 	 * tx_proxy_svif_override is set to '1'.
45792 	 * When proxy_mode_enable is set to '1', it identifies a host PCI
45793 	 * function used for host payload DMA operations.
45794 	 * When tx_proxy_src_intf is set to '1', it identifies a host PCI
45795 	 * function as source interface for all transmitted packets from
45796 	 * the TX ring.
45797 	 */
45798 	uint16_t	proxy_fid;
45799 	/*
45800 	 * Identifies the new scheduler queue (SCHQ) to associate with the
45801 	 * ring. Only valid for Tx rings.
45802 	 * A value of zero indicates that the Tx ring should be associated
45803 	 * with the default scheduler queue (SCHQ).
45804 	 */
45805 	uint16_t	schq_id;
45806 	/*
45807 	 * This field is valid for TX or Rx rings. This value identifies the
45808 	 * new completion ring ID to associate with the TX or Rx ring.
45809 	 */
45810 	uint16_t	cmpl_ring_id;
45811 	/*
45812 	 * Rx SOP padding amount in bytes.
45813 	 * This value is only used when rx_sop_pad_enable flag is set to '1'.
45814 	 */
45815 	uint8_t	rx_sop_pad_bytes;
45816 	uint8_t	unused_1[3];
45817 	/*
45818 	 * When tx_metadata enable bit is set, value specified in this field
45819 	 * is copied to lb_header_metadata in the QP context.
45820 	 */
45821 	uint32_t	tx_metadata;
45822 	uint8_t	unused_2[4];
45823 } __rte_packed_end;
45824 
45825 /* hwrm_ring_cfg_output (size:128b/16B) */
45826 struct __rte_packed_begin hwrm_ring_cfg_output {
45827 	/* The specific error status for the command. */
45828 	uint16_t	error_code;
45829 	/* The HWRM command request type. */
45830 	uint16_t	req_type;
45831 	/* The sequence ID from the original command. */
45832 	uint16_t	seq_id;
45833 	/* The length of the response data in number of bytes. */
45834 	uint16_t	resp_len;
45835 	uint8_t	unused_0[7];
45836 	/*
45837 	 * This field is used in Output records to indicate that the output
45838 	 * is completely written to RAM. This field should be read as '1'
45839 	 * to indicate that the output has been completely written.
45840 	 * When writing a command completion or response to an internal
45841 	 * processor, the order of writes has to be such that this field is
45842 	 * written last.
45843 	 */
45844 	uint8_t	valid;
45845 } __rte_packed_end;
45846 
45847 /******************
45848  * hwrm_ring_qcfg *
45849  ******************/
45850 
45851 
45852 /* hwrm_ring_qcfg_input (size:192b/24B) */
45853 struct __rte_packed_begin hwrm_ring_qcfg_input {
45854 	/* The HWRM command request type. */
45855 	uint16_t	req_type;
45856 	/*
45857 	 * The completion ring to send the completion event on. This should
45858 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
45859 	 */
45860 	uint16_t	cmpl_ring;
45861 	/*
45862 	 * The sequence ID is used by the driver for tracking multiple
45863 	 * commands. This ID is treated as opaque data by the firmware and
45864 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
45865 	 */
45866 	uint16_t	seq_id;
45867 	/*
45868 	 * The target ID of the command:
45869 	 * * 0x0-0xFFF8 - The function ID
45870 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
45871 	 * * 0xFFFD - Reserved for user-space HWRM interface
45872 	 * * 0xFFFF - HWRM
45873 	 */
45874 	uint16_t	target_id;
45875 	/*
45876 	 * A physical address pointer pointing to a host buffer that the
45877 	 * command's response data will be written. This can be either a host
45878 	 * physical address (HPA) or a guest physical address (GPA) and must
45879 	 * point to a physically contiguous block of memory.
45880 	 */
45881 	uint64_t	resp_addr;
45882 	/* Ring Type. */
45883 	uint8_t	ring_type;
45884 	/* TX Ring (TR) */
45885 	#define HWRM_RING_QCFG_INPUT_RING_TYPE_TX UINT32_C(0x1)
45886 	/* RX Ring (RR) */
45887 	#define HWRM_RING_QCFG_INPUT_RING_TYPE_RX UINT32_C(0x2)
45888 	#define HWRM_RING_QCFG_INPUT_RING_TYPE_LAST \
45889 		HWRM_RING_QCFG_INPUT_RING_TYPE_RX
45890 	uint8_t	unused_0[5];
45891 	/* Physical number of the ring. */
45892 	uint16_t	ring_id;
45893 } __rte_packed_end;
45894 
45895 /* hwrm_ring_qcfg_output (size:256b/32B) */
45896 struct __rte_packed_begin hwrm_ring_qcfg_output {
45897 	/* The specific error status for the command. */
45898 	uint16_t	error_code;
45899 	/* The HWRM command request type. */
45900 	uint16_t	req_type;
45901 	/* The sequence ID from the original command. */
45902 	uint16_t	seq_id;
45903 	/* The length of the response data in number of bytes. */
45904 	uint16_t	resp_len;
45905 	/* Ring config enable bits. */
45906 	uint16_t	enables;
45907 	/*
45908 	 * For Rx rings, the incoming packet data can be placed at either
45909 	 * a 0B, 2B, 10B or 12B offset from the start of the Rx packet
45910 	 * buffer.
45911 	 * When '1', the received packet will be padded with 2B, 10B or 12B
45912 	 * of zeros at the front of the packet. The exact offset is specified
45913 	 * by rx_sop_pad_bytes parameter.
45914 	 * When '0', the received packet will not be padded.
45915 	 * Note that this flag is only used for Rx rings and is ignored
45916 	 * for all other rings included Rx Aggregation rings.
45917 	 */
45918 	#define HWRM_RING_QCFG_OUTPUT_ENABLES_RX_SOP_PAD_ENABLE \
45919 		UINT32_C(0x1)
45920 	/*
45921 	 * Proxy mode enable, for Tx, Rx and Rx aggregation rings only.
45922 	 * When rings are allocated, the PCI function on which driver issues
45923 	 * HWRM_RING_CFG command is assumed to own the rings. Hardware takes
45924 	 * the buffer descriptors (BDs) from those rings is assumed to issue
45925 	 * packet payload DMA using same PCI function. When proxy mode is
45926 	 * enabled, hardware can perform payload DMA using another PCI
45927 	 * function on same or different host.
45928 	 * When set to '0', the PCI function on which driver issues
45929 	 * HWRM_RING_CFG command is used for host payload DMA operation.
45930 	 * When set to '1', the host PCI function specified by proxy_fid is
45931 	 * used for host payload DMA operation.
45932 	 */
45933 	#define HWRM_RING_QCFG_OUTPUT_ENABLES_PROXY_MODE_ENABLE \
45934 		UINT32_C(0x2)
45935 	/*
45936 	 * Tx ring packet source interface override, for Tx rings only.
45937 	 * When TX rings are allocated, the PCI function on which driver
45938 	 * issues HWRM_RING_CFG is assumed to be source interface of
45939 	 * packets sent from TX ring.
45940 	 * When set to '1', the host PCI function specified by proxy_fid is
45941 	 * used as source interface of the transmitted packets.
45942 	 */
45943 	#define HWRM_RING_QCFG_OUTPUT_ENABLES_TX_PROXY_SRC_INTF_OVERRIDE \
45944 		UINT32_C(0x4)
45945 	/*
45946 	 * Proxy function FID value.
45947 	 * This value is only used when either proxy_mode_enable flag or
45948 	 * tx_proxy_svif_override is set to '1'.
45949 	 * When proxy_mode_enable is set to '1', it identifies a host PCI
45950 	 * function used for host payload DMA operations.
45951 	 * When tx_proxy_src_intf is set to '1', it identifies a host PCI
45952 	 * function as source interface for all transmitted packets from the TX
45953 	 * ring.
45954 	 */
45955 	uint16_t	proxy_fid;
45956 	/*
45957 	 * Identifies the new scheduler queue (SCHQ) to associate with the
45958 	 * ring. Only valid for Tx rings.
45959 	 * A value of zero indicates that the Tx ring should be associated with
45960 	 * the default scheduler queue (SCHQ).
45961 	 */
45962 	uint16_t	schq_id;
45963 	/*
45964 	 * This field is used when ring_type is a TX or Rx ring.
45965 	 * This value indicates what completion ring the TX or Rx ring
45966 	 * is associated with.
45967 	 */
45968 	uint16_t	cmpl_ring_id;
45969 	/*
45970 	 * Rx SOP padding amount in bytes.
45971 	 * This value is only used when rx_sop_pad_enable flag is set to '1'.
45972 	 */
45973 	uint8_t	rx_sop_pad_bytes;
45974 	uint8_t	unused_0[3];
45975 	/* lb_header_metadata in the QP context is copied to this field. */
45976 	uint32_t	tx_metadata;
45977 	uint8_t	unused_1[7];
45978 	/*
45979 	 * This field is used in Output records to indicate that the output
45980 	 * is completely written to RAM. This field should be read as '1'
45981 	 * to indicate that the output has been completely written.
45982 	 * When writing a command completion or response to an internal
45983 	 * processor, the order of writes has to be such that this field is
45984 	 * written last.
45985 	 */
45986 	uint8_t	valid;
45987 } __rte_packed_end;
45988 
45989 /**************************
45990  * hwrm_ring_aggint_qcaps *
45991  **************************/
45992 
45993 
45994 /* hwrm_ring_aggint_qcaps_input (size:128b/16B) */
45995 struct __rte_packed_begin hwrm_ring_aggint_qcaps_input {
45996 	/* The HWRM command request type. */
45997 	uint16_t	req_type;
45998 	/*
45999 	 * The completion ring to send the completion event on. This should
46000 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
46001 	 */
46002 	uint16_t	cmpl_ring;
46003 	/*
46004 	 * The sequence ID is used by the driver for tracking multiple
46005 	 * commands. This ID is treated as opaque data by the firmware and
46006 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
46007 	 */
46008 	uint16_t	seq_id;
46009 	/*
46010 	 * The target ID of the command:
46011 	 * * 0x0-0xFFF8 - The function ID
46012 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
46013 	 * * 0xFFFD - Reserved for user-space HWRM interface
46014 	 * * 0xFFFF - HWRM
46015 	 */
46016 	uint16_t	target_id;
46017 	/*
46018 	 * A physical address pointer pointing to a host buffer that the
46019 	 * command's response data will be written. This can be either a host
46020 	 * physical address (HPA) or a guest physical address (GPA) and must
46021 	 * point to a physically contiguous block of memory.
46022 	 */
46023 	uint64_t	resp_addr;
46024 } __rte_packed_end;
46025 
46026 /* hwrm_ring_aggint_qcaps_output (size:384b/48B) */
46027 struct __rte_packed_begin hwrm_ring_aggint_qcaps_output {
46028 	/* The specific error status for the command. */
46029 	uint16_t	error_code;
46030 	/* The HWRM command request type. */
46031 	uint16_t	req_type;
46032 	/* The sequence ID from the original command. */
46033 	uint16_t	seq_id;
46034 	/* The length of the response data in number of bytes. */
46035 	uint16_t	resp_len;
46036 	uint32_t	cmpl_params;
46037 	/*
46038 	 * When this bit is set to '1', int_lat_tmr_min can be configured
46039 	 * on completion rings.
46040 	 */
46041 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_INT_LAT_TMR_MIN \
46042 		UINT32_C(0x1)
46043 	/*
46044 	 * When this bit is set to '1', int_lat_tmr_max can be configured
46045 	 * on completion rings.
46046 	 */
46047 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_INT_LAT_TMR_MAX \
46048 		UINT32_C(0x2)
46049 	/*
46050 	 * When this bit is set to '1', timer_reset can be enabled
46051 	 * on completion rings.
46052 	 */
46053 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_TIMER_RESET \
46054 		UINT32_C(0x4)
46055 	/*
46056 	 * When this bit is set to '1', ring_idle can be enabled
46057 	 * on completion rings.
46058 	 */
46059 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_RING_IDLE \
46060 		UINT32_C(0x8)
46061 	/*
46062 	 * When this bit is set to '1', num_cmpl_dma_aggr can be configured
46063 	 * on completion rings.
46064 	 */
46065 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_NUM_CMPL_DMA_AGGR \
46066 		UINT32_C(0x10)
46067 	/*
46068 	 * When this bit is set to '1', num_cmpl_dma_aggr_during_int can be
46069 	 * configured on completion rings.
46070 	 */
46071 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_NUM_CMPL_DMA_AGGR_DURING_INT \
46072 		UINT32_C(0x20)
46073 	/*
46074 	 * When this bit is set to '1', cmpl_aggr_dma_tmr can be configured
46075 	 * on completion rings.
46076 	 */
46077 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_CMPL_AGGR_DMA_TMR \
46078 		UINT32_C(0x40)
46079 	/*
46080 	 * When this bit is set to '1', cmpl_aggr_dma_tmr_during_int can be
46081 	 * configured on completion rings.
46082 	 */
46083 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_CMPL_AGGR_DMA_TMR_DURING_INT \
46084 		UINT32_C(0x80)
46085 	/*
46086 	 * When this bit is set to '1', num_cmpl_aggr_int can be configured
46087 	 * on completion rings.
46088 	 */
46089 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_CMPL_PARAMS_NUM_CMPL_AGGR_INT \
46090 		UINT32_C(0x100)
46091 	uint32_t	nq_params;
46092 	/*
46093 	 * When this bit is set to '1', int_lat_tmr_min can be configured
46094 	 * on notification queues.
46095 	 */
46096 	#define HWRM_RING_AGGINT_QCAPS_OUTPUT_NQ_PARAMS_INT_LAT_TMR_MIN \
46097 		UINT32_C(0x1)
46098 	/* Minimum value for num_cmpl_dma_aggr */
46099 	uint16_t	num_cmpl_dma_aggr_min;
46100 	/* Maximum value for num_cmpl_dma_aggr */
46101 	uint16_t	num_cmpl_dma_aggr_max;
46102 	/* Minimum value for num_cmpl_dma_aggr_during_int */
46103 	uint16_t	num_cmpl_dma_aggr_during_int_min;
46104 	/* Maximum value for num_cmpl_dma_aggr_during_int */
46105 	uint16_t	num_cmpl_dma_aggr_during_int_max;
46106 	/* Minimum value for cmpl_aggr_dma_tmr */
46107 	uint16_t	cmpl_aggr_dma_tmr_min;
46108 	/* Maximum value for cmpl_aggr_dma_tmr */
46109 	uint16_t	cmpl_aggr_dma_tmr_max;
46110 	/* Minimum value for cmpl_aggr_dma_tmr_during_int */
46111 	uint16_t	cmpl_aggr_dma_tmr_during_int_min;
46112 	/* Maximum value for cmpl_aggr_dma_tmr_during_int */
46113 	uint16_t	cmpl_aggr_dma_tmr_during_int_max;
46114 	/* Minimum value for int_lat_tmr_min */
46115 	uint16_t	int_lat_tmr_min_min;
46116 	/* Maximum value for int_lat_tmr_min */
46117 	uint16_t	int_lat_tmr_min_max;
46118 	/* Minimum value for int_lat_tmr_max */
46119 	uint16_t	int_lat_tmr_max_min;
46120 	/* Maximum value for int_lat_tmr_max */
46121 	uint16_t	int_lat_tmr_max_max;
46122 	/* Minimum value for num_cmpl_aggr_int */
46123 	uint16_t	num_cmpl_aggr_int_min;
46124 	/* Maximum value for num_cmpl_aggr_int */
46125 	uint16_t	num_cmpl_aggr_int_max;
46126 	/* The units for timer parameters, in nanoseconds. */
46127 	uint16_t	timer_units;
46128 	uint8_t	unused_0[1];
46129 	/*
46130 	 * This field is used in Output records to indicate that the output
46131 	 * is completely written to RAM. This field should be read as '1'
46132 	 * to indicate that the output has been completely written. When
46133 	 * writing a command completion or response to an internal processor,
46134 	 * the order of writes has to be such that this field is written last.
46135 	 */
46136 	uint8_t	valid;
46137 } __rte_packed_end;
46138 
46139 /**************************************
46140  * hwrm_ring_cmpl_ring_qaggint_params *
46141  **************************************/
46142 
46143 
46144 /* hwrm_ring_cmpl_ring_qaggint_params_input (size:192b/24B) */
46145 struct __rte_packed_begin hwrm_ring_cmpl_ring_qaggint_params_input {
46146 	/* The HWRM command request type. */
46147 	uint16_t	req_type;
46148 	/*
46149 	 * The completion ring to send the completion event on. This should
46150 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
46151 	 */
46152 	uint16_t	cmpl_ring;
46153 	/*
46154 	 * The sequence ID is used by the driver for tracking multiple
46155 	 * commands. This ID is treated as opaque data by the firmware and
46156 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
46157 	 */
46158 	uint16_t	seq_id;
46159 	/*
46160 	 * The target ID of the command:
46161 	 * * 0x0-0xFFF8 - The function ID
46162 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
46163 	 * * 0xFFFD - Reserved for user-space HWRM interface
46164 	 * * 0xFFFF - HWRM
46165 	 */
46166 	uint16_t	target_id;
46167 	/*
46168 	 * A physical address pointer pointing to a host buffer that the
46169 	 * command's response data will be written. This can be either a host
46170 	 * physical address (HPA) or a guest physical address (GPA) and must
46171 	 * point to a physically contiguous block of memory.
46172 	 */
46173 	uint64_t	resp_addr;
46174 	/* Physical number of completion ring. */
46175 	uint16_t	ring_id;
46176 	uint16_t	flags;
46177 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_INPUT_FLAGS_UNUSED_0_MASK \
46178 		UINT32_C(0x3)
46179 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_INPUT_FLAGS_UNUSED_0_SFT 0
46180 	/*
46181 	 * Set this flag to 1 when querying parameters on a notification
46182 	 * queue. Set this flag to 0 when querying parameters on a
46183 	 * completion queue or completion ring.
46184 	 */
46185 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_INPUT_FLAGS_IS_NQ \
46186 		UINT32_C(0x4)
46187 	uint8_t	unused_0[4];
46188 } __rte_packed_end;
46189 
46190 /* hwrm_ring_cmpl_ring_qaggint_params_output (size:256b/32B) */
46191 struct __rte_packed_begin hwrm_ring_cmpl_ring_qaggint_params_output {
46192 	/* The specific error status for the command. */
46193 	uint16_t	error_code;
46194 	/* The HWRM command request type. */
46195 	uint16_t	req_type;
46196 	/* The sequence ID from the original command. */
46197 	uint16_t	seq_id;
46198 	/* The length of the response data in number of bytes. */
46199 	uint16_t	resp_len;
46200 	uint16_t	flags;
46201 	/*
46202 	 * When this bit is set to '1', interrupt max
46203 	 * timer is reset whenever a completion is received.
46204 	 */
46205 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_OUTPUT_FLAGS_TIMER_RESET \
46206 		UINT32_C(0x1)
46207 	/*
46208 	 * When this bit is set to '1', ring idle mode
46209 	 * aggregation will be enabled.
46210 	 */
46211 	#define HWRM_RING_CMPL_RING_QAGGINT_PARAMS_OUTPUT_FLAGS_RING_IDLE \
46212 		UINT32_C(0x2)
46213 	/*
46214 	 * Number of completions to aggregate before DMA
46215 	 * during the normal mode.
46216 	 */
46217 	uint16_t	num_cmpl_dma_aggr;
46218 	/*
46219 	 * Number of completions to aggregate before DMA
46220 	 * during the interrupt mode.
46221 	 */
46222 	uint16_t	num_cmpl_dma_aggr_during_int;
46223 	/*
46224 	 * Timer used to aggregate completions before
46225 	 * DMA during the normal mode (not in interrupt mode).
46226 	 */
46227 	uint16_t	cmpl_aggr_dma_tmr;
46228 	/*
46229 	 * Timer used to aggregate completions before
46230 	 * DMA when in interrupt mode.
46231 	 */
46232 	uint16_t	cmpl_aggr_dma_tmr_during_int;
46233 	/* Minimum time between two interrupts. */
46234 	uint16_t	int_lat_tmr_min;
46235 	/*
46236 	 * Maximum wait time spent aggregating
46237 	 * completions before signaling the interrupt after the
46238 	 * interrupt is enabled.
46239 	 */
46240 	uint16_t	int_lat_tmr_max;
46241 	/*
46242 	 * Minimum number of completions aggregated before signaling
46243 	 * an interrupt.
46244 	 */
46245 	uint16_t	num_cmpl_aggr_int;
46246 	uint8_t	unused_0[7];
46247 	/*
46248 	 * This field is used in Output records to indicate that the output
46249 	 * is completely written to RAM. This field should be read as '1'
46250 	 * to indicate that the output has been completely written. When
46251 	 * writing a command completion or response to an internal processor,
46252 	 * the order of writes has to be such that this field is written last.
46253 	 */
46254 	uint8_t	valid;
46255 } __rte_packed_end;
46256 
46257 /*****************************************
46258  * hwrm_ring_cmpl_ring_cfg_aggint_params *
46259  *****************************************/
46260 
46261 
46262 /* hwrm_ring_cmpl_ring_cfg_aggint_params_input (size:320b/40B) */
46263 struct __rte_packed_begin hwrm_ring_cmpl_ring_cfg_aggint_params_input {
46264 	/* The HWRM command request type. */
46265 	uint16_t	req_type;
46266 	/*
46267 	 * The completion ring to send the completion event on. This should
46268 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
46269 	 */
46270 	uint16_t	cmpl_ring;
46271 	/*
46272 	 * The sequence ID is used by the driver for tracking multiple
46273 	 * commands. This ID is treated as opaque data by the firmware and
46274 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
46275 	 */
46276 	uint16_t	seq_id;
46277 	/*
46278 	 * The target ID of the command:
46279 	 * * 0x0-0xFFF8 - The function ID
46280 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
46281 	 * * 0xFFFD - Reserved for user-space HWRM interface
46282 	 * * 0xFFFF - HWRM
46283 	 */
46284 	uint16_t	target_id;
46285 	/*
46286 	 * A physical address pointer pointing to a host buffer that the
46287 	 * command's response data will be written. This can be either a host
46288 	 * physical address (HPA) or a guest physical address (GPA) and must
46289 	 * point to a physically contiguous block of memory.
46290 	 */
46291 	uint64_t	resp_addr;
46292 	/* Physical number of completion ring. */
46293 	uint16_t	ring_id;
46294 	uint16_t	flags;
46295 	/*
46296 	 * When this bit is set to '1', interrupt latency max
46297 	 * timer is reset whenever a completion is received.
46298 	 */
46299 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_FLAGS_TIMER_RESET \
46300 		UINT32_C(0x1)
46301 	/*
46302 	 * When this bit is set to '1', ring idle mode
46303 	 * aggregation will be enabled.
46304 	 */
46305 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_FLAGS_RING_IDLE \
46306 		UINT32_C(0x2)
46307 	/*
46308 	 * Set this flag to 1 when configuring parameters on a
46309 	 * notification queue. Set this flag to 0 when configuring
46310 	 * parameters on a completion queue or completion ring.
46311 	 */
46312 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_FLAGS_IS_NQ \
46313 		UINT32_C(0x4)
46314 	/*
46315 	 * Number of completions to aggregate before DMA
46316 	 * during the normal mode.
46317 	 */
46318 	uint16_t	num_cmpl_dma_aggr;
46319 	/*
46320 	 * Number of completions to aggregate before DMA
46321 	 * during the interrupt mode.
46322 	 */
46323 	uint16_t	num_cmpl_dma_aggr_during_int;
46324 	/*
46325 	 * Timer used to aggregate completions before
46326 	 * DMA during the normal mode (not in interrupt mode).
46327 	 */
46328 	uint16_t	cmpl_aggr_dma_tmr;
46329 	/*
46330 	 * Timer used to aggregate completions before
46331 	 * DMA while in interrupt mode.
46332 	 */
46333 	uint16_t	cmpl_aggr_dma_tmr_during_int;
46334 	/* Minimum time between two interrupts. */
46335 	uint16_t	int_lat_tmr_min;
46336 	/*
46337 	 * Maximum wait time spent aggregating
46338 	 * completions before signaling the interrupt after the
46339 	 * interrupt is enabled.
46340 	 */
46341 	uint16_t	int_lat_tmr_max;
46342 	/*
46343 	 * Minimum number of completions aggregated before signaling
46344 	 * an interrupt.
46345 	 */
46346 	uint16_t	num_cmpl_aggr_int;
46347 	/*
46348 	 * Bitfield that indicates which parameters are to be applied. Only
46349 	 * required when configuring devices with notification queues, and
46350 	 * used in that case to set certain parameters on completion queues
46351 	 * and others on notification queues.
46352 	 */
46353 	uint16_t	enables;
46354 	/*
46355 	 * This bit must be '1' for the num_cmpl_dma_aggr field to be
46356 	 * configured.
46357 	 */
46358 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_NUM_CMPL_DMA_AGGR \
46359 		UINT32_C(0x1)
46360 	/*
46361 	 * This bit must be '1' for the num_cmpl_dma_aggr_during_int field to
46362 	 * be configured.
46363 	 */
46364 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_NUM_CMPL_DMA_AGGR_DURING_INT \
46365 		UINT32_C(0x2)
46366 	/*
46367 	 * This bit must be '1' for the cmpl_aggr_dma_tmr field to be
46368 	 * configured.
46369 	 */
46370 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_CMPL_AGGR_DMA_TMR \
46371 		UINT32_C(0x4)
46372 	/*
46373 	 * This bit must be '1' for the int_lat_tmr_min field to be
46374 	 * configured.
46375 	 */
46376 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_INT_LAT_TMR_MIN \
46377 		UINT32_C(0x8)
46378 	/*
46379 	 * This bit must be '1' for the int_lat_tmr_max field to be
46380 	 * configured.
46381 	 */
46382 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_INT_LAT_TMR_MAX \
46383 		UINT32_C(0x10)
46384 	/*
46385 	 * This bit must be '1' for the num_cmpl_aggr_int field to be
46386 	 * configured.
46387 	 */
46388 	#define HWRM_RING_CMPL_RING_CFG_AGGINT_PARAMS_INPUT_ENABLES_NUM_CMPL_AGGR_INT \
46389 		UINT32_C(0x20)
46390 	uint8_t	unused_0[4];
46391 } __rte_packed_end;
46392 
46393 /* hwrm_ring_cmpl_ring_cfg_aggint_params_output (size:128b/16B) */
46394 struct __rte_packed_begin hwrm_ring_cmpl_ring_cfg_aggint_params_output {
46395 	/* The specific error status for the command. */
46396 	uint16_t	error_code;
46397 	/* The HWRM command request type. */
46398 	uint16_t	req_type;
46399 	/* The sequence ID from the original command. */
46400 	uint16_t	seq_id;
46401 	/* The length of the response data in number of bytes. */
46402 	uint16_t	resp_len;
46403 	uint8_t	unused_0[7];
46404 	/*
46405 	 * This field is used in Output records to indicate that the output
46406 	 * is completely written to RAM. This field should be read as '1'
46407 	 * to indicate that the output has been completely written. When
46408 	 * writing a command completion or response to an internal processor,
46409 	 * the order of writes has to be such that this field is written last.
46410 	 */
46411 	uint8_t	valid;
46412 } __rte_packed_end;
46413 
46414 /***********************
46415  * hwrm_ring_grp_alloc *
46416  ***********************/
46417 
46418 
46419 /* hwrm_ring_grp_alloc_input (size:192b/24B) */
46420 struct __rte_packed_begin hwrm_ring_grp_alloc_input {
46421 	/* The HWRM command request type. */
46422 	uint16_t	req_type;
46423 	/*
46424 	 * The completion ring to send the completion event on. This should
46425 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
46426 	 */
46427 	uint16_t	cmpl_ring;
46428 	/*
46429 	 * The sequence ID is used by the driver for tracking multiple
46430 	 * commands. This ID is treated as opaque data by the firmware and
46431 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
46432 	 */
46433 	uint16_t	seq_id;
46434 	/*
46435 	 * The target ID of the command:
46436 	 * * 0x0-0xFFF8 - The function ID
46437 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
46438 	 * * 0xFFFD - Reserved for user-space HWRM interface
46439 	 * * 0xFFFF - HWRM
46440 	 */
46441 	uint16_t	target_id;
46442 	/*
46443 	 * A physical address pointer pointing to a host buffer that the
46444 	 * command's response data will be written. This can be either a host
46445 	 * physical address (HPA) or a guest physical address (GPA) and must
46446 	 * point to a physically contiguous block of memory.
46447 	 */
46448 	uint64_t	resp_addr;
46449 	/*
46450 	 * This value identifies the CR associated with the ring
46451 	 * group.
46452 	 */
46453 	uint16_t	cr;
46454 	/*
46455 	 * This value identifies the main RR associated with the ring
46456 	 * group.
46457 	 */
46458 	uint16_t	rr;
46459 	/*
46460 	 * This value identifies the aggregation RR associated with
46461 	 * the ring group. If this value is 0xFF... (All Fs), then no
46462 	 * Aggregation ring will be set.
46463 	 */
46464 	uint16_t	ar;
46465 	/*
46466 	 * This value identifies the statistics context associated
46467 	 * with the ring group.
46468 	 */
46469 	uint16_t	sc;
46470 } __rte_packed_end;
46471 
46472 /* hwrm_ring_grp_alloc_output (size:128b/16B) */
46473 struct __rte_packed_begin hwrm_ring_grp_alloc_output {
46474 	/* The specific error status for the command. */
46475 	uint16_t	error_code;
46476 	/* The HWRM command request type. */
46477 	uint16_t	req_type;
46478 	/* The sequence ID from the original command. */
46479 	uint16_t	seq_id;
46480 	/* The length of the response data in number of bytes. */
46481 	uint16_t	resp_len;
46482 	/*
46483 	 * This is the ring group ID value. Use this value to program
46484 	 * the default ring group for the VNIC or as table entries
46485 	 * in an RSS/COS context.
46486 	 */
46487 	uint32_t	ring_group_id;
46488 	uint8_t	unused_0[3];
46489 	/*
46490 	 * This field is used in Output records to indicate that the output
46491 	 * is completely written to RAM. This field should be read as '1'
46492 	 * to indicate that the output has been completely written. When
46493 	 * writing a command completion or response to an internal processor,
46494 	 * the order of writes has to be such that this field is written last.
46495 	 */
46496 	uint8_t	valid;
46497 } __rte_packed_end;
46498 
46499 /**********************
46500  * hwrm_ring_grp_free *
46501  **********************/
46502 
46503 
46504 /* hwrm_ring_grp_free_input (size:192b/24B) */
46505 struct __rte_packed_begin hwrm_ring_grp_free_input {
46506 	/* The HWRM command request type. */
46507 	uint16_t	req_type;
46508 	/*
46509 	 * The completion ring to send the completion event on. This should
46510 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
46511 	 */
46512 	uint16_t	cmpl_ring;
46513 	/*
46514 	 * The sequence ID is used by the driver for tracking multiple
46515 	 * commands. This ID is treated as opaque data by the firmware and
46516 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
46517 	 */
46518 	uint16_t	seq_id;
46519 	/*
46520 	 * The target ID of the command:
46521 	 * * 0x0-0xFFF8 - The function ID
46522 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
46523 	 * * 0xFFFD - Reserved for user-space HWRM interface
46524 	 * * 0xFFFF - HWRM
46525 	 */
46526 	uint16_t	target_id;
46527 	/*
46528 	 * A physical address pointer pointing to a host buffer that the
46529 	 * command's response data will be written. This can be either a host
46530 	 * physical address (HPA) or a guest physical address (GPA) and must
46531 	 * point to a physically contiguous block of memory.
46532 	 */
46533 	uint64_t	resp_addr;
46534 	/* This is the ring group ID value. */
46535 	uint32_t	ring_group_id;
46536 	uint8_t	unused_0[4];
46537 } __rte_packed_end;
46538 
46539 /* hwrm_ring_grp_free_output (size:128b/16B) */
46540 struct __rte_packed_begin hwrm_ring_grp_free_output {
46541 	/* The specific error status for the command. */
46542 	uint16_t	error_code;
46543 	/* The HWRM command request type. */
46544 	uint16_t	req_type;
46545 	/* The sequence ID from the original command. */
46546 	uint16_t	seq_id;
46547 	/* The length of the response data in number of bytes. */
46548 	uint16_t	resp_len;
46549 	uint8_t	unused_0[7];
46550 	/*
46551 	 * This field is used in Output records to indicate that the output
46552 	 * is completely written to RAM. This field should be read as '1'
46553 	 * to indicate that the output has been completely written. When
46554 	 * writing a command completion or response to an internal processor,
46555 	 * the order of writes has to be such that this field is written last.
46556 	 */
46557 	uint8_t	valid;
46558 } __rte_packed_end;
46559 
46560 /************************
46561  * hwrm_ring_schq_alloc *
46562  ************************/
46563 
46564 
46565 /* hwrm_ring_schq_alloc_input (size:1088b/136B) */
46566 struct __rte_packed_begin hwrm_ring_schq_alloc_input {
46567 	/* The HWRM command request type. */
46568 	uint16_t	req_type;
46569 	/*
46570 	 * The completion ring to send the completion event on. This should
46571 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
46572 	 */
46573 	uint16_t	cmpl_ring;
46574 	/*
46575 	 * The sequence ID is used by the driver for tracking multiple
46576 	 * commands. This ID is treated as opaque data by the firmware and
46577 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
46578 	 */
46579 	uint16_t	seq_id;
46580 	/*
46581 	 * The target ID of the command:
46582 	 * * 0x0-0xFFF8 - The function ID
46583 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
46584 	 * * 0xFFFD - Reserved for user-space HWRM interface
46585 	 * * 0xFFFF - HWRM
46586 	 */
46587 	uint16_t	target_id;
46588 	/*
46589 	 * A physical address pointer pointing to a host buffer that the
46590 	 * command's response data will be written. This can be either a host
46591 	 * physical address (HPA) or a guest physical address (GPA) and must
46592 	 * point to a physically contiguous block of memory.
46593 	 */
46594 	uint64_t	resp_addr;
46595 	uint32_t	enables;
46596 	/*
46597 	 * This bit must be '1' for the tqm_ring0 fields to be
46598 	 * configured.
46599 	 */
46600 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING0     UINT32_C(0x1)
46601 	/*
46602 	 * This bit must be '1' for the tqm_ring1 fields to be
46603 	 * configured.
46604 	 */
46605 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING1     UINT32_C(0x2)
46606 	/*
46607 	 * This bit must be '1' for the tqm_ring2 fields to be
46608 	 * configured.
46609 	 */
46610 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING2     UINT32_C(0x4)
46611 	/*
46612 	 * This bit must be '1' for the tqm_ring3 fields to be
46613 	 * configured.
46614 	 */
46615 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING3     UINT32_C(0x8)
46616 	/*
46617 	 * This bit must be '1' for the tqm_ring4 fields to be
46618 	 * configured.
46619 	 */
46620 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING4     UINT32_C(0x10)
46621 	/*
46622 	 * This bit must be '1' for the tqm_ring5 fields to be
46623 	 * configured.
46624 	 */
46625 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING5     UINT32_C(0x20)
46626 	/*
46627 	 * This bit must be '1' for the tqm_ring6 fields to be
46628 	 * configured.
46629 	 */
46630 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING6     UINT32_C(0x40)
46631 	/*
46632 	 * This bit must be '1' for the tqm_ring7 fields to be
46633 	 * configured.
46634 	 */
46635 	#define HWRM_RING_SCHQ_ALLOC_INPUT_ENABLES_TQM_RING7     UINT32_C(0x80)
46636 	/* Reserved for future use. */
46637 	uint32_t	reserved;
46638 	/* TQM ring 0 page size and level. */
46639 	uint8_t	tqm_ring0_pg_size_tqm_ring0_lvl;
46640 	/* TQM ring 0 PBL indirect levels. */
46641 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_MASK \
46642 		UINT32_C(0xf)
46643 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_SFT       0
46644 	/* PBL pointer is physical start address. */
46645 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_0 \
46646 		UINT32_C(0x0)
46647 	/* PBL pointer points to PTE table. */
46648 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_1 \
46649 		UINT32_C(0x1)
46650 	/*
46651 	 * PBL pointer points to PDE table with each entry pointing to PTE
46652 	 * tables.
46653 	 */
46654 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2 \
46655 		UINT32_C(0x2)
46656 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LAST \
46657 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_LVL_LVL_2
46658 	/* TQM ring 0 page size. */
46659 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_MASK \
46660 		UINT32_C(0xf0)
46661 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_SFT   4
46662 	/* 4KB. */
46663 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_4K \
46664 		(UINT32_C(0x0) << 4)
46665 	/* 8KB. */
46666 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8K \
46667 		(UINT32_C(0x1) << 4)
46668 	/* 64KB. */
46669 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_64K \
46670 		(UINT32_C(0x2) << 4)
46671 	/* 2MB. */
46672 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_2M \
46673 		(UINT32_C(0x3) << 4)
46674 	/* 8MB. */
46675 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_8M \
46676 		(UINT32_C(0x4) << 4)
46677 	/* 1GB. */
46678 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G \
46679 		(UINT32_C(0x5) << 4)
46680 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_LAST \
46681 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING0_PG_SIZE_PG_1G
46682 	/* TQM ring 1 page size and level. */
46683 	uint8_t	tqm_ring1_pg_size_tqm_ring1_lvl;
46684 	/* TQM ring 1 PBL indirect levels. */
46685 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_MASK \
46686 		UINT32_C(0xf)
46687 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_SFT       0
46688 	/* PBL pointer is physical start address. */
46689 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_0 \
46690 		UINT32_C(0x0)
46691 	/* PBL pointer points to PTE table. */
46692 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_1 \
46693 		UINT32_C(0x1)
46694 	/*
46695 	 * PBL pointer points to PDE table with each entry pointing to PTE
46696 	 * tables.
46697 	 */
46698 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2 \
46699 		UINT32_C(0x2)
46700 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LAST \
46701 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_LVL_LVL_2
46702 	/* TQM ring 1 page size. */
46703 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_MASK \
46704 		UINT32_C(0xf0)
46705 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_SFT   4
46706 	/* 4KB. */
46707 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_4K \
46708 		(UINT32_C(0x0) << 4)
46709 	/* 8KB. */
46710 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8K \
46711 		(UINT32_C(0x1) << 4)
46712 	/* 64KB. */
46713 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_64K \
46714 		(UINT32_C(0x2) << 4)
46715 	/* 2MB. */
46716 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_2M \
46717 		(UINT32_C(0x3) << 4)
46718 	/* 8MB. */
46719 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_8M \
46720 		(UINT32_C(0x4) << 4)
46721 	/* 1GB. */
46722 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G \
46723 		(UINT32_C(0x5) << 4)
46724 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_LAST \
46725 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING1_PG_SIZE_PG_1G
46726 	/* TQM ring 2 page size and level. */
46727 	uint8_t	tqm_ring2_pg_size_tqm_ring2_lvl;
46728 	/* TQM ring 2 PBL indirect levels. */
46729 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_MASK \
46730 		UINT32_C(0xf)
46731 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_SFT       0
46732 	/* PBL pointer is physical start address. */
46733 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_0 \
46734 		UINT32_C(0x0)
46735 	/* PBL pointer points to PTE table. */
46736 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_1 \
46737 		UINT32_C(0x1)
46738 	/*
46739 	 * PBL pointer points to PDE table with each entry pointing to PTE
46740 	 * tables.
46741 	 */
46742 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2 \
46743 		UINT32_C(0x2)
46744 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LAST \
46745 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_LVL_LVL_2
46746 	/* TQM ring 2 page size. */
46747 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_MASK \
46748 		UINT32_C(0xf0)
46749 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_SFT   4
46750 	/* 4KB. */
46751 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_4K \
46752 		(UINT32_C(0x0) << 4)
46753 	/* 8KB. */
46754 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8K \
46755 		(UINT32_C(0x1) << 4)
46756 	/* 64KB. */
46757 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_64K \
46758 		(UINT32_C(0x2) << 4)
46759 	/* 2MB. */
46760 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_2M \
46761 		(UINT32_C(0x3) << 4)
46762 	/* 8MB. */
46763 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_8M \
46764 		(UINT32_C(0x4) << 4)
46765 	/* 1GB. */
46766 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G \
46767 		(UINT32_C(0x5) << 4)
46768 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_LAST \
46769 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING2_PG_SIZE_PG_1G
46770 	/* TQM ring 3 page size and level. */
46771 	uint8_t	tqm_ring3_pg_size_tqm_ring3_lvl;
46772 	/* TQM ring 3 PBL indirect levels. */
46773 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_MASK \
46774 		UINT32_C(0xf)
46775 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_SFT       0
46776 	/* PBL pointer is physical start address. */
46777 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_0 \
46778 		UINT32_C(0x0)
46779 	/* PBL pointer points to PTE table. */
46780 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_1 \
46781 		UINT32_C(0x1)
46782 	/*
46783 	 * PBL pointer points to PDE table with each entry pointing to PTE
46784 	 * tables.
46785 	 */
46786 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2 \
46787 		UINT32_C(0x2)
46788 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LAST \
46789 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_LVL_LVL_2
46790 	/* TQM ring 3 page size. */
46791 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_MASK \
46792 		UINT32_C(0xf0)
46793 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_SFT   4
46794 	/* 4KB. */
46795 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_4K \
46796 		(UINT32_C(0x0) << 4)
46797 	/* 8KB. */
46798 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8K \
46799 		(UINT32_C(0x1) << 4)
46800 	/* 64KB. */
46801 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_64K \
46802 		(UINT32_C(0x2) << 4)
46803 	/* 2MB. */
46804 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_2M \
46805 		(UINT32_C(0x3) << 4)
46806 	/* 8MB. */
46807 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_8M \
46808 		(UINT32_C(0x4) << 4)
46809 	/* 1GB. */
46810 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G \
46811 		(UINT32_C(0x5) << 4)
46812 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_LAST \
46813 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING3_PG_SIZE_PG_1G
46814 	/* TQM ring 4 page size and level. */
46815 	uint8_t	tqm_ring4_pg_size_tqm_ring4_lvl;
46816 	/* TQM ring 4 PBL indirect levels. */
46817 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_MASK \
46818 		UINT32_C(0xf)
46819 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_SFT       0
46820 	/* PBL pointer is physical start address. */
46821 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_0 \
46822 		UINT32_C(0x0)
46823 	/* PBL pointer points to PTE table. */
46824 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_1 \
46825 		UINT32_C(0x1)
46826 	/*
46827 	 * PBL pointer points to PDE table with each entry pointing to PTE
46828 	 * tables.
46829 	 */
46830 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2 \
46831 		UINT32_C(0x2)
46832 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LAST \
46833 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_LVL_LVL_2
46834 	/* TQM ring 4 page size. */
46835 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_MASK \
46836 		UINT32_C(0xf0)
46837 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_SFT   4
46838 	/* 4KB. */
46839 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_4K \
46840 		(UINT32_C(0x0) << 4)
46841 	/* 8KB. */
46842 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8K \
46843 		(UINT32_C(0x1) << 4)
46844 	/* 64KB. */
46845 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_64K \
46846 		(UINT32_C(0x2) << 4)
46847 	/* 2MB. */
46848 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_2M \
46849 		(UINT32_C(0x3) << 4)
46850 	/* 8MB. */
46851 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_8M \
46852 		(UINT32_C(0x4) << 4)
46853 	/* 1GB. */
46854 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G \
46855 		(UINT32_C(0x5) << 4)
46856 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_LAST \
46857 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING4_PG_SIZE_PG_1G
46858 	/* TQM ring 5 page size and level. */
46859 	uint8_t	tqm_ring5_pg_size_tqm_ring5_lvl;
46860 	/* TQM ring 5 PBL indirect levels. */
46861 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_MASK \
46862 		UINT32_C(0xf)
46863 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_SFT       0
46864 	/* PBL pointer is physical start address. */
46865 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_0 \
46866 		UINT32_C(0x0)
46867 	/* PBL pointer points to PTE table. */
46868 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_1 \
46869 		UINT32_C(0x1)
46870 	/*
46871 	 * PBL pointer points to PDE table with each entry pointing to PTE
46872 	 * tables.
46873 	 */
46874 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2 \
46875 		UINT32_C(0x2)
46876 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LAST \
46877 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_LVL_LVL_2
46878 	/* TQM ring 5 page size. */
46879 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_MASK \
46880 		UINT32_C(0xf0)
46881 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_SFT   4
46882 	/* 4KB. */
46883 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_4K \
46884 		(UINT32_C(0x0) << 4)
46885 	/* 8KB. */
46886 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8K \
46887 		(UINT32_C(0x1) << 4)
46888 	/* 64KB. */
46889 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_64K \
46890 		(UINT32_C(0x2) << 4)
46891 	/* 2MB. */
46892 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_2M \
46893 		(UINT32_C(0x3) << 4)
46894 	/* 8MB. */
46895 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_8M \
46896 		(UINT32_C(0x4) << 4)
46897 	/* 1GB. */
46898 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G \
46899 		(UINT32_C(0x5) << 4)
46900 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_LAST \
46901 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING5_PG_SIZE_PG_1G
46902 	/* TQM ring 6 page size and level. */
46903 	uint8_t	tqm_ring6_pg_size_tqm_ring6_lvl;
46904 	/* TQM ring 6 PBL indirect levels. */
46905 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_MASK \
46906 		UINT32_C(0xf)
46907 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_SFT       0
46908 	/* PBL pointer is physical start address. */
46909 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_0 \
46910 		UINT32_C(0x0)
46911 	/* PBL pointer points to PTE table. */
46912 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_1 \
46913 		UINT32_C(0x1)
46914 	/*
46915 	 * PBL pointer points to PDE table with each entry pointing to PTE
46916 	 * tables.
46917 	 */
46918 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2 \
46919 		UINT32_C(0x2)
46920 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LAST \
46921 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_LVL_LVL_2
46922 	/* TQM ring 6 page size. */
46923 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_MASK \
46924 		UINT32_C(0xf0)
46925 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_SFT   4
46926 	/* 4KB. */
46927 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_4K \
46928 		(UINT32_C(0x0) << 4)
46929 	/* 8KB. */
46930 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8K \
46931 		(UINT32_C(0x1) << 4)
46932 	/* 64KB. */
46933 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_64K \
46934 		(UINT32_C(0x2) << 4)
46935 	/* 2MB. */
46936 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_2M \
46937 		(UINT32_C(0x3) << 4)
46938 	/* 8MB. */
46939 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_8M \
46940 		(UINT32_C(0x4) << 4)
46941 	/* 1GB. */
46942 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G \
46943 		(UINT32_C(0x5) << 4)
46944 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_LAST \
46945 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING6_PG_SIZE_PG_1G
46946 	/* TQM ring 7 page size and level. */
46947 	uint8_t	tqm_ring7_pg_size_tqm_ring7_lvl;
46948 	/* TQM ring 7 PBL indirect levels. */
46949 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_MASK \
46950 		UINT32_C(0xf)
46951 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_SFT       0
46952 	/* PBL pointer is physical start address. */
46953 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_0 \
46954 		UINT32_C(0x0)
46955 	/* PBL pointer points to PTE table. */
46956 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_1 \
46957 		UINT32_C(0x1)
46958 	/*
46959 	 * PBL pointer points to PDE table with each entry pointing to PTE
46960 	 * tables.
46961 	 */
46962 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2 \
46963 		UINT32_C(0x2)
46964 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LAST \
46965 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_LVL_LVL_2
46966 	/* TQM ring 7 page size. */
46967 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_MASK \
46968 		UINT32_C(0xf0)
46969 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_SFT   4
46970 	/* 4KB. */
46971 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_4K \
46972 		(UINT32_C(0x0) << 4)
46973 	/* 8KB. */
46974 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8K \
46975 		(UINT32_C(0x1) << 4)
46976 	/* 64KB. */
46977 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_64K \
46978 		(UINT32_C(0x2) << 4)
46979 	/* 2MB. */
46980 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_2M \
46981 		(UINT32_C(0x3) << 4)
46982 	/* 8MB. */
46983 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_8M \
46984 		(UINT32_C(0x4) << 4)
46985 	/* 1GB. */
46986 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G \
46987 		(UINT32_C(0x5) << 4)
46988 	#define HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_LAST \
46989 		HWRM_RING_SCHQ_ALLOC_INPUT_TQM_RING7_PG_SIZE_PG_1G
46990 	/* TQM ring 0 page directory. */
46991 	uint64_t	tqm_ring0_page_dir;
46992 	/* TQM ring 1 page directory. */
46993 	uint64_t	tqm_ring1_page_dir;
46994 	/* TQM ring 2 page directory. */
46995 	uint64_t	tqm_ring2_page_dir;
46996 	/* TQM ring 3 page directory. */
46997 	uint64_t	tqm_ring3_page_dir;
46998 	/* TQM ring 4 page directory. */
46999 	uint64_t	tqm_ring4_page_dir;
47000 	/* TQM ring 5 page directory. */
47001 	uint64_t	tqm_ring5_page_dir;
47002 	/* TQM ring 6 page directory. */
47003 	uint64_t	tqm_ring6_page_dir;
47004 	/* TQM ring 7 page directory. */
47005 	uint64_t	tqm_ring7_page_dir;
47006 	/*
47007 	 * Number of TQM ring 0 entries.
47008 	 *
47009 	 * TQM fastpath rings should be sized large enough to accommodate the
47010 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
47011 	 * that can be enqueued to the TQM ring.
47012 	 *
47013 	 * Note that TQM ring sizes cannot be extended while the system is
47014 	 * operational. If a PF driver needs to extend a TQM ring, it needs
47015 	 * to delete the SCHQ and then reallocate it.
47016 	 */
47017 	uint32_t	tqm_ring0_num_entries;
47018 	/*
47019 	 * Number of TQM ring 1 entries.
47020 	 *
47021 	 * TQM fastpath rings should be sized large enough to accommodate the
47022 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
47023 	 * that can be enqueued to the TQM ring.
47024 	 *
47025 	 * Note that TQM ring sizes cannot be extended while the system is
47026 	 * operational. If a PF driver needs to extend a TQM ring, it needs
47027 	 * to delete the SCHQ and then reallocate it.
47028 	 */
47029 	uint32_t	tqm_ring1_num_entries;
47030 	/*
47031 	 * Number of TQM ring 2 entries.
47032 	 *
47033 	 * TQM fastpath rings should be sized large enough to accommodate the
47034 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
47035 	 * that can be enqueued to the TQM ring.
47036 	 *
47037 	 * Note that TQM ring sizes cannot be extended while the system is
47038 	 * operational. If a PF driver needs to extend a TQM ring, it needs
47039 	 * to delete the SCHQ and then reallocate it.
47040 	 */
47041 	uint32_t	tqm_ring2_num_entries;
47042 	/*
47043 	 * Number of TQM ring 3 entries.
47044 	 *
47045 	 * TQM fastpath rings should be sized large enough to accommodate the
47046 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
47047 	 * that can be enqueued to the TQM ring.
47048 	 *
47049 	 * Note that TQM ring sizes cannot be extended while the system is
47050 	 * operational. If a PF driver needs to extend a TQM ring, it needs
47051 	 * to delete the SCHQ and then reallocate it.
47052 	 */
47053 	uint32_t	tqm_ring3_num_entries;
47054 	/*
47055 	 * Number of TQM ring 4 entries.
47056 	 *
47057 	 * TQM fastpath rings should be sized large enough to accommodate the
47058 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
47059 	 * that can be enqueued to the TQM ring.
47060 	 *
47061 	 * Note that TQM ring sizes cannot be extended while the system is
47062 	 * operational. If a PF driver needs to extend a TQM ring, it needs
47063 	 * to delete the SCHQ and then reallocate it.
47064 	 */
47065 	uint32_t	tqm_ring4_num_entries;
47066 	/*
47067 	 * Number of TQM ring 5 entries.
47068 	 *
47069 	 * TQM fastpath rings should be sized large enough to accommodate the
47070 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
47071 	 * that can be enqueued to the TQM ring.
47072 	 *
47073 	 * Note that TQM ring sizes cannot be extended while the system is
47074 	 * operational. If a PF driver needs to extend a TQM ring, it needs
47075 	 * to delete the SCHQ and then reallocate it.
47076 	 */
47077 	uint32_t	tqm_ring5_num_entries;
47078 	/*
47079 	 * Number of TQM ring 6 entries.
47080 	 *
47081 	 * TQM fastpath rings should be sized large enough to accommodate the
47082 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
47083 	 * that can be enqueued to the TQM ring.
47084 	 *
47085 	 * Note that TQM ring sizes cannot be extended while the system is
47086 	 * operational. If a PF driver needs to extend a TQM ring, it needs
47087 	 * to delete the SCHQ and then reallocate it.
47088 	 */
47089 	uint32_t	tqm_ring6_num_entries;
47090 	/*
47091 	 * Number of TQM ring 7 entries.
47092 	 *
47093 	 * TQM fastpath rings should be sized large enough to accommodate the
47094 	 * maximum number of QPs (either L2 or RoCE, or both if shared)
47095 	 * that can be enqueued to the TQM ring.
47096 	 *
47097 	 * Note that TQM ring sizes cannot be extended while the system is
47098 	 * operational. If a PF driver needs to extend a TQM ring, it needs
47099 	 * to delete the SCHQ and then reallocate it.
47100 	 */
47101 	uint32_t	tqm_ring7_num_entries;
47102 	/* Number of bytes that have been allocated for each context entry. */
47103 	uint16_t	tqm_entry_size;
47104 	uint8_t	unused_0[6];
47105 } __rte_packed_end;
47106 
47107 /* hwrm_ring_schq_alloc_output (size:128b/16B) */
47108 struct __rte_packed_begin hwrm_ring_schq_alloc_output {
47109 	/* The specific error status for the command. */
47110 	uint16_t	error_code;
47111 	/* The HWRM command request type. */
47112 	uint16_t	req_type;
47113 	/* The sequence ID from the original command. */
47114 	uint16_t	seq_id;
47115 	/* The length of the response data in number of bytes. */
47116 	uint16_t	resp_len;
47117 	/*
47118 	 * This is an identifier for the SCHQ to be used in other HWRM commands
47119 	 * that need to reference this SCHQ. This value is greater than zero
47120 	 * (i.e. a schq_id of zero references the default SCHQ).
47121 	 */
47122 	uint16_t	schq_id;
47123 	uint8_t	unused_0[5];
47124 	/*
47125 	 * This field is used in Output records to indicate that the output
47126 	 * is completely written to RAM. This field should be read as '1'
47127 	 * to indicate that the output has been completely written. When
47128 	 * writing a command completion or response to an internal processor,
47129 	 * the order of writes has to be such that this field is written last.
47130 	 */
47131 	uint8_t	valid;
47132 } __rte_packed_end;
47133 
47134 /**********************
47135  * hwrm_ring_schq_cfg *
47136  **********************/
47137 
47138 
47139 /* hwrm_ring_schq_cfg_input (size:768b/96B) */
47140 struct __rte_packed_begin hwrm_ring_schq_cfg_input {
47141 	/* The HWRM command request type. */
47142 	uint16_t	req_type;
47143 	/*
47144 	 * The completion ring to send the completion event on. This should
47145 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47146 	 */
47147 	uint16_t	cmpl_ring;
47148 	/*
47149 	 * The sequence ID is used by the driver for tracking multiple
47150 	 * commands. This ID is treated as opaque data by the firmware and
47151 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47152 	 */
47153 	uint16_t	seq_id;
47154 	/*
47155 	 * The target ID of the command:
47156 	 * * 0x0-0xFFF8 - The function ID
47157 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47158 	 * * 0xFFFD - Reserved for user-space HWRM interface
47159 	 * * 0xFFFF - HWRM
47160 	 */
47161 	uint16_t	target_id;
47162 	/*
47163 	 * A physical address pointer pointing to a host buffer that the
47164 	 * command's response data will be written. This can be either a host
47165 	 * physical address (HPA) or a guest physical address (GPA) and must
47166 	 * point to a physically contiguous block of memory.
47167 	 */
47168 	uint64_t	resp_addr;
47169 	/*
47170 	 * Identifies the SCHQ being configured. A schq_id of zero refers to
47171 	 * the default SCHQ.
47172 	 */
47173 	uint16_t	schq_id;
47174 	/*
47175 	 * This field is an 8 bit bitmap that indicates which TCs are enabled
47176 	 * in this SCHQ. Bit 0 represents traffic class 0 and bit 7 represents
47177 	 * traffic class 7.
47178 	 */
47179 	uint8_t	tc_enabled;
47180 	uint8_t	unused_0;
47181 	uint32_t	flags;
47182 	/* The tc_max_bw array and the max_bw parameters are valid */
47183 	#define HWRM_RING_SCHQ_CFG_INPUT_FLAGS_TC_MAX_BW_ENABLED \
47184 		UINT32_C(0x1)
47185 	/* The tc_bw_reservation array is valid */
47186 	#define HWRM_RING_SCHQ_CFG_INPUT_FLAGS_TC_RESERVATION_ENABLED \
47187 		UINT32_C(0x2)
47188 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
47189 	uint32_t	max_bw_tc0;
47190 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
47191 	uint32_t	max_bw_tc1;
47192 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
47193 	uint32_t	max_bw_tc2;
47194 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
47195 	uint32_t	max_bw_tc3;
47196 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
47197 	uint32_t	max_bw_tc4;
47198 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
47199 	uint32_t	max_bw_tc5;
47200 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
47201 	uint32_t	max_bw_tc6;
47202 	/* Maximum bandwidth of the traffic class, specified in Mbps. */
47203 	uint32_t	max_bw_tc7;
47204 	/*
47205 	 * Bandwidth reservation for the traffic class, specified in percent.
47206 	 * A value of zero signifies that traffic belonging to this class
47207 	 * shares the bandwidth reservation for the same traffic class of
47208 	 * the default SCHQ.
47209 	 */
47210 	uint32_t	tc_bw_reservation0;
47211 	/*
47212 	 * Bandwidth reservation for the traffic class, specified in percent.
47213 	 * A value of zero signifies that traffic belonging to this class
47214 	 * shares the bandwidth reservation for the same traffic class of
47215 	 * the default SCHQ.
47216 	 */
47217 	uint32_t	tc_bw_reservation1;
47218 	/*
47219 	 * Bandwidth reservation for the traffic class, specified in percent.
47220 	 * A value of zero signifies that traffic belonging to this class
47221 	 * shares the bandwidth reservation for the same traffic class of
47222 	 * the default SCHQ.
47223 	 */
47224 	uint32_t	tc_bw_reservation2;
47225 	/*
47226 	 * Bandwidth reservation for the traffic class, specified in percent.
47227 	 * A value of zero signifies that traffic belonging to this class
47228 	 * shares the bandwidth reservation for the same traffic class of
47229 	 * the default SCHQ.
47230 	 */
47231 	uint32_t	tc_bw_reservation3;
47232 	/*
47233 	 * Bandwidth reservation for the traffic class, specified in percent.
47234 	 * A value of zero signifies that traffic belonging to this class
47235 	 * shares the bandwidth reservation for the same traffic class of
47236 	 * the default SCHQ.
47237 	 */
47238 	uint32_t	tc_bw_reservation4;
47239 	/*
47240 	 * Bandwidth reservation for the traffic class, specified in percent.
47241 	 * A value of zero signifies that traffic belonging to this class
47242 	 * shares the bandwidth reservation for the same traffic class of
47243 	 * the default SCHQ.
47244 	 */
47245 	uint32_t	tc_bw_reservation5;
47246 	/*
47247 	 * Bandwidth reservation for the traffic class, specified in percent.
47248 	 * A value of zero signifies that traffic belonging to this class
47249 	 * shares the bandwidth reservation for the same traffic class of
47250 	 * the default SCHQ.
47251 	 */
47252 	uint32_t	tc_bw_reservation6;
47253 	/*
47254 	 * Bandwidth reservation for the traffic class, specified in percent.
47255 	 * A value of zero signifies that traffic belonging to this class
47256 	 * shares the bandwidth reservation for the same traffic class of
47257 	 * the default SCHQ.
47258 	 */
47259 	uint32_t	tc_bw_reservation7;
47260 	/*
47261 	 * Indicates the max bandwidth for all enabled traffic classes in
47262 	 * this SCHQ, specified in Mbps.
47263 	 */
47264 	uint32_t	max_bw;
47265 	uint8_t	unused_1[4];
47266 } __rte_packed_end;
47267 
47268 /* hwrm_ring_schq_cfg_output (size:128b/16B) */
47269 struct __rte_packed_begin hwrm_ring_schq_cfg_output {
47270 	/* The specific error status for the command. */
47271 	uint16_t	error_code;
47272 	/* The HWRM command request type. */
47273 	uint16_t	req_type;
47274 	/* The sequence ID from the original command. */
47275 	uint16_t	seq_id;
47276 	/* The length of the response data in number of bytes. */
47277 	uint16_t	resp_len;
47278 	uint8_t	unused_0[7];
47279 	/*
47280 	 * This field is used in Output records to indicate that the output
47281 	 * is completely written to RAM. This field should be read as '1'
47282 	 * to indicate that the output has been completely written. When
47283 	 * writing a command completion or response to an internal processor,
47284 	 * the order of writes has to be such that this field is written last.
47285 	 */
47286 	uint8_t	valid;
47287 } __rte_packed_end;
47288 
47289 /***********************
47290  * hwrm_ring_schq_free *
47291  ***********************/
47292 
47293 
47294 /* hwrm_ring_schq_free_input (size:192b/24B) */
47295 struct __rte_packed_begin hwrm_ring_schq_free_input {
47296 	/* The HWRM command request type. */
47297 	uint16_t	req_type;
47298 	/*
47299 	 * The completion ring to send the completion event on. This should
47300 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47301 	 */
47302 	uint16_t	cmpl_ring;
47303 	/*
47304 	 * The sequence ID is used by the driver for tracking multiple
47305 	 * commands. This ID is treated as opaque data by the firmware and
47306 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47307 	 */
47308 	uint16_t	seq_id;
47309 	/*
47310 	 * The target ID of the command:
47311 	 * * 0x0-0xFFF8 - The function ID
47312 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47313 	 * * 0xFFFD - Reserved for user-space HWRM interface
47314 	 * * 0xFFFF - HWRM
47315 	 */
47316 	uint16_t	target_id;
47317 	/*
47318 	 * A physical address pointer pointing to a host buffer that the
47319 	 * command's response data will be written. This can be either a host
47320 	 * physical address (HPA) or a guest physical address (GPA) and must
47321 	 * point to a physically contiguous block of memory.
47322 	 */
47323 	uint64_t	resp_addr;
47324 	/* Identifies the SCHQ being freed. */
47325 	uint16_t	schq_id;
47326 	uint8_t	unused_0[6];
47327 } __rte_packed_end;
47328 
47329 /* hwrm_ring_schq_free_output (size:128b/16B) */
47330 struct __rte_packed_begin hwrm_ring_schq_free_output {
47331 	/* The specific error status for the command. */
47332 	uint16_t	error_code;
47333 	/* The HWRM command request type. */
47334 	uint16_t	req_type;
47335 	/* The sequence ID from the original command. */
47336 	uint16_t	seq_id;
47337 	/* The length of the response data in number of bytes. */
47338 	uint16_t	resp_len;
47339 	uint8_t	unused_0[7];
47340 	/*
47341 	 * This field is used in Output records to indicate that the output
47342 	 * is completely written to RAM. This field should be read as '1'
47343 	 * to indicate that the output has been completely written. When
47344 	 * writing a command completion or response to an internal processor,
47345 	 * the order of writes has to be such that this field is written last.
47346 	 */
47347 	uint8_t	valid;
47348 } __rte_packed_end;
47349 /*
47350  * special reserved flow ID to identify per function default
47351  * flows for vSwitch offload
47352  */
47353 #define DEFAULT_FLOW_ID 0xFFFFFFFFUL
47354 /*
47355  * special reserved flow ID to identify per function RoCEv1
47356  * flows
47357  */
47358 #define ROCEV1_FLOW_ID 0xFFFFFFFEUL
47359 /*
47360  * special reserved flow ID to identify per function RoCEv2
47361  * flows
47362  */
47363 #define ROCEV2_FLOW_ID 0xFFFFFFFDUL
47364 /*
47365  * special reserved flow ID to identify per function RoCEv2
47366  * CNP flows
47367  */
47368 #define ROCEV2_CNP_FLOW_ID 0xFFFFFFFCUL
47369 
47370 /****************************
47371  * hwrm_cfa_l2_filter_alloc *
47372  ****************************/
47373 
47374 
47375 /* hwrm_cfa_l2_filter_alloc_input (size:768b/96B) */
47376 struct __rte_packed_begin hwrm_cfa_l2_filter_alloc_input {
47377 	/* The HWRM command request type. */
47378 	uint16_t	req_type;
47379 	/*
47380 	 * The completion ring to send the completion event on. This should
47381 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47382 	 */
47383 	uint16_t	cmpl_ring;
47384 	/*
47385 	 * The sequence ID is used by the driver for tracking multiple
47386 	 * commands. This ID is treated as opaque data by the firmware and
47387 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47388 	 */
47389 	uint16_t	seq_id;
47390 	/*
47391 	 * The target ID of the command:
47392 	 * * 0x0-0xFFF8 - The function ID
47393 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47394 	 * * 0xFFFD - Reserved for user-space HWRM interface
47395 	 * * 0xFFFF - HWRM
47396 	 */
47397 	uint16_t	target_id;
47398 	/*
47399 	 * A physical address pointer pointing to a host buffer that the
47400 	 * command's response data will be written. This can be either a host
47401 	 * physical address (HPA) or a guest physical address (GPA) and must
47402 	 * point to a physically contiguous block of memory.
47403 	 */
47404 	uint64_t	resp_addr;
47405 	uint32_t	flags;
47406 	/*
47407 	 * Enumeration denoting the RX, TX type of the resource.
47408 	 * This enumeration is used for resources that are similar for both
47409 	 * TX and RX paths of the chip.
47410 	 */
47411 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH \
47412 		UINT32_C(0x1)
47413 	/* tx path */
47414 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_TX \
47415 		UINT32_C(0x0)
47416 	/* rx path */
47417 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX \
47418 		UINT32_C(0x1)
47419 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_LAST \
47420 		HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_PATH_RX
47421 	/*
47422 	 * Setting of this flag indicates the applicability to the loopback
47423 	 * path.
47424 	 */
47425 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK \
47426 		UINT32_C(0x2)
47427 	/*
47428 	 * Setting of this flag indicates drop action. If this flag is not
47429 	 * set, then it should be considered accept action.
47430 	 */
47431 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_DROP \
47432 		UINT32_C(0x4)
47433 	/*
47434 	 * If this flag is set, all t_l2_* fields are invalid
47435 	 * and they should not be specified.
47436 	 * If this flag is set, then l2_* fields refer to
47437 	 * fields of outermost L2 header.
47438 	 */
47439 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_OUTERMOST \
47440 		UINT32_C(0x8)
47441 	/*
47442 	 * Enumeration denoting NO_ROCE_L2 to support old drivers.
47443 	 * New driver L2 for only L2 traffic, ROCE for roce and l2 traffic
47444 	 */
47445 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_MASK \
47446 		UINT32_C(0x30)
47447 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_SFT       4
47448 	/* To support old drivers */
47449 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_NO_ROCE_L2 \
47450 		(UINT32_C(0x0) << 4)
47451 	/* Only L2 traffic */
47452 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_L2 \
47453 		(UINT32_C(0x1) << 4)
47454 	/* Roce & L2 traffic */
47455 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_ROCE \
47456 		(UINT32_C(0x2) << 4)
47457 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_LAST \
47458 		HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_TRAFFIC_ROCE
47459 	/*
47460 	 * Setting of this flag indicates that no XDP filter is created with
47461 	 * L2 filter.
47462 	 * 0 - legacy behavior, XDP filter is created with L2 filter
47463 	 * 1 - XDP filter won't be created with L2 filter
47464 	 */
47465 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_XDP_DISABLE \
47466 		UINT32_C(0x40)
47467 	/*
47468 	 * Setting this flag to 1 indicate the L2 fields in this command
47469 	 * pertain to source fields. Setting this flag to 0 indicate the
47470 	 * L2 fields in this command pertain to the destination fields
47471 	 * and this is the default/legacy behavior.
47472 	 */
47473 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_FLAGS_SOURCE_VALID \
47474 		UINT32_C(0x80)
47475 	uint32_t	enables;
47476 	/*
47477 	 * This bit must be '1' for the l2_addr field to be
47478 	 * configured.
47479 	 */
47480 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR \
47481 		UINT32_C(0x1)
47482 	/*
47483 	 * This bit must be '1' for the l2_addr_mask field to be
47484 	 * configured.
47485 	 */
47486 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK \
47487 		UINT32_C(0x2)
47488 	/*
47489 	 * This bit must be '1' for the l2_ovlan field to be
47490 	 * configured.
47491 	 */
47492 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN \
47493 		UINT32_C(0x4)
47494 	/*
47495 	 * This bit must be '1' for the l2_ovlan_mask field to be
47496 	 * configured.
47497 	 */
47498 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_OVLAN_MASK \
47499 		UINT32_C(0x8)
47500 	/*
47501 	 * This bit must be '1' for the l2_ivlan field to be
47502 	 * configured.
47503 	 */
47504 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN \
47505 		UINT32_C(0x10)
47506 	/*
47507 	 * This bit must be '1' for the l2_ivlan_mask field to be
47508 	 * configured.
47509 	 */
47510 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN_MASK \
47511 		UINT32_C(0x20)
47512 	/*
47513 	 * This bit must be '1' for the t_l2_addr field to be
47514 	 * configured.
47515 	 */
47516 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR \
47517 		UINT32_C(0x40)
47518 	/*
47519 	 * This bit must be '1' for the t_l2_addr_mask field to be
47520 	 * configured.
47521 	 */
47522 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_ADDR_MASK \
47523 		UINT32_C(0x80)
47524 	/*
47525 	 * This bit must be '1' for the t_l2_ovlan field to be
47526 	 * configured.
47527 	 */
47528 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN \
47529 		UINT32_C(0x100)
47530 	/*
47531 	 * This bit must be '1' for the t_l2_ovlan_mask field to be
47532 	 * configured.
47533 	 */
47534 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_OVLAN_MASK \
47535 		UINT32_C(0x200)
47536 	/*
47537 	 * This bit must be '1' for the t_l2_ivlan field to be
47538 	 * configured.
47539 	 */
47540 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN \
47541 		UINT32_C(0x400)
47542 	/*
47543 	 * This bit must be '1' for the t_l2_ivlan_mask field to be
47544 	 * configured.
47545 	 */
47546 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_L2_IVLAN_MASK \
47547 		UINT32_C(0x800)
47548 	/*
47549 	 * This bit must be '1' for the src_type field to be
47550 	 * configured.
47551 	 */
47552 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_TYPE \
47553 		UINT32_C(0x1000)
47554 	/*
47555 	 * This bit must be '1' for the src_id field to be
47556 	 * configured.
47557 	 */
47558 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_SRC_ID \
47559 		UINT32_C(0x2000)
47560 	/*
47561 	 * This bit must be '1' for the tunnel_type field to be
47562 	 * configured.
47563 	 */
47564 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
47565 		UINT32_C(0x4000)
47566 	/*
47567 	 * This bit must be '1' for the dst_id field to be
47568 	 * configured.
47569 	 */
47570 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_DST_ID \
47571 		UINT32_C(0x8000)
47572 	/*
47573 	 * This bit must be '1' for the mirror_vnic_id field to be
47574 	 * configured.
47575 	 */
47576 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
47577 		UINT32_C(0x10000)
47578 	/*
47579 	 * This bit must be '1' for the num_vlans field to be
47580 	 * configured.
47581 	 */
47582 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_NUM_VLANS \
47583 		UINT32_C(0x20000)
47584 	/*
47585 	 * This bit must be '1' for the t_num_vlans field to be
47586 	 * configured.
47587 	 */
47588 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_T_NUM_VLANS \
47589 		UINT32_C(0x40000)
47590 	/*
47591 	 * This value sets the match value for the L2 MAC address.
47592 	 * Destination MAC address for RX path.
47593 	 * Source MAC address for TX path.
47594 	 */
47595 	uint8_t	l2_addr[6];
47596 	/* This value sets the match value for the number of VLANs. */
47597 	uint8_t	num_vlans;
47598 	/*
47599 	 * This value sets the match value for the number of VLANs
47600 	 * in the tunnel headers.
47601 	 */
47602 	uint8_t	t_num_vlans;
47603 	/*
47604 	 * This value sets the mask value for the L2 address.
47605 	 * A value of 0 will mask the corresponding bit from
47606 	 * compare.
47607 	 */
47608 	uint8_t	l2_addr_mask[6];
47609 	/* This value sets VLAN ID value for outer VLAN. */
47610 	uint16_t	l2_ovlan;
47611 	/*
47612 	 * This value sets the mask value for the ovlan id.
47613 	 * A value of 0 will mask the corresponding bit from
47614 	 * compare.
47615 	 */
47616 	uint16_t	l2_ovlan_mask;
47617 	/* This value sets VLAN ID value for inner VLAN. */
47618 	uint16_t	l2_ivlan;
47619 	/*
47620 	 * This value sets the mask value for the ivlan id.
47621 	 * A value of 0 will mask the corresponding bit from
47622 	 * compare.
47623 	 */
47624 	uint16_t	l2_ivlan_mask;
47625 	uint8_t	unused_1[2];
47626 	/*
47627 	 * This value sets the match value for the tunnel
47628 	 * L2 MAC address.
47629 	 * Destination MAC address for RX path.
47630 	 * Source MAC address for TX path.
47631 	 */
47632 	uint8_t	t_l2_addr[6];
47633 	uint8_t	unused_2[2];
47634 	/*
47635 	 * This value sets the mask value for the tunnel L2
47636 	 * address.
47637 	 * A value of 0 will mask the corresponding bit from
47638 	 * compare.
47639 	 */
47640 	uint8_t	t_l2_addr_mask[6];
47641 	/* This value sets VLAN ID value for tunnel outer VLAN. */
47642 	uint16_t	t_l2_ovlan;
47643 	/*
47644 	 * This value sets the mask value for the tunnel ovlan id.
47645 	 * A value of 0 will mask the corresponding bit from
47646 	 * compare.
47647 	 */
47648 	uint16_t	t_l2_ovlan_mask;
47649 	/* This value sets VLAN ID value for tunnel inner VLAN. */
47650 	uint16_t	t_l2_ivlan;
47651 	/*
47652 	 * This value sets the mask value for the tunnel ivlan id.
47653 	 * A value of 0 will mask the corresponding bit from
47654 	 * compare.
47655 	 */
47656 	uint16_t	t_l2_ivlan_mask;
47657 	/* This value identifies the type of source of the packet. */
47658 	uint8_t	src_type;
47659 	/* Network port */
47660 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_NPORT UINT32_C(0x0)
47661 	/* Physical function */
47662 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_PF    UINT32_C(0x1)
47663 	/* Virtual function */
47664 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VF    UINT32_C(0x2)
47665 	/* Virtual NIC of a function */
47666 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_VNIC  UINT32_C(0x3)
47667 	/* Embedded processor for CFA management */
47668 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_KONG  UINT32_C(0x4)
47669 	/* Embedded processor for OOB management */
47670 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_APE   UINT32_C(0x5)
47671 	/* Embedded processor for RoCE */
47672 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_BONO  UINT32_C(0x6)
47673 	/* Embedded processor for network proxy functions */
47674 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_TANG  UINT32_C(0x7)
47675 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_LAST \
47676 		HWRM_CFA_L2_FILTER_ALLOC_INPUT_SRC_TYPE_TANG
47677 	uint8_t	unused_3;
47678 	/*
47679 	 * This value is the id of the source.
47680 	 * For a network port, it represents port_id.
47681 	 * For a physical function, it represents fid.
47682 	 * For a virtual function, it represents vf_id.
47683 	 * For a vnic, it represents vnic_id.
47684 	 * For embedded processors, this id is not valid.
47685 	 *
47686 	 * Notes:
47687 	 * 1. The function ID is implied if it src_id is
47688 	 *    not provided for a src_type that is either
47689 	 */
47690 	uint32_t	src_id;
47691 	/* Tunnel Type. */
47692 	uint8_t	tunnel_type;
47693 	/* Non-tunnel */
47694 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
47695 		UINT32_C(0x0)
47696 	/* Virtual eXtensible Local Area Network (VXLAN) */
47697 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
47698 		UINT32_C(0x1)
47699 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
47700 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
47701 		UINT32_C(0x2)
47702 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
47703 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
47704 		UINT32_C(0x3)
47705 	/* IP in IP */
47706 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
47707 		UINT32_C(0x4)
47708 	/* Generic Network Virtualization Encapsulation (Geneve) */
47709 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
47710 		UINT32_C(0x5)
47711 	/* Multi-Protocol Label Switching (MPLS) */
47712 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
47713 		UINT32_C(0x6)
47714 	/* Stateless Transport Tunnel (STT) */
47715 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \
47716 		UINT32_C(0x7)
47717 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
47718 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
47719 		UINT32_C(0x8)
47720 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
47721 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
47722 		UINT32_C(0x9)
47723 	/*
47724 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
47725 	 * datagram payload
47726 	 */
47727 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
47728 		UINT32_C(0xa)
47729 	/* Use fixed layer 2 ether type of 0xFFFF */
47730 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE \
47731 		UINT32_C(0xb)
47732 	/*
47733 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
47734 	 * (IPV6oVXLANGPE)
47735 	 */
47736 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
47737 		UINT32_C(0xc)
47738 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
47739 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE \
47740 		UINT32_C(0x10)
47741 	/* Any tunneled traffic */
47742 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
47743 		UINT32_C(0xff)
47744 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST \
47745 		HWRM_CFA_L2_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
47746 	uint8_t	unused_4;
47747 	/*
47748 	 * If set, this value shall represent the
47749 	 * Logical VNIC ID of the destination VNIC for the RX
47750 	 * path and network port id of the destination port for
47751 	 * the TX path.
47752 	 */
47753 	uint16_t	dst_id;
47754 	/*
47755 	 * Logical VNIC ID of the VNIC where traffic is
47756 	 * mirrored.
47757 	 */
47758 	uint16_t	mirror_vnic_id;
47759 	/*
47760 	 * This hint is provided to help in placing
47761 	 * the filter in the filter table.
47762 	 */
47763 	uint8_t	pri_hint;
47764 	/* No preference */
47765 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER \
47766 		UINT32_C(0x0)
47767 	/* Above the given filter */
47768 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE_FILTER \
47769 		UINT32_C(0x1)
47770 	/* Below the given filter */
47771 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_BELOW_FILTER \
47772 		UINT32_C(0x2)
47773 	/* As high as possible */
47774 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MAX \
47775 		UINT32_C(0x3)
47776 	/* As low as possible */
47777 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MIN \
47778 		UINT32_C(0x4)
47779 	#define HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_LAST \
47780 		HWRM_CFA_L2_FILTER_ALLOC_INPUT_PRI_HINT_MIN
47781 	uint8_t	unused_5;
47782 	uint32_t	unused_6;
47783 	/*
47784 	 * This is the ID of the filter that goes along with
47785 	 * the pri_hint.
47786 	 *
47787 	 * This field is valid only for the following values.
47788 	 * 1 - Above the given filter
47789 	 * 2 - Below the given filter
47790 	 */
47791 	uint64_t	l2_filter_id_hint;
47792 } __rte_packed_end;
47793 
47794 /* hwrm_cfa_l2_filter_alloc_output (size:192b/24B) */
47795 struct __rte_packed_begin hwrm_cfa_l2_filter_alloc_output {
47796 	/* The specific error status for the command. */
47797 	uint16_t	error_code;
47798 	/* The HWRM command request type. */
47799 	uint16_t	req_type;
47800 	/* The sequence ID from the original command. */
47801 	uint16_t	seq_id;
47802 	/* The length of the response data in number of bytes. */
47803 	uint16_t	resp_len;
47804 	/*
47805 	 * This value identifies a set of CFA data structures used for an L2
47806 	 * context.
47807 	 */
47808 	uint64_t	l2_filter_id;
47809 	/*
47810 	 * The flow id value in bit 0-29 is the actual ID of the flow
47811 	 * associated with this filter and it shall be used to match
47812 	 * and associate the flow identifier returned in completion
47813 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
47814 	 * shall indicate no valid flow id.
47815 	 */
47816 	uint32_t	flow_id;
47817 	/* Indicate the flow id value. */
47818 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK \
47819 		UINT32_C(0x3fffffff)
47820 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
47821 	/* Indicate type of the flow. */
47822 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE \
47823 		UINT32_C(0x40000000)
47824 	/*
47825 	 * If this bit set to 0, then it indicates that the flow is
47826 	 * internal flow.
47827 	 */
47828 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_INT \
47829 		(UINT32_C(0x0) << 30)
47830 	/*
47831 	 * If this bit is set to 1, then it indicates that the flow is
47832 	 * external flow.
47833 	 */
47834 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT \
47835 		(UINT32_C(0x1) << 30)
47836 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST \
47837 		HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
47838 	/* Indicate the flow direction. */
47839 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR \
47840 		UINT32_C(0x80000000)
47841 	/* If this bit set to 0, then it indicates rx flow. */
47842 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_RX \
47843 		(UINT32_C(0x0) << 31)
47844 	/* If this bit is set to 1, then it indicates that tx flow. */
47845 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX \
47846 		(UINT32_C(0x1) << 31)
47847 	#define HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_LAST \
47848 		HWRM_CFA_L2_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX
47849 	uint8_t	unused_0[3];
47850 	/*
47851 	 * This field is used in Output records to indicate that the output
47852 	 * is completely written to RAM. This field should be read as '1'
47853 	 * to indicate that the output has been completely written.
47854 	 * When writing a command completion or response to an internal
47855 	 * processor, the order of writes has to be such that this field is
47856 	 * written last.
47857 	 */
47858 	uint8_t	valid;
47859 } __rte_packed_end;
47860 
47861 /***************************
47862  * hwrm_cfa_l2_filter_free *
47863  ***************************/
47864 
47865 
47866 /* hwrm_cfa_l2_filter_free_input (size:192b/24B) */
47867 struct __rte_packed_begin hwrm_cfa_l2_filter_free_input {
47868 	/* The HWRM command request type. */
47869 	uint16_t	req_type;
47870 	/*
47871 	 * The completion ring to send the completion event on. This should
47872 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47873 	 */
47874 	uint16_t	cmpl_ring;
47875 	/*
47876 	 * The sequence ID is used by the driver for tracking multiple
47877 	 * commands. This ID is treated as opaque data by the firmware and
47878 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47879 	 */
47880 	uint16_t	seq_id;
47881 	/*
47882 	 * The target ID of the command:
47883 	 * * 0x0-0xFFF8 - The function ID
47884 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47885 	 * * 0xFFFD - Reserved for user-space HWRM interface
47886 	 * * 0xFFFF - HWRM
47887 	 */
47888 	uint16_t	target_id;
47889 	/*
47890 	 * A physical address pointer pointing to a host buffer that the
47891 	 * command's response data will be written. This can be either a host
47892 	 * physical address (HPA) or a guest physical address (GPA) and must
47893 	 * point to a physically contiguous block of memory.
47894 	 */
47895 	uint64_t	resp_addr;
47896 	/*
47897 	 * This value identifies a set of CFA data structures used for an L2
47898 	 * context.
47899 	 */
47900 	uint64_t	l2_filter_id;
47901 } __rte_packed_end;
47902 
47903 /* hwrm_cfa_l2_filter_free_output (size:128b/16B) */
47904 struct __rte_packed_begin hwrm_cfa_l2_filter_free_output {
47905 	/* The specific error status for the command. */
47906 	uint16_t	error_code;
47907 	/* The HWRM command request type. */
47908 	uint16_t	req_type;
47909 	/* The sequence ID from the original command. */
47910 	uint16_t	seq_id;
47911 	/* The length of the response data in number of bytes. */
47912 	uint16_t	resp_len;
47913 	uint8_t	unused_0[7];
47914 	/*
47915 	 * This field is used in Output records to indicate that the output
47916 	 * is completely written to RAM. This field should be read as '1'
47917 	 * to indicate that the output has been completely written.
47918 	 * When writing a command completion or response to an internal
47919 	 * processor, the order of writes has to be such that this field is
47920 	 * written last.
47921 	 */
47922 	uint8_t	valid;
47923 } __rte_packed_end;
47924 
47925 /**************************
47926  * hwrm_cfa_l2_filter_cfg *
47927  **************************/
47928 
47929 
47930 /* hwrm_cfa_l2_filter_cfg_input (size:384b/48B) */
47931 struct __rte_packed_begin hwrm_cfa_l2_filter_cfg_input {
47932 	/* The HWRM command request type. */
47933 	uint16_t	req_type;
47934 	/*
47935 	 * The completion ring to send the completion event on. This should
47936 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
47937 	 */
47938 	uint16_t	cmpl_ring;
47939 	/*
47940 	 * The sequence ID is used by the driver for tracking multiple
47941 	 * commands. This ID is treated as opaque data by the firmware and
47942 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
47943 	 */
47944 	uint16_t	seq_id;
47945 	/*
47946 	 * The target ID of the command:
47947 	 * * 0x0-0xFFF8 - The function ID
47948 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
47949 	 * * 0xFFFD - Reserved for user-space HWRM interface
47950 	 * * 0xFFFF - HWRM
47951 	 */
47952 	uint16_t	target_id;
47953 	/*
47954 	 * A physical address pointer pointing to a host buffer that the
47955 	 * command's response data will be written. This can be either a host
47956 	 * physical address (HPA) or a guest physical address (GPA) and must
47957 	 * point to a physically contiguous block of memory.
47958 	 */
47959 	uint64_t	resp_addr;
47960 	uint32_t	flags;
47961 	/*
47962 	 * Enumeration denoting the RX, TX type of the resource.
47963 	 * This enumeration is used for resources that are similar for both
47964 	 * TX and RX paths of the chip.
47965 	 */
47966 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH \
47967 		UINT32_C(0x1)
47968 	/* tx path */
47969 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_TX \
47970 		UINT32_C(0x0)
47971 	/* rx path */
47972 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_RX \
47973 		UINT32_C(0x1)
47974 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_LAST \
47975 		HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_PATH_RX
47976 	/*
47977 	 * Setting of this flag indicates drop action. If this flag is not
47978 	 * set, then it should be considered accept action.
47979 	 */
47980 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_DROP \
47981 		UINT32_C(0x2)
47982 	/*
47983 	 * Enumeration denoting NO_ROCE_L2 to support old drivers.
47984 	 * New driver L2 for only L2 traffic, ROCE for roce and l2 traffic
47985 	 */
47986 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_MASK \
47987 		UINT32_C(0xc)
47988 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_SFT         2
47989 	/* To support old drivers */
47990 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_NO_ROCE_L2 \
47991 		(UINT32_C(0x0) << 2)
47992 	/* Only L2 traffic */
47993 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_L2 \
47994 		(UINT32_C(0x1) << 2)
47995 	/* Roce & L2 traffic */
47996 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_ROCE \
47997 		(UINT32_C(0x2) << 2)
47998 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_LAST \
47999 		HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_TRAFFIC_ROCE
48000 	/*
48001 	 * Enumeration denoting how the L2 Context TCAM remap operation is
48002 	 * updated.
48003 	 */
48004 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_MASK \
48005 		UINT32_C(0x30)
48006 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_SFT        4
48007 	/* No change to remap opcode */
48008 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_NO_UPDATE \
48009 		(UINT32_C(0x0) << 4)
48010 	/* Bypass CFA Lookup */
48011 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_BYPASS_LKUP \
48012 		(UINT32_C(0x1) << 4)
48013 	/* Enable CFA Lookup */
48014 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_ENABLE_LKUP \
48015 		(UINT32_C(0x2) << 4)
48016 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_LAST \
48017 		HWRM_CFA_L2_FILTER_CFG_INPUT_FLAGS_REMAP_OP_ENABLE_LKUP
48018 	uint32_t	enables;
48019 	/*
48020 	 * This bit must be '1' for the dst_id field to be
48021 	 * configured.
48022 	 */
48023 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_DST_ID \
48024 		UINT32_C(0x1)
48025 	/*
48026 	 * This bit must be '1' for the new_mirror_vnic_id field to be
48027 	 * configured.
48028 	 */
48029 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID \
48030 		UINT32_C(0x2)
48031 	/*
48032 	 * This bit must be '1' for the prof_func field to be configured in
48033 	 * the remap entry.
48034 	 */
48035 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_PROF_FUNC \
48036 		UINT32_C(0x4)
48037 	/*
48038 	 * This bit must be '1' for the l2_context_id field to be configured
48039 	 * in the remap entry.
48040 	 */
48041 	#define HWRM_CFA_L2_FILTER_CFG_INPUT_ENABLES_L2_CONTEXT_ID \
48042 		UINT32_C(0x8)
48043 	/*
48044 	 * This value identifies a set of CFA data structures used for an L2
48045 	 * context.
48046 	 */
48047 	uint64_t	l2_filter_id;
48048 	/*
48049 	 * If set, this value shall represent the
48050 	 * Logical VNIC ID of the destination VNIC for the RX
48051 	 * path and network port id of the destination port for
48052 	 * the TX path.
48053 	 */
48054 	uint32_t	dst_id;
48055 	/*
48056 	 * New Logical VNIC ID of the VNIC where traffic is
48057 	 * mirrored.
48058 	 */
48059 	uint32_t	new_mirror_vnic_id;
48060 	/*
48061 	 * Profile function value to be programmed into the L2 context entry's
48062 	 * remap. This will be used by the host application to program the CFA
48063 	 * Profile TCAM entry for further classification.
48064 	 */
48065 	uint32_t	prof_func;
48066 	/*
48067 	 * L2 context ID value to be programmed into the L2 context entry's
48068 	 * remap. This will be used by the host application to program the CFA
48069 	 * Lookup entry for further classification.
48070 	 */
48071 	uint32_t	l2_context_id;
48072 } __rte_packed_end;
48073 
48074 /* hwrm_cfa_l2_filter_cfg_output (size:128b/16B) */
48075 struct __rte_packed_begin hwrm_cfa_l2_filter_cfg_output {
48076 	/* The specific error status for the command. */
48077 	uint16_t	error_code;
48078 	/* The HWRM command request type. */
48079 	uint16_t	req_type;
48080 	/* The sequence ID from the original command. */
48081 	uint16_t	seq_id;
48082 	/* The length of the response data in number of bytes. */
48083 	uint16_t	resp_len;
48084 	uint8_t	unused_0[7];
48085 	/*
48086 	 * This field is used in Output records to indicate that the output
48087 	 * is completely written to RAM. This field should be read as '1'
48088 	 * to indicate that the output has been completely written.
48089 	 * When writing a command completion or response to an internal
48090 	 * processor, the order of writes has to be such that this field is
48091 	 * written last.
48092 	 */
48093 	uint8_t	valid;
48094 } __rte_packed_end;
48095 
48096 /***************************
48097  * hwrm_cfa_l2_set_rx_mask *
48098  ***************************/
48099 
48100 
48101 /* hwrm_cfa_l2_set_rx_mask_input (size:448b/56B) */
48102 struct __rte_packed_begin hwrm_cfa_l2_set_rx_mask_input {
48103 	/* The HWRM command request type. */
48104 	uint16_t	req_type;
48105 	/*
48106 	 * The completion ring to send the completion event on. This should
48107 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48108 	 */
48109 	uint16_t	cmpl_ring;
48110 	/*
48111 	 * The sequence ID is used by the driver for tracking multiple
48112 	 * commands. This ID is treated as opaque data by the firmware and
48113 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48114 	 */
48115 	uint16_t	seq_id;
48116 	/*
48117 	 * The target ID of the command:
48118 	 * * 0x0-0xFFF8 - The function ID
48119 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48120 	 * * 0xFFFD - Reserved for user-space HWRM interface
48121 	 * * 0xFFFF - HWRM
48122 	 */
48123 	uint16_t	target_id;
48124 	/*
48125 	 * A physical address pointer pointing to a host buffer that the
48126 	 * command's response data will be written. This can be either a host
48127 	 * physical address (HPA) or a guest physical address (GPA) and must
48128 	 * point to a physically contiguous block of memory.
48129 	 */
48130 	uint64_t	resp_addr;
48131 	/* VNIC ID */
48132 	uint32_t	vnic_id;
48133 	uint32_t	mask;
48134 	/*
48135 	 * When this bit is '1', the function is requested to accept
48136 	 * multi-cast packets specified by the multicast addr table.
48137 	 */
48138 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_MCAST \
48139 		UINT32_C(0x2)
48140 	/*
48141 	 * When this bit is '1', the function is requested to accept
48142 	 * all multi-cast packets.
48143 	 */
48144 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ALL_MCAST \
48145 		UINT32_C(0x4)
48146 	/*
48147 	 * When this bit is '1', the function is requested to accept
48148 	 * broadcast packets.
48149 	 */
48150 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_BCAST \
48151 		UINT32_C(0x8)
48152 	/*
48153 	 * When this bit is '1', the function is requested to be
48154 	 * put in the promiscuous mode.
48155 	 *
48156 	 * The HWRM should accept any function to set up
48157 	 * promiscuous mode.
48158 	 *
48159 	 * The HWRM shall follow the semantics below for the
48160 	 * promiscuous mode support.
48161 	 * # When partitioning is not enabled on a port
48162 	 * (i.e. single PF on the port), then the PF shall
48163 	 * be allowed to be in the promiscuous mode. When the
48164 	 * PF is in the promiscuous mode, then it shall
48165 	 * receive all host bound traffic on that port.
48166 	 * # When partitioning is enabled on a port
48167 	 * (i.e. multiple PFs per port) and a PF on that
48168 	 * port is in the promiscuous mode, then the PF
48169 	 * receives all traffic within that partition as
48170 	 * identified by a unique identifier for the
48171 	 * PF (e.g. S-Tag). If a unique outer VLAN
48172 	 * for the PF is specified, then the setting of
48173 	 * promiscuous mode on that PF shall result in the
48174 	 * PF receiving all host bound traffic with matching
48175 	 * outer VLAN.
48176 	 * # A VF shall can be set in the promiscuous mode.
48177 	 * In the promiscuous mode, the VF does not receive any
48178 	 * traffic unless a unique outer VLAN for the
48179 	 * VF is specified. If a unique outer VLAN
48180 	 * for the VF is specified, then the setting of
48181 	 * promiscuous mode on that VF shall result in the
48182 	 * VF receiving all host bound traffic with the
48183 	 * matching outer VLAN.
48184 	 * # The HWRM shall allow the setting of promiscuous
48185 	 * mode on a function independently from the
48186 	 * promiscuous mode settings on other functions.
48187 	 */
48188 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_PROMISCUOUS \
48189 		UINT32_C(0x10)
48190 	/*
48191 	 * If this flag is set, the corresponding RX
48192 	 * filters shall be set up to cover multicast/broadcast
48193 	 * filters for the outermost Layer 2 destination MAC
48194 	 * address field.
48195 	 */
48196 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_OUTERMOST \
48197 		UINT32_C(0x20)
48198 	/*
48199 	 * If this flag is set, the corresponding RX
48200 	 * filters shall be set up to cover multicast/broadcast
48201 	 * filters for the VLAN-tagged packets that match the
48202 	 * TPID and VID fields of VLAN tags in the VLAN tag
48203 	 * table specified in this command.
48204 	 */
48205 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY \
48206 		UINT32_C(0x40)
48207 	/*
48208 	 * If this flag is set, the corresponding RX
48209 	 * filters shall be set up to cover multicast/broadcast
48210 	 * filters for non-VLAN tagged packets and VLAN-tagged
48211 	 * packets that match the TPID and VID fields of VLAN
48212 	 * tags in the VLAN tag table specified in this command.
48213 	 */
48214 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN \
48215 		UINT32_C(0x80)
48216 	/*
48217 	 * If this flag is set, the corresponding RX
48218 	 * filters shall be set up to cover multicast/broadcast
48219 	 * filters for non-VLAN tagged packets and VLAN-tagged
48220 	 * packets matching any VLAN tag.
48221 	 *
48222 	 * If this flag is set, then the HWRM shall ignore
48223 	 * VLAN tags specified in vlan_tag_tbl.
48224 	 *
48225 	 * If none of vlanonly, vlan_nonvlan, and anyvlan_nonvlan
48226 	 * flags is set, then the HWRM shall ignore
48227 	 * VLAN tags specified in vlan_tag_tbl.
48228 	 *
48229 	 * The HWRM client shall set at most one flag out of
48230 	 * vlanonly, vlan_nonvlan, and anyvlan_nonvlan.
48231 	 */
48232 	#define HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN \
48233 		UINT32_C(0x100)
48234 	/* This is the address for mcast address tbl. */
48235 	uint64_t	mc_tbl_addr;
48236 	/*
48237 	 * This value indicates how many entries in mc_tbl are valid.
48238 	 * Each entry is 6 bytes.
48239 	 */
48240 	uint32_t	num_mc_entries;
48241 	uint8_t	unused_0[4];
48242 	/*
48243 	 * This is the address for VLAN tag table.
48244 	 * Each VLAN entry in the table is 4 bytes of a VLAN tag
48245 	 * including TPID, PCP, DEI, and VID fields in network byte
48246 	 * order.
48247 	 */
48248 	uint64_t	vlan_tag_tbl_addr;
48249 	/*
48250 	 * This value indicates how many entries in vlan_tag_tbl are
48251 	 * valid. Each entry is 4 bytes.
48252 	 */
48253 	uint32_t	num_vlan_tags;
48254 	uint8_t	unused_1[4];
48255 } __rte_packed_end;
48256 
48257 /* hwrm_cfa_l2_set_rx_mask_output (size:128b/16B) */
48258 struct __rte_packed_begin hwrm_cfa_l2_set_rx_mask_output {
48259 	/* The specific error status for the command. */
48260 	uint16_t	error_code;
48261 	/* The HWRM command request type. */
48262 	uint16_t	req_type;
48263 	/* The sequence ID from the original command. */
48264 	uint16_t	seq_id;
48265 	/* The length of the response data in number of bytes. */
48266 	uint16_t	resp_len;
48267 	uint8_t	unused_0[7];
48268 	/*
48269 	 * This field is used in Output records to indicate that the output
48270 	 * is completely written to RAM. This field should be read as '1'
48271 	 * to indicate that the output has been completely written.
48272 	 * When writing a command completion or response to an internal
48273 	 * processor, the order of writes has to be such that this field is
48274 	 * written last.
48275 	 */
48276 	uint8_t	valid;
48277 } __rte_packed_end;
48278 
48279 /* hwrm_cfa_l2_set_rx_mask_cmd_err (size:64b/8B) */
48280 struct __rte_packed_begin hwrm_cfa_l2_set_rx_mask_cmd_err {
48281 	/*
48282 	 * command specific error codes that goes to
48283 	 * the cmd_err field in Common HWRM Error Response.
48284 	 */
48285 	uint8_t	code;
48286 	/* Unknown error */
48287 	#define HWRM_CFA_L2_SET_RX_MASK_CMD_ERR_CODE_UNKNOWN \
48288 		UINT32_C(0x0)
48289 	/* Unable to complete operation due to conflict with Ntuple Filter */
48290 	#define HWRM_CFA_L2_SET_RX_MASK_CMD_ERR_CODE_NTUPLE_FILTER_CONFLICT_ERR \
48291 		UINT32_C(0x1)
48292 	#define HWRM_CFA_L2_SET_RX_MASK_CMD_ERR_CODE_LAST \
48293 		HWRM_CFA_L2_SET_RX_MASK_CMD_ERR_CODE_NTUPLE_FILTER_CONFLICT_ERR
48294 	uint8_t	unused_0[7];
48295 } __rte_packed_end;
48296 
48297 /*******************************
48298  * hwrm_cfa_vlan_antispoof_cfg *
48299  *******************************/
48300 
48301 
48302 /* hwrm_cfa_vlan_antispoof_cfg_input (size:256b/32B) */
48303 struct __rte_packed_begin hwrm_cfa_vlan_antispoof_cfg_input {
48304 	/* The HWRM command request type. */
48305 	uint16_t	req_type;
48306 	/*
48307 	 * The completion ring to send the completion event on. This should
48308 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48309 	 */
48310 	uint16_t	cmpl_ring;
48311 	/*
48312 	 * The sequence ID is used by the driver for tracking multiple
48313 	 * commands. This ID is treated as opaque data by the firmware and
48314 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48315 	 */
48316 	uint16_t	seq_id;
48317 	/*
48318 	 * The target ID of the command:
48319 	 * * 0x0-0xFFF8 - The function ID
48320 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48321 	 * * 0xFFFD - Reserved for user-space HWRM interface
48322 	 * * 0xFFFF - HWRM
48323 	 */
48324 	uint16_t	target_id;
48325 	/*
48326 	 * A physical address pointer pointing to a host buffer that the
48327 	 * command's response data will be written. This can be either a host
48328 	 * physical address (HPA) or a guest physical address (GPA) and must
48329 	 * point to a physically contiguous block of memory.
48330 	 */
48331 	uint64_t	resp_addr;
48332 	/*
48333 	 * Function ID of the function that is being configured.
48334 	 * Only valid for a VF FID configured by the PF.
48335 	 */
48336 	uint16_t	fid;
48337 	uint8_t	unused_0[2];
48338 	/* Number of VLAN entries in the vlan_tag_mask_tbl. */
48339 	uint32_t	num_vlan_entries;
48340 	/*
48341 	 * The vlan_tag_mask_tbl_addr is the DMA address of the VLAN
48342 	 * antispoof table. Each table entry contains the 16-bit TPID
48343 	 * (0x8100 or 0x88a8 only), 16-bit VLAN ID, and a 16-bit mask,
48344 	 * all in network order to match hwrm_cfa_l2_set_rx_mask.
48345 	 * For an individual VLAN entry, the mask value should be 0xfff
48346 	 * for the 12-bit VLAN ID.
48347 	 */
48348 	uint64_t	vlan_tag_mask_tbl_addr;
48349 } __rte_packed_end;
48350 
48351 /* hwrm_cfa_vlan_antispoof_cfg_output (size:128b/16B) */
48352 struct __rte_packed_begin hwrm_cfa_vlan_antispoof_cfg_output {
48353 	/* The specific error status for the command. */
48354 	uint16_t	error_code;
48355 	/* The HWRM command request type. */
48356 	uint16_t	req_type;
48357 	/* The sequence ID from the original command. */
48358 	uint16_t	seq_id;
48359 	/* The length of the response data in number of bytes. */
48360 	uint16_t	resp_len;
48361 	uint8_t	unused_0[7];
48362 	/*
48363 	 * This field is used in Output records to indicate that the output
48364 	 * is completely written to RAM. This field should be read as '1'
48365 	 * to indicate that the output has been completely written.
48366 	 * When writing a command completion or response to an internal
48367 	 * processor, the order of writes has to be such that this field is
48368 	 * written last.
48369 	 */
48370 	uint8_t	valid;
48371 } __rte_packed_end;
48372 
48373 /********************************
48374  * hwrm_cfa_vlan_antispoof_qcfg *
48375  ********************************/
48376 
48377 
48378 /* hwrm_cfa_vlan_antispoof_qcfg_input (size:256b/32B) */
48379 struct __rte_packed_begin hwrm_cfa_vlan_antispoof_qcfg_input {
48380 	/* The HWRM command request type. */
48381 	uint16_t	req_type;
48382 	/*
48383 	 * The completion ring to send the completion event on. This should
48384 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48385 	 */
48386 	uint16_t	cmpl_ring;
48387 	/*
48388 	 * The sequence ID is used by the driver for tracking multiple
48389 	 * commands. This ID is treated as opaque data by the firmware and
48390 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48391 	 */
48392 	uint16_t	seq_id;
48393 	/*
48394 	 * The target ID of the command:
48395 	 * * 0x0-0xFFF8 - The function ID
48396 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48397 	 * * 0xFFFD - Reserved for user-space HWRM interface
48398 	 * * 0xFFFF - HWRM
48399 	 */
48400 	uint16_t	target_id;
48401 	/*
48402 	 * A physical address pointer pointing to a host buffer that the
48403 	 * command's response data will be written. This can be either a host
48404 	 * physical address (HPA) or a guest physical address (GPA) and must
48405 	 * point to a physically contiguous block of memory.
48406 	 */
48407 	uint64_t	resp_addr;
48408 	/*
48409 	 * Function ID of the function that is being queried.
48410 	 * Only valid for a VF FID queried by the PF.
48411 	 */
48412 	uint16_t	fid;
48413 	uint8_t	unused_0[2];
48414 	/*
48415 	 * Maximum number of VLAN entries the firmware is allowed to DMA
48416 	 * to vlan_tag_mask_tbl.
48417 	 */
48418 	uint32_t	max_vlan_entries;
48419 	/*
48420 	 * The vlan_tag_mask_tbl_addr is the DMA address of the VLAN
48421 	 * antispoof table to which firmware will DMA to. Each table
48422 	 * entry will contain the 16-bit TPID (0x8100 or 0x88a8 only),
48423 	 * 16-bit VLAN ID, and a 16-bit mask, all in network order to
48424 	 * match hwrm_cfa_l2_set_rx_mask. For an individual VLAN entry,
48425 	 * the mask value should be 0xfff for the 12-bit VLAN ID.
48426 	 */
48427 	uint64_t	vlan_tag_mask_tbl_addr;
48428 } __rte_packed_end;
48429 
48430 /* hwrm_cfa_vlan_antispoof_qcfg_output (size:128b/16B) */
48431 struct __rte_packed_begin hwrm_cfa_vlan_antispoof_qcfg_output {
48432 	/* The specific error status for the command. */
48433 	uint16_t	error_code;
48434 	/* The HWRM command request type. */
48435 	uint16_t	req_type;
48436 	/* The sequence ID from the original command. */
48437 	uint16_t	seq_id;
48438 	/* The length of the response data in number of bytes. */
48439 	uint16_t	resp_len;
48440 	/* Number of valid entries DMAd by firmware to vlan_tag_mask_tbl. */
48441 	uint32_t	num_vlan_entries;
48442 	uint8_t	unused_0[3];
48443 	/*
48444 	 * This field is used in Output records to indicate that the output
48445 	 * is completely written to RAM. This field should be read as '1'
48446 	 * to indicate that the output has been completely written.
48447 	 * When writing a command completion or response to an internal
48448 	 * processor, the order of writes has to be such that this field is
48449 	 * written last.
48450 	 */
48451 	uint8_t	valid;
48452 } __rte_packed_end;
48453 
48454 /********************************
48455  * hwrm_cfa_tunnel_filter_alloc *
48456  ********************************/
48457 
48458 
48459 /* hwrm_cfa_tunnel_filter_alloc_input (size:704b/88B) */
48460 struct __rte_packed_begin hwrm_cfa_tunnel_filter_alloc_input {
48461 	/* The HWRM command request type. */
48462 	uint16_t	req_type;
48463 	/*
48464 	 * The completion ring to send the completion event on. This should
48465 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48466 	 */
48467 	uint16_t	cmpl_ring;
48468 	/*
48469 	 * The sequence ID is used by the driver for tracking multiple
48470 	 * commands. This ID is treated as opaque data by the firmware and
48471 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48472 	 */
48473 	uint16_t	seq_id;
48474 	/*
48475 	 * The target ID of the command:
48476 	 * * 0x0-0xFFF8 - The function ID
48477 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48478 	 * * 0xFFFD - Reserved for user-space HWRM interface
48479 	 * * 0xFFFF - HWRM
48480 	 */
48481 	uint16_t	target_id;
48482 	/*
48483 	 * A physical address pointer pointing to a host buffer that the
48484 	 * command's response data will be written. This can be either a host
48485 	 * physical address (HPA) or a guest physical address (GPA) and must
48486 	 * point to a physically contiguous block of memory.
48487 	 */
48488 	uint64_t	resp_addr;
48489 	uint32_t	flags;
48490 	/*
48491 	 * Setting of this flag indicates the applicability to the loopback
48492 	 * path.
48493 	 */
48494 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK \
48495 		UINT32_C(0x1)
48496 	uint32_t	enables;
48497 	/*
48498 	 * This bit must be '1' for the l2_filter_id field to be
48499 	 * configured.
48500 	 */
48501 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID \
48502 		UINT32_C(0x1)
48503 	/*
48504 	 * This bit must be '1' for the l2_addr field to be
48505 	 * configured.
48506 	 */
48507 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR \
48508 		UINT32_C(0x2)
48509 	/*
48510 	 * This bit must be '1' for the l2_ivlan field to be
48511 	 * configured.
48512 	 */
48513 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L2_IVLAN \
48514 		UINT32_C(0x4)
48515 	/*
48516 	 * This bit must be '1' for the l3_addr field to be
48517 	 * configured.
48518 	 */
48519 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L3_ADDR \
48520 		UINT32_C(0x8)
48521 	/*
48522 	 * This bit must be '1' for the l3_addr_type field to be
48523 	 * configured.
48524 	 */
48525 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_L3_ADDR_TYPE \
48526 		UINT32_C(0x10)
48527 	/*
48528 	 * This bit must be '1' for the t_l3_addr_type field to be
48529 	 * configured.
48530 	 */
48531 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_T_L3_ADDR_TYPE \
48532 		UINT32_C(0x20)
48533 	/*
48534 	 * This bit must be '1' for the t_l3_addr field to be
48535 	 * configured.
48536 	 */
48537 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_T_L3_ADDR \
48538 		UINT32_C(0x40)
48539 	/*
48540 	 * This bit must be '1' for the tunnel_type field to be
48541 	 * configured.
48542 	 */
48543 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
48544 		UINT32_C(0x80)
48545 	/*
48546 	 * This bit must be '1' for the vni field to be
48547 	 * configured.
48548 	 */
48549 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_VNI \
48550 		UINT32_C(0x100)
48551 	/*
48552 	 * This bit must be '1' for the dst_vnic_id field to be
48553 	 * configured.
48554 	 */
48555 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_DST_VNIC_ID \
48556 		UINT32_C(0x200)
48557 	/*
48558 	 * This bit must be '1' for the mirror_vnic_id field to be
48559 	 * configured.
48560 	 */
48561 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
48562 		UINT32_C(0x400)
48563 	/*
48564 	 * This value identifies a set of CFA data structures used for an L2
48565 	 * context.
48566 	 */
48567 	uint64_t	l2_filter_id;
48568 	/*
48569 	 * This value sets the match value for the inner L2
48570 	 * MAC address.
48571 	 * Destination MAC address for RX path.
48572 	 * Source MAC address for TX path.
48573 	 */
48574 	uint8_t	l2_addr[6];
48575 	/*
48576 	 * This value sets VLAN ID value for inner VLAN.
48577 	 * Only 12-bits of VLAN ID are used in setting the filter.
48578 	 */
48579 	uint16_t	l2_ivlan;
48580 	/*
48581 	 * The value of inner destination IP address to be used in filtering.
48582 	 * For IPv4, first four bytes represent the IP address.
48583 	 */
48584 	uint32_t	l3_addr[4];
48585 	/*
48586 	 * The value of tunnel destination IP address to be used in filtering.
48587 	 * For IPv4, first four bytes represent the IP address.
48588 	 */
48589 	uint32_t	t_l3_addr[4];
48590 	/*
48591 	 * This value indicates the type of inner IP address.
48592 	 * 4 - IPv4
48593 	 * 6 - IPv6
48594 	 * All others are invalid.
48595 	 */
48596 	uint8_t	l3_addr_type;
48597 	/*
48598 	 * This value indicates the type of tunnel IP address.
48599 	 * 4 - IPv4
48600 	 * 6 - IPv6
48601 	 * All others are invalid.
48602 	 */
48603 	uint8_t	t_l3_addr_type;
48604 	/* Tunnel Type. */
48605 	uint8_t	tunnel_type;
48606 	/* Non-tunnel */
48607 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
48608 		UINT32_C(0x0)
48609 	/* Virtual eXtensible Local Area Network (VXLAN) */
48610 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
48611 		UINT32_C(0x1)
48612 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
48613 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
48614 		UINT32_C(0x2)
48615 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
48616 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
48617 		UINT32_C(0x3)
48618 	/* IP in IP */
48619 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
48620 		UINT32_C(0x4)
48621 	/* Generic Network Virtualization Encapsulation (Geneve) */
48622 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
48623 		UINT32_C(0x5)
48624 	/* Multi-Protocol Label Switching (MPLS) */
48625 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
48626 		UINT32_C(0x6)
48627 	/* Stateless Transport Tunnel (STT) */
48628 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \
48629 		UINT32_C(0x7)
48630 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
48631 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
48632 		UINT32_C(0x8)
48633 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
48634 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
48635 		UINT32_C(0x9)
48636 	/*
48637 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
48638 	 * datagram payload
48639 	 */
48640 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
48641 		UINT32_C(0xa)
48642 	/* Use fixed layer 2 ether type of 0xFFFF */
48643 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE \
48644 		UINT32_C(0xb)
48645 	/*
48646 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
48647 	 * (IPV6oVXLANGPE)
48648 	 */
48649 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
48650 		UINT32_C(0xc)
48651 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
48652 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE \
48653 		UINT32_C(0x10)
48654 	/* Any tunneled traffic */
48655 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
48656 		UINT32_C(0xff)
48657 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST \
48658 		HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
48659 	/*
48660 	 * tunnel_flags allows the user to indicate the tunnel tag detection
48661 	 * for the tunnel type specified in tunnel_type.
48662 	 */
48663 	uint8_t	tunnel_flags;
48664 	/*
48665 	 * If the tunnel_type is geneve, then this bit indicates if we
48666 	 * need to match the geneve OAM packet.
48667 	 * If the tunnel_type is nvgre or gre, then this bit indicates if
48668 	 * we need to detect checksum present bit in geneve header.
48669 	 * If the tunnel_type is mpls, then this bit indicates if we need
48670 	 * to match mpls packet with explicit IPV4/IPV6 null header.
48671 	 */
48672 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_FLAGS_TUN_FLAGS_OAM_CHECKSUM_EXPLHDR \
48673 		UINT32_C(0x1)
48674 	/*
48675 	 * If the tunnel_type is geneve, then this bit indicates if we
48676 	 * need to detect the critical option bit set in the oam packet.
48677 	 * If the tunnel_type is nvgre or gre, then this bit indicates
48678 	 * if we need to match nvgre packets with key present bit set in
48679 	 * gre header.
48680 	 * If the tunnel_type is mpls, then this bit indicates if we
48681 	 * need to match mpls packet with S bit from inner/second label.
48682 	 */
48683 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_FLAGS_TUN_FLAGS_CRITICAL_OPT_S1 \
48684 		UINT32_C(0x2)
48685 	/*
48686 	 * If the tunnel_type is geneve, then this bit indicates if we
48687 	 * need to match geneve packet with extended header bit set in
48688 	 * geneve header.
48689 	 * If the tunnel_type is nvgre or gre, then this bit indicates
48690 	 * if we need to match nvgre packets with sequence number
48691 	 * present bit set in gre header.
48692 	 * If the tunnel_type is mpls, then this bit indicates if we
48693 	 * need to match mpls packet with S bit from out/first label.
48694 	 */
48695 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_INPUT_TUNNEL_FLAGS_TUN_FLAGS_EXTHDR_SEQNUM_S0 \
48696 		UINT32_C(0x4)
48697 	/*
48698 	 * Virtual Network Identifier (VNI). Only valid with
48699 	 * tunnel_types VXLAN, NVGRE, and Geneve.
48700 	 * Only lower 24-bits of VNI field are used
48701 	 * in setting up the filter.
48702 	 */
48703 	uint32_t	vni;
48704 	/* Logical VNIC ID of the destination VNIC. */
48705 	uint32_t	dst_vnic_id;
48706 	/*
48707 	 * Logical VNIC ID of the VNIC where traffic is
48708 	 * mirrored.
48709 	 */
48710 	uint32_t	mirror_vnic_id;
48711 } __rte_packed_end;
48712 
48713 /* hwrm_cfa_tunnel_filter_alloc_output (size:192b/24B) */
48714 struct __rte_packed_begin hwrm_cfa_tunnel_filter_alloc_output {
48715 	/* The specific error status for the command. */
48716 	uint16_t	error_code;
48717 	/* The HWRM command request type. */
48718 	uint16_t	req_type;
48719 	/* The sequence ID from the original command. */
48720 	uint16_t	seq_id;
48721 	/* The length of the response data in number of bytes. */
48722 	uint16_t	resp_len;
48723 	/* This value is an opaque id into CFA data structures. */
48724 	uint64_t	tunnel_filter_id;
48725 	/*
48726 	 * The flow id value in bit 0-29 is the actual ID of the flow
48727 	 * associated with this filter and it shall be used to match
48728 	 * and associate the flow identifier returned in completion
48729 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
48730 	 * shall indicate no valid flow id.
48731 	 */
48732 	uint32_t	flow_id;
48733 	/* Indicate the flow id value. */
48734 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK \
48735 		UINT32_C(0x3fffffff)
48736 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
48737 	/* Indicate type of the flow. */
48738 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE \
48739 		UINT32_C(0x40000000)
48740 	/*
48741 	 * If this bit set to 0, then it indicates that the flow is
48742 	 * internal flow.
48743 	 */
48744 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_INT \
48745 		(UINT32_C(0x0) << 30)
48746 	/*
48747 	 * If this bit is set to 1, then it indicates that the flow is
48748 	 * external flow.
48749 	 */
48750 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT \
48751 		(UINT32_C(0x1) << 30)
48752 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST \
48753 		HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
48754 	/* Indicate the flow direction. */
48755 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR \
48756 		UINT32_C(0x80000000)
48757 	/* If this bit set to 0, then it indicates rx flow. */
48758 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_RX \
48759 		(UINT32_C(0x0) << 31)
48760 	/* If this bit is set to 1, then it indicates that tx flow. */
48761 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX \
48762 		(UINT32_C(0x1) << 31)
48763 	#define HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_LAST \
48764 		HWRM_CFA_TUNNEL_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX
48765 	uint8_t	unused_0[3];
48766 	/*
48767 	 * This field is used in Output records to indicate that the output
48768 	 * is completely written to RAM. This field should be read as '1'
48769 	 * to indicate that the output has been completely written.
48770 	 * When writing a command completion or response to an internal
48771 	 * processor, the order of writes has to be such that this field is
48772 	 * written last.
48773 	 */
48774 	uint8_t	valid;
48775 } __rte_packed_end;
48776 
48777 /*******************************
48778  * hwrm_cfa_tunnel_filter_free *
48779  *******************************/
48780 
48781 
48782 /* hwrm_cfa_tunnel_filter_free_input (size:192b/24B) */
48783 struct __rte_packed_begin hwrm_cfa_tunnel_filter_free_input {
48784 	/* The HWRM command request type. */
48785 	uint16_t	req_type;
48786 	/*
48787 	 * The completion ring to send the completion event on. This should
48788 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48789 	 */
48790 	uint16_t	cmpl_ring;
48791 	/*
48792 	 * The sequence ID is used by the driver for tracking multiple
48793 	 * commands. This ID is treated as opaque data by the firmware and
48794 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48795 	 */
48796 	uint16_t	seq_id;
48797 	/*
48798 	 * The target ID of the command:
48799 	 * * 0x0-0xFFF8 - The function ID
48800 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48801 	 * * 0xFFFD - Reserved for user-space HWRM interface
48802 	 * * 0xFFFF - HWRM
48803 	 */
48804 	uint16_t	target_id;
48805 	/*
48806 	 * A physical address pointer pointing to a host buffer that the
48807 	 * command's response data will be written. This can be either a host
48808 	 * physical address (HPA) or a guest physical address (GPA) and must
48809 	 * point to a physically contiguous block of memory.
48810 	 */
48811 	uint64_t	resp_addr;
48812 	/* This value is an opaque id into CFA data structures. */
48813 	uint64_t	tunnel_filter_id;
48814 } __rte_packed_end;
48815 
48816 /* hwrm_cfa_tunnel_filter_free_output (size:128b/16B) */
48817 struct __rte_packed_begin hwrm_cfa_tunnel_filter_free_output {
48818 	/* The specific error status for the command. */
48819 	uint16_t	error_code;
48820 	/* The HWRM command request type. */
48821 	uint16_t	req_type;
48822 	/* The sequence ID from the original command. */
48823 	uint16_t	seq_id;
48824 	/* The length of the response data in number of bytes. */
48825 	uint16_t	resp_len;
48826 	uint8_t	unused_0[7];
48827 	/*
48828 	 * This field is used in Output records to indicate that the output
48829 	 * is completely written to RAM. This field should be read as '1'
48830 	 * to indicate that the output has been completely written.
48831 	 * When writing a command completion or response to an internal
48832 	 * processor, the order of writes has to be such that this field is
48833 	 * written last.
48834 	 */
48835 	uint8_t	valid;
48836 } __rte_packed_end;
48837 
48838 /***************************************
48839  * hwrm_cfa_redirect_tunnel_type_alloc *
48840  ***************************************/
48841 
48842 
48843 /* hwrm_cfa_redirect_tunnel_type_alloc_input (size:192b/24B) */
48844 struct __rte_packed_begin hwrm_cfa_redirect_tunnel_type_alloc_input {
48845 	/* The HWRM command request type. */
48846 	uint16_t	req_type;
48847 	/*
48848 	 * The completion ring to send the completion event on. This should
48849 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48850 	 */
48851 	uint16_t	cmpl_ring;
48852 	/*
48853 	 * The sequence ID is used by the driver for tracking multiple
48854 	 * commands. This ID is treated as opaque data by the firmware and
48855 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48856 	 */
48857 	uint16_t	seq_id;
48858 	/*
48859 	 * The target ID of the command:
48860 	 * * 0x0-0xFFF8 - The function ID
48861 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48862 	 * * 0xFFFD - Reserved for user-space HWRM interface
48863 	 * * 0xFFFF - HWRM
48864 	 */
48865 	uint16_t	target_id;
48866 	/*
48867 	 * A physical address pointer pointing to a host buffer that the
48868 	 * command's response data will be written. This can be either a host
48869 	 * physical address (HPA) or a guest physical address (GPA) and must
48870 	 * point to a physically contiguous block of memory.
48871 	 */
48872 	uint64_t	resp_addr;
48873 	/* The destination function id, to whom the traffic is redirected. */
48874 	uint16_t	dest_fid;
48875 	/* Tunnel Type. */
48876 	uint8_t	tunnel_type;
48877 	/* Non-tunnel */
48878 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
48879 		UINT32_C(0x0)
48880 	/* Virtual eXtensible Local Area Network (VXLAN) */
48881 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
48882 		UINT32_C(0x1)
48883 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
48884 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
48885 		UINT32_C(0x2)
48886 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
48887 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
48888 		UINT32_C(0x3)
48889 	/* IP in IP */
48890 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
48891 		UINT32_C(0x4)
48892 	/* Generic Network Virtualization Encapsulation (Geneve) */
48893 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
48894 		UINT32_C(0x5)
48895 	/* Multi-Protocol Label Switching (MPLS) */
48896 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
48897 		UINT32_C(0x6)
48898 	/* Stateless Transport Tunnel (STT) */
48899 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_STT \
48900 		UINT32_C(0x7)
48901 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
48902 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
48903 		UINT32_C(0x8)
48904 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
48905 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
48906 		UINT32_C(0x9)
48907 	/*
48908 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
48909 	 * datagram payload
48910 	 */
48911 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
48912 		UINT32_C(0xa)
48913 	/* Use fixed layer 2 ether type of 0xFFFF */
48914 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE \
48915 		UINT32_C(0xb)
48916 	/*
48917 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
48918 	 * (IPV6oVXLANGPE)
48919 	 */
48920 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
48921 		UINT32_C(0xc)
48922 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
48923 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE \
48924 		UINT32_C(0x10)
48925 	/* Any tunneled traffic */
48926 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
48927 		UINT32_C(0xff)
48928 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_LAST \
48929 		HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
48930 	/* Tunnel alloc flags. */
48931 	uint8_t	flags;
48932 	/*
48933 	 * Setting of this flag indicates modify existing redirect tunnel
48934 	 * to new destination function ID.
48935 	 */
48936 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_ALLOC_INPUT_FLAGS_MODIFY_DST \
48937 		UINT32_C(0x1)
48938 	uint8_t	unused_0[4];
48939 } __rte_packed_end;
48940 
48941 /* hwrm_cfa_redirect_tunnel_type_alloc_output (size:128b/16B) */
48942 struct __rte_packed_begin hwrm_cfa_redirect_tunnel_type_alloc_output {
48943 	/* The specific error status for the command. */
48944 	uint16_t	error_code;
48945 	/* The HWRM command request type. */
48946 	uint16_t	req_type;
48947 	/* The sequence ID from the original command. */
48948 	uint16_t	seq_id;
48949 	/* The length of the response data in number of bytes. */
48950 	uint16_t	resp_len;
48951 	uint8_t	unused_0[7];
48952 	/*
48953 	 * This field is used in Output records to indicate that the output
48954 	 * is completely written to RAM. This field should be read as '1'
48955 	 * to indicate that the output has been completely written.
48956 	 * When writing a command completion or response to an internal
48957 	 * processor, the order of writes has to be such that this field is
48958 	 * written last.
48959 	 */
48960 	uint8_t	valid;
48961 } __rte_packed_end;
48962 
48963 /**************************************
48964  * hwrm_cfa_redirect_tunnel_type_free *
48965  **************************************/
48966 
48967 
48968 /* hwrm_cfa_redirect_tunnel_type_free_input (size:192b/24B) */
48969 struct __rte_packed_begin hwrm_cfa_redirect_tunnel_type_free_input {
48970 	/* The HWRM command request type. */
48971 	uint16_t	req_type;
48972 	/*
48973 	 * The completion ring to send the completion event on. This should
48974 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
48975 	 */
48976 	uint16_t	cmpl_ring;
48977 	/*
48978 	 * The sequence ID is used by the driver for tracking multiple
48979 	 * commands. This ID is treated as opaque data by the firmware and
48980 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
48981 	 */
48982 	uint16_t	seq_id;
48983 	/*
48984 	 * The target ID of the command:
48985 	 * * 0x0-0xFFF8 - The function ID
48986 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
48987 	 * * 0xFFFD - Reserved for user-space HWRM interface
48988 	 * * 0xFFFF - HWRM
48989 	 */
48990 	uint16_t	target_id;
48991 	/*
48992 	 * A physical address pointer pointing to a host buffer that the
48993 	 * command's response data will be written. This can be either a host
48994 	 * physical address (HPA) or a guest physical address (GPA) and must
48995 	 * point to a physically contiguous block of memory.
48996 	 */
48997 	uint64_t	resp_addr;
48998 	/* The destination function id, to whom the traffic is redirected. */
48999 	uint16_t	dest_fid;
49000 	/* Tunnel Type. */
49001 	uint8_t	tunnel_type;
49002 	/* Non-tunnel */
49003 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_NONTUNNEL \
49004 		UINT32_C(0x0)
49005 	/* Virtual eXtensible Local Area Network (VXLAN) */
49006 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_VXLAN \
49007 		UINT32_C(0x1)
49008 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
49009 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_NVGRE \
49010 		UINT32_C(0x2)
49011 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
49012 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_L2GRE \
49013 		UINT32_C(0x3)
49014 	/* IP in IP */
49015 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_IPIP \
49016 		UINT32_C(0x4)
49017 	/* Generic Network Virtualization Encapsulation (Geneve) */
49018 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_GENEVE \
49019 		UINT32_C(0x5)
49020 	/* Multi-Protocol Label Switching (MPLS) */
49021 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_MPLS \
49022 		UINT32_C(0x6)
49023 	/* Stateless Transport Tunnel (STT) */
49024 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_STT \
49025 		UINT32_C(0x7)
49026 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
49027 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_IPGRE \
49028 		UINT32_C(0x8)
49029 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
49030 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_VXLAN_V4 \
49031 		UINT32_C(0x9)
49032 	/*
49033 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
49034 	 * datagram payload
49035 	 */
49036 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_IPGRE_V1 \
49037 		UINT32_C(0xa)
49038 	/* Use fixed layer 2 ether type of 0xFFFF */
49039 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_L2_ETYPE \
49040 		UINT32_C(0xb)
49041 	/*
49042 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
49043 	 * (IPV6oVXLANGPE)
49044 	 */
49045 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
49046 		UINT32_C(0xc)
49047 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
49048 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_VXLAN_GPE \
49049 		UINT32_C(0x10)
49050 	/* Any tunneled traffic */
49051 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_ANYTUNNEL \
49052 		UINT32_C(0xff)
49053 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_LAST \
49054 		HWRM_CFA_REDIRECT_TUNNEL_TYPE_FREE_INPUT_TUNNEL_TYPE_ANYTUNNEL
49055 	uint8_t	unused_0[5];
49056 } __rte_packed_end;
49057 
49058 /* hwrm_cfa_redirect_tunnel_type_free_output (size:128b/16B) */
49059 struct __rte_packed_begin hwrm_cfa_redirect_tunnel_type_free_output {
49060 	/* The specific error status for the command. */
49061 	uint16_t	error_code;
49062 	/* The HWRM command request type. */
49063 	uint16_t	req_type;
49064 	/* The sequence ID from the original command. */
49065 	uint16_t	seq_id;
49066 	/* The length of the response data in number of bytes. */
49067 	uint16_t	resp_len;
49068 	uint8_t	unused_0[7];
49069 	/*
49070 	 * This field is used in Output records to indicate that the output
49071 	 * is completely written to RAM. This field should be read as '1'
49072 	 * to indicate that the output has been completely written.
49073 	 * When writing a command completion or response to an internal
49074 	 * processor, the order of writes has to be such that this field is
49075 	 * written last.
49076 	 */
49077 	uint8_t	valid;
49078 } __rte_packed_end;
49079 
49080 /**************************************
49081  * hwrm_cfa_redirect_tunnel_type_info *
49082  **************************************/
49083 
49084 
49085 /* hwrm_cfa_redirect_tunnel_type_info_input (size:192b/24B) */
49086 struct __rte_packed_begin hwrm_cfa_redirect_tunnel_type_info_input {
49087 	/* The HWRM command request type. */
49088 	uint16_t	req_type;
49089 	/*
49090 	 * The completion ring to send the completion event on. This should
49091 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49092 	 */
49093 	uint16_t	cmpl_ring;
49094 	/*
49095 	 * The sequence ID is used by the driver for tracking multiple
49096 	 * commands. This ID is treated as opaque data by the firmware and
49097 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49098 	 */
49099 	uint16_t	seq_id;
49100 	/*
49101 	 * The target ID of the command:
49102 	 * * 0x0-0xFFF8 - The function ID
49103 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49104 	 * * 0xFFFD - Reserved for user-space HWRM interface
49105 	 * * 0xFFFF - HWRM
49106 	 */
49107 	uint16_t	target_id;
49108 	/*
49109 	 * A physical address pointer pointing to a host buffer that the
49110 	 * command's response data will be written. This can be either a host
49111 	 * physical address (HPA) or a guest physical address (GPA) and must
49112 	 * point to a physically contiguous block of memory.
49113 	 */
49114 	uint64_t	resp_addr;
49115 	/* The source function id. */
49116 	uint16_t	src_fid;
49117 	/* Tunnel Type. */
49118 	uint8_t	tunnel_type;
49119 	/* Non-tunnel */
49120 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_NONTUNNEL \
49121 		UINT32_C(0x0)
49122 	/* Virtual eXtensible Local Area Network (VXLAN) */
49123 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_VXLAN \
49124 		UINT32_C(0x1)
49125 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
49126 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_NVGRE \
49127 		UINT32_C(0x2)
49128 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
49129 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_L2GRE \
49130 		UINT32_C(0x3)
49131 	/* IP in IP */
49132 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_IPIP \
49133 		UINT32_C(0x4)
49134 	/* Generic Network Virtualization Encapsulation (Geneve) */
49135 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_GENEVE \
49136 		UINT32_C(0x5)
49137 	/* Multi-Protocol Label Switching (MPLS) */
49138 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_MPLS \
49139 		UINT32_C(0x6)
49140 	/* Stateless Transport Tunnel (STT) */
49141 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_STT \
49142 		UINT32_C(0x7)
49143 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
49144 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_IPGRE \
49145 		UINT32_C(0x8)
49146 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
49147 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_VXLAN_V4 \
49148 		UINT32_C(0x9)
49149 	/*
49150 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
49151 	 * datagram payload
49152 	 */
49153 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_IPGRE_V1 \
49154 		UINT32_C(0xa)
49155 	/* Use fixed layer 2 ether type of 0xFFFF */
49156 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_L2_ETYPE \
49157 		UINT32_C(0xb)
49158 	/*
49159 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
49160 	 * (IPV6oVXLANGPE)
49161 	 */
49162 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
49163 		UINT32_C(0xc)
49164 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
49165 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_VXLAN_GPE \
49166 		UINT32_C(0x10)
49167 	/* Any tunneled traffic */
49168 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_ANYTUNNEL \
49169 		UINT32_C(0xff)
49170 	#define HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_LAST \
49171 		HWRM_CFA_REDIRECT_TUNNEL_TYPE_INFO_INPUT_TUNNEL_TYPE_ANYTUNNEL
49172 	uint8_t	unused_0[5];
49173 } __rte_packed_end;
49174 
49175 /* hwrm_cfa_redirect_tunnel_type_info_output (size:128b/16B) */
49176 struct __rte_packed_begin hwrm_cfa_redirect_tunnel_type_info_output {
49177 	/* The specific error status for the command. */
49178 	uint16_t	error_code;
49179 	/* The HWRM command request type. */
49180 	uint16_t	req_type;
49181 	/* The sequence ID from the original command. */
49182 	uint16_t	seq_id;
49183 	/* The length of the response data in number of bytes. */
49184 	uint16_t	resp_len;
49185 	/* The destination function id, to whom the traffic is redirected. */
49186 	uint16_t	dest_fid;
49187 	uint8_t	unused_0[5];
49188 	/*
49189 	 * This field is used in Output records to indicate that the output
49190 	 * is completely written to RAM. This field should be read as '1'
49191 	 * to indicate that the output has been completely written.
49192 	 * When writing a command completion or response to an internal
49193 	 * processor, the order of writes has to be such that this field is
49194 	 * written last.
49195 	 */
49196 	uint8_t	valid;
49197 } __rte_packed_end;
49198 
49199 /* hwrm_vxlan_ipv4_hdr (size:128b/16B) */
49200 struct __rte_packed_begin hwrm_vxlan_ipv4_hdr {
49201 	/* IPv4 version and header length. */
49202 	uint8_t	ver_hlen;
49203 	/* IPv4 header length */
49204 	#define HWRM_VXLAN_IPV4_HDR_VER_HLEN_HEADER_LENGTH_MASK UINT32_C(0xf)
49205 	#define HWRM_VXLAN_IPV4_HDR_VER_HLEN_HEADER_LENGTH_SFT 0
49206 	/* Version */
49207 	#define HWRM_VXLAN_IPV4_HDR_VER_HLEN_VERSION_MASK      UINT32_C(0xf0)
49208 	#define HWRM_VXLAN_IPV4_HDR_VER_HLEN_VERSION_SFT       4
49209 	/* IPv4 type of service. */
49210 	uint8_t	tos;
49211 	/* IPv4 identification. */
49212 	uint16_t	ip_id;
49213 	/* IPv4 flags and offset. */
49214 	uint16_t	flags_frag_offset;
49215 	/* IPv4 TTL. */
49216 	uint8_t	ttl;
49217 	/* IPv4 protocol. */
49218 	uint8_t	protocol;
49219 	/* IPv4 source address. */
49220 	uint32_t	src_ip_addr;
49221 	/* IPv4 destination address. */
49222 	uint32_t	dest_ip_addr;
49223 } __rte_packed_end;
49224 
49225 /* hwrm_vxlan_ipv6_hdr (size:320b/40B) */
49226 struct __rte_packed_begin hwrm_vxlan_ipv6_hdr {
49227 	/* IPv6 version, traffic class and flow label. */
49228 	uint32_t	ver_tc_flow_label;
49229 	/* IPv6 version shift */
49230 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_VER_SFT \
49231 		UINT32_C(0x1c)
49232 	/* IPv6 version mask */
49233 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_VER_MASK \
49234 		UINT32_C(0xf0000000)
49235 	/* IPv6 TC shift */
49236 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_TC_SFT \
49237 		UINT32_C(0x14)
49238 	/* IPv6 TC mask */
49239 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_TC_MASK \
49240 		UINT32_C(0xff00000)
49241 	/* IPv6 flow label shift */
49242 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_SFT \
49243 		UINT32_C(0x0)
49244 	/* IPv6 flow label mask */
49245 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_MASK \
49246 		UINT32_C(0xfffff)
49247 	#define HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_LAST \
49248 		HWRM_VXLAN_IPV6_HDR_VER_TC_FLOW_LABEL_FLOW_LABEL_MASK
49249 	/* IPv6 payload length. */
49250 	uint16_t	payload_len;
49251 	/* IPv6 next header. */
49252 	uint8_t	next_hdr;
49253 	/* IPv6 TTL. */
49254 	uint8_t	ttl;
49255 	/* IPv6 source address. */
49256 	uint32_t	src_ip_addr[4];
49257 	/* IPv6 destination address. */
49258 	uint32_t	dest_ip_addr[4];
49259 } __rte_packed_end;
49260 
49261 /* hwrm_cfa_encap_data_vxlan (size:640b/80B) */
49262 struct __rte_packed_begin hwrm_cfa_encap_data_vxlan {
49263 	/* Source MAC address. */
49264 	uint8_t	src_mac_addr[6];
49265 	/* reserved. */
49266 	uint16_t	unused_0;
49267 	/* Destination MAC address. */
49268 	uint8_t	dst_mac_addr[6];
49269 	/* Number of VLAN tags. */
49270 	uint8_t	num_vlan_tags;
49271 	/* reserved. */
49272 	uint8_t	unused_1;
49273 	/* Outer VLAN TPID. */
49274 	uint16_t	ovlan_tpid;
49275 	/* Outer VLAN TCI. */
49276 	uint16_t	ovlan_tci;
49277 	/* Inner VLAN TPID. */
49278 	uint16_t	ivlan_tpid;
49279 	/* Inner VLAN TCI. */
49280 	uint16_t	ivlan_tci;
49281 	/* L3 header fields. */
49282 	uint32_t	l3[10];
49283 	/* IP version mask. */
49284 	#define HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_MASK UINT32_C(0xf)
49285 	/* IP version 4. */
49286 	#define HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_IPV4 UINT32_C(0x4)
49287 	/* IP version 6. */
49288 	#define HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_IPV6 UINT32_C(0x6)
49289 	#define HWRM_CFA_ENCAP_DATA_VXLAN_L3_LAST \
49290 		HWRM_CFA_ENCAP_DATA_VXLAN_L3_VER_IPV6
49291 	/* UDP source port. */
49292 	uint16_t	src_port;
49293 	/* UDP destination port. */
49294 	uint16_t	dst_port;
49295 	/* VXLAN Network Identifier. */
49296 	uint32_t	vni;
49297 	/*
49298 	 * 3 bytes VXLAN header reserve fields from 1st dword of the VXLAN
49299 	 * header.
49300 	 */
49301 	uint8_t	hdr_rsvd0[3];
49302 	/* 1 byte VXLAN header reserve field from 2nd dword of the VXLAN header. */
49303 	uint8_t	hdr_rsvd1;
49304 	/* VXLAN header flags field. */
49305 	uint8_t	hdr_flags;
49306 	uint8_t	unused[3];
49307 } __rte_packed_end;
49308 
49309 /*******************************
49310  * hwrm_cfa_encap_record_alloc *
49311  *******************************/
49312 
49313 
49314 /* hwrm_cfa_encap_record_alloc_input (size:832b/104B) */
49315 struct __rte_packed_begin hwrm_cfa_encap_record_alloc_input {
49316 	/* The HWRM command request type. */
49317 	uint16_t	req_type;
49318 	/*
49319 	 * The completion ring to send the completion event on. This should
49320 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49321 	 */
49322 	uint16_t	cmpl_ring;
49323 	/*
49324 	 * The sequence ID is used by the driver for tracking multiple
49325 	 * commands. This ID is treated as opaque data by the firmware and
49326 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49327 	 */
49328 	uint16_t	seq_id;
49329 	/*
49330 	 * The target ID of the command:
49331 	 * * 0x0-0xFFF8 - The function ID
49332 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49333 	 * * 0xFFFD - Reserved for user-space HWRM interface
49334 	 * * 0xFFFF - HWRM
49335 	 */
49336 	uint16_t	target_id;
49337 	/*
49338 	 * A physical address pointer pointing to a host buffer that the
49339 	 * command's response data will be written. This can be either a host
49340 	 * physical address (HPA) or a guest physical address (GPA) and must
49341 	 * point to a physically contiguous block of memory.
49342 	 */
49343 	uint64_t	resp_addr;
49344 	uint32_t	flags;
49345 	/*
49346 	 * Setting of this flag indicates the applicability to the loopback
49347 	 * path.
49348 	 */
49349 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_FLAGS_LOOPBACK \
49350 		UINT32_C(0x1)
49351 	/*
49352 	 * Setting of this flag indicates this encap record is external
49353 	 * encap record. Resetting of this flag indicates this flag is
49354 	 * internal encap record and this is the default setting.
49355 	 */
49356 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_FLAGS_EXTERNAL \
49357 		UINT32_C(0x2)
49358 	/* Encapsulation Type. */
49359 	uint8_t	encap_type;
49360 	/* Virtual eXtensible Local Area Network (VXLAN) */
49361 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN \
49362 		UINT32_C(0x1)
49363 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
49364 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_NVGRE \
49365 		UINT32_C(0x2)
49366 	/* Generic Routing Encapsulation (GRE) after inside Ethernet payload */
49367 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_L2GRE \
49368 		UINT32_C(0x3)
49369 	/* IP in IP */
49370 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPIP \
49371 		UINT32_C(0x4)
49372 	/* Generic Network Virtualization Encapsulation (Geneve) */
49373 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_GENEVE \
49374 		UINT32_C(0x5)
49375 	/* Multi-Protocol Label Switching (MPLS) */
49376 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_MPLS \
49377 		UINT32_C(0x6)
49378 	/* VLAN */
49379 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VLAN \
49380 		UINT32_C(0x7)
49381 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
49382 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPGRE \
49383 		UINT32_C(0x8)
49384 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
49385 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN_V4 \
49386 		UINT32_C(0x9)
49387 	/*
49388 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
49389 	 * datagram payload
49390 	 */
49391 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_IPGRE_V1 \
49392 		UINT32_C(0xa)
49393 	/* Use fixed layer 2 ether type of 0xFFFF */
49394 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_L2_ETYPE \
49395 		UINT32_C(0xb)
49396 	/*
49397 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
49398 	 * (IPV6oVXLANGPE)
49399 	 */
49400 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN_GPE_V6 \
49401 		UINT32_C(0xc)
49402 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
49403 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN_GPE \
49404 		UINT32_C(0x10)
49405 	#define HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_LAST \
49406 		HWRM_CFA_ENCAP_RECORD_ALLOC_INPUT_ENCAP_TYPE_VXLAN_GPE
49407 	uint8_t	unused_0[3];
49408 	/* This value is encap data used for the given encap type. */
49409 	uint32_t	encap_data[20];
49410 } __rte_packed_end;
49411 
49412 /* hwrm_cfa_encap_record_alloc_output (size:128b/16B) */
49413 struct __rte_packed_begin hwrm_cfa_encap_record_alloc_output {
49414 	/* The specific error status for the command. */
49415 	uint16_t	error_code;
49416 	/* The HWRM command request type. */
49417 	uint16_t	req_type;
49418 	/* The sequence ID from the original command. */
49419 	uint16_t	seq_id;
49420 	/* The length of the response data in number of bytes. */
49421 	uint16_t	resp_len;
49422 	/* This value is an opaque id into CFA data structures. */
49423 	uint32_t	encap_record_id;
49424 	uint8_t	unused_0[3];
49425 	/*
49426 	 * This field is used in Output records to indicate that the output
49427 	 * is completely written to RAM. This field should be read as '1'
49428 	 * to indicate that the output has been completely written.
49429 	 * When writing a command completion or response to an internal
49430 	 * processor, the order of writes has to be such that this field is
49431 	 * written last.
49432 	 */
49433 	uint8_t	valid;
49434 } __rte_packed_end;
49435 
49436 /******************************
49437  * hwrm_cfa_encap_record_free *
49438  ******************************/
49439 
49440 
49441 /* hwrm_cfa_encap_record_free_input (size:192b/24B) */
49442 struct __rte_packed_begin hwrm_cfa_encap_record_free_input {
49443 	/* The HWRM command request type. */
49444 	uint16_t	req_type;
49445 	/*
49446 	 * The completion ring to send the completion event on. This should
49447 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49448 	 */
49449 	uint16_t	cmpl_ring;
49450 	/*
49451 	 * The sequence ID is used by the driver for tracking multiple
49452 	 * commands. This ID is treated as opaque data by the firmware and
49453 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49454 	 */
49455 	uint16_t	seq_id;
49456 	/*
49457 	 * The target ID of the command:
49458 	 * * 0x0-0xFFF8 - The function ID
49459 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49460 	 * * 0xFFFD - Reserved for user-space HWRM interface
49461 	 * * 0xFFFF - HWRM
49462 	 */
49463 	uint16_t	target_id;
49464 	/*
49465 	 * A physical address pointer pointing to a host buffer that the
49466 	 * command's response data will be written. This can be either a host
49467 	 * physical address (HPA) or a guest physical address (GPA) and must
49468 	 * point to a physically contiguous block of memory.
49469 	 */
49470 	uint64_t	resp_addr;
49471 	/* This value is an opaque id into CFA data structures. */
49472 	uint32_t	encap_record_id;
49473 	uint8_t	unused_0[4];
49474 } __rte_packed_end;
49475 
49476 /* hwrm_cfa_encap_record_free_output (size:128b/16B) */
49477 struct __rte_packed_begin hwrm_cfa_encap_record_free_output {
49478 	/* The specific error status for the command. */
49479 	uint16_t	error_code;
49480 	/* The HWRM command request type. */
49481 	uint16_t	req_type;
49482 	/* The sequence ID from the original command. */
49483 	uint16_t	seq_id;
49484 	/* The length of the response data in number of bytes. */
49485 	uint16_t	resp_len;
49486 	uint8_t	unused_0[7];
49487 	/*
49488 	 * This field is used in Output records to indicate that the output
49489 	 * is completely written to RAM. This field should be read as '1'
49490 	 * to indicate that the output has been completely written.
49491 	 * When writing a command completion or response to an internal
49492 	 * processor, the order of writes has to be such that this field is
49493 	 * written last.
49494 	 */
49495 	uint8_t	valid;
49496 } __rte_packed_end;
49497 
49498 /********************************
49499  * hwrm_cfa_ntuple_filter_alloc *
49500  ********************************/
49501 
49502 
49503 /* hwrm_cfa_ntuple_filter_alloc_input (size:1024b/128B) */
49504 struct __rte_packed_begin hwrm_cfa_ntuple_filter_alloc_input {
49505 	/* The HWRM command request type. */
49506 	uint16_t	req_type;
49507 	/*
49508 	 * The completion ring to send the completion event on. This should
49509 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
49510 	 */
49511 	uint16_t	cmpl_ring;
49512 	/*
49513 	 * The sequence ID is used by the driver for tracking multiple
49514 	 * commands. This ID is treated as opaque data by the firmware and
49515 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
49516 	 */
49517 	uint16_t	seq_id;
49518 	/*
49519 	 * The target ID of the command:
49520 	 * * 0x0-0xFFF8 - The function ID
49521 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
49522 	 * * 0xFFFD - Reserved for user-space HWRM interface
49523 	 * * 0xFFFF - HWRM
49524 	 */
49525 	uint16_t	target_id;
49526 	/*
49527 	 * A physical address pointer pointing to a host buffer that the
49528 	 * command's response data will be written. This can be either a host
49529 	 * physical address (HPA) or a guest physical address (GPA) and must
49530 	 * point to a physically contiguous block of memory.
49531 	 */
49532 	uint64_t	resp_addr;
49533 	uint32_t	flags;
49534 	/*
49535 	 * Setting of this flag indicates the applicability to the loopback
49536 	 * path.
49537 	 */
49538 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_LOOPBACK \
49539 		UINT32_C(0x1)
49540 	/*
49541 	 * Setting of this flag indicates drop action. If this flag is not
49542 	 * set, then it should be considered accept action.
49543 	 */
49544 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DROP \
49545 		UINT32_C(0x2)
49546 	/*
49547 	 * Setting of this flag indicates that a meter is expected to be
49548 	 * attached to this flow. This hint can be used when choosing the
49549 	 * action record format required for the flow.
49550 	 */
49551 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_METER \
49552 		UINT32_C(0x4)
49553 	/*
49554 	 * Setting of this flag indicates that the dst_id field contains
49555 	 * function ID. If this is not set it indicates dest_id is VNIC
49556 	 * or VPORT.
49557 	 */
49558 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DEST_FID \
49559 		UINT32_C(0x8)
49560 	/*
49561 	 * Setting of this flag indicates match on arp reply when ethertype
49562 	 * is 0x0806. If this is not set it indicates no specific arp opcode
49563 	 * matching.
49564 	 */
49565 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_ARP_REPLY \
49566 		UINT32_C(0x10)
49567 	/*
49568 	 * Setting of this flag indicates that the dst_id field contains RFS
49569 	 * ring table index. If this is not set it indicates dst_id is VNIC
49570 	 * or VPORT or function ID. Note dest_fid and dest_rfs_ring_idx
49571 	 * can't be set at the same time. Updated drivers should pass ring
49572 	 * idx in the rfs_ring_tbl_idx field if the firmware indicates
49573 	 * support for the new field in the HWRM_CFA_ADV_FLOW_MGMT_QCAPS
49574 	 * response.
49575 	 */
49576 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DEST_RFS_RING_IDX \
49577 		UINT32_C(0x20)
49578 	/*
49579 	 * Setting of this flag indicates that when the ntuple filter is
49580 	 * created, the L2 context should not be used in the filter. This
49581 	 * allows packet from different L2 contexts to match and be directed
49582 	 * to the same destination.
49583 	 */
49584 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_NO_L2_CONTEXT \
49585 		UINT32_C(0x40)
49586 	uint32_t	enables;
49587 	/*
49588 	 * This bit must be '1' for the l2_filter_id field to be
49589 	 * configured.
49590 	 */
49591 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID \
49592 		UINT32_C(0x1)
49593 	/*
49594 	 * This bit must be '1' for the ethertype field to be
49595 	 * configured.
49596 	 */
49597 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE \
49598 		UINT32_C(0x2)
49599 	/*
49600 	 * This bit must be '1' for the tunnel_type field to be
49601 	 * configured.
49602 	 */
49603 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
49604 		UINT32_C(0x4)
49605 	/*
49606 	 * This bit must be '1' for the src_macaddr field to be
49607 	 * configured.
49608 	 */
49609 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR \
49610 		UINT32_C(0x8)
49611 	/*
49612 	 * This bit must be '1' for the ipaddr_type field to be
49613 	 * configured.
49614 	 */
49615 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_IPADDR_TYPE \
49616 		UINT32_C(0x10)
49617 	/*
49618 	 * This bit must be '1' for the src_ipaddr field to be
49619 	 * configured.
49620 	 */
49621 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR \
49622 		UINT32_C(0x20)
49623 	/*
49624 	 * This bit must be '1' for the src_ipaddr_mask field to be
49625 	 * configured.
49626 	 */
49627 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR_MASK \
49628 		UINT32_C(0x40)
49629 	/*
49630 	 * This bit must be '1' for the dst_ipaddr field to be
49631 	 * configured.
49632 	 */
49633 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR \
49634 		UINT32_C(0x80)
49635 	/*
49636 	 * This bit must be '1' for the dst_ipaddr_mask field to be
49637 	 * configured.
49638 	 */
49639 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR_MASK \
49640 		UINT32_C(0x100)
49641 	/*
49642 	 * This bit must be '1' for the ip_protocol field to be
49643 	 * configured.
49644 	 */
49645 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_IP_PROTOCOL \
49646 		UINT32_C(0x200)
49647 	/*
49648 	 * This bit must be '1' for the src_port field to be
49649 	 * configured.
49650 	 */
49651 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT \
49652 		UINT32_C(0x400)
49653 	/*
49654 	 * This bit must be '1' for the src_port_mask field to be
49655 	 * configured.
49656 	 */
49657 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT_MASK \
49658 		UINT32_C(0x800)
49659 	/*
49660 	 * This bit must be '1' for the dst_port field to be
49661 	 * configured.
49662 	 */
49663 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_PORT \
49664 		UINT32_C(0x1000)
49665 	/*
49666 	 * This bit must be '1' for the dst_port_mask field to be
49667 	 * configured.
49668 	 */
49669 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_PORT_MASK \
49670 		UINT32_C(0x2000)
49671 	/*
49672 	 * This bit must be '1' for the pri_hint field to be
49673 	 * configured.
49674 	 */
49675 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_PRI_HINT \
49676 		UINT32_C(0x4000)
49677 	/*
49678 	 * This bit must be '1' for the ntuple_filter_id field to be
49679 	 * configured.
49680 	 */
49681 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_NTUPLE_FILTER_ID \
49682 		UINT32_C(0x8000)
49683 	/*
49684 	 * This bit must be '1' for the dst_id field to be
49685 	 * configured.
49686 	 */
49687 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_ID \
49688 		UINT32_C(0x10000)
49689 	/* This flag is deprecated. */
49690 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
49691 		UINT32_C(0x20000)
49692 	/*
49693 	 * This bit must be '1' for the dst_macaddr field to be
49694 	 * configured.
49695 	 */
49696 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR \
49697 		UINT32_C(0x40000)
49698 	/*
49699 	 * This bit must be '1' for the rfs_ring_tbl_idx field to
49700 	 * be configured.
49701 	 */
49702 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_RFS_RING_TBL_IDX \
49703 		UINT32_C(0x80000)
49704 	/*
49705 	 * This value identifies a set of CFA data structures used for an L2
49706 	 * context.
49707 	 */
49708 	uint64_t	l2_filter_id;
49709 	/*
49710 	 * This value indicates the source MAC address in
49711 	 * the Ethernet header.
49712 	 */
49713 	uint8_t	src_macaddr[6];
49714 	/* This value indicates the ethertype in the Ethernet header. */
49715 	uint16_t	ethertype;
49716 	/*
49717 	 * This value indicates the type of IP address.
49718 	 * 4 - IPv4
49719 	 * 6 - IPv6
49720 	 * All others are invalid.
49721 	 */
49722 	uint8_t	ip_addr_type;
49723 	/* invalid */
49724 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN \
49725 		UINT32_C(0x0)
49726 	/* IPv4 */
49727 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4 \
49728 		UINT32_C(0x4)
49729 	/* IPv6 */
49730 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6 \
49731 		UINT32_C(0x6)
49732 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_LAST \
49733 		HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
49734 	/*
49735 	 * The value of protocol field in IP header.
49736 	 * Applies to UDP and TCP traffic.
49737 	 * 6 - TCP
49738 	 * 17 - UDP
49739 	 * 1 - ICMP
49740 	 * 58 - ICMPV6
49741 	 * 255 - RSVD
49742 	 */
49743 	uint8_t	ip_protocol;
49744 	/* invalid */
49745 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN \
49746 		UINT32_C(0x0)
49747 	/* TCP */
49748 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_TCP \
49749 		UINT32_C(0x6)
49750 	/* UDP */
49751 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP \
49752 		UINT32_C(0x11)
49753 	/* ICMP */
49754 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_ICMP \
49755 		UINT32_C(0x1)
49756 	/* ICMPV6 */
49757 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_ICMPV6 \
49758 		UINT32_C(0x3a)
49759 	/* RSVD */
49760 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_RSVD \
49761 		UINT32_C(0xff)
49762 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_LAST \
49763 		HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_IP_PROTOCOL_RSVD
49764 	/*
49765 	 * If set, this value shall represent the
49766 	 * Logical VNIC ID of the destination VNIC for the RX
49767 	 * path and network port id of the destination port for
49768 	 * the TX path.
49769 	 */
49770 	uint16_t	dst_id;
49771 	/*
49772 	 * If set, this value shall represent the ring table
49773 	 * index for receive flow steering. Note that this offset
49774 	 * was formerly used for the mirror_vnic_id field, which
49775 	 * is no longer supported.
49776 	 */
49777 	uint16_t	rfs_ring_tbl_idx;
49778 	/*
49779 	 * This value indicates the tunnel type for this filter.
49780 	 * If this field is not specified, then the filter shall
49781 	 * apply to both non-tunneled and tunneled packets.
49782 	 * If this field conflicts with the tunnel_type specified
49783 	 * in the l2_filter_id, then the HWRM shall return an
49784 	 * error for this command.
49785 	 */
49786 	uint8_t	tunnel_type;
49787 	/* Non-tunnel */
49788 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
49789 		UINT32_C(0x0)
49790 	/* Virtual eXtensible Local Area Network (VXLAN) */
49791 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
49792 		UINT32_C(0x1)
49793 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
49794 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
49795 		UINT32_C(0x2)
49796 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
49797 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
49798 		UINT32_C(0x3)
49799 	/* IP in IP */
49800 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
49801 		UINT32_C(0x4)
49802 	/* Generic Network Virtualization Encapsulation (Geneve) */
49803 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
49804 		UINT32_C(0x5)
49805 	/* Multi-Protocol Label Switching (MPLS) */
49806 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
49807 		UINT32_C(0x6)
49808 	/* Stateless Transport Tunnel (STT) */
49809 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \
49810 		UINT32_C(0x7)
49811 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
49812 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
49813 		UINT32_C(0x8)
49814 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
49815 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
49816 		UINT32_C(0x9)
49817 	/*
49818 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
49819 	 * datagram payload
49820 	 */
49821 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
49822 		UINT32_C(0xa)
49823 	/* Use fixed layer 2 ether type of 0xFFFF */
49824 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE \
49825 		UINT32_C(0xb)
49826 	/*
49827 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
49828 	 * (IPV6oVXLANGPE)
49829 	 */
49830 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
49831 		UINT32_C(0xc)
49832 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
49833 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE \
49834 		UINT32_C(0x10)
49835 	/* Any tunneled traffic */
49836 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
49837 		UINT32_C(0xff)
49838 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST \
49839 		HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
49840 	/*
49841 	 * This hint is provided to help in placing
49842 	 * the filter in the filter table.
49843 	 */
49844 	uint8_t	pri_hint;
49845 	/* No preference */
49846 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_NO_PREFER \
49847 		UINT32_C(0x0)
49848 	/* Above the given filter */
49849 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_ABOVE \
49850 		UINT32_C(0x1)
49851 	/* Below the given filter */
49852 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_BELOW \
49853 		UINT32_C(0x2)
49854 	/* As high as possible */
49855 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_HIGHEST \
49856 		UINT32_C(0x3)
49857 	/* As low as possible */
49858 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LOWEST \
49859 		UINT32_C(0x4)
49860 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LAST \
49861 		HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_PRI_HINT_LOWEST
49862 	/*
49863 	 * The value of source IP address to be used in filtering.
49864 	 * For IPv4, first four bytes represent the IP address.
49865 	 */
49866 	uint32_t	src_ipaddr[4];
49867 	/*
49868 	 * The value of source IP address mask to be used in
49869 	 * filtering.
49870 	 * For IPv4, first four bytes represent the IP address mask.
49871 	 */
49872 	uint32_t	src_ipaddr_mask[4];
49873 	/*
49874 	 * The value of destination IP address to be used in filtering.
49875 	 * For IPv4, first four bytes represent the IP address.
49876 	 */
49877 	uint32_t	dst_ipaddr[4];
49878 	/*
49879 	 * The value of destination IP address mask to be used in
49880 	 * filtering.
49881 	 * For IPv4, first four bytes represent the IP address mask.
49882 	 */
49883 	uint32_t	dst_ipaddr_mask[4];
49884 	/*
49885 	 * The value of source port to be used in filtering.
49886 	 * Applies to UDP and TCP traffic.
49887 	 */
49888 	uint16_t	src_port;
49889 	/*
49890 	 * The value of source port mask to be used in filtering.
49891 	 * Applies to UDP and TCP traffic.
49892 	 */
49893 	uint16_t	src_port_mask;
49894 	/*
49895 	 * The value of destination port to be used in filtering.
49896 	 * Applies to UDP and TCP traffic.
49897 	 */
49898 	uint16_t	dst_port;
49899 	/*
49900 	 * The value of destination port mask to be used in
49901 	 * filtering.
49902 	 * Applies to UDP and TCP traffic.
49903 	 */
49904 	uint16_t	dst_port_mask;
49905 	/*
49906 	 * This is the ID of the filter that goes along with
49907 	 * the pri_hint.
49908 	 */
49909 	uint64_t	ntuple_filter_id_hint;
49910 } __rte_packed_end;
49911 
49912 /* hwrm_cfa_ntuple_filter_alloc_output (size:192b/24B) */
49913 struct __rte_packed_begin hwrm_cfa_ntuple_filter_alloc_output {
49914 	/* The specific error status for the command. */
49915 	uint16_t	error_code;
49916 	/* The HWRM command request type. */
49917 	uint16_t	req_type;
49918 	/* The sequence ID from the original command. */
49919 	uint16_t	seq_id;
49920 	/* The length of the response data in number of bytes. */
49921 	uint16_t	resp_len;
49922 	/* This value is an opaque id into CFA data structures. */
49923 	uint64_t	ntuple_filter_id;
49924 	/*
49925 	 * The flow id value in bit 0-29 is the actual ID of the flow
49926 	 * associated with this filter and it shall be used to match
49927 	 * and associate the flow identifier returned in completion
49928 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
49929 	 * shall indicate no valid flow id.
49930 	 */
49931 	uint32_t	flow_id;
49932 	/* Indicate the flow id value. */
49933 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK \
49934 		UINT32_C(0x3fffffff)
49935 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
49936 	/* Indicate type of the flow. */
49937 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE \
49938 		UINT32_C(0x40000000)
49939 	/*
49940 	 * If this bit set to 0, then it indicates that the flow is
49941 	 * internal flow.
49942 	 */
49943 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_INT \
49944 		(UINT32_C(0x0) << 30)
49945 	/*
49946 	 * If this bit is set to 1, then it indicates that the flow is
49947 	 * external flow.
49948 	 */
49949 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT \
49950 		(UINT32_C(0x1) << 30)
49951 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST \
49952 		HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
49953 	/* Indicate the flow direction. */
49954 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR \
49955 		UINT32_C(0x80000000)
49956 	/* If this bit set to 0, then it indicates rx flow. */
49957 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_RX \
49958 		(UINT32_C(0x0) << 31)
49959 	/* If this bit is set to 1, then it indicates that tx flow. */
49960 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX \
49961 		(UINT32_C(0x1) << 31)
49962 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_LAST \
49963 		HWRM_CFA_NTUPLE_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX
49964 	uint8_t	unused_0[3];
49965 	/*
49966 	 * This field is used in Output records to indicate that the output
49967 	 * is completely written to RAM. This field should be read as '1'
49968 	 * to indicate that the output has been completely written.
49969 	 * When writing a command completion or response to an internal
49970 	 * processor, the order of writes has to be such that this field is
49971 	 * written last.
49972 	 */
49973 	uint8_t	valid;
49974 } __rte_packed_end;
49975 
49976 /* hwrm_cfa_ntuple_filter_alloc_cmd_err (size:64b/8B) */
49977 struct __rte_packed_begin hwrm_cfa_ntuple_filter_alloc_cmd_err {
49978 	/*
49979 	 * command specific error codes that goes to
49980 	 * the cmd_err field in Common HWRM Error Response.
49981 	 */
49982 	uint8_t	code;
49983 	/* Unknown error */
49984 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_UNKNOWN \
49985 		UINT32_C(0x0)
49986 	/* Unable to complete operation due to conflict with Rx Mask VLAN */
49987 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_RX_MASK_VLAN_CONFLICT_ERR \
49988 		UINT32_C(0x1)
49989 	#define HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_LAST \
49990 		HWRM_CFA_NTUPLE_FILTER_ALLOC_CMD_ERR_CODE_RX_MASK_VLAN_CONFLICT_ERR
49991 	uint8_t	unused_0[7];
49992 } __rte_packed_end;
49993 
49994 /*******************************
49995  * hwrm_cfa_ntuple_filter_free *
49996  *******************************/
49997 
49998 
49999 /* hwrm_cfa_ntuple_filter_free_input (size:192b/24B) */
50000 struct __rte_packed_begin hwrm_cfa_ntuple_filter_free_input {
50001 	/* The HWRM command request type. */
50002 	uint16_t	req_type;
50003 	/*
50004 	 * The completion ring to send the completion event on. This should
50005 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50006 	 */
50007 	uint16_t	cmpl_ring;
50008 	/*
50009 	 * The sequence ID is used by the driver for tracking multiple
50010 	 * commands. This ID is treated as opaque data by the firmware and
50011 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50012 	 */
50013 	uint16_t	seq_id;
50014 	/*
50015 	 * The target ID of the command:
50016 	 * * 0x0-0xFFF8 - The function ID
50017 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50018 	 * * 0xFFFD - Reserved for user-space HWRM interface
50019 	 * * 0xFFFF - HWRM
50020 	 */
50021 	uint16_t	target_id;
50022 	/*
50023 	 * A physical address pointer pointing to a host buffer that the
50024 	 * command's response data will be written. This can be either a host
50025 	 * physical address (HPA) or a guest physical address (GPA) and must
50026 	 * point to a physically contiguous block of memory.
50027 	 */
50028 	uint64_t	resp_addr;
50029 	/* This value is an opaque id into CFA data structures. */
50030 	uint64_t	ntuple_filter_id;
50031 } __rte_packed_end;
50032 
50033 /* hwrm_cfa_ntuple_filter_free_output (size:128b/16B) */
50034 struct __rte_packed_begin hwrm_cfa_ntuple_filter_free_output {
50035 	/* The specific error status for the command. */
50036 	uint16_t	error_code;
50037 	/* The HWRM command request type. */
50038 	uint16_t	req_type;
50039 	/* The sequence ID from the original command. */
50040 	uint16_t	seq_id;
50041 	/* The length of the response data in number of bytes. */
50042 	uint16_t	resp_len;
50043 	uint8_t	unused_0[7];
50044 	/*
50045 	 * This field is used in Output records to indicate that the output
50046 	 * is completely written to RAM. This field should be read as '1'
50047 	 * to indicate that the output has been completely written.
50048 	 * When writing a command completion or response to an internal
50049 	 * processor, the order of writes has to be such that this field is
50050 	 * written last.
50051 	 */
50052 	uint8_t	valid;
50053 } __rte_packed_end;
50054 
50055 /******************************
50056  * hwrm_cfa_ntuple_filter_cfg *
50057  ******************************/
50058 
50059 
50060 /* hwrm_cfa_ntuple_filter_cfg_input (size:384b/48B) */
50061 struct __rte_packed_begin hwrm_cfa_ntuple_filter_cfg_input {
50062 	/* The HWRM command request type. */
50063 	uint16_t	req_type;
50064 	/*
50065 	 * The completion ring to send the completion event on. This should
50066 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50067 	 */
50068 	uint16_t	cmpl_ring;
50069 	/*
50070 	 * The sequence ID is used by the driver for tracking multiple
50071 	 * commands. This ID is treated as opaque data by the firmware and
50072 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50073 	 */
50074 	uint16_t	seq_id;
50075 	/*
50076 	 * The target ID of the command:
50077 	 * * 0x0-0xFFF8 - The function ID
50078 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50079 	 * * 0xFFFD - Reserved for user-space HWRM interface
50080 	 * * 0xFFFF - HWRM
50081 	 */
50082 	uint16_t	target_id;
50083 	/*
50084 	 * A physical address pointer pointing to a host buffer that the
50085 	 * command's response data will be written. This can be either a host
50086 	 * physical address (HPA) or a guest physical address (GPA) and must
50087 	 * point to a physically contiguous block of memory.
50088 	 */
50089 	uint64_t	resp_addr;
50090 	uint32_t	enables;
50091 	/*
50092 	 * This bit must be '1' for the new_dst_id field to be
50093 	 * configured.
50094 	 */
50095 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_DST_ID \
50096 		UINT32_C(0x1)
50097 	/*
50098 	 * This bit must be '1' for the new_mirror_vnic_id field to be
50099 	 * configured.
50100 	 */
50101 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_MIRROR_VNIC_ID \
50102 		UINT32_C(0x2)
50103 	/*
50104 	 * This bit must be '1' for the new_meter_instance_id field to be
50105 	 * configured.
50106 	 */
50107 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_ENABLES_NEW_METER_INSTANCE_ID \
50108 		UINT32_C(0x4)
50109 	uint32_t	flags;
50110 	/*
50111 	 * Setting this bit to 1 indicates that dest_id field contains FID.
50112 	 * Setting this to 0 indicates that dest_id field contains VNIC or
50113 	 * VPORT.
50114 	 */
50115 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_FLAGS_DEST_FID \
50116 		UINT32_C(0x1)
50117 	/*
50118 	 * Setting of this flag indicates that the new_dst_id field contains
50119 	 * RFS ring table index. If this is not set it indicates new_dst_id
50120 	 * is VNIC or VPORT or function ID. Note dest_fid and
50121 	 * dest_rfs_ring_idx can't be set at the same time.
50122 	 */
50123 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_FLAGS_DEST_RFS_RING_IDX \
50124 		UINT32_C(0x2)
50125 	/*
50126 	 * Setting of this flag indicates that when the ntuple filter is
50127 	 * created, the L2 context should not be used in the filter. This
50128 	 * allows packet from different L2 contexts to match and be directed
50129 	 * to the same destination.
50130 	 */
50131 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_FLAGS_NO_L2_CONTEXT \
50132 		UINT32_C(0x4)
50133 	/* This value is an opaque id into CFA data structures. */
50134 	uint64_t	ntuple_filter_id;
50135 	/*
50136 	 * If set, this value shall represent the new
50137 	 * Logical VNIC ID of the destination VNIC for the RX
50138 	 * path and new network port id of the destination port for
50139 	 * the TX path.
50140 	 */
50141 	uint32_t	new_dst_id;
50142 	/*
50143 	 * New Logical VNIC ID of the VNIC where traffic is
50144 	 * mirrored.
50145 	 */
50146 	uint32_t	new_mirror_vnic_id;
50147 	/*
50148 	 * New meter to attach to the flow. Specifying the
50149 	 * invalid instance ID is used to remove any existing
50150 	 * meter from the flow.
50151 	 */
50152 	uint16_t	new_meter_instance_id;
50153 	/*
50154 	 * A value of 0xfff is considered invalid and implies the
50155 	 * instance is not configured.
50156 	 */
50157 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID \
50158 		UINT32_C(0xffff)
50159 	#define HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_LAST \
50160 		HWRM_CFA_NTUPLE_FILTER_CFG_INPUT_NEW_METER_INSTANCE_ID_INVALID
50161 	uint8_t	unused_1[6];
50162 } __rte_packed_end;
50163 
50164 /* hwrm_cfa_ntuple_filter_cfg_output (size:128b/16B) */
50165 struct __rte_packed_begin hwrm_cfa_ntuple_filter_cfg_output {
50166 	/* The specific error status for the command. */
50167 	uint16_t	error_code;
50168 	/* The HWRM command request type. */
50169 	uint16_t	req_type;
50170 	/* The sequence ID from the original command. */
50171 	uint16_t	seq_id;
50172 	/* The length of the response data in number of bytes. */
50173 	uint16_t	resp_len;
50174 	uint8_t	unused_0[7];
50175 	/*
50176 	 * This field is used in Output records to indicate that the output
50177 	 * is completely written to RAM. This field should be read as '1'
50178 	 * to indicate that the output has been completely written.
50179 	 * When writing a command completion or response to an internal
50180 	 * processor, the order of writes has to be such that this field is
50181 	 * written last.
50182 	 */
50183 	uint8_t	valid;
50184 } __rte_packed_end;
50185 
50186 /**************************
50187  * hwrm_cfa_em_flow_alloc *
50188  **************************/
50189 
50190 
50191 /* hwrm_cfa_em_flow_alloc_input (size:896b/112B) */
50192 struct __rte_packed_begin hwrm_cfa_em_flow_alloc_input {
50193 	/* The HWRM command request type. */
50194 	uint16_t	req_type;
50195 	/*
50196 	 * The completion ring to send the completion event on. This should
50197 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50198 	 */
50199 	uint16_t	cmpl_ring;
50200 	/*
50201 	 * The sequence ID is used by the driver for tracking multiple
50202 	 * commands. This ID is treated as opaque data by the firmware and
50203 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50204 	 */
50205 	uint16_t	seq_id;
50206 	/*
50207 	 * The target ID of the command:
50208 	 * * 0x0-0xFFF8 - The function ID
50209 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50210 	 * * 0xFFFD - Reserved for user-space HWRM interface
50211 	 * * 0xFFFF - HWRM
50212 	 */
50213 	uint16_t	target_id;
50214 	/*
50215 	 * A physical address pointer pointing to a host buffer that the
50216 	 * command's response data will be written. This can be either a host
50217 	 * physical address (HPA) or a guest physical address (GPA) and must
50218 	 * point to a physically contiguous block of memory.
50219 	 */
50220 	uint64_t	resp_addr;
50221 	uint32_t	flags;
50222 	/*
50223 	 * Enumeration denoting the RX, TX type of the resource.
50224 	 * This enumeration is used for resources that are similar for both
50225 	 * TX and RX paths of the chip.
50226 	 */
50227 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH         UINT32_C(0x1)
50228 	/* tx path */
50229 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_TX        UINT32_C(0x0)
50230 	/* rx path */
50231 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_RX        UINT32_C(0x1)
50232 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_LAST \
50233 		HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PATH_RX
50234 	/*
50235 	 * Setting of this flag indicates enabling of a byte counter for a
50236 	 * given flow.
50237 	 */
50238 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_BYTE_CTR     UINT32_C(0x2)
50239 	/*
50240 	 * Setting of this flag indicates enabling of a packet counter for a
50241 	 * given flow.
50242 	 */
50243 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_PKT_CTR      UINT32_C(0x4)
50244 	/*
50245 	 * Setting of this flag indicates de-capsulation action for the
50246 	 * given flow.
50247 	 */
50248 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_DECAP        UINT32_C(0x8)
50249 	/*
50250 	 * Setting of this flag indicates encapsulation action for the
50251 	 * given flow.
50252 	 */
50253 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_ENCAP        UINT32_C(0x10)
50254 	/*
50255 	 * Setting of this flag indicates drop action. If this flag is not
50256 	 * set, then it should be considered accept action.
50257 	 */
50258 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_DROP         UINT32_C(0x20)
50259 	/*
50260 	 * Setting of this flag indicates that a meter is expected to be
50261 	 * attached to this flow. This hint can be used when choosing the
50262 	 * action record format required for the flow.
50263 	 */
50264 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_FLAGS_METER        UINT32_C(0x40)
50265 	uint32_t	enables;
50266 	/*
50267 	 * This bit must be '1' for the l2_filter_id field to be
50268 	 * configured.
50269 	 */
50270 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_L2_FILTER_ID \
50271 		UINT32_C(0x1)
50272 	/*
50273 	 * This bit must be '1' for the tunnel_type field to be
50274 	 * configured.
50275 	 */
50276 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
50277 		UINT32_C(0x2)
50278 	/*
50279 	 * This bit must be '1' for the tunnel_id field to be
50280 	 * configured.
50281 	 */
50282 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_TUNNEL_ID \
50283 		UINT32_C(0x4)
50284 	/*
50285 	 * This bit must be '1' for the src_macaddr field to be
50286 	 * configured.
50287 	 */
50288 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_MACADDR \
50289 		UINT32_C(0x8)
50290 	/*
50291 	 * This bit must be '1' for the dst_macaddr field to be
50292 	 * configured.
50293 	 */
50294 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_MACADDR \
50295 		UINT32_C(0x10)
50296 	/*
50297 	 * This bit must be '1' for the ovlan_vid field to be
50298 	 * configured.
50299 	 */
50300 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_OVLAN_VID \
50301 		UINT32_C(0x20)
50302 	/*
50303 	 * This bit must be '1' for the ivlan_vid field to be
50304 	 * configured.
50305 	 */
50306 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IVLAN_VID \
50307 		UINT32_C(0x40)
50308 	/*
50309 	 * This bit must be '1' for the ethertype field to be
50310 	 * configured.
50311 	 */
50312 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_ETHERTYPE \
50313 		UINT32_C(0x80)
50314 	/*
50315 	 * This bit must be '1' for the src_ipaddr field to be
50316 	 * configured.
50317 	 */
50318 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_IPADDR \
50319 		UINT32_C(0x100)
50320 	/*
50321 	 * This bit must be '1' for the dst_ipaddr field to be
50322 	 * configured.
50323 	 */
50324 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_IPADDR \
50325 		UINT32_C(0x200)
50326 	/*
50327 	 * This bit must be '1' for the ipaddr_type field to be
50328 	 * configured.
50329 	 */
50330 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IPADDR_TYPE \
50331 		UINT32_C(0x400)
50332 	/*
50333 	 * This bit must be '1' for the ip_protocol field to be
50334 	 * configured.
50335 	 */
50336 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_IP_PROTOCOL \
50337 		UINT32_C(0x800)
50338 	/*
50339 	 * This bit must be '1' for the src_port field to be
50340 	 * configured.
50341 	 */
50342 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_SRC_PORT \
50343 		UINT32_C(0x1000)
50344 	/*
50345 	 * This bit must be '1' for the dst_port field to be
50346 	 * configured.
50347 	 */
50348 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_PORT \
50349 		UINT32_C(0x2000)
50350 	/*
50351 	 * This bit must be '1' for the dst_id field to be
50352 	 * configured.
50353 	 */
50354 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_DST_ID \
50355 		UINT32_C(0x4000)
50356 	/*
50357 	 * This bit must be '1' for the mirror_vnic_id field to be
50358 	 * configured.
50359 	 */
50360 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
50361 		UINT32_C(0x8000)
50362 	/*
50363 	 * This bit must be '1' for the encap_record_id field to be
50364 	 * configured.
50365 	 */
50366 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_ENCAP_RECORD_ID \
50367 		UINT32_C(0x10000)
50368 	/*
50369 	 * This bit must be '1' for the meter_instance_id field to be
50370 	 * configured.
50371 	 */
50372 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_METER_INSTANCE_ID \
50373 		UINT32_C(0x20000)
50374 	/*
50375 	 * This value identifies a set of CFA data structures used for an L2
50376 	 * context.
50377 	 */
50378 	uint64_t	l2_filter_id;
50379 	/* Tunnel Type. */
50380 	uint8_t	tunnel_type;
50381 	/* Non-tunnel */
50382 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
50383 		UINT32_C(0x0)
50384 	/* Virtual eXtensible Local Area Network (VXLAN) */
50385 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
50386 		UINT32_C(0x1)
50387 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
50388 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
50389 		UINT32_C(0x2)
50390 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
50391 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
50392 		UINT32_C(0x3)
50393 	/* IP in IP */
50394 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
50395 		UINT32_C(0x4)
50396 	/* Generic Network Virtualization Encapsulation (Geneve) */
50397 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
50398 		UINT32_C(0x5)
50399 	/* Multi-Protocol Label Switching (MPLS) */
50400 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
50401 		UINT32_C(0x6)
50402 	/* Stateless Transport Tunnel (STT) */
50403 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_STT \
50404 		UINT32_C(0x7)
50405 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
50406 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
50407 		UINT32_C(0x8)
50408 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
50409 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
50410 		UINT32_C(0x9)
50411 	/*
50412 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
50413 	 * datagram payload
50414 	 */
50415 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
50416 		UINT32_C(0xa)
50417 	/* Use fixed layer 2 ether type of 0xFFFF */
50418 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE \
50419 		UINT32_C(0xb)
50420 	/*
50421 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
50422 	 * (IPV6oVXLANGPE)
50423 	 */
50424 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
50425 		UINT32_C(0xc)
50426 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
50427 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE \
50428 		UINT32_C(0x10)
50429 	/* Any tunneled traffic */
50430 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
50431 		UINT32_C(0xff)
50432 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_LAST \
50433 		HWRM_CFA_EM_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
50434 	uint8_t	unused_0[3];
50435 	/*
50436 	 * Tunnel identifier.
50437 	 * Virtual Network Identifier (VNI). Only valid with
50438 	 * tunnel_types VXLAN, NVGRE, and Geneve.
50439 	 * Only lower 24-bits of VNI field are used
50440 	 * in setting up the filter.
50441 	 */
50442 	uint32_t	tunnel_id;
50443 	/*
50444 	 * This value indicates the source MAC address in
50445 	 * the Ethernet header.
50446 	 */
50447 	uint8_t	src_macaddr[6];
50448 	/* The meter instance to attach to the flow. */
50449 	uint16_t	meter_instance_id;
50450 	/*
50451 	 * A value of 0xfff is considered invalid and implies the
50452 	 * instance is not configured.
50453 	 */
50454 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_INVALID \
50455 		UINT32_C(0xffff)
50456 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_LAST \
50457 		HWRM_CFA_EM_FLOW_ALLOC_INPUT_METER_INSTANCE_ID_INVALID
50458 	/*
50459 	 * This value indicates the destination MAC address in
50460 	 * the Ethernet header.
50461 	 */
50462 	uint8_t	dst_macaddr[6];
50463 	/*
50464 	 * This value indicates the VLAN ID of the outer VLAN tag
50465 	 * in the Ethernet header.
50466 	 */
50467 	uint16_t	ovlan_vid;
50468 	/*
50469 	 * This value indicates the VLAN ID of the inner VLAN tag
50470 	 * in the Ethernet header.
50471 	 */
50472 	uint16_t	ivlan_vid;
50473 	/* This value indicates the ethertype in the Ethernet header. */
50474 	uint16_t	ethertype;
50475 	/*
50476 	 * This value indicates the type of IP address.
50477 	 * 4 - IPv4
50478 	 * 6 - IPv6
50479 	 * All others are invalid.
50480 	 */
50481 	uint8_t	ip_addr_type;
50482 	/* invalid */
50483 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN UINT32_C(0x0)
50484 	/* IPv4 */
50485 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV4    UINT32_C(0x4)
50486 	/* IPv6 */
50487 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV6    UINT32_C(0x6)
50488 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_LAST \
50489 		HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
50490 	/*
50491 	 * The value of protocol field in IP header.
50492 	 * Applies to UDP and TCP traffic.
50493 	 * 6 - TCP
50494 	 * 17 - UDP
50495 	 */
50496 	uint8_t	ip_protocol;
50497 	/* invalid */
50498 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN UINT32_C(0x0)
50499 	/* TCP */
50500 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_TCP     UINT32_C(0x6)
50501 	/* UDP */
50502 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UDP     UINT32_C(0x11)
50503 	#define HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_LAST \
50504 		HWRM_CFA_EM_FLOW_ALLOC_INPUT_IP_PROTOCOL_UDP
50505 	uint8_t	unused_1[2];
50506 	/*
50507 	 * The value of source IP address to be used in filtering.
50508 	 * For IPv4, first four bytes represent the IP address.
50509 	 */
50510 	uint32_t	src_ipaddr[4];
50511 	/*
50512 	 * big_endian = True
50513 	 *     The value of destination IP address to be used in filtering.
50514 	 *     For IPv4, first four bytes represent the IP address.
50515 	 */
50516 	uint32_t	dst_ipaddr[4];
50517 	/*
50518 	 * The value of source port to be used in filtering.
50519 	 * Applies to UDP and TCP traffic.
50520 	 */
50521 	uint16_t	src_port;
50522 	/*
50523 	 * The value of destination port to be used in filtering.
50524 	 * Applies to UDP and TCP traffic.
50525 	 */
50526 	uint16_t	dst_port;
50527 	/*
50528 	 * If set, this value shall represent the
50529 	 * Logical VNIC ID of the destination VNIC for the RX
50530 	 * path and network port id of the destination port for
50531 	 * the TX path.
50532 	 */
50533 	uint16_t	dst_id;
50534 	/*
50535 	 * Logical VNIC ID of the VNIC where traffic is
50536 	 * mirrored.
50537 	 */
50538 	uint16_t	mirror_vnic_id;
50539 	/* Logical ID of the encapsulation record. */
50540 	uint32_t	encap_record_id;
50541 	uint8_t	unused_2[4];
50542 } __rte_packed_end;
50543 
50544 /* hwrm_cfa_em_flow_alloc_output (size:192b/24B) */
50545 struct __rte_packed_begin hwrm_cfa_em_flow_alloc_output {
50546 	/* The specific error status for the command. */
50547 	uint16_t	error_code;
50548 	/* The HWRM command request type. */
50549 	uint16_t	req_type;
50550 	/* The sequence ID from the original command. */
50551 	uint16_t	seq_id;
50552 	/* The length of the response data in number of bytes. */
50553 	uint16_t	resp_len;
50554 	/* This value is an opaque id into CFA data structures. */
50555 	uint64_t	em_filter_id;
50556 	/*
50557 	 * The flow id value in bit 0-29 is the actual ID of the flow
50558 	 * associated with this filter and it shall be used to match
50559 	 * and associate the flow identifier returned in completion
50560 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
50561 	 * shall indicate no valid flow id.
50562 	 */
50563 	uint32_t	flow_id;
50564 	/* Indicate the flow id value. */
50565 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK \
50566 		UINT32_C(0x3fffffff)
50567 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
50568 	/* Indicate type of the flow. */
50569 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE \
50570 		UINT32_C(0x40000000)
50571 	/*
50572 	 * If this bit set to 0, then it indicates that the flow is
50573 	 * internal flow.
50574 	 */
50575 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_INT \
50576 		(UINT32_C(0x0) << 30)
50577 	/*
50578 	 * If this bit is set to 1, then it indicates that the flow is
50579 	 * external flow.
50580 	 */
50581 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT \
50582 		(UINT32_C(0x1) << 30)
50583 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST \
50584 		HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
50585 	/* Indicate the flow direction. */
50586 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR \
50587 		UINT32_C(0x80000000)
50588 	/* If this bit set to 0, then it indicates rx flow. */
50589 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_RX \
50590 		(UINT32_C(0x0) << 31)
50591 	/* If this bit is set to 1, then it indicates that tx flow. */
50592 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_TX \
50593 		(UINT32_C(0x1) << 31)
50594 	#define HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_LAST \
50595 		HWRM_CFA_EM_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_TX
50596 	uint8_t	unused_0[3];
50597 	/*
50598 	 * This field is used in Output records to indicate that the output
50599 	 * is completely written to RAM. This field should be read as '1'
50600 	 * to indicate that the output has been completely written.
50601 	 * When writing a command completion or response to an internal
50602 	 * processor, the order of writes has to be such that this field is
50603 	 * written last.
50604 	 */
50605 	uint8_t	valid;
50606 } __rte_packed_end;
50607 
50608 /*************************
50609  * hwrm_cfa_em_flow_free *
50610  *************************/
50611 
50612 
50613 /* hwrm_cfa_em_flow_free_input (size:192b/24B) */
50614 struct __rte_packed_begin hwrm_cfa_em_flow_free_input {
50615 	/* The HWRM command request type. */
50616 	uint16_t	req_type;
50617 	/*
50618 	 * The completion ring to send the completion event on. This should
50619 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50620 	 */
50621 	uint16_t	cmpl_ring;
50622 	/*
50623 	 * The sequence ID is used by the driver for tracking multiple
50624 	 * commands. This ID is treated as opaque data by the firmware and
50625 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50626 	 */
50627 	uint16_t	seq_id;
50628 	/*
50629 	 * The target ID of the command:
50630 	 * * 0x0-0xFFF8 - The function ID
50631 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50632 	 * * 0xFFFD - Reserved for user-space HWRM interface
50633 	 * * 0xFFFF - HWRM
50634 	 */
50635 	uint16_t	target_id;
50636 	/*
50637 	 * A physical address pointer pointing to a host buffer that the
50638 	 * command's response data will be written. This can be either a host
50639 	 * physical address (HPA) or a guest physical address (GPA) and must
50640 	 * point to a physically contiguous block of memory.
50641 	 */
50642 	uint64_t	resp_addr;
50643 	/* This value is an opaque id into CFA data structures. */
50644 	uint64_t	em_filter_id;
50645 } __rte_packed_end;
50646 
50647 /* hwrm_cfa_em_flow_free_output (size:128b/16B) */
50648 struct __rte_packed_begin hwrm_cfa_em_flow_free_output {
50649 	/* The specific error status for the command. */
50650 	uint16_t	error_code;
50651 	/* The HWRM command request type. */
50652 	uint16_t	req_type;
50653 	/* The sequence ID from the original command. */
50654 	uint16_t	seq_id;
50655 	/* The length of the response data in number of bytes. */
50656 	uint16_t	resp_len;
50657 	uint8_t	unused_0[7];
50658 	/*
50659 	 * This field is used in Output records to indicate that the output
50660 	 * is completely written to RAM. This field should be read as '1'
50661 	 * to indicate that the output has been completely written.
50662 	 * When writing a command completion or response to an internal
50663 	 * processor, the order of writes has to be such that this field is
50664 	 * written last.
50665 	 */
50666 	uint8_t	valid;
50667 } __rte_packed_end;
50668 
50669 /************************
50670  * hwrm_cfa_meter_qcaps *
50671  ************************/
50672 
50673 
50674 /* hwrm_cfa_meter_qcaps_input (size:128b/16B) */
50675 struct __rte_packed_begin hwrm_cfa_meter_qcaps_input {
50676 	/* The HWRM command request type. */
50677 	uint16_t	req_type;
50678 	/*
50679 	 * The completion ring to send the completion event on. This should
50680 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50681 	 */
50682 	uint16_t	cmpl_ring;
50683 	/*
50684 	 * The sequence ID is used by the driver for tracking multiple
50685 	 * commands. This ID is treated as opaque data by the firmware and
50686 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50687 	 */
50688 	uint16_t	seq_id;
50689 	/*
50690 	 * The target ID of the command:
50691 	 * * 0x0-0xFFF8 - The function ID
50692 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50693 	 * * 0xFFFD - Reserved for user-space HWRM interface
50694 	 * * 0xFFFF - HWRM
50695 	 */
50696 	uint16_t	target_id;
50697 	/*
50698 	 * A physical address pointer pointing to a host buffer that the
50699 	 * command's response data will be written. This can be either a host
50700 	 * physical address (HPA) or a guest physical address (GPA) and must
50701 	 * point to a physically contiguous block of memory.
50702 	 */
50703 	uint64_t	resp_addr;
50704 } __rte_packed_end;
50705 
50706 /* hwrm_cfa_meter_qcaps_output (size:320b/40B) */
50707 struct __rte_packed_begin hwrm_cfa_meter_qcaps_output {
50708 	/* The specific error status for the command. */
50709 	uint16_t	error_code;
50710 	/* The HWRM command request type. */
50711 	uint16_t	req_type;
50712 	/* The sequence ID from the original command. */
50713 	uint16_t	seq_id;
50714 	/* The length of the response data in number of bytes. */
50715 	uint16_t	resp_len;
50716 	uint32_t	flags;
50717 	/*
50718 	 * Enumeration denoting the clock at which the Meter is running
50719 	 * with. This enumeration is used for resources that are similar
50720 	 * for both TX and RX paths of the chip.
50721 	 */
50722 	#define HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_MASK  UINT32_C(0xf)
50723 	#define HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_SFT   0
50724 	/* 375 MHz */
50725 	#define HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_375MHZ  UINT32_C(0x0)
50726 	/* 625 MHz */
50727 	#define HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_625MHZ  UINT32_C(0x1)
50728 	#define HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_LAST \
50729 		HWRM_CFA_METER_QCAPS_OUTPUT_FLAGS_CLOCK_625MHZ
50730 	uint8_t	unused_0[4];
50731 	/*
50732 	 * The minimum guaranteed number of tx meter profiles supported
50733 	 * for this function.
50734 	 */
50735 	uint16_t	min_tx_profile;
50736 	/*
50737 	 * The maximum non-guaranteed number of tx meter profiles supported
50738 	 * for this function.
50739 	 */
50740 	uint16_t	max_tx_profile;
50741 	/*
50742 	 * The minimum guaranteed number of rx meter profiles supported
50743 	 * for this function.
50744 	 */
50745 	uint16_t	min_rx_profile;
50746 	/*
50747 	 * The maximum non-guaranteed number of rx meter profiles supported
50748 	 * for this function.
50749 	 */
50750 	uint16_t	max_rx_profile;
50751 	/*
50752 	 * The minimum guaranteed number of tx meter instances supported
50753 	 * for this function.
50754 	 */
50755 	uint16_t	min_tx_instance;
50756 	/*
50757 	 * The maximum non-guaranteed number of tx meter instances supported
50758 	 * for this function.
50759 	 */
50760 	uint16_t	max_tx_instance;
50761 	/*
50762 	 * The minimum guaranteed number of rx meter instances supported
50763 	 * for this function.
50764 	 */
50765 	uint16_t	min_rx_instance;
50766 	/*
50767 	 * The maximum non-guaranteed number of rx meter instances supported
50768 	 * for this function.
50769 	 */
50770 	uint16_t	max_rx_instance;
50771 	uint8_t	unused_1[7];
50772 	/*
50773 	 * This field is used in Output records to indicate that the output
50774 	 * is completely written to RAM. This field should be read as '1'
50775 	 * to indicate that the output has been completely written.
50776 	 * When writing a command completion or response to an internal
50777 	 * processor, the order of writes has to be such that this field is
50778 	 * written last.
50779 	 */
50780 	uint8_t	valid;
50781 } __rte_packed_end;
50782 
50783 /********************************
50784  * hwrm_cfa_meter_profile_alloc *
50785  ********************************/
50786 
50787 
50788 /* hwrm_cfa_meter_profile_alloc_input (size:320b/40B) */
50789 struct __rte_packed_begin hwrm_cfa_meter_profile_alloc_input {
50790 	/* The HWRM command request type. */
50791 	uint16_t	req_type;
50792 	/*
50793 	 * The completion ring to send the completion event on. This should
50794 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
50795 	 */
50796 	uint16_t	cmpl_ring;
50797 	/*
50798 	 * The sequence ID is used by the driver for tracking multiple
50799 	 * commands. This ID is treated as opaque data by the firmware and
50800 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
50801 	 */
50802 	uint16_t	seq_id;
50803 	/*
50804 	 * The target ID of the command:
50805 	 * * 0x0-0xFFF8 - The function ID
50806 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
50807 	 * * 0xFFFD - Reserved for user-space HWRM interface
50808 	 * * 0xFFFF - HWRM
50809 	 */
50810 	uint16_t	target_id;
50811 	/*
50812 	 * A physical address pointer pointing to a host buffer that the
50813 	 * command's response data will be written. This can be either a host
50814 	 * physical address (HPA) or a guest physical address (GPA) and must
50815 	 * point to a physically contiguous block of memory.
50816 	 */
50817 	uint64_t	resp_addr;
50818 	uint8_t	flags;
50819 	/*
50820 	 * Enumeration denoting the RX, TX type of the resource.
50821 	 * This enumeration is used for resources that are similar for both
50822 	 * TX and RX paths of the chip.
50823 	 */
50824 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH     UINT32_C(0x1)
50825 	/* tx path */
50826 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_TX \
50827 		UINT32_C(0x0)
50828 	/* rx path */
50829 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_RX \
50830 		UINT32_C(0x1)
50831 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_LAST \
50832 		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_FLAGS_PATH_RX
50833 	/* The meter algorithm type. */
50834 	uint8_t	meter_type;
50835 	/* RFC 2697 (srTCM) */
50836 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC2697 \
50837 		UINT32_C(0x0)
50838 	/* RFC 2698 (trTCM) */
50839 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC2698 \
50840 		UINT32_C(0x1)
50841 	/* RFC 4115 (trTCM) */
50842 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC4115 \
50843 		UINT32_C(0x2)
50844 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_LAST \
50845 		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_METER_TYPE_RFC4115
50846 	/*
50847 	 * This field is reserved for the future use.
50848 	 * It shall be set to 0.
50849 	 */
50850 	uint16_t	reserved1;
50851 	/*
50852 	 * This field is reserved for the future use.
50853 	 * It shall be set to 0.
50854 	 */
50855 	uint32_t	reserved2;
50856 	/* A meter rate specified in bytes-per-second. */
50857 	uint32_t	commit_rate;
50858 	/* The bandwidth value. */
50859 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_MASK \
50860 		UINT32_C(0xfffffff)
50861 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_SFT \
50862 		0
50863 	/* The granularity of the value (bits or bytes). */
50864 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE \
50865 		UINT32_C(0x10000000)
50866 	/* Value is in bits. */
50867 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_BITS \
50868 		(UINT32_C(0x0) << 28)
50869 	/* Value is in bytes. */
50870 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_BYTES \
50871 		(UINT32_C(0x1) << 28)
50872 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_LAST \
50873 		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_SCALE_BYTES
50874 	/* bw_value_unit is 3 b */
50875 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MASK \
50876 		UINT32_C(0xe0000000)
50877 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_SFT \
50878 		29
50879 	/* Value is in Mb or MB (base 10). */
50880 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MEGA \
50881 		(UINT32_C(0x0) << 29)
50882 	/* Value is in Kb or KB (base 10). */
50883 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_KILO \
50884 		(UINT32_C(0x2) << 29)
50885 	/* Value is in bits or bytes. */
50886 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_BASE \
50887 		(UINT32_C(0x4) << 29)
50888 	/* Value is in Gb or GB (base 10). */
50889 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_GIGA \
50890 		(UINT32_C(0x6) << 29)
50891 	/* Value is in 1/100th of a percentage of total bandwidth. */
50892 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_PERCENT1_100 \
50893 		(UINT32_C(0x1) << 29)
50894 	/* Raw value */
50895 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_RAW \
50896 		(UINT32_C(0x7) << 29)
50897 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_LAST \
50898 		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_RATE_BW_VALUE_UNIT_RAW
50899 	/* A meter burst size specified in bytes. */
50900 	uint32_t	commit_burst;
50901 	/* The bandwidth value. */
50902 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_MASK \
50903 		UINT32_C(0xfffffff)
50904 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_SFT \
50905 		0
50906 	/* The granularity of the value (bits or bytes). */
50907 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE \
50908 		UINT32_C(0x10000000)
50909 	/* Value is in bits. */
50910 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_BITS \
50911 		(UINT32_C(0x0) << 28)
50912 	/* Value is in bytes. */
50913 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_BYTES \
50914 		(UINT32_C(0x1) << 28)
50915 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_LAST \
50916 		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_SCALE_BYTES
50917 	/* bw_value_unit is 3 b */
50918 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MASK \
50919 		UINT32_C(0xe0000000)
50920 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_SFT \
50921 		29
50922 	/* Value is in Mb or MB (base 10). */
50923 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MEGA \
50924 		(UINT32_C(0x0) << 29)
50925 	/* Value is in Kb or KB (base 10). */
50926 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_KILO \
50927 		(UINT32_C(0x2) << 29)
50928 	/* Value is in bits or bytes. */
50929 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_BASE \
50930 		(UINT32_C(0x4) << 29)
50931 	/* Value is in Gb or GB (base 10). */
50932 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_GIGA \
50933 		(UINT32_C(0x6) << 29)
50934 	/* Value is in 1/100th of a percentage of total bandwidth. */
50935 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_PERCENT1_100 \
50936 		(UINT32_C(0x1) << 29)
50937 	/* Invalid value */
50938 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID \
50939 		(UINT32_C(0x7) << 29)
50940 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_LAST \
50941 		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID
50942 	/* A meter rate specified in bytes-per-second. */
50943 	uint32_t	excess_peak_rate;
50944 	/* The bandwidth value. */
50945 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_MASK \
50946 		UINT32_C(0xfffffff)
50947 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_SFT \
50948 		0
50949 	/* The granularity of the value (bits or bytes). */
50950 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE \
50951 		UINT32_C(0x10000000)
50952 	/* Value is in bits. */
50953 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_BITS \
50954 		(UINT32_C(0x0) << 28)
50955 	/* Value is in bytes. */
50956 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES \
50957 		(UINT32_C(0x1) << 28)
50958 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_LAST \
50959 		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES
50960 	/* bw_value_unit is 3 b */
50961 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MASK \
50962 		UINT32_C(0xe0000000)
50963 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_SFT \
50964 		29
50965 	/* Value is in Mb or MB (base 10). */
50966 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MEGA \
50967 		(UINT32_C(0x0) << 29)
50968 	/* Value is in Kb or KB (base 10). */
50969 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_KILO \
50970 		(UINT32_C(0x2) << 29)
50971 	/* Value is in bits or bytes. */
50972 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_BASE \
50973 		(UINT32_C(0x4) << 29)
50974 	/* Value is in Gb or GB (base 10). */
50975 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_GIGA \
50976 		(UINT32_C(0x6) << 29)
50977 	/* Value is in 1/100th of a percentage of total bandwidth. */
50978 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_PERCENT1_100 \
50979 		(UINT32_C(0x1) << 29)
50980 	/* Raw unit */
50981 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_RAW \
50982 		(UINT32_C(0x7) << 29)
50983 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_LAST \
50984 		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_RAW
50985 	/* A meter burst size specified in bytes. */
50986 	uint32_t	excess_peak_burst;
50987 	/* The bandwidth value. */
50988 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_MASK \
50989 		UINT32_C(0xfffffff)
50990 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_SFT \
50991 		0
50992 	/* The granularity of the value (bits or bytes). */
50993 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE \
50994 		UINT32_C(0x10000000)
50995 	/* Value is in bits. */
50996 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_BITS \
50997 		(UINT32_C(0x0) << 28)
50998 	/* Value is in bytes. */
50999 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES \
51000 		(UINT32_C(0x1) << 28)
51001 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_LAST \
51002 		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES
51003 	/* bw_value_unit is 3 b */
51004 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MASK \
51005 		UINT32_C(0xe0000000)
51006 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_SFT \
51007 		29
51008 	/* Value is in Mb or MB (base 10). */
51009 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MEGA \
51010 		(UINT32_C(0x0) << 29)
51011 	/* Value is in Kb or KB (base 10). */
51012 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_KILO \
51013 		(UINT32_C(0x2) << 29)
51014 	/* Value is in bits or bytes. */
51015 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_BASE \
51016 		(UINT32_C(0x4) << 29)
51017 	/* Value is in Gb or GB (base 10). */
51018 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_GIGA \
51019 		(UINT32_C(0x6) << 29)
51020 	/* Value is in 1/100th of a percentage of total bandwidth. */
51021 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_PERCENT1_100 \
51022 		(UINT32_C(0x1) << 29)
51023 	/* Invalid unit */
51024 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID \
51025 		(UINT32_C(0x7) << 29)
51026 	#define HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_LAST \
51027 		HWRM_CFA_METER_PROFILE_ALLOC_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID
51028 } __rte_packed_end;
51029 
51030 /* hwrm_cfa_meter_profile_alloc_output (size:128b/16B) */
51031 struct __rte_packed_begin hwrm_cfa_meter_profile_alloc_output {
51032 	/* The specific error status for the command. */
51033 	uint16_t	error_code;
51034 	/* The HWRM command request type. */
51035 	uint16_t	req_type;
51036 	/* The sequence ID from the original command. */
51037 	uint16_t	seq_id;
51038 	/* The length of the response data in number of bytes. */
51039 	uint16_t	resp_len;
51040 	/* This value identifies a meter profile in CFA. */
51041 	uint16_t	meter_profile_id;
51042 	/*
51043 	 * A value of 0xfff is considered invalid and implies the
51044 	 * profile is not configured.
51045 	 */
51046 	#define HWRM_CFA_METER_PROFILE_ALLOC_OUTPUT_METER_PROFILE_ID_INVALID \
51047 		UINT32_C(0xffff)
51048 	#define HWRM_CFA_METER_PROFILE_ALLOC_OUTPUT_METER_PROFILE_ID_LAST \
51049 		HWRM_CFA_METER_PROFILE_ALLOC_OUTPUT_METER_PROFILE_ID_INVALID
51050 	uint8_t	unused_0[5];
51051 	/*
51052 	 * This field is used in Output records to indicate that the output
51053 	 * is completely written to RAM. This field should be read as '1'
51054 	 * to indicate that the output has been completely written.
51055 	 * When writing a command completion or response to an internal
51056 	 * processor, the order of writes has to be such that this field is
51057 	 * written last.
51058 	 */
51059 	uint8_t	valid;
51060 } __rte_packed_end;
51061 
51062 /*******************************
51063  * hwrm_cfa_meter_profile_free *
51064  *******************************/
51065 
51066 
51067 /* hwrm_cfa_meter_profile_free_input (size:192b/24B) */
51068 struct __rte_packed_begin hwrm_cfa_meter_profile_free_input {
51069 	/* The HWRM command request type. */
51070 	uint16_t	req_type;
51071 	/*
51072 	 * The completion ring to send the completion event on. This should
51073 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51074 	 */
51075 	uint16_t	cmpl_ring;
51076 	/*
51077 	 * The sequence ID is used by the driver for tracking multiple
51078 	 * commands. This ID is treated as opaque data by the firmware and
51079 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51080 	 */
51081 	uint16_t	seq_id;
51082 	/*
51083 	 * The target ID of the command:
51084 	 * * 0x0-0xFFF8 - The function ID
51085 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51086 	 * * 0xFFFD - Reserved for user-space HWRM interface
51087 	 * * 0xFFFF - HWRM
51088 	 */
51089 	uint16_t	target_id;
51090 	/*
51091 	 * A physical address pointer pointing to a host buffer that the
51092 	 * command's response data will be written. This can be either a host
51093 	 * physical address (HPA) or a guest physical address (GPA) and must
51094 	 * point to a physically contiguous block of memory.
51095 	 */
51096 	uint64_t	resp_addr;
51097 	uint8_t	flags;
51098 	/*
51099 	 * Enumeration denoting the RX, TX type of the resource.
51100 	 * This enumeration is used for resources that are similar for both
51101 	 * TX and RX paths of the chip.
51102 	 */
51103 	#define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH     UINT32_C(0x1)
51104 	/* tx path */
51105 	#define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_TX \
51106 		UINT32_C(0x0)
51107 	/* rx path */
51108 	#define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_RX \
51109 		UINT32_C(0x1)
51110 	#define HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_LAST \
51111 		HWRM_CFA_METER_PROFILE_FREE_INPUT_FLAGS_PATH_RX
51112 	uint8_t	unused_0;
51113 	/* This value identifies a meter profile in CFA. */
51114 	uint16_t	meter_profile_id;
51115 	/*
51116 	 * A value of 0xfff is considered invalid and implies the
51117 	 * profile is not configured.
51118 	 */
51119 	#define HWRM_CFA_METER_PROFILE_FREE_INPUT_METER_PROFILE_ID_INVALID \
51120 		UINT32_C(0xffff)
51121 	#define HWRM_CFA_METER_PROFILE_FREE_INPUT_METER_PROFILE_ID_LAST \
51122 		HWRM_CFA_METER_PROFILE_FREE_INPUT_METER_PROFILE_ID_INVALID
51123 	uint8_t	unused_1[4];
51124 } __rte_packed_end;
51125 
51126 /* hwrm_cfa_meter_profile_free_output (size:128b/16B) */
51127 struct __rte_packed_begin hwrm_cfa_meter_profile_free_output {
51128 	/* The specific error status for the command. */
51129 	uint16_t	error_code;
51130 	/* The HWRM command request type. */
51131 	uint16_t	req_type;
51132 	/* The sequence ID from the original command. */
51133 	uint16_t	seq_id;
51134 	/* The length of the response data in number of bytes. */
51135 	uint16_t	resp_len;
51136 	uint8_t	unused_0[7];
51137 	/*
51138 	 * This field is used in Output records to indicate that the output
51139 	 * is completely written to RAM. This field should be read as '1'
51140 	 * to indicate that the output has been completely written.
51141 	 * When writing a command completion or response to an internal
51142 	 * processor, the order of writes has to be such that this field is
51143 	 * written last.
51144 	 */
51145 	uint8_t	valid;
51146 } __rte_packed_end;
51147 
51148 /******************************
51149  * hwrm_cfa_meter_profile_cfg *
51150  ******************************/
51151 
51152 
51153 /* hwrm_cfa_meter_profile_cfg_input (size:320b/40B) */
51154 struct __rte_packed_begin hwrm_cfa_meter_profile_cfg_input {
51155 	/* The HWRM command request type. */
51156 	uint16_t	req_type;
51157 	/*
51158 	 * The completion ring to send the completion event on. This should
51159 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51160 	 */
51161 	uint16_t	cmpl_ring;
51162 	/*
51163 	 * The sequence ID is used by the driver for tracking multiple
51164 	 * commands. This ID is treated as opaque data by the firmware and
51165 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51166 	 */
51167 	uint16_t	seq_id;
51168 	/*
51169 	 * The target ID of the command:
51170 	 * * 0x0-0xFFF8 - The function ID
51171 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51172 	 * * 0xFFFD - Reserved for user-space HWRM interface
51173 	 * * 0xFFFF - HWRM
51174 	 */
51175 	uint16_t	target_id;
51176 	/*
51177 	 * A physical address pointer pointing to a host buffer that the
51178 	 * command's response data will be written. This can be either a host
51179 	 * physical address (HPA) or a guest physical address (GPA) and must
51180 	 * point to a physically contiguous block of memory.
51181 	 */
51182 	uint64_t	resp_addr;
51183 	uint8_t	flags;
51184 	/*
51185 	 * Enumeration denoting the RX, TX type of the resource.
51186 	 * This enumeration is used for resources that are similar for both
51187 	 * TX and RX paths of the chip.
51188 	 */
51189 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH     UINT32_C(0x1)
51190 	/* tx path */
51191 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_TX    UINT32_C(0x0)
51192 	/* rx path */
51193 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_RX    UINT32_C(0x1)
51194 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_LAST \
51195 		HWRM_CFA_METER_PROFILE_CFG_INPUT_FLAGS_PATH_RX
51196 	/* The meter algorithm type. */
51197 	uint8_t	meter_type;
51198 	/* RFC 2697 (srTCM) */
51199 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC2697 \
51200 		UINT32_C(0x0)
51201 	/* RFC 2698 (trTCM) */
51202 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC2698 \
51203 		UINT32_C(0x1)
51204 	/* RFC 4115 (trTCM) */
51205 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC4115 \
51206 		UINT32_C(0x2)
51207 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_LAST \
51208 		HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_TYPE_RFC4115
51209 	/* This value identifies a meter profile in CFA. */
51210 	uint16_t	meter_profile_id;
51211 	/*
51212 	 * A value of 0xfff is considered invalid and implies the
51213 	 * profile is not configured.
51214 	 */
51215 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_PROFILE_ID_INVALID \
51216 		UINT32_C(0xffff)
51217 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_PROFILE_ID_LAST \
51218 		HWRM_CFA_METER_PROFILE_CFG_INPUT_METER_PROFILE_ID_INVALID
51219 	/*
51220 	 * This field is reserved for the future use.
51221 	 * It shall be set to 0.
51222 	 */
51223 	uint32_t	reserved;
51224 	/* A meter rate specified in bytes-per-second. */
51225 	uint32_t	commit_rate;
51226 	/* The bandwidth value. */
51227 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_MASK \
51228 		UINT32_C(0xfffffff)
51229 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_SFT \
51230 		0
51231 	/* The granularity of the value (bits or bytes). */
51232 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE \
51233 		UINT32_C(0x10000000)
51234 	/* Value is in bits. */
51235 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_BITS \
51236 		(UINT32_C(0x0) << 28)
51237 	/* Value is in bytes. */
51238 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_BYTES \
51239 		(UINT32_C(0x1) << 28)
51240 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_LAST \
51241 		HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_SCALE_BYTES
51242 	/* bw_value_unit is 3 b */
51243 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MASK \
51244 		UINT32_C(0xe0000000)
51245 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_SFT \
51246 		29
51247 	/* Value is in Mb or MB (base 10). */
51248 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_MEGA \
51249 		(UINT32_C(0x0) << 29)
51250 	/* Value is in Kb or KB (base 10). */
51251 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_KILO \
51252 		(UINT32_C(0x2) << 29)
51253 	/* Value is in bits or bytes. */
51254 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_BASE \
51255 		(UINT32_C(0x4) << 29)
51256 	/* Value is in Gb or GB (base 10). */
51257 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_GIGA \
51258 		(UINT32_C(0x6) << 29)
51259 	/* Value is in 1/100th of a percentage of total bandwidth. */
51260 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_PERCENT1_100 \
51261 		(UINT32_C(0x1) << 29)
51262 	/* Raw value */
51263 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_RAW \
51264 		(UINT32_C(0x7) << 29)
51265 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_LAST \
51266 		HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_RATE_BW_VALUE_UNIT_RAW
51267 	/* A meter burst size specified in bytes. */
51268 	uint32_t	commit_burst;
51269 	/* The bandwidth value. */
51270 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_MASK \
51271 		UINT32_C(0xfffffff)
51272 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_SFT \
51273 		0
51274 	/* The granularity of the value (bits or bytes). */
51275 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE \
51276 		UINT32_C(0x10000000)
51277 	/* Value is in bits. */
51278 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_BITS \
51279 		(UINT32_C(0x0) << 28)
51280 	/* Value is in bytes. */
51281 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_BYTES \
51282 		(UINT32_C(0x1) << 28)
51283 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_LAST \
51284 		HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_SCALE_BYTES
51285 	/* bw_value_unit is 3 b */
51286 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MASK \
51287 		UINT32_C(0xe0000000)
51288 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_SFT \
51289 		29
51290 	/* Value is in Mb or MB (base 10). */
51291 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_MEGA \
51292 		(UINT32_C(0x0) << 29)
51293 	/* Value is in Kb or KB (base 10). */
51294 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_KILO \
51295 		(UINT32_C(0x2) << 29)
51296 	/* Value is in bits or bytes. */
51297 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_BASE \
51298 		(UINT32_C(0x4) << 29)
51299 	/* Value is in Gb or GB (base 10). */
51300 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_GIGA \
51301 		(UINT32_C(0x6) << 29)
51302 	/* Value is in 1/100th of a percentage of total bandwidth. */
51303 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_PERCENT1_100 \
51304 		(UINT32_C(0x1) << 29)
51305 	/* Invalid value */
51306 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID \
51307 		(UINT32_C(0x7) << 29)
51308 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_LAST \
51309 		HWRM_CFA_METER_PROFILE_CFG_INPUT_COMMIT_BURST_BW_VALUE_UNIT_INVALID
51310 	/* A meter rate specified in bytes-per-second. */
51311 	uint32_t	excess_peak_rate;
51312 	/* The bandwidth value. */
51313 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_MASK \
51314 		UINT32_C(0xfffffff)
51315 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_SFT \
51316 		0
51317 	/* The granularity of the value (bits or bytes). */
51318 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE \
51319 		UINT32_C(0x10000000)
51320 	/* Value is in bits. */
51321 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_BITS \
51322 		(UINT32_C(0x0) << 28)
51323 	/* Value is in bytes. */
51324 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES \
51325 		(UINT32_C(0x1) << 28)
51326 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_LAST \
51327 		HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_SCALE_BYTES
51328 	/* bw_value_unit is 3 b */
51329 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MASK \
51330 		UINT32_C(0xe0000000)
51331 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_SFT \
51332 		29
51333 	/* Value is in Mb or MB (base 10). */
51334 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_MEGA \
51335 		(UINT32_C(0x0) << 29)
51336 	/* Value is in Kb or KB (base 10). */
51337 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_KILO \
51338 		(UINT32_C(0x2) << 29)
51339 	/* Value is in bits or bytes. */
51340 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_BASE \
51341 		(UINT32_C(0x4) << 29)
51342 	/* Value is in Gb or GB (base 10). */
51343 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_GIGA \
51344 		(UINT32_C(0x6) << 29)
51345 	/* Value is in 1/100th of a percentage of total bandwidth. */
51346 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_PERCENT1_100 \
51347 		(UINT32_C(0x1) << 29)
51348 	/* Raw unit */
51349 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_RAW \
51350 		(UINT32_C(0x7) << 29)
51351 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_LAST \
51352 		HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_RATE_BW_VALUE_UNIT_RAW
51353 	/* A meter burst size specified in bytes. */
51354 	uint32_t	excess_peak_burst;
51355 	/* The bandwidth value. */
51356 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_MASK \
51357 		UINT32_C(0xfffffff)
51358 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_SFT \
51359 		0
51360 	/* The granularity of the value (bits or bytes). */
51361 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE \
51362 		UINT32_C(0x10000000)
51363 	/* Value is in bits. */
51364 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_BITS \
51365 		(UINT32_C(0x0) << 28)
51366 	/* Value is in bytes. */
51367 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES \
51368 		(UINT32_C(0x1) << 28)
51369 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_LAST \
51370 		HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_SCALE_BYTES
51371 	/* bw_value_unit is 3 b */
51372 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MASK \
51373 		UINT32_C(0xe0000000)
51374 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_SFT \
51375 		29
51376 	/* Value is in Mb or MB (base 10). */
51377 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_MEGA \
51378 		(UINT32_C(0x0) << 29)
51379 	/* Value is in Kb or KB (base 10). */
51380 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_KILO \
51381 		(UINT32_C(0x2) << 29)
51382 	/* Value is in bits or bytes. */
51383 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_BASE \
51384 		(UINT32_C(0x4) << 29)
51385 	/* Value is in Gb or GB (base 10). */
51386 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_GIGA \
51387 		(UINT32_C(0x6) << 29)
51388 	/* Value is in 1/100th of a percentage of total bandwidth. */
51389 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_PERCENT1_100 \
51390 		(UINT32_C(0x1) << 29)
51391 	/* Invalid unit */
51392 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID \
51393 		(UINT32_C(0x7) << 29)
51394 	#define HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_LAST \
51395 		HWRM_CFA_METER_PROFILE_CFG_INPUT_EXCESS_PEAK_BURST_BW_VALUE_UNIT_INVALID
51396 } __rte_packed_end;
51397 
51398 /* hwrm_cfa_meter_profile_cfg_output (size:128b/16B) */
51399 struct __rte_packed_begin hwrm_cfa_meter_profile_cfg_output {
51400 	/* The specific error status for the command. */
51401 	uint16_t	error_code;
51402 	/* The HWRM command request type. */
51403 	uint16_t	req_type;
51404 	/* The sequence ID from the original command. */
51405 	uint16_t	seq_id;
51406 	/* The length of the response data in number of bytes. */
51407 	uint16_t	resp_len;
51408 	uint8_t	unused_0[7];
51409 	/*
51410 	 * This field is used in Output records to indicate that the output
51411 	 * is completely written to RAM. This field should be read as '1'
51412 	 * to indicate that the output has been completely written.
51413 	 * When writing a command completion or response to an internal
51414 	 * processor, the order of writes has to be such that this field is
51415 	 * written last.
51416 	 */
51417 	uint8_t	valid;
51418 } __rte_packed_end;
51419 
51420 /*********************************
51421  * hwrm_cfa_meter_instance_alloc *
51422  *********************************/
51423 
51424 
51425 /* hwrm_cfa_meter_instance_alloc_input (size:192b/24B) */
51426 struct __rte_packed_begin hwrm_cfa_meter_instance_alloc_input {
51427 	/* The HWRM command request type. */
51428 	uint16_t	req_type;
51429 	/*
51430 	 * The completion ring to send the completion event on. This should
51431 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51432 	 */
51433 	uint16_t	cmpl_ring;
51434 	/*
51435 	 * The sequence ID is used by the driver for tracking multiple
51436 	 * commands. This ID is treated as opaque data by the firmware and
51437 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51438 	 */
51439 	uint16_t	seq_id;
51440 	/*
51441 	 * The target ID of the command:
51442 	 * * 0x0-0xFFF8 - The function ID
51443 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51444 	 * * 0xFFFD - Reserved for user-space HWRM interface
51445 	 * * 0xFFFF - HWRM
51446 	 */
51447 	uint16_t	target_id;
51448 	/*
51449 	 * A physical address pointer pointing to a host buffer that the
51450 	 * command's response data will be written. This can be either a host
51451 	 * physical address (HPA) or a guest physical address (GPA) and must
51452 	 * point to a physically contiguous block of memory.
51453 	 */
51454 	uint64_t	resp_addr;
51455 	uint8_t	flags;
51456 	/*
51457 	 * Enumeration denoting the RX, TX type of the resource.
51458 	 * This enumeration is used for resources that are similar for both
51459 	 * TX and RX paths of the chip.
51460 	 */
51461 	#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH \
51462 		UINT32_C(0x1)
51463 	/* tx path */
51464 	#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_TX \
51465 		UINT32_C(0x0)
51466 	/* rx path */
51467 	#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_RX \
51468 		UINT32_C(0x1)
51469 	#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_LAST \
51470 		HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_FLAGS_PATH_RX
51471 	uint8_t	unused_0;
51472 	/* This value identifies a meter profile in CFA. */
51473 	uint16_t	meter_profile_id;
51474 	/*
51475 	 * A value of 0xffff is considered invalid and implies the
51476 	 * profile is not configured.
51477 	 */
51478 	#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_METER_PROFILE_ID_INVALID \
51479 		UINT32_C(0xffff)
51480 	#define HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_METER_PROFILE_ID_LAST \
51481 		HWRM_CFA_METER_INSTANCE_ALLOC_INPUT_METER_PROFILE_ID_INVALID
51482 	uint8_t	unused_1[4];
51483 } __rte_packed_end;
51484 
51485 /* hwrm_cfa_meter_instance_alloc_output (size:128b/16B) */
51486 struct __rte_packed_begin hwrm_cfa_meter_instance_alloc_output {
51487 	/* The specific error status for the command. */
51488 	uint16_t	error_code;
51489 	/* The HWRM command request type. */
51490 	uint16_t	req_type;
51491 	/* The sequence ID from the original command. */
51492 	uint16_t	seq_id;
51493 	/* The length of the response data in number of bytes. */
51494 	uint16_t	resp_len;
51495 	/* This value identifies a meter instance in CFA. */
51496 	uint16_t	meter_instance_id;
51497 	/*
51498 	 * A value of 0xffff is considered invalid and implies the
51499 	 * instance is not configured.
51500 	 */
51501 	#define HWRM_CFA_METER_INSTANCE_ALLOC_OUTPUT_METER_INSTANCE_ID_INVALID \
51502 		UINT32_C(0xffff)
51503 	#define HWRM_CFA_METER_INSTANCE_ALLOC_OUTPUT_METER_INSTANCE_ID_LAST \
51504 		HWRM_CFA_METER_INSTANCE_ALLOC_OUTPUT_METER_INSTANCE_ID_INVALID
51505 	uint8_t	unused_0[5];
51506 	/*
51507 	 * This field is used in Output records to indicate that the output
51508 	 * is completely written to RAM. This field should be read as '1'
51509 	 * to indicate that the output has been completely written.
51510 	 * When writing a command completion or response to an internal
51511 	 * processor, the order of writes has to be such that this field is
51512 	 * written last.
51513 	 */
51514 	uint8_t	valid;
51515 } __rte_packed_end;
51516 
51517 /*******************************
51518  * hwrm_cfa_meter_instance_cfg *
51519  *******************************/
51520 
51521 
51522 /* hwrm_cfa_meter_instance_cfg_input (size:192b/24B) */
51523 struct __rte_packed_begin hwrm_cfa_meter_instance_cfg_input {
51524 	/* The HWRM command request type. */
51525 	uint16_t	req_type;
51526 	/*
51527 	 * The completion ring to send the completion event on. This should
51528 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51529 	 */
51530 	uint16_t	cmpl_ring;
51531 	/*
51532 	 * The sequence ID is used by the driver for tracking multiple
51533 	 * commands. This ID is treated as opaque data by the firmware and
51534 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51535 	 */
51536 	uint16_t	seq_id;
51537 	/*
51538 	 * The target ID of the command:
51539 	 * * 0x0-0xFFF8 - The function ID
51540 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51541 	 * * 0xFFFD - Reserved for user-space HWRM interface
51542 	 * * 0xFFFF - HWRM
51543 	 */
51544 	uint16_t	target_id;
51545 	/*
51546 	 * A physical address pointer pointing to a host buffer that the
51547 	 * command's response data will be written. This can be either a host
51548 	 * physical address (HPA) or a guest physical address (GPA) and must
51549 	 * point to a physically contiguous block of memory.
51550 	 */
51551 	uint64_t	resp_addr;
51552 	uint8_t	flags;
51553 	/*
51554 	 * Enumeration denoting the RX, TX type of the resource.
51555 	 * This enumeration is used for resources that are similar for both
51556 	 * TX and RX paths of the chip.
51557 	 */
51558 	#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_FLAGS_PATH     UINT32_C(0x1)
51559 	/* tx path */
51560 	#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_FLAGS_PATH_TX \
51561 		UINT32_C(0x0)
51562 	/* rx path */
51563 	#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_FLAGS_PATH_RX \
51564 		UINT32_C(0x1)
51565 	#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_FLAGS_PATH_LAST \
51566 		HWRM_CFA_METER_INSTANCE_CFG_INPUT_FLAGS_PATH_RX
51567 	uint8_t	unused_0;
51568 	/*
51569 	 * This value identifies a new meter profile to be associated with
51570 	 * the meter instance specified in this command.
51571 	 */
51572 	uint16_t	meter_profile_id;
51573 	/*
51574 	 * A value of 0xffff is considered invalid and implies the
51575 	 * profile is not configured.
51576 	 */
51577 	#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_METER_PROFILE_ID_INVALID \
51578 		UINT32_C(0xffff)
51579 	#define HWRM_CFA_METER_INSTANCE_CFG_INPUT_METER_PROFILE_ID_LAST \
51580 		HWRM_CFA_METER_INSTANCE_CFG_INPUT_METER_PROFILE_ID_INVALID
51581 	/*
51582 	 * This value identifies the ID of a meter instance that needs to be
51583 	 * updated with a new meter profile specified in this command.
51584 	 */
51585 	uint16_t	meter_instance_id;
51586 	uint8_t	unused_1[2];
51587 } __rte_packed_end;
51588 
51589 /* hwrm_cfa_meter_instance_cfg_output (size:128b/16B) */
51590 struct __rte_packed_begin hwrm_cfa_meter_instance_cfg_output {
51591 	/* The specific error status for the command. */
51592 	uint16_t	error_code;
51593 	/* The HWRM command request type. */
51594 	uint16_t	req_type;
51595 	/* The sequence ID from the original command. */
51596 	uint16_t	seq_id;
51597 	/* The length of the response data in number of bytes. */
51598 	uint16_t	resp_len;
51599 	uint8_t	unused_0[7];
51600 	/*
51601 	 * This field is used in Output records to indicate that the output
51602 	 * is completely written to RAM. This field should be read as '1'
51603 	 * to indicate that the output has been completely written.
51604 	 * When writing a command completion or response to an internal
51605 	 * processor, the order of writes has to be such that this field is
51606 	 * written last.
51607 	 */
51608 	uint8_t	valid;
51609 } __rte_packed_end;
51610 
51611 /********************************
51612  * hwrm_cfa_meter_instance_free *
51613  ********************************/
51614 
51615 
51616 /* hwrm_cfa_meter_instance_free_input (size:192b/24B) */
51617 struct __rte_packed_begin hwrm_cfa_meter_instance_free_input {
51618 	/* The HWRM command request type. */
51619 	uint16_t	req_type;
51620 	/*
51621 	 * The completion ring to send the completion event on. This should
51622 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51623 	 */
51624 	uint16_t	cmpl_ring;
51625 	/*
51626 	 * The sequence ID is used by the driver for tracking multiple
51627 	 * commands. This ID is treated as opaque data by the firmware and
51628 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51629 	 */
51630 	uint16_t	seq_id;
51631 	/*
51632 	 * The target ID of the command:
51633 	 * * 0x0-0xFFF8 - The function ID
51634 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51635 	 * * 0xFFFD - Reserved for user-space HWRM interface
51636 	 * * 0xFFFF - HWRM
51637 	 */
51638 	uint16_t	target_id;
51639 	/*
51640 	 * A physical address pointer pointing to a host buffer that the
51641 	 * command's response data will be written. This can be either a host
51642 	 * physical address (HPA) or a guest physical address (GPA) and must
51643 	 * point to a physically contiguous block of memory.
51644 	 */
51645 	uint64_t	resp_addr;
51646 	uint8_t	flags;
51647 	/*
51648 	 * Enumeration denoting the RX, TX type of the resource.
51649 	 * This enumeration is used for resources that are similar for both
51650 	 * TX and RX paths of the chip.
51651 	 */
51652 	#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH     UINT32_C(0x1)
51653 	/* tx path */
51654 	#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_TX \
51655 		UINT32_C(0x0)
51656 	/* rx path */
51657 	#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_RX \
51658 		UINT32_C(0x1)
51659 	#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_LAST \
51660 		HWRM_CFA_METER_INSTANCE_FREE_INPUT_FLAGS_PATH_RX
51661 	uint8_t	unused_0;
51662 	/* This value identifies a meter instance in CFA. */
51663 	uint16_t	meter_instance_id;
51664 	/*
51665 	 * A value of 0xfff is considered invalid and implies the
51666 	 * instance is not configured.
51667 	 */
51668 	#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_METER_INSTANCE_ID_INVALID \
51669 		UINT32_C(0xffff)
51670 	#define HWRM_CFA_METER_INSTANCE_FREE_INPUT_METER_INSTANCE_ID_LAST \
51671 		HWRM_CFA_METER_INSTANCE_FREE_INPUT_METER_INSTANCE_ID_INVALID
51672 	uint8_t	unused_1[4];
51673 } __rte_packed_end;
51674 
51675 /* hwrm_cfa_meter_instance_free_output (size:128b/16B) */
51676 struct __rte_packed_begin hwrm_cfa_meter_instance_free_output {
51677 	/* The specific error status for the command. */
51678 	uint16_t	error_code;
51679 	/* The HWRM command request type. */
51680 	uint16_t	req_type;
51681 	/* The sequence ID from the original command. */
51682 	uint16_t	seq_id;
51683 	/* The length of the response data in number of bytes. */
51684 	uint16_t	resp_len;
51685 	uint8_t	unused_0[7];
51686 	/*
51687 	 * This field is used in Output records to indicate that the output
51688 	 * is completely written to RAM. This field should be read as '1'
51689 	 * to indicate that the output has been completely written.
51690 	 * When writing a command completion or response to an internal
51691 	 * processor, the order of writes has to be such that this field is
51692 	 * written last.
51693 	 */
51694 	uint8_t	valid;
51695 } __rte_packed_end;
51696 
51697 /*******************************
51698  * hwrm_cfa_decap_filter_alloc *
51699  *******************************/
51700 
51701 
51702 /* hwrm_cfa_decap_filter_alloc_input (size:832b/104B) */
51703 struct __rte_packed_begin hwrm_cfa_decap_filter_alloc_input {
51704 	/* The HWRM command request type. */
51705 	uint16_t	req_type;
51706 	/*
51707 	 * The completion ring to send the completion event on. This should
51708 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
51709 	 */
51710 	uint16_t	cmpl_ring;
51711 	/*
51712 	 * The sequence ID is used by the driver for tracking multiple
51713 	 * commands. This ID is treated as opaque data by the firmware and
51714 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
51715 	 */
51716 	uint16_t	seq_id;
51717 	/*
51718 	 * The target ID of the command:
51719 	 * * 0x0-0xFFF8 - The function ID
51720 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
51721 	 * * 0xFFFD - Reserved for user-space HWRM interface
51722 	 * * 0xFFFF - HWRM
51723 	 */
51724 	uint16_t	target_id;
51725 	/*
51726 	 * A physical address pointer pointing to a host buffer that the
51727 	 * command's response data will be written. This can be either a host
51728 	 * physical address (HPA) or a guest physical address (GPA) and must
51729 	 * point to a physically contiguous block of memory.
51730 	 */
51731 	uint64_t	resp_addr;
51732 	uint32_t	flags;
51733 	/* ovs_tunnel is 1 b */
51734 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_FLAGS_OVS_TUNNEL \
51735 		UINT32_C(0x1)
51736 	uint32_t	enables;
51737 	/*
51738 	 * This bit must be '1' for the tunnel_type field to be
51739 	 * configured.
51740 	 */
51741 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_TYPE \
51742 		UINT32_C(0x1)
51743 	/*
51744 	 * This bit must be '1' for the tunnel_id field to be
51745 	 * configured.
51746 	 */
51747 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_TUNNEL_ID \
51748 		UINT32_C(0x2)
51749 	/*
51750 	 * This bit must be '1' for the src_macaddr field to be
51751 	 * configured.
51752 	 */
51753 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_SRC_MACADDR \
51754 		UINT32_C(0x4)
51755 	/*
51756 	 * This bit must be '1' for the dst_macaddr field to be
51757 	 * configured.
51758 	 */
51759 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_MACADDR \
51760 		UINT32_C(0x8)
51761 	/*
51762 	 * This bit must be '1' for the ovlan_vid field to be
51763 	 * configured.
51764 	 */
51765 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_OVLAN_VID \
51766 		UINT32_C(0x10)
51767 	/*
51768 	 * This bit must be '1' for the ivlan_vid field to be
51769 	 * configured.
51770 	 */
51771 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_IVLAN_VID \
51772 		UINT32_C(0x20)
51773 	/*
51774 	 * This bit must be '1' for the t_ovlan_vid field to be
51775 	 * configured.
51776 	 */
51777 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_T_OVLAN_VID \
51778 		UINT32_C(0x40)
51779 	/*
51780 	 * This bit must be '1' for the t_ivlan_vid field to be
51781 	 * configured.
51782 	 */
51783 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_T_IVLAN_VID \
51784 		UINT32_C(0x80)
51785 	/*
51786 	 * This bit must be '1' for the ethertype field to be
51787 	 * configured.
51788 	 */
51789 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE \
51790 		UINT32_C(0x100)
51791 	/*
51792 	 * This bit must be '1' for the src_ipaddr field to be
51793 	 * configured.
51794 	 */
51795 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR \
51796 		UINT32_C(0x200)
51797 	/*
51798 	 * This bit must be '1' for the dst_ipaddr field to be
51799 	 * configured.
51800 	 */
51801 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR \
51802 		UINT32_C(0x400)
51803 	/*
51804 	 * This bit must be '1' for the ipaddr_type field to be
51805 	 * configured.
51806 	 */
51807 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_IPADDR_TYPE \
51808 		UINT32_C(0x800)
51809 	/*
51810 	 * This bit must be '1' for the ip_protocol field to be
51811 	 * configured.
51812 	 */
51813 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_IP_PROTOCOL \
51814 		UINT32_C(0x1000)
51815 	/*
51816 	 * This bit must be '1' for the src_port field to be
51817 	 * configured.
51818 	 */
51819 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT \
51820 		UINT32_C(0x2000)
51821 	/*
51822 	 * This bit must be '1' for the dst_port field to be
51823 	 * configured.
51824 	 */
51825 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_PORT \
51826 		UINT32_C(0x4000)
51827 	/*
51828 	 * This bit must be '1' for the dst_id field to be
51829 	 * configured.
51830 	 */
51831 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_DST_ID \
51832 		UINT32_C(0x8000)
51833 	/*
51834 	 * This bit must be '1' for the mirror_vnic_id field to be
51835 	 * configured.
51836 	 */
51837 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
51838 		UINT32_C(0x10000)
51839 	/*
51840 	 * Tunnel identifier.
51841 	 * Virtual Network Identifier (VNI). Only valid with
51842 	 * tunnel_types VXLAN, NVGRE, and Geneve.
51843 	 * Only lower 24-bits of VNI field are used
51844 	 * in setting up the filter.
51845 	 */
51846 	uint32_t	tunnel_id;
51847 	/* Tunnel Type. */
51848 	uint8_t	tunnel_type;
51849 	/* Non-tunnel */
51850 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
51851 		UINT32_C(0x0)
51852 	/* Virtual eXtensible Local Area Network (VXLAN) */
51853 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
51854 		UINT32_C(0x1)
51855 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
51856 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
51857 		UINT32_C(0x2)
51858 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
51859 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
51860 		UINT32_C(0x3)
51861 	/* IP in IP */
51862 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
51863 		UINT32_C(0x4)
51864 	/* Generic Network Virtualization Encapsulation (Geneve) */
51865 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
51866 		UINT32_C(0x5)
51867 	/* Multi-Protocol Label Switching (MPLS) */
51868 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
51869 		UINT32_C(0x6)
51870 	/* Stateless Transport Tunnel (STT) */
51871 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_STT \
51872 		UINT32_C(0x7)
51873 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
51874 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
51875 		UINT32_C(0x8)
51876 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
51877 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
51878 		UINT32_C(0x9)
51879 	/*
51880 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
51881 	 * datagram payload
51882 	 */
51883 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
51884 		UINT32_C(0xa)
51885 	/* Use fixed layer 2 ether type of 0xFFFF */
51886 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE \
51887 		UINT32_C(0xb)
51888 	/*
51889 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
51890 	 * (IPV6oVXLANGPE)
51891 	 */
51892 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
51893 		UINT32_C(0xc)
51894 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
51895 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE \
51896 		UINT32_C(0x10)
51897 	/* Any tunneled traffic */
51898 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
51899 		UINT32_C(0xff)
51900 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_LAST \
51901 		HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
51902 	uint8_t	unused_0;
51903 	uint16_t	unused_1;
51904 	/*
51905 	 * This value indicates the source MAC address in
51906 	 * the Ethernet header.
51907 	 */
51908 	uint8_t	src_macaddr[6];
51909 	uint8_t	unused_2[2];
51910 	/*
51911 	 * This value indicates the destination MAC address in
51912 	 * the Ethernet header.
51913 	 */
51914 	uint8_t	dst_macaddr[6];
51915 	/*
51916 	 * This value indicates the VLAN ID of the outer VLAN tag
51917 	 * in the Ethernet header.
51918 	 */
51919 	uint16_t	ovlan_vid;
51920 	/*
51921 	 * This value indicates the VLAN ID of the inner VLAN tag
51922 	 * in the Ethernet header.
51923 	 */
51924 	uint16_t	ivlan_vid;
51925 	/*
51926 	 * This value indicates the VLAN ID of the outer VLAN tag
51927 	 * in the tunnel Ethernet header.
51928 	 */
51929 	uint16_t	t_ovlan_vid;
51930 	/*
51931 	 * This value indicates the VLAN ID of the inner VLAN tag
51932 	 * in the tunnel Ethernet header.
51933 	 */
51934 	uint16_t	t_ivlan_vid;
51935 	/* This value indicates the ethertype in the Ethernet header. */
51936 	uint16_t	ethertype;
51937 	/*
51938 	 * This value indicates the type of IP address.
51939 	 * 4 - IPv4
51940 	 * 6 - IPv6
51941 	 * All others are invalid.
51942 	 */
51943 	uint8_t	ip_addr_type;
51944 	/* invalid */
51945 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN \
51946 		UINT32_C(0x0)
51947 	/* IPv4 */
51948 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4 \
51949 		UINT32_C(0x4)
51950 	/* IPv6 */
51951 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6 \
51952 		UINT32_C(0x6)
51953 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_LAST \
51954 		HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
51955 	/*
51956 	 * The value of protocol field in IP header.
51957 	 * Applies to UDP and TCP traffic.
51958 	 * 6 - TCP
51959 	 * 17 - UDP
51960 	 */
51961 	uint8_t	ip_protocol;
51962 	/* invalid */
51963 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN \
51964 		UINT32_C(0x0)
51965 	/* TCP */
51966 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_TCP \
51967 		UINT32_C(0x6)
51968 	/* UDP */
51969 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP \
51970 		UINT32_C(0x11)
51971 	#define HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_LAST \
51972 		HWRM_CFA_DECAP_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP
51973 	uint16_t	unused_3;
51974 	uint32_t	unused_4;
51975 	/*
51976 	 * The value of source IP address to be used in filtering.
51977 	 * For IPv4, first four bytes represent the IP address.
51978 	 */
51979 	uint32_t	src_ipaddr[4];
51980 	/*
51981 	 * The value of destination IP address to be used in filtering.
51982 	 * For IPv4, first four bytes represent the IP address.
51983 	 */
51984 	uint32_t	dst_ipaddr[4];
51985 	/*
51986 	 * The value of source port to be used in filtering.
51987 	 * Applies to UDP and TCP traffic.
51988 	 */
51989 	uint16_t	src_port;
51990 	/*
51991 	 * The value of destination port to be used in filtering.
51992 	 * Applies to UDP and TCP traffic.
51993 	 */
51994 	uint16_t	dst_port;
51995 	/*
51996 	 * If set, this value shall represent the
51997 	 * Logical VNIC ID of the destination VNIC for the RX
51998 	 * path.
51999 	 */
52000 	uint16_t	dst_id;
52001 	/*
52002 	 * If set, this value shall represent the L2 context that matches the
52003 	 * L2 information of the decap filter.
52004 	 */
52005 	uint16_t	l2_ctxt_ref_id;
52006 } __rte_packed_end;
52007 
52008 /* hwrm_cfa_decap_filter_alloc_output (size:128b/16B) */
52009 struct __rte_packed_begin hwrm_cfa_decap_filter_alloc_output {
52010 	/* The specific error status for the command. */
52011 	uint16_t	error_code;
52012 	/* The HWRM command request type. */
52013 	uint16_t	req_type;
52014 	/* The sequence ID from the original command. */
52015 	uint16_t	seq_id;
52016 	/* The length of the response data in number of bytes. */
52017 	uint16_t	resp_len;
52018 	/* This value is an opaque id into CFA data structures. */
52019 	uint32_t	decap_filter_id;
52020 	uint8_t	unused_0[3];
52021 	/*
52022 	 * This field is used in Output records to indicate that the output
52023 	 * is completely written to RAM. This field should be read as '1'
52024 	 * to indicate that the output has been completely written.
52025 	 * When writing a command completion or response to an internal
52026 	 * processor, the order of writes has to be such that this field is
52027 	 * written last.
52028 	 */
52029 	uint8_t	valid;
52030 } __rte_packed_end;
52031 
52032 /******************************
52033  * hwrm_cfa_decap_filter_free *
52034  ******************************/
52035 
52036 
52037 /* hwrm_cfa_decap_filter_free_input (size:192b/24B) */
52038 struct __rte_packed_begin hwrm_cfa_decap_filter_free_input {
52039 	/* The HWRM command request type. */
52040 	uint16_t	req_type;
52041 	/*
52042 	 * The completion ring to send the completion event on. This should
52043 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52044 	 */
52045 	uint16_t	cmpl_ring;
52046 	/*
52047 	 * The sequence ID is used by the driver for tracking multiple
52048 	 * commands. This ID is treated as opaque data by the firmware and
52049 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52050 	 */
52051 	uint16_t	seq_id;
52052 	/*
52053 	 * The target ID of the command:
52054 	 * * 0x0-0xFFF8 - The function ID
52055 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52056 	 * * 0xFFFD - Reserved for user-space HWRM interface
52057 	 * * 0xFFFF - HWRM
52058 	 */
52059 	uint16_t	target_id;
52060 	/*
52061 	 * A physical address pointer pointing to a host buffer that the
52062 	 * command's response data will be written. This can be either a host
52063 	 * physical address (HPA) or a guest physical address (GPA) and must
52064 	 * point to a physically contiguous block of memory.
52065 	 */
52066 	uint64_t	resp_addr;
52067 	/* This value is an opaque id into CFA data structures. */
52068 	uint32_t	decap_filter_id;
52069 	uint8_t	unused_0[4];
52070 } __rte_packed_end;
52071 
52072 /* hwrm_cfa_decap_filter_free_output (size:128b/16B) */
52073 struct __rte_packed_begin hwrm_cfa_decap_filter_free_output {
52074 	/* The specific error status for the command. */
52075 	uint16_t	error_code;
52076 	/* The HWRM command request type. */
52077 	uint16_t	req_type;
52078 	/* The sequence ID from the original command. */
52079 	uint16_t	seq_id;
52080 	/* The length of the response data in number of bytes. */
52081 	uint16_t	resp_len;
52082 	uint8_t	unused_0[7];
52083 	/*
52084 	 * This field is used in Output records to indicate that the output
52085 	 * is completely written to RAM. This field should be read as '1'
52086 	 * to indicate that the output has been completely written.
52087 	 * When writing a command completion or response to an internal
52088 	 * processor, the order of writes has to be such that this field is
52089 	 * written last.
52090 	 */
52091 	uint8_t	valid;
52092 } __rte_packed_end;
52093 
52094 /***********************
52095  * hwrm_cfa_flow_alloc *
52096  ***********************/
52097 
52098 
52099 /* hwrm_cfa_flow_alloc_input (size:1024b/128B) */
52100 struct __rte_packed_begin hwrm_cfa_flow_alloc_input {
52101 	/* The HWRM command request type. */
52102 	uint16_t	req_type;
52103 	/*
52104 	 * The completion ring to send the completion event on. This should
52105 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52106 	 */
52107 	uint16_t	cmpl_ring;
52108 	/*
52109 	 * The sequence ID is used by the driver for tracking multiple
52110 	 * commands. This ID is treated as opaque data by the firmware and
52111 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52112 	 */
52113 	uint16_t	seq_id;
52114 	/*
52115 	 * The target ID of the command:
52116 	 * * 0x0-0xFFF8 - The function ID
52117 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52118 	 * * 0xFFFD - Reserved for user-space HWRM interface
52119 	 * * 0xFFFF - HWRM
52120 	 */
52121 	uint16_t	target_id;
52122 	/*
52123 	 * A physical address pointer pointing to a host buffer that the
52124 	 * command's response data will be written. This can be either a host
52125 	 * physical address (HPA) or a guest physical address (GPA) and must
52126 	 * point to a physically contiguous block of memory.
52127 	 */
52128 	uint64_t	resp_addr;
52129 	uint16_t	flags;
52130 	/* tunnel is 1 b */
52131 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_TUNNEL \
52132 		UINT32_C(0x1)
52133 	/* num_vlan is 2 b */
52134 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_MASK \
52135 		UINT32_C(0x6)
52136 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_SFT           1
52137 	/* no tags */
52138 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_NONE \
52139 		(UINT32_C(0x0) << 1)
52140 	/* 1 tag */
52141 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_ONE \
52142 		(UINT32_C(0x1) << 1)
52143 	/* 2 tags */
52144 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_TWO \
52145 		(UINT32_C(0x2) << 1)
52146 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_LAST \
52147 		HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_NUM_VLAN_TWO
52148 	/* Enumeration denoting the Flow Type. */
52149 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_MASK \
52150 		UINT32_C(0x38)
52151 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_SFT           3
52152 	/* L2 flow */
52153 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_L2 \
52154 		(UINT32_C(0x0) << 3)
52155 	/* IPV4 flow */
52156 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_IPV4 \
52157 		(UINT32_C(0x1) << 3)
52158 	/* IPV6 flow */
52159 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_IPV6 \
52160 		(UINT32_C(0x2) << 3)
52161 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_LAST \
52162 		HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_FLOWTYPE_IPV6
52163 	/*
52164 	 * when set to 1, indicates TX flow offload for function specified
52165 	 * in src_fid and the dst_fid should be set to invalid value. To
52166 	 * indicate a VM to VM flow, both of the path_tx and path_rx flags
52167 	 * need to be set. For virtio vSwitch offload case, the src_fid and
52168 	 * dst_fid is set to the same fid value. For the SRIOV vSwitch
52169 	 * offload case, the src_fid and dst_fid must be set to the same VF
52170 	 * FID belong to the children VFs of the same PF to indicate VM to
52171 	 * VM flow.
52172 	 */
52173 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_PATH_TX \
52174 		UINT32_C(0x40)
52175 	/*
52176 	 * when set to 1, indicates RX flow offload for function specified
52177 	 * in dst_fid and the src_fid should be set to invalid value.
52178 	 */
52179 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_PATH_RX \
52180 		UINT32_C(0x80)
52181 	/*
52182 	 * Set to 1 to indicate matching of VXLAN VNI from the custom vxlan
52183 	 * header is required and the VXLAN VNI value is stored in the first
52184 	 * 24 bits of the dmac field. This flag is only valid when the flow
52185 	 * direction is RX.
52186 	 */
52187 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_MATCH_VXLAN_IP_VNI \
52188 		UINT32_C(0x100)
52189 	/*
52190 	 * Set to 1 to indicate vhost_id is specified in the outer_vlan_tci
52191 	 * field.
52192 	 */
52193 	#define HWRM_CFA_FLOW_ALLOC_INPUT_FLAGS_VHOST_ID_USE_VLAN \
52194 		UINT32_C(0x200)
52195 	/*
52196 	 * Tx Flow: vf fid.
52197 	 * Rx Flow: pf fid.
52198 	 */
52199 	uint16_t	src_fid;
52200 	/* Tunnel handle valid when tunnel flag is set. */
52201 	uint32_t	tunnel_handle;
52202 	uint16_t	action_flags;
52203 	/*
52204 	 * Setting of this flag indicates drop action. If this flag is not
52205 	 * set, then it should be considered accept action.
52206 	 */
52207 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_FWD \
52208 		UINT32_C(0x1)
52209 	/* recycle is 1 b */
52210 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_RECYCLE \
52211 		UINT32_C(0x2)
52212 	/*
52213 	 * Setting of this flag indicates drop action. If this flag is not
52214 	 * set, then it should be considered accept action.
52215 	 */
52216 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_DROP \
52217 		UINT32_C(0x4)
52218 	/* meter is 1 b */
52219 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_METER \
52220 		UINT32_C(0x8)
52221 	/* tunnel is 1 b */
52222 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_TUNNEL \
52223 		UINT32_C(0x10)
52224 	/* nat_src is 1 b */
52225 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NAT_SRC \
52226 		UINT32_C(0x20)
52227 	/* nat_dest is 1 b */
52228 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NAT_DEST \
52229 		UINT32_C(0x40)
52230 	/* nat_ipv4_address is 1 b */
52231 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NAT_IPV4_ADDRESS \
52232 		UINT32_C(0x80)
52233 	/* l2_header_rewrite is 1 b */
52234 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_L2_HEADER_REWRITE \
52235 		UINT32_C(0x100)
52236 	/* ttl_decrement is 1 b */
52237 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_TTL_DECREMENT \
52238 		UINT32_C(0x200)
52239 	/*
52240 	 * If set to 1 and flow direction is TX, it indicates decap of L2
52241 	 * header and encap of tunnel header. If set to 1 and flow direction
52242 	 * is RX, it indicates decap of tunnel header and encap L2 header.
52243 	 * The type of tunnel is specified in the tunnel_type field.
52244 	 */
52245 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_TUNNEL_IP \
52246 		UINT32_C(0x400)
52247 	/* If set to 1, flow aging is enabled for this flow. */
52248 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_FLOW_AGING_ENABLED \
52249 		UINT32_C(0x800)
52250 	/*
52251 	 * If set to 1 an attempt will be made to try to offload this flow
52252 	 * to the most optimal flow table resource. If set to 0, the flow
52253 	 * will be placed to the default flow table resource.
52254 	 */
52255 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_PRI_HINT \
52256 		UINT32_C(0x1000)
52257 	/*
52258 	 * If set to 1 there will be no attempt to allocate an on-chip try
52259 	 * to offload this flow. If set to 0, which will keep compatibility
52260 	 * with the older drivers, will cause the FW to attempt to allocate
52261 	 * an on-chip flow counter for the newly created flow. This will
52262 	 * keep the existing behavior with EM flows which always had an
52263 	 * associated flow counter.
52264 	 */
52265 	#define HWRM_CFA_FLOW_ALLOC_INPUT_ACTION_FLAGS_NO_FLOW_COUNTER_ALLOC \
52266 		UINT32_C(0x2000)
52267 	/*
52268 	 * Tx Flow: pf or vf fid.
52269 	 * Rx Flow: vf fid.
52270 	 */
52271 	uint16_t	dst_fid;
52272 	/* VLAN tpid, valid when push_vlan flag is set. */
52273 	uint16_t	l2_rewrite_vlan_tpid;
52274 	/* VLAN tci, valid when push_vlan flag is set. */
52275 	uint16_t	l2_rewrite_vlan_tci;
52276 	/* Meter id, valid when meter flag is set. */
52277 	uint16_t	act_meter_id;
52278 	/* Flow with the same l2 context tcam key. */
52279 	uint16_t	ref_flow_handle;
52280 	/* This value sets the match value for the ethertype. */
52281 	uint16_t	ethertype;
52282 	/* valid when num tags is 1 or 2. */
52283 	uint16_t	outer_vlan_tci;
52284 	/* This value sets the match value for the Destination MAC address. */
52285 	uint16_t	dmac[3];
52286 	/* valid when num tags is 2. */
52287 	uint16_t	inner_vlan_tci;
52288 	/* This value sets the match value for the Source MAC address. */
52289 	uint16_t	smac[3];
52290 	/* The bit length of destination IP address mask. */
52291 	uint8_t	ip_dst_mask_len;
52292 	/* The bit length of source IP address mask. */
52293 	uint8_t	ip_src_mask_len;
52294 	/* The value of destination IPv4/IPv6 address. */
52295 	uint32_t	ip_dst[4];
52296 	/* The source IPv4/IPv6 address. */
52297 	uint32_t	ip_src[4];
52298 	/*
52299 	 * The value of source port.
52300 	 * Applies to UDP and TCP traffic.
52301 	 */
52302 	uint16_t	l4_src_port;
52303 	/*
52304 	 * The value of source port mask.
52305 	 * Applies to UDP and TCP traffic.
52306 	 */
52307 	uint16_t	l4_src_port_mask;
52308 	/*
52309 	 * The value of destination port.
52310 	 * Applies to UDP and TCP traffic.
52311 	 */
52312 	uint16_t	l4_dst_port;
52313 	/*
52314 	 * The value of destination port mask.
52315 	 * Applies to UDP and TCP traffic.
52316 	 */
52317 	uint16_t	l4_dst_port_mask;
52318 	/*
52319 	 * NAT IPv4/6 address based on address type flag.
52320 	 * 0 values are ignored.
52321 	 */
52322 	uint32_t	nat_ip_address[4];
52323 	/* L2 header re-write Destination MAC address. */
52324 	uint16_t	l2_rewrite_dmac[3];
52325 	/*
52326 	 * The NAT source/destination port based on direction flag.
52327 	 * Applies to UDP and TCP traffic.
52328 	 * 0 values are ignored.
52329 	 */
52330 	uint16_t	nat_port;
52331 	/* L2 header re-write Source MAC address. */
52332 	uint16_t	l2_rewrite_smac[3];
52333 	/* The value of ip protocol. */
52334 	uint8_t	ip_proto;
52335 	/* Tunnel Type. */
52336 	uint8_t	tunnel_type;
52337 	/* Non-tunnel */
52338 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NONTUNNEL \
52339 		UINT32_C(0x0)
52340 	/* Virtual eXtensible Local Area Network (VXLAN) */
52341 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
52342 		UINT32_C(0x1)
52343 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
52344 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_NVGRE \
52345 		UINT32_C(0x2)
52346 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
52347 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2GRE \
52348 		UINT32_C(0x3)
52349 	/* IP in IP */
52350 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPIP \
52351 		UINT32_C(0x4)
52352 	/* Generic Network Virtualization Encapsulation (Geneve) */
52353 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
52354 		UINT32_C(0x5)
52355 	/* Multi-Protocol Label Switching (MPLS) */
52356 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_MPLS \
52357 		UINT32_C(0x6)
52358 	/* Stateless Transport Tunnel (STT) */
52359 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_STT \
52360 		UINT32_C(0x7)
52361 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
52362 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE \
52363 		UINT32_C(0x8)
52364 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
52365 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
52366 		UINT32_C(0x9)
52367 	/*
52368 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
52369 	 * datagram payload
52370 	 */
52371 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
52372 		UINT32_C(0xa)
52373 	/* Use fixed layer 2 ether type of 0xFFFF */
52374 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE \
52375 		UINT32_C(0xb)
52376 	/*
52377 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
52378 	 * (IPV6oVXLANGPE)
52379 	 */
52380 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
52381 		UINT32_C(0xc)
52382 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
52383 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE \
52384 		UINT32_C(0x10)
52385 	/* Any tunneled traffic */
52386 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL \
52387 		UINT32_C(0xff)
52388 	#define HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_LAST \
52389 		HWRM_CFA_FLOW_ALLOC_INPUT_TUNNEL_TYPE_ANYTUNNEL
52390 } __rte_packed_end;
52391 
52392 /* hwrm_cfa_flow_alloc_output (size:256b/32B) */
52393 struct __rte_packed_begin hwrm_cfa_flow_alloc_output {
52394 	/* The specific error status for the command. */
52395 	uint16_t	error_code;
52396 	/* The HWRM command request type. */
52397 	uint16_t	req_type;
52398 	/* The sequence ID from the original command. */
52399 	uint16_t	seq_id;
52400 	/* The length of the response data in number of bytes. */
52401 	uint16_t	resp_len;
52402 	/* Flow record index. */
52403 	uint16_t	flow_handle;
52404 	uint8_t	unused_0[2];
52405 	/*
52406 	 * The flow id value in bit 0-29 is the actual ID of the flow
52407 	 * associated with this filter and it shall be used to match
52408 	 * and associate the flow identifier returned in completion
52409 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
52410 	 * shall indicate no valid flow id.
52411 	 */
52412 	uint32_t	flow_id;
52413 	/* Indicate the flow id value. */
52414 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK \
52415 		UINT32_C(0x3fffffff)
52416 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
52417 	/* Indicate type of the flow. */
52418 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE \
52419 		UINT32_C(0x40000000)
52420 	/*
52421 	 * If this bit set to 0, then it indicates that the flow is
52422 	 * internal flow.
52423 	 */
52424 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_INT \
52425 		(UINT32_C(0x0) << 30)
52426 	/*
52427 	 * If this bit is set to 1, then it indicates that the flow is
52428 	 * external flow.
52429 	 */
52430 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT \
52431 		(UINT32_C(0x1) << 30)
52432 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST \
52433 		HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
52434 	/* Indicate the flow direction. */
52435 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR \
52436 		UINT32_C(0x80000000)
52437 	/* If this bit set to 0, then it indicates rx flow. */
52438 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_RX \
52439 		(UINT32_C(0x0) << 31)
52440 	/* If this bit is set to 1, then it indicates that tx flow. */
52441 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_TX \
52442 		(UINT32_C(0x1) << 31)
52443 	#define HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_LAST \
52444 		HWRM_CFA_FLOW_ALLOC_OUTPUT_FLOW_ID_DIR_TX
52445 	/* This value identifies a set of CFA data structures used for a flow. */
52446 	uint64_t	ext_flow_handle;
52447 	uint32_t	flow_counter_id;
52448 	uint8_t	unused_1[3];
52449 	/*
52450 	 * This field is used in Output records to indicate that the output
52451 	 * is completely written to RAM. This field should be read as '1'
52452 	 * to indicate that the output has been completely written.
52453 	 * When writing a command completion or response to an internal
52454 	 * processor, the order of writes has to be such that this field is
52455 	 * written last.
52456 	 */
52457 	uint8_t	valid;
52458 } __rte_packed_end;
52459 
52460 /* hwrm_cfa_flow_alloc_cmd_err (size:64b/8B) */
52461 struct __rte_packed_begin hwrm_cfa_flow_alloc_cmd_err {
52462 	/*
52463 	 * command specific error codes that goes to
52464 	 * the cmd_err field in Common HWRM Error Response.
52465 	 */
52466 	uint8_t	code;
52467 	/* Unknown error */
52468 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_UNKNOWN         UINT32_C(0x0)
52469 	/* No more L2 Context TCAM */
52470 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_L2_CONTEXT_TCAM UINT32_C(0x1)
52471 	/* No more action records */
52472 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_ACTION_RECORD   UINT32_C(0x2)
52473 	/* No more flow counters */
52474 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_FLOW_COUNTER    UINT32_C(0x3)
52475 	/* No more wild-card TCAM */
52476 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_WILD_CARD_TCAM  UINT32_C(0x4)
52477 	/* Hash collision in exact match tables */
52478 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_HASH_COLLISION  UINT32_C(0x5)
52479 	/* Key is already installed */
52480 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_KEY_EXISTS      UINT32_C(0x6)
52481 	/* Flow Context DB is out of resource */
52482 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_FLOW_CTXT_DB    UINT32_C(0x7)
52483 	#define HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_LAST \
52484 		HWRM_CFA_FLOW_ALLOC_CMD_ERR_CODE_FLOW_CTXT_DB
52485 	uint8_t	unused_0[7];
52486 } __rte_packed_end;
52487 
52488 /**********************
52489  * hwrm_cfa_flow_free *
52490  **********************/
52491 
52492 
52493 /* hwrm_cfa_flow_free_input (size:256b/32B) */
52494 struct __rte_packed_begin hwrm_cfa_flow_free_input {
52495 	/* The HWRM command request type. */
52496 	uint16_t	req_type;
52497 	/*
52498 	 * The completion ring to send the completion event on. This should
52499 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52500 	 */
52501 	uint16_t	cmpl_ring;
52502 	/*
52503 	 * The sequence ID is used by the driver for tracking multiple
52504 	 * commands. This ID is treated as opaque data by the firmware and
52505 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52506 	 */
52507 	uint16_t	seq_id;
52508 	/*
52509 	 * The target ID of the command:
52510 	 * * 0x0-0xFFF8 - The function ID
52511 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52512 	 * * 0xFFFD - Reserved for user-space HWRM interface
52513 	 * * 0xFFFF - HWRM
52514 	 */
52515 	uint16_t	target_id;
52516 	/*
52517 	 * A physical address pointer pointing to a host buffer that the
52518 	 * command's response data will be written. This can be either a host
52519 	 * physical address (HPA) or a guest physical address (GPA) and must
52520 	 * point to a physically contiguous block of memory.
52521 	 */
52522 	uint64_t	resp_addr;
52523 	/* Flow record index. */
52524 	uint16_t	flow_handle;
52525 	uint16_t	unused_0;
52526 	/* Flow counter id to be freed. */
52527 	uint32_t	flow_counter_id;
52528 	/* This value identifies a set of CFA data structures used for a flow. */
52529 	uint64_t	ext_flow_handle;
52530 } __rte_packed_end;
52531 
52532 /* hwrm_cfa_flow_free_output (size:256b/32B) */
52533 struct __rte_packed_begin hwrm_cfa_flow_free_output {
52534 	/* The specific error status for the command. */
52535 	uint16_t	error_code;
52536 	/* The HWRM command request type. */
52537 	uint16_t	req_type;
52538 	/* The sequence ID from the original command. */
52539 	uint16_t	seq_id;
52540 	/* The length of the response data in number of bytes. */
52541 	uint16_t	resp_len;
52542 	/* packet is 64 b */
52543 	uint64_t	packet;
52544 	/* byte is 64 b */
52545 	uint64_t	byte;
52546 	uint8_t	unused_0[7];
52547 	/*
52548 	 * This field is used in Output records to indicate that the output
52549 	 * is completely written to RAM. This field should be read as '1'
52550 	 * to indicate that the output has been completely written.
52551 	 * When writing a command completion or response to an internal
52552 	 * processor, the order of writes has to be such that this field is
52553 	 * written last.
52554 	 */
52555 	uint8_t	valid;
52556 } __rte_packed_end;
52557 
52558 /* hwrm_cfa_flow_action_data (size:960b/120B) */
52559 struct __rte_packed_begin hwrm_cfa_flow_action_data {
52560 	uint16_t	action_flags;
52561 	/* Setting of this flag indicates accept action. */
52562 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_FWD \
52563 		UINT32_C(0x1)
52564 	/* Setting of this flag indicates recycle action. */
52565 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_RECYCLE \
52566 		UINT32_C(0x2)
52567 	/* Setting of this flag indicates drop action. */
52568 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_DROP \
52569 		UINT32_C(0x4)
52570 	/* Setting of this flag indicates meter action. */
52571 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_METER \
52572 		UINT32_C(0x8)
52573 	/* Setting of this flag indicates tunnel action. */
52574 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_TUNNEL \
52575 		UINT32_C(0x10)
52576 	/*
52577 	 * If set to 1 and flow direction is TX, it indicates decap of L2
52578 	 * header and encap of tunnel header. If set to 1 and flow direction
52579 	 * is RX, it indicates decap of tunnel header and encap L2 header.
52580 	 */
52581 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_TUNNEL_IP \
52582 		UINT32_C(0x20)
52583 	/* Setting of this flag indicates ttl decrement action. */
52584 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_TTL_DECREMENT \
52585 		UINT32_C(0x40)
52586 	/* If set to 1, flow aging is enabled for this flow. */
52587 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_FLOW_AGING_ENABLED \
52588 		UINT32_C(0x80)
52589 	/* Setting of this flag indicates encap action. */
52590 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_ENCAP \
52591 		UINT32_C(0x100)
52592 	/* Setting of this flag indicates decap action. */
52593 	#define HWRM_CFA_FLOW_ACTION_DATA_ACTION_FLAGS_DECAP \
52594 		UINT32_C(0x200)
52595 	/* Meter id. */
52596 	uint16_t	act_meter_id;
52597 	/* VNIC id. */
52598 	uint16_t	vnic_id;
52599 	/* vport number. */
52600 	uint16_t	vport_id;
52601 	/* The NAT source/destination. */
52602 	uint16_t	nat_port;
52603 	uint16_t	unused_0[3];
52604 	/* NAT IPv4/IPv6 address. */
52605 	uint32_t	nat_ip_address[4];
52606 	/* Encapsulation Type. */
52607 	uint8_t	encap_type;
52608 	/* Virtual eXtensible Local Area Network (VXLAN) */
52609 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VXLAN        UINT32_C(0x1)
52610 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
52611 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_NVGRE        UINT32_C(0x2)
52612 	/* Generic Routing Encapsulation (GRE) after inside Ethernet payload */
52613 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_L2GRE        UINT32_C(0x3)
52614 	/* IP in IP */
52615 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_IPIP         UINT32_C(0x4)
52616 	/* Generic Network Virtualization Encapsulation (Geneve) */
52617 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_GENEVE       UINT32_C(0x5)
52618 	/* Multi-Protocol Label Switching (MPLS) */
52619 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_MPLS         UINT32_C(0x6)
52620 	/* VLAN */
52621 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VLAN         UINT32_C(0x7)
52622 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
52623 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_IPGRE        UINT32_C(0x8)
52624 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
52625 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VXLAN_V4     UINT32_C(0x9)
52626 	/*
52627 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
52628 	 * datagram payload
52629 	 */
52630 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_IPGRE_V1     UINT32_C(0xa)
52631 	/* Use fixed layer 2 ether type of 0xFFFF */
52632 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_L2_ETYPE     UINT32_C(0xb)
52633 	/*
52634 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
52635 	 * (IPV6oVXLANGPE)
52636 	 */
52637 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VXLAN_GPE_V6 UINT32_C(0xc)
52638 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
52639 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VXLAN_GPE \
52640 		UINT32_C(0x10)
52641 	#define HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_LAST \
52642 		HWRM_CFA_FLOW_ACTION_DATA_ENCAP_TYPE_VXLAN_GPE
52643 	uint8_t	unused[7];
52644 	/* This value is encap data for the associated encap type. */
52645 	uint32_t	encap_data[20];
52646 } __rte_packed_end;
52647 
52648 /* hwrm_cfa_flow_tunnel_hdr_data (size:64b/8B) */
52649 struct __rte_packed_begin hwrm_cfa_flow_tunnel_hdr_data {
52650 	/* Tunnel Type. */
52651 	uint8_t	tunnel_type;
52652 	/* Non-tunnel */
52653 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_NONTUNNEL \
52654 		UINT32_C(0x0)
52655 	/* Virtual eXtensible Local Area Network (VXLAN) */
52656 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_VXLAN \
52657 		UINT32_C(0x1)
52658 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
52659 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_NVGRE \
52660 		UINT32_C(0x2)
52661 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
52662 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_L2GRE \
52663 		UINT32_C(0x3)
52664 	/* IP in IP */
52665 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_IPIP \
52666 		UINT32_C(0x4)
52667 	/* Generic Network Virtualization Encapsulation (Geneve) */
52668 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_GENEVE \
52669 		UINT32_C(0x5)
52670 	/* Multi-Protocol Label Switching (MPLS) */
52671 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_MPLS \
52672 		UINT32_C(0x6)
52673 	/* Stateless Transport Tunnel (STT) */
52674 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_STT \
52675 		UINT32_C(0x7)
52676 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
52677 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_IPGRE \
52678 		UINT32_C(0x8)
52679 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
52680 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_VXLAN_V4 \
52681 		UINT32_C(0x9)
52682 	/*
52683 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
52684 	 * datagram payload
52685 	 */
52686 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_IPGRE_V1 \
52687 		UINT32_C(0xa)
52688 	/* Use fixed layer 2 ether type of 0xFFFF */
52689 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_L2_ETYPE \
52690 		UINT32_C(0xb)
52691 	/*
52692 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
52693 	 * (IPV6oVXLANGPE)
52694 	 */
52695 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_VXLAN_GPE_V6 \
52696 		UINT32_C(0xc)
52697 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
52698 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_VXLAN_GPE \
52699 		UINT32_C(0x10)
52700 	/* Any tunneled traffic */
52701 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_ANYTUNNEL \
52702 		UINT32_C(0xff)
52703 	#define HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_LAST \
52704 		HWRM_CFA_FLOW_TUNNEL_HDR_DATA_TUNNEL_TYPE_ANYTUNNEL
52705 	uint8_t	unused[3];
52706 	/*
52707 	 * Tunnel identifier.
52708 	 * Virtual Network Identifier (VNI).
52709 	 */
52710 	uint32_t	tunnel_id;
52711 } __rte_packed_end;
52712 
52713 /* hwrm_cfa_flow_l4_key_data (size:64b/8B) */
52714 struct __rte_packed_begin hwrm_cfa_flow_l4_key_data {
52715 	/* The value of source port. */
52716 	uint16_t	l4_src_port;
52717 	/* The value of destination port. */
52718 	uint16_t	l4_dst_port;
52719 	uint32_t	unused;
52720 } __rte_packed_end;
52721 
52722 /* hwrm_cfa_flow_l3_key_data (size:512b/64B) */
52723 struct __rte_packed_begin hwrm_cfa_flow_l3_key_data {
52724 	/* The value of ip protocol. */
52725 	uint8_t	ip_protocol;
52726 	uint8_t	unused_0[7];
52727 	/* The value of destination IPv4/IPv6 address. */
52728 	uint32_t	ip_dst[4];
52729 	/* The source IPv4/IPv6 address. */
52730 	uint32_t	ip_src[4];
52731 	/* NAT IPv4/IPv6 address. */
52732 	uint32_t	nat_ip_address[4];
52733 	uint32_t	unused[2];
52734 } __rte_packed_end;
52735 
52736 /* hwrm_cfa_flow_l2_key_data (size:448b/56B) */
52737 struct __rte_packed_begin hwrm_cfa_flow_l2_key_data {
52738 	/* Destination MAC address. */
52739 	uint16_t	dmac[3];
52740 	uint16_t	unused_0;
52741 	/* Source MAC address. */
52742 	uint16_t	smac[3];
52743 	uint16_t	unused_1;
52744 	/* L2 header re-write Destination MAC address. */
52745 	uint16_t	l2_rewrite_dmac[3];
52746 	uint16_t	unused_2;
52747 	/* L2 header re-write Source MAC address. */
52748 	uint16_t	l2_rewrite_smac[3];
52749 	/* Ethertype. */
52750 	uint16_t	ethertype;
52751 	/* Number of VLAN tags. */
52752 	uint16_t	num_vlan_tags;
52753 	/* VLAN tpid. */
52754 	uint16_t	l2_rewrite_vlan_tpid;
52755 	/* VLAN tci. */
52756 	uint16_t	l2_rewrite_vlan_tci;
52757 	uint8_t	unused_3[2];
52758 	/* Outer VLAN TPID. */
52759 	uint16_t	ovlan_tpid;
52760 	/* Outer VLAN TCI. */
52761 	uint16_t	ovlan_tci;
52762 	/* Inner VLAN TPID. */
52763 	uint16_t	ivlan_tpid;
52764 	/* Inner VLAN TCI. */
52765 	uint16_t	ivlan_tci;
52766 	uint8_t	unused[8];
52767 } __rte_packed_end;
52768 
52769 /* hwrm_cfa_flow_key_data (size:4160b/520B) */
52770 struct __rte_packed_begin hwrm_cfa_flow_key_data {
52771 	/* Flow associated tunnel L2 header key info. */
52772 	uint32_t	t_l2_key_data[14];
52773 	/* Flow associated tunnel L2 header mask info. */
52774 	uint32_t	t_l2_key_mask[14];
52775 	/* Flow associated tunnel L3 header key info. */
52776 	uint32_t	t_l3_key_data[16];
52777 	/* Flow associated tunnel L3 header mask info. */
52778 	uint32_t	t_l3_key_mask[16];
52779 	/* Flow associated tunnel L4 header key info. */
52780 	uint32_t	t_l4_key_data[2];
52781 	/* Flow associated tunnel L4 header mask info. */
52782 	uint32_t	t_l4_key_mask[2];
52783 	/* Flow associated tunnel header info. */
52784 	uint32_t	tunnel_hdr[2];
52785 	/* Flow associated L2 header key info. */
52786 	uint32_t	l2_key_data[14];
52787 	/* Flow associated L2 header mask info. */
52788 	uint32_t	l2_key_mask[14];
52789 	/* Flow associated L3 header key info. */
52790 	uint32_t	l3_key_data[16];
52791 	/* Flow associated L3 header mask info. */
52792 	uint32_t	l3_key_mask[16];
52793 	/* Flow associated L4 header key info. */
52794 	uint32_t	l4_key_data[2];
52795 	/* Flow associated L4 header mask info. */
52796 	uint32_t	l4_key_mask[2];
52797 } __rte_packed_end;
52798 
52799 /**********************
52800  * hwrm_cfa_flow_info *
52801  **********************/
52802 
52803 
52804 /* hwrm_cfa_flow_info_input (size:256b/32B) */
52805 struct __rte_packed_begin hwrm_cfa_flow_info_input {
52806 	/* The HWRM command request type. */
52807 	uint16_t	req_type;
52808 	/*
52809 	 * The completion ring to send the completion event on. This should
52810 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52811 	 */
52812 	uint16_t	cmpl_ring;
52813 	/*
52814 	 * The sequence ID is used by the driver for tracking multiple
52815 	 * commands. This ID is treated as opaque data by the firmware and
52816 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52817 	 */
52818 	uint16_t	seq_id;
52819 	/*
52820 	 * The target ID of the command:
52821 	 * * 0x0-0xFFF8 - The function ID
52822 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52823 	 * * 0xFFFD - Reserved for user-space HWRM interface
52824 	 * * 0xFFFF - HWRM
52825 	 */
52826 	uint16_t	target_id;
52827 	/*
52828 	 * A physical address pointer pointing to a host buffer that the
52829 	 * command's response data will be written. This can be either a host
52830 	 * physical address (HPA) or a guest physical address (GPA) and must
52831 	 * point to a physically contiguous block of memory.
52832 	 */
52833 	uint64_t	resp_addr;
52834 	/* Flow record index. */
52835 	uint16_t	flow_handle;
52836 	/* Max flow handle */
52837 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_MAX_MASK \
52838 		UINT32_C(0xfff)
52839 	/* CNP flow handle */
52840 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_CNP_CNT \
52841 		UINT32_C(0x1000)
52842 	/* RoCEv1 flow handle */
52843 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_ROCEV1_CNT \
52844 		UINT32_C(0x2000)
52845 	/* NIC flow handle */
52846 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_NIC_TX \
52847 		UINT32_C(0x3000)
52848 	/* RoCEv2 flow handle */
52849 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_ROCEV2_CNT \
52850 		UINT32_C(0x4000)
52851 	/* Direction rx = 1 */
52852 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_DIR_RX \
52853 		UINT32_C(0x8000)
52854 	/* CNP flow handle */
52855 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_CNP_CNT_RX \
52856 		UINT32_C(0x9000)
52857 	/* RoCEv1 flow handle */
52858 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_ROCEV1_CNT_RX \
52859 		UINT32_C(0xa000)
52860 	/* NIC flow handle */
52861 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_NIC_RX \
52862 		UINT32_C(0xb000)
52863 	/* RoCEv2 flow handle */
52864 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_ROCEV2_CNT_RX \
52865 		UINT32_C(0xc000)
52866 	#define HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_LAST \
52867 		HWRM_CFA_FLOW_INFO_INPUT_FLOW_HANDLE_ROCEV2_CNT_RX
52868 	uint8_t	unused_0[6];
52869 	/* This value identifies a set of CFA data structures used for a flow. */
52870 	uint64_t	ext_flow_handle;
52871 } __rte_packed_end;
52872 
52873 /* hwrm_cfa_flow_info_output (size:5632b/704B) */
52874 struct __rte_packed_begin hwrm_cfa_flow_info_output {
52875 	/* The specific error status for the command. */
52876 	uint16_t	error_code;
52877 	/* The HWRM command request type. */
52878 	uint16_t	req_type;
52879 	/* The sequence ID from the original command. */
52880 	uint16_t	seq_id;
52881 	/* The length of the response data in number of bytes. */
52882 	uint16_t	resp_len;
52883 	uint8_t	flags;
52884 	/* When set to 1, indicates the configuration is the TX flow. */
52885 	#define HWRM_CFA_FLOW_INFO_OUTPUT_FLAGS_PATH_TX     UINT32_C(0x1)
52886 	/* When set to 1, indicates the configuration is the RX flow. */
52887 	#define HWRM_CFA_FLOW_INFO_OUTPUT_FLAGS_PATH_RX     UINT32_C(0x2)
52888 	/* profile is 8 b */
52889 	uint8_t	profile;
52890 	/* src_fid is 16 b */
52891 	uint16_t	src_fid;
52892 	/* dst_fid is 16 b */
52893 	uint16_t	dst_fid;
52894 	/* l2_ctxt_id is 16 b */
52895 	uint16_t	l2_ctxt_id;
52896 	/* em_info is 64 b */
52897 	uint64_t	em_info;
52898 	/* tcam_info is 64 b */
52899 	uint64_t	tcam_info;
52900 	/* vfp_tcam_info is 64 b */
52901 	uint64_t	vfp_tcam_info;
52902 	/* ar_id is 16 b */
52903 	uint16_t	ar_id;
52904 	/* flow_handle is 16 b */
52905 	uint16_t	flow_handle;
52906 	/* tunnel_handle is 32 b */
52907 	uint32_t	tunnel_handle;
52908 	/* The flow aging timer for the flow, the unit is 100 milliseconds */
52909 	uint16_t	flow_timer;
52910 	uint8_t	unused_0[6];
52911 	/* Flow associated L2, L3 and L4 headers info. */
52912 	uint32_t	flow_key_data[130];
52913 	/* Flow associated action record info. */
52914 	uint32_t	flow_action_info[30];
52915 	uint8_t	unused_1[7];
52916 	/*
52917 	 * This field is used in Output records to indicate that the output
52918 	 * is completely written to RAM. This field should be read as '1'
52919 	 * to indicate that the output has been completely written.
52920 	 * When writing a command completion or response to an internal
52921 	 * processor, the order of writes has to be such that this field is
52922 	 * written last.
52923 	 */
52924 	uint8_t	valid;
52925 } __rte_packed_end;
52926 
52927 /***********************
52928  * hwrm_cfa_flow_flush *
52929  ***********************/
52930 
52931 
52932 /* hwrm_cfa_flow_flush_input (size:256b/32B) */
52933 struct __rte_packed_begin hwrm_cfa_flow_flush_input {
52934 	/* The HWRM command request type. */
52935 	uint16_t	req_type;
52936 	/*
52937 	 * The completion ring to send the completion event on. This should
52938 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
52939 	 */
52940 	uint16_t	cmpl_ring;
52941 	/*
52942 	 * The sequence ID is used by the driver for tracking multiple
52943 	 * commands. This ID is treated as opaque data by the firmware and
52944 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
52945 	 */
52946 	uint16_t	seq_id;
52947 	/*
52948 	 * The target ID of the command:
52949 	 * * 0x0-0xFFF8 - The function ID
52950 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
52951 	 * * 0xFFFD - Reserved for user-space HWRM interface
52952 	 * * 0xFFFF - HWRM
52953 	 */
52954 	uint16_t	target_id;
52955 	/*
52956 	 * A physical address pointer pointing to a host buffer that the
52957 	 * command's response data will be written. This can be either a host
52958 	 * physical address (HPA) or a guest physical address (GPA) and must
52959 	 * point to a physically contiguous block of memory.
52960 	 */
52961 	uint64_t	resp_addr;
52962 	/* flags is 32 b */
52963 	uint32_t	flags;
52964 	/*
52965 	 * Set to 1 to indicate the page size, page layers, and
52966 	 * flow_handle_table_dma_addr fields are valid. The flow flush
52967 	 * operation should only flush the flows from the flow table
52968 	 * specified. This flag is set to 0 by older driver. For older
52969 	 * firmware, setting this flag has no effect.
52970 	 */
52971 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_TABLE_VALID \
52972 		UINT32_C(0x1)
52973 	/*
52974 	 * Set to 1 to indicate flow flush operation to cleanup all the
52975 	 * flows, meters, CFA context memory tables etc. This flag is set to
52976 	 * 0 by older driver. For older firmware, setting this flag has no
52977 	 * effect.
52978 	 */
52979 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_RESET_ALL \
52980 		UINT32_C(0x2)
52981 	/*
52982 	 * Set to 1 to indicate flow flush operation to cleanup all the
52983 	 * flows by the caller. This flag is set to 0 by older driver. For
52984 	 * older firmware, setting this flag has no effect.
52985 	 */
52986 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_RESET_PORT \
52987 		UINT32_C(0x4)
52988 	/*
52989 	 * Set to 1 to indicate the flow counter IDs are included in the
52990 	 * flow table.
52991 	 */
52992 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_INCL_FC \
52993 		UINT32_C(0x8000000)
52994 	/*
52995 	 * This specifies the size of flow handle entries provided by the
52996 	 * driver in the flow table specified below. Only two flow handle
52997 	 * size enums are defined.
52998 	 */
52999 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_MASK \
53000 		UINT32_C(0xc0000000)
53001 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_SFT \
53002 		30
53003 	/* The flow handle is 16bit */
53004 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_FLOW_HND_16BIT \
53005 		(UINT32_C(0x0) << 30)
53006 	/* The flow handle is 64bit */
53007 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_FLOW_HND_64BIT \
53008 		(UINT32_C(0x1) << 30)
53009 	#define HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_LAST \
53010 		HWRM_CFA_FLOW_FLUSH_INPUT_FLAGS_FLOW_HANDLE_ENTRY_SIZE_FLOW_HND_64BIT
53011 	/* Specify page size of the flow table memory. */
53012 	uint8_t	page_size;
53013 	/* The page size is 4K */
53014 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_4K   UINT32_C(0x0)
53015 	/* The page size is 8K */
53016 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_8K   UINT32_C(0x1)
53017 	/* The page size is 64K */
53018 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_64K  UINT32_C(0x4)
53019 	/* The page size is 256K */
53020 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_256K UINT32_C(0x6)
53021 	/* The page size is 1M */
53022 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_1M   UINT32_C(0x8)
53023 	/* The page size is 2M */
53024 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_2M   UINT32_C(0x9)
53025 	/* The page size is 4M */
53026 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_4M   UINT32_C(0xa)
53027 	/* The page size is 1G */
53028 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_1G   UINT32_C(0x12)
53029 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_LAST \
53030 		HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_SIZE_1G
53031 	/* FLow table memory indirect levels. */
53032 	uint8_t	page_level;
53033 	/* PBL pointer is physical start address. */
53034 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_LEVEL_LVL_0 UINT32_C(0x0)
53035 	/* PBL pointer points to PTE table. */
53036 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_LEVEL_LVL_1 UINT32_C(0x1)
53037 	/*
53038 	 * PBL pointer points to PDE table with each entry pointing to PTE
53039 	 * tables.
53040 	 */
53041 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_LEVEL_LVL_2 UINT32_C(0x2)
53042 	#define HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_LEVEL_LAST \
53043 		HWRM_CFA_FLOW_FLUSH_INPUT_PAGE_LEVEL_LVL_2
53044 	/* number of flows in the flow table */
53045 	uint16_t	num_flows;
53046 	/* Pointer to the PBL, or PDL depending on number of levels */
53047 	uint64_t	page_dir;
53048 } __rte_packed_end;
53049 
53050 /* hwrm_cfa_flow_flush_output (size:128b/16B) */
53051 struct __rte_packed_begin hwrm_cfa_flow_flush_output {
53052 	/* The specific error status for the command. */
53053 	uint16_t	error_code;
53054 	/* The HWRM command request type. */
53055 	uint16_t	req_type;
53056 	/* The sequence ID from the original command. */
53057 	uint16_t	seq_id;
53058 	/* The length of the response data in number of bytes. */
53059 	uint16_t	resp_len;
53060 	uint8_t	unused_0[7];
53061 	/*
53062 	 * This field is used in Output records to indicate that the output
53063 	 * is completely written to RAM. This field should be read as '1'
53064 	 * to indicate that the output has been completely written.
53065 	 * When writing a command completion or response to an internal
53066 	 * processor, the order of writes has to be such that this field is
53067 	 * written last.
53068 	 */
53069 	uint8_t	valid;
53070 } __rte_packed_end;
53071 
53072 /***********************
53073  * hwrm_cfa_flow_stats *
53074  ***********************/
53075 
53076 
53077 /* hwrm_cfa_flow_stats_input (size:640b/80B) */
53078 struct __rte_packed_begin hwrm_cfa_flow_stats_input {
53079 	/* The HWRM command request type. */
53080 	uint16_t	req_type;
53081 	/*
53082 	 * The completion ring to send the completion event on. This should
53083 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53084 	 */
53085 	uint16_t	cmpl_ring;
53086 	/*
53087 	 * The sequence ID is used by the driver for tracking multiple
53088 	 * commands. This ID is treated as opaque data by the firmware and
53089 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53090 	 */
53091 	uint16_t	seq_id;
53092 	/*
53093 	 * The target ID of the command:
53094 	 * * 0x0-0xFFF8 - The function ID
53095 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53096 	 * * 0xFFFD - Reserved for user-space HWRM interface
53097 	 * * 0xFFFF - HWRM
53098 	 */
53099 	uint16_t	target_id;
53100 	/*
53101 	 * A physical address pointer pointing to a host buffer that the
53102 	 * command's response data will be written. This can be either a host
53103 	 * physical address (HPA) or a guest physical address (GPA) and must
53104 	 * point to a physically contiguous block of memory.
53105 	 */
53106 	uint64_t	resp_addr;
53107 	/* Number of valid flows in this command. */
53108 	uint16_t	num_flows;
53109 	/*
53110 	 * Flow handle.
53111 	 * For a listing of applicable flow_handle_0 values, see enumeration
53112 	 * in hwrm_cfa_flow_info_input.
53113 	 */
53114 	uint16_t	flow_handle_0;
53115 	/*
53116 	 * Flow handle.
53117 	 * For a listing of applicable flow_handle_1 values, see enumeration
53118 	 * in hwrm_cfa_flow_info_input.
53119 	 */
53120 	uint16_t	flow_handle_1;
53121 	/*
53122 	 * Flow handle.
53123 	 * For a listing of applicable flow_handle_2 values, see enumeration
53124 	 * in hwrm_cfa_flow_info_input.
53125 	 */
53126 	uint16_t	flow_handle_2;
53127 	/*
53128 	 * Flow handle.
53129 	 * For a listing of applicable flow_handle_3 values, see enumeration
53130 	 * in hwrm_cfa_flow_info_input.
53131 	 */
53132 	uint16_t	flow_handle_3;
53133 	/*
53134 	 * Flow handle.
53135 	 * For a listing of applicable flow_handle_4 values, see enumeration
53136 	 * in hwrm_cfa_flow_info_input.
53137 	 */
53138 	uint16_t	flow_handle_4;
53139 	/*
53140 	 * Flow handle.
53141 	 * For a listing of applicable flow_handle_5 values, see enumeration
53142 	 * in hwrm_cfa_flow_info_input.
53143 	 */
53144 	uint16_t	flow_handle_5;
53145 	/*
53146 	 * Flow handle.
53147 	 * For a listing of applicable flow_handle_6 values, see enumeration
53148 	 * in hwrm_cfa_flow_info_input.
53149 	 */
53150 	uint16_t	flow_handle_6;
53151 	/*
53152 	 * Flow handle.
53153 	 * For a listing of applicable flow_handle_7 values, see enumeration
53154 	 * in hwrm_cfa_flow_info_input.
53155 	 */
53156 	uint16_t	flow_handle_7;
53157 	/*
53158 	 * Flow handle.
53159 	 * For a listing of applicable flow_handle_8 values, see enumeration
53160 	 * in hwrm_cfa_flow_info_input.
53161 	 */
53162 	uint16_t	flow_handle_8;
53163 	/*
53164 	 * Flow handle.
53165 	 * For a listing of applicable flow_handle_9 values, see enumeration
53166 	 * in hwrm_cfa_flow_info_input.
53167 	 */
53168 	uint16_t	flow_handle_9;
53169 	uint8_t	unused_0[2];
53170 	/* Flow ID of a flow. */
53171 	uint32_t	flow_id_0;
53172 	/* Flow ID of a flow. */
53173 	uint32_t	flow_id_1;
53174 	/* Flow ID of a flow. */
53175 	uint32_t	flow_id_2;
53176 	/* Flow ID of a flow. */
53177 	uint32_t	flow_id_3;
53178 	/* Flow ID of a flow. */
53179 	uint32_t	flow_id_4;
53180 	/* Flow ID of a flow. */
53181 	uint32_t	flow_id_5;
53182 	/* Flow ID of a flow. */
53183 	uint32_t	flow_id_6;
53184 	/* Flow ID of a flow. */
53185 	uint32_t	flow_id_7;
53186 	/* Flow ID of a flow. */
53187 	uint32_t	flow_id_8;
53188 	/* Flow ID of a flow. */
53189 	uint32_t	flow_id_9;
53190 } __rte_packed_end;
53191 
53192 /* hwrm_cfa_flow_stats_output (size:1408b/176B) */
53193 struct __rte_packed_begin hwrm_cfa_flow_stats_output {
53194 	/* The specific error status for the command. */
53195 	uint16_t	error_code;
53196 	/* The HWRM command request type. */
53197 	uint16_t	req_type;
53198 	/* The sequence ID from the original command. */
53199 	uint16_t	seq_id;
53200 	/* The length of the response data in number of bytes. */
53201 	uint16_t	resp_len;
53202 	/* packet_0 is 64 b */
53203 	uint64_t	packet_0;
53204 	/* packet_1 is 64 b */
53205 	uint64_t	packet_1;
53206 	/* packet_2 is 64 b */
53207 	uint64_t	packet_2;
53208 	/* packet_3 is 64 b */
53209 	uint64_t	packet_3;
53210 	/* packet_4 is 64 b */
53211 	uint64_t	packet_4;
53212 	/* packet_5 is 64 b */
53213 	uint64_t	packet_5;
53214 	/* packet_6 is 64 b */
53215 	uint64_t	packet_6;
53216 	/* packet_7 is 64 b */
53217 	uint64_t	packet_7;
53218 	/* packet_8 is 64 b */
53219 	uint64_t	packet_8;
53220 	/* packet_9 is 64 b */
53221 	uint64_t	packet_9;
53222 	/* byte_0 is 64 b */
53223 	uint64_t	byte_0;
53224 	/* byte_1 is 64 b */
53225 	uint64_t	byte_1;
53226 	/* byte_2 is 64 b */
53227 	uint64_t	byte_2;
53228 	/* byte_3 is 64 b */
53229 	uint64_t	byte_3;
53230 	/* byte_4 is 64 b */
53231 	uint64_t	byte_4;
53232 	/* byte_5 is 64 b */
53233 	uint64_t	byte_5;
53234 	/* byte_6 is 64 b */
53235 	uint64_t	byte_6;
53236 	/* byte_7 is 64 b */
53237 	uint64_t	byte_7;
53238 	/* byte_8 is 64 b */
53239 	uint64_t	byte_8;
53240 	/* byte_9 is 64 b */
53241 	uint64_t	byte_9;
53242 	/*
53243 	 * If a flow has been hit, the bit representing the flow will be 1.
53244 	 * Likewise, if a flow has not, the bit representing the flow
53245 	 * will be 0. Mapping will match flow numbers where bitX is for flowX
53246 	 * (ex: bit 0 is flow0). This only applies for NIC flows. Upon
53247 	 * reading of the flow, the bit will be cleared for the flow and only
53248 	 * set again when traffic is received by the flow.
53249 	 */
53250 	uint16_t	flow_hits;
53251 	uint8_t	unused_0[5];
53252 	/*
53253 	 * This field is used in Output records to indicate that the output
53254 	 * is completely written to RAM. This field should be read as '1'
53255 	 * to indicate that the output has been completely written.
53256 	 * When writing a command completion or response to an internal
53257 	 * processor, the order of writes has to be such that this field is
53258 	 * written last.
53259 	 */
53260 	uint8_t	valid;
53261 } __rte_packed_end;
53262 
53263 /***********************************
53264  * hwrm_cfa_flow_aging_timer_reset *
53265  ***********************************/
53266 
53267 
53268 /* hwrm_cfa_flow_aging_timer_reset_input (size:256b/32B) */
53269 struct __rte_packed_begin hwrm_cfa_flow_aging_timer_reset_input {
53270 	/* The HWRM command request type. */
53271 	uint16_t	req_type;
53272 	/*
53273 	 * The completion ring to send the completion event on. This should
53274 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53275 	 */
53276 	uint16_t	cmpl_ring;
53277 	/*
53278 	 * The sequence ID is used by the driver for tracking multiple
53279 	 * commands. This ID is treated as opaque data by the firmware and
53280 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53281 	 */
53282 	uint16_t	seq_id;
53283 	/*
53284 	 * The target ID of the command:
53285 	 * * 0x0-0xFFF8 - The function ID
53286 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53287 	 * * 0xFFFD - Reserved for user-space HWRM interface
53288 	 * * 0xFFFF - HWRM
53289 	 */
53290 	uint16_t	target_id;
53291 	/*
53292 	 * A physical address pointer pointing to a host buffer that the
53293 	 * command's response data will be written. This can be either a host
53294 	 * physical address (HPA) or a guest physical address (GPA) and must
53295 	 * point to a physically contiguous block of memory.
53296 	 */
53297 	uint64_t	resp_addr;
53298 	/* Flow record index. */
53299 	uint16_t	flow_handle;
53300 	uint8_t	unused_0[2];
53301 	/*
53302 	 * New flow timer value for the flow specified in the ext_flow_handle.
53303 	 * The flow timer unit is 100ms.
53304 	 */
53305 	uint32_t	flow_timer;
53306 	/* This value identifies a set of CFA data structures used for a flow. */
53307 	uint64_t	ext_flow_handle;
53308 } __rte_packed_end;
53309 
53310 /* hwrm_cfa_flow_aging_timer_reset_output (size:128b/16B) */
53311 struct __rte_packed_begin hwrm_cfa_flow_aging_timer_reset_output {
53312 	/* The specific error status for the command. */
53313 	uint16_t	error_code;
53314 	/* The HWRM command request type. */
53315 	uint16_t	req_type;
53316 	/* The sequence ID from the original command. */
53317 	uint16_t	seq_id;
53318 	/* The length of the response data in number of bytes. */
53319 	uint16_t	resp_len;
53320 	uint8_t	unused_0[7];
53321 	/*
53322 	 * This field is used in Output records to indicate that the output
53323 	 * is completely written to RAM. This field should be read as '1'
53324 	 * to indicate that the output has been completely written.
53325 	 * When writing a command completion or response to an internal
53326 	 * processor, the order of writes has to be such that this field is
53327 	 * written last.
53328 	 */
53329 	uint8_t	valid;
53330 } __rte_packed_end;
53331 
53332 /***************************
53333  * hwrm_cfa_flow_aging_cfg *
53334  ***************************/
53335 
53336 
53337 /* hwrm_cfa_flow_aging_cfg_input (size:384b/48B) */
53338 struct __rte_packed_begin hwrm_cfa_flow_aging_cfg_input {
53339 	/* The HWRM command request type. */
53340 	uint16_t	req_type;
53341 	/*
53342 	 * The completion ring to send the completion event on. This should
53343 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53344 	 */
53345 	uint16_t	cmpl_ring;
53346 	/*
53347 	 * The sequence ID is used by the driver for tracking multiple
53348 	 * commands. This ID is treated as opaque data by the firmware and
53349 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53350 	 */
53351 	uint16_t	seq_id;
53352 	/*
53353 	 * The target ID of the command:
53354 	 * * 0x0-0xFFF8 - The function ID
53355 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53356 	 * * 0xFFFD - Reserved for user-space HWRM interface
53357 	 * * 0xFFFF - HWRM
53358 	 */
53359 	uint16_t	target_id;
53360 	/*
53361 	 * A physical address pointer pointing to a host buffer that the
53362 	 * command's response data will be written. This can be either a host
53363 	 * physical address (HPA) or a guest physical address (GPA) and must
53364 	 * point to a physically contiguous block of memory.
53365 	 */
53366 	uint64_t	resp_addr;
53367 	/* The bit field to enable per flow aging configuration. */
53368 	uint16_t	enables;
53369 	/*
53370 	 * This bit must be '1' for the tcp flow timer field to be
53371 	 * configured
53372 	 */
53373 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_TCP_FLOW_TIMER \
53374 		UINT32_C(0x1)
53375 	/*
53376 	 * This bit must be '1' for the tcp finish timer field to be
53377 	 * configured
53378 	 */
53379 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_TCP_FIN_TIMER \
53380 		UINT32_C(0x2)
53381 	/*
53382 	 * This bit must be '1' for the udp flow timer field to be
53383 	 * configured
53384 	 */
53385 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_UDP_FLOW_TIMER \
53386 		UINT32_C(0x4)
53387 	/*
53388 	 * This bit must be '1' for the eem dma interval field to be
53389 	 * configured
53390 	 */
53391 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_EEM_DMA_INTERVAL \
53392 		UINT32_C(0x8)
53393 	/*
53394 	 * This bit must be '1' for the eem notice interval field to be
53395 	 * configured
53396 	 */
53397 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_EEM_NOTICE_INTERVAL \
53398 		UINT32_C(0x10)
53399 	/*
53400 	 * This bit must be '1' for the eem context memory maximum entries
53401 	 * field to be configured
53402 	 */
53403 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_EEM_CTX_MAX_ENTRIES \
53404 		UINT32_C(0x20)
53405 	/*
53406 	 * This bit must be '1' for the eem context memory ID field to be
53407 	 * configured
53408 	 */
53409 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_EEM_CTX_ID \
53410 		UINT32_C(0x40)
53411 	/*
53412 	 * This bit must be '1' for the eem context memory type field to be
53413 	 * configured
53414 	 */
53415 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_ENABLES_EEM_CTX_MEM_TYPE \
53416 		UINT32_C(0x80)
53417 	uint8_t	flags;
53418 	/* Enumeration denoting the RX, TX type of the resource. */
53419 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_PATH       UINT32_C(0x1)
53420 	/* tx path */
53421 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_PATH_TX      UINT32_C(0x0)
53422 	/* rx path */
53423 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_PATH_RX      UINT32_C(0x1)
53424 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_PATH_LAST \
53425 		HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_PATH_RX
53426 	/*
53427 	 * Enumeration denoting the enable, disable eem flow aging
53428 	 * configuration.
53429 	 */
53430 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_EEM        UINT32_C(0x2)
53431 	/* tx path */
53432 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_EEM_DISABLE \
53433 		(UINT32_C(0x0) << 1)
53434 	/* rx path */
53435 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_EEM_ENABLE \
53436 		(UINT32_C(0x1) << 1)
53437 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_EEM_LAST \
53438 		HWRM_CFA_FLOW_AGING_CFG_INPUT_FLAGS_EEM_ENABLE
53439 	uint8_t	unused_0;
53440 	/*
53441 	 * The flow aging timer for all TCP flows, the unit is 100
53442 	 * milliseconds.
53443 	 */
53444 	uint32_t	tcp_flow_timer;
53445 	/*
53446 	 * The TCP finished timer for all TCP flows, the unit is 100
53447 	 * milliseconds.
53448 	 */
53449 	uint32_t	tcp_fin_timer;
53450 	/*
53451 	 * The flow aging timer for all UDP flows, the unit is 100
53452 	 * milliseconds.
53453 	 */
53454 	uint32_t	udp_flow_timer;
53455 	/*
53456 	 * The interval to dma eem ejection data to host memory, the unit is
53457 	 * milliseconds.
53458 	 */
53459 	uint16_t	eem_dma_interval;
53460 	/*
53461 	 * The interval to notify driver to read the eem ejection data, the
53462 	 * unit is milliseconds.
53463 	 */
53464 	uint16_t	eem_notice_interval;
53465 	/* The maximum entries number in the eem context memory. */
53466 	uint32_t	eem_ctx_max_entries;
53467 	/* The context memory ID for eem flow aging. */
53468 	uint16_t	eem_ctx_id;
53469 	uint16_t	eem_ctx_mem_type;
53470 	/*
53471 	 * The content of context memory is eem ejection data, the size of
53472 	 * each entry is 4 bytes.
53473 	 */
53474 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_EEM_CTX_MEM_TYPE_EJECTION_DATA \
53475 		UINT32_C(0x0)
53476 	#define HWRM_CFA_FLOW_AGING_CFG_INPUT_EEM_CTX_MEM_TYPE_LAST \
53477 		HWRM_CFA_FLOW_AGING_CFG_INPUT_EEM_CTX_MEM_TYPE_EJECTION_DATA
53478 	uint8_t	unused_1[4];
53479 } __rte_packed_end;
53480 
53481 /* hwrm_cfa_flow_aging_cfg_output (size:128b/16B) */
53482 struct __rte_packed_begin hwrm_cfa_flow_aging_cfg_output {
53483 	/* The specific error status for the command. */
53484 	uint16_t	error_code;
53485 	/* The HWRM command request type. */
53486 	uint16_t	req_type;
53487 	/* The sequence ID from the original command. */
53488 	uint16_t	seq_id;
53489 	/* The length of the response data in number of bytes. */
53490 	uint16_t	resp_len;
53491 	uint8_t	unused_0[7];
53492 	/*
53493 	 * This field is used in Output records to indicate that the output
53494 	 * is completely written to RAM. This field should be read as '1'
53495 	 * to indicate that the output has been completely written.
53496 	 * When writing a command completion or response to an internal
53497 	 * processor, the order of writes has to be such that this field is
53498 	 * written last.
53499 	 */
53500 	uint8_t	valid;
53501 } __rte_packed_end;
53502 
53503 /****************************
53504  * hwrm_cfa_flow_aging_qcfg *
53505  ****************************/
53506 
53507 
53508 /* hwrm_cfa_flow_aging_qcfg_input (size:192b/24B) */
53509 struct __rte_packed_begin hwrm_cfa_flow_aging_qcfg_input {
53510 	/* The HWRM command request type. */
53511 	uint16_t	req_type;
53512 	/*
53513 	 * The completion ring to send the completion event on. This should
53514 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53515 	 */
53516 	uint16_t	cmpl_ring;
53517 	/*
53518 	 * The sequence ID is used by the driver for tracking multiple
53519 	 * commands. This ID is treated as opaque data by the firmware and
53520 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53521 	 */
53522 	uint16_t	seq_id;
53523 	/*
53524 	 * The target ID of the command:
53525 	 * * 0x0-0xFFF8 - The function ID
53526 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53527 	 * * 0xFFFD - Reserved for user-space HWRM interface
53528 	 * * 0xFFFF - HWRM
53529 	 */
53530 	uint16_t	target_id;
53531 	/*
53532 	 * A physical address pointer pointing to a host buffer that the
53533 	 * command's response data will be written. This can be either a host
53534 	 * physical address (HPA) or a guest physical address (GPA) and must
53535 	 * point to a physically contiguous block of memory.
53536 	 */
53537 	uint64_t	resp_addr;
53538 	/*
53539 	 * The direction for the flow aging configuration, 1 is rx path, 2 is
53540 	 * tx path.
53541 	 */
53542 	uint8_t	flags;
53543 	/* Enumeration denoting the RX, TX type of the resource. */
53544 	#define HWRM_CFA_FLOW_AGING_QCFG_INPUT_FLAGS_PATH     UINT32_C(0x1)
53545 	/* tx path */
53546 	#define HWRM_CFA_FLOW_AGING_QCFG_INPUT_FLAGS_PATH_TX    UINT32_C(0x0)
53547 	/* rx path */
53548 	#define HWRM_CFA_FLOW_AGING_QCFG_INPUT_FLAGS_PATH_RX    UINT32_C(0x1)
53549 	#define HWRM_CFA_FLOW_AGING_QCFG_INPUT_FLAGS_PATH_LAST \
53550 		HWRM_CFA_FLOW_AGING_QCFG_INPUT_FLAGS_PATH_RX
53551 	uint8_t	unused_0[7];
53552 } __rte_packed_end;
53553 
53554 /* hwrm_cfa_flow_aging_qcfg_output (size:320b/40B) */
53555 struct __rte_packed_begin hwrm_cfa_flow_aging_qcfg_output {
53556 	/* The specific error status for the command. */
53557 	uint16_t	error_code;
53558 	/* The HWRM command request type. */
53559 	uint16_t	req_type;
53560 	/* The sequence ID from the original command. */
53561 	uint16_t	seq_id;
53562 	/* The length of the response data in number of bytes. */
53563 	uint16_t	resp_len;
53564 	/*
53565 	 * The current flow aging timer for all TCP flows, the unit is 100
53566 	 * millisecond.
53567 	 */
53568 	uint32_t	tcp_flow_timer;
53569 	/*
53570 	 * The current TCP finished timer for all TCP flows, the unit is 100
53571 	 * millisecond.
53572 	 */
53573 	uint32_t	tcp_fin_timer;
53574 	/*
53575 	 * The current flow aging timer for all UDP flows, the unit is 100
53576 	 * millisecond.
53577 	 */
53578 	uint32_t	udp_flow_timer;
53579 	/*
53580 	 * The interval to dma eem ejection data to host memory, the unit is
53581 	 * milliseconds.
53582 	 */
53583 	uint16_t	eem_dma_interval;
53584 	/*
53585 	 * The interval to notify driver to read the eem ejection data, the
53586 	 * unit is milliseconds.
53587 	 */
53588 	uint16_t	eem_notice_interval;
53589 	/* The maximum entries number in the eem context memory. */
53590 	uint32_t	eem_ctx_max_entries;
53591 	/* The context memory ID for eem flow aging. */
53592 	uint16_t	eem_ctx_id;
53593 	/* The context memory type for eem flow aging. */
53594 	uint16_t	eem_ctx_mem_type;
53595 	uint8_t	unused_0[7];
53596 	/*
53597 	 * This field is used in Output records to indicate that the output
53598 	 * is completely written to RAM. This field should be read as '1'
53599 	 * to indicate that the output has been completely written.
53600 	 * When writing a command completion or response to an internal
53601 	 * processor, the order of writes has to be such that this field is
53602 	 * written last.
53603 	 */
53604 	uint8_t	valid;
53605 } __rte_packed_end;
53606 
53607 /*****************************
53608  * hwrm_cfa_flow_aging_qcaps *
53609  *****************************/
53610 
53611 
53612 /* hwrm_cfa_flow_aging_qcaps_input (size:192b/24B) */
53613 struct __rte_packed_begin hwrm_cfa_flow_aging_qcaps_input {
53614 	/* The HWRM command request type. */
53615 	uint16_t	req_type;
53616 	/*
53617 	 * The completion ring to send the completion event on. This should
53618 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53619 	 */
53620 	uint16_t	cmpl_ring;
53621 	/*
53622 	 * The sequence ID is used by the driver for tracking multiple
53623 	 * commands. This ID is treated as opaque data by the firmware and
53624 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53625 	 */
53626 	uint16_t	seq_id;
53627 	/*
53628 	 * The target ID of the command:
53629 	 * * 0x0-0xFFF8 - The function ID
53630 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53631 	 * * 0xFFFD - Reserved for user-space HWRM interface
53632 	 * * 0xFFFF - HWRM
53633 	 */
53634 	uint16_t	target_id;
53635 	/*
53636 	 * A physical address pointer pointing to a host buffer that the
53637 	 * command's response data will be written. This can be either a host
53638 	 * physical address (HPA) or a guest physical address (GPA) and must
53639 	 * point to a physically contiguous block of memory.
53640 	 */
53641 	uint64_t	resp_addr;
53642 	/*
53643 	 * The direction for the flow aging configuration, 1 is rx path, 2 is
53644 	 * tx path.
53645 	 */
53646 	uint8_t	flags;
53647 	/* Enumeration denoting the RX, TX type of the resource. */
53648 	#define HWRM_CFA_FLOW_AGING_QCAPS_INPUT_FLAGS_PATH     UINT32_C(0x1)
53649 	/* tx path */
53650 	#define HWRM_CFA_FLOW_AGING_QCAPS_INPUT_FLAGS_PATH_TX    UINT32_C(0x0)
53651 	/* rx path */
53652 	#define HWRM_CFA_FLOW_AGING_QCAPS_INPUT_FLAGS_PATH_RX    UINT32_C(0x1)
53653 	#define HWRM_CFA_FLOW_AGING_QCAPS_INPUT_FLAGS_PATH_LAST \
53654 		HWRM_CFA_FLOW_AGING_QCAPS_INPUT_FLAGS_PATH_RX
53655 	uint8_t	unused_0[7];
53656 } __rte_packed_end;
53657 
53658 /* hwrm_cfa_flow_aging_qcaps_output (size:256b/32B) */
53659 struct __rte_packed_begin hwrm_cfa_flow_aging_qcaps_output {
53660 	/* The specific error status for the command. */
53661 	uint16_t	error_code;
53662 	/* The HWRM command request type. */
53663 	uint16_t	req_type;
53664 	/* The sequence ID from the original command. */
53665 	uint16_t	seq_id;
53666 	/* The length of the response data in number of bytes. */
53667 	uint16_t	resp_len;
53668 	/*
53669 	 * The maximum flow aging timer for all TCP flows, the unit is 100
53670 	 * millisecond.
53671 	 */
53672 	uint32_t	max_tcp_flow_timer;
53673 	/*
53674 	 * The maximum TCP finished timer for all TCP flows, the unit is 100
53675 	 * millisecond.
53676 	 */
53677 	uint32_t	max_tcp_fin_timer;
53678 	/*
53679 	 * The maximum flow aging timer for all UDP flows, the unit is 100
53680 	 * millisecond.
53681 	 */
53682 	uint32_t	max_udp_flow_timer;
53683 	/* The maximum aging flows that HW can support. */
53684 	uint32_t	max_aging_flows;
53685 	uint8_t	unused_0[7];
53686 	/*
53687 	 * This field is used in Output records to indicate that the output
53688 	 * is completely written to RAM. This field should be read as '1'
53689 	 * to indicate that the output has been completely written.
53690 	 * When writing a command completion or response to an internal
53691 	 * processor, the order of writes has to be such that this field is
53692 	 * written last.
53693 	 */
53694 	uint8_t	valid;
53695 } __rte_packed_end;
53696 
53697 /**********************************
53698  * hwrm_cfa_tcp_flag_process_qcfg *
53699  **********************************/
53700 
53701 
53702 /* hwrm_cfa_tcp_flag_process_qcfg_input (size:128b/16B) */
53703 struct __rte_packed_begin hwrm_cfa_tcp_flag_process_qcfg_input {
53704 	/* The HWRM command request type. */
53705 	uint16_t	req_type;
53706 	/*
53707 	 * The completion ring to send the completion event on. This should
53708 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53709 	 */
53710 	uint16_t	cmpl_ring;
53711 	/*
53712 	 * The sequence ID is used by the driver for tracking multiple
53713 	 * commands. This ID is treated as opaque data by the firmware and
53714 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53715 	 */
53716 	uint16_t	seq_id;
53717 	/*
53718 	 * The target ID of the command:
53719 	 * * 0x0-0xFFF8 - The function ID
53720 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53721 	 * * 0xFFFD - Reserved for user-space HWRM interface
53722 	 * * 0xFFFF - HWRM
53723 	 */
53724 	uint16_t	target_id;
53725 	/*
53726 	 * A physical address pointer pointing to a host buffer that the
53727 	 * command's response data will be written. This can be either a host
53728 	 * physical address (HPA) or a guest physical address (GPA) and must
53729 	 * point to a physically contiguous block of memory.
53730 	 */
53731 	uint64_t	resp_addr;
53732 } __rte_packed_end;
53733 
53734 /* hwrm_cfa_tcp_flag_process_qcfg_output (size:192b/24B) */
53735 struct __rte_packed_begin hwrm_cfa_tcp_flag_process_qcfg_output {
53736 	/* The specific error status for the command. */
53737 	uint16_t	error_code;
53738 	/* The HWRM command request type. */
53739 	uint16_t	req_type;
53740 	/* The sequence ID from the original command. */
53741 	uint16_t	seq_id;
53742 	/* The length of the response data in number of bytes. */
53743 	uint16_t	resp_len;
53744 	/* The port 0 RX mirror action record ID. */
53745 	uint16_t	rx_ar_id_port0;
53746 	/* The port 1 RX mirror action record ID. */
53747 	uint16_t	rx_ar_id_port1;
53748 	/*
53749 	 * The port 0 RX action record ID for TX TCP flag packets from
53750 	 * loopback path.
53751 	 */
53752 	uint16_t	tx_ar_id_port0;
53753 	/*
53754 	 * The port 1 RX action record ID for TX TCP flag packets from
53755 	 * loopback path.
53756 	 */
53757 	uint16_t	tx_ar_id_port1;
53758 	uint8_t	unused_0[7];
53759 	/*
53760 	 * This field is used in Output records to indicate that the output
53761 	 * is completely written to RAM. This field should be read as '1'
53762 	 * to indicate that the output has been completely written.
53763 	 * When writing a command completion or response to an internal
53764 	 * processor, the order of writes has to be such that this field is
53765 	 * written last.
53766 	 */
53767 	uint8_t	valid;
53768 } __rte_packed_end;
53769 
53770 /**************************
53771  * hwrm_cfa_vf_pair_alloc *
53772  **************************/
53773 
53774 
53775 /* hwrm_cfa_vf_pair_alloc_input (size:448b/56B) */
53776 struct __rte_packed_begin hwrm_cfa_vf_pair_alloc_input {
53777 	/* The HWRM command request type. */
53778 	uint16_t	req_type;
53779 	/*
53780 	 * The completion ring to send the completion event on. This should
53781 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53782 	 */
53783 	uint16_t	cmpl_ring;
53784 	/*
53785 	 * The sequence ID is used by the driver for tracking multiple
53786 	 * commands. This ID is treated as opaque data by the firmware and
53787 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53788 	 */
53789 	uint16_t	seq_id;
53790 	/*
53791 	 * The target ID of the command:
53792 	 * * 0x0-0xFFF8 - The function ID
53793 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53794 	 * * 0xFFFD - Reserved for user-space HWRM interface
53795 	 * * 0xFFFF - HWRM
53796 	 */
53797 	uint16_t	target_id;
53798 	/*
53799 	 * A physical address pointer pointing to a host buffer that the
53800 	 * command's response data will be written. This can be either a host
53801 	 * physical address (HPA) or a guest physical address (GPA) and must
53802 	 * point to a physically contiguous block of memory.
53803 	 */
53804 	uint64_t	resp_addr;
53805 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
53806 	uint16_t	vf_a_id;
53807 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
53808 	uint16_t	vf_b_id;
53809 	uint8_t	unused_0[4];
53810 	/* VF Pair name (32 byte string). */
53811 	char	pair_name[32];
53812 } __rte_packed_end;
53813 
53814 /* hwrm_cfa_vf_pair_alloc_output (size:128b/16B) */
53815 struct __rte_packed_begin hwrm_cfa_vf_pair_alloc_output {
53816 	/* The specific error status for the command. */
53817 	uint16_t	error_code;
53818 	/* The HWRM command request type. */
53819 	uint16_t	req_type;
53820 	/* The sequence ID from the original command. */
53821 	uint16_t	seq_id;
53822 	/* The length of the response data in number of bytes. */
53823 	uint16_t	resp_len;
53824 	uint8_t	unused_0[7];
53825 	/*
53826 	 * This field is used in Output records to indicate that the output
53827 	 * is completely written to RAM. This field should be read as '1'
53828 	 * to indicate that the output has been completely written.
53829 	 * When writing a command completion or response to an internal
53830 	 * processor, the order of writes has to be such that this field is
53831 	 * written last.
53832 	 */
53833 	uint8_t	valid;
53834 } __rte_packed_end;
53835 
53836 /*************************
53837  * hwrm_cfa_vf_pair_free *
53838  *************************/
53839 
53840 
53841 /* hwrm_cfa_vf_pair_free_input (size:384b/48B) */
53842 struct __rte_packed_begin hwrm_cfa_vf_pair_free_input {
53843 	/* The HWRM command request type. */
53844 	uint16_t	req_type;
53845 	/*
53846 	 * The completion ring to send the completion event on. This should
53847 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53848 	 */
53849 	uint16_t	cmpl_ring;
53850 	/*
53851 	 * The sequence ID is used by the driver for tracking multiple
53852 	 * commands. This ID is treated as opaque data by the firmware and
53853 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53854 	 */
53855 	uint16_t	seq_id;
53856 	/*
53857 	 * The target ID of the command:
53858 	 * * 0x0-0xFFF8 - The function ID
53859 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53860 	 * * 0xFFFD - Reserved for user-space HWRM interface
53861 	 * * 0xFFFF - HWRM
53862 	 */
53863 	uint16_t	target_id;
53864 	/*
53865 	 * A physical address pointer pointing to a host buffer that the
53866 	 * command's response data will be written. This can be either a host
53867 	 * physical address (HPA) or a guest physical address (GPA) and must
53868 	 * point to a physically contiguous block of memory.
53869 	 */
53870 	uint64_t	resp_addr;
53871 	/* VF Pair name (32 byte string). */
53872 	char	pair_name[32];
53873 } __rte_packed_end;
53874 
53875 /* hwrm_cfa_vf_pair_free_output (size:128b/16B) */
53876 struct __rte_packed_begin hwrm_cfa_vf_pair_free_output {
53877 	/* The specific error status for the command. */
53878 	uint16_t	error_code;
53879 	/* The HWRM command request type. */
53880 	uint16_t	req_type;
53881 	/* The sequence ID from the original command. */
53882 	uint16_t	seq_id;
53883 	/* The length of the response data in number of bytes. */
53884 	uint16_t	resp_len;
53885 	uint8_t	unused_0[7];
53886 	/*
53887 	 * This field is used in Output records to indicate that the output
53888 	 * is completely written to RAM. This field should be read as '1'
53889 	 * to indicate that the output has been completely written.
53890 	 * When writing a command completion or response to an internal
53891 	 * processor, the order of writes has to be such that this field is
53892 	 * written last.
53893 	 */
53894 	uint8_t	valid;
53895 } __rte_packed_end;
53896 
53897 /*************************
53898  * hwrm_cfa_vf_pair_info *
53899  *************************/
53900 
53901 
53902 /* hwrm_cfa_vf_pair_info_input (size:448b/56B) */
53903 struct __rte_packed_begin hwrm_cfa_vf_pair_info_input {
53904 	/* The HWRM command request type. */
53905 	uint16_t	req_type;
53906 	/*
53907 	 * The completion ring to send the completion event on. This should
53908 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53909 	 */
53910 	uint16_t	cmpl_ring;
53911 	/*
53912 	 * The sequence ID is used by the driver for tracking multiple
53913 	 * commands. This ID is treated as opaque data by the firmware and
53914 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
53915 	 */
53916 	uint16_t	seq_id;
53917 	/*
53918 	 * The target ID of the command:
53919 	 * * 0x0-0xFFF8 - The function ID
53920 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
53921 	 * * 0xFFFD - Reserved for user-space HWRM interface
53922 	 * * 0xFFFF - HWRM
53923 	 */
53924 	uint16_t	target_id;
53925 	/*
53926 	 * A physical address pointer pointing to a host buffer that the
53927 	 * command's response data will be written. This can be either a host
53928 	 * physical address (HPA) or a guest physical address (GPA) and must
53929 	 * point to a physically contiguous block of memory.
53930 	 */
53931 	uint64_t	resp_addr;
53932 	uint32_t	flags;
53933 	/* If this flag is set, lookup by name else lookup by index. */
53934 	#define HWRM_CFA_VF_PAIR_INFO_INPUT_FLAGS_LOOKUP_TYPE     UINT32_C(0x1)
53935 	/* vf pair table index. */
53936 	uint16_t	vf_pair_index;
53937 	uint8_t	unused_0[2];
53938 	/* VF Pair name (32 byte string). */
53939 	char	vf_pair_name[32];
53940 } __rte_packed_end;
53941 
53942 /* hwrm_cfa_vf_pair_info_output (size:512b/64B) */
53943 struct __rte_packed_begin hwrm_cfa_vf_pair_info_output {
53944 	/* The specific error status for the command. */
53945 	uint16_t	error_code;
53946 	/* The HWRM command request type. */
53947 	uint16_t	req_type;
53948 	/* The sequence ID from the original command. */
53949 	uint16_t	seq_id;
53950 	/* The length of the response data in number of bytes. */
53951 	uint16_t	resp_len;
53952 	/* vf pair table index. */
53953 	uint16_t	next_vf_pair_index;
53954 	/* vf pair member a's vf_fid. */
53955 	uint16_t	vf_a_fid;
53956 	/* vf pair member a's Linux logical VF number. */
53957 	uint16_t	vf_a_index;
53958 	/* vf pair member b's vf_fid. */
53959 	uint16_t	vf_b_fid;
53960 	/* vf pair member a's Linux logical VF number. */
53961 	uint16_t	vf_b_index;
53962 	/* vf pair state. */
53963 	uint8_t	pair_state;
53964 	/* Pair has been allocated */
53965 	#define HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_ALLOCATED UINT32_C(0x1)
53966 	/* Both pair members are active */
53967 	#define HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE    UINT32_C(0x2)
53968 	#define HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_LAST \
53969 		HWRM_CFA_VF_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE
53970 	uint8_t	unused_0[5];
53971 	/* VF Pair name (32 byte string). */
53972 	char	pair_name[32];
53973 	uint8_t	unused_1[7];
53974 	/*
53975 	 * This field is used in Output records to indicate that the output
53976 	 * is completely written to RAM. This field should be read as '1'
53977 	 * to indicate that the output has been completely written.
53978 	 * When writing a command completion or response to an internal
53979 	 * processor, the order of writes has to be such that this field is
53980 	 * written last.
53981 	 */
53982 	uint8_t	valid;
53983 } __rte_packed_end;
53984 
53985 /***********************
53986  * hwrm_cfa_pair_alloc *
53987  ***********************/
53988 
53989 
53990 /* hwrm_cfa_pair_alloc_input (size:576b/72B) */
53991 struct __rte_packed_begin hwrm_cfa_pair_alloc_input {
53992 	/* The HWRM command request type. */
53993 	uint16_t	req_type;
53994 	/*
53995 	 * The completion ring to send the completion event on. This should
53996 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
53997 	 */
53998 	uint16_t	cmpl_ring;
53999 	/*
54000 	 * The sequence ID is used by the driver for tracking multiple
54001 	 * commands. This ID is treated as opaque data by the firmware and
54002 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54003 	 */
54004 	uint16_t	seq_id;
54005 	/*
54006 	 * The target ID of the command:
54007 	 * * 0x0-0xFFF8 - The function ID
54008 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54009 	 * * 0xFFFD - Reserved for user-space HWRM interface
54010 	 * * 0xFFFF - HWRM
54011 	 */
54012 	uint16_t	target_id;
54013 	/*
54014 	 * A physical address pointer pointing to a host buffer that the
54015 	 * command's response data will be written. This can be either a host
54016 	 * physical address (HPA) or a guest physical address (GPA) and must
54017 	 * point to a physically contiguous block of memory.
54018 	 */
54019 	uint64_t	resp_addr;
54020 	/*
54021 	 * Pair mode (0-vf2fn, 1-rep2fn, 2-rep2rep, 3-proxy, 4-pfpair,
54022 	 *            5-rep2fn_mod, 6-rep2fn_modall, 7-rep2fn_truflow).
54023 	 */
54024 	uint16_t	pair_mode;
54025 	/*
54026 	 * Pair between VF on local host with PF or VF on specified host.
54027 	 * (deprecated)
54028 	 */
54029 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_VF2FN \
54030 		UINT32_C(0x0)
54031 	/*
54032 	 * Pair between REP on local host with PF or VF on specified host.
54033 	 * (deprecated)
54034 	 */
54035 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN \
54036 		UINT32_C(0x1)
54037 	/*
54038 	 * Pair between REP on local host with REP on specified host.
54039 	 * (deprecated)
54040 	 */
54041 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2REP \
54042 		UINT32_C(0x2)
54043 	/* Pair for the proxy interface. (deprecated) */
54044 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_PROXY \
54045 		UINT32_C(0x3)
54046 	/* Pair for the PF interface. (deprecated) */
54047 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_PFPAIR \
54048 		UINT32_C(0x4)
54049 	/* Modify existing rep2fn pair and move pair to new PF. (deprecated) */
54050 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_MOD \
54051 		UINT32_C(0x5)
54052 	/*
54053 	 * Modify existing rep2fn pairs paired with same PF and move pairs
54054 	 * to new PF. (deprecated)
54055 	 */
54056 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_MODALL \
54057 		UINT32_C(0x6)
54058 	/*
54059 	 * Truflow pair between REP on local host with PF or VF on specified
54060 	 * host.
54061 	 */
54062 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_TRUFLOW \
54063 		UINT32_C(0x7)
54064 	#define HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_LAST \
54065 		HWRM_CFA_PAIR_ALLOC_INPUT_PAIR_MODE_REP2FN_TRUFLOW
54066 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
54067 	uint16_t	vf_a_id;
54068 	/* Logical Host (0xff-local host). */
54069 	uint8_t	host_b_id;
54070 	/* Logical PF (0xff-PF for command channel). */
54071 	uint8_t	pf_b_id;
54072 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
54073 	uint16_t	vf_b_id;
54074 	/* Loopback port (0xff-internal loopback), valid for mode-3. */
54075 	uint8_t	port_id;
54076 	/* Priority used for encap of loopback packets valid for mode-3. */
54077 	uint8_t	pri;
54078 	/* New PF for rep2fn modify, valid for mode 5. */
54079 	uint16_t	new_pf_fid;
54080 	uint32_t	enables;
54081 	/*
54082 	 * This bit must be '1' for the q_ab field to be
54083 	 * configured.
54084 	 */
54085 	#define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_Q_AB_VALID      UINT32_C(0x1)
54086 	/*
54087 	 * This bit must be '1' for the q_ba field to be
54088 	 * configured.
54089 	 */
54090 	#define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_Q_BA_VALID      UINT32_C(0x2)
54091 	/*
54092 	 * This bit must be '1' for the fc_ab field to be
54093 	 * configured.
54094 	 */
54095 	#define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_FC_AB_VALID     UINT32_C(0x4)
54096 	/*
54097 	 * This bit must be '1' for the fc_ba field to be
54098 	 * configured.
54099 	 */
54100 	#define HWRM_CFA_PAIR_ALLOC_INPUT_ENABLES_FC_BA_VALID     UINT32_C(0x8)
54101 	/* VF Pair name (32 byte string). */
54102 	char	pair_name[32];
54103 	/*
54104 	 * The q_ab value specifies the logical index of the TX/RX CoS
54105 	 * queue to be assigned for traffic in the A to B direction of
54106 	 * the interface pair. The default value is 0.
54107 	 */
54108 	uint8_t	q_ab;
54109 	/*
54110 	 * The q_ba value specifies the logical index of the TX/RX CoS
54111 	 * queue to be assigned for traffic in the B to A direction of
54112 	 * the interface pair. The default value is 1.
54113 	 */
54114 	uint8_t	q_ba;
54115 	/*
54116 	 * Specifies whether RX ring flow control is disabled (0) or enabled
54117 	 * (1) in the A to B direction. The default value is 0, meaning that
54118 	 * packets will be dropped when the B-side RX rings are full.
54119 	 */
54120 	uint8_t	fc_ab;
54121 	/*
54122 	 * Specifies whether RX ring flow control is disabled (0) or enabled
54123 	 * (1) in the B to A direction. The default value is 1, meaning that
54124 	 * the RX CoS queue will be flow controlled when the A-side RX rings
54125 	 * are full.
54126 	 */
54127 	uint8_t	fc_ba;
54128 	uint8_t	unused_1[4];
54129 } __rte_packed_end;
54130 
54131 /* hwrm_cfa_pair_alloc_output (size:192b/24B) */
54132 struct __rte_packed_begin hwrm_cfa_pair_alloc_output {
54133 	/* The specific error status for the command. */
54134 	uint16_t	error_code;
54135 	/* The HWRM command request type. */
54136 	uint16_t	req_type;
54137 	/* The sequence ID from the original command. */
54138 	uint16_t	seq_id;
54139 	/* The length of the response data in number of bytes. */
54140 	uint16_t	resp_len;
54141 	/* Only valid for modes 1 and 2. */
54142 	uint16_t	rx_cfa_code_a;
54143 	/* Only valid for modes 1 and 2. */
54144 	uint16_t	tx_cfa_action_a;
54145 	/* Only valid for mode 2. */
54146 	uint16_t	rx_cfa_code_b;
54147 	/* Only valid for mode 2. */
54148 	uint16_t	tx_cfa_action_b;
54149 	uint8_t	unused_0[7];
54150 	/*
54151 	 * This field is used in Output records to indicate that the output
54152 	 * is completely written to RAM. This field should be read as '1'
54153 	 * to indicate that the output has been completely written.
54154 	 * When writing a command completion or response to an internal
54155 	 * processor, the order of writes has to be such that this field is
54156 	 * written last.
54157 	 */
54158 	uint8_t	valid;
54159 } __rte_packed_end;
54160 
54161 /**********************
54162  * hwrm_cfa_pair_free *
54163  **********************/
54164 
54165 
54166 /* hwrm_cfa_pair_free_input (size:448b/56B) */
54167 struct __rte_packed_begin hwrm_cfa_pair_free_input {
54168 	/* The HWRM command request type. */
54169 	uint16_t	req_type;
54170 	/*
54171 	 * The completion ring to send the completion event on. This should
54172 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54173 	 */
54174 	uint16_t	cmpl_ring;
54175 	/*
54176 	 * The sequence ID is used by the driver for tracking multiple
54177 	 * commands. This ID is treated as opaque data by the firmware and
54178 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54179 	 */
54180 	uint16_t	seq_id;
54181 	/*
54182 	 * The target ID of the command:
54183 	 * * 0x0-0xFFF8 - The function ID
54184 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54185 	 * * 0xFFFD - Reserved for user-space HWRM interface
54186 	 * * 0xFFFF - HWRM
54187 	 */
54188 	uint16_t	target_id;
54189 	/*
54190 	 * A physical address pointer pointing to a host buffer that the
54191 	 * command's response data will be written. This can be either a host
54192 	 * physical address (HPA) or a guest physical address (GPA) and must
54193 	 * point to a physically contiguous block of memory.
54194 	 */
54195 	uint64_t	resp_addr;
54196 	/* VF Pair name (32 byte string). */
54197 	char	pair_name[32];
54198 	/* Logical PF (0xff-PF for command channel). */
54199 	uint8_t	pf_b_id;
54200 	uint8_t	unused_0[3];
54201 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
54202 	uint16_t	vf_id;
54203 	/*
54204 	 * Pair mode (0-vf2fn, 1-rep2fn, 2-rep2rep, 3-proxy, 4-pfpair,
54205 	 *            5-rep2fn_mod, 6-rep2fn_modall, 7-rep2fn_truflow).
54206 	 */
54207 	uint16_t	pair_mode;
54208 	/*
54209 	 * Pair between VF on local host with PF or VF on specified host.
54210 	 * (deprecated)
54211 	 */
54212 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_VF2FN          UINT32_C(0x0)
54213 	/*
54214 	 * Pair between REP on local host with PF or VF on specified host.
54215 	 * (deprecated)
54216 	 */
54217 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2FN         UINT32_C(0x1)
54218 	/*
54219 	 * Pair between REP on local host with REP on specified host.
54220 	 * (deprecated)
54221 	 */
54222 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2REP        UINT32_C(0x2)
54223 	/* Pair for the proxy interface. (deprecated) */
54224 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_PROXY          UINT32_C(0x3)
54225 	/* Pair for the PF interface. (deprecated) */
54226 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_PFPAIR         UINT32_C(0x4)
54227 	/* Modify existing rep2fn pair and move pair to new PF. (deprecated) */
54228 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2FN_MOD     UINT32_C(0x5)
54229 	/*
54230 	 * Modify existing rep2fn pairs paired with same PF and move pairs
54231 	 * to new PF. (deprecated)
54232 	 */
54233 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2FN_MODALL  UINT32_C(0x6)
54234 	/*
54235 	 * Truflow pair between REP on local host with PF or VF on
54236 	 * specified host.
54237 	 */
54238 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2FN_TRUFLOW UINT32_C(0x7)
54239 	#define HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_LAST \
54240 		HWRM_CFA_PAIR_FREE_INPUT_PAIR_MODE_REP2FN_TRUFLOW
54241 } __rte_packed_end;
54242 
54243 /* hwrm_cfa_pair_free_output (size:128b/16B) */
54244 struct __rte_packed_begin hwrm_cfa_pair_free_output {
54245 	/* The specific error status for the command. */
54246 	uint16_t	error_code;
54247 	/* The HWRM command request type. */
54248 	uint16_t	req_type;
54249 	/* The sequence ID from the original command. */
54250 	uint16_t	seq_id;
54251 	/* The length of the response data in number of bytes. */
54252 	uint16_t	resp_len;
54253 	uint8_t	unused_0[7];
54254 	/*
54255 	 * This field is used in Output records to indicate that the output
54256 	 * is completely written to RAM. This field should be read as '1'
54257 	 * to indicate that the output has been completely written.
54258 	 * When writing a command completion or response to an internal
54259 	 * processor, the order of writes has to be such that this field is
54260 	 * written last.
54261 	 */
54262 	uint8_t	valid;
54263 } __rte_packed_end;
54264 
54265 /**********************
54266  * hwrm_cfa_pair_info *
54267  **********************/
54268 
54269 
54270 /* hwrm_cfa_pair_info_input (size:448b/56B) */
54271 struct __rte_packed_begin hwrm_cfa_pair_info_input {
54272 	/* The HWRM command request type. */
54273 	uint16_t	req_type;
54274 	/*
54275 	 * The completion ring to send the completion event on. This should
54276 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54277 	 */
54278 	uint16_t	cmpl_ring;
54279 	/*
54280 	 * The sequence ID is used by the driver for tracking multiple
54281 	 * commands. This ID is treated as opaque data by the firmware and
54282 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54283 	 */
54284 	uint16_t	seq_id;
54285 	/*
54286 	 * The target ID of the command:
54287 	 * * 0x0-0xFFF8 - The function ID
54288 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54289 	 * * 0xFFFD - Reserved for user-space HWRM interface
54290 	 * * 0xFFFF - HWRM
54291 	 */
54292 	uint16_t	target_id;
54293 	/*
54294 	 * A physical address pointer pointing to a host buffer that the
54295 	 * command's response data will be written. This can be either a host
54296 	 * physical address (HPA) or a guest physical address (GPA) and must
54297 	 * point to a physically contiguous block of memory.
54298 	 */
54299 	uint64_t	resp_addr;
54300 	uint32_t	flags;
54301 	/* If this flag is set, lookup by name else lookup by index. */
54302 	#define HWRM_CFA_PAIR_INFO_INPUT_FLAGS_LOOKUP_TYPE      UINT32_C(0x1)
54303 	/* If this flag is set, lookup by PF id and VF id. */
54304 	#define HWRM_CFA_PAIR_INFO_INPUT_FLAGS_LOOKUP_REPRE     UINT32_C(0x2)
54305 	/* Pair table index. */
54306 	uint16_t	pair_index;
54307 	/* Pair pf index. */
54308 	uint8_t	pair_pfid;
54309 	/* Pair vf index. */
54310 	uint8_t	pair_vfid;
54311 	/* Pair name (32 byte string). */
54312 	char	pair_name[32];
54313 } __rte_packed_end;
54314 
54315 /* hwrm_cfa_pair_info_output (size:576b/72B) */
54316 struct __rte_packed_begin hwrm_cfa_pair_info_output {
54317 	/* The specific error status for the command. */
54318 	uint16_t	error_code;
54319 	/* The HWRM command request type. */
54320 	uint16_t	req_type;
54321 	/* The sequence ID from the original command. */
54322 	uint16_t	seq_id;
54323 	/* The length of the response data in number of bytes. */
54324 	uint16_t	resp_len;
54325 	/* Pair table index. */
54326 	uint16_t	next_pair_index;
54327 	/* Pair member a's fid. */
54328 	uint16_t	a_fid;
54329 	/* Logical host number. */
54330 	uint8_t	host_a_index;
54331 	/* Logical PF number. */
54332 	uint8_t	pf_a_index;
54333 	/* Pair member a's Linux logical VF number. */
54334 	uint16_t	vf_a_index;
54335 	/* Rx CFA code. */
54336 	uint16_t	rx_cfa_code_a;
54337 	/* Tx CFA action. */
54338 	uint16_t	tx_cfa_action_a;
54339 	/* Pair member b's fid. */
54340 	uint16_t	b_fid;
54341 	/* Logical host number. */
54342 	uint8_t	host_b_index;
54343 	/* Logical PF number. */
54344 	uint8_t	pf_b_index;
54345 	/* Pair member a's Linux logical VF number. */
54346 	uint16_t	vf_b_index;
54347 	/* Rx CFA code. */
54348 	uint16_t	rx_cfa_code_b;
54349 	/* Tx CFA action. */
54350 	uint16_t	tx_cfa_action_b;
54351 	/* Pair mode (0-vf2fn, 1-rep2fn, 2-rep2rep, 3-proxy, 4-pfpair). */
54352 	uint8_t	pair_mode;
54353 	/*
54354 	 * Pair between VF on local host with PF or VF on specified host.
54355 	 * (deprecated)
54356 	 */
54357 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_VF2FN   UINT32_C(0x0)
54358 	/*
54359 	 * Pair between REP on local host with PF or VF on specified host.
54360 	 * (deprecated)
54361 	 */
54362 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_REP2FN  UINT32_C(0x1)
54363 	/*
54364 	 * Pair between REP on local host with REP on specified host.
54365 	 * (deprecated)
54366 	 */
54367 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_REP2REP UINT32_C(0x2)
54368 	/* Pair for the proxy interface. (deprecated) */
54369 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_PROXY   UINT32_C(0x3)
54370 	/* Pair for the PF interface. (deprecated) */
54371 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_PFPAIR  UINT32_C(0x4)
54372 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_LAST \
54373 		HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_MODE_PFPAIR
54374 	/* Pair state. */
54375 	uint8_t	pair_state;
54376 	/* Pair has been allocated */
54377 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_ALLOCATED UINT32_C(0x1)
54378 	/* Both pair members are active */
54379 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE    UINT32_C(0x2)
54380 	#define HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_LAST \
54381 		HWRM_CFA_PAIR_INFO_OUTPUT_PAIR_STATE_ACTIVE
54382 	/* Pair name (32 byte string). */
54383 	char	pair_name[32];
54384 	uint8_t	unused_0[7];
54385 	/*
54386 	 * This field is used in Output records to indicate that the output
54387 	 * is completely written to RAM. This field should be read as '1'
54388 	 * to indicate that the output has been completely written.
54389 	 * When writing a command completion or response to an internal
54390 	 * processor, the order of writes has to be such that this field is
54391 	 * written last.
54392 	 */
54393 	uint8_t	valid;
54394 } __rte_packed_end;
54395 
54396 /**********************
54397  * hwrm_cfa_vfr_alloc *
54398  **********************/
54399 
54400 
54401 /* hwrm_cfa_vfr_alloc_input (size:448b/56B) */
54402 struct __rte_packed_begin hwrm_cfa_vfr_alloc_input {
54403 	/* The HWRM command request type. */
54404 	uint16_t	req_type;
54405 	/*
54406 	 * The completion ring to send the completion event on. This should
54407 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54408 	 */
54409 	uint16_t	cmpl_ring;
54410 	/*
54411 	 * The sequence ID is used by the driver for tracking multiple
54412 	 * commands. This ID is treated as opaque data by the firmware and
54413 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54414 	 */
54415 	uint16_t	seq_id;
54416 	/*
54417 	 * The target ID of the command:
54418 	 * * 0x0-0xFFF8 - The function ID
54419 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54420 	 * * 0xFFFD - Reserved for user-space HWRM interface
54421 	 * * 0xFFFF - HWRM
54422 	 */
54423 	uint16_t	target_id;
54424 	/*
54425 	 * A physical address pointer pointing to a host buffer that the
54426 	 * command's response data will be written. This can be either a host
54427 	 * physical address (HPA) or a guest physical address (GPA) and must
54428 	 * point to a physically contiguous block of memory.
54429 	 */
54430 	uint64_t	resp_addr;
54431 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
54432 	uint16_t	vf_id;
54433 	/*
54434 	 * This field is reserved for the future use.
54435 	 * It shall be set to 0.
54436 	 */
54437 	uint16_t	reserved;
54438 	uint8_t	unused_0[4];
54439 	/* VF Representor name (32 byte string). */
54440 	char	vfr_name[32];
54441 } __rte_packed_end;
54442 
54443 /* hwrm_cfa_vfr_alloc_output (size:128b/16B) */
54444 struct __rte_packed_begin hwrm_cfa_vfr_alloc_output {
54445 	/* The specific error status for the command. */
54446 	uint16_t	error_code;
54447 	/* The HWRM command request type. */
54448 	uint16_t	req_type;
54449 	/* The sequence ID from the original command. */
54450 	uint16_t	seq_id;
54451 	/* The length of the response data in number of bytes. */
54452 	uint16_t	resp_len;
54453 	/* Rx CFA code. */
54454 	uint16_t	rx_cfa_code;
54455 	/* Tx CFA action. */
54456 	uint16_t	tx_cfa_action;
54457 	uint8_t	unused_0[3];
54458 	/*
54459 	 * This field is used in Output records to indicate that the output
54460 	 * is completely written to RAM. This field should be read as '1'
54461 	 * to indicate that the output has been completely written.
54462 	 * When writing a command completion or response to an internal
54463 	 * processor, the order of writes has to be such that this field is
54464 	 * written last.
54465 	 */
54466 	uint8_t	valid;
54467 } __rte_packed_end;
54468 
54469 /*********************
54470  * hwrm_cfa_vfr_free *
54471  *********************/
54472 
54473 
54474 /* hwrm_cfa_vfr_free_input (size:448b/56B) */
54475 struct __rte_packed_begin hwrm_cfa_vfr_free_input {
54476 	/* The HWRM command request type. */
54477 	uint16_t	req_type;
54478 	/*
54479 	 * The completion ring to send the completion event on. This should
54480 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54481 	 */
54482 	uint16_t	cmpl_ring;
54483 	/*
54484 	 * The sequence ID is used by the driver for tracking multiple
54485 	 * commands. This ID is treated as opaque data by the firmware and
54486 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54487 	 */
54488 	uint16_t	seq_id;
54489 	/*
54490 	 * The target ID of the command:
54491 	 * * 0x0-0xFFF8 - The function ID
54492 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54493 	 * * 0xFFFD - Reserved for user-space HWRM interface
54494 	 * * 0xFFFF - HWRM
54495 	 */
54496 	uint16_t	target_id;
54497 	/*
54498 	 * A physical address pointer pointing to a host buffer that the
54499 	 * command's response data will be written. This can be either a host
54500 	 * physical address (HPA) or a guest physical address (GPA) and must
54501 	 * point to a physically contiguous block of memory.
54502 	 */
54503 	uint64_t	resp_addr;
54504 	/* VF Representor name (32 byte string). */
54505 	char	vfr_name[32];
54506 	/* Logical VF number (range: 0 -> MAX_VFS -1). */
54507 	uint16_t	vf_id;
54508 	/*
54509 	 * This field is reserved for the future use.
54510 	 * It shall be set to 0.
54511 	 */
54512 	uint16_t	reserved;
54513 	uint8_t	unused_0[4];
54514 } __rte_packed_end;
54515 
54516 /* hwrm_cfa_vfr_free_output (size:128b/16B) */
54517 struct __rte_packed_begin hwrm_cfa_vfr_free_output {
54518 	/* The specific error status for the command. */
54519 	uint16_t	error_code;
54520 	/* The HWRM command request type. */
54521 	uint16_t	req_type;
54522 	/* The sequence ID from the original command. */
54523 	uint16_t	seq_id;
54524 	/* The length of the response data in number of bytes. */
54525 	uint16_t	resp_len;
54526 	uint8_t	unused_0[7];
54527 	/*
54528 	 * This field is used in Output records to indicate that the output
54529 	 * is completely written to RAM. This field should be read as '1'
54530 	 * to indicate that the output has been completely written.
54531 	 * When writing a command completion or response to an internal
54532 	 * processor, the order of writes has to be such that this field is
54533 	 * written last.
54534 	 */
54535 	uint8_t	valid;
54536 } __rte_packed_end;
54537 
54538 /***************************************
54539  * hwrm_cfa_redirect_query_tunnel_type *
54540  ***************************************/
54541 
54542 
54543 /* hwrm_cfa_redirect_query_tunnel_type_input (size:192b/24B) */
54544 struct __rte_packed_begin hwrm_cfa_redirect_query_tunnel_type_input {
54545 	/* The HWRM command request type. */
54546 	uint16_t	req_type;
54547 	/*
54548 	 * The completion ring to send the completion event on. This should
54549 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54550 	 */
54551 	uint16_t	cmpl_ring;
54552 	/*
54553 	 * The sequence ID is used by the driver for tracking multiple
54554 	 * commands. This ID is treated as opaque data by the firmware and
54555 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54556 	 */
54557 	uint16_t	seq_id;
54558 	/*
54559 	 * The target ID of the command:
54560 	 * * 0x0-0xFFF8 - The function ID
54561 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54562 	 * * 0xFFFD - Reserved for user-space HWRM interface
54563 	 * * 0xFFFF - HWRM
54564 	 */
54565 	uint16_t	target_id;
54566 	/*
54567 	 * A physical address pointer pointing to a host buffer that the
54568 	 * command's response data will be written. This can be either a host
54569 	 * physical address (HPA) or a guest physical address (GPA) and must
54570 	 * point to a physically contiguous block of memory.
54571 	 */
54572 	uint64_t	resp_addr;
54573 	/* The source function id. */
54574 	uint16_t	src_fid;
54575 	uint8_t	unused_0[6];
54576 } __rte_packed_end;
54577 
54578 /* hwrm_cfa_redirect_query_tunnel_type_output (size:128b/16B) */
54579 struct __rte_packed_begin hwrm_cfa_redirect_query_tunnel_type_output {
54580 	/* The specific error status for the command. */
54581 	uint16_t	error_code;
54582 	/* The HWRM command request type. */
54583 	uint16_t	req_type;
54584 	/* The sequence ID from the original command. */
54585 	uint16_t	seq_id;
54586 	/* The length of the response data in number of bytes. */
54587 	uint16_t	resp_len;
54588 	/* Tunnel Mask. */
54589 	uint32_t	tunnel_mask;
54590 	/* Non-tunnel */
54591 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_NONTUNNEL \
54592 		UINT32_C(0x1)
54593 	/* Virtual eXtensible Local Area Network (VXLAN) */
54594 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_VXLAN \
54595 		UINT32_C(0x2)
54596 	/* Network Virtualization Generic Routing Encapsulation (NVGRE) */
54597 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_NVGRE \
54598 		UINT32_C(0x4)
54599 	/* Generic Routing Encapsulation (GRE) inside Ethernet payload */
54600 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_L2GRE \
54601 		UINT32_C(0x8)
54602 	/* IP in IP */
54603 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_IPIP \
54604 		UINT32_C(0x10)
54605 	/* Generic Network Virtualization Encapsulation (Geneve) */
54606 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_GENEVE \
54607 		UINT32_C(0x20)
54608 	/* Multi-Protocol Label Switching (MPLS) */
54609 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_MPLS \
54610 		UINT32_C(0x40)
54611 	/* Stateless Transport Tunnel (STT) */
54612 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_STT \
54613 		UINT32_C(0x80)
54614 	/* Generic Routing Encapsulation (GRE) inside IP datagram payload */
54615 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_IPGRE \
54616 		UINT32_C(0x100)
54617 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
54618 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_VXLAN_V4 \
54619 		UINT32_C(0x200)
54620 	/*
54621 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
54622 	 * datagram payload
54623 	 */
54624 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_IPGRE_V1 \
54625 		UINT32_C(0x400)
54626 	/* Any tunneled traffic */
54627 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_ANYTUNNEL \
54628 		UINT32_C(0x800)
54629 	/* Use fixed layer 2 ether type of 0xFFFF */
54630 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_L2_ETYPE \
54631 		UINT32_C(0x1000)
54632 	/*
54633 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
54634 	 * (IPV6oVXLANGPE)
54635 	 */
54636 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_VXLAN_GPE_V6 \
54637 		UINT32_C(0x2000)
54638 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
54639 	#define HWRM_CFA_REDIRECT_QUERY_TUNNEL_TYPE_OUTPUT_TUNNEL_MASK_VXLAN_GPE \
54640 		UINT32_C(0x4000)
54641 	uint8_t	unused_0[3];
54642 	/*
54643 	 * This field is used in Output records to indicate that the output
54644 	 * is completely written to RAM. This field should be read as '1'
54645 	 * to indicate that the output has been completely written.
54646 	 * When writing a command completion or response to an internal
54647 	 * processor, the order of writes has to be such that this field is
54648 	 * written last.
54649 	 */
54650 	uint8_t	valid;
54651 } __rte_packed_end;
54652 
54653 /*************************
54654  * hwrm_cfa_ctx_mem_rgtr *
54655  *************************/
54656 
54657 
54658 /* hwrm_cfa_ctx_mem_rgtr_input (size:256b/32B) */
54659 struct __rte_packed_begin hwrm_cfa_ctx_mem_rgtr_input {
54660 	/* The HWRM command request type. */
54661 	uint16_t	req_type;
54662 	/*
54663 	 * The completion ring to send the completion event on. This should
54664 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54665 	 */
54666 	uint16_t	cmpl_ring;
54667 	/*
54668 	 * The sequence ID is used by the driver for tracking multiple
54669 	 * commands. This ID is treated as opaque data by the firmware and
54670 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54671 	 */
54672 	uint16_t	seq_id;
54673 	/*
54674 	 * The target ID of the command:
54675 	 * * 0x0-0xFFF8 - The function ID
54676 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54677 	 * * 0xFFFD - Reserved for user-space HWRM interface
54678 	 * * 0xFFFF - HWRM
54679 	 */
54680 	uint16_t	target_id;
54681 	/*
54682 	 * A physical address pointer pointing to a host buffer that the
54683 	 * command's response data will be written. This can be either a host
54684 	 * physical address (HPA) or a guest physical address (GPA) and must
54685 	 * point to a physically contiguous block of memory.
54686 	 */
54687 	uint64_t	resp_addr;
54688 	uint16_t	flags;
54689 	/* Counter PBL indirect levels. */
54690 	uint8_t	page_level;
54691 	/* PBL pointer is physical start address. */
54692 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_LEVEL_LVL_0 UINT32_C(0x0)
54693 	/* PBL pointer points to PTE table. */
54694 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_LEVEL_LVL_1 UINT32_C(0x1)
54695 	/*
54696 	 * PBL pointer points to PDE table with each entry pointing to PTE
54697 	 * tables.
54698 	 */
54699 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_LEVEL_LVL_2 UINT32_C(0x2)
54700 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_LEVEL_LAST \
54701 		HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_LEVEL_LVL_2
54702 	/* Page size. */
54703 	uint8_t	page_size;
54704 	/* 4KB page size. */
54705 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_4K   UINT32_C(0x0)
54706 	/* 8KB page size. */
54707 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_8K   UINT32_C(0x1)
54708 	/* 64KB page size. */
54709 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_64K  UINT32_C(0x4)
54710 	/* 256KB page size. */
54711 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_256K UINT32_C(0x6)
54712 	/* 1MB page size. */
54713 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_1M   UINT32_C(0x8)
54714 	/* 2MB page size. */
54715 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_2M   UINT32_C(0x9)
54716 	/* 4MB page size. */
54717 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_4M   UINT32_C(0xa)
54718 	/* 1GB page size. */
54719 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_1G   UINT32_C(0x12)
54720 	#define HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_LAST \
54721 		HWRM_CFA_CTX_MEM_RGTR_INPUT_PAGE_SIZE_1G
54722 	uint32_t	unused_0;
54723 	/* Pointer to the PBL, or PDL depending on number of levels */
54724 	uint64_t	page_dir;
54725 } __rte_packed_end;
54726 
54727 /* hwrm_cfa_ctx_mem_rgtr_output (size:128b/16B) */
54728 struct __rte_packed_begin hwrm_cfa_ctx_mem_rgtr_output {
54729 	/* The specific error status for the command. */
54730 	uint16_t	error_code;
54731 	/* The HWRM command request type. */
54732 	uint16_t	req_type;
54733 	/* The sequence ID from the original command. */
54734 	uint16_t	seq_id;
54735 	/* The length of the response data in number of bytes. */
54736 	uint16_t	resp_len;
54737 	/*
54738 	 * Id/Handle to the recently register context memory. This handle is
54739 	 * passed to the CFA feature.
54740 	 */
54741 	uint16_t	ctx_id;
54742 	uint8_t	unused_0[5];
54743 	/*
54744 	 * This field is used in Output records to indicate that the output
54745 	 * is completely written to RAM. This field should be read as '1'
54746 	 * to indicate that the output has been completely written.
54747 	 * When writing a command completion or response to an internal
54748 	 * processor, the order of writes has to be such that this field is
54749 	 * written last.
54750 	 */
54751 	uint8_t	valid;
54752 } __rte_packed_end;
54753 
54754 /***************************
54755  * hwrm_cfa_ctx_mem_unrgtr *
54756  ***************************/
54757 
54758 
54759 /* hwrm_cfa_ctx_mem_unrgtr_input (size:192b/24B) */
54760 struct __rte_packed_begin hwrm_cfa_ctx_mem_unrgtr_input {
54761 	/* The HWRM command request type. */
54762 	uint16_t	req_type;
54763 	/*
54764 	 * The completion ring to send the completion event on. This should
54765 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54766 	 */
54767 	uint16_t	cmpl_ring;
54768 	/*
54769 	 * The sequence ID is used by the driver for tracking multiple
54770 	 * commands. This ID is treated as opaque data by the firmware and
54771 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54772 	 */
54773 	uint16_t	seq_id;
54774 	/*
54775 	 * The target ID of the command:
54776 	 * * 0x0-0xFFF8 - The function ID
54777 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54778 	 * * 0xFFFD - Reserved for user-space HWRM interface
54779 	 * * 0xFFFF - HWRM
54780 	 */
54781 	uint16_t	target_id;
54782 	/*
54783 	 * A physical address pointer pointing to a host buffer that the
54784 	 * command's response data will be written. This can be either a host
54785 	 * physical address (HPA) or a guest physical address (GPA) and must
54786 	 * point to a physically contiguous block of memory.
54787 	 */
54788 	uint64_t	resp_addr;
54789 	/*
54790 	 * Id/Handle to the recently register context memory. This handle is
54791 	 * passed to the CFA feature.
54792 	 */
54793 	uint16_t	ctx_id;
54794 	uint8_t	unused_0[6];
54795 } __rte_packed_end;
54796 
54797 /* hwrm_cfa_ctx_mem_unrgtr_output (size:128b/16B) */
54798 struct __rte_packed_begin hwrm_cfa_ctx_mem_unrgtr_output {
54799 	/* The specific error status for the command. */
54800 	uint16_t	error_code;
54801 	/* The HWRM command request type. */
54802 	uint16_t	req_type;
54803 	/* The sequence ID from the original command. */
54804 	uint16_t	seq_id;
54805 	/* The length of the response data in number of bytes. */
54806 	uint16_t	resp_len;
54807 	uint8_t	unused_0[7];
54808 	/*
54809 	 * This field is used in Output records to indicate that the output
54810 	 * is completely written to RAM. This field should be read as '1'
54811 	 * to indicate that the output has been completely written.
54812 	 * When writing a command completion or response to an internal
54813 	 * processor, the order of writes has to be such that this field is
54814 	 * written last.
54815 	 */
54816 	uint8_t	valid;
54817 } __rte_packed_end;
54818 
54819 /*************************
54820  * hwrm_cfa_ctx_mem_qctx *
54821  *************************/
54822 
54823 
54824 /* hwrm_cfa_ctx_mem_qctx_input (size:192b/24B) */
54825 struct __rte_packed_begin hwrm_cfa_ctx_mem_qctx_input {
54826 	/* The HWRM command request type. */
54827 	uint16_t	req_type;
54828 	/*
54829 	 * The completion ring to send the completion event on. This should
54830 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54831 	 */
54832 	uint16_t	cmpl_ring;
54833 	/*
54834 	 * The sequence ID is used by the driver for tracking multiple
54835 	 * commands. This ID is treated as opaque data by the firmware and
54836 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54837 	 */
54838 	uint16_t	seq_id;
54839 	/*
54840 	 * The target ID of the command:
54841 	 * * 0x0-0xFFF8 - The function ID
54842 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54843 	 * * 0xFFFD - Reserved for user-space HWRM interface
54844 	 * * 0xFFFF - HWRM
54845 	 */
54846 	uint16_t	target_id;
54847 	/*
54848 	 * A physical address pointer pointing to a host buffer that the
54849 	 * command's response data will be written. This can be either a host
54850 	 * physical address (HPA) or a guest physical address (GPA) and must
54851 	 * point to a physically contiguous block of memory.
54852 	 */
54853 	uint64_t	resp_addr;
54854 	/*
54855 	 * Id/Handle to the recently register context memory. This handle is
54856 	 * passed to the CFA feature.
54857 	 */
54858 	uint16_t	ctx_id;
54859 	uint8_t	unused_0[6];
54860 } __rte_packed_end;
54861 
54862 /* hwrm_cfa_ctx_mem_qctx_output (size:256b/32B) */
54863 struct __rte_packed_begin hwrm_cfa_ctx_mem_qctx_output {
54864 	/* The specific error status for the command. */
54865 	uint16_t	error_code;
54866 	/* The HWRM command request type. */
54867 	uint16_t	req_type;
54868 	/* The sequence ID from the original command. */
54869 	uint16_t	seq_id;
54870 	/* The length of the response data in number of bytes. */
54871 	uint16_t	resp_len;
54872 	uint16_t	flags;
54873 	/* Counter PBL indirect levels. */
54874 	uint8_t	page_level;
54875 	/* PBL pointer is physical start address. */
54876 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_LEVEL_LVL_0 UINT32_C(0x0)
54877 	/* PBL pointer points to PTE table. */
54878 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_LEVEL_LVL_1 UINT32_C(0x1)
54879 	/*
54880 	 * PBL pointer points to PDE table with each entry pointing to PTE
54881 	 * tables.
54882 	 */
54883 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_LEVEL_LVL_2 UINT32_C(0x2)
54884 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_LEVEL_LAST \
54885 		HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_LEVEL_LVL_2
54886 	/* Page size. */
54887 	uint8_t	page_size;
54888 	/* 4KB page size. */
54889 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_4K   UINT32_C(0x0)
54890 	/* 8KB page size. */
54891 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_8K   UINT32_C(0x1)
54892 	/* 64KB page size. */
54893 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_64K  UINT32_C(0x4)
54894 	/* 256KB page size. */
54895 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_256K UINT32_C(0x6)
54896 	/* 1MB page size. */
54897 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_1M   UINT32_C(0x8)
54898 	/* 2MB page size. */
54899 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_2M   UINT32_C(0x9)
54900 	/* 4MB page size. */
54901 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_4M   UINT32_C(0xa)
54902 	/* 1GB page size. */
54903 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_1G   UINT32_C(0x12)
54904 	#define HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_LAST \
54905 		HWRM_CFA_CTX_MEM_QCTX_OUTPUT_PAGE_SIZE_1G
54906 	uint8_t	unused_0[4];
54907 	/* Pointer to the PBL, or PDL depending on number of levels */
54908 	uint64_t	page_dir;
54909 	uint8_t	unused_1[7];
54910 	/*
54911 	 * This field is used in Output records to indicate that the output
54912 	 * is completely written to RAM. This field should be read as '1'
54913 	 * to indicate that the output has been completely written.
54914 	 * When writing a command completion or response to an internal
54915 	 * processor, the order of writes has to be such that this field is
54916 	 * written last.
54917 	 */
54918 	uint8_t	valid;
54919 } __rte_packed_end;
54920 
54921 /**************************
54922  * hwrm_cfa_ctx_mem_qcaps *
54923  **************************/
54924 
54925 
54926 /* hwrm_cfa_ctx_mem_qcaps_input (size:128b/16B) */
54927 struct __rte_packed_begin hwrm_cfa_ctx_mem_qcaps_input {
54928 	/* The HWRM command request type. */
54929 	uint16_t	req_type;
54930 	/*
54931 	 * The completion ring to send the completion event on. This should
54932 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54933 	 */
54934 	uint16_t	cmpl_ring;
54935 	/*
54936 	 * The sequence ID is used by the driver for tracking multiple
54937 	 * commands. This ID is treated as opaque data by the firmware and
54938 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
54939 	 */
54940 	uint16_t	seq_id;
54941 	/*
54942 	 * The target ID of the command:
54943 	 * * 0x0-0xFFF8 - The function ID
54944 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
54945 	 * * 0xFFFD - Reserved for user-space HWRM interface
54946 	 * * 0xFFFF - HWRM
54947 	 */
54948 	uint16_t	target_id;
54949 	/*
54950 	 * A physical address pointer pointing to a host buffer that the
54951 	 * command's response data will be written. This can be either a host
54952 	 * physical address (HPA) or a guest physical address (GPA) and must
54953 	 * point to a physically contiguous block of memory.
54954 	 */
54955 	uint64_t	resp_addr;
54956 } __rte_packed_end;
54957 
54958 /* hwrm_cfa_ctx_mem_qcaps_output (size:128b/16B) */
54959 struct __rte_packed_begin hwrm_cfa_ctx_mem_qcaps_output {
54960 	/* The specific error status for the command. */
54961 	uint16_t	error_code;
54962 	/* The HWRM command request type. */
54963 	uint16_t	req_type;
54964 	/* The sequence ID from the original command. */
54965 	uint16_t	seq_id;
54966 	/* The length of the response data in number of bytes. */
54967 	uint16_t	resp_len;
54968 	/*
54969 	 * Indicates the maximum number of context memory which can be
54970 	 * registered.
54971 	 */
54972 	uint16_t	max_entries;
54973 	uint8_t	unused_0[5];
54974 	/*
54975 	 * This field is used in Output records to indicate that the output
54976 	 * is completely written to RAM. This field should be read as '1'
54977 	 * to indicate that the output has been completely written.
54978 	 * When writing a command completion or response to an internal
54979 	 * processor, the order of writes has to be such that this field is
54980 	 * written last.
54981 	 */
54982 	uint8_t	valid;
54983 } __rte_packed_end;
54984 
54985 /**************************
54986  * hwrm_cfa_counter_qcaps *
54987  **************************/
54988 
54989 
54990 /* hwrm_cfa_counter_qcaps_input (size:128b/16B) */
54991 struct __rte_packed_begin hwrm_cfa_counter_qcaps_input {
54992 	/* The HWRM command request type. */
54993 	uint16_t	req_type;
54994 	/*
54995 	 * The completion ring to send the completion event on. This should
54996 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
54997 	 */
54998 	uint16_t	cmpl_ring;
54999 	/*
55000 	 * The sequence ID is used by the driver for tracking multiple
55001 	 * commands. This ID is treated as opaque data by the firmware and
55002 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55003 	 */
55004 	uint16_t	seq_id;
55005 	/*
55006 	 * The target ID of the command:
55007 	 * * 0x0-0xFFF8 - The function ID
55008 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55009 	 * * 0xFFFD - Reserved for user-space HWRM interface
55010 	 * * 0xFFFF - HWRM
55011 	 */
55012 	uint16_t	target_id;
55013 	/*
55014 	 * A physical address pointer pointing to a host buffer that the
55015 	 * command's response data will be written. This can be either a host
55016 	 * physical address (HPA) or a guest physical address (GPA) and must
55017 	 * point to a physically contiguous block of memory.
55018 	 */
55019 	uint64_t	resp_addr;
55020 } __rte_packed_end;
55021 
55022 /* hwrm_cfa_counter_qcaps_output (size:576b/72B) */
55023 struct __rte_packed_begin hwrm_cfa_counter_qcaps_output {
55024 	/* The specific error status for the command. */
55025 	uint16_t	error_code;
55026 	/* The HWRM command request type. */
55027 	uint16_t	req_type;
55028 	/* The sequence ID from the original command. */
55029 	uint16_t	seq_id;
55030 	/* The length of the response data in number of bytes. */
55031 	uint16_t	resp_len;
55032 	uint32_t	flags;
55033 	/* Enumeration denoting the supported CFA counter format. */
55034 	#define HWRM_CFA_COUNTER_QCAPS_OUTPUT_FLAGS_COUNTER_FORMAT \
55035 		UINT32_C(0x1)
55036 	/* CFA counter types are not supported. */
55037 	#define HWRM_CFA_COUNTER_QCAPS_OUTPUT_FLAGS_COUNTER_FORMAT_NONE \
55038 		UINT32_C(0x0)
55039 	/* 64-bit packet counters followed by 64-bit byte counters format. */
55040 	#define HWRM_CFA_COUNTER_QCAPS_OUTPUT_FLAGS_COUNTER_FORMAT_64_BIT \
55041 		UINT32_C(0x1)
55042 	#define HWRM_CFA_COUNTER_QCAPS_OUTPUT_FLAGS_COUNTER_FORMAT_LAST \
55043 		HWRM_CFA_COUNTER_QCAPS_OUTPUT_FLAGS_COUNTER_FORMAT_64_BIT
55044 	uint32_t	unused_0;
55045 	/*
55046 	 * Minimum guaranteed number of flow counters supported for this
55047 	 * function, in RX direction.
55048 	 */
55049 	uint32_t	min_rx_fc;
55050 	/*
55051 	 * Maximum non-guaranteed number of flow counters supported for this
55052 	 * function, in RX direction.
55053 	 */
55054 	uint32_t	max_rx_fc;
55055 	/*
55056 	 * Minimum guaranteed number of flow counters supported for this
55057 	 * function, in TX direction.
55058 	 */
55059 	uint32_t	min_tx_fc;
55060 	/*
55061 	 * Maximum non-guaranteed number of flow counters supported for this
55062 	 * function, in TX direction.
55063 	 */
55064 	uint32_t	max_tx_fc;
55065 	/*
55066 	 * Minimum guaranteed number of extension flow counters supported for
55067 	 * this function, in RX direction.
55068 	 */
55069 	uint32_t	min_rx_efc;
55070 	/*
55071 	 * Maximum non-guaranteed number of extension flow counters supported
55072 	 * for this function, in RX direction.
55073 	 */
55074 	uint32_t	max_rx_efc;
55075 	/*
55076 	 * Minimum guaranteed number of extension flow counters supported for
55077 	 * this function, in TX direction.
55078 	 */
55079 	uint32_t	min_tx_efc;
55080 	/*
55081 	 * Maximum non-guaranteed number of extension flow counters supported
55082 	 * for this function, in TX direction.
55083 	 */
55084 	uint32_t	max_tx_efc;
55085 	/*
55086 	 * Minimum guaranteed number of meter drop counters supported for
55087 	 * this function, in RX direction.
55088 	 */
55089 	uint32_t	min_rx_mdc;
55090 	/*
55091 	 * Maximum non-guaranteed number of meter drop counters supported for
55092 	 * this function, in RX direction.
55093 	 */
55094 	uint32_t	max_rx_mdc;
55095 	/*
55096 	 * Minimum guaranteed number of meter drop counters supported for this
55097 	 * function, in TX direction.
55098 	 */
55099 	uint32_t	min_tx_mdc;
55100 	/*
55101 	 * Maximum non-guaranteed number of meter drop counters supported for
55102 	 * this function, in TX direction.
55103 	 */
55104 	uint32_t	max_tx_mdc;
55105 	/*
55106 	 * Maximum guaranteed number of flow counters which can be used during
55107 	 * flow alloc.
55108 	 */
55109 	uint32_t	max_flow_alloc_fc;
55110 	uint8_t	unused_1[3];
55111 	/*
55112 	 * This field is used in Output records to indicate that the output
55113 	 * is completely written to RAM. This field should be read as '1'
55114 	 * to indicate that the output has been completely written.
55115 	 * When writing a command completion or response to an internal
55116 	 * processor, the order of writes has to be such that this field is
55117 	 * written last.
55118 	 */
55119 	uint8_t	valid;
55120 } __rte_packed_end;
55121 
55122 /************************
55123  * hwrm_cfa_counter_cfg *
55124  ************************/
55125 
55126 
55127 /* hwrm_cfa_counter_cfg_input (size:256b/32B) */
55128 struct __rte_packed_begin hwrm_cfa_counter_cfg_input {
55129 	/* The HWRM command request type. */
55130 	uint16_t	req_type;
55131 	/*
55132 	 * The completion ring to send the completion event on. This should
55133 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55134 	 */
55135 	uint16_t	cmpl_ring;
55136 	/*
55137 	 * The sequence ID is used by the driver for tracking multiple
55138 	 * commands. This ID is treated as opaque data by the firmware and
55139 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55140 	 */
55141 	uint16_t	seq_id;
55142 	/*
55143 	 * The target ID of the command:
55144 	 * * 0x0-0xFFF8 - The function ID
55145 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55146 	 * * 0xFFFD - Reserved for user-space HWRM interface
55147 	 * * 0xFFFF - HWRM
55148 	 */
55149 	uint16_t	target_id;
55150 	/*
55151 	 * A physical address pointer pointing to a host buffer that the
55152 	 * command's response data will be written. This can be either a host
55153 	 * physical address (HPA) or a guest physical address (GPA) and must
55154 	 * point to a physically contiguous block of memory.
55155 	 */
55156 	uint64_t	resp_addr;
55157 	uint16_t	flags;
55158 	/* Enumeration denoting the configuration mode. */
55159 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_CFG_MODE \
55160 		UINT32_C(0x1)
55161 	/* Disable the configuration mode. */
55162 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_CFG_MODE_DISABLE \
55163 		UINT32_C(0x0)
55164 	/* Enable the configuration mode. */
55165 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_CFG_MODE_ENABLE \
55166 		UINT32_C(0x1)
55167 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_CFG_MODE_LAST \
55168 		HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_CFG_MODE_ENABLE
55169 	/* Enumeration denoting the RX, TX type of the resource. */
55170 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_PATH \
55171 		UINT32_C(0x2)
55172 	/* Tx path. */
55173 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_PATH_TX \
55174 		(UINT32_C(0x0) << 1)
55175 	/* Rx path. */
55176 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_PATH_RX \
55177 		(UINT32_C(0x1) << 1)
55178 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_PATH_LAST \
55179 		HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_PATH_RX
55180 	/* Enumeration denoting the data transfer mode. */
55181 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_MASK \
55182 		UINT32_C(0xc)
55183 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_SFT       2
55184 	/* Push mode. */
55185 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PUSH \
55186 		(UINT32_C(0x0) << 2)
55187 	/* Pull mode. */
55188 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PULL \
55189 		(UINT32_C(0x1) << 2)
55190 	/* Pull on async update. */
55191 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PULL_ASYNC \
55192 		(UINT32_C(0x2) << 2)
55193 	#define HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_LAST \
55194 		HWRM_CFA_COUNTER_CFG_INPUT_FLAGS_DATA_TRANSFER_MODE_PULL_ASYNC
55195 	uint16_t	counter_type;
55196 	/* Flow counters. */
55197 	#define HWRM_CFA_COUNTER_CFG_INPUT_COUNTER_TYPE_FC  UINT32_C(0x0)
55198 	/* Extended flow counters. */
55199 	#define HWRM_CFA_COUNTER_CFG_INPUT_COUNTER_TYPE_EFC UINT32_C(0x1)
55200 	/* Meter drop counters. */
55201 	#define HWRM_CFA_COUNTER_CFG_INPUT_COUNTER_TYPE_MDC UINT32_C(0x2)
55202 	#define HWRM_CFA_COUNTER_CFG_INPUT_COUNTER_TYPE_LAST \
55203 		HWRM_CFA_COUNTER_CFG_INPUT_COUNTER_TYPE_MDC
55204 	/* Ctx memory handle to be used for the counter. */
55205 	uint16_t	ctx_id;
55206 	/* Counter update cadence hint (only in Push mode). */
55207 	uint16_t	update_tmr_ms;
55208 	/* Total number of entries. */
55209 	uint32_t	num_entries;
55210 	uint32_t	unused_0;
55211 } __rte_packed_end;
55212 
55213 /* hwrm_cfa_counter_cfg_output (size:128b/16B) */
55214 struct __rte_packed_begin hwrm_cfa_counter_cfg_output {
55215 	/* The specific error status for the command. */
55216 	uint16_t	error_code;
55217 	/* The HWRM command request type. */
55218 	uint16_t	req_type;
55219 	/* The sequence ID from the original command. */
55220 	uint16_t	seq_id;
55221 	/* The length of the response data in number of bytes. */
55222 	uint16_t	resp_len;
55223 	uint8_t	unused_0[7];
55224 	/*
55225 	 * This field is used in Output records to indicate that the output
55226 	 * is completely written to RAM. This field should be read as '1'
55227 	 * to indicate that the output has been completely written.
55228 	 * When writing a command completion or response to an internal
55229 	 * processor, the order of writes has to be such that this field is
55230 	 * written last.
55231 	 */
55232 	uint8_t	valid;
55233 } __rte_packed_end;
55234 
55235 /***************************
55236  * hwrm_cfa_counter_qstats *
55237  ***************************/
55238 
55239 
55240 /* hwrm_cfa_counter_qstats_input (size:320b/40B) */
55241 struct __rte_packed_begin hwrm_cfa_counter_qstats_input {
55242 	/* The HWRM command request type. */
55243 	uint16_t	req_type;
55244 	/*
55245 	 * The completion ring to send the completion event on. This should
55246 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55247 	 */
55248 	uint16_t	cmpl_ring;
55249 	/*
55250 	 * The sequence ID is used by the driver for tracking multiple
55251 	 * commands. This ID is treated as opaque data by the firmware and
55252 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55253 	 */
55254 	uint16_t	seq_id;
55255 	/*
55256 	 * The target ID of the command:
55257 	 * * 0x0-0xFFF8 - The function ID
55258 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55259 	 * * 0xFFFD - Reserved for user-space HWRM interface
55260 	 * * 0xFFFF - HWRM
55261 	 */
55262 	uint16_t	target_id;
55263 	/*
55264 	 * A physical address pointer pointing to a host buffer that the
55265 	 * command's response data will be written. This can be either a host
55266 	 * physical address (HPA) or a guest physical address (GPA) and must
55267 	 * point to a physically contiguous block of memory.
55268 	 */
55269 	uint64_t	resp_addr;
55270 	uint16_t	flags;
55271 	/* Enumeration denoting the RX, TX type of the resource. */
55272 	#define HWRM_CFA_COUNTER_QSTATS_INPUT_FLAGS_PATH     UINT32_C(0x1)
55273 	/* Tx path. */
55274 	#define HWRM_CFA_COUNTER_QSTATS_INPUT_FLAGS_PATH_TX    UINT32_C(0x0)
55275 	/* Rx path. */
55276 	#define HWRM_CFA_COUNTER_QSTATS_INPUT_FLAGS_PATH_RX    UINT32_C(0x1)
55277 	#define HWRM_CFA_COUNTER_QSTATS_INPUT_FLAGS_PATH_LAST \
55278 		HWRM_CFA_COUNTER_QSTATS_INPUT_FLAGS_PATH_RX
55279 	uint16_t	counter_type;
55280 	uint16_t	input_flow_ctx_id;
55281 	uint16_t	num_entries;
55282 	uint16_t	delta_time_ms;
55283 	uint16_t	meter_instance_id;
55284 	uint16_t	mdc_ctx_id;
55285 	uint8_t	unused_0[2];
55286 	uint64_t	expected_count;
55287 } __rte_packed_end;
55288 
55289 /* hwrm_cfa_counter_qstats_output (size:128b/16B) */
55290 struct __rte_packed_begin hwrm_cfa_counter_qstats_output {
55291 	/* The specific error status for the command. */
55292 	uint16_t	error_code;
55293 	/* The HWRM command request type. */
55294 	uint16_t	req_type;
55295 	/* The sequence ID from the original command. */
55296 	uint16_t	seq_id;
55297 	/* The length of the response data in number of bytes. */
55298 	uint16_t	resp_len;
55299 	uint8_t	unused_0[7];
55300 	/*
55301 	 * This field is used in Output records to indicate that the output
55302 	 * is completely written to RAM. This field should be read as '1'
55303 	 * to indicate that the output has been completely written.
55304 	 * When writing a command completion or response to an internal
55305 	 * processor, the order of writes has to be such that this field is
55306 	 * written last.
55307 	 */
55308 	uint8_t	valid;
55309 } __rte_packed_end;
55310 
55311 /**********************
55312  * hwrm_cfa_eem_qcaps *
55313  **********************/
55314 
55315 
55316 /* hwrm_cfa_eem_qcaps_input (size:192b/24B) */
55317 struct __rte_packed_begin hwrm_cfa_eem_qcaps_input {
55318 	/* The HWRM command request type. */
55319 	uint16_t	req_type;
55320 	/*
55321 	 * The completion ring to send the completion event on. This should
55322 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55323 	 */
55324 	uint16_t	cmpl_ring;
55325 	/*
55326 	 * The sequence ID is used by the driver for tracking multiple
55327 	 * commands. This ID is treated as opaque data by the firmware and
55328 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55329 	 */
55330 	uint16_t	seq_id;
55331 	/*
55332 	 * The target ID of the command:
55333 	 * * 0x0-0xFFF8 - The function ID
55334 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55335 	 * * 0xFFFD - Reserved for user-space HWRM interface
55336 	 * * 0xFFFF - HWRM
55337 	 */
55338 	uint16_t	target_id;
55339 	/*
55340 	 * A physical address pointer pointing to a host buffer that the
55341 	 * command's response data will be written. This can be either a host
55342 	 * physical address (HPA) or a guest physical address (GPA) and must
55343 	 * point to a physically contiguous block of memory.
55344 	 */
55345 	uint64_t	resp_addr;
55346 	uint32_t	flags;
55347 	/*
55348 	 * When set to 1, indicates the configuration will apply to TX flows
55349 	 * which are to be offloaded.
55350 	 * Note if this bit is set then the path_rx bit can't be set.
55351 	 */
55352 	#define HWRM_CFA_EEM_QCAPS_INPUT_FLAGS_PATH_TX \
55353 		UINT32_C(0x1)
55354 	/*
55355 	 * When set to 1, indicates the configuration will apply to RX flows
55356 	 * which are to be offloaded.
55357 	 * Note if this bit is set then the path_tx bit can't be set.
55358 	 */
55359 	#define HWRM_CFA_EEM_QCAPS_INPUT_FLAGS_PATH_RX \
55360 		UINT32_C(0x2)
55361 	/* When set to 1, all offloaded flows will be sent to EEM. */
55362 	#define HWRM_CFA_EEM_QCAPS_INPUT_FLAGS_PREFERRED_OFFLOAD \
55363 		UINT32_C(0x4)
55364 	uint32_t	unused_0;
55365 } __rte_packed_end;
55366 
55367 /* hwrm_cfa_eem_qcaps_output (size:320b/40B) */
55368 struct __rte_packed_begin hwrm_cfa_eem_qcaps_output {
55369 	/* The specific error status for the command. */
55370 	uint16_t	error_code;
55371 	/* The HWRM command request type. */
55372 	uint16_t	req_type;
55373 	/* The sequence ID from the original command. */
55374 	uint16_t	seq_id;
55375 	/* The length of the response data in number of bytes. */
55376 	uint16_t	resp_len;
55377 	uint32_t	flags;
55378 	/*
55379 	 * When set to 1, indicates the configuration will apply to TX flows
55380 	 * which are to be offloaded.
55381 	 * Note if this bit is set then the path_rx bit can't be set.
55382 	 */
55383 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_FLAGS_PATH_TX \
55384 		UINT32_C(0x1)
55385 	/*
55386 	 * When set to 1, indicates the configuration will apply to RX flows
55387 	 * which are to be offloaded.
55388 	 * Note if this bit is set then the path_tx bit can't be set.
55389 	 */
55390 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_FLAGS_PATH_RX \
55391 		UINT32_C(0x2)
55392 	/*
55393 	 * When set to 1, indicates the FW supports the Centralized
55394 	 * Memory Model. The concept designates one entity for the
55395 	 * memory allocation while all others 'subscribe' to it.
55396 	 */
55397 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_FLAGS_CENTRALIZED_MEMORY_MODEL_SUPPORTED \
55398 		UINT32_C(0x4)
55399 	/*
55400 	 * When set to 1, indicates the FW supports the Detached
55401 	 * Centralized Memory Model. The memory is allocated and managed
55402 	 * as a separate entity. All PFs and VFs will be granted direct
55403 	 * or semi-direct access to the allocated memory while none of
55404 	 * which can interfere with the management of the memory.
55405 	 */
55406 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_FLAGS_DETACHED_CENTRALIZED_MEMORY_MODEL_SUPPORTED \
55407 		UINT32_C(0x8)
55408 	uint32_t	unused_0;
55409 	uint32_t	supported;
55410 	/*
55411 	 * If set to 1, then EEM KEY0 table is supported using crc32 hash.
55412 	 * If set to 0, EEM KEY0 table is not supported.
55413 	 */
55414 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_SUPPORTED_KEY0_TABLE \
55415 		UINT32_C(0x1)
55416 	/*
55417 	 * If set to 1, then EEM KEY1 table is supported using lookup3 hash.
55418 	 * If set to 0, EEM KEY1 table is not supported.
55419 	 */
55420 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_SUPPORTED_KEY1_TABLE \
55421 		UINT32_C(0x2)
55422 	/*
55423 	 * If set to 1, then EEM External Record table is supported.
55424 	 * If set to 0, EEM External Record table is not supported.
55425 	 * (This table includes action record, EFC pointers, encap pointers)
55426 	 */
55427 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_SUPPORTED_EXTERNAL_RECORD_TABLE \
55428 		UINT32_C(0x4)
55429 	/*
55430 	 * If set to 1, then EEM External Flow Counters table is supported.
55431 	 * If set to 0, EEM External Flow Counters table is not supported.
55432 	 */
55433 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_SUPPORTED_EXTERNAL_FLOW_COUNTERS_TABLE \
55434 		UINT32_C(0x8)
55435 	/*
55436 	 * If set to 1, then FID table used for implicit flow flush is
55437 	 * supported.
55438 	 * If set to 0, then FID table used for implicit flow flush is
55439 	 * not supported.
55440 	 */
55441 	#define HWRM_CFA_EEM_QCAPS_OUTPUT_SUPPORTED_FID_TABLE \
55442 		UINT32_C(0x10)
55443 	/*
55444 	 * The maximum number of entries supported by EEM. When configuring
55445 	 * the host memory, the number of numbers of entries that can
55446 	 * supported are:
55447 	 *     32k, 64k 128k, 256k, 512k, 1M, 2M, 4M, 8M, 32M, 64M, 128M
55448 	 *     entries.
55449 	 * Any value that are not these values, the FW will round down to the
55450 	 * closest support number of entries.
55451 	 */
55452 	uint32_t	max_entries_supported;
55453 	/* The entry size in bytes of each entry in the EEM KEY0/KEY1 tables. */
55454 	uint16_t	key_entry_size;
55455 	/* The entry size in bytes of each entry in the EEM RECORD tables. */
55456 	uint16_t	record_entry_size;
55457 	/* The entry size in bytes of each entry in the EEM EFC tables. */
55458 	uint16_t	efc_entry_size;
55459 	/* The FID size in bytes of each entry in the EEM FID tables. */
55460 	uint16_t	fid_entry_size;
55461 	uint8_t	unused_1[7];
55462 	/*
55463 	 * This field is used in Output records to indicate that the output
55464 	 * is completely written to RAM. This field should be read as '1'
55465 	 * to indicate that the output has been completely written.
55466 	 * When writing a command completion or response to an internal
55467 	 * processor, the order of writes has to be such that this field is
55468 	 * written last.
55469 	 */
55470 	uint8_t	valid;
55471 } __rte_packed_end;
55472 
55473 /********************
55474  * hwrm_cfa_eem_cfg *
55475  ********************/
55476 
55477 
55478 /* hwrm_cfa_eem_cfg_input (size:384b/48B) */
55479 struct __rte_packed_begin hwrm_cfa_eem_cfg_input {
55480 	/* The HWRM command request type. */
55481 	uint16_t	req_type;
55482 	/*
55483 	 * The completion ring to send the completion event on. This should
55484 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55485 	 */
55486 	uint16_t	cmpl_ring;
55487 	/*
55488 	 * The sequence ID is used by the driver for tracking multiple
55489 	 * commands. This ID is treated as opaque data by the firmware and
55490 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55491 	 */
55492 	uint16_t	seq_id;
55493 	/*
55494 	 * The target ID of the command:
55495 	 * * 0x0-0xFFF8 - The function ID
55496 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55497 	 * * 0xFFFD - Reserved for user-space HWRM interface
55498 	 * * 0xFFFF - HWRM
55499 	 */
55500 	uint16_t	target_id;
55501 	/*
55502 	 * A physical address pointer pointing to a host buffer that the
55503 	 * command's response data will be written. This can be either a host
55504 	 * physical address (HPA) or a guest physical address (GPA) and must
55505 	 * point to a physically contiguous block of memory.
55506 	 */
55507 	uint64_t	resp_addr;
55508 	uint32_t	flags;
55509 	/*
55510 	 * When set to 1, indicates the configuration will apply to TX flows
55511 	 * which are to be offloaded.
55512 	 * Note if this bit is set then the path_rx bit can't be set.
55513 	 */
55514 	#define HWRM_CFA_EEM_CFG_INPUT_FLAGS_PATH_TX \
55515 		UINT32_C(0x1)
55516 	/*
55517 	 * When set to 1, indicates the configuration will apply to RX flows
55518 	 * which are to be offloaded.
55519 	 * Note if this bit is set then the path_tx bit can't be set.
55520 	 */
55521 	#define HWRM_CFA_EEM_CFG_INPUT_FLAGS_PATH_RX \
55522 		UINT32_C(0x2)
55523 	/* When set to 1, all offloaded flows will be sent to EEM. */
55524 	#define HWRM_CFA_EEM_CFG_INPUT_FLAGS_PREFERRED_OFFLOAD \
55525 		UINT32_C(0x4)
55526 	/* When set to 1, secondary, 0 means primary. */
55527 	#define HWRM_CFA_EEM_CFG_INPUT_FLAGS_SECONDARY_PF \
55528 		UINT32_C(0x8)
55529 	/*
55530 	 * Group_id which used by Firmware to identify memory pools belonging
55531 	 * to certain group.
55532 	 */
55533 	uint16_t	group_id;
55534 	uint16_t	unused_0;
55535 	/*
55536 	 * Configured EEM with the given number of entries. All the EEM tables
55537 	 * KEY0, KEY1, RECORD, EFC all have the same number of entries and all
55538 	 * tables will be configured using this value. Current minimum value
55539 	 * is 32k. Current maximum value is 128M.
55540 	 */
55541 	uint32_t	num_entries;
55542 	uint32_t	unused_1;
55543 	/* Configured EEM with the given context if for KEY0 table. */
55544 	uint16_t	key0_ctx_id;
55545 	/* Configured EEM with the given context if for KEY1 table. */
55546 	uint16_t	key1_ctx_id;
55547 	/* Configured EEM with the given context if for RECORD table. */
55548 	uint16_t	record_ctx_id;
55549 	/* Configured EEM with the given context if for EFC table. */
55550 	uint16_t	efc_ctx_id;
55551 	/* Configured EEM with the given context if for EFC table. */
55552 	uint16_t	fid_ctx_id;
55553 	uint16_t	unused_2;
55554 	uint32_t	unused_3;
55555 } __rte_packed_end;
55556 
55557 /* hwrm_cfa_eem_cfg_output (size:128b/16B) */
55558 struct __rte_packed_begin hwrm_cfa_eem_cfg_output {
55559 	/* The specific error status for the command. */
55560 	uint16_t	error_code;
55561 	/* The HWRM command request type. */
55562 	uint16_t	req_type;
55563 	/* The sequence ID from the original command. */
55564 	uint16_t	seq_id;
55565 	/* The length of the response data in number of bytes. */
55566 	uint16_t	resp_len;
55567 	uint8_t	unused_0[7];
55568 	/*
55569 	 * This field is used in Output records to indicate that the output
55570 	 * is completely written to RAM. This field should be read as '1'
55571 	 * to indicate that the output has been completely written.
55572 	 * When writing a command completion or response to an internal
55573 	 * processor, the order of writes has to be such that this field is
55574 	 * written last.
55575 	 */
55576 	uint8_t	valid;
55577 } __rte_packed_end;
55578 
55579 /*********************
55580  * hwrm_cfa_eem_qcfg *
55581  *********************/
55582 
55583 
55584 /* hwrm_cfa_eem_qcfg_input (size:192b/24B) */
55585 struct __rte_packed_begin hwrm_cfa_eem_qcfg_input {
55586 	/* The HWRM command request type. */
55587 	uint16_t	req_type;
55588 	/*
55589 	 * The completion ring to send the completion event on. This should
55590 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55591 	 */
55592 	uint16_t	cmpl_ring;
55593 	/*
55594 	 * The sequence ID is used by the driver for tracking multiple
55595 	 * commands. This ID is treated as opaque data by the firmware and
55596 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55597 	 */
55598 	uint16_t	seq_id;
55599 	/*
55600 	 * The target ID of the command:
55601 	 * * 0x0-0xFFF8 - The function ID
55602 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55603 	 * * 0xFFFD - Reserved for user-space HWRM interface
55604 	 * * 0xFFFF - HWRM
55605 	 */
55606 	uint16_t	target_id;
55607 	/*
55608 	 * A physical address pointer pointing to a host buffer that the
55609 	 * command's response data will be written. This can be either a host
55610 	 * physical address (HPA) or a guest physical address (GPA) and must
55611 	 * point to a physically contiguous block of memory.
55612 	 */
55613 	uint64_t	resp_addr;
55614 	uint32_t	flags;
55615 	/* When set to 1, indicates the configuration is the TX flow. */
55616 	#define HWRM_CFA_EEM_QCFG_INPUT_FLAGS_PATH_TX     UINT32_C(0x1)
55617 	/* When set to 1, indicates the configuration is the RX flow. */
55618 	#define HWRM_CFA_EEM_QCFG_INPUT_FLAGS_PATH_RX     UINT32_C(0x2)
55619 	uint32_t	unused_0;
55620 } __rte_packed_end;
55621 
55622 /* hwrm_cfa_eem_qcfg_output (size:256b/32B) */
55623 struct __rte_packed_begin hwrm_cfa_eem_qcfg_output {
55624 	/* The specific error status for the command. */
55625 	uint16_t	error_code;
55626 	/* The HWRM command request type. */
55627 	uint16_t	req_type;
55628 	/* The sequence ID from the original command. */
55629 	uint16_t	seq_id;
55630 	/* The length of the response data in number of bytes. */
55631 	uint16_t	resp_len;
55632 	uint32_t	flags;
55633 	/* When set to 1, indicates the configuration is the TX flow. */
55634 	#define HWRM_CFA_EEM_QCFG_OUTPUT_FLAGS_PATH_TX \
55635 		UINT32_C(0x1)
55636 	/* When set to 1, indicates the configuration is the RX flow. */
55637 	#define HWRM_CFA_EEM_QCFG_OUTPUT_FLAGS_PATH_RX \
55638 		UINT32_C(0x2)
55639 	/* When set to 1, all offloaded flows will be sent to EEM. */
55640 	#define HWRM_CFA_EEM_QCFG_OUTPUT_FLAGS_PREFERRED_OFFLOAD \
55641 		UINT32_C(0x4)
55642 	/* The number of entries the FW has configured for EEM. */
55643 	uint32_t	num_entries;
55644 	/* Configured EEM with the given context if for KEY0 table. */
55645 	uint16_t	key0_ctx_id;
55646 	/* Configured EEM with the given context if for KEY1 table. */
55647 	uint16_t	key1_ctx_id;
55648 	/* Configured EEM with the given context if for RECORD table. */
55649 	uint16_t	record_ctx_id;
55650 	/* Configured EEM with the given context if for EFC table. */
55651 	uint16_t	efc_ctx_id;
55652 	/* Configured EEM with the given context if for EFC table. */
55653 	uint16_t	fid_ctx_id;
55654 	uint8_t	unused_2[5];
55655 	/*
55656 	 * This field is used in Output records to indicate that the output
55657 	 * is completely written to RAM. This field should be read as '1'
55658 	 * to indicate that the output has been completely written.
55659 	 * When writing a command completion or response to an internal
55660 	 * processor, the order of writes has to be such that this field is
55661 	 * written last.
55662 	 */
55663 	uint8_t	valid;
55664 } __rte_packed_end;
55665 
55666 /*******************
55667  * hwrm_cfa_eem_op *
55668  *******************/
55669 
55670 
55671 /* hwrm_cfa_eem_op_input (size:192b/24B) */
55672 struct __rte_packed_begin hwrm_cfa_eem_op_input {
55673 	/* The HWRM command request type. */
55674 	uint16_t	req_type;
55675 	/*
55676 	 * The completion ring to send the completion event on. This should
55677 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55678 	 */
55679 	uint16_t	cmpl_ring;
55680 	/*
55681 	 * The sequence ID is used by the driver for tracking multiple
55682 	 * commands. This ID is treated as opaque data by the firmware and
55683 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55684 	 */
55685 	uint16_t	seq_id;
55686 	/*
55687 	 * The target ID of the command:
55688 	 * * 0x0-0xFFF8 - The function ID
55689 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55690 	 * * 0xFFFD - Reserved for user-space HWRM interface
55691 	 * * 0xFFFF - HWRM
55692 	 */
55693 	uint16_t	target_id;
55694 	/*
55695 	 * A physical address pointer pointing to a host buffer that the
55696 	 * command's response data will be written. This can be either a host
55697 	 * physical address (HPA) or a guest physical address (GPA) and must
55698 	 * point to a physically contiguous block of memory.
55699 	 */
55700 	uint64_t	resp_addr;
55701 	uint32_t	flags;
55702 	/*
55703 	 * When set to 1, indicates the host memory which is passed will be
55704 	 * used for the TX flow offload function specified in fid.
55705 	 * Note if this bit is set then the path_rx bit can't be set.
55706 	 */
55707 	#define HWRM_CFA_EEM_OP_INPUT_FLAGS_PATH_TX     UINT32_C(0x1)
55708 	/*
55709 	 * When set to 1, indicates the host memory which is passed will be
55710 	 * used for the RX flow offload function specified in fid.
55711 	 * Note if this bit is set then the path_tx bit can't be set.
55712 	 */
55713 	#define HWRM_CFA_EEM_OP_INPUT_FLAGS_PATH_RX     UINT32_C(0x2)
55714 	uint16_t	unused_0;
55715 	/* The number of EEM key table entries to be configured. */
55716 	uint16_t	op;
55717 	/* This value is reserved and should not be used. */
55718 	#define HWRM_CFA_EEM_OP_INPUT_OP_RESERVED    UINT32_C(0x0)
55719 	/*
55720 	 * To properly stop EEM and ensure there are no DMA's, the caller
55721 	 * must disable EEM for the given PF, using this call. This will
55722 	 * safely disable EEM and ensure that all DMA'ed to the
55723 	 * keys/records/efc have been completed.
55724 	 */
55725 	#define HWRM_CFA_EEM_OP_INPUT_OP_EEM_DISABLE UINT32_C(0x1)
55726 	/*
55727 	 * Once the EEM host memory has been configured, EEM options have
55728 	 * been configured. Then the caller should enable EEM for the given
55729 	 * PF. Note once this call has been made, then the EEM mechanism
55730 	 * will be active and DMA's will occur as packets are processed.
55731 	 */
55732 	#define HWRM_CFA_EEM_OP_INPUT_OP_EEM_ENABLE  UINT32_C(0x2)
55733 	/*
55734 	 * Clear EEM settings for the given PF so that the register values
55735 	 * are reset back to there initial state.
55736 	 */
55737 	#define HWRM_CFA_EEM_OP_INPUT_OP_EEM_CLEANUP UINT32_C(0x3)
55738 	#define HWRM_CFA_EEM_OP_INPUT_OP_LAST \
55739 		HWRM_CFA_EEM_OP_INPUT_OP_EEM_CLEANUP
55740 } __rte_packed_end;
55741 
55742 /* hwrm_cfa_eem_op_output (size:128b/16B) */
55743 struct __rte_packed_begin hwrm_cfa_eem_op_output {
55744 	/* The specific error status for the command. */
55745 	uint16_t	error_code;
55746 	/* The HWRM command request type. */
55747 	uint16_t	req_type;
55748 	/* The sequence ID from the original command. */
55749 	uint16_t	seq_id;
55750 	/* The length of the response data in number of bytes. */
55751 	uint16_t	resp_len;
55752 	uint8_t	unused_0[7];
55753 	/*
55754 	 * This field is used in Output records to indicate that the output
55755 	 * is completely written to RAM. This field should be read as '1'
55756 	 * to indicate that the output has been completely written.
55757 	 * When writing a command completion or response to an internal
55758 	 * processor, the order of writes has to be such that this field is
55759 	 * written last.
55760 	 */
55761 	uint8_t	valid;
55762 } __rte_packed_end;
55763 
55764 /********************************
55765  * hwrm_cfa_adv_flow_mgnt_qcaps *
55766  ********************************/
55767 
55768 
55769 /* hwrm_cfa_adv_flow_mgnt_qcaps_input (size:256b/32B) */
55770 struct __rte_packed_begin hwrm_cfa_adv_flow_mgnt_qcaps_input {
55771 	/* The HWRM command request type. */
55772 	uint16_t	req_type;
55773 	/*
55774 	 * The completion ring to send the completion event on. This should
55775 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55776 	 */
55777 	uint16_t	cmpl_ring;
55778 	/*
55779 	 * The sequence ID is used by the driver for tracking multiple
55780 	 * commands. This ID is treated as opaque data by the firmware and
55781 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
55782 	 */
55783 	uint16_t	seq_id;
55784 	/*
55785 	 * The target ID of the command:
55786 	 * * 0x0-0xFFF8 - The function ID
55787 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
55788 	 * * 0xFFFD - Reserved for user-space HWRM interface
55789 	 * * 0xFFFF - HWRM
55790 	 */
55791 	uint16_t	target_id;
55792 	/*
55793 	 * A physical address pointer pointing to a host buffer that the
55794 	 * command's response data will be written. This can be either a host
55795 	 * physical address (HPA) or a guest physical address (GPA) and must
55796 	 * point to a physically contiguous block of memory.
55797 	 */
55798 	uint64_t	resp_addr;
55799 	uint32_t	unused_0[4];
55800 } __rte_packed_end;
55801 
55802 /* hwrm_cfa_adv_flow_mgnt_qcaps_output (size:128b/16B) */
55803 struct __rte_packed_begin hwrm_cfa_adv_flow_mgnt_qcaps_output {
55804 	/* The specific error status for the command. */
55805 	uint16_t	error_code;
55806 	/* The HWRM command request type. */
55807 	uint16_t	req_type;
55808 	/* The sequence ID from the original command. */
55809 	uint16_t	seq_id;
55810 	/* The length of the response data in number of bytes. */
55811 	uint16_t	resp_len;
55812 	uint32_t	flags;
55813 	/*
55814 	 * Value of 1 to indicate firmware support 16-bit flow handle.
55815 	 * Value of 0 to indicate firmware not support 16-bit flow handle.
55816 	 */
55817 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_FLOW_HND_16BIT_SUPPORTED \
55818 		UINT32_C(0x1)
55819 	/*
55820 	 * Value of 1 to indicate firmware support 64-bit flow handle.
55821 	 * Value of 0 to indicate firmware not support 64-bit flow handle.
55822 	 */
55823 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_FLOW_HND_64BIT_SUPPORTED \
55824 		UINT32_C(0x2)
55825 	/*
55826 	 * Value of 1 to indicate firmware support flow batch delete
55827 	 * operation through HWRM_CFA_FLOW_FLUSH command.
55828 	 * Value of 0 to indicate that the firmware does not support flow
55829 	 * batch delete operation. (deprecated)
55830 	 */
55831 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_FLOW_BATCH_DELETE_SUPPORTED \
55832 		UINT32_C(0x4)
55833 	/*
55834 	 * Value of 1 to indicate that the firmware support flow reset all
55835 	 * operation through HWRM_CFA_FLOW_FLUSH command.
55836 	 * Value of 0 indicates firmware does not support flow reset all
55837 	 * operation. (deprecated)
55838 	 */
55839 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_FLOW_RESET_ALL_SUPPORTED \
55840 		UINT32_C(0x8)
55841 	/*
55842 	 * Value of 1 to indicate that firmware supports use of FID as
55843 	 * dest_id in HWRM_CFA_NTUPLE_ALLOC/CFG commands.
55844 	 * Value of 0 indicates firmware does not support use of FID as
55845 	 * dest_id.
55846 	 */
55847 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NTUPLE_FLOW_DEST_FUNC_SUPPORTED \
55848 		UINT32_C(0x10)
55849 	/*
55850 	 * Value of 1 to indicate that firmware supports TX EEM flows.
55851 	 * Value of 0 indicates firmware does not support TX EEM flows.
55852 	 * (deprecated)
55853 	 */
55854 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_TX_EEM_FLOW_SUPPORTED \
55855 		UINT32_C(0x20)
55856 	/*
55857 	 * Value of 1 to indicate that firmware supports RX EEM flows.
55858 	 * Value of 0 indicates firmware does not support RX EEM flows.
55859 	 * (deprecated)
55860 	 */
55861 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RX_EEM_FLOW_SUPPORTED \
55862 		UINT32_C(0x40)
55863 	/*
55864 	 * Value of 1 to indicate that firmware supports the dynamic
55865 	 * allocation of an on-chip flow counter which can be used for EEM
55866 	 * flows. Value of 0 indicates firmware does not support the dynamic
55867 	 * allocation of an on-chip flow counter.
55868 	 * (deprecated)
55869 	 */
55870 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_FLOW_COUNTER_ALLOC_SUPPORTED \
55871 		UINT32_C(0x80)
55872 	/*
55873 	 * Value of 1 to indicate that firmware supports setting of
55874 	 * rfs_ring_tbl_idx in HWRM_CFA_NTUPLE_ALLOC command.
55875 	 * Value of 0 indicates firmware does not support rfs_ring_tbl_idx.
55876 	 */
55877 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RFS_RING_TBL_IDX_SUPPORTED \
55878 		UINT32_C(0x100)
55879 	/*
55880 	 * Value of 1 to indicate that firmware supports untagged matching
55881 	 * criteria on HWRM_CFA_L2_FILTER_ALLOC command. Value of 0
55882 	 * indicates firmware does not support untagged matching.
55883 	 */
55884 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_UNTAGGED_VLAN_SUPPORTED \
55885 		UINT32_C(0x200)
55886 	/*
55887 	 * Value of 1 to indicate that firmware supports XDP filter. Value
55888 	 * of 0 indicates firmware does not support XDP filter.
55889 	 */
55890 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_XDP_SUPPORTED \
55891 		UINT32_C(0x400)
55892 	/*
55893 	 * Value of 1 to indicate that the firmware support L2 header source
55894 	 * fields matching criteria on HWRM_CFA_L2_FILTER_ALLOC command.
55895 	 * Value of 0 indicates firmware does not support L2 header source
55896 	 * fields matching.
55897 	 */
55898 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_L2_HEADER_SOURCE_FIELDS_SUPPORTED \
55899 		UINT32_C(0x800)
55900 	/*
55901 	 * If set to 1, firmware is capable of supporting ARP ethertype as
55902 	 * matching criteria for HWRM_CFA_NTUPLE_FILTER_ALLOC command on the
55903 	 * RX direction. By default, this flag should be 0 for older version
55904 	 * of firmware.
55905 	 */
55906 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NTUPLE_FLOW_RX_ARP_SUPPORTED \
55907 		UINT32_C(0x1000)
55908 	/*
55909 	 * Value of 1 to indicate that firmware supports setting of
55910 	 * rfs_ring_tbl_idx in dst_id field of the HWRM_CFA_NTUPLE_ALLOC
55911 	 * command. Value of 0 indicates firmware does not support
55912 	 * rfs_ring_tbl_idx in dst_id field.
55913 	 */
55914 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RFS_RING_TBL_IDX_V2_SUPPORTED \
55915 		UINT32_C(0x2000)
55916 	/*
55917 	 * If set to 1, firmware is capable of supporting IPv4/IPv6 as
55918 	 * ethertype in HWRM_CFA_NTUPLE_FILTER_ALLOC command on the RX
55919 	 * direction. By default, this flag should be 0 for older version
55920 	 * of firmware.
55921 	 */
55922 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NTUPLE_FLOW_RX_ETHERTYPE_IP_SUPPORTED \
55923 		UINT32_C(0x4000)
55924 	/*
55925 	 * When this bit is '1', it indicates that core firmware is
55926 	 * capable of TruFlow. Driver can restrict sending HWRM CFA_FLOW_XXX
55927 	 * and CFA_ENCAP_XXX, CFA_DECAP_XXX commands.
55928 	 */
55929 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_TRUFLOW_CAPABLE \
55930 		UINT32_C(0x8000)
55931 	/*
55932 	 * If set to 1, firmware is capable of supporting L2/ROCE as
55933 	 * traffic type in flags field of HWRM_CFA_L2_FILTER_ALLOC command.
55934 	 * By default, this flag should be 0 for older version of firmware.
55935 	 */
55936 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_L2_FILTER_TRAFFIC_TYPE_L2_ROCE_SUPPORTED \
55937 		UINT32_C(0x10000)
55938 	/*
55939 	 * If set to 1, firmware is capable of HW LAG. This bit is only
55940 	 * advertised if the calling function is a PAXC function.
55941 	 */
55942 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_LAG_SUPPORTED \
55943 		UINT32_C(0x20000)
55944 	/*
55945 	 * If set to 1, firmware is capable installing ntuple rules without
55946 	 * additional classification on the L2 Context.
55947 	 */
55948 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NTUPLE_FLOW_NO_L2CTX_SUPPORTED \
55949 		UINT32_C(0x40000)
55950 	/*
55951 	 * If set to 1, firmware is capable returning stats for nic flows
55952 	 * in cfa_flow_stats command where flow_handle value 0xF000.
55953 	 */
55954 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NIC_FLOW_STATS_SUPPORTED \
55955 		UINT32_C(0x80000)
55956 	/*
55957 	 * If set to 1, firmware is capable of supporting these additional
55958 	 * ip_protocols: ICMP, ICMPV6, RSVD for ntuple rules. By default,
55959 	 * this flag should be 0 for older version of firmware.
55960 	 */
55961 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_NTUPLE_FLOW_RX_EXT_IP_PROTO_SUPPORTED \
55962 		UINT32_C(0x100000)
55963 	/*
55964 	 * Value of 1 to indicate that firmware supports setting of
55965 	 * rfs_ring_tbl_idx (new offset) in HWRM_CFA_NTUPLE_ALLOC command.
55966 	 * Value of 0 indicates ring tbl idx should be passed using dst_id.
55967 	 */
55968 	#define HWRM_CFA_ADV_FLOW_MGNT_QCAPS_OUTPUT_FLAGS_RFS_RING_TBL_IDX_V3_SUPPORTED \
55969 		UINT32_C(0x200000)
55970 	uint8_t	unused_0[3];
55971 	/*
55972 	 * This field is used in Output records to indicate that the output
55973 	 * is completely written to RAM. This field should be read as '1'
55974 	 * to indicate that the output has been completely written.
55975 	 * When writing a command completion or response to an internal
55976 	 * processor, the order of writes has to be such that this field is
55977 	 * written last.
55978 	 */
55979 	uint8_t	valid;
55980 } __rte_packed_end;
55981 
55982 /******************
55983  * hwrm_cfa_tflib *
55984  ******************/
55985 
55986 
55987 /* hwrm_cfa_tflib_input (size:1024b/128B) */
55988 struct __rte_packed_begin hwrm_cfa_tflib_input {
55989 	/* The HWRM command request type. */
55990 	uint16_t	req_type;
55991 	/*
55992 	 * The completion ring to send the completion event on. This should
55993 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
55994 	 */
55995 	uint16_t	cmpl_ring;
55996 	/*
55997 	 * The sequence ID is used by the driver for tracking multiple
55998 	 * commands. This ID is treated as opaque data by the firmware and
55999 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56000 	 */
56001 	uint16_t	seq_id;
56002 	/*
56003 	 * The target ID of the command:
56004 	 * * 0x0-0xFFF8 - The function ID
56005 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56006 	 * * 0xFFFD - Reserved for user-space HWRM interface
56007 	 * * 0xFFFF - HWRM
56008 	 */
56009 	uint16_t	target_id;
56010 	/*
56011 	 * A physical address pointer pointing to a host buffer that the
56012 	 * command's response data will be written. This can be either a host
56013 	 * physical address (HPA) or a guest physical address (GPA) and must
56014 	 * point to a physically contiguous block of memory.
56015 	 */
56016 	uint64_t	resp_addr;
56017 	/* TFLIB message type. */
56018 	uint16_t	tf_type;
56019 	/* TFLIB message subtype. */
56020 	uint16_t	tf_subtype;
56021 	/* unused. */
56022 	uint8_t	unused0[4];
56023 	/* TFLIB request data. */
56024 	uint32_t	tf_req[26];
56025 } __rte_packed_end;
56026 
56027 /* hwrm_cfa_tflib_output (size:5632b/704B) */
56028 struct __rte_packed_begin hwrm_cfa_tflib_output {
56029 	/* The specific error status for the command. */
56030 	uint16_t	error_code;
56031 	/* The HWRM command request type. */
56032 	uint16_t	req_type;
56033 	/* The sequence ID from the original command. */
56034 	uint16_t	seq_id;
56035 	/* The length of the response data in number of bytes. */
56036 	uint16_t	resp_len;
56037 	/* TFLIB message type. */
56038 	uint16_t	tf_type;
56039 	/* TFLIB message subtype. */
56040 	uint16_t	tf_subtype;
56041 	/* TFLIB response code */
56042 	uint32_t	tf_resp_code;
56043 	/* TFLIB response data. */
56044 	uint32_t	tf_resp[170];
56045 	/* unused. */
56046 	uint8_t	unused1[7];
56047 	/*
56048 	 * This field is used in Output records to indicate that the output
56049 	 * is completely written to RAM. This field should be read as '1'
56050 	 * to indicate that the output has been completely written.
56051 	 * When writing a command completion or response to an internal
56052 	 * processor, the order of writes has to be such that this field is
56053 	 * written last.
56054 	 */
56055 	uint8_t	valid;
56056 } __rte_packed_end;
56057 
56058 /**********************************
56059  * hwrm_cfa_lag_group_member_rgtr *
56060  **********************************/
56061 
56062 
56063 /* hwrm_cfa_lag_group_member_rgtr_input (size:192b/24B) */
56064 struct __rte_packed_begin hwrm_cfa_lag_group_member_rgtr_input {
56065 	/* The HWRM command request type. */
56066 	uint16_t	req_type;
56067 	/*
56068 	 * The completion ring to send the completion event on. This should
56069 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56070 	 */
56071 	uint16_t	cmpl_ring;
56072 	/*
56073 	 * The sequence ID is used by the driver for tracking multiple
56074 	 * commands. This ID is treated as opaque data by the firmware and
56075 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56076 	 */
56077 	uint16_t	seq_id;
56078 	/*
56079 	 * The target ID of the command:
56080 	 * * 0x0-0xFFF8 - The function ID
56081 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56082 	 * * 0xFFFD - Reserved for user-space HWRM interface
56083 	 * * 0xFFFF - HWRM
56084 	 */
56085 	uint16_t	target_id;
56086 	/*
56087 	 * A physical address pointer pointing to a host buffer that the
56088 	 * command's response data will be written. This can be either a host
56089 	 * physical address (HPA) or a guest physical address (GPA) and must
56090 	 * point to a physically contiguous block of memory.
56091 	 */
56092 	uint64_t	resp_addr;
56093 	uint8_t	mode;
56094 	/*
56095 	 * Transmit only on the active port. Automatically failover
56096 	 * to backup port.
56097 	 */
56098 	#define HWRM_CFA_LAG_GROUP_MEMBER_RGTR_INPUT_MODE_ACTIVE_BACKUP \
56099 		UINT32_C(0x1)
56100 	/*
56101 	 * Transmit based on packet header ntuple hash. Packet with only
56102 	 * layer 2 headers will hash using the destination MAC, source MAC
56103 	 * and Ethertype fields. Packets with layer 3 (IP) headers will
56104 	 * hash using the destination MAC, source MAC, IP protocol/next
56105 	 * header, source IP address and destination IP address. Packets
56106 	 * with layer 4 (TCP/UDP) headers will hash using the destination
56107 	 * MAC, source MAC, IP protocol/next header, source IP address,
56108 	 * destination IP address, source port and destination port fields.
56109 	 */
56110 	#define HWRM_CFA_LAG_GROUP_MEMBER_RGTR_INPUT_MODE_BALANCE_XOR \
56111 		UINT32_C(0x2)
56112 	/* Transmit packets on all specified ports. */
56113 	#define HWRM_CFA_LAG_GROUP_MEMBER_RGTR_INPUT_MODE_BROADCAST \
56114 		UINT32_C(0x3)
56115 	#define HWRM_CFA_LAG_GROUP_MEMBER_RGTR_INPUT_MODE_LAST \
56116 		HWRM_CFA_LAG_GROUP_MEMBER_RGTR_INPUT_MODE_BROADCAST
56117 	/*
56118 	 * Supports up to 5 ports. bit0 = port 0, bit1 = port 1,
56119 	 * bit2 = port 2, bit3 = port 4, bit4 = loopback port
56120 	 */
56121 	uint8_t	port_bitmap;
56122 	/* Specify the active port when active-backup mode is specified */
56123 	uint8_t	active_port;
56124 	uint8_t	unused_0[5];
56125 } __rte_packed_end;
56126 
56127 /* hwrm_cfa_lag_group_member_rgtr_output (size:128b/16B) */
56128 struct __rte_packed_begin hwrm_cfa_lag_group_member_rgtr_output {
56129 	/* The specific error status for the command. */
56130 	uint16_t	error_code;
56131 	/* The HWRM command request type. */
56132 	uint16_t	req_type;
56133 	/* The sequence ID from the original command. */
56134 	uint16_t	seq_id;
56135 	/* The length of the response data in number of bytes. */
56136 	uint16_t	resp_len;
56137 	/* lag group ID configured for the function */
56138 	uint16_t	lag_id;
56139 	uint8_t	unused_0[5];
56140 	/*
56141 	 * This field is used in Output records to indicate that the output
56142 	 * is completely written to RAM. This field should be read as '1'
56143 	 * to indicate that the output has been completely written.
56144 	 * When writing a command completion or response to an internal
56145 	 * processor, the order of writes has to be such that this field is
56146 	 * written last.
56147 	 */
56148 	uint8_t	valid;
56149 } __rte_packed_end;
56150 
56151 /************************************
56152  * hwrm_cfa_lag_group_member_unrgtr *
56153  ************************************/
56154 
56155 
56156 /* hwrm_cfa_lag_group_member_unrgtr_input (size:192b/24B) */
56157 struct __rte_packed_begin hwrm_cfa_lag_group_member_unrgtr_input {
56158 	/* The HWRM command request type. */
56159 	uint16_t	req_type;
56160 	/*
56161 	 * The completion ring to send the completion event on. This should
56162 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56163 	 */
56164 	uint16_t	cmpl_ring;
56165 	/*
56166 	 * The sequence ID is used by the driver for tracking multiple
56167 	 * commands. This ID is treated as opaque data by the firmware and
56168 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56169 	 */
56170 	uint16_t	seq_id;
56171 	/*
56172 	 * The target ID of the command:
56173 	 * * 0x0-0xFFF8 - The function ID
56174 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56175 	 * * 0xFFFD - Reserved for user-space HWRM interface
56176 	 * * 0xFFFF - HWRM
56177 	 */
56178 	uint16_t	target_id;
56179 	/*
56180 	 * A physical address pointer pointing to a host buffer that the
56181 	 * command's response data will be written. This can be either a host
56182 	 * physical address (HPA) or a guest physical address (GPA) and must
56183 	 * point to a physically contiguous block of memory.
56184 	 */
56185 	uint64_t	resp_addr;
56186 	/* lag group ID configured for the function */
56187 	uint16_t	lag_id;
56188 	uint8_t	unused_0[6];
56189 } __rte_packed_end;
56190 
56191 /* hwrm_cfa_lag_group_member_unrgtr_output (size:128b/16B) */
56192 struct __rte_packed_begin hwrm_cfa_lag_group_member_unrgtr_output {
56193 	/* The specific error status for the command. */
56194 	uint16_t	error_code;
56195 	/* The HWRM command request type. */
56196 	uint16_t	req_type;
56197 	/* The sequence ID from the original command. */
56198 	uint16_t	seq_id;
56199 	/* The length of the response data in number of bytes. */
56200 	uint16_t	resp_len;
56201 	uint8_t	unused_0[7];
56202 	/*
56203 	 * This field is used in Output records to indicate that the output
56204 	 * is completely written to RAM. This field should be read as '1'
56205 	 * to indicate that the output has been completely written.
56206 	 * When writing a command completion or response to an internal
56207 	 * processor, the order of writes has to be such that this field is
56208 	 * written last.
56209 	 */
56210 	uint8_t	valid;
56211 } __rte_packed_end;
56212 
56213 /*****************************
56214  * hwrm_cfa_tls_filter_alloc *
56215  *****************************/
56216 
56217 
56218 /* hwrm_cfa_tls_filter_alloc_input (size:768b/96B) */
56219 struct __rte_packed_begin hwrm_cfa_tls_filter_alloc_input {
56220 	/* The HWRM command request type. */
56221 	uint16_t	req_type;
56222 	/*
56223 	 * The completion ring to send the completion event on. This should
56224 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56225 	 */
56226 	uint16_t	cmpl_ring;
56227 	/*
56228 	 * The sequence ID is used by the driver for tracking multiple
56229 	 * commands. This ID is treated as opaque data by the firmware and
56230 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56231 	 */
56232 	uint16_t	seq_id;
56233 	/*
56234 	 * The target ID of the command:
56235 	 * * 0x0-0xFFF8 - The function ID
56236 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56237 	 * * 0xFFFD - Reserved for user-space HWRM interface
56238 	 * * 0xFFFF - HWRM
56239 	 */
56240 	uint16_t	target_id;
56241 	/*
56242 	 * A physical address pointer pointing to a host buffer that the
56243 	 * command's response data will be written. This can be either a host
56244 	 * physical address (HPA) or a guest physical address (GPA) and must
56245 	 * point to a physically contiguous block of memory.
56246 	 */
56247 	uint64_t	resp_addr;
56248 	uint32_t	unused_0;
56249 	uint32_t	enables;
56250 	/*
56251 	 * This bit must be '1' for the l2_filter_id field to be
56252 	 * configured.
56253 	 */
56254 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID \
56255 		UINT32_C(0x1)
56256 	/*
56257 	 * This bit must be '1' for the ethertype field to be
56258 	 * configured.
56259 	 */
56260 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_ETHERTYPE \
56261 		UINT32_C(0x2)
56262 	/*
56263 	 * This bit must be '1' for the ipaddr_type field to be
56264 	 * configured.
56265 	 */
56266 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_IPADDR_TYPE \
56267 		UINT32_C(0x4)
56268 	/*
56269 	 * This bit must be '1' for the src_ipaddr field to be
56270 	 * configured.
56271 	 */
56272 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_SRC_IPADDR \
56273 		UINT32_C(0x8)
56274 	/*
56275 	 * This bit must be '1' for the dst_ipaddr field to be
56276 	 * configured.
56277 	 */
56278 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_DST_IPADDR \
56279 		UINT32_C(0x10)
56280 	/*
56281 	 * This bit must be '1' for the ip_protocol field to be
56282 	 * configured.
56283 	 */
56284 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_IP_PROTOCOL \
56285 		UINT32_C(0x20)
56286 	/*
56287 	 * This bit must be '1' for the src_port field to be
56288 	 * configured.
56289 	 */
56290 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_SRC_PORT \
56291 		UINT32_C(0x40)
56292 	/*
56293 	 * This bit must be '1' for the dst_port field to be
56294 	 * configured.
56295 	 */
56296 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_DST_PORT \
56297 		UINT32_C(0x80)
56298 	/*
56299 	 * This bit must be '1' for the kid field to be
56300 	 * configured.
56301 	 */
56302 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_KID \
56303 		UINT32_C(0x100)
56304 	/*
56305 	 * This bit must be '1' for the dst_id field to be
56306 	 * configured.
56307 	 */
56308 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_DST_ID \
56309 		UINT32_C(0x200)
56310 	/*
56311 	 * This bit must be '1' for the mirror_vnic_id field to be
56312 	 * configured.
56313 	 */
56314 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_MIRROR_VNIC_ID \
56315 		UINT32_C(0x400)
56316 	/*
56317 	 * This bit must be '1' for the quic_dst_connect_id field to be
56318 	 * configured.
56319 	 */
56320 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_ENABLES_QUIC_DST_CONNECT_ID \
56321 		UINT32_C(0x800)
56322 	/*
56323 	 * This value identifies a set of CFA data structures used for an L2
56324 	 * context.
56325 	 */
56326 	uint64_t	l2_filter_id;
56327 	uint8_t	unused_1[6];
56328 	/* This value indicates the ethertype in the Ethernet header. */
56329 	uint16_t	ethertype;
56330 	/*
56331 	 * This value indicates the type of IP address.
56332 	 * 4 - IPv4
56333 	 * 6 - IPv6
56334 	 * All others are invalid.
56335 	 */
56336 	uint8_t	ip_addr_type;
56337 	/* invalid */
56338 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_UNKNOWN \
56339 		UINT32_C(0x0)
56340 	/* IPv4 */
56341 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV4 \
56342 		UINT32_C(0x4)
56343 	/* IPv6 */
56344 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6 \
56345 		UINT32_C(0x6)
56346 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_LAST \
56347 		HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_ADDR_TYPE_IPV6
56348 	/*
56349 	 * The value of protocol field in IP header.
56350 	 * Applies to UDP and TCP traffic.
56351 	 * 6 - TCP
56352 	 * 17 - UDP
56353 	 */
56354 	uint8_t	ip_protocol;
56355 	/* invalid */
56356 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_PROTOCOL_UNKNOWN \
56357 		UINT32_C(0x0)
56358 	/* TCP */
56359 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_PROTOCOL_TCP \
56360 		UINT32_C(0x6)
56361 	/* UDP */
56362 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP \
56363 		UINT32_C(0x11)
56364 	#define HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_PROTOCOL_LAST \
56365 		HWRM_CFA_TLS_FILTER_ALLOC_INPUT_IP_PROTOCOL_UDP
56366 	/*
56367 	 * If set, this value shall represent the
56368 	 * Logical VNIC ID of the destination VNIC for the RX
56369 	 * path and network port id of the destination port for
56370 	 * the TX path.
56371 	 */
56372 	uint16_t	dst_id;
56373 	/*
56374 	 * Logical VNIC ID of the VNIC where traffic is
56375 	 * mirrored.
56376 	 */
56377 	uint16_t	mirror_vnic_id;
56378 	uint8_t	unused_2[2];
56379 	/*
56380 	 * The value of source IP address to be used in filtering.
56381 	 * For IPv4, first four bytes represent the IP address.
56382 	 */
56383 	uint32_t	src_ipaddr[4];
56384 	/*
56385 	 * The value of destination IP address to be used in filtering.
56386 	 * For IPv4, first four bytes represent the IP address.
56387 	 */
56388 	uint32_t	dst_ipaddr[4];
56389 	/*
56390 	 * The value of source port to be used in filtering.
56391 	 * Applies to UDP and TCP traffic.
56392 	 */
56393 	uint16_t	src_port;
56394 	/*
56395 	 * The value of destination port to be used in filtering.
56396 	 * Applies to UDP and TCP traffic.
56397 	 */
56398 	uint16_t	dst_port;
56399 	/*
56400 	 * The Key Context Identifier (KID) for use with KTLS or QUIC.
56401 	 * KID is limited to 20-bits.
56402 	 */
56403 	uint32_t	kid;
56404 	/* The Destination Connection ID of QUIC. */
56405 	uint64_t	quic_dst_connect_id;
56406 } __rte_packed_end;
56407 
56408 /* hwrm_cfa_tls_filter_alloc_output (size:192b/24B) */
56409 struct __rte_packed_begin hwrm_cfa_tls_filter_alloc_output {
56410 	/* The specific error status for the command. */
56411 	uint16_t	error_code;
56412 	/* The HWRM command request type. */
56413 	uint16_t	req_type;
56414 	/* The sequence ID from the original command. */
56415 	uint16_t	seq_id;
56416 	/* The length of the response data in number of bytes. */
56417 	uint16_t	resp_len;
56418 	/* This value is an opaque id into CFA data structures. */
56419 	uint64_t	tls_filter_id;
56420 	/*
56421 	 * The flow id value in bit 0-29 is the actual ID of the flow
56422 	 * associated with this filter and it shall be used to match
56423 	 * and associate the flow identifier returned in completion
56424 	 * records. A value of 0xFFFFFFFF in the 32-bit flow_id field
56425 	 * shall indicate no valid flow id.
56426 	 */
56427 	uint32_t	flow_id;
56428 	/* Indicate the flow id value. */
56429 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_MASK \
56430 		UINT32_C(0x3fffffff)
56431 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_VALUE_SFT 0
56432 	/* Indicate type of the flow. */
56433 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE \
56434 		UINT32_C(0x40000000)
56435 	/*
56436 	 * If this bit set to 0, then it indicates that the flow is
56437 	 * internal flow.
56438 	 */
56439 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_INT \
56440 		(UINT32_C(0x0) << 30)
56441 	/*
56442 	 * If this bit is set to 1, then it indicates that the flow is
56443 	 * external flow.
56444 	 */
56445 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT \
56446 		(UINT32_C(0x1) << 30)
56447 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_LAST \
56448 		HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_TYPE_EXT
56449 	/* Indicate the flow direction. */
56450 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR \
56451 		UINT32_C(0x80000000)
56452 	/* If this bit set to 0, then it indicates rx flow. */
56453 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_RX \
56454 		(UINT32_C(0x0) << 31)
56455 	/* If this bit is set to 1, then it indicates that tx flow. */
56456 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX \
56457 		(UINT32_C(0x1) << 31)
56458 	#define HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_LAST \
56459 		HWRM_CFA_TLS_FILTER_ALLOC_OUTPUT_FLOW_ID_DIR_TX
56460 	uint8_t	unused_0[3];
56461 	/*
56462 	 * This field is used in Output records to indicate that the output
56463 	 * is completely written to RAM. This field should be read as '1'
56464 	 * to indicate that the output has been completely written.
56465 	 * When writing a command completion or response to an internal
56466 	 * processor, the order of writes has to be such that this field is
56467 	 * written last.
56468 	 */
56469 	uint8_t	valid;
56470 } __rte_packed_end;
56471 
56472 /****************************
56473  * hwrm_cfa_tls_filter_free *
56474  ****************************/
56475 
56476 
56477 /* hwrm_cfa_tls_filter_free_input (size:192b/24B) */
56478 struct __rte_packed_begin hwrm_cfa_tls_filter_free_input {
56479 	/* The HWRM command request type. */
56480 	uint16_t	req_type;
56481 	/*
56482 	 * The completion ring to send the completion event on. This should
56483 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56484 	 */
56485 	uint16_t	cmpl_ring;
56486 	/*
56487 	 * The sequence ID is used by the driver for tracking multiple
56488 	 * commands. This ID is treated as opaque data by the firmware and
56489 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56490 	 */
56491 	uint16_t	seq_id;
56492 	/*
56493 	 * The target ID of the command:
56494 	 * * 0x0-0xFFF8 - The function ID
56495 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56496 	 * * 0xFFFD - Reserved for user-space HWRM interface
56497 	 * * 0xFFFF - HWRM
56498 	 */
56499 	uint16_t	target_id;
56500 	/*
56501 	 * A physical address pointer pointing to a host buffer that the
56502 	 * command's response data will be written. This can be either a host
56503 	 * physical address (HPA) or a guest physical address (GPA) and must
56504 	 * point to a physically contiguous block of memory.
56505 	 */
56506 	uint64_t	resp_addr;
56507 	/* This value is an opaque id into CFA data structures. */
56508 	uint64_t	tls_filter_id;
56509 } __rte_packed_end;
56510 
56511 /* hwrm_cfa_tls_filter_free_output (size:128b/16B) */
56512 struct __rte_packed_begin hwrm_cfa_tls_filter_free_output {
56513 	/* The specific error status for the command. */
56514 	uint16_t	error_code;
56515 	/* The HWRM command request type. */
56516 	uint16_t	req_type;
56517 	/* The sequence ID from the original command. */
56518 	uint16_t	seq_id;
56519 	/* The length of the response data in number of bytes. */
56520 	uint16_t	resp_len;
56521 	uint8_t	unused_0[7];
56522 	/*
56523 	 * This field is used in Output records to indicate that the output
56524 	 * is completely written to RAM. This field should be read as '1'
56525 	 * to indicate that the output has been completely written.
56526 	 * When writing a command completion or response to an internal
56527 	 * processor, the order of writes has to be such that this field is
56528 	 * written last.
56529 	 */
56530 	uint8_t	valid;
56531 } __rte_packed_end;
56532 
56533 /*****************************
56534  * hwrm_cfa_release_afm_func *
56535  *****************************/
56536 
56537 
56538 /* hwrm_cfa_release_afm_func_input (size:256b/32B) */
56539 struct __rte_packed_begin hwrm_cfa_release_afm_func_input {
56540 	/* The HWRM command request type. */
56541 	uint16_t	req_type;
56542 	/*
56543 	 * The completion ring to send the completion event on. This should
56544 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56545 	 */
56546 	uint16_t	cmpl_ring;
56547 	/*
56548 	 * The sequence ID is used by the driver for tracking multiple
56549 	 * commands. This ID is treated as opaque data by the firmware and
56550 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56551 	 */
56552 	uint16_t	seq_id;
56553 	/*
56554 	 * The target ID of the command:
56555 	 * * 0x0-0xFFF8 - The function ID
56556 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56557 	 * * 0xFFFD - Reserved for user-space HWRM interface
56558 	 * * 0xFFFF - HWRM
56559 	 */
56560 	uint16_t	target_id;
56561 	/*
56562 	 * A physical address pointer pointing to a host buffer that the
56563 	 * command's response data will be written. This can be either a host
56564 	 * physical address (HPA) or a guest physical address (GPA) and must
56565 	 * point to a physically contiguous block of memory.
56566 	 */
56567 	uint64_t	resp_addr;
56568 	/* Function identifier, may be of type efid, rfid or dfid. */
56569 	uint16_t	fid;
56570 	/* Representor function identifier. */
56571 	uint16_t	rfid;
56572 	/* Fid type. */
56573 	uint8_t	type;
56574 	/* Endpoint fid. */
56575 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_EFID UINT32_C(0x1)
56576 	/* Representor fid. */
56577 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_RFID UINT32_C(0x2)
56578 	/* Redirect fid. */
56579 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_DFID UINT32_C(0x3)
56580 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_LAST \
56581 		HWRM_CFA_RELEASE_AFM_FUNC_INPUT_TYPE_DFID
56582 	uint8_t	unused_0[3];
56583 	/*
56584 	 * Flags used to control AFMs actions when releasing the function.
56585 	 * Only used when type is dfid.
56586 	 */
56587 	uint32_t	flags;
56588 	/* Remove broadcast. */
56589 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_FLAGS_BC_REM \
56590 		UINT32_C(0x1)
56591 	/* Remove multicast. */
56592 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_FLAGS_MC_REM \
56593 		UINT32_C(0x2)
56594 	/* Remove promiscuous. */
56595 	#define HWRM_CFA_RELEASE_AFM_FUNC_INPUT_FLAGS_PROMISC_REM \
56596 		UINT32_C(0x4)
56597 	uint32_t	unused_1;
56598 } __rte_packed_end;
56599 
56600 /* hwrm_cfa_release_afm_func_output (size:128b/16B) */
56601 struct __rte_packed_begin hwrm_cfa_release_afm_func_output {
56602 	/* The specific error status for the command. */
56603 	uint16_t	error_code;
56604 	/* The HWRM command request type. */
56605 	uint16_t	req_type;
56606 	/* The sequence ID from the original command. */
56607 	uint16_t	seq_id;
56608 	/* The length of the response data in number of bytes. */
56609 	uint16_t	resp_len;
56610 	uint8_t	unused_0[7];
56611 	/*
56612 	 * This field is used in Output records to indicate that the output
56613 	 * is completely written to RAM. This field should be read as '1'
56614 	 * to indicate that the output has been completely written.
56615 	 * When writing a command completion or response to an internal
56616 	 * processor, the order of writes has to be such that this field is
56617 	 * written last.
56618 	 */
56619 	uint8_t	valid;
56620 } __rte_packed_end;
56621 
56622 /***********
56623  * hwrm_tf *
56624  ***********/
56625 
56626 
56627 /* hwrm_tf_input (size:1024b/128B) */
56628 struct __rte_packed_begin hwrm_tf_input {
56629 	/* The HWRM command request type. */
56630 	uint16_t	req_type;
56631 	/*
56632 	 * The completion ring to send the completion event on. This should
56633 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56634 	 */
56635 	uint16_t	cmpl_ring;
56636 	/*
56637 	 * The sequence ID is used by the driver for tracking multiple
56638 	 * commands. This ID is treated as opaque data by the firmware and
56639 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56640 	 */
56641 	uint16_t	seq_id;
56642 	/*
56643 	 * The target ID of the command:
56644 	 * * 0x0-0xFFF8 - The function ID
56645 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56646 	 * * 0xFFFD - Reserved for user-space HWRM interface
56647 	 * * 0xFFFF - HWRM
56648 	 */
56649 	uint16_t	target_id;
56650 	/*
56651 	 * A physical address pointer pointing to a host buffer that the
56652 	 * command's response data will be written. This can be either a host
56653 	 * physical address (HPA) or a guest physical address (GPA) and must
56654 	 * point to a physically contiguous block of memory.
56655 	 */
56656 	uint64_t	resp_addr;
56657 	/* TF message type. */
56658 	uint16_t	type;
56659 	/* TF message subtype. */
56660 	uint16_t	subtype;
56661 	/* unused. */
56662 	uint8_t	unused0[4];
56663 	/* TF request data. */
56664 	uint32_t	req[26];
56665 } __rte_packed_end;
56666 
56667 /* hwrm_tf_output (size:5632b/704B) */
56668 struct __rte_packed_begin hwrm_tf_output {
56669 	/* The specific error status for the command. */
56670 	uint16_t	error_code;
56671 	/* The HWRM command request type. */
56672 	uint16_t	req_type;
56673 	/* The sequence ID from the original command. */
56674 	uint16_t	seq_id;
56675 	/* The length of the response data in number of bytes. */
56676 	uint16_t	resp_len;
56677 	/* TF message type. */
56678 	uint16_t	type;
56679 	/* TF message subtype. */
56680 	uint16_t	subtype;
56681 	/* TF response code */
56682 	uint32_t	resp_code;
56683 	/* TF response data. */
56684 	uint32_t	resp[170];
56685 	/* unused. */
56686 	uint8_t	unused1[7];
56687 	/*
56688 	 * This field is used in Output records to indicate that the
56689 	 * output is completely written to RAM. This field should be
56690 	 * read as '1' to indicate that the output has been
56691 	 * completely written. When writing a command completion or
56692 	 * response to an internal processor, the order of writes has
56693 	 * to be such that this field is written last.
56694 	 */
56695 	uint8_t	valid;
56696 } __rte_packed_end;
56697 
56698 /***********************
56699  * hwrm_tf_version_get *
56700  ***********************/
56701 
56702 
56703 /* hwrm_tf_version_get_input (size:128b/16B) */
56704 struct __rte_packed_begin hwrm_tf_version_get_input {
56705 	/* The HWRM command request type. */
56706 	uint16_t	req_type;
56707 	/*
56708 	 * The completion ring to send the completion event on. This should
56709 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56710 	 */
56711 	uint16_t	cmpl_ring;
56712 	/*
56713 	 * The sequence ID is used by the driver for tracking multiple
56714 	 * commands. This ID is treated as opaque data by the firmware and
56715 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56716 	 */
56717 	uint16_t	seq_id;
56718 	/*
56719 	 * The target ID of the command:
56720 	 * * 0x0-0xFFF8 - The function ID
56721 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56722 	 * * 0xFFFD - Reserved for user-space HWRM interface
56723 	 * * 0xFFFF - HWRM
56724 	 */
56725 	uint16_t	target_id;
56726 	/*
56727 	 * A physical address pointer pointing to a host buffer that the
56728 	 * command's response data will be written. This can be either a host
56729 	 * physical address (HPA) or a guest physical address (GPA) and must
56730 	 * point to a physically contiguous block of memory.
56731 	 */
56732 	uint64_t	resp_addr;
56733 } __rte_packed_end;
56734 
56735 /* hwrm_tf_version_get_output (size:256b/32B) */
56736 struct __rte_packed_begin hwrm_tf_version_get_output {
56737 	/* The specific error status for the command. */
56738 	uint16_t	error_code;
56739 	/* The HWRM command request type. */
56740 	uint16_t	req_type;
56741 	/* The sequence ID from the original command. */
56742 	uint16_t	seq_id;
56743 	/* The length of the response data in number of bytes. */
56744 	uint16_t	resp_len;
56745 	/* Version Major number. */
56746 	uint8_t	major;
56747 	/* Version Minor number. */
56748 	uint8_t	minor;
56749 	/* Version Update number. */
56750 	uint8_t	update;
56751 	/* unused. */
56752 	uint8_t	unused0[5];
56753 	/*
56754 	 * This field is used to indicate device's capabilities and
56755 	 * configurations.
56756 	 */
56757 	uint64_t	dev_caps_cfg;
56758 	/* unused. */
56759 	uint8_t	unused1[7];
56760 	/*
56761 	 * This field is used in Output records to indicate that the output
56762 	 * is completely written to RAM. This field should be read as '1'
56763 	 * to indicate that the output has been completely written.
56764 	 * When writing a command completion or response to an internal
56765 	 * processor, the order of writes has to be such that this field is
56766 	 * written last.
56767 	 */
56768 	uint8_t	valid;
56769 } __rte_packed_end;
56770 
56771 /************************
56772  * hwrm_tf_session_open *
56773  ************************/
56774 
56775 
56776 /* hwrm_tf_session_open_input (size:640b/80B) */
56777 struct __rte_packed_begin hwrm_tf_session_open_input {
56778 	/* The HWRM command request type. */
56779 	uint16_t	req_type;
56780 	/*
56781 	 * The completion ring to send the completion event on. This should
56782 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56783 	 */
56784 	uint16_t	cmpl_ring;
56785 	/*
56786 	 * The sequence ID is used by the driver for tracking multiple
56787 	 * commands. This ID is treated as opaque data by the firmware and
56788 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56789 	 */
56790 	uint16_t	seq_id;
56791 	/*
56792 	 * The target ID of the command:
56793 	 * * 0x0-0xFFF8 - The function ID
56794 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56795 	 * * 0xFFFD - Reserved for user-space HWRM interface
56796 	 * * 0xFFFF - HWRM
56797 	 */
56798 	uint16_t	target_id;
56799 	/*
56800 	 * A physical address pointer pointing to a host buffer that the
56801 	 * command's response data will be written. This can be either a host
56802 	 * physical address (HPA) or a guest physical address (GPA) and must
56803 	 * point to a physically contiguous block of memory.
56804 	 */
56805 	uint64_t	resp_addr;
56806 	/* Name of the session. */
56807 	uint8_t	session_name[64];
56808 } __rte_packed_end;
56809 
56810 /* hwrm_tf_session_open_output (size:192b/24B) */
56811 struct __rte_packed_begin hwrm_tf_session_open_output {
56812 	/* The specific error status for the command. */
56813 	uint16_t	error_code;
56814 	/* The HWRM command request type. */
56815 	uint16_t	req_type;
56816 	/* The sequence ID from the original command. */
56817 	uint16_t	seq_id;
56818 	/* The length of the response data in number of bytes. */
56819 	uint16_t	resp_len;
56820 	/*
56821 	 * Unique session identifier for the session created by the
56822 	 * firmware.
56823 	 */
56824 	uint32_t	fw_session_id;
56825 	/*
56826 	 * Unique session client identifier for the first client on
56827 	 * the newly created session.
56828 	 */
56829 	uint32_t	fw_session_client_id;
56830 	/* This field is used to return the status of fw session to host. */
56831 	uint32_t	flags;
56832 	/*
56833 	 * Indicates if the shared session has been created. Shared session
56834 	 * should be the first session created ever. Its fw_rm_client_id
56835 	 * should be 1. The AFM session's fw_rm_client_id is 0.
56836 	 */
56837 	#define HWRM_TF_SESSION_OPEN_OUTPUT_FLAGS_SHARED_SESSION \
56838 		UINT32_C(0x1)
56839 	/*
56840 	 * If this bit set to 0, then it indicates the shared session
56841 	 * has been created by another session.
56842 	 */
56843 	#define HWRM_TF_SESSION_OPEN_OUTPUT_FLAGS_SHARED_SESSION_NOT_CREATOR \
56844 		UINT32_C(0x0)
56845 	/*
56846 	 * If this bit is set to 1, then it indicates the shared session
56847 	 * is created by this session.
56848 	 */
56849 	#define HWRM_TF_SESSION_OPEN_OUTPUT_FLAGS_SHARED_SESSION_CREATOR \
56850 		UINT32_C(0x1)
56851 	#define HWRM_TF_SESSION_OPEN_OUTPUT_FLAGS_SHARED_SESSION_LAST \
56852 		HWRM_TF_SESSION_OPEN_OUTPUT_FLAGS_SHARED_SESSION_CREATOR
56853 	/* unused. */
56854 	uint8_t	unused1[3];
56855 	/*
56856 	 * This field is used in Output records to indicate that the output
56857 	 * is completely written to RAM. This field should be read as '1'
56858 	 * to indicate that the output has been completely written.
56859 	 * When writing a command completion or response to an internal
56860 	 * processor, the order of writes has to be such that this field is
56861 	 * written last.
56862 	 */
56863 	uint8_t	valid;
56864 } __rte_packed_end;
56865 
56866 /****************************
56867  * hwrm_tf_session_register *
56868  ****************************/
56869 
56870 
56871 /* hwrm_tf_session_register_input (size:704b/88B) */
56872 struct __rte_packed_begin hwrm_tf_session_register_input {
56873 	/* The HWRM command request type. */
56874 	uint16_t	req_type;
56875 	/*
56876 	 * The completion ring to send the completion event on. This should
56877 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56878 	 */
56879 	uint16_t	cmpl_ring;
56880 	/*
56881 	 * The sequence ID is used by the driver for tracking multiple
56882 	 * commands. This ID is treated as opaque data by the firmware and
56883 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56884 	 */
56885 	uint16_t	seq_id;
56886 	/*
56887 	 * The target ID of the command:
56888 	 * * 0x0-0xFFF8 - The function ID
56889 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56890 	 * * 0xFFFD - Reserved for user-space HWRM interface
56891 	 * * 0xFFFF - HWRM
56892 	 */
56893 	uint16_t	target_id;
56894 	/*
56895 	 * A physical address pointer pointing to a host buffer that the
56896 	 * command's response data will be written. This can be either a host
56897 	 * physical address (HPA) or a guest physical address (GPA) and must
56898 	 * point to a physically contiguous block of memory.
56899 	 */
56900 	uint64_t	resp_addr;
56901 	/*
56902 	 * Unique session identifier for the session that the
56903 	 * register request want to create a new client on. This
56904 	 * value originates from the first open request.
56905 	 * The fw_session_id of the attach session includes PCIe bus
56906 	 * info to distinguish the PF and session info to identify
56907 	 * the associated TruFlow session.
56908 	 */
56909 	uint32_t	fw_session_id;
56910 	/* unused. */
56911 	uint32_t	unused0;
56912 	/* Name of the session client. */
56913 	uint8_t	session_client_name[64];
56914 } __rte_packed_end;
56915 
56916 /* hwrm_tf_session_register_output (size:128b/16B) */
56917 struct __rte_packed_begin hwrm_tf_session_register_output {
56918 	/* The specific error status for the command. */
56919 	uint16_t	error_code;
56920 	/* The HWRM command request type. */
56921 	uint16_t	req_type;
56922 	/* The sequence ID from the original command. */
56923 	uint16_t	seq_id;
56924 	/* The length of the response data in number of bytes. */
56925 	uint16_t	resp_len;
56926 	/*
56927 	 * Unique session client identifier for the session created
56928 	 * by the firmware. It includes the session the client it
56929 	 * attached to and session client info.
56930 	 */
56931 	uint32_t	fw_session_client_id;
56932 	/* unused. */
56933 	uint8_t	unused0[3];
56934 	/*
56935 	 * This field is used in Output records to indicate that the output
56936 	 * is completely written to RAM. This field should be read as '1'
56937 	 * to indicate that the output has been completely written.
56938 	 * When writing a command completion or response to an internal
56939 	 * processor, the order of writes has to be such that this field is
56940 	 * written last.
56941 	 */
56942 	uint8_t	valid;
56943 } __rte_packed_end;
56944 
56945 /******************************
56946  * hwrm_tf_session_unregister *
56947  ******************************/
56948 
56949 
56950 /* hwrm_tf_session_unregister_input (size:192b/24B) */
56951 struct __rte_packed_begin hwrm_tf_session_unregister_input {
56952 	/* The HWRM command request type. */
56953 	uint16_t	req_type;
56954 	/*
56955 	 * The completion ring to send the completion event on. This should
56956 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
56957 	 */
56958 	uint16_t	cmpl_ring;
56959 	/*
56960 	 * The sequence ID is used by the driver for tracking multiple
56961 	 * commands. This ID is treated as opaque data by the firmware and
56962 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
56963 	 */
56964 	uint16_t	seq_id;
56965 	/*
56966 	 * The target ID of the command:
56967 	 * * 0x0-0xFFF8 - The function ID
56968 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
56969 	 * * 0xFFFD - Reserved for user-space HWRM interface
56970 	 * * 0xFFFF - HWRM
56971 	 */
56972 	uint16_t	target_id;
56973 	/*
56974 	 * A physical address pointer pointing to a host buffer that the
56975 	 * command's response data will be written. This can be either a host
56976 	 * physical address (HPA) or a guest physical address (GPA) and must
56977 	 * point to a physically contiguous block of memory.
56978 	 */
56979 	uint64_t	resp_addr;
56980 	/*
56981 	 * Unique session identifier for the session that the
56982 	 * unregister request want to close a session client on.
56983 	 */
56984 	uint32_t	fw_session_id;
56985 	/*
56986 	 * Unique session client identifier for the session that the
56987 	 * unregister request want to close.
56988 	 */
56989 	uint32_t	fw_session_client_id;
56990 } __rte_packed_end;
56991 
56992 /* hwrm_tf_session_unregister_output (size:128b/16B) */
56993 struct __rte_packed_begin hwrm_tf_session_unregister_output {
56994 	/* The specific error status for the command. */
56995 	uint16_t	error_code;
56996 	/* The HWRM command request type. */
56997 	uint16_t	req_type;
56998 	/* The sequence ID from the original command. */
56999 	uint16_t	seq_id;
57000 	/* The length of the response data in number of bytes. */
57001 	uint16_t	resp_len;
57002 	/* unused. */
57003 	uint8_t	unused0[7];
57004 	/*
57005 	 * This field is used in Output records to indicate that the output
57006 	 * is completely written to RAM. This field should be read as '1'
57007 	 * to indicate that the output has been completely written.
57008 	 * When writing a command completion or response to an internal
57009 	 * processor, the order of writes has to be such that this field is
57010 	 * written last.
57011 	 */
57012 	uint8_t	valid;
57013 } __rte_packed_end;
57014 
57015 /*************************
57016  * hwrm_tf_session_close *
57017  *************************/
57018 
57019 
57020 /* hwrm_tf_session_close_input (size:192b/24B) */
57021 struct __rte_packed_begin hwrm_tf_session_close_input {
57022 	/* The HWRM command request type. */
57023 	uint16_t	req_type;
57024 	/*
57025 	 * The completion ring to send the completion event on. This should
57026 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57027 	 */
57028 	uint16_t	cmpl_ring;
57029 	/*
57030 	 * The sequence ID is used by the driver for tracking multiple
57031 	 * commands. This ID is treated as opaque data by the firmware and
57032 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57033 	 */
57034 	uint16_t	seq_id;
57035 	/*
57036 	 * The target ID of the command:
57037 	 * * 0x0-0xFFF8 - The function ID
57038 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57039 	 * * 0xFFFD - Reserved for user-space HWRM interface
57040 	 * * 0xFFFF - HWRM
57041 	 */
57042 	uint16_t	target_id;
57043 	/*
57044 	 * A physical address pointer pointing to a host buffer that the
57045 	 * command's response data will be written. This can be either a host
57046 	 * physical address (HPA) or a guest physical address (GPA) and must
57047 	 * point to a physically contiguous block of memory.
57048 	 */
57049 	uint64_t	resp_addr;
57050 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57051 	uint32_t	fw_session_id;
57052 	/* unused. */
57053 	uint8_t	unused0[4];
57054 } __rte_packed_end;
57055 
57056 /* hwrm_tf_session_close_output (size:128b/16B) */
57057 struct __rte_packed_begin hwrm_tf_session_close_output {
57058 	/* The specific error status for the command. */
57059 	uint16_t	error_code;
57060 	/* The HWRM command request type. */
57061 	uint16_t	req_type;
57062 	/* The sequence ID from the original command. */
57063 	uint16_t	seq_id;
57064 	/* The length of the response data in number of bytes. */
57065 	uint16_t	resp_len;
57066 	/* unused. */
57067 	uint8_t	unused0[7];
57068 	/*
57069 	 * This field is used in Output records to indicate that the output
57070 	 * is completely written to RAM. This field should be read as '1'
57071 	 * to indicate that the output has been completely written.
57072 	 * When writing a command completion or response to an internal
57073 	 * processor, the order of writes has to be such that this field
57074 	 * is written last.
57075 	 */
57076 	uint8_t	valid;
57077 } __rte_packed_end;
57078 
57079 /************************
57080  * hwrm_tf_session_qcfg *
57081  ************************/
57082 
57083 
57084 /* hwrm_tf_session_qcfg_input (size:192b/24B) */
57085 struct __rte_packed_begin hwrm_tf_session_qcfg_input {
57086 	/* The HWRM command request type. */
57087 	uint16_t	req_type;
57088 	/*
57089 	 * The completion ring to send the completion event on. This should
57090 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57091 	 */
57092 	uint16_t	cmpl_ring;
57093 	/*
57094 	 * The sequence ID is used by the driver for tracking multiple
57095 	 * commands. This ID is treated as opaque data by the firmware and
57096 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57097 	 */
57098 	uint16_t	seq_id;
57099 	/*
57100 	 * The target ID of the command:
57101 	 * * 0x0-0xFFF8 - The function ID
57102 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57103 	 * * 0xFFFD - Reserved for user-space HWRM interface
57104 	 * * 0xFFFF - HWRM
57105 	 */
57106 	uint16_t	target_id;
57107 	/*
57108 	 * A physical address pointer pointing to a host buffer that the
57109 	 * command's response data will be written. This can be either a host
57110 	 * physical address (HPA) or a guest physical address (GPA) and must
57111 	 * point to a physically contiguous block of memory.
57112 	 */
57113 	uint64_t	resp_addr;
57114 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57115 	uint32_t	fw_session_id;
57116 	/* unused. */
57117 	uint8_t	unused0[4];
57118 } __rte_packed_end;
57119 
57120 /* hwrm_tf_session_qcfg_output (size:128b/16B) */
57121 struct __rte_packed_begin hwrm_tf_session_qcfg_output {
57122 	/* The specific error status for the command. */
57123 	uint16_t	error_code;
57124 	/* The HWRM command request type. */
57125 	uint16_t	req_type;
57126 	/* The sequence ID from the original command. */
57127 	uint16_t	seq_id;
57128 	/* The length of the response data in number of bytes. */
57129 	uint16_t	resp_len;
57130 	/* RX action control settings flags. */
57131 	uint8_t	rx_act_flags;
57132 	/*
57133 	 * A value of 1 in this field indicates that Global Flow ID
57134 	 * reporting into cfa_code and cfa_metadata is enabled.
57135 	 */
57136 	#define HWRM_TF_SESSION_QCFG_OUTPUT_RX_ACT_FLAGS_ABCR_GFID_EN \
57137 		UINT32_C(0x1)
57138 	/*
57139 	 * A value of 1 in this field indicates that both inner and outer
57140 	 * are stripped and inner tag is passed.
57141 	 * Enabled.
57142 	 */
57143 	#define HWRM_TF_SESSION_QCFG_OUTPUT_RX_ACT_FLAGS_ABCR_VTAG_DLT_BOTH \
57144 		UINT32_C(0x2)
57145 	/*
57146 	 * A value of 1 in this field indicates that the re-use of
57147 	 * existing tunnel L2 header SMAC is enabled for
57148 	 * Non-tunnel L2, L2-L3 and IP-IP tunnel.
57149 	 */
57150 	#define HWRM_TF_SESSION_QCFG_OUTPUT_RX_ACT_FLAGS_TECT_SMAC_OVR_RUTNSL2 \
57151 		UINT32_C(0x4)
57152 	/* TX Action control settings flags. */
57153 	uint8_t	tx_act_flags;
57154 	/* Disabled. */
57155 	#define HWRM_TF_SESSION_QCFG_OUTPUT_TX_ACT_FLAGS_ABCR_VEB_EN \
57156 		UINT32_C(0x1)
57157 	/*
57158 	 * When set to 1 any GRE tunnels will include the
57159 	 * optional Key field.
57160 	 */
57161 	#define HWRM_TF_SESSION_QCFG_OUTPUT_TX_ACT_FLAGS_TECT_GRE_SET_K \
57162 		UINT32_C(0x2)
57163 	/*
57164 	 * When set to 1, for GRE tunnels, the IPV6 Traffic Class (TC)
57165 	 * field of the outer header is inherited from the inner header
57166 	 * (if present) or the fixed value as taken from the encap
57167 	 * record.
57168 	 */
57169 	#define HWRM_TF_SESSION_QCFG_OUTPUT_TX_ACT_FLAGS_TECT_IPV6_TC_IH \
57170 		UINT32_C(0x4)
57171 	/*
57172 	 * When set to 1, for GRE tunnels, the IPV4 Type Of Service (TOS)
57173 	 * field of the outer header is inherited from the inner header
57174 	 * (if present) or the fixed value as taken from the encap record.
57175 	 */
57176 	#define HWRM_TF_SESSION_QCFG_OUTPUT_TX_ACT_FLAGS_TECT_IPV4_TOS_IH \
57177 		UINT32_C(0x8)
57178 	/* unused. */
57179 	uint8_t	unused0[5];
57180 	/*
57181 	 * This field is used in Output records to indicate that the output
57182 	 * is completely written to RAM. This field should be read as '1'
57183 	 * to indicate that the output has been completely written.
57184 	 * When writing a command completion or response to an internal
57185 	 * processor, the order of writes has to be such that this field
57186 	 * is written last.
57187 	 */
57188 	uint8_t	valid;
57189 } __rte_packed_end;
57190 
57191 /******************************
57192  * hwrm_tf_session_resc_qcaps *
57193  ******************************/
57194 
57195 
57196 /* hwrm_tf_session_resc_qcaps_input (size:256b/32B) */
57197 struct __rte_packed_begin hwrm_tf_session_resc_qcaps_input {
57198 	/* The HWRM command request type. */
57199 	uint16_t	req_type;
57200 	/*
57201 	 * The completion ring to send the completion event on. This should
57202 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57203 	 */
57204 	uint16_t	cmpl_ring;
57205 	/*
57206 	 * The sequence ID is used by the driver for tracking multiple
57207 	 * commands. This ID is treated as opaque data by the firmware and
57208 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57209 	 */
57210 	uint16_t	seq_id;
57211 	/*
57212 	 * The target ID of the command:
57213 	 * * 0x0-0xFFF8 - The function ID
57214 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57215 	 * * 0xFFFD - Reserved for user-space HWRM interface
57216 	 * * 0xFFFF - HWRM
57217 	 */
57218 	uint16_t	target_id;
57219 	/*
57220 	 * A physical address pointer pointing to a host buffer that the
57221 	 * command's response data will be written. This can be either a host
57222 	 * physical address (HPA) or a guest physical address (GPA) and must
57223 	 * point to a physically contiguous block of memory.
57224 	 */
57225 	uint64_t	resp_addr;
57226 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57227 	uint32_t	fw_session_id;
57228 	/* Control flags. */
57229 	uint16_t	flags;
57230 	/* Indicates the flow direction. */
57231 	#define HWRM_TF_SESSION_RESC_QCAPS_INPUT_FLAGS_DIR     UINT32_C(0x1)
57232 	/* If this bit set to 0, then it indicates rx flow. */
57233 	#define HWRM_TF_SESSION_RESC_QCAPS_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
57234 	/* If this bit is set to 1, then it indicates tx flow. */
57235 	#define HWRM_TF_SESSION_RESC_QCAPS_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
57236 	#define HWRM_TF_SESSION_RESC_QCAPS_INPUT_FLAGS_DIR_LAST \
57237 		HWRM_TF_SESSION_RESC_QCAPS_INPUT_FLAGS_DIR_TX
57238 	/*
57239 	 * Defines the size of the provided qcaps_addr array
57240 	 * buffer. The size should be set to the Resource Manager
57241 	 * provided max number of qcaps entries which is device
57242 	 * specific. Resource Manager gets the max size from HCAPI
57243 	 * RM.
57244 	 */
57245 	uint16_t	qcaps_size;
57246 	/*
57247 	 * This is the DMA address for the qcaps output data array
57248 	 * buffer. Array is of tf_rm_resc_req_entry type and is
57249 	 * device specific.
57250 	 */
57251 	uint64_t	qcaps_addr;
57252 } __rte_packed_end;
57253 
57254 /* hwrm_tf_session_resc_qcaps_output (size:192b/24B) */
57255 struct __rte_packed_begin hwrm_tf_session_resc_qcaps_output {
57256 	/* The specific error status for the command. */
57257 	uint16_t	error_code;
57258 	/* The HWRM command request type. */
57259 	uint16_t	req_type;
57260 	/* The sequence ID from the original command. */
57261 	uint16_t	seq_id;
57262 	/* The length of the response data in number of bytes. */
57263 	uint16_t	resp_len;
57264 	/* Control flags. */
57265 	uint32_t	flags;
57266 	/* Session reservation strategy. */
57267 	#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_MASK \
57268 		UINT32_C(0x3)
57269 	#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_SFT \
57270 		0
57271 	/* Static partitioning. */
57272 	#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_STATIC \
57273 		UINT32_C(0x0)
57274 	/* Strategy 1. */
57275 	#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_1 \
57276 		UINT32_C(0x1)
57277 	/* Strategy 2. */
57278 	#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_2 \
57279 		UINT32_C(0x2)
57280 	/* Strategy 3. */
57281 	#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_3 \
57282 		UINT32_C(0x3)
57283 	#define HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_LAST \
57284 		HWRM_TF_SESSION_RESC_QCAPS_OUTPUT_FLAGS_SESS_RESV_STRATEGY_3
57285 	/*
57286 	 * Size of the returned qcaps_addr data array buffer. The
57287 	 * value cannot exceed the size defined by the input msg,
57288 	 * qcaps_size.
57289 	 */
57290 	uint16_t	size;
57291 	/*
57292 	 * SRAM profile number that sets the partition of SRAM memory
57293 	 * between TF and AFM within the 4 internal memory banks (Thor).
57294 	 */
57295 	uint8_t	sram_profile;
57296 	/* unused. */
57297 	uint8_t	unused0;
57298 	/* unused. */
57299 	uint8_t	unused1[7];
57300 	/*
57301 	 * This field is used in Output records to indicate that the output
57302 	 * is completely written to RAM. This field should be read as '1'
57303 	 * to indicate that the output has been completely written.
57304 	 * When writing a command completion or response to an internal
57305 	 * processor, the order of writes has to be such that this field is
57306 	 * written last.
57307 	 */
57308 	uint8_t	valid;
57309 } __rte_packed_end;
57310 
57311 /******************************
57312  * hwrm_tf_session_resc_alloc *
57313  ******************************/
57314 
57315 
57316 /* hwrm_tf_session_resc_alloc_input (size:320b/40B) */
57317 struct __rte_packed_begin hwrm_tf_session_resc_alloc_input {
57318 	/* The HWRM command request type. */
57319 	uint16_t	req_type;
57320 	/*
57321 	 * The completion ring to send the completion event on. This should
57322 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57323 	 */
57324 	uint16_t	cmpl_ring;
57325 	/*
57326 	 * The sequence ID is used by the driver for tracking multiple
57327 	 * commands. This ID is treated as opaque data by the firmware and
57328 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57329 	 */
57330 	uint16_t	seq_id;
57331 	/*
57332 	 * The target ID of the command:
57333 	 * * 0x0-0xFFF8 - The function ID
57334 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57335 	 * * 0xFFFD - Reserved for user-space HWRM interface
57336 	 * * 0xFFFF - HWRM
57337 	 */
57338 	uint16_t	target_id;
57339 	/*
57340 	 * A physical address pointer pointing to a host buffer that the
57341 	 * command's response data will be written. This can be either a host
57342 	 * physical address (HPA) or a guest physical address (GPA) and must
57343 	 * point to a physically contiguous block of memory.
57344 	 */
57345 	uint64_t	resp_addr;
57346 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57347 	uint32_t	fw_session_id;
57348 	/* Control flags. */
57349 	uint16_t	flags;
57350 	/* Indicates the flow direction. */
57351 	#define HWRM_TF_SESSION_RESC_ALLOC_INPUT_FLAGS_DIR     UINT32_C(0x1)
57352 	/* If this bit set to 0, then it indicates rx flow. */
57353 	#define HWRM_TF_SESSION_RESC_ALLOC_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
57354 	/* If this bit is set to 1, then it indicates tx flow. */
57355 	#define HWRM_TF_SESSION_RESC_ALLOC_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
57356 	#define HWRM_TF_SESSION_RESC_ALLOC_INPUT_FLAGS_DIR_LAST \
57357 		HWRM_TF_SESSION_RESC_ALLOC_INPUT_FLAGS_DIR_TX
57358 	/*
57359 	 * Defines the array size of the provided req_addr and
57360 	 * resv_addr array buffers. Should be set to the number of
57361 	 * request entries.
57362 	 */
57363 	uint16_t	req_size;
57364 	/*
57365 	 * This is the DMA address for the request input data array
57366 	 * buffer. Array is of tf_rm_resc_req_entry type. Size of the
57367 	 * array buffer is provided by the 'req_size' field in this
57368 	 * message.
57369 	 */
57370 	uint64_t	req_addr;
57371 	/*
57372 	 * This is the DMA address for the resc output data array
57373 	 * buffer. Array is of tf_rm_resc_entry type. Size of the array
57374 	 * buffer is provided by the 'req_size' field in this
57375 	 * message.
57376 	 */
57377 	uint64_t	resc_addr;
57378 } __rte_packed_end;
57379 
57380 /* hwrm_tf_session_resc_alloc_output (size:128b/16B) */
57381 struct __rte_packed_begin hwrm_tf_session_resc_alloc_output {
57382 	/* The specific error status for the command. */
57383 	uint16_t	error_code;
57384 	/* The HWRM command request type. */
57385 	uint16_t	req_type;
57386 	/* The sequence ID from the original command. */
57387 	uint16_t	seq_id;
57388 	/* The length of the response data in number of bytes. */
57389 	uint16_t	resp_len;
57390 	/*
57391 	 * Size of the returned tf_rm_resc_entry data array. The value
57392 	 * cannot exceed the req_size defined by the input msg. The data
57393 	 * array is returned using the resv_addr specified DMA
57394 	 * address also provided by the input msg.
57395 	 */
57396 	uint16_t	size;
57397 	/* unused. */
57398 	uint8_t	unused0[5];
57399 	/*
57400 	 * This field is used in Output records to indicate that the output
57401 	 * is completely written to RAM. This field should be read as '1'
57402 	 * to indicate that the output has been completely written.
57403 	 * When writing a command completion or response to an internal
57404 	 * processor, the order of writes has to be such that this field is
57405 	 * written last.
57406 	 */
57407 	uint8_t	valid;
57408 } __rte_packed_end;
57409 
57410 /******************************
57411  * hwrm_tf_session_resc_flush *
57412  ******************************/
57413 
57414 
57415 /* hwrm_tf_session_resc_flush_input (size:256b/32B) */
57416 struct __rte_packed_begin hwrm_tf_session_resc_flush_input {
57417 	/* The HWRM command request type. */
57418 	uint16_t	req_type;
57419 	/*
57420 	 * The completion ring to send the completion event on. This should
57421 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57422 	 */
57423 	uint16_t	cmpl_ring;
57424 	/*
57425 	 * The sequence ID is used by the driver for tracking multiple
57426 	 * commands. This ID is treated as opaque data by the firmware and
57427 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57428 	 */
57429 	uint16_t	seq_id;
57430 	/*
57431 	 * The target ID of the command:
57432 	 * * 0x0-0xFFF8 - The function ID
57433 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57434 	 * * 0xFFFD - Reserved for user-space HWRM interface
57435 	 * * 0xFFFF - HWRM
57436 	 */
57437 	uint16_t	target_id;
57438 	/*
57439 	 * A physical address pointer pointing to a host buffer that the
57440 	 * command's response data will be written. This can be either a host
57441 	 * physical address (HPA) or a guest physical address (GPA) and must
57442 	 * point to a physically contiguous block of memory.
57443 	 */
57444 	uint64_t	resp_addr;
57445 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57446 	uint32_t	fw_session_id;
57447 	/* Control flags. */
57448 	uint16_t	flags;
57449 	/* Indicates the flow direction. */
57450 	#define HWRM_TF_SESSION_RESC_FLUSH_INPUT_FLAGS_DIR     UINT32_C(0x1)
57451 	/* If this bit set to 0, then it indicates rx flow. */
57452 	#define HWRM_TF_SESSION_RESC_FLUSH_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
57453 	/* If this bit is set to 1, then it indicates tx flow. */
57454 	#define HWRM_TF_SESSION_RESC_FLUSH_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
57455 	#define HWRM_TF_SESSION_RESC_FLUSH_INPUT_FLAGS_DIR_LAST \
57456 		HWRM_TF_SESSION_RESC_FLUSH_INPUT_FLAGS_DIR_TX
57457 	/*
57458 	 * Defines the size, in bytes, of the provided flush_addr
57459 	 * buffer.
57460 	 */
57461 	uint16_t	flush_size;
57462 	/*
57463 	 * This is the DMA address for the flush input data array
57464 	 * buffer. Array of tf_rm_resc_entry type. Size of the
57465 	 * buffer is provided by the 'flush_size' field in this
57466 	 * message.
57467 	 */
57468 	uint64_t	flush_addr;
57469 } __rte_packed_end;
57470 
57471 /* hwrm_tf_session_resc_flush_output (size:128b/16B) */
57472 struct __rte_packed_begin hwrm_tf_session_resc_flush_output {
57473 	/* The specific error status for the command. */
57474 	uint16_t	error_code;
57475 	/* The HWRM command request type. */
57476 	uint16_t	req_type;
57477 	/* The sequence ID from the original command. */
57478 	uint16_t	seq_id;
57479 	/* The length of the response data in number of bytes. */
57480 	uint16_t	resp_len;
57481 	/* unused. */
57482 	uint8_t	unused0[7];
57483 	/*
57484 	 * This field is used in Output records to indicate that the output
57485 	 * is completely written to RAM. This field should be read as '1'
57486 	 * to indicate that the output has been completely written.
57487 	 * When writing a command completion or response to an internal
57488 	 * processor, the order of writes has to be such that this field is
57489 	 * written last.
57490 	 */
57491 	uint8_t	valid;
57492 } __rte_packed_end;
57493 
57494 /*****************************
57495  * hwrm_tf_session_resc_info *
57496  *****************************/
57497 
57498 
57499 /* hwrm_tf_session_resc_info_input (size:320b/40B) */
57500 struct __rte_packed_begin hwrm_tf_session_resc_info_input {
57501 	/* The HWRM command request type. */
57502 	uint16_t	req_type;
57503 	/*
57504 	 * The completion ring to send the completion event on. This should
57505 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57506 	 */
57507 	uint16_t	cmpl_ring;
57508 	/*
57509 	 * The sequence ID is used by the driver for tracking multiple
57510 	 * commands. This ID is treated as opaque data by the firmware and
57511 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57512 	 */
57513 	uint16_t	seq_id;
57514 	/*
57515 	 * The target ID of the command:
57516 	 * * 0x0-0xFFF8 - The function ID
57517 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57518 	 * * 0xFFFD - Reserved for user-space HWRM interface
57519 	 * * 0xFFFF - HWRM
57520 	 */
57521 	uint16_t	target_id;
57522 	/*
57523 	 * A physical address pointer pointing to a host buffer that the
57524 	 * command's response data will be written. This can be either a host
57525 	 * physical address (HPA) or a guest physical address (GPA) and must
57526 	 * point to a physically contiguous block of memory.
57527 	 */
57528 	uint64_t	resp_addr;
57529 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57530 	uint32_t	fw_session_id;
57531 	/* Control flags. */
57532 	uint16_t	flags;
57533 	/* Indicates the flow direction. */
57534 	#define HWRM_TF_SESSION_RESC_INFO_INPUT_FLAGS_DIR     UINT32_C(0x1)
57535 	/* If this bit set to 0, then it indicates rx flow. */
57536 	#define HWRM_TF_SESSION_RESC_INFO_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
57537 	/* If this bit is set to 1, then it indicates tx flow. */
57538 	#define HWRM_TF_SESSION_RESC_INFO_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
57539 	#define HWRM_TF_SESSION_RESC_INFO_INPUT_FLAGS_DIR_LAST \
57540 		HWRM_TF_SESSION_RESC_INFO_INPUT_FLAGS_DIR_TX
57541 	/*
57542 	 * Defines the array size of the provided req_addr and
57543 	 * resv_addr array buffers. Should be set to the number of
57544 	 * request entries.
57545 	 */
57546 	uint16_t	req_size;
57547 	/*
57548 	 * This is the DMA address for the request input data array
57549 	 * buffer. Array is of tf_rm_resc_req_entry type. Size of the
57550 	 * array buffer is provided by the 'req_size' field in this
57551 	 * message.
57552 	 */
57553 	uint64_t	req_addr;
57554 	/*
57555 	 * This is the DMA address for the resc output data array
57556 	 * buffer. Array is of tf_rm_resc_entry type. Size of the array
57557 	 * buffer is provided by the 'req_size' field in this
57558 	 * message.
57559 	 */
57560 	uint64_t	resc_addr;
57561 } __rte_packed_end;
57562 
57563 /* hwrm_tf_session_resc_info_output (size:128b/16B) */
57564 struct __rte_packed_begin hwrm_tf_session_resc_info_output {
57565 	/* The specific error status for the command. */
57566 	uint16_t	error_code;
57567 	/* The HWRM command request type. */
57568 	uint16_t	req_type;
57569 	/* The sequence ID from the original command. */
57570 	uint16_t	seq_id;
57571 	/* The length of the response data in number of bytes. */
57572 	uint16_t	resp_len;
57573 	/*
57574 	 * Size of the returned tf_rm_resc_entry data array. The value
57575 	 * cannot exceed the req_size defined by the input msg. The data
57576 	 * array is returned using the resv_addr specified DMA
57577 	 * address also provided by the input msg.
57578 	 */
57579 	uint16_t	size;
57580 	/* unused. */
57581 	uint8_t	unused0[5];
57582 	/*
57583 	 * This field is used in Output records to indicate that the output
57584 	 * is completely written to RAM. This field should be read as '1'
57585 	 * to indicate that the output has been completely written.
57586 	 * When writing a command completion or response to an internal
57587 	 * processor, the order of writes has to be such that this field is
57588 	 * written last.
57589 	 */
57590 	uint8_t	valid;
57591 } __rte_packed_end;
57592 
57593 /* TruFlow RM capability of a resource. */
57594 /* tf_rm_resc_req_entry (size:64b/8B) */
57595 struct __rte_packed_begin tf_rm_resc_req_entry {
57596 	/* Type of the resource, defined globally in HCAPI RM. */
57597 	uint32_t	type;
57598 	/* Minimum value. */
57599 	uint16_t	min;
57600 	/* Maximum value. */
57601 	uint16_t	max;
57602 } __rte_packed_end;
57603 
57604 /* TruFlow RM reservation information. */
57605 /* tf_rm_resc_entry (size:64b/8B) */
57606 struct __rte_packed_begin tf_rm_resc_entry {
57607 	/* Type of the resource, defined globally in HCAPI RM. */
57608 	uint32_t	type;
57609 	/* Start offset. */
57610 	uint16_t	start;
57611 	/* Number of resources. */
57612 	uint16_t	stride;
57613 } __rte_packed_end;
57614 
57615 /**************************
57616  * hwrm_tf_tbl_type_alloc *
57617  **************************/
57618 
57619 
57620 /* hwrm_tf_tbl_type_alloc_input (size:192b/24B) */
57621 struct __rte_packed_begin hwrm_tf_tbl_type_alloc_input {
57622 	/* The HWRM command request type. */
57623 	uint16_t	req_type;
57624 	/*
57625 	 * The completion ring to send the completion event on. This should
57626 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57627 	 */
57628 	uint16_t	cmpl_ring;
57629 	/*
57630 	 * The sequence ID is used by the driver for tracking multiple
57631 	 * commands. This ID is treated as opaque data by the firmware and
57632 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57633 	 */
57634 	uint16_t	seq_id;
57635 	/*
57636 	 * The target ID of the command:
57637 	 * * 0x0-0xFFF8 - The function ID
57638 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57639 	 * * 0xFFFD - Reserved for user-space HWRM interface
57640 	 * * 0xFFFF - HWRM
57641 	 */
57642 	uint16_t	target_id;
57643 	/*
57644 	 * A physical address pointer pointing to a host buffer that the
57645 	 * command's response data will be written. This can be either a host
57646 	 * physical address (HPA) or a guest physical address (GPA) and must
57647 	 * point to a physically contiguous block of memory.
57648 	 */
57649 	uint64_t	resp_addr;
57650 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57651 	uint32_t	fw_session_id;
57652 	/* Control flags. */
57653 	uint16_t	flags;
57654 	/* Indicates the flow direction. */
57655 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_FLAGS_DIR     UINT32_C(0x1)
57656 	/* If this bit set to 0, then it indicates rx flow. */
57657 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
57658 	/* If this bit is set to 1, then it indicates tx flow. */
57659 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
57660 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_FLAGS_DIR_LAST \
57661 		HWRM_TF_TBL_TYPE_ALLOC_INPUT_FLAGS_DIR_TX
57662 	/* Specifies which block this idx table alloc request is for */
57663 	uint8_t	blktype;
57664 	/* CFA block type */
57665 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_BLKTYPE_CFA \
57666 		UINT32_C(0x0)
57667 	/* RXP gparse block type */
57668 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_BLKTYPE_RXP \
57669 		UINT32_C(0x1)
57670 	/* RE gparse block type */
57671 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE \
57672 		UINT32_C(0x2)
57673 	/* TE gparse block type */
57674 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE \
57675 		UINT32_C(0x3)
57676 	#define HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_LAST \
57677 		HWRM_TF_TBL_TYPE_ALLOC_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
57678 	/*
57679 	 * This field is blktype specific. For any of the UPAR types it is
57680 	 * set to a non-zero value in case of a re-alloc, specifies a
57681 	 * tunnel-type of dynamic UPAR tunnel.
57682 	 */
57683 	uint8_t	type;
57684 } __rte_packed_end;
57685 
57686 /* hwrm_tf_tbl_type_alloc_output (size:128b/16B) */
57687 struct __rte_packed_begin hwrm_tf_tbl_type_alloc_output {
57688 	/* The specific error status for the command. */
57689 	uint16_t	error_code;
57690 	/* The HWRM command request type. */
57691 	uint16_t	req_type;
57692 	/* The sequence ID from the original command. */
57693 	uint16_t	seq_id;
57694 	/* The length of the response data in number of bytes. */
57695 	uint16_t	resp_len;
57696 	/* Response code. */
57697 	uint32_t	resp_code;
57698 	/*
57699 	 * Table entry allocated by the firmware using the
57700 	 * parameters above.
57701 	 */
57702 	uint16_t	idx_tbl_id;
57703 	/* unused */
57704 	uint8_t	unused0;
57705 	/*
57706 	 * This field is used in Output records to indicate that the output
57707 	 * is completely written to RAM. This field should be read as '1'
57708 	 * to indicate that the output has been completely written.
57709 	 * When writing a command completion or response to an internal
57710 	 * processor, the order of writes has to be such that this field
57711 	 * is written last.
57712 	 */
57713 	uint8_t	valid;
57714 } __rte_packed_end;
57715 
57716 /************************
57717  * hwrm_tf_tbl_type_get *
57718  ************************/
57719 
57720 
57721 /* hwrm_tf_tbl_type_get_input (size:256b/32B) */
57722 struct __rte_packed_begin hwrm_tf_tbl_type_get_input {
57723 	/* The HWRM command request type. */
57724 	uint16_t	req_type;
57725 	/*
57726 	 * The completion ring to send the completion event on. This should
57727 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57728 	 */
57729 	uint16_t	cmpl_ring;
57730 	/*
57731 	 * The sequence ID is used by the driver for tracking multiple
57732 	 * commands. This ID is treated as opaque data by the firmware and
57733 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57734 	 */
57735 	uint16_t	seq_id;
57736 	/*
57737 	 * The target ID of the command:
57738 	 * * 0x0-0xFFF8 - The function ID
57739 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57740 	 * * 0xFFFD - Reserved for user-space HWRM interface
57741 	 * * 0xFFFF - HWRM
57742 	 */
57743 	uint16_t	target_id;
57744 	/*
57745 	 * A physical address pointer pointing to a host buffer that the
57746 	 * command's response data will be written. This can be either a host
57747 	 * physical address (HPA) or a guest physical address (GPA) and must
57748 	 * point to a physically contiguous block of memory.
57749 	 */
57750 	uint64_t	resp_addr;
57751 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57752 	uint32_t	fw_session_id;
57753 	/* Control flags. */
57754 	uint16_t	flags;
57755 	/* Indicates the flow direction. */
57756 	#define HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_DIR \
57757 		UINT32_C(0x1)
57758 	/* If this bit set to 0, then it indicates rx flow. */
57759 	#define HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_DIR_RX \
57760 		UINT32_C(0x0)
57761 	/* If this bit is set to 1, then it indicates tx flow. */
57762 	#define HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_DIR_TX \
57763 		UINT32_C(0x1)
57764 	#define HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_DIR_LAST \
57765 		HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_DIR_TX
57766 	/*
57767 	 * When set use the special access register access to clear
57768 	 * the table entry on read.
57769 	 */
57770 	#define HWRM_TF_TBL_TYPE_GET_INPUT_FLAGS_CLEAR_ON_READ \
57771 		UINT32_C(0x2)
57772 	/* Specifies which block this idx table alloc request is for */
57773 	uint8_t	blktype;
57774 	/* CFA block type */
57775 	#define HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_BLKTYPE_CFA \
57776 		UINT32_C(0x0)
57777 	/* RXP gparse block type */
57778 	#define HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_BLKTYPE_RXP \
57779 		UINT32_C(0x1)
57780 	/* RE gparse block type */
57781 	#define HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE \
57782 		UINT32_C(0x2)
57783 	/* TE gparse block type */
57784 	#define HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE \
57785 		UINT32_C(0x3)
57786 	#define HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_LAST \
57787 		HWRM_TF_TBL_TYPE_GET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
57788 	/* unused. */
57789 	uint8_t	unused0;
57790 	/*
57791 	 * Type of the resource, defined globally in the
57792 	 * hwrm_tf_resc_type enum.
57793 	 */
57794 	uint32_t	type;
57795 	/* Index of the type to retrieve. */
57796 	uint32_t	index;
57797 } __rte_packed_end;
57798 
57799 /* hwrm_tf_tbl_type_get_output (size:2240b/280B) */
57800 struct __rte_packed_begin hwrm_tf_tbl_type_get_output {
57801 	/* The specific error status for the command. */
57802 	uint16_t	error_code;
57803 	/* The HWRM command request type. */
57804 	uint16_t	req_type;
57805 	/* The sequence ID from the original command. */
57806 	uint16_t	seq_id;
57807 	/* The length of the response data in number of bytes. */
57808 	uint16_t	resp_len;
57809 	/* Response code. */
57810 	uint32_t	resp_code;
57811 	/* Response size. */
57812 	uint16_t	size;
57813 	/* unused */
57814 	uint16_t	unused0;
57815 	/* Response data. */
57816 	uint8_t	data[256];
57817 	/* unused */
57818 	uint8_t	unused1[7];
57819 	/*
57820 	 * This field is used in Output records to indicate that the output
57821 	 * is completely written to RAM. This field should be read as '1'
57822 	 * to indicate that the output has been completely written.
57823 	 * When writing a command completion or response to an internal
57824 	 * processor, the order of writes has to be such that this field
57825 	 * is written last.
57826 	 */
57827 	uint8_t	valid;
57828 } __rte_packed_end;
57829 
57830 /************************
57831  * hwrm_tf_tbl_type_set *
57832  ************************/
57833 
57834 
57835 /* hwrm_tf_tbl_type_set_input (size:1024b/128B) */
57836 struct __rte_packed_begin hwrm_tf_tbl_type_set_input {
57837 	/* The HWRM command request type. */
57838 	uint16_t	req_type;
57839 	/*
57840 	 * The completion ring to send the completion event on. This should
57841 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57842 	 */
57843 	uint16_t	cmpl_ring;
57844 	/*
57845 	 * The sequence ID is used by the driver for tracking multiple
57846 	 * commands. This ID is treated as opaque data by the firmware and
57847 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57848 	 */
57849 	uint16_t	seq_id;
57850 	/*
57851 	 * The target ID of the command:
57852 	 * * 0x0-0xFFF8 - The function ID
57853 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57854 	 * * 0xFFFD - Reserved for user-space HWRM interface
57855 	 * * 0xFFFF - HWRM
57856 	 */
57857 	uint16_t	target_id;
57858 	/*
57859 	 * A physical address pointer pointing to a host buffer that the
57860 	 * command's response data will be written. This can be either a host
57861 	 * physical address (HPA) or a guest physical address (GPA) and must
57862 	 * point to a physically contiguous block of memory.
57863 	 */
57864 	uint64_t	resp_addr;
57865 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57866 	uint32_t	fw_session_id;
57867 	/* Control flags. */
57868 	uint16_t	flags;
57869 	/* Indicates the flow direction. */
57870 	#define HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
57871 	/* If this bit set to 0, then it indicates rx flow. */
57872 	#define HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
57873 	/* If this bit is set to 1, then it indicates tx flow. */
57874 	#define HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
57875 	#define HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DIR_LAST \
57876 		HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DIR_TX
57877 	/* Indicate table data is being sent via DMA. */
57878 	#define HWRM_TF_TBL_TYPE_SET_INPUT_FLAGS_DMA     UINT32_C(0x2)
57879 	/* Specifies which block this idx table alloc request is for */
57880 	uint8_t	blktype;
57881 	/* CFA block type */
57882 	#define HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_BLKTYPE_CFA \
57883 		UINT32_C(0x0)
57884 	/* RXP gparse block type */
57885 	#define HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_BLKTYPE_RXP \
57886 		UINT32_C(0x1)
57887 	/* RE gparse block type */
57888 	#define HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE \
57889 		UINT32_C(0x2)
57890 	/* TE gparse block type */
57891 	#define HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE \
57892 		UINT32_C(0x3)
57893 	#define HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_LAST \
57894 		HWRM_TF_TBL_TYPE_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
57895 	/* unused. */
57896 	uint8_t	unused0;
57897 	/*
57898 	 * Type of the resource, defined globally in the
57899 	 * hwrm_tf_resc_type enum.
57900 	 */
57901 	uint32_t	type;
57902 	/* Index of the type to retrieve. */
57903 	uint32_t	index;
57904 	/* Size of the data to set. */
57905 	uint16_t	size;
57906 	/* unused */
57907 	uint8_t	unused1[6];
57908 	/* Data to be set. */
57909 	uint8_t	data[88];
57910 } __rte_packed_end;
57911 
57912 /* hwrm_tf_tbl_type_set_output (size:128b/16B) */
57913 struct __rte_packed_begin hwrm_tf_tbl_type_set_output {
57914 	/* The specific error status for the command. */
57915 	uint16_t	error_code;
57916 	/* The HWRM command request type. */
57917 	uint16_t	req_type;
57918 	/* The sequence ID from the original command. */
57919 	uint16_t	seq_id;
57920 	/* The length of the response data in number of bytes. */
57921 	uint16_t	resp_len;
57922 	/* unused. */
57923 	uint8_t	unused0[7];
57924 	/*
57925 	 * This field is used in Output records to indicate that the output
57926 	 * is completely written to RAM. This field should be read as '1'
57927 	 * to indicate that the output has been completely written.
57928 	 * When writing a command completion or response to an internal
57929 	 * processor, the order of writes has to be such that this field
57930 	 * is written last.
57931 	 */
57932 	uint8_t	valid;
57933 } __rte_packed_end;
57934 
57935 /*************************
57936  * hwrm_tf_tbl_type_free *
57937  *************************/
57938 
57939 
57940 /* hwrm_tf_tbl_type_free_input (size:256b/32B) */
57941 struct __rte_packed_begin hwrm_tf_tbl_type_free_input {
57942 	/* The HWRM command request type. */
57943 	uint16_t	req_type;
57944 	/*
57945 	 * The completion ring to send the completion event on. This should
57946 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
57947 	 */
57948 	uint16_t	cmpl_ring;
57949 	/*
57950 	 * The sequence ID is used by the driver for tracking multiple
57951 	 * commands. This ID is treated as opaque data by the firmware and
57952 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
57953 	 */
57954 	uint16_t	seq_id;
57955 	/*
57956 	 * The target ID of the command:
57957 	 * * 0x0-0xFFF8 - The function ID
57958 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
57959 	 * * 0xFFFD - Reserved for user-space HWRM interface
57960 	 * * 0xFFFF - HWRM
57961 	 */
57962 	uint16_t	target_id;
57963 	/*
57964 	 * A physical address pointer pointing to a host buffer that the
57965 	 * command's response data will be written. This can be either a host
57966 	 * physical address (HPA) or a guest physical address (GPA) and must
57967 	 * point to a physically contiguous block of memory.
57968 	 */
57969 	uint64_t	resp_addr;
57970 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
57971 	uint32_t	fw_session_id;
57972 	/* Control flags. */
57973 	uint16_t	flags;
57974 	/* Indicates the flow direction. */
57975 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_FLAGS_DIR     UINT32_C(0x1)
57976 	/* If this bit set to 0, then it indicates rx flow. */
57977 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
57978 	/* If this bit is set to 1, then it indicates tx flow. */
57979 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
57980 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_FLAGS_DIR_LAST \
57981 		HWRM_TF_TBL_TYPE_FREE_INPUT_FLAGS_DIR_TX
57982 	/* Specifies which block this idx table alloc request is for */
57983 	uint8_t	blktype;
57984 	/* CFA block type */
57985 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_BLKTYPE_CFA \
57986 		UINT32_C(0x0)
57987 	/* RXP gparse block type */
57988 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_BLKTYPE_RXP \
57989 		UINT32_C(0x1)
57990 	/* RE gparse block type */
57991 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE \
57992 		UINT32_C(0x2)
57993 	/* TE gparse block type */
57994 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE \
57995 		UINT32_C(0x3)
57996 	#define HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_LAST \
57997 		HWRM_TF_TBL_TYPE_FREE_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
57998 	/* Unused */
57999 	uint8_t	unused0;
58000 	/*
58001 	 * Table entry to be freed by the firmware using the parameters
58002 	 * above.
58003 	 */
58004 	uint16_t	idx_tbl_id;
58005 	/* Unused */
58006 	uint8_t	unused1[6];
58007 } __rte_packed_end;
58008 
58009 /* hwrm_tf_tbl_type_free_output (size:128b/16B) */
58010 struct __rte_packed_begin hwrm_tf_tbl_type_free_output {
58011 	/* The specific error status for the command. */
58012 	uint16_t	error_code;
58013 	/* The HWRM command request type. */
58014 	uint16_t	req_type;
58015 	/* The sequence ID from the original command. */
58016 	uint16_t	seq_id;
58017 	/* The length of the response data in number of bytes. */
58018 	uint16_t	resp_len;
58019 	/* Response code. */
58020 	uint32_t	resp_code;
58021 	/* unused */
58022 	uint8_t	unused0[3];
58023 	/*
58024 	 * This field is used in Output records to indicate that the output
58025 	 * is completely written to RAM. This field should be read as '1'
58026 	 * to indicate that the output has been completely written.
58027 	 * When writing a command completion or response to an internal
58028 	 * processor, the order of writes has to be such that this field
58029 	 * is written last.
58030 	 */
58031 	uint8_t	valid;
58032 } __rte_packed_end;
58033 
58034 /*********************
58035  * hwrm_tf_em_insert *
58036  *********************/
58037 
58038 
58039 /* hwrm_tf_em_insert_input (size:832b/104B) */
58040 struct __rte_packed_begin hwrm_tf_em_insert_input {
58041 	/* The HWRM command request type. */
58042 	uint16_t	req_type;
58043 	/*
58044 	 * The completion ring to send the completion event on. This should
58045 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58046 	 */
58047 	uint16_t	cmpl_ring;
58048 	/*
58049 	 * The sequence ID is used by the driver for tracking multiple
58050 	 * commands. This ID is treated as opaque data by the firmware and
58051 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58052 	 */
58053 	uint16_t	seq_id;
58054 	/*
58055 	 * The target ID of the command:
58056 	 * * 0x0-0xFFF8 - The function ID
58057 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58058 	 * * 0xFFFD - Reserved for user-space HWRM interface
58059 	 * * 0xFFFF - HWRM
58060 	 */
58061 	uint16_t	target_id;
58062 	/*
58063 	 * A physical address pointer pointing to a host buffer that the
58064 	 * command's response data will be written. This can be either a host
58065 	 * physical address (HPA) or a guest physical address (GPA) and must
58066 	 * point to a physically contiguous block of memory.
58067 	 */
58068 	uint64_t	resp_addr;
58069 	/* Firmware Session Id. */
58070 	uint32_t	fw_session_id;
58071 	/* Control Flags. */
58072 	uint16_t	flags;
58073 	/* Indicates the flow direction. */
58074 	#define HWRM_TF_EM_INSERT_INPUT_FLAGS_DIR     UINT32_C(0x1)
58075 	/* If this bit set to 0, then it indicates rx flow. */
58076 	#define HWRM_TF_EM_INSERT_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58077 	/* If this bit is set to 1, then it indicates tx flow. */
58078 	#define HWRM_TF_EM_INSERT_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58079 	#define HWRM_TF_EM_INSERT_INPUT_FLAGS_DIR_LAST \
58080 		HWRM_TF_EM_INSERT_INPUT_FLAGS_DIR_TX
58081 	/* Reported match strength. */
58082 	uint16_t	strength;
58083 	/* Index to action. */
58084 	uint32_t	action_ptr;
58085 	/* Index of EM record. */
58086 	uint32_t	em_record_idx;
58087 	/* EM Key value. */
58088 	uint64_t	em_key[8];
58089 	/* Number of bits in em_key. */
58090 	uint16_t	em_key_bitlen;
58091 	/* unused. */
58092 	uint16_t	unused0[3];
58093 } __rte_packed_end;
58094 
58095 /* hwrm_tf_em_insert_output (size:128b/16B) */
58096 struct __rte_packed_begin hwrm_tf_em_insert_output {
58097 	/* The specific error status for the command. */
58098 	uint16_t	error_code;
58099 	/* The HWRM command request type. */
58100 	uint16_t	req_type;
58101 	/* The sequence ID from the original command. */
58102 	uint16_t	seq_id;
58103 	/* The length of the response data in number of bytes. */
58104 	uint16_t	resp_len;
58105 	/* EM record pointer index. */
58106 	uint16_t	rptr_index;
58107 	/* EM record offset 0~3. */
58108 	uint8_t	rptr_entry;
58109 	/* Number of word entries consumed by the key. */
58110 	uint8_t	num_of_entries;
58111 	/* unused. */
58112 	uint8_t	unused0[3];
58113 	/*
58114 	 * This field is used in Output records to indicate that the output
58115 	 * is completely written to RAM. This field should be read as '1'
58116 	 * to indicate that the output has been completely written.
58117 	 * When writing a command completion or response to an internal
58118 	 * processor, the order of writes has to be such that this field
58119 	 * is written last.
58120 	 */
58121 	uint8_t	valid;
58122 } __rte_packed_end;
58123 
58124 /**************************
58125  * hwrm_tf_em_hash_insert *
58126  **************************/
58127 
58128 
58129 /* hwrm_tf_em_hash_insert_input (size:1024b/128B) */
58130 struct __rte_packed_begin hwrm_tf_em_hash_insert_input {
58131 	/* The HWRM command request type. */
58132 	uint16_t	req_type;
58133 	/*
58134 	 * The completion ring to send the completion event on. This should
58135 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58136 	 */
58137 	uint16_t	cmpl_ring;
58138 	/*
58139 	 * The sequence ID is used by the driver for tracking multiple
58140 	 * commands. This ID is treated as opaque data by the firmware and
58141 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58142 	 */
58143 	uint16_t	seq_id;
58144 	/*
58145 	 * The target ID of the command:
58146 	 * * 0x0-0xFFF8 - The function ID
58147 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58148 	 * * 0xFFFD - Reserved for user-space HWRM interface
58149 	 * * 0xFFFF - HWRM
58150 	 */
58151 	uint16_t	target_id;
58152 	/*
58153 	 * A physical address pointer pointing to a host buffer that the
58154 	 * command's response data will be written. This can be either a host
58155 	 * physical address (HPA) or a guest physical address (GPA) and must
58156 	 * point to a physically contiguous block of memory.
58157 	 */
58158 	uint64_t	resp_addr;
58159 	/* Firmware Session Id. */
58160 	uint32_t	fw_session_id;
58161 	/* Control Flags. */
58162 	uint16_t	flags;
58163 	/* Indicates the flow direction. */
58164 	#define HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DIR     UINT32_C(0x1)
58165 	/* If this bit set to 0, then it indicates rx flow. */
58166 	#define HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58167 	/* If this bit is set to 1, then it indicates tx flow. */
58168 	#define HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58169 	#define HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DIR_LAST \
58170 		HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DIR_TX
58171 	/* Indicates table data is being sent via DMA. */
58172 	#define HWRM_TF_EM_HASH_INSERT_INPUT_FLAGS_DMA     UINT32_C(0x2)
58173 	/* Number of bits in the EM record. */
58174 	uint16_t	em_record_size_bits;
58175 	/* CRC32 hash of key. */
58176 	uint32_t	key0_hash;
58177 	/* Lookup3 hash of key. */
58178 	uint32_t	key1_hash;
58179 	/* Index of EM record. */
58180 	uint32_t	em_record_idx;
58181 	/* Unused. */
58182 	uint32_t	unused0;
58183 	/* EM record. */
58184 	uint64_t	em_record[11];
58185 } __rte_packed_end;
58186 
58187 /* hwrm_tf_em_hash_insert_output (size:128b/16B) */
58188 struct __rte_packed_begin hwrm_tf_em_hash_insert_output {
58189 	/* The specific error status for the command. */
58190 	uint16_t	error_code;
58191 	/* The HWRM command request type. */
58192 	uint16_t	req_type;
58193 	/* The sequence ID from the original command. */
58194 	uint16_t	seq_id;
58195 	/* The length of the response data in number of bytes. */
58196 	uint16_t	resp_len;
58197 	/* EM record pointer index. */
58198 	uint16_t	rptr_index;
58199 	/* EM record offset 0~3. */
58200 	uint8_t	rptr_entry;
58201 	/* Number of word entries consumed by the key. */
58202 	uint8_t	num_of_entries;
58203 	/* unused. */
58204 	uint8_t	unused0[3];
58205 	/*
58206 	 * This field is used in Output records to indicate that the output
58207 	 * is completely written to RAM. This field should be read as '1'
58208 	 * to indicate that the output has been completely written.
58209 	 * When writing a command completion or response to an internal
58210 	 * processor, the order of writes has to be such that this field
58211 	 * is written last.
58212 	 */
58213 	uint8_t	valid;
58214 } __rte_packed_end;
58215 
58216 /*********************
58217  * hwrm_tf_em_delete *
58218  *********************/
58219 
58220 
58221 /* hwrm_tf_em_delete_input (size:832b/104B) */
58222 struct __rte_packed_begin hwrm_tf_em_delete_input {
58223 	/* The HWRM command request type. */
58224 	uint16_t	req_type;
58225 	/*
58226 	 * The completion ring to send the completion event on. This should
58227 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58228 	 */
58229 	uint16_t	cmpl_ring;
58230 	/*
58231 	 * The sequence ID is used by the driver for tracking multiple
58232 	 * commands. This ID is treated as opaque data by the firmware and
58233 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58234 	 */
58235 	uint16_t	seq_id;
58236 	/*
58237 	 * The target ID of the command:
58238 	 * * 0x0-0xFFF8 - The function ID
58239 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58240 	 * * 0xFFFD - Reserved for user-space HWRM interface
58241 	 * * 0xFFFF - HWRM
58242 	 */
58243 	uint16_t	target_id;
58244 	/*
58245 	 * A physical address pointer pointing to a host buffer that the
58246 	 * command's response data will be written. This can be either a host
58247 	 * physical address (HPA) or a guest physical address (GPA) and must
58248 	 * point to a physically contiguous block of memory.
58249 	 */
58250 	uint64_t	resp_addr;
58251 	/* Session Id. */
58252 	uint32_t	fw_session_id;
58253 	/* Control flags. */
58254 	uint16_t	flags;
58255 	/* Indicates the flow direction. */
58256 	#define HWRM_TF_EM_DELETE_INPUT_FLAGS_DIR     UINT32_C(0x1)
58257 	/* If this bit set to 0, then it indicates rx flow. */
58258 	#define HWRM_TF_EM_DELETE_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58259 	/* If this bit is set to 1, then it indicates tx flow. */
58260 	#define HWRM_TF_EM_DELETE_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58261 	#define HWRM_TF_EM_DELETE_INPUT_FLAGS_DIR_LAST \
58262 		HWRM_TF_EM_DELETE_INPUT_FLAGS_DIR_TX
58263 	/* Unused0 */
58264 	uint16_t	unused0;
58265 	/* EM internal flow handle. */
58266 	uint64_t	flow_handle;
58267 	/* EM Key value */
58268 	uint64_t	em_key[8];
58269 	/* Number of bits in em_key. */
58270 	uint16_t	em_key_bitlen;
58271 	/* unused. */
58272 	uint16_t	unused1[3];
58273 } __rte_packed_end;
58274 
58275 /* hwrm_tf_em_delete_output (size:128b/16B) */
58276 struct __rte_packed_begin hwrm_tf_em_delete_output {
58277 	/* The specific error status for the command. */
58278 	uint16_t	error_code;
58279 	/* The HWRM command request type. */
58280 	uint16_t	req_type;
58281 	/* The sequence ID from the original command. */
58282 	uint16_t	seq_id;
58283 	/* The length of the response data in number of bytes. */
58284 	uint16_t	resp_len;
58285 	/* Original stack allocation index. */
58286 	uint16_t	em_index;
58287 	/* unused. */
58288 	uint8_t	unused0[5];
58289 	/*
58290 	 * This field is used in Output records to indicate that the output
58291 	 * is completely written to RAM. This field should be read as '1'
58292 	 * to indicate that the output has been completely written.
58293 	 * When writing a command completion or response to an internal
58294 	 * processor, the order of writes has to be such that this field
58295 	 * is written last.
58296 	 */
58297 	uint8_t	valid;
58298 } __rte_packed_end;
58299 
58300 /*******************
58301  * hwrm_tf_em_move *
58302  *******************/
58303 
58304 
58305 /* hwrm_tf_em_move_input (size:320b/40B) */
58306 struct __rte_packed_begin hwrm_tf_em_move_input {
58307 	/* The HWRM command request type. */
58308 	uint16_t	req_type;
58309 	/*
58310 	 * The completion ring to send the completion event on. This should
58311 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58312 	 */
58313 	uint16_t	cmpl_ring;
58314 	/*
58315 	 * The sequence ID is used by the driver for tracking multiple
58316 	 * commands. This ID is treated as opaque data by the firmware and
58317 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58318 	 */
58319 	uint16_t	seq_id;
58320 	/*
58321 	 * The target ID of the command:
58322 	 * * 0x0-0xFFF8 - The function ID
58323 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58324 	 * * 0xFFFD - Reserved for user-space HWRM interface
58325 	 * * 0xFFFF - HWRM
58326 	 */
58327 	uint16_t	target_id;
58328 	/*
58329 	 * A physical address pointer pointing to a host buffer that the
58330 	 * command's response data will be written. This can be either a host
58331 	 * physical address (HPA) or a guest physical address (GPA) and must
58332 	 * point to a physically contiguous block of memory.
58333 	 */
58334 	uint64_t	resp_addr;
58335 	/* Session Id. */
58336 	uint32_t	fw_session_id;
58337 	/* Control flags. */
58338 	uint16_t	flags;
58339 	/* Indicates the flow direction. */
58340 	#define HWRM_TF_EM_MOVE_INPUT_FLAGS_DIR     UINT32_C(0x1)
58341 	/* If this bit set to 0, then it indicates rx flow. */
58342 	#define HWRM_TF_EM_MOVE_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58343 	/* If this bit is set to 1, then it indicates tx flow. */
58344 	#define HWRM_TF_EM_MOVE_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58345 	#define HWRM_TF_EM_MOVE_INPUT_FLAGS_DIR_LAST \
58346 		HWRM_TF_EM_MOVE_INPUT_FLAGS_DIR_TX
58347 	/* Number of EM entry blocks */
58348 	uint16_t	num_blocks;
58349 	/* New index for entry */
58350 	uint32_t	new_index;
58351 	/* Unused */
58352 	uint32_t	unused0;
58353 	/* EM internal flow handle. */
58354 	uint64_t	flow_handle;
58355 } __rte_packed_end;
58356 
58357 /* hwrm_tf_em_move_output (size:128b/16B) */
58358 struct __rte_packed_begin hwrm_tf_em_move_output {
58359 	/* The specific error status for the command. */
58360 	uint16_t	error_code;
58361 	/* The HWRM command request type. */
58362 	uint16_t	req_type;
58363 	/* The sequence ID from the original command. */
58364 	uint16_t	seq_id;
58365 	/* The length of the response data in number of bytes. */
58366 	uint16_t	resp_len;
58367 	/* Index of old entry. */
58368 	uint16_t	em_index;
58369 	/* unused. */
58370 	uint8_t	unused0[5];
58371 	/*
58372 	 * This field is used in Output records to indicate that the output
58373 	 * is completely written to RAM. This field should be read as '1'
58374 	 * to indicate that the output has been completely written.
58375 	 * When writing a command completion or response to an internal
58376 	 * processor, the order of writes has to be such that this field
58377 	 * is written last.
58378 	 */
58379 	uint8_t	valid;
58380 } __rte_packed_end;
58381 
58382 /********************
58383  * hwrm_tf_tcam_set *
58384  ********************/
58385 
58386 
58387 /* hwrm_tf_tcam_set_input (size:1024b/128B) */
58388 struct __rte_packed_begin hwrm_tf_tcam_set_input {
58389 	/* The HWRM command request type. */
58390 	uint16_t	req_type;
58391 	/*
58392 	 * The completion ring to send the completion event on. This should
58393 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58394 	 */
58395 	uint16_t	cmpl_ring;
58396 	/*
58397 	 * The sequence ID is used by the driver for tracking multiple
58398 	 * commands. This ID is treated as opaque data by the firmware and
58399 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58400 	 */
58401 	uint16_t	seq_id;
58402 	/*
58403 	 * The target ID of the command:
58404 	 * * 0x0-0xFFF8 - The function ID
58405 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58406 	 * * 0xFFFD - Reserved for user-space HWRM interface
58407 	 * * 0xFFFF - HWRM
58408 	 */
58409 	uint16_t	target_id;
58410 	/*
58411 	 * A physical address pointer pointing to a host buffer that the
58412 	 * command's response data will be written. This can be either a host
58413 	 * physical address (HPA) or a guest physical address (GPA) and must
58414 	 * point to a physically contiguous block of memory.
58415 	 */
58416 	uint64_t	resp_addr;
58417 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
58418 	uint32_t	fw_session_id;
58419 	/* Control flags. */
58420 	uint32_t	flags;
58421 	/* Indicates the flow direction. */
58422 	#define HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
58423 	/* If this bit set to 0, then it indicates rx flow. */
58424 	#define HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58425 	/* If this bit is set to 1, then it indicates tx flow. */
58426 	#define HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58427 	#define HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR_LAST \
58428 		HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR_TX
58429 	/*
58430 	 * Indicate device data is being sent via DMA, the device
58431 	 * data is packing does not change.
58432 	 */
58433 	#define HWRM_TF_TCAM_SET_INPUT_FLAGS_DMA     UINT32_C(0x2)
58434 	/*
58435 	 * TCAM type of the resource, defined globally in the
58436 	 * hwrm_tf_resc_type enum.
58437 	 */
58438 	uint32_t	type;
58439 	/* Index of TCAM entry. */
58440 	uint16_t	idx;
58441 	/* Number of bytes in the TCAM key. */
58442 	uint8_t	key_size;
58443 	/* Number of bytes in the TCAM result. */
58444 	uint8_t	result_size;
58445 	/*
58446 	 * Offset from which the mask bytes start in the device data
58447 	 * array, key offset is always 0.
58448 	 */
58449 	uint8_t	mask_offset;
58450 	/* Offset from which the result bytes start in the device data array. */
58451 	uint8_t	result_offset;
58452 	/* unused. */
58453 	uint8_t	unused0[6];
58454 	/*
58455 	 * TCAM key located at offset 0, mask located at mask_offset
58456 	 * and result at result_offset for the device.
58457 	 */
58458 	uint8_t	dev_data[88];
58459 } __rte_packed_end;
58460 
58461 /* hwrm_tf_tcam_set_output (size:128b/16B) */
58462 struct __rte_packed_begin hwrm_tf_tcam_set_output {
58463 	/* The specific error status for the command. */
58464 	uint16_t	error_code;
58465 	/* The HWRM command request type. */
58466 	uint16_t	req_type;
58467 	/* The sequence ID from the original command. */
58468 	uint16_t	seq_id;
58469 	/* The length of the response data in number of bytes. */
58470 	uint16_t	resp_len;
58471 	/* unused. */
58472 	uint8_t	unused0[7];
58473 	/*
58474 	 * This field is used in Output records to indicate that the
58475 	 * output is completely written to RAM. This field should be
58476 	 * read as '1' to indicate that the output has been
58477 	 * completely written. When writing a command completion or
58478 	 * response to an internal processor, the order of writes has
58479 	 * to be such that this field is written last.
58480 	 */
58481 	uint8_t	valid;
58482 } __rte_packed_end;
58483 
58484 /********************
58485  * hwrm_tf_tcam_get *
58486  ********************/
58487 
58488 
58489 /* hwrm_tf_tcam_get_input (size:256b/32B) */
58490 struct __rte_packed_begin hwrm_tf_tcam_get_input {
58491 	/* The HWRM command request type. */
58492 	uint16_t	req_type;
58493 	/*
58494 	 * The completion ring to send the completion event on. This should
58495 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58496 	 */
58497 	uint16_t	cmpl_ring;
58498 	/*
58499 	 * The sequence ID is used by the driver for tracking multiple
58500 	 * commands. This ID is treated as opaque data by the firmware and
58501 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58502 	 */
58503 	uint16_t	seq_id;
58504 	/*
58505 	 * The target ID of the command:
58506 	 * * 0x0-0xFFF8 - The function ID
58507 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58508 	 * * 0xFFFD - Reserved for user-space HWRM interface
58509 	 * * 0xFFFF - HWRM
58510 	 */
58511 	uint16_t	target_id;
58512 	/*
58513 	 * A physical address pointer pointing to a host buffer that the
58514 	 * command's response data will be written. This can be either a host
58515 	 * physical address (HPA) or a guest physical address (GPA) and must
58516 	 * point to a physically contiguous block of memory.
58517 	 */
58518 	uint64_t	resp_addr;
58519 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
58520 	uint32_t	fw_session_id;
58521 	/* Control flags. */
58522 	uint32_t	flags;
58523 	/* Indicates the flow direction. */
58524 	#define HWRM_TF_TCAM_GET_INPUT_FLAGS_DIR     UINT32_C(0x1)
58525 	/* If this bit set to 0, then it indicates rx flow. */
58526 	#define HWRM_TF_TCAM_GET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58527 	/* If this bit is set to 1, then it indicates tx flow. */
58528 	#define HWRM_TF_TCAM_GET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58529 	#define HWRM_TF_TCAM_GET_INPUT_FLAGS_DIR_LAST \
58530 		HWRM_TF_TCAM_GET_INPUT_FLAGS_DIR_TX
58531 	/*
58532 	 * TCAM type of the resource, defined globally in the
58533 	 * hwrm_tf_resc_type enum.
58534 	 */
58535 	uint32_t	type;
58536 	/* Index of a TCAM entry. */
58537 	uint16_t	idx;
58538 	/* unused. */
58539 	uint16_t	unused0;
58540 } __rte_packed_end;
58541 
58542 /* hwrm_tf_tcam_get_output (size:2368b/296B) */
58543 struct __rte_packed_begin hwrm_tf_tcam_get_output {
58544 	/* The specific error status for the command. */
58545 	uint16_t	error_code;
58546 	/* The HWRM command request type. */
58547 	uint16_t	req_type;
58548 	/* The sequence ID from the original command. */
58549 	uint16_t	seq_id;
58550 	/* The length of the response data in number of bytes. */
58551 	uint16_t	resp_len;
58552 	/* Number of bytes in the TCAM key. */
58553 	uint8_t	key_size;
58554 	/* Number of bytes in the TCAM entry. */
58555 	uint8_t	result_size;
58556 	/* Offset from which the mask bytes start in the device data array. */
58557 	uint8_t	mask_offset;
58558 	/* Offset from which the result bytes start in the device data array. */
58559 	uint8_t	result_offset;
58560 	/* unused. */
58561 	uint8_t	unused0[4];
58562 	/*
58563 	 * TCAM key located at offset 0, mask located at mask_offset
58564 	 * and result at result_offset for the device.
58565 	 */
58566 	uint8_t	dev_data[272];
58567 	/* unused. */
58568 	uint8_t	unused1[7];
58569 	/*
58570 	 * This field is used in Output records to indicate that the
58571 	 * output is completely written to RAM. This field should be
58572 	 * read as '1' to indicate that the output has been
58573 	 * completely written. When writing a command completion or
58574 	 * response to an internal processor, the order of writes has
58575 	 * to be such that this field is written last.
58576 	 */
58577 	uint8_t	valid;
58578 } __rte_packed_end;
58579 
58580 /*********************
58581  * hwrm_tf_tcam_move *
58582  *********************/
58583 
58584 
58585 /* hwrm_tf_tcam_move_input (size:1024b/128B) */
58586 struct __rte_packed_begin hwrm_tf_tcam_move_input {
58587 	/* The HWRM command request type. */
58588 	uint16_t	req_type;
58589 	/*
58590 	 * The completion ring to send the completion event on. This should
58591 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58592 	 */
58593 	uint16_t	cmpl_ring;
58594 	/*
58595 	 * The sequence ID is used by the driver for tracking multiple
58596 	 * commands. This ID is treated as opaque data by the firmware and
58597 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58598 	 */
58599 	uint16_t	seq_id;
58600 	/*
58601 	 * The target ID of the command:
58602 	 * * 0x0-0xFFF8 - The function ID
58603 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58604 	 * * 0xFFFD - Reserved for user-space HWRM interface
58605 	 * * 0xFFFF - HWRM
58606 	 */
58607 	uint16_t	target_id;
58608 	/*
58609 	 * A physical address pointer pointing to a host buffer that the
58610 	 * command's response data will be written. This can be either a host
58611 	 * physical address (HPA) or a guest physical address (GPA) and must
58612 	 * point to a physically contiguous block of memory.
58613 	 */
58614 	uint64_t	resp_addr;
58615 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
58616 	uint32_t	fw_session_id;
58617 	/* Control flags. */
58618 	uint32_t	flags;
58619 	/* Indicates the flow direction. */
58620 	#define HWRM_TF_TCAM_MOVE_INPUT_FLAGS_DIR     UINT32_C(0x1)
58621 	/* If this bit set to 0, then it indicates rx flow. */
58622 	#define HWRM_TF_TCAM_MOVE_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58623 	/* If this bit is set to 1, then it indicates tx flow. */
58624 	#define HWRM_TF_TCAM_MOVE_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58625 	#define HWRM_TF_TCAM_MOVE_INPUT_FLAGS_DIR_LAST \
58626 		HWRM_TF_TCAM_MOVE_INPUT_FLAGS_DIR_TX
58627 	/*
58628 	 * TCAM type of the resource, defined globally in the
58629 	 * hwrm_tf_resc_type enum.
58630 	 */
58631 	uint32_t	type;
58632 	/* Number of TCAM index pairs to be swapped for the device. */
58633 	uint16_t	count;
58634 	/* unused. */
58635 	uint16_t	unused0;
58636 	/* TCAM index pairs to be swapped for the device. */
58637 	uint16_t	idx_pairs[48];
58638 } __rte_packed_end;
58639 
58640 /* hwrm_tf_tcam_move_output (size:128b/16B) */
58641 struct __rte_packed_begin hwrm_tf_tcam_move_output {
58642 	/* The specific error status for the command. */
58643 	uint16_t	error_code;
58644 	/* The HWRM command request type. */
58645 	uint16_t	req_type;
58646 	/* The sequence ID from the original command. */
58647 	uint16_t	seq_id;
58648 	/* The length of the response data in number of bytes. */
58649 	uint16_t	resp_len;
58650 	/* unused. */
58651 	uint8_t	unused0[7];
58652 	/*
58653 	 * This field is used in Output records to indicate that the
58654 	 * output is completely written to RAM. This field should be
58655 	 * read as '1' to indicate that the output has been
58656 	 * completely written. When writing a command completion or
58657 	 * response to an internal processor, the order of writes has
58658 	 * to be such that this field is written last.
58659 	 */
58660 	uint8_t	valid;
58661 } __rte_packed_end;
58662 
58663 /*********************
58664  * hwrm_tf_tcam_free *
58665  *********************/
58666 
58667 
58668 /* hwrm_tf_tcam_free_input (size:1024b/128B) */
58669 struct __rte_packed_begin hwrm_tf_tcam_free_input {
58670 	/* The HWRM command request type. */
58671 	uint16_t	req_type;
58672 	/*
58673 	 * The completion ring to send the completion event on. This should
58674 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58675 	 */
58676 	uint16_t	cmpl_ring;
58677 	/*
58678 	 * The sequence ID is used by the driver for tracking multiple
58679 	 * commands. This ID is treated as opaque data by the firmware and
58680 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58681 	 */
58682 	uint16_t	seq_id;
58683 	/*
58684 	 * The target ID of the command:
58685 	 * * 0x0-0xFFF8 - The function ID
58686 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58687 	 * * 0xFFFD - Reserved for user-space HWRM interface
58688 	 * * 0xFFFF - HWRM
58689 	 */
58690 	uint16_t	target_id;
58691 	/*
58692 	 * A physical address pointer pointing to a host buffer that the
58693 	 * command's response data will be written. This can be either a host
58694 	 * physical address (HPA) or a guest physical address (GPA) and must
58695 	 * point to a physically contiguous block of memory.
58696 	 */
58697 	uint64_t	resp_addr;
58698 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
58699 	uint32_t	fw_session_id;
58700 	/* Control flags. */
58701 	uint32_t	flags;
58702 	/* Indicates the flow direction. */
58703 	#define HWRM_TF_TCAM_FREE_INPUT_FLAGS_DIR     UINT32_C(0x1)
58704 	/* If this bit set to 0, then it indicates rx flow. */
58705 	#define HWRM_TF_TCAM_FREE_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58706 	/* If this bit is set to 1, then it indicates tx flow. */
58707 	#define HWRM_TF_TCAM_FREE_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58708 	#define HWRM_TF_TCAM_FREE_INPUT_FLAGS_DIR_LAST \
58709 		HWRM_TF_TCAM_FREE_INPUT_FLAGS_DIR_TX
58710 	/*
58711 	 * TCAM type of the resource, defined globally in the
58712 	 * hwrm_tf_resc_type enum.
58713 	 */
58714 	uint32_t	type;
58715 	/* Number of TCAM index to be deleted for the device. */
58716 	uint16_t	count;
58717 	/* unused. */
58718 	uint16_t	unused0;
58719 	/* TCAM index list to be deleted for the device. */
58720 	uint16_t	idx_list[48];
58721 } __rte_packed_end;
58722 
58723 /* hwrm_tf_tcam_free_output (size:128b/16B) */
58724 struct __rte_packed_begin hwrm_tf_tcam_free_output {
58725 	/* The specific error status for the command. */
58726 	uint16_t	error_code;
58727 	/* The HWRM command request type. */
58728 	uint16_t	req_type;
58729 	/* The sequence ID from the original command. */
58730 	uint16_t	seq_id;
58731 	/* The length of the response data in number of bytes. */
58732 	uint16_t	resp_len;
58733 	/* unused. */
58734 	uint8_t	unused0[7];
58735 	/*
58736 	 * This field is used in Output records to indicate that the
58737 	 * output is completely written to RAM. This field should be
58738 	 * read as '1' to indicate that the output has been
58739 	 * completely written. When writing a command completion or
58740 	 * response to an internal processor, the order of writes has
58741 	 * to be such that this field is written last.
58742 	 */
58743 	uint8_t	valid;
58744 } __rte_packed_end;
58745 
58746 /**************************
58747  * hwrm_tf_global_cfg_set *
58748  **************************/
58749 
58750 
58751 /* hwrm_tf_global_cfg_set_input (size:448b/56B) */
58752 struct __rte_packed_begin hwrm_tf_global_cfg_set_input {
58753 	/* The HWRM command request type. */
58754 	uint16_t	req_type;
58755 	/*
58756 	 * The completion ring to send the completion event on. This should
58757 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58758 	 */
58759 	uint16_t	cmpl_ring;
58760 	/*
58761 	 * The sequence ID is used by the driver for tracking multiple
58762 	 * commands. This ID is treated as opaque data by the firmware and
58763 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58764 	 */
58765 	uint16_t	seq_id;
58766 	/*
58767 	 * The target ID of the command:
58768 	 * * 0x0-0xFFF8 - The function ID
58769 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58770 	 * * 0xFFFD - Reserved for user-space HWRM interface
58771 	 * * 0xFFFF - HWRM
58772 	 */
58773 	uint16_t	target_id;
58774 	/*
58775 	 * A physical address pointer pointing to a host buffer that the
58776 	 * command's response data will be written. This can be either a host
58777 	 * physical address (HPA) or a guest physical address (GPA) and must
58778 	 * point to a physically contiguous block of memory.
58779 	 */
58780 	uint64_t	resp_addr;
58781 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
58782 	uint32_t	fw_session_id;
58783 	/* Control flags. */
58784 	uint32_t	flags;
58785 	/* Indicates the flow direction. */
58786 	#define HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
58787 	/* If this bit set to 0, then it indicates rx flow. */
58788 	#define HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58789 	/* If this bit is set to 1, then it indicates tx flow. */
58790 	#define HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58791 	#define HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR_LAST \
58792 		HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR_TX
58793 	/* Indicate device data is being sent via DMA. */
58794 	#define HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DMA     UINT32_C(0x2)
58795 	/* Global Cfg type */
58796 	uint32_t	type;
58797 	/* Offset of the type */
58798 	uint32_t	offset;
58799 	/* Size of the data to set in bytes */
58800 	uint16_t	size;
58801 	/* unused. */
58802 	uint8_t	unused0[6];
58803 	/* Data to set */
58804 	uint8_t	data[8];
58805 	/* Mask of data to set, 0 indicates no mask */
58806 	uint8_t	mask[8];
58807 } __rte_packed_end;
58808 
58809 /* hwrm_tf_global_cfg_set_output (size:128b/16B) */
58810 struct __rte_packed_begin hwrm_tf_global_cfg_set_output {
58811 	/* The specific error status for the command. */
58812 	uint16_t	error_code;
58813 	/* The HWRM command request type. */
58814 	uint16_t	req_type;
58815 	/* The sequence ID from the original command. */
58816 	uint16_t	seq_id;
58817 	/* The length of the response data in number of bytes. */
58818 	uint16_t	resp_len;
58819 	/* unused. */
58820 	uint8_t	unused0[7];
58821 	/*
58822 	 * This field is used in Output records to indicate that the
58823 	 * output is completely written to RAM. This field should be
58824 	 * read as '1' to indicate that the output has been
58825 	 * completely written. When writing a command completion or
58826 	 * response to an internal processor, the order of writes has
58827 	 * to be such that this field is written last.
58828 	 */
58829 	uint8_t	valid;
58830 } __rte_packed_end;
58831 
58832 /**************************
58833  * hwrm_tf_global_cfg_get *
58834  **************************/
58835 
58836 
58837 /* hwrm_tf_global_cfg_get_input (size:320b/40B) */
58838 struct __rte_packed_begin hwrm_tf_global_cfg_get_input {
58839 	/* The HWRM command request type. */
58840 	uint16_t	req_type;
58841 	/*
58842 	 * The completion ring to send the completion event on. This should
58843 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58844 	 */
58845 	uint16_t	cmpl_ring;
58846 	/*
58847 	 * The sequence ID is used by the driver for tracking multiple
58848 	 * commands. This ID is treated as opaque data by the firmware and
58849 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58850 	 */
58851 	uint16_t	seq_id;
58852 	/*
58853 	 * The target ID of the command:
58854 	 * * 0x0-0xFFF8 - The function ID
58855 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58856 	 * * 0xFFFD - Reserved for user-space HWRM interface
58857 	 * * 0xFFFF - HWRM
58858 	 */
58859 	uint16_t	target_id;
58860 	/*
58861 	 * A physical address pointer pointing to a host buffer that the
58862 	 * command's response data will be written. This can be either a host
58863 	 * physical address (HPA) or a guest physical address (GPA) and must
58864 	 * point to a physically contiguous block of memory.
58865 	 */
58866 	uint64_t	resp_addr;
58867 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
58868 	uint32_t	fw_session_id;
58869 	/* Control flags. */
58870 	uint32_t	flags;
58871 	/* Indicates the flow direction. */
58872 	#define HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR     UINT32_C(0x1)
58873 	/* If this bit set to 0, then it indicates rx flow. */
58874 	#define HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58875 	/* If this bit is set to 1, then it indicates tx flow. */
58876 	#define HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58877 	#define HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR_LAST \
58878 		HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR_TX
58879 	/* Global Cfg type */
58880 	uint32_t	type;
58881 	/* Offset of the type */
58882 	uint32_t	offset;
58883 	/* Size of the data to set in bytes */
58884 	uint16_t	size;
58885 	/* unused. */
58886 	uint8_t	unused0[6];
58887 } __rte_packed_end;
58888 
58889 /* hwrm_tf_global_cfg_get_output (size:2240b/280B) */
58890 struct __rte_packed_begin hwrm_tf_global_cfg_get_output {
58891 	/* The specific error status for the command. */
58892 	uint16_t	error_code;
58893 	/* The HWRM command request type. */
58894 	uint16_t	req_type;
58895 	/* The sequence ID from the original command. */
58896 	uint16_t	seq_id;
58897 	/* The length of the response data in number of bytes. */
58898 	uint16_t	resp_len;
58899 	/* Size of the data read in bytes */
58900 	uint16_t	size;
58901 	/* unused. */
58902 	uint8_t	unused0[6];
58903 	/* Data to set */
58904 	uint8_t	data[256];
58905 	/* unused. */
58906 	uint8_t	unused1[7];
58907 	/*
58908 	 * This field is used in Output records to indicate that the output
58909 	 * is completely written to RAM. This field should be read as '1'
58910 	 * to indicate that the output has been completely written.
58911 	 * When writing a command completion or response to an internal
58912 	 * processor, the order of writes has to be such that this field is
58913 	 * written last.
58914 	 */
58915 	uint8_t	valid;
58916 } __rte_packed_end;
58917 
58918 /**********************
58919  * hwrm_tf_if_tbl_get *
58920  **********************/
58921 
58922 
58923 /* hwrm_tf_if_tbl_get_input (size:256b/32B) */
58924 struct __rte_packed_begin hwrm_tf_if_tbl_get_input {
58925 	/* The HWRM command request type. */
58926 	uint16_t	req_type;
58927 	/*
58928 	 * The completion ring to send the completion event on. This should
58929 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
58930 	 */
58931 	uint16_t	cmpl_ring;
58932 	/*
58933 	 * The sequence ID is used by the driver for tracking multiple
58934 	 * commands. This ID is treated as opaque data by the firmware and
58935 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
58936 	 */
58937 	uint16_t	seq_id;
58938 	/*
58939 	 * The target ID of the command:
58940 	 * * 0x0-0xFFF8 - The function ID
58941 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
58942 	 * * 0xFFFD - Reserved for user-space HWRM interface
58943 	 * * 0xFFFF - HWRM
58944 	 */
58945 	uint16_t	target_id;
58946 	/*
58947 	 * A physical address pointer pointing to a host buffer that the
58948 	 * command's response data will be written. This can be either a host
58949 	 * physical address (HPA) or a guest physical address (GPA) and must
58950 	 * point to a physically contiguous block of memory.
58951 	 */
58952 	uint64_t	resp_addr;
58953 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
58954 	uint32_t	fw_session_id;
58955 	/* Control flags. */
58956 	uint16_t	flags;
58957 	/* Indicates the flow direction. */
58958 	#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR     UINT32_C(0x1)
58959 	/* If this bit set to 0, then it indicates rx flow. */
58960 	#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
58961 	/* If this bit is set to 1, then it indicates tx flow. */
58962 	#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
58963 	#define HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_LAST \
58964 		HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX
58965 	/* Size of the data to set. */
58966 	uint16_t	size;
58967 	/*
58968 	 * Type of the resource, defined globally in the
58969 	 * hwrm_tf_resc_type enum.
58970 	 */
58971 	uint32_t	type;
58972 	/* Index of the type to retrieve. */
58973 	uint32_t	index;
58974 } __rte_packed_end;
58975 
58976 /* hwrm_tf_if_tbl_get_output (size:1216b/152B) */
58977 struct __rte_packed_begin hwrm_tf_if_tbl_get_output {
58978 	/* The specific error status for the command. */
58979 	uint16_t	error_code;
58980 	/* The HWRM command request type. */
58981 	uint16_t	req_type;
58982 	/* The sequence ID from the original command. */
58983 	uint16_t	seq_id;
58984 	/* The length of the response data in number of bytes. */
58985 	uint16_t	resp_len;
58986 	/* Response code. */
58987 	uint32_t	resp_code;
58988 	/* Response size. */
58989 	uint16_t	size;
58990 	/* unused */
58991 	uint16_t	unused0;
58992 	/* Response data. */
58993 	uint8_t	data[128];
58994 	/* unused */
58995 	uint8_t	unused1[7];
58996 	/*
58997 	 * This field is used in Output records to indicate that the output
58998 	 * is completely written to RAM. This field should be read as '1'
58999 	 * to indicate that the output has been completely written.
59000 	 * When writing a command completion or response to an internal
59001 	 * processor, the order of writes has to be such that this field
59002 	 * is written last.
59003 	 */
59004 	uint8_t	valid;
59005 } __rte_packed_end;
59006 
59007 /***************************
59008  * hwrm_tf_if_tbl_type_set *
59009  ***************************/
59010 
59011 
59012 /* hwrm_tf_if_tbl_set_input (size:1024b/128B) */
59013 struct __rte_packed_begin hwrm_tf_if_tbl_set_input {
59014 	/* The HWRM command request type. */
59015 	uint16_t	req_type;
59016 	/*
59017 	 * The completion ring to send the completion event on. This should
59018 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59019 	 */
59020 	uint16_t	cmpl_ring;
59021 	/*
59022 	 * The sequence ID is used by the driver for tracking multiple
59023 	 * commands. This ID is treated as opaque data by the firmware and
59024 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59025 	 */
59026 	uint16_t	seq_id;
59027 	/*
59028 	 * The target ID of the command:
59029 	 * * 0x0-0xFFF8 - The function ID
59030 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59031 	 * * 0xFFFD - Reserved for user-space HWRM interface
59032 	 * * 0xFFFF - HWRM
59033 	 */
59034 	uint16_t	target_id;
59035 	/*
59036 	 * A physical address pointer pointing to a host buffer that the
59037 	 * command's response data will be written. This can be either a host
59038 	 * physical address (HPA) or a guest physical address (GPA) and must
59039 	 * point to a physically contiguous block of memory.
59040 	 */
59041 	uint64_t	resp_addr;
59042 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
59043 	uint32_t	fw_session_id;
59044 	/* Control flags. */
59045 	uint16_t	flags;
59046 	/* Indicates the flow direction. */
59047 	#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
59048 	/* If this bit set to 0, then it indicates rx flow. */
59049 	#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
59050 	/* If this bit is set to 1, then it indicates tx flow. */
59051 	#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
59052 	#define HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_LAST \
59053 		HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX
59054 	/* unused. */
59055 	uint8_t	unused0[2];
59056 	/*
59057 	 * Type of the resource, defined globally in the
59058 	 * hwrm_tf_resc_type enum.
59059 	 */
59060 	uint32_t	type;
59061 	/* Index of the type to set. */
59062 	uint32_t	index;
59063 	/* Size of the data to set. */
59064 	uint16_t	size;
59065 	/* unused */
59066 	uint8_t	unused1[6];
59067 	/* Data to be set. */
59068 	uint8_t	data[88];
59069 } __rte_packed_end;
59070 
59071 /* hwrm_tf_if_tbl_set_output (size:128b/16B) */
59072 struct __rte_packed_begin hwrm_tf_if_tbl_set_output {
59073 	/* The specific error status for the command. */
59074 	uint16_t	error_code;
59075 	/* The HWRM command request type. */
59076 	uint16_t	req_type;
59077 	/* The sequence ID from the original command. */
59078 	uint16_t	seq_id;
59079 	/* The length of the response data in number of bytes. */
59080 	uint16_t	resp_len;
59081 	/* unused. */
59082 	uint8_t	unused0[7];
59083 	/*
59084 	 * This field is used in Output records to indicate that the output
59085 	 * is completely written to RAM. This field should be read as '1'
59086 	 * to indicate that the output has been completely written.
59087 	 * When writing a command completion or response to an internal
59088 	 * processor, the order of writes has to be such that this field
59089 	 * is written last.
59090 	 */
59091 	uint8_t	valid;
59092 } __rte_packed_end;
59093 
59094 /*****************************
59095  * hwrm_tf_tbl_type_bulk_get *
59096  *****************************/
59097 
59098 
59099 /* hwrm_tf_tbl_type_bulk_get_input (size:384b/48B) */
59100 struct __rte_packed_begin hwrm_tf_tbl_type_bulk_get_input {
59101 	/* The HWRM command request type. */
59102 	uint16_t	req_type;
59103 	/*
59104 	 * The completion ring to send the completion event on. This should
59105 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59106 	 */
59107 	uint16_t	cmpl_ring;
59108 	/*
59109 	 * The sequence ID is used by the driver for tracking multiple
59110 	 * commands. This ID is treated as opaque data by the firmware and
59111 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59112 	 */
59113 	uint16_t	seq_id;
59114 	/*
59115 	 * The target ID of the command:
59116 	 * * 0x0-0xFFF8 - The function ID
59117 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59118 	 * * 0xFFFD - Reserved for user-space HWRM interface
59119 	 * * 0xFFFF - HWRM
59120 	 */
59121 	uint16_t	target_id;
59122 	/*
59123 	 * A physical address pointer pointing to a host buffer that the
59124 	 * command's response data will be written. This can be either a host
59125 	 * physical address (HPA) or a guest physical address (GPA) and must
59126 	 * point to a physically contiguous block of memory.
59127 	 */
59128 	uint64_t	resp_addr;
59129 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
59130 	uint32_t	fw_session_id;
59131 	/* Control flags. */
59132 	uint16_t	flags;
59133 	/* Indicates the flow direction. */
59134 	#define HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR \
59135 		UINT32_C(0x1)
59136 	/* If this bit set to 0, then it indicates rx flow. */
59137 	#define HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_RX \
59138 		UINT32_C(0x0)
59139 	/* If this bit is set to 1, then it indicates tx flow. */
59140 	#define HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_TX \
59141 		UINT32_C(0x1)
59142 	#define HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_LAST \
59143 		HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_DIR_TX
59144 	/*
59145 	 * When set use the special access register access to clear
59146 	 * the table entries on read.
59147 	 */
59148 	#define HWRM_TF_TBL_TYPE_BULK_GET_INPUT_FLAGS_CLEAR_ON_READ \
59149 		UINT32_C(0x2)
59150 	/* unused. */
59151 	uint8_t	unused0[2];
59152 	/*
59153 	 * Type of the resource, defined globally in the
59154 	 * hwrm_tf_resc_type enum.
59155 	 */
59156 	uint32_t	type;
59157 	/* Starting index of the type to retrieve. */
59158 	uint32_t	start_index;
59159 	/* Number of entries to retrieve. */
59160 	uint32_t	num_entries;
59161 	/* Number of entries to retrieve. */
59162 	uint32_t	unused1;
59163 	/* Host memory where data will be stored. */
59164 	uint64_t	host_addr;
59165 } __rte_packed_end;
59166 
59167 /* hwrm_tf_tbl_type_bulk_get_output (size:128b/16B) */
59168 struct __rte_packed_begin hwrm_tf_tbl_type_bulk_get_output {
59169 	/* The specific error status for the command. */
59170 	uint16_t	error_code;
59171 	/* The HWRM command request type. */
59172 	uint16_t	req_type;
59173 	/* The sequence ID from the original command. */
59174 	uint16_t	seq_id;
59175 	/* The length of the response data in number of bytes. */
59176 	uint16_t	resp_len;
59177 	/* Response code. */
59178 	uint32_t	resp_code;
59179 	/* Response size. */
59180 	uint16_t	size;
59181 	/* unused */
59182 	uint8_t	unused0;
59183 	/*
59184 	 * This field is used in Output records to indicate that the output
59185 	 * is completely written to RAM. This field should be read as '1'
59186 	 * to indicate that the output has been completely written.
59187 	 * When writing a command completion or response to an internal
59188 	 * processor, the order of writes has to be such that this field
59189 	 * is written last.
59190 	 */
59191 	uint8_t	valid;
59192 } __rte_packed_end;
59193 
59194 /***********************************
59195  * hwrm_tf_session_hotup_state_set *
59196  ***********************************/
59197 
59198 
59199 /* hwrm_tf_session_hotup_state_set_input (size:192b/24B) */
59200 struct __rte_packed_begin hwrm_tf_session_hotup_state_set_input {
59201 	/* The HWRM command request type. */
59202 	uint16_t	req_type;
59203 	/*
59204 	 * The completion ring to send the completion event on. This should
59205 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59206 	 */
59207 	uint16_t	cmpl_ring;
59208 	/*
59209 	 * The sequence ID is used by the driver for tracking multiple
59210 	 * commands. This ID is treated as opaque data by the firmware and
59211 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59212 	 */
59213 	uint16_t	seq_id;
59214 	/*
59215 	 * The target ID of the command:
59216 	 * * 0x0-0xFFF8 - The function ID
59217 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59218 	 * * 0xFFFD - Reserved for user-space HWRM interface
59219 	 * * 0xFFFF - HWRM
59220 	 */
59221 	uint16_t	target_id;
59222 	/*
59223 	 * A physical address pointer pointing to a host buffer that the
59224 	 * command's response data will be written. This can be either a host
59225 	 * physical address (HPA) or a guest physical address (GPA) and must
59226 	 * point to a physically contiguous block of memory.
59227 	 */
59228 	uint64_t	resp_addr;
59229 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
59230 	uint32_t	fw_session_id;
59231 	/* Shared session state. */
59232 	uint16_t	state;
59233 	/* Control flags. */
59234 	uint16_t	flags;
59235 	/* Indicates the flow direction. */
59236 	#define HWRM_TF_SESSION_HOTUP_STATE_SET_INPUT_FLAGS_DIR \
59237 		UINT32_C(0x1)
59238 	/* If this bit set to 0, then it indicates rx flow. */
59239 	#define HWRM_TF_SESSION_HOTUP_STATE_SET_INPUT_FLAGS_DIR_RX \
59240 		UINT32_C(0x0)
59241 	/* If this bit is set to 1, then it indicates tx flow. */
59242 	#define HWRM_TF_SESSION_HOTUP_STATE_SET_INPUT_FLAGS_DIR_TX \
59243 		UINT32_C(0x1)
59244 	#define HWRM_TF_SESSION_HOTUP_STATE_SET_INPUT_FLAGS_DIR_LAST \
59245 		HWRM_TF_SESSION_HOTUP_STATE_SET_INPUT_FLAGS_DIR_TX
59246 } __rte_packed_end;
59247 
59248 /* hwrm_tf_session_hotup_state_set_output (size:128b/16B) */
59249 struct __rte_packed_begin hwrm_tf_session_hotup_state_set_output {
59250 	/* The specific error status for the command. */
59251 	uint16_t	error_code;
59252 	/* The HWRM command request type. */
59253 	uint16_t	req_type;
59254 	/* The sequence ID from the original command. */
59255 	uint16_t	seq_id;
59256 	/* The length of the response data in number of bytes. */
59257 	uint16_t	resp_len;
59258 	/* unused. */
59259 	uint8_t	unused0[7];
59260 	/*
59261 	 * This field is used in Output records to indicate that the output
59262 	 * is completely written to RAM. This field should be read as '1'
59263 	 * to indicate that the output has been completely written.
59264 	 * When writing a command completion or response to an internal
59265 	 * processor, the order of writes has to be such that this field
59266 	 * is written last.
59267 	 */
59268 	uint8_t	valid;
59269 } __rte_packed_end;
59270 
59271 /***********************************
59272  * hwrm_tf_session_hotup_state_get *
59273  ***********************************/
59274 
59275 
59276 /* hwrm_tf_session_hotup_state_get_input (size:192b/24B) */
59277 struct __rte_packed_begin hwrm_tf_session_hotup_state_get_input {
59278 	/* The HWRM command request type. */
59279 	uint16_t	req_type;
59280 	/*
59281 	 * The completion ring to send the completion event on. This should
59282 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59283 	 */
59284 	uint16_t	cmpl_ring;
59285 	/*
59286 	 * The sequence ID is used by the driver for tracking multiple
59287 	 * commands. This ID is treated as opaque data by the firmware and
59288 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59289 	 */
59290 	uint16_t	seq_id;
59291 	/*
59292 	 * The target ID of the command:
59293 	 * * 0x0-0xFFF8 - The function ID
59294 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59295 	 * * 0xFFFD - Reserved for user-space HWRM interface
59296 	 * * 0xFFFF - HWRM
59297 	 */
59298 	uint16_t	target_id;
59299 	/*
59300 	 * A physical address pointer pointing to a host buffer that the
59301 	 * command's response data will be written. This can be either a host
59302 	 * physical address (HPA) or a guest physical address (GPA) and must
59303 	 * point to a physically contiguous block of memory.
59304 	 */
59305 	uint64_t	resp_addr;
59306 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
59307 	uint32_t	fw_session_id;
59308 	/* Control flags. */
59309 	uint16_t	flags;
59310 	/* Indicates the flow direction. */
59311 	#define HWRM_TF_SESSION_HOTUP_STATE_GET_INPUT_FLAGS_DIR \
59312 		UINT32_C(0x1)
59313 	/* If this bit set to 0, then it indicates rx flow. */
59314 	#define HWRM_TF_SESSION_HOTUP_STATE_GET_INPUT_FLAGS_DIR_RX \
59315 		UINT32_C(0x0)
59316 	/* If this bit is set to 1, then it indicates tx flow. */
59317 	#define HWRM_TF_SESSION_HOTUP_STATE_GET_INPUT_FLAGS_DIR_TX \
59318 		UINT32_C(0x1)
59319 	#define HWRM_TF_SESSION_HOTUP_STATE_GET_INPUT_FLAGS_DIR_LAST \
59320 		HWRM_TF_SESSION_HOTUP_STATE_GET_INPUT_FLAGS_DIR_TX
59321 	/* unused. */
59322 	uint8_t	unused0[2];
59323 } __rte_packed_end;
59324 
59325 /* hwrm_tf_session_hotup_state_get_output (size:128b/16B) */
59326 struct __rte_packed_begin hwrm_tf_session_hotup_state_get_output {
59327 	/* The specific error status for the command. */
59328 	uint16_t	error_code;
59329 	/* The HWRM command request type. */
59330 	uint16_t	req_type;
59331 	/* The sequence ID from the original command. */
59332 	uint16_t	seq_id;
59333 	/* The length of the response data in number of bytes. */
59334 	uint16_t	resp_len;
59335 	/* Shared session HA state. */
59336 	uint16_t	state;
59337 	/* Shared session HA reference count. */
59338 	uint16_t	ref_cnt;
59339 	/* unused. */
59340 	uint8_t	unused0[3];
59341 	/*
59342 	 * This field is used in Output records to indicate that the output
59343 	 * is completely written to RAM. This field should be read as '1'
59344 	 * to indicate that the output has been completely written.
59345 	 * When writing a command completion or response to an internal
59346 	 * processor, the order of writes has to be such that this field
59347 	 * is written last.
59348 	 */
59349 	uint8_t	valid;
59350 } __rte_packed_end;
59351 
59352 /**************************
59353  * hwrm_tf_resc_usage_set *
59354  **************************/
59355 
59356 
59357 /* hwrm_tf_resc_usage_set_input (size:1024b/128B) */
59358 struct __rte_packed_begin hwrm_tf_resc_usage_set_input {
59359 	/* The HWRM command request type. */
59360 	uint16_t	req_type;
59361 	/*
59362 	 * The completion ring to send the completion event on. This should
59363 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59364 	 */
59365 	uint16_t	cmpl_ring;
59366 	/*
59367 	 * The sequence ID is used by the driver for tracking multiple
59368 	 * commands. This ID is treated as opaque data by the firmware and
59369 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59370 	 */
59371 	uint16_t	seq_id;
59372 	/*
59373 	 * The target ID of the command:
59374 	 * * 0x0-0xFFF8 - The function ID
59375 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59376 	 * * 0xFFFD - Reserved for user-space HWRM interface
59377 	 * * 0xFFFF - HWRM
59378 	 */
59379 	uint16_t	target_id;
59380 	/*
59381 	 * A physical address pointer pointing to a host buffer that the
59382 	 * command's response data will be written. This can be either a host
59383 	 * physical address (HPA) or a guest physical address (GPA) and must
59384 	 * point to a physically contiguous block of memory.
59385 	 */
59386 	uint64_t	resp_addr;
59387 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
59388 	uint32_t	fw_session_id;
59389 	/* Control flags. */
59390 	uint16_t	flags;
59391 	/* Indicates the flow direction. */
59392 	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
59393 	/* If this bit set to 0, then it indicates rx flow. */
59394 	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
59395 	/* If this bit is set to 1, then it indicates tx flow. */
59396 	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
59397 	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_LAST \
59398 		HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DIR_TX
59399 	/* Indicate table data is being sent via DMA. */
59400 	#define HWRM_TF_RESC_USAGE_SET_INPUT_FLAGS_DMA     UINT32_C(0x2)
59401 	/* Types of the resource to set their usage state. */
59402 	uint16_t	types;
59403 	/* WC TCAM Pool */
59404 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_WC_TCAM \
59405 		UINT32_C(0x1)
59406 	/* EM Internal Memory Pool */
59407 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_EM \
59408 		UINT32_C(0x2)
59409 	/* Meter Instance */
59410 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_METER \
59411 		UINT32_C(0x4)
59412 	/* Counter Record Table */
59413 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_COUNTER \
59414 		UINT32_C(0x8)
59415 	/* Action Record Table */
59416 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_ACTION \
59417 		UINT32_C(0x10)
59418 	/* ACT MODIFY/ENCAP Record Table */
59419 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_ACT_MOD_ENCAP \
59420 		UINT32_C(0x20)
59421 	/* Source Property SMAC Record Table */
59422 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_SP_SMAC \
59423 		UINT32_C(0x40)
59424 	/* All Resource Types */
59425 	#define HWRM_TF_RESC_USAGE_SET_INPUT_TYPES_ALL \
59426 		UINT32_C(0x80)
59427 	/* Size of the data to set. */
59428 	uint16_t	size;
59429 	/* unused */
59430 	uint8_t	unused1[6];
59431 	/* Data to be set. */
59432 	uint8_t	data[96];
59433 } __rte_packed_end;
59434 
59435 /* hwrm_tf_resc_usage_set_output (size:128b/16B) */
59436 struct __rte_packed_begin hwrm_tf_resc_usage_set_output {
59437 	/* The specific error status for the command. */
59438 	uint16_t	error_code;
59439 	/* The HWRM command request type. */
59440 	uint16_t	req_type;
59441 	/* The sequence ID from the original command. */
59442 	uint16_t	seq_id;
59443 	/* The length of the response data in number of bytes. */
59444 	uint16_t	resp_len;
59445 	/* unused. */
59446 	uint8_t	unused0[7];
59447 	/*
59448 	 * This field is used in Output records to indicate that the output
59449 	 * is completely written to RAM. This field should be read as '1'
59450 	 * to indicate that the output has been completely written.
59451 	 * When writing a command completion or response to an internal
59452 	 * processor, the order of writes has to be such that this field
59453 	 * is written last.
59454 	 */
59455 	uint8_t	valid;
59456 } __rte_packed_end;
59457 
59458 /****************************
59459  * hwrm_tf_resc_usage_query *
59460  ****************************/
59461 
59462 
59463 /* hwrm_tf_resc_usage_query_input (size:256b/32B) */
59464 struct __rte_packed_begin hwrm_tf_resc_usage_query_input {
59465 	/* The HWRM command request type. */
59466 	uint16_t	req_type;
59467 	/*
59468 	 * The completion ring to send the completion event on. This should
59469 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59470 	 */
59471 	uint16_t	cmpl_ring;
59472 	/*
59473 	 * The sequence ID is used by the driver for tracking multiple
59474 	 * commands. This ID is treated as opaque data by the firmware and
59475 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59476 	 */
59477 	uint16_t	seq_id;
59478 	/*
59479 	 * The target ID of the command:
59480 	 * * 0x0-0xFFF8 - The function ID
59481 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59482 	 * * 0xFFFD - Reserved for user-space HWRM interface
59483 	 * * 0xFFFF - HWRM
59484 	 */
59485 	uint16_t	target_id;
59486 	/*
59487 	 * A physical address pointer pointing to a host buffer that the
59488 	 * command's response data will be written. This can be either a host
59489 	 * physical address (HPA) or a guest physical address (GPA) and must
59490 	 * point to a physically contiguous block of memory.
59491 	 */
59492 	uint64_t	resp_addr;
59493 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
59494 	uint32_t	fw_session_id;
59495 	/* Control flags. */
59496 	uint16_t	flags;
59497 	/* Indicates the flow direction. */
59498 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR     UINT32_C(0x1)
59499 	/* If this bit set to 0, then it indicates rx flow. */
59500 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
59501 	/* If this bit is set to 1, then it indicates tx flow. */
59502 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
59503 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_LAST \
59504 		HWRM_TF_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX
59505 	/* unused. */
59506 	uint8_t	unused0[2];
59507 	/* Types of the resource to retrieve their usage state. */
59508 	uint16_t	types;
59509 	/* WC TCAM Pool */
59510 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_WC_TCAM \
59511 		UINT32_C(0x1)
59512 	/* EM Internal Memory Pool */
59513 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_EM \
59514 		UINT32_C(0x2)
59515 	/* Meter Instance */
59516 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_METER \
59517 		UINT32_C(0x4)
59518 	/* Counter Record Table */
59519 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_COUNTER \
59520 		UINT32_C(0x8)
59521 	/* Action Record Table */
59522 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_ACTION \
59523 		UINT32_C(0x10)
59524 	/* ACT MODIFY/ENCAP Record Table */
59525 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_ACT_MOD_ENCAP \
59526 		UINT32_C(0x20)
59527 	/* Source Property SMAC Record Table */
59528 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_SP_SMAC \
59529 		UINT32_C(0x40)
59530 	/* All Resource Types */
59531 	#define HWRM_TF_RESC_USAGE_QUERY_INPUT_TYPES_ALL \
59532 		UINT32_C(0x80)
59533 	/* unused */
59534 	uint8_t	unused1[6];
59535 } __rte_packed_end;
59536 
59537 /* hwrm_tf_resc_usage_query_output (size:960b/120B) */
59538 struct __rte_packed_begin hwrm_tf_resc_usage_query_output {
59539 	/* The specific error status for the command. */
59540 	uint16_t	error_code;
59541 	/* The HWRM command request type. */
59542 	uint16_t	req_type;
59543 	/* The sequence ID from the original command. */
59544 	uint16_t	seq_id;
59545 	/* The length of the response data in number of bytes. */
59546 	uint16_t	resp_len;
59547 	/* Response code. */
59548 	uint32_t	resp_code;
59549 	/* Response size. */
59550 	uint16_t	size;
59551 	/* unused */
59552 	uint16_t	unused0;
59553 	/* Response data. */
59554 	uint8_t	data[96];
59555 	/* unused */
59556 	uint8_t	unused1[7];
59557 	/*
59558 	 * This field is used in Output records to indicate that the output
59559 	 * is completely written to RAM. This field should be read as '1'
59560 	 * to indicate that the output has been completely written.
59561 	 * When writing a command completion or response to an internal
59562 	 * processor, the order of writes has to be such that this field
59563 	 * is written last.
59564 	 */
59565 	uint8_t	valid;
59566 } __rte_packed_end;
59567 
59568 /****************************
59569  * hwrm_tfc_tbl_scope_qcaps *
59570  ****************************/
59571 
59572 
59573 /*
59574  * TruFlow command to check if firmware is capable of
59575  * supporting table scopes.
59576  */
59577 /* hwrm_tfc_tbl_scope_qcaps_input (size:128b/16B) */
59578 struct __rte_packed_begin hwrm_tfc_tbl_scope_qcaps_input {
59579 	/* The HWRM command request type. */
59580 	uint16_t	req_type;
59581 	/*
59582 	 * The completion ring to send the completion event on. This should
59583 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59584 	 */
59585 	uint16_t	cmpl_ring;
59586 	/*
59587 	 * The sequence ID is used by the driver for tracking multiple
59588 	 * commands. This ID is treated as opaque data by the firmware and
59589 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59590 	 */
59591 	uint16_t	seq_id;
59592 	/*
59593 	 * The target ID of the command:
59594 	 * * 0x0-0xFFF8 - The function ID
59595 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59596 	 * * 0xFFFD - Reserved for user-space HWRM interface
59597 	 * * 0xFFFF - HWRM
59598 	 */
59599 	uint16_t	target_id;
59600 	/*
59601 	 * A physical address pointer pointing to a host buffer that the
59602 	 * command's response data will be written. This can be either a host
59603 	 * physical address (HPA) or a guest physical address (GPA) and must
59604 	 * point to a physically contiguous block of memory.
59605 	 */
59606 	uint64_t	resp_addr;
59607 } __rte_packed_end;
59608 
59609 /* hwrm_tfc_tbl_scope_qcaps_output (size:192b/24B) */
59610 struct __rte_packed_begin hwrm_tfc_tbl_scope_qcaps_output {
59611 	/* The specific error status for the command. */
59612 	uint16_t	error_code;
59613 	/* The HWRM command request type. */
59614 	uint16_t	req_type;
59615 	/* The sequence ID from the original command. */
59616 	uint16_t	seq_id;
59617 	/* The length of the response data in number of bytes. */
59618 	uint16_t	resp_len;
59619 	/*
59620 	 * The maximum number of lookup records that a table scope can support.
59621 	 * This field is only valid if tbl_scope_capable is not zero.
59622 	 */
59623 	uint32_t	max_lkup_rec_cnt;
59624 	/*
59625 	 * The maximum number of action records that a table scope can support.
59626 	 * This field is only valid if tbl_scope_capable is not zero.
59627 	 */
59628 	uint32_t	max_act_rec_cnt;
59629 	/* Not zero if firmware capable of table scopes. */
59630 	uint8_t	tbl_scope_capable;
59631 	/*
59632 	 * log2 of the number of lookup static buckets that a table scope can
59633 	 * support. This field is only valid if tbl_scope_capable is not zero.
59634 	 */
59635 	uint8_t	max_lkup_static_buckets_exp;
59636 	/* unused. */
59637 	uint8_t	unused0[5];
59638 	/*
59639 	 * This field is used in Output records to indicate that the output
59640 	 * is completely written to RAM. This field should be read as '1'
59641 	 * to indicate that the output has been completely written.
59642 	 * When writing a command completion or response to an internal
59643 	 * processor, the order of writes has to be such that this field
59644 	 * is written last.
59645 	 */
59646 	uint8_t	valid;
59647 } __rte_packed_end;
59648 
59649 /*******************************
59650  * hwrm_tfc_tbl_scope_id_alloc *
59651  *******************************/
59652 
59653 
59654 /*
59655  * TruFlow command to allocate a table scope ID and create the pools.
59656  *
59657  * There is no corresponding free command since a table scope
59658  * ID will automatically be freed once the last FID is removed.
59659  * That is, when the hwrm_tfc_tbl_scope_fid_rem command returns
59660  * a fid_cnt of 0 that also means that the table scope ID has
59661  * been freed.
59662  */
59663 /* hwrm_tfc_tbl_scope_id_alloc_input (size:256b/32B) */
59664 struct __rte_packed_begin hwrm_tfc_tbl_scope_id_alloc_input {
59665 	/* The HWRM command request type. */
59666 	uint16_t	req_type;
59667 	/*
59668 	 * The completion ring to send the completion event on. This should
59669 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59670 	 */
59671 	uint16_t	cmpl_ring;
59672 	/*
59673 	 * The sequence ID is used by the driver for tracking multiple
59674 	 * commands. This ID is treated as opaque data by the firmware and
59675 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59676 	 */
59677 	uint16_t	seq_id;
59678 	/*
59679 	 * The target ID of the command:
59680 	 * * 0x0-0xFFF8 - The function ID
59681 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59682 	 * * 0xFFFD - Reserved for user-space HWRM interface
59683 	 * * 0xFFFF - HWRM
59684 	 */
59685 	uint16_t	target_id;
59686 	/*
59687 	 * A physical address pointer pointing to a host buffer that the
59688 	 * command's response data will be written. This can be either a host
59689 	 * physical address (HPA) or a guest physical address (GPA) and must
59690 	 * point to a physically contiguous block of memory.
59691 	 */
59692 	uint64_t	resp_addr;
59693 	/*
59694 	 * Function ID.
59695 	 * If running on a trusted VF or PF, the fid field can be used to
59696 	 * specify that the function is a non-trusted VF of the parent PF.
59697 	 * If this command is used for the target_id itself, this field is
59698 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
59699 	 * field.
59700 	 */
59701 	uint16_t	fid;
59702 	/* The maximum number of pools for this table scope. */
59703 	uint16_t	max_pools;
59704 	/* Non-zero if this table scope is shared. */
59705 	uint8_t	shared;
59706 	/*
59707 	 * The size of the lookup pools per direction expressed as
59708 	 * log2(max_records/max_pools). That is, size=2^exp.
59709 	 *
59710 	 * Array is indexed by enum cfa_dir.
59711 	 */
59712 	uint8_t	lkup_pool_sz_exp[2];
59713 	/*
59714 	 * The size of the action pools per direction expressed as
59715 	 * log2(max_records/max_pools). That is, size=2^exp.
59716 	 *
59717 	 * Array is indexed by enum cfa_dir.
59718 	 */
59719 	uint8_t	act_pool_sz_exp[2];
59720 	/* Application type. 0 (AFM), 1 (TF) */
59721 	uint8_t	app_type;
59722 	/* unused. */
59723 	uint8_t	unused0[6];
59724 } __rte_packed_end;
59725 
59726 /* hwrm_tfc_tbl_scope_id_alloc_output (size:128b/16B) */
59727 struct __rte_packed_begin hwrm_tfc_tbl_scope_id_alloc_output {
59728 	/* The specific error status for the command. */
59729 	uint16_t	error_code;
59730 	/* The HWRM command request type. */
59731 	uint16_t	req_type;
59732 	/* The sequence ID from the original command. */
59733 	uint16_t	seq_id;
59734 	/* The length of the response data in number of bytes. */
59735 	uint16_t	resp_len;
59736 	/* The table scope ID that was allocated. */
59737 	uint8_t	tsid;
59738 	/*
59739 	 * Non-zero if this is the first FID associated with this table scope
59740 	 * ID.
59741 	 */
59742 	uint8_t	first;
59743 	/* unused. */
59744 	uint8_t	unused0[5];
59745 	/*
59746 	 * This field is used in Output records to indicate that the output
59747 	 * is completely written to RAM. This field should be read as '1'
59748 	 * to indicate that the output has been completely written.
59749 	 * When writing a command completion or response to an internal
59750 	 * processor, the order of writes has to be such that this field
59751 	 * is written last.
59752 	 */
59753 	uint8_t	valid;
59754 } __rte_packed_end;
59755 
59756 /*****************************
59757  * hwrm_tfc_tbl_scope_config *
59758  *****************************/
59759 
59760 
59761 /* TruFlow command to configure the table scope memory. */
59762 /* hwrm_tfc_tbl_scope_config_input (size:704b/88B) */
59763 struct __rte_packed_begin hwrm_tfc_tbl_scope_config_input {
59764 	/* The HWRM command request type. */
59765 	uint16_t	req_type;
59766 	/*
59767 	 * The completion ring to send the completion event on. This should
59768 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59769 	 */
59770 	uint16_t	cmpl_ring;
59771 	/*
59772 	 * The sequence ID is used by the driver for tracking multiple
59773 	 * commands. This ID is treated as opaque data by the firmware and
59774 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59775 	 */
59776 	uint16_t	seq_id;
59777 	/*
59778 	 * The target ID of the command:
59779 	 * * 0x0-0xFFF8 - The function ID
59780 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59781 	 * * 0xFFFD - Reserved for user-space HWRM interface
59782 	 * * 0xFFFF - HWRM
59783 	 */
59784 	uint16_t	target_id;
59785 	/*
59786 	 * A physical address pointer pointing to a host buffer that the
59787 	 * command's response data will be written. This can be either a host
59788 	 * physical address (HPA) or a guest physical address (GPA) and must
59789 	 * point to a physically contiguous block of memory.
59790 	 */
59791 	uint64_t	resp_addr;
59792 	/*
59793 	 * The base addresses for lookup memory.
59794 	 * Array is indexed by enum cfa_dir.
59795 	 */
59796 	uint64_t	lkup_base_addr[2];
59797 	/*
59798 	 * The base addresses for action memory.
59799 	 * Array is indexed by enum cfa_dir.
59800 	 */
59801 	uint64_t	act_base_addr[2];
59802 	/*
59803 	 * The number of minimum sized lkup records per direction.
59804 	 * In this usage, records are the minimum lookup memory
59805 	 * allocation unit in a table scope. This value is the total
59806 	 * memory required for buckets and entries.
59807 	 *
59808 	 * Array is indexed by enum cfa_dir.
59809 	 */
59810 	uint32_t	lkup_rec_cnt[2];
59811 	/*
59812 	 * The number of minimum sized action records per direction.
59813 	 * Similar to the lkup_rec_cnt, records are the minimum
59814 	 * action memory allocation unit in a table scope.
59815 	 *
59816 	 * Array is indexed by enum cfa_dir.
59817 	 */
59818 	uint32_t	act_rec_cnt[2];
59819 	/*
59820 	 * The number of static lookup buckets in the table scope.
59821 	 * Array is indexed by enum cfa_dir.
59822 	 */
59823 	uint32_t	lkup_static_bucket_cnt[2];
59824 	/* The page size of the table scope. */
59825 	uint32_t	pbl_page_sz;
59826 	/*
59827 	 * The PBL level for lookup memory.
59828 	 * Array is indexed by enum cfa_dir.
59829 	 */
59830 	uint8_t	lkup_pbl_level[2];
59831 	/*
59832 	 * The PBL level for action memory.
59833 	 * Array is indexed by enum cfa_dir.
59834 	 */
59835 	uint8_t	act_pbl_level[2];
59836 	/* The table scope ID. */
59837 	uint8_t	tsid;
59838 	/* unused. */
59839 	uint8_t	unused0[7];
59840 } __rte_packed_end;
59841 
59842 /* hwrm_tfc_tbl_scope_config_output (size:128b/16B) */
59843 struct __rte_packed_begin hwrm_tfc_tbl_scope_config_output {
59844 	/* The specific error status for the command. */
59845 	uint16_t	error_code;
59846 	/* The HWRM command request type. */
59847 	uint16_t	req_type;
59848 	/* The sequence ID from the original command. */
59849 	uint16_t	seq_id;
59850 	/* The length of the response data in number of bytes. */
59851 	uint16_t	resp_len;
59852 	/* unused. */
59853 	uint8_t	unused0[7];
59854 	/*
59855 	 * This field is used in Output records to indicate that the output
59856 	 * is completely written to RAM. This field should be read as '1'
59857 	 * to indicate that the output has been completely written.
59858 	 * When writing a command completion or response to an internal
59859 	 * processor, the order of writes has to be such that this field
59860 	 * is written last.
59861 	 */
59862 	uint8_t	valid;
59863 } __rte_packed_end;
59864 
59865 /*******************************
59866  * hwrm_tfc_tbl_scope_deconfig *
59867  *******************************/
59868 
59869 
59870 /* TruFlow command to deconfigure the table scope memory. */
59871 /* hwrm_tfc_tbl_scope_deconfig_input (size:192b/24B) */
59872 struct __rte_packed_begin hwrm_tfc_tbl_scope_deconfig_input {
59873 	/* The HWRM command request type. */
59874 	uint16_t	req_type;
59875 	/*
59876 	 * The completion ring to send the completion event on. This should
59877 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59878 	 */
59879 	uint16_t	cmpl_ring;
59880 	/*
59881 	 * The sequence ID is used by the driver for tracking multiple
59882 	 * commands. This ID is treated as opaque data by the firmware and
59883 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59884 	 */
59885 	uint16_t	seq_id;
59886 	/*
59887 	 * The target ID of the command:
59888 	 * * 0x0-0xFFF8 - The function ID
59889 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59890 	 * * 0xFFFD - Reserved for user-space HWRM interface
59891 	 * * 0xFFFF - HWRM
59892 	 */
59893 	uint16_t	target_id;
59894 	/*
59895 	 * A physical address pointer pointing to a host buffer that the
59896 	 * command's response data will be written. This can be either a host
59897 	 * physical address (HPA) or a guest physical address (GPA) and must
59898 	 * point to a physically contiguous block of memory.
59899 	 */
59900 	uint64_t	resp_addr;
59901 	/* The table scope ID. */
59902 	uint8_t	tsid;
59903 	/* unused. */
59904 	uint8_t	unused0[7];
59905 } __rte_packed_end;
59906 
59907 /* hwrm_tfc_tbl_scope_deconfig_output (size:128b/16B) */
59908 struct __rte_packed_begin hwrm_tfc_tbl_scope_deconfig_output {
59909 	/* The specific error status for the command. */
59910 	uint16_t	error_code;
59911 	/* The HWRM command request type. */
59912 	uint16_t	req_type;
59913 	/* The sequence ID from the original command. */
59914 	uint16_t	seq_id;
59915 	/* The length of the response data in number of bytes. */
59916 	uint16_t	resp_len;
59917 	/* unused. */
59918 	uint8_t	unused0[7];
59919 	/*
59920 	 * This field is used in Output records to indicate that the output
59921 	 * is completely written to RAM. This field should be read as '1'
59922 	 * to indicate that the output has been completely written.
59923 	 * When writing a command completion or response to an internal
59924 	 * processor, the order of writes has to be such that this field
59925 	 * is written last.
59926 	 */
59927 	uint8_t	valid;
59928 } __rte_packed_end;
59929 
59930 /******************************
59931  * hwrm_tfc_tbl_scope_fid_add *
59932  ******************************/
59933 
59934 
59935 /* TruFlow command to add a FID to a table scope. */
59936 /* hwrm_tfc_tbl_scope_fid_add_input (size:192b/24B) */
59937 struct __rte_packed_begin hwrm_tfc_tbl_scope_fid_add_input {
59938 	/* The HWRM command request type. */
59939 	uint16_t	req_type;
59940 	/*
59941 	 * The completion ring to send the completion event on. This should
59942 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
59943 	 */
59944 	uint16_t	cmpl_ring;
59945 	/*
59946 	 * The sequence ID is used by the driver for tracking multiple
59947 	 * commands. This ID is treated as opaque data by the firmware and
59948 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
59949 	 */
59950 	uint16_t	seq_id;
59951 	/*
59952 	 * The target ID of the command:
59953 	 * * 0x0-0xFFF8 - The function ID
59954 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
59955 	 * * 0xFFFD - Reserved for user-space HWRM interface
59956 	 * * 0xFFFF - HWRM
59957 	 */
59958 	uint16_t	target_id;
59959 	/*
59960 	 * A physical address pointer pointing to a host buffer that the
59961 	 * command's response data will be written. This can be either a host
59962 	 * physical address (HPA) or a guest physical address (GPA) and must
59963 	 * point to a physically contiguous block of memory.
59964 	 */
59965 	uint64_t	resp_addr;
59966 	/*
59967 	 * Function ID.
59968 	 * If running on a trusted VF or PF, the fid field can be used to
59969 	 * specify that the function is a non-trusted VF of the parent PF.
59970 	 * If this command is used for the target_id itself, this field is
59971 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
59972 	 * field.
59973 	 */
59974 	uint16_t	fid;
59975 	/* The table scope ID. */
59976 	uint8_t	tsid;
59977 	/* unused. */
59978 	uint8_t	unused0[5];
59979 } __rte_packed_end;
59980 
59981 /* hwrm_tfc_tbl_scope_fid_add_output (size:128b/16B) */
59982 struct __rte_packed_begin hwrm_tfc_tbl_scope_fid_add_output {
59983 	/* The specific error status for the command. */
59984 	uint16_t	error_code;
59985 	/* The HWRM command request type. */
59986 	uint16_t	req_type;
59987 	/* The sequence ID from the original command. */
59988 	uint16_t	seq_id;
59989 	/* The length of the response data in number of bytes. */
59990 	uint16_t	resp_len;
59991 	/* The number of FIDs currently in the table scope ID. */
59992 	uint8_t	fid_cnt;
59993 	/* unused. */
59994 	uint8_t	unused0[6];
59995 	/*
59996 	 * This field is used in Output records to indicate that the output
59997 	 * is completely written to RAM. This field should be read as '1'
59998 	 * to indicate that the output has been completely written.
59999 	 * When writing a command completion or response to an internal
60000 	 * processor, the order of writes has to be such that this field
60001 	 * is written last.
60002 	 */
60003 	uint8_t	valid;
60004 } __rte_packed_end;
60005 
60006 /******************************
60007  * hwrm_tfc_tbl_scope_fid_rem *
60008  ******************************/
60009 
60010 
60011 /* TruFlow command to remove a FID from a table scope. */
60012 /* hwrm_tfc_tbl_scope_fid_rem_input (size:192b/24B) */
60013 struct __rte_packed_begin hwrm_tfc_tbl_scope_fid_rem_input {
60014 	/* The HWRM command request type. */
60015 	uint16_t	req_type;
60016 	/*
60017 	 * The completion ring to send the completion event on. This should
60018 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60019 	 */
60020 	uint16_t	cmpl_ring;
60021 	/*
60022 	 * The sequence ID is used by the driver for tracking multiple
60023 	 * commands. This ID is treated as opaque data by the firmware and
60024 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60025 	 */
60026 	uint16_t	seq_id;
60027 	/*
60028 	 * The target ID of the command:
60029 	 * * 0x0-0xFFF8 - The function ID
60030 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60031 	 * * 0xFFFD - Reserved for user-space HWRM interface
60032 	 * * 0xFFFF - HWRM
60033 	 */
60034 	uint16_t	target_id;
60035 	/*
60036 	 * A physical address pointer pointing to a host buffer that the
60037 	 * command's response data will be written. This can be either a host
60038 	 * physical address (HPA) or a guest physical address (GPA) and must
60039 	 * point to a physically contiguous block of memory.
60040 	 */
60041 	uint64_t	resp_addr;
60042 	/*
60043 	 * Function ID.
60044 	 * If running on a trusted VF or PF, the fid field can be used to
60045 	 * specify that the function is a non-trusted VF of the parent PF.
60046 	 * If this command is used for the target_id itself, this field is
60047 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
60048 	 * field.
60049 	 */
60050 	uint16_t	fid;
60051 	/* The table scope ID. */
60052 	uint8_t	tsid;
60053 	/* unused. */
60054 	uint8_t	unused0[5];
60055 } __rte_packed_end;
60056 
60057 /* hwrm_tfc_tbl_scope_fid_rem_output (size:128b/16B) */
60058 struct __rte_packed_begin hwrm_tfc_tbl_scope_fid_rem_output {
60059 	/* The specific error status for the command. */
60060 	uint16_t	error_code;
60061 	/* The HWRM command request type. */
60062 	uint16_t	req_type;
60063 	/* The sequence ID from the original command. */
60064 	uint16_t	seq_id;
60065 	/* The length of the response data in number of bytes. */
60066 	uint16_t	resp_len;
60067 	/* The number of FIDs remaining in the table scope ID. */
60068 	uint16_t	fid_cnt;
60069 	/* unused. */
60070 	uint8_t	unused0[5];
60071 	/*
60072 	 * This field is used in Output records to indicate that the output
60073 	 * is completely written to RAM. This field should be read as '1'
60074 	 * to indicate that the output has been completely written.
60075 	 * When writing a command completion or response to an internal
60076 	 * processor, the order of writes has to be such that this field
60077 	 * is written last.
60078 	 */
60079 	uint8_t	valid;
60080 } __rte_packed_end;
60081 
60082 /*****************************
60083  * hwrm_tfc_session_id_alloc *
60084  *****************************/
60085 
60086 
60087 /*
60088  * Allocate a TFC session. Requests the firmware to allocate a TFC
60089  * session identifier and associate a forwarding function with the
60090  * session. Though there's not an explicit matching free for a session
60091  * id alloc, dis-associating the last fid from a session id (fid_cnt goes
60092  * to 0), will result in this session id being freed automatically.
60093  */
60094 /* hwrm_tfc_session_id_alloc_input (size:192b/24B) */
60095 struct __rte_packed_begin hwrm_tfc_session_id_alloc_input {
60096 	/* The HWRM command request type. */
60097 	uint16_t	req_type;
60098 	/*
60099 	 * The completion ring to send the completion event on. This should
60100 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60101 	 */
60102 	uint16_t	cmpl_ring;
60103 	/*
60104 	 * The sequence ID is used by the driver for tracking multiple
60105 	 * commands. This ID is treated as opaque data by the firmware and
60106 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60107 	 */
60108 	uint16_t	seq_id;
60109 	/*
60110 	 * The target ID of the command:
60111 	 * * 0x0-0xFFF8 - The function ID
60112 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60113 	 * * 0xFFFD - Reserved for user-space HWRM interface
60114 	 * * 0xFFFF - HWRM
60115 	 */
60116 	uint16_t	target_id;
60117 	/*
60118 	 * A physical address pointer pointing to a host buffer that the
60119 	 * command's response data will be written. This can be either a host
60120 	 * physical address (HPA) or a guest physical address (GPA) and must
60121 	 * point to a physically contiguous block of memory.
60122 	 */
60123 	uint64_t	resp_addr;
60124 	/*
60125 	 * Function ID.
60126 	 * If running on a trusted VF or PF, the fid field can be used to
60127 	 * specify that the function is a non-trusted VF of the parent PF.
60128 	 * If this command is used for the target_id itself, this field is
60129 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
60130 	 * field.
60131 	 */
60132 	uint16_t	fid;
60133 	/* Unused field */
60134 	uint8_t	unused0[6];
60135 } __rte_packed_end;
60136 
60137 /* hwrm_tfc_session_id_alloc_output (size:128b/16B) */
60138 struct __rte_packed_begin hwrm_tfc_session_id_alloc_output {
60139 	/* The specific error status for the command. */
60140 	uint16_t	error_code;
60141 	/* The HWRM command request type. */
60142 	uint16_t	req_type;
60143 	/* The sequence ID from the original command. */
60144 	uint16_t	seq_id;
60145 	/* The length of the response data in number of bytes. */
60146 	uint16_t	resp_len;
60147 	/*
60148 	 * Unique session identifier for the session created by the
60149 	 * firmware.
60150 	 */
60151 	uint16_t	sid;
60152 	/* Unused field */
60153 	uint8_t	unused0[5];
60154 	/*
60155 	 * This field is used in Output records to indicate that the output
60156 	 * is completely written to RAM. This field should be read as '1'
60157 	 * to indicate that the output has been completely written.
60158 	 * When writing a command completion or response to an internal
60159 	 * processor, the order of writes has to be such that this field is
60160 	 * written last.
60161 	 */
60162 	uint8_t	valid;
60163 } __rte_packed_end;
60164 
60165 /****************************
60166  * hwrm_tfc_session_fid_add *
60167  ****************************/
60168 
60169 
60170 /*
60171  * Associate a TFC session id with a forwarding function. The target_fid
60172  * will be associated with the passed in sid.
60173  */
60174 /* hwrm_tfc_session_fid_add_input (size:192b/24B) */
60175 struct __rte_packed_begin hwrm_tfc_session_fid_add_input {
60176 	/* The HWRM command request type. */
60177 	uint16_t	req_type;
60178 	/*
60179 	 * The completion ring to send the completion event on. This should
60180 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60181 	 */
60182 	uint16_t	cmpl_ring;
60183 	/*
60184 	 * The sequence ID is used by the driver for tracking multiple
60185 	 * commands. This ID is treated as opaque data by the firmware and
60186 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60187 	 */
60188 	uint16_t	seq_id;
60189 	/*
60190 	 * The target ID of the command:
60191 	 * * 0x0-0xFFF8 - The function ID
60192 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60193 	 * * 0xFFFD - Reserved for user-space HWRM interface
60194 	 * * 0xFFFF - HWRM
60195 	 */
60196 	uint16_t	target_id;
60197 	/*
60198 	 * A physical address pointer pointing to a host buffer that the
60199 	 * command's response data will be written. This can be either a host
60200 	 * physical address (HPA) or a guest physical address (GPA) and must
60201 	 * point to a physically contiguous block of memory.
60202 	 */
60203 	uint64_t	resp_addr;
60204 	/*
60205 	 * Function ID.
60206 	 * If running on a trusted VF or PF, the fid field can be used to
60207 	 * specify that the function is a non-trusted VF of the parent PF.
60208 	 * If this command is used for the target_id itself, this field is
60209 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
60210 	 * field.
60211 	 */
60212 	uint16_t	fid;
60213 	/*
60214 	 * Unique session identifier for the session created by the
60215 	 * firmware.
60216 	 */
60217 	uint16_t	sid;
60218 	/* Unused field */
60219 	uint8_t	unused0[4];
60220 } __rte_packed_end;
60221 
60222 /* hwrm_tfc_session_fid_add_output (size:128b/16B) */
60223 struct __rte_packed_begin hwrm_tfc_session_fid_add_output {
60224 	/* The specific error status for the command. */
60225 	uint16_t	error_code;
60226 	/* The HWRM command request type. */
60227 	uint16_t	req_type;
60228 	/* The sequence ID from the original command. */
60229 	uint16_t	seq_id;
60230 	/* The length of the response data in number of bytes. */
60231 	uint16_t	resp_len;
60232 	/* The number of FIDs that share this session. */
60233 	uint16_t	fid_cnt;
60234 	/* Unused field */
60235 	uint8_t	unused0[5];
60236 	/*
60237 	 * This field is used in Output records to indicate that the output
60238 	 * is completely written to RAM. This field should be read as '1'
60239 	 * to indicate that the output has been completely written.
60240 	 * When writing a command completion or response to an internal
60241 	 * processor, the order of writes has to be such that this field is
60242 	 * written last.
60243 	 */
60244 	uint8_t	valid;
60245 } __rte_packed_end;
60246 
60247 /****************************
60248  * hwrm_tfc_session_fid_rem *
60249  ****************************/
60250 
60251 
60252 /*
60253  * Dis-associate a TFC session from the target_fid.
60254  * Though there's not an explicit matching free for a
60255  * session id alloc, dis-associating the last fid from a session id
60256  * (fid_cnt goes to 0), will result in this session id being freed
60257  * automatically.
60258  */
60259 /* hwrm_tfc_session_fid_rem_input (size:192b/24B) */
60260 struct __rte_packed_begin hwrm_tfc_session_fid_rem_input {
60261 	/* The HWRM command request type. */
60262 	uint16_t	req_type;
60263 	/*
60264 	 * The completion ring to send the completion event on. This should
60265 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60266 	 */
60267 	uint16_t	cmpl_ring;
60268 	/*
60269 	 * The sequence ID is used by the driver for tracking multiple
60270 	 * commands. This ID is treated as opaque data by the firmware and
60271 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60272 	 */
60273 	uint16_t	seq_id;
60274 	/*
60275 	 * The target ID of the command:
60276 	 * * 0x0-0xFFF8 - The function ID
60277 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60278 	 * * 0xFFFD - Reserved for user-space HWRM interface
60279 	 * * 0xFFFF - HWRM
60280 	 */
60281 	uint16_t	target_id;
60282 	/*
60283 	 * A physical address pointer pointing to a host buffer that the
60284 	 * command's response data will be written. This can be either a host
60285 	 * physical address (HPA) or a guest physical address (GPA) and must
60286 	 * point to a physically contiguous block of memory.
60287 	 */
60288 	uint64_t	resp_addr;
60289 	/*
60290 	 * Function ID.
60291 	 * If running on a trusted VF or PF, the fid field can be used to
60292 	 * specify that the function is a non-trusted VF of the parent PF.
60293 	 * If this command is used for the target_id itself, this field is
60294 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
60295 	 * field.
60296 	 */
60297 	uint16_t	fid;
60298 	/*
60299 	 * Unique session identifier for the session created by the
60300 	 * firmware.
60301 	 */
60302 	uint16_t	sid;
60303 	/* Unused field */
60304 	uint8_t	unused0[4];
60305 } __rte_packed_end;
60306 
60307 /* hwrm_tfc_session_fid_rem_output (size:128b/16B) */
60308 struct __rte_packed_begin hwrm_tfc_session_fid_rem_output {
60309 	/* The specific error status for the command. */
60310 	uint16_t	error_code;
60311 	/* The HWRM command request type. */
60312 	uint16_t	req_type;
60313 	/* The sequence ID from the original command. */
60314 	uint16_t	seq_id;
60315 	/* The length of the response data in number of bytes. */
60316 	uint16_t	resp_len;
60317 	/* The number of FIDs that share this session. */
60318 	uint16_t	fid_cnt;
60319 	/* Unused field */
60320 	uint8_t	unused0[5];
60321 	/*
60322 	 * This field is used in Output records to indicate that the output
60323 	 * is completely written to RAM. This field should be read as '1'
60324 	 * to indicate that the output has been completely written.
60325 	 * When writing a command completion or response to an internal
60326 	 * processor, the order of writes has to be such that this field is
60327 	 * written last.
60328 	 */
60329 	uint8_t	valid;
60330 } __rte_packed_end;
60331 
60332 /************************
60333  * hwrm_tfc_ident_alloc *
60334  ************************/
60335 
60336 
60337 /*
60338  * Allocate a TFC identifier. Requests the firmware to
60339  * allocate a TFC identifier. The session id and track_type are passed
60340  * in. The tracking_id is either the sid or target_fid depends on the
60341  * track_type. The resource subtype is passed in, an id corresponding
60342  * to all these is allocated and returned in the HWRM response.
60343  */
60344 /* hwrm_tfc_ident_alloc_input (size:192b/24B) */
60345 struct __rte_packed_begin hwrm_tfc_ident_alloc_input {
60346 	/* The HWRM command request type. */
60347 	uint16_t	req_type;
60348 	/*
60349 	 * The completion ring to send the completion event on. This should
60350 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60351 	 */
60352 	uint16_t	cmpl_ring;
60353 	/*
60354 	 * The sequence ID is used by the driver for tracking multiple
60355 	 * commands. This ID is treated as opaque data by the firmware and
60356 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60357 	 */
60358 	uint16_t	seq_id;
60359 	/*
60360 	 * The target ID of the command:
60361 	 * * 0x0-0xFFF8 - The function ID
60362 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60363 	 * * 0xFFFD - Reserved for user-space HWRM interface
60364 	 * * 0xFFFF - HWRM
60365 	 */
60366 	uint16_t	target_id;
60367 	/*
60368 	 * A physical address pointer pointing to a host buffer that the
60369 	 * command's response data will be written. This can be either a host
60370 	 * physical address (HPA) or a guest physical address (GPA) and must
60371 	 * point to a physically contiguous block of memory.
60372 	 */
60373 	uint64_t	resp_addr;
60374 	/*
60375 	 * Function ID.
60376 	 * If running on a trusted VF or PF, the fid field can be used to
60377 	 * specify that the function is a non-trusted VF of the parent PF.
60378 	 * If this command is used for the target_id itself, this field is
60379 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
60380 	 * field.
60381 	 */
60382 	uint16_t	fid;
60383 	/*
60384 	 * Unique session identifier for the session created by the
60385 	 * firmware. Will be used to track this identifier.
60386 	 */
60387 	uint16_t	sid;
60388 	/* Control flags. Direction. */
60389 	uint8_t	flags;
60390 	/* Indicates the flow direction. */
60391 	#define HWRM_TFC_IDENT_ALLOC_INPUT_FLAGS_DIR     UINT32_C(0x1)
60392 	/* If this bit set to 0, then it indicates rx flow. */
60393 	#define HWRM_TFC_IDENT_ALLOC_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
60394 	/* If this bit is set to 1, then it indicates tx flow. */
60395 	#define HWRM_TFC_IDENT_ALLOC_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
60396 	#define HWRM_TFC_IDENT_ALLOC_INPUT_FLAGS_DIR_LAST \
60397 		HWRM_TFC_IDENT_ALLOC_INPUT_FLAGS_DIR_TX
60398 	/*
60399 	 * CFA resource subtype. For definitions, please see
60400 	 * cfa_v3/include/cfa_resources.h.
60401 	 */
60402 	uint8_t	subtype;
60403 	/* Describes the type of tracking tag to be used */
60404 	uint8_t	track_type;
60405 	/* Invalid track type */
60406 	#define HWRM_TFC_IDENT_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID \
60407 		UINT32_C(0x0)
60408 	/* Tracked by session id */
60409 	#define HWRM_TFC_IDENT_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_SID \
60410 		UINT32_C(0x1)
60411 	/* Tracked by function id */
60412 	#define HWRM_TFC_IDENT_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID \
60413 		UINT32_C(0x2)
60414 	#define HWRM_TFC_IDENT_ALLOC_INPUT_TRACK_TYPE_LAST \
60415 		HWRM_TFC_IDENT_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID
60416 	/* Unused field */
60417 	uint8_t	unused0;
60418 } __rte_packed_end;
60419 
60420 /* hwrm_tfc_ident_alloc_output (size:128b/16B) */
60421 struct __rte_packed_begin hwrm_tfc_ident_alloc_output {
60422 	/* The specific error status for the command. */
60423 	uint16_t	error_code;
60424 	/* The HWRM command request type. */
60425 	uint16_t	req_type;
60426 	/* The sequence ID from the original command. */
60427 	uint16_t	seq_id;
60428 	/* The length of the response data in number of bytes. */
60429 	uint16_t	resp_len;
60430 	/*
60431 	 * Resource identifier allocated by the firmware using
60432 	 * parameters above.
60433 	 */
60434 	uint16_t	ident_id;
60435 	/* Unused field */
60436 	uint8_t	unused0[5];
60437 	/*
60438 	 * This field is used in Output records to indicate that the output
60439 	 * is completely written to RAM. This field should be read as '1'
60440 	 * to indicate that the output has been completely written.
60441 	 * When writing a command completion or response to an internal
60442 	 * processor, the order of writes has to be such that this field is
60443 	 * written last.
60444 	 */
60445 	uint8_t	valid;
60446 } __rte_packed_end;
60447 
60448 /***********************
60449  * hwrm_tfc_ident_free *
60450  ***********************/
60451 
60452 
60453 /*
60454  * Requests the firmware to free a TFC resource identifier.
60455  * A resource subtype and session id are passed in.
60456  * An identifier (previously allocated) corresponding to all these is
60457  * freed, only after various sanity checks are completed.
60458  */
60459 /* hwrm_tfc_ident_free_input (size:192b/24B) */
60460 struct __rte_packed_begin hwrm_tfc_ident_free_input {
60461 	/* The HWRM command request type. */
60462 	uint16_t	req_type;
60463 	/*
60464 	 * The completion ring to send the completion event on. This should
60465 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60466 	 */
60467 	uint16_t	cmpl_ring;
60468 	/*
60469 	 * The sequence ID is used by the driver for tracking multiple
60470 	 * commands. This ID is treated as opaque data by the firmware and
60471 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60472 	 */
60473 	uint16_t	seq_id;
60474 	/*
60475 	 * The target ID of the command:
60476 	 * * 0x0-0xFFF8 - The function ID
60477 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60478 	 * * 0xFFFD - Reserved for user-space HWRM interface
60479 	 * * 0xFFFF - HWRM
60480 	 */
60481 	uint16_t	target_id;
60482 	/*
60483 	 * A physical address pointer pointing to a host buffer that the
60484 	 * command's response data will be written. This can be either a host
60485 	 * physical address (HPA) or a guest physical address (GPA) and must
60486 	 * point to a physically contiguous block of memory.
60487 	 */
60488 	uint64_t	resp_addr;
60489 	/*
60490 	 * Function ID.
60491 	 * If running on a trusted VF or PF, the fid field can be used to
60492 	 * specify that the function is a non-trusted VF of the parent PF.
60493 	 * If this command is used for the target_id itself, this field is
60494 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
60495 	 * field.
60496 	 */
60497 	uint16_t	fid;
60498 	/*
60499 	 * Unique session identifier for the session created by the
60500 	 * firmware. Will be used to validate this request.
60501 	 */
60502 	uint16_t	sid;
60503 	/*
60504 	 * CFA resource subtype. For definitions, please see
60505 	 * cfa_v3/include/cfa_resources.h.
60506 	 */
60507 	uint8_t	subtype;
60508 	/* Control flags. Direction. */
60509 	uint8_t	flags;
60510 	/* Indicates the flow direction. */
60511 	#define HWRM_TFC_IDENT_FREE_INPUT_FLAGS_DIR     UINT32_C(0x1)
60512 	/* If this bit set to 0, then it indicates rx flow. */
60513 	#define HWRM_TFC_IDENT_FREE_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
60514 	/* If this bit is set to 1, then it indicates tx flow. */
60515 	#define HWRM_TFC_IDENT_FREE_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
60516 	#define HWRM_TFC_IDENT_FREE_INPUT_FLAGS_DIR_LAST \
60517 		HWRM_TFC_IDENT_FREE_INPUT_FLAGS_DIR_TX
60518 	/* The resource identifier to be freed */
60519 	uint16_t	ident_id;
60520 } __rte_packed_end;
60521 
60522 /* hwrm_tfc_ident_free_output (size:128b/16B) */
60523 struct __rte_packed_begin hwrm_tfc_ident_free_output {
60524 	/* The specific error status for the command. */
60525 	uint16_t	error_code;
60526 	/* The HWRM command request type. */
60527 	uint16_t	req_type;
60528 	/* The sequence ID from the original command. */
60529 	uint16_t	seq_id;
60530 	/* The length of the response data in number of bytes. */
60531 	uint16_t	resp_len;
60532 	/* Reserved */
60533 	uint8_t	unused0[7];
60534 	/*
60535 	 * This field is used in Output records to indicate that the output
60536 	 * is completely written to RAM. This field should be read as '1'
60537 	 * to indicate that the output has been completely written.
60538 	 * When writing a command completion or response to an internal
60539 	 * processor, the order of writes has to be such that this field is
60540 	 * written last.
60541 	 */
60542 	uint8_t	valid;
60543 } __rte_packed_end;
60544 
60545 /**************************
60546  * hwrm_tfc_idx_tbl_alloc *
60547  **************************/
60548 
60549 
60550 /* hwrm_tfc_idx_tbl_alloc_input (size:192b/24B) */
60551 struct __rte_packed_begin hwrm_tfc_idx_tbl_alloc_input {
60552 	/* The HWRM command request type. */
60553 	uint16_t	req_type;
60554 	/*
60555 	 * The completion ring to send the completion event on. This should
60556 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60557 	 */
60558 	uint16_t	cmpl_ring;
60559 	/*
60560 	 * The sequence ID is used by the driver for tracking multiple
60561 	 * commands. This ID is treated as opaque data by the firmware and
60562 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60563 	 */
60564 	uint16_t	seq_id;
60565 	/*
60566 	 * The target ID of the command:
60567 	 * * 0x0-0xFFF8 - The function ID
60568 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60569 	 * * 0xFFFD - Reserved for user-space HWRM interface
60570 	 * * 0xFFFF - HWRM
60571 	 */
60572 	uint16_t	target_id;
60573 	/*
60574 	 * A physical address pointer pointing to a host buffer that the
60575 	 * command's response data will be written. This can be either a host
60576 	 * physical address (HPA) or a guest physical address (GPA) and must
60577 	 * point to a physically contiguous block of memory.
60578 	 */
60579 	uint64_t	resp_addr;
60580 	/*
60581 	 * Function ID.
60582 	 * If running on a trusted VF or PF, the fid field can be used to
60583 	 * specify that the function is a non-trusted VF of the parent PF.
60584 	 * If this command is used for the target_id itself, this field is
60585 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
60586 	 * field.
60587 	 */
60588 	uint16_t	fid;
60589 	/*
60590 	 * Unique session id for the session created by the
60591 	 * firmware. Will be used to track this index table entry
60592 	 * only if track type is track_type_sid.
60593 	 */
60594 	uint16_t	sid;
60595 	/* Control flags. */
60596 	uint8_t	flags;
60597 	/* Indicates the flow direction. */
60598 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_FLAGS_DIR     UINT32_C(0x1)
60599 	/* If this bit set to 0, then it indicates rx flow. */
60600 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
60601 	/* If this bit is set to 1, then it indicates tx flow. */
60602 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
60603 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_FLAGS_DIR_LAST \
60604 		HWRM_TFC_IDX_TBL_ALLOC_INPUT_FLAGS_DIR_TX
60605 	/*
60606 	 * This field is blktype specific.
60607 	 * For blktype CFA - CFA resource subtype. For definitions,
60608 	 * please see cfa_v3/include/cfa_resources.h.
60609 	 * For blktype rxp, re_gparse, te_gparse -
60610 	 * Tunnel Type. A value of zero (or unknown) means alloc. A known
60611 	 * value (previously allocated dynamic UPAR for tunnel_type) means
60612 	 * realloc. Will fail if a realloc is for previously allocated FID,
60613 	 */
60614 	uint8_t	subtype;
60615 	/* Describes the type of tracking id to be used */
60616 	uint8_t	track_type;
60617 	/* Invalid track type */
60618 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID \
60619 		UINT32_C(0x0)
60620 	/* Tracked by session id */
60621 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_SID \
60622 		UINT32_C(0x1)
60623 	/* Tracked by function id */
60624 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID \
60625 		UINT32_C(0x2)
60626 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_TRACK_TYPE_LAST \
60627 		HWRM_TFC_IDX_TBL_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID
60628 	/* Specifies which block this idx table alloc request is for */
60629 	uint8_t	blktype;
60630 	/* CFA block type */
60631 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_BLKTYPE_CFA \
60632 		UINT32_C(0x0)
60633 	/* RXP gparse block type */
60634 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_BLKTYPE_RXP \
60635 		UINT32_C(0x1)
60636 	/* RE gparse block type */
60637 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE \
60638 		UINT32_C(0x2)
60639 	/* TE gparse block type */
60640 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE \
60641 		UINT32_C(0x3)
60642 	#define HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_LAST \
60643 		HWRM_TFC_IDX_TBL_ALLOC_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
60644 } __rte_packed_end;
60645 
60646 /* hwrm_tfc_idx_tbl_alloc_output (size:128b/16B) */
60647 struct __rte_packed_begin hwrm_tfc_idx_tbl_alloc_output {
60648 	/* The specific error status for the command. */
60649 	uint16_t	error_code;
60650 	/* The HWRM command request type. */
60651 	uint16_t	req_type;
60652 	/* The sequence ID from the original command. */
60653 	uint16_t	seq_id;
60654 	/* The length of the response data in number of bytes. */
60655 	uint16_t	resp_len;
60656 	/*
60657 	 * Index table entry allocated by the firmware using the
60658 	 * parameters above.
60659 	 */
60660 	uint16_t	idx_tbl_id;
60661 	/* Reserved */
60662 	uint8_t	unused0[5];
60663 	/*
60664 	 * This field is used in Output records to indicate that the output
60665 	 * is completely written to RAM. This field should be read as '1'
60666 	 * to indicate that the output has been completely written.
60667 	 * When writing a command completion or response to an internal
60668 	 * processor, the order of writes has to be such that this field
60669 	 * is written last.
60670 	 */
60671 	uint8_t	valid;
60672 } __rte_packed_end;
60673 
60674 /******************************
60675  * hwrm_tfc_idx_tbl_alloc_set *
60676  ******************************/
60677 
60678 
60679 /* hwrm_tfc_idx_tbl_alloc_set_input (size:1088b/136B) */
60680 struct __rte_packed_begin hwrm_tfc_idx_tbl_alloc_set_input {
60681 	/* The HWRM command request type. */
60682 	uint16_t	req_type;
60683 	/*
60684 	 * The completion ring to send the completion event on. This should
60685 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60686 	 */
60687 	uint16_t	cmpl_ring;
60688 	/*
60689 	 * The sequence ID is used by the driver for tracking multiple
60690 	 * commands. This ID is treated as opaque data by the firmware and
60691 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60692 	 */
60693 	uint16_t	seq_id;
60694 	/*
60695 	 * The target ID of the command:
60696 	 * * 0x0-0xFFF8 - The function ID
60697 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60698 	 * * 0xFFFD - Reserved for user-space HWRM interface
60699 	 * * 0xFFFF - HWRM
60700 	 */
60701 	uint16_t	target_id;
60702 	/*
60703 	 * A physical address pointer pointing to a host buffer that the
60704 	 * command's response data will be written. This can be either a host
60705 	 * physical address (HPA) or a guest physical address (GPA) and must
60706 	 * point to a physically contiguous block of memory.
60707 	 */
60708 	uint64_t	resp_addr;
60709 	/*
60710 	 * Function ID.
60711 	 * If running on a trusted VF or PF, the fid field can be used to
60712 	 * specify that the function is a non-trusted VF of the parent PF.
60713 	 * If this command is used for the target_id itself, this field is
60714 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
60715 	 * field.
60716 	 */
60717 	uint16_t	fid;
60718 	/*
60719 	 * Unique session id for the session created by the
60720 	 * firmware. Will be used to track this index table entry
60721 	 * only if track type is track_type_sid.
60722 	 */
60723 	uint16_t	sid;
60724 	/* Control flags. */
60725 	uint8_t	flags;
60726 	/* Indicates the flow direction. */
60727 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
60728 	/* If this bit set to 0, then it indicates rx flow. */
60729 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
60730 	/* If this bit is set to 1, then it indicates tx flow. */
60731 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
60732 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DIR_LAST \
60733 		HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DIR_TX
60734 	/*
60735 	 * Indicate device data is being sent via DMA, the device
60736 	 * data packing does not change.
60737 	 */
60738 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_FLAGS_DMA     UINT32_C(0x2)
60739 	/*
60740 	 * This field is blktype specific.
60741 	 * For blktype CFA - CFA resource subtype. For definitions,
60742 	 * please see cfa_v3/include/cfa_resources.h.
60743 	 * For blktype rxp, re_gparse, te_gparse -
60744 	 * Tunnel Type. A value of zero (or unknown) means alloc. A known
60745 	 * value (previously allocated dynamic UPAR for tunnel_type) means
60746 	 * realloc. Will fail if a realloc is for previously allocated FID,
60747 	 */
60748 	uint8_t	subtype;
60749 	/* Describes the type of tracking id to be used */
60750 	uint8_t	track_type;
60751 	/* Invalid track type */
60752 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID \
60753 		UINT32_C(0x0)
60754 	/* Tracked by session id */
60755 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_SID \
60756 		UINT32_C(0x1)
60757 	/* Tracked by function id */
60758 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_FID \
60759 		UINT32_C(0x2)
60760 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_TRACK_TYPE_LAST \
60761 		HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_FID
60762 	/* Specifies which block this idx table alloc request is for */
60763 	uint8_t	blktype;
60764 	/* CFA block type */
60765 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_BLKTYPE_CFA \
60766 		UINT32_C(0x0)
60767 	/* RXP gparse block type */
60768 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_BLKTYPE_RXP \
60769 		UINT32_C(0x1)
60770 	/* RE gparse block type */
60771 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE \
60772 		UINT32_C(0x2)
60773 	/* TE gparse block type */
60774 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE \
60775 		UINT32_C(0x3)
60776 	#define HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_LAST \
60777 		HWRM_TFC_IDX_TBL_ALLOC_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
60778 	/* The size of the index table entry in bytes. */
60779 	uint16_t	data_size;
60780 	/* Reserved */
60781 	uint8_t	unused1[6];
60782 	/* The location of the dma buffer */
60783 	uint64_t	dma_addr;
60784 	/*
60785 	 * Index table data located at offset 0. If dma bit is set,
60786 	 * then this field contains the DMA buffer pointer.
60787 	 */
60788 	uint8_t	dev_data[96];
60789 } __rte_packed_end;
60790 
60791 /* hwrm_tfc_idx_tbl_alloc_set_output (size:128b/16B) */
60792 struct __rte_packed_begin hwrm_tfc_idx_tbl_alloc_set_output {
60793 	/* The specific error status for the command. */
60794 	uint16_t	error_code;
60795 	/* The HWRM command request type. */
60796 	uint16_t	req_type;
60797 	/* The sequence ID from the original command. */
60798 	uint16_t	seq_id;
60799 	/* The length of the response data in number of bytes. */
60800 	uint16_t	resp_len;
60801 	/*
60802 	 * Index table entry allocated by the firmware using the
60803 	 * parameters above.
60804 	 */
60805 	uint16_t	idx_tbl_id;
60806 	/* Reserved */
60807 	uint8_t	unused0[5];
60808 	/*
60809 	 * This field is used in Output records to indicate that the output
60810 	 * is completely written to RAM. This field should be read as '1'
60811 	 * to indicate that the output has been completely written.
60812 	 * When writing a command completion or response to an internal
60813 	 * processor, the order of writes has to be such that this field
60814 	 * is written last.
60815 	 */
60816 	uint8_t	valid;
60817 } __rte_packed_end;
60818 
60819 /************************
60820  * hwrm_tfc_idx_tbl_set *
60821  ************************/
60822 
60823 
60824 /* hwrm_tfc_idx_tbl_set_input (size:1088b/136B) */
60825 struct __rte_packed_begin hwrm_tfc_idx_tbl_set_input {
60826 	/* The HWRM command request type. */
60827 	uint16_t	req_type;
60828 	/*
60829 	 * The completion ring to send the completion event on. This should
60830 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60831 	 */
60832 	uint16_t	cmpl_ring;
60833 	/*
60834 	 * The sequence ID is used by the driver for tracking multiple
60835 	 * commands. This ID is treated as opaque data by the firmware and
60836 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60837 	 */
60838 	uint16_t	seq_id;
60839 	/*
60840 	 * The target ID of the command:
60841 	 * * 0x0-0xFFF8 - The function ID
60842 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60843 	 * * 0xFFFD - Reserved for user-space HWRM interface
60844 	 * * 0xFFFF - HWRM
60845 	 */
60846 	uint16_t	target_id;
60847 	/*
60848 	 * A physical address pointer pointing to a host buffer that the
60849 	 * command's response data will be written. This can be either a host
60850 	 * physical address (HPA) or a guest physical address (GPA) and must
60851 	 * point to a physically contiguous block of memory.
60852 	 */
60853 	uint64_t	resp_addr;
60854 	/* Control flags. */
60855 	uint8_t	flags;
60856 	/* Indicates the flow direction. */
60857 	#define HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
60858 	/* If this bit set to 0, then it indicates rx flow. */
60859 	#define HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
60860 	/* If this bit is set to 1, then it indicates tx flow. */
60861 	#define HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
60862 	#define HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DIR_LAST \
60863 		HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DIR_TX
60864 	/*
60865 	 * Indicate device data is being sent via DMA, the device
60866 	 * data packing does not change.
60867 	 */
60868 	#define HWRM_TFC_IDX_TBL_SET_INPUT_FLAGS_DMA     UINT32_C(0x2)
60869 	/*
60870 	 * CFA resource subtype. For definitions, please see
60871 	 * cfa_v3/include/cfa_resources.h.
60872 	 */
60873 	uint8_t	subtype;
60874 	/*
60875 	 * Function ID.
60876 	 * If running on a trusted VF or PF, the fid field can be used to
60877 	 * specify that the function is a non-trusted VF of the parent PF.
60878 	 * If this command is used for the target_id itself, this field is
60879 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
60880 	 * field.
60881 	 */
60882 	uint16_t	fid;
60883 	/*
60884 	 * Session id associated with the firmware. Will be used
60885 	 * for validation if the track type matches.
60886 	 */
60887 	uint16_t	sid;
60888 	/*
60889 	 * Index table index returned during alloc by the
60890 	 * firmware.
60891 	 */
60892 	uint16_t	idx_tbl_id;
60893 	/* The size of the index table entry in bytes. */
60894 	uint16_t	data_size;
60895 	/* Specifies which block this idx table alloc request is for */
60896 	uint8_t	blktype;
60897 	/* CFA block type */
60898 	#define HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_BLKTYPE_CFA \
60899 		UINT32_C(0x0)
60900 	/* RXP gparse block type */
60901 	#define HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_BLKTYPE_RXP \
60902 		UINT32_C(0x1)
60903 	/* RE gparse block type */
60904 	#define HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE \
60905 		UINT32_C(0x2)
60906 	/* TE gparse block type */
60907 	#define HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE \
60908 		UINT32_C(0x3)
60909 	#define HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_LAST \
60910 		HWRM_TFC_IDX_TBL_SET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
60911 	/* unused. */
60912 	uint8_t	unused0[5];
60913 	/* The location of the dma buffer */
60914 	uint64_t	dma_addr;
60915 	/*
60916 	 * Index table data located at offset 0. If dma bit is set,
60917 	 * then this field contains the DMA buffer pointer.
60918 	 */
60919 	uint8_t	dev_data[96];
60920 } __rte_packed_end;
60921 
60922 /* hwrm_tfc_idx_tbl_set_output (size:128b/16B) */
60923 struct __rte_packed_begin hwrm_tfc_idx_tbl_set_output {
60924 	/* The specific error status for the command. */
60925 	uint16_t	error_code;
60926 	/* The HWRM command request type. */
60927 	uint16_t	req_type;
60928 	/* The sequence ID from the original command. */
60929 	uint16_t	seq_id;
60930 	/* The length of the response data in number of bytes. */
60931 	uint16_t	resp_len;
60932 	/* unused. */
60933 	uint8_t	unused0[7];
60934 	/*
60935 	 * This field is used in Output records to indicate that the output
60936 	 * is completely written to RAM. This field should be read as '1'
60937 	 * to indicate that the output has been completely written.
60938 	 * When writing a command completion or response to an internal
60939 	 * processor, the order of writes has to be such that this field
60940 	 * is written last.
60941 	 */
60942 	uint8_t	valid;
60943 } __rte_packed_end;
60944 
60945 /************************
60946  * hwrm_tfc_idx_tbl_get *
60947  ************************/
60948 
60949 
60950 /* hwrm_tfc_idx_tbl_get_input (size:320b/40B) */
60951 struct __rte_packed_begin hwrm_tfc_idx_tbl_get_input {
60952 	/* The HWRM command request type. */
60953 	uint16_t	req_type;
60954 	/*
60955 	 * The completion ring to send the completion event on. This should
60956 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
60957 	 */
60958 	uint16_t	cmpl_ring;
60959 	/*
60960 	 * The sequence ID is used by the driver for tracking multiple
60961 	 * commands. This ID is treated as opaque data by the firmware and
60962 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
60963 	 */
60964 	uint16_t	seq_id;
60965 	/*
60966 	 * The target ID of the command:
60967 	 * * 0x0-0xFFF8 - The function ID
60968 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
60969 	 * * 0xFFFD - Reserved for user-space HWRM interface
60970 	 * * 0xFFFF - HWRM
60971 	 */
60972 	uint16_t	target_id;
60973 	/*
60974 	 * A physical address pointer pointing to a host buffer that the
60975 	 * command's response data will be written. This can be either a host
60976 	 * physical address (HPA) or a guest physical address (GPA) and must
60977 	 * point to a physically contiguous block of memory.
60978 	 */
60979 	uint64_t	resp_addr;
60980 	/* Control flags. */
60981 	uint8_t	flags;
60982 	/* Indicates the flow direction. */
60983 	#define HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_DIR \
60984 		UINT32_C(0x1)
60985 	/* If this bit set to 0, then it indicates rx flow. */
60986 	#define HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_DIR_RX \
60987 		UINT32_C(0x0)
60988 	/* If this bit is set to 1, then it indicates tx flow. */
60989 	#define HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_DIR_TX \
60990 		UINT32_C(0x1)
60991 	#define HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_DIR_LAST \
60992 		HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_DIR_TX
60993 	/*
60994 	 * When set use the special access register access to clear
60995 	 * the table entry on read.
60996 	 */
60997 	#define HWRM_TFC_IDX_TBL_GET_INPUT_FLAGS_CLEAR_ON_READ \
60998 		UINT32_C(0x2)
60999 	/*
61000 	 * CFA resource subtype. For definitions, please see
61001 	 * cfa_v3/include/cfa_resources.h.
61002 	 */
61003 	uint8_t	subtype;
61004 	/*
61005 	 * Function ID.
61006 	 * If running on a trusted VF or PF, the fid field can be used to
61007 	 * specify that the function is a non-trusted VF of the parent PF.
61008 	 * If this command is used for the target_id itself, this field is
61009 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
61010 	 * field.
61011 	 */
61012 	uint16_t	fid;
61013 	/*
61014 	 * Session id associated with the firmware. Will be used
61015 	 * for validation if the track type matches.
61016 	 */
61017 	uint16_t	sid;
61018 	/*
61019 	 * Index table index returned during alloc by the
61020 	 * firmware.
61021 	 */
61022 	uint16_t	idx_tbl_id;
61023 	/* The size of the index table entry buffer in bytes. */
61024 	uint16_t	buffer_size;
61025 	/* Specifies which block this idx table alloc request is for */
61026 	uint8_t	blktype;
61027 	/* CFA block type */
61028 	#define HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_BLKTYPE_CFA \
61029 		UINT32_C(0x0)
61030 	/* RXP block type */
61031 	#define HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_BLKTYPE_RXP \
61032 		UINT32_C(0x1)
61033 	/* RE gparse block type */
61034 	#define HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE \
61035 		UINT32_C(0x2)
61036 	/* TE gparse block type */
61037 	#define HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE \
61038 		UINT32_C(0x3)
61039 	#define HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_LAST \
61040 		HWRM_TFC_IDX_TBL_GET_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
61041 	/* unused. */
61042 	uint8_t	unused0[5];
61043 	/* The location of the response dma buffer */
61044 	uint64_t	dma_addr;
61045 } __rte_packed_end;
61046 
61047 /* hwrm_tfc_idx_tbl_get_output (size:128b/16B) */
61048 struct __rte_packed_begin hwrm_tfc_idx_tbl_get_output {
61049 	/* The specific error status for the command. */
61050 	uint16_t	error_code;
61051 	/* The HWRM command request type. */
61052 	uint16_t	req_type;
61053 	/* The sequence ID from the original command. */
61054 	uint16_t	seq_id;
61055 	/* The length of the response data in number of bytes. */
61056 	uint16_t	resp_len;
61057 	/* The size of the index table buffer returned in device size bytes. */
61058 	uint16_t	data_size;
61059 	/* unused */
61060 	uint8_t	unused1[5];
61061 	/*
61062 	 * This field is used in Output records to indicate that the output
61063 	 * is completely written to RAM. This field should be read as '1'
61064 	 * to indicate that the output has been completely written.
61065 	 * When writing a command completion or response to an internal
61066 	 * processor, the order of writes has to be such that this field
61067 	 * is written last.
61068 	 */
61069 	uint8_t	valid;
61070 } __rte_packed_end;
61071 
61072 /*************************
61073  * hwrm_tfc_idx_tbl_free *
61074  *************************/
61075 
61076 
61077 /* hwrm_tfc_idx_tbl_free_input (size:256b/32B) */
61078 struct __rte_packed_begin hwrm_tfc_idx_tbl_free_input {
61079 	/* The HWRM command request type. */
61080 	uint16_t	req_type;
61081 	/*
61082 	 * The completion ring to send the completion event on. This should
61083 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61084 	 */
61085 	uint16_t	cmpl_ring;
61086 	/*
61087 	 * The sequence ID is used by the driver for tracking multiple
61088 	 * commands. This ID is treated as opaque data by the firmware and
61089 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61090 	 */
61091 	uint16_t	seq_id;
61092 	/*
61093 	 * The target ID of the command:
61094 	 * * 0x0-0xFFF8 - The function ID
61095 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61096 	 * * 0xFFFD - Reserved for user-space HWRM interface
61097 	 * * 0xFFFF - HWRM
61098 	 */
61099 	uint16_t	target_id;
61100 	/*
61101 	 * A physical address pointer pointing to a host buffer that the
61102 	 * command's response data will be written. This can be either a host
61103 	 * physical address (HPA) or a guest physical address (GPA) and must
61104 	 * point to a physically contiguous block of memory.
61105 	 */
61106 	uint64_t	resp_addr;
61107 	/* Control flags. */
61108 	uint8_t	flags;
61109 	/* Indicates the flow direction. */
61110 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_FLAGS_DIR     UINT32_C(0x1)
61111 	/* If this bit set to 0, then it indicates rx flow. */
61112 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
61113 	/* If this bit is set to 1, then it indicates tx flow. */
61114 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
61115 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_FLAGS_DIR_LAST \
61116 		HWRM_TFC_IDX_TBL_FREE_INPUT_FLAGS_DIR_TX
61117 	/*
61118 	 * CFA resource subtype. For definitions, please see
61119 	 * cfa_v3/include/cfa_resources.h.
61120 	 */
61121 	uint8_t	subtype;
61122 	/*
61123 	 * Function ID.
61124 	 * If running on a trusted VF or PF, the fid field can be used to
61125 	 * specify that the function is a non-trusted VF of the parent PF.
61126 	 * If this command is used for the target_id itself, this field is
61127 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
61128 	 * field.
61129 	 */
61130 	uint16_t	fid;
61131 	/*
61132 	 * Session id associated with the firmware. Will be used
61133 	 * for validation if the track type matches.
61134 	 */
61135 	uint16_t	sid;
61136 	/* Index table id to be freed by the firmware. */
61137 	uint16_t	idx_tbl_id;
61138 	/* Specifies which block this idx table alloc request is for */
61139 	uint8_t	blktype;
61140 	/* CFA block type */
61141 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_BLKTYPE_CFA \
61142 		UINT32_C(0x0)
61143 	/* RXP block type */
61144 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_BLKTYPE_RXP \
61145 		UINT32_C(0x1)
61146 	/* RE parse block type */
61147 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_BLKTYPE_RE_GPARSE \
61148 		UINT32_C(0x2)
61149 	/* TE parse block type */
61150 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE \
61151 		UINT32_C(0x3)
61152 	#define HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_LAST \
61153 		HWRM_TFC_IDX_TBL_FREE_INPUT_BLKTYPE_BLKTYPE_TE_GPARSE
61154 	/* unused. */
61155 	uint8_t	unused0[7];
61156 } __rte_packed_end;
61157 
61158 /* hwrm_tfc_idx_tbl_free_output (size:128b/16B) */
61159 struct __rte_packed_begin hwrm_tfc_idx_tbl_free_output {
61160 	/* The specific error status for the command. */
61161 	uint16_t	error_code;
61162 	/* The HWRM command request type. */
61163 	uint16_t	req_type;
61164 	/* The sequence ID from the original command. */
61165 	uint16_t	seq_id;
61166 	/* The length of the response data in number of bytes. */
61167 	uint16_t	resp_len;
61168 	/* Reserved */
61169 	uint8_t	unused0[7];
61170 	/*
61171 	 * This field is used in Output records to indicate that the output
61172 	 * is completely written to RAM. This field should be read as '1'
61173 	 * to indicate that the output has been completely written.
61174 	 * When writing a command completion or response to an internal
61175 	 * processor, the order of writes has to be such that this field
61176 	 * is written last.
61177 	 */
61178 	uint8_t	valid;
61179 } __rte_packed_end;
61180 
61181 /* TruFlow resources request for a global id. */
61182 /* tfc_global_id_hwrm_req (size:64b/8B) */
61183 struct __rte_packed_begin tfc_global_id_hwrm_req {
61184 	/* Type of the resource, defined in enum cfa_resource_type HCAPI RM. */
61185 	uint16_t	rtype;
61186 	/* Indicates the flow direction in type of cfa_dir. */
61187 	uint16_t	dir;
61188 	/* Subtype of the resource type. */
61189 	uint16_t	subtype;
61190 	/* Number of the type of resources. */
61191 	uint16_t	cnt;
61192 } __rte_packed_end;
61193 
61194 /* The reserved resources for the global id. */
61195 /* tfc_global_id_hwrm_rsp (size:64b/8B) */
61196 struct __rte_packed_begin tfc_global_id_hwrm_rsp {
61197 	/* Type of the resource, defined in enum cfa_resource_type HCAPI RM. */
61198 	uint16_t	rtype;
61199 	/* Indicates the flow direction in type of cfa_dir. */
61200 	uint16_t	dir;
61201 	/* Subtype of the resource type. */
61202 	uint16_t	subtype;
61203 	/* The global id that the resources reserved for. */
61204 	uint16_t	id;
61205 } __rte_packed_end;
61206 
61207 /****************************
61208  * hwrm_tfc_global_id_alloc *
61209  ****************************/
61210 
61211 
61212 /* hwrm_tfc_global_id_alloc_input (size:320b/40B) */
61213 struct __rte_packed_begin hwrm_tfc_global_id_alloc_input {
61214 	/* The HWRM command request type. */
61215 	uint16_t	req_type;
61216 	/*
61217 	 * The completion ring to send the completion event on. This should
61218 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61219 	 */
61220 	uint16_t	cmpl_ring;
61221 	/*
61222 	 * The sequence ID is used by the driver for tracking multiple
61223 	 * commands. This ID is treated as opaque data by the firmware and
61224 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61225 	 */
61226 	uint16_t	seq_id;
61227 	/*
61228 	 * The target ID of the command:
61229 	 * * 0x0-0xFFF8 - The function ID
61230 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61231 	 * * 0xFFFD - Reserved for user-space HWRM interface
61232 	 * * 0xFFFF - HWRM
61233 	 */
61234 	uint16_t	target_id;
61235 	/*
61236 	 * A physical address pointer pointing to a host buffer that the
61237 	 * command's response data will be written. This can be either a host
61238 	 * physical address (HPA) or a guest physical address (GPA) and must
61239 	 * point to a physically contiguous block of memory.
61240 	 */
61241 	uint64_t	resp_addr;
61242 	/*
61243 	 * Function ID.
61244 	 * If running on a trusted VF or PF, the fid field can be used to
61245 	 * specify that the function is a non-trusted VF of the parent PF.
61246 	 * If this command is used for the target_id itself, this field is
61247 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
61248 	 * field.
61249 	 */
61250 	uint16_t	fid;
61251 	/* Firmware session id returned when HWRM_TF_SESSION_OPEN is sent. */
61252 	uint16_t	sid;
61253 	/* Global domain id. */
61254 	uint16_t	global_id;
61255 	/*
61256 	 * Defines the array size of the provided req_addr and
61257 	 * resv_addr array buffers. Should be set to the number of
61258 	 * request entries.
61259 	 */
61260 	uint16_t	req_cnt;
61261 	/*
61262 	 * This is the DMA address for the request input data array
61263 	 * buffer. Array is of tfc_global_id_hwrm_req type. Size of the
61264 	 * array buffer is provided by the 'req_cnt' field in this
61265 	 * message.
61266 	 */
61267 	uint64_t	req_addr;
61268 	/*
61269 	 * This is the DMA address for the resc output data array
61270 	 * buffer. Array is of tfc_global_id_hwrm_rsp type. Size of the array
61271 	 * buffer is provided by the 'req_cnt' field in this
61272 	 * message.
61273 	 */
61274 	uint64_t	resc_addr;
61275 } __rte_packed_end;
61276 
61277 /* hwrm_tfc_global_id_alloc_output (size:128b/16B) */
61278 struct __rte_packed_begin hwrm_tfc_global_id_alloc_output {
61279 	/* The specific error status for the command. */
61280 	uint16_t	error_code;
61281 	/* The HWRM command request type. */
61282 	uint16_t	req_type;
61283 	/* The sequence ID from the original command. */
61284 	uint16_t	seq_id;
61285 	/* The length of the response data in number of bytes. */
61286 	uint16_t	resp_len;
61287 	/*
61288 	 * Size of the returned hwrm_tfc_global_id_req data array. The value
61289 	 * cannot exceed the req_cnt defined by the input msg. The data
61290 	 * array is returned using the resv_addr specified DMA
61291 	 * address also provided by the input msg.
61292 	 */
61293 	uint16_t	rsp_cnt;
61294 	/* Non-zero if this is the first allocation for the global ID. */
61295 	uint8_t	first;
61296 	/* unused. */
61297 	uint8_t	unused0[4];
61298 	/*
61299 	 * This field is used in Output records to indicate that the output
61300 	 * is completely written to RAM. This field should be read as '1'
61301 	 * to indicate that the output has been completely written.
61302 	 * When writing a command completion or response to an internal
61303 	 * processor, the order of writes has to be such that this field
61304 	 * is written last.
61305 	 */
61306 	uint8_t	valid;
61307 } __rte_packed_end;
61308 
61309 /*********************
61310  * hwrm_tfc_tcam_set *
61311  *********************/
61312 
61313 
61314 /* hwrm_tfc_tcam_set_input (size:1088b/136B) */
61315 struct __rte_packed_begin hwrm_tfc_tcam_set_input {
61316 	/* The HWRM command request type. */
61317 	uint16_t	req_type;
61318 	/*
61319 	 * The completion ring to send the completion event on. This should
61320 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61321 	 */
61322 	uint16_t	cmpl_ring;
61323 	/*
61324 	 * The sequence ID is used by the driver for tracking multiple
61325 	 * commands. This ID is treated as opaque data by the firmware and
61326 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61327 	 */
61328 	uint16_t	seq_id;
61329 	/*
61330 	 * The target ID of the command:
61331 	 * * 0x0-0xFFF8 - The function ID
61332 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61333 	 * * 0xFFFD - Reserved for user-space HWRM interface
61334 	 * * 0xFFFF - HWRM
61335 	 */
61336 	uint16_t	target_id;
61337 	/*
61338 	 * A physical address pointer pointing to a host buffer that the
61339 	 * command's response data will be written. This can be either a host
61340 	 * physical address (HPA) or a guest physical address (GPA) and must
61341 	 * point to a physically contiguous block of memory.
61342 	 */
61343 	uint64_t	resp_addr;
61344 	/*
61345 	 * Function ID.
61346 	 * If running on a trusted VF or PF, the fid field can be used to
61347 	 * specify that the function is a non-trusted VF of the parent PF.
61348 	 * If this command is used for the target_id itself, this field is
61349 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
61350 	 * field.
61351 	 */
61352 	uint16_t	fid;
61353 	/*
61354 	 * Session id associated with the firmware. Will be used
61355 	 * for validation if the track type matches.
61356 	 */
61357 	uint16_t	sid;
61358 	/* Logical TCAM ID. */
61359 	uint16_t	tcam_id;
61360 	/* Number of bytes in the TCAM key. */
61361 	uint16_t	key_size;
61362 	/* Number of bytes in the TCAM result. */
61363 	uint16_t	result_size;
61364 	/* Control flags. */
61365 	uint8_t	flags;
61366 	/* Indicates the flow direction. */
61367 	#define HWRM_TFC_TCAM_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
61368 	/* If this bit set to 0, then it indicates rx flow. */
61369 	#define HWRM_TFC_TCAM_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
61370 	/* If this bit is set to 1, then it indicates tx flow. */
61371 	#define HWRM_TFC_TCAM_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
61372 	#define HWRM_TFC_TCAM_SET_INPUT_FLAGS_DIR_LAST \
61373 		HWRM_TFC_TCAM_SET_INPUT_FLAGS_DIR_TX
61374 	/* Indicate device data is being sent via DMA. */
61375 	#define HWRM_TFC_TCAM_SET_INPUT_FLAGS_DMA     UINT32_C(0x2)
61376 	/*
61377 	 * Subtype of TCAM resource. See
61378 	 * cfa_v3/include/cfa_resources.h.
61379 	 */
61380 	uint8_t	subtype;
61381 	/* unused. */
61382 	uint8_t	unused0[4];
61383 	/* The location of the response dma buffer */
61384 	uint64_t	dma_addr;
61385 	/*
61386 	 * TCAM key located at offset 0, mask located at mask_offset
61387 	 * and result at result_offset for the device.
61388 	 */
61389 	uint8_t	dev_data[96];
61390 } __rte_packed_end;
61391 
61392 /* hwrm_tfc_tcam_set_output (size:128b/16B) */
61393 struct __rte_packed_begin hwrm_tfc_tcam_set_output {
61394 	/* The specific error status for the command. */
61395 	uint16_t	error_code;
61396 	/* The HWRM command request type. */
61397 	uint16_t	req_type;
61398 	/* The sequence ID from the original command. */
61399 	uint16_t	seq_id;
61400 	/* The length of the response data in number of bytes. */
61401 	uint16_t	resp_len;
61402 	/* unused. */
61403 	uint8_t	unused0[7];
61404 	/*
61405 	 * This field is used in Output records to indicate that the
61406 	 * output is completely written to RAM. This field should be
61407 	 * read as '1' to indicate that the output has been
61408 	 * completely written. When writing a command completion or
61409 	 * response to an internal processor, the order of writes has
61410 	 * to be such that this field is written last.
61411 	 */
61412 	uint8_t	valid;
61413 } __rte_packed_end;
61414 
61415 /*********************
61416  * hwrm_tfc_tcam_get *
61417  *********************/
61418 
61419 
61420 /* hwrm_tfc_tcam_get_input (size:192b/24B) */
61421 struct __rte_packed_begin hwrm_tfc_tcam_get_input {
61422 	/* The HWRM command request type. */
61423 	uint16_t	req_type;
61424 	/*
61425 	 * The completion ring to send the completion event on. This should
61426 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61427 	 */
61428 	uint16_t	cmpl_ring;
61429 	/*
61430 	 * The sequence ID is used by the driver for tracking multiple
61431 	 * commands. This ID is treated as opaque data by the firmware and
61432 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61433 	 */
61434 	uint16_t	seq_id;
61435 	/*
61436 	 * The target ID of the command:
61437 	 * * 0x0-0xFFF8 - The function ID
61438 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61439 	 * * 0xFFFD - Reserved for user-space HWRM interface
61440 	 * * 0xFFFF - HWRM
61441 	 */
61442 	uint16_t	target_id;
61443 	/*
61444 	 * A physical address pointer pointing to a host buffer that the
61445 	 * command's response data will be written. This can be either a host
61446 	 * physical address (HPA) or a guest physical address (GPA) and must
61447 	 * point to a physically contiguous block of memory.
61448 	 */
61449 	uint64_t	resp_addr;
61450 	/* Control flags. */
61451 	uint8_t	flags;
61452 	/* Indicates the flow direction. */
61453 	#define HWRM_TFC_TCAM_GET_INPUT_FLAGS_DIR     UINT32_C(0x1)
61454 	/* If this bit set to 0, then it indicates rx flow. */
61455 	#define HWRM_TFC_TCAM_GET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
61456 	/* If this bit is set to 1, then it indicates tx flow. */
61457 	#define HWRM_TFC_TCAM_GET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
61458 	#define HWRM_TFC_TCAM_GET_INPUT_FLAGS_DIR_LAST \
61459 		HWRM_TFC_TCAM_GET_INPUT_FLAGS_DIR_TX
61460 	/*
61461 	 * Subtype of TCAM resource See
61462 	 * cfa_v3/include/cfa_resources.h.
61463 	 */
61464 	uint8_t	subtype;
61465 	/*
61466 	 * Function ID.
61467 	 * If running on a trusted VF or PF, the fid field can be used to
61468 	 * specify that the function is a non-trusted VF of the parent PF.
61469 	 * If this command is used for the target_id itself, this field is
61470 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
61471 	 * field.
61472 	 */
61473 	uint16_t	fid;
61474 	/*
61475 	 * Session id associated with the firmware. Will be used
61476 	 * for validation if the track type matches.
61477 	 */
61478 	uint16_t	sid;
61479 	/* Logical TCAM ID. */
61480 	uint16_t	tcam_id;
61481 } __rte_packed_end;
61482 
61483 /* hwrm_tfc_tcam_get_output (size:2368b/296B) */
61484 struct __rte_packed_begin hwrm_tfc_tcam_get_output {
61485 	/* The specific error status for the command. */
61486 	uint16_t	error_code;
61487 	/* The HWRM command request type. */
61488 	uint16_t	req_type;
61489 	/* The sequence ID from the original command. */
61490 	uint16_t	seq_id;
61491 	/* The length of the response data in number of bytes. */
61492 	uint16_t	resp_len;
61493 	/* Number of bytes in the TCAM key. */
61494 	uint16_t	key_size;
61495 	/* Number of bytes in the TCAM result. */
61496 	uint16_t	result_size;
61497 	/* unused. */
61498 	uint8_t	unused0[4];
61499 	/*
61500 	 * TCAM key located at offset 0, mask located at key_size
61501 	 * and result at 2 * key_size for the device.
61502 	 */
61503 	uint8_t	dev_data[272];
61504 	/* unused. */
61505 	uint8_t	unused1[7];
61506 	/*
61507 	 * This field is used in Output records to indicate that the
61508 	 * output is completely written to RAM. This field should be
61509 	 * read as '1' to indicate that the output has been
61510 	 * completely written. When writing a command completion or
61511 	 * response to an internal processor, the order of writes has
61512 	 * to be such that this field is written last.
61513 	 */
61514 	uint8_t	valid;
61515 } __rte_packed_end;
61516 
61517 /***********************
61518  * hwrm_tfc_tcam_alloc *
61519  ***********************/
61520 
61521 
61522 /* hwrm_tfc_tcam_alloc_input (size:256b/32B) */
61523 struct __rte_packed_begin hwrm_tfc_tcam_alloc_input {
61524 	/* The HWRM command request type. */
61525 	uint16_t	req_type;
61526 	/*
61527 	 * The completion ring to send the completion event on. This should
61528 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61529 	 */
61530 	uint16_t	cmpl_ring;
61531 	/*
61532 	 * The sequence ID is used by the driver for tracking multiple
61533 	 * commands. This ID is treated as opaque data by the firmware and
61534 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61535 	 */
61536 	uint16_t	seq_id;
61537 	/*
61538 	 * The target ID of the command:
61539 	 * * 0x0-0xFFF8 - The function ID
61540 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61541 	 * * 0xFFFD - Reserved for user-space HWRM interface
61542 	 * * 0xFFFF - HWRM
61543 	 */
61544 	uint16_t	target_id;
61545 	/*
61546 	 * A physical address pointer pointing to a host buffer that the
61547 	 * command's response data will be written. This can be either a host
61548 	 * physical address (HPA) or a guest physical address (GPA) and must
61549 	 * point to a physically contiguous block of memory.
61550 	 */
61551 	uint64_t	resp_addr;
61552 	/* Control flags. */
61553 	uint8_t	flags;
61554 	/* Indicates the flow direction. */
61555 	#define HWRM_TFC_TCAM_ALLOC_INPUT_FLAGS_DIR     UINT32_C(0x1)
61556 	/* If this bit set to 0, then it indicates rx flow. */
61557 	#define HWRM_TFC_TCAM_ALLOC_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
61558 	/* If this bit is set to 1, then it indicates tx flow. */
61559 	#define HWRM_TFC_TCAM_ALLOC_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
61560 	#define HWRM_TFC_TCAM_ALLOC_INPUT_FLAGS_DIR_LAST \
61561 		HWRM_TFC_TCAM_ALLOC_INPUT_FLAGS_DIR_TX
61562 	/*
61563 	 * Subtype of TCAM resource. See
61564 	 * cfa_v3/include/cfa_resources.h.
61565 	 */
61566 	uint8_t	subtype;
61567 	/*
61568 	 * Function ID.
61569 	 * If running on a trusted VF or PF, the fid field can be used to
61570 	 * specify that the function is a non-trusted VF of the parent PF.
61571 	 * If this command is used for the target_id itself, this field is
61572 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
61573 	 * field.
61574 	 */
61575 	uint16_t	fid;
61576 	/*
61577 	 * Unique session id for the session created by the
61578 	 * firmware. Will be used to track this index table entry
61579 	 * only if track type is track_type_sid.
61580 	 */
61581 	uint16_t	sid;
61582 	/* Number of bytes in the TCAM key. */
61583 	uint16_t	key_size;
61584 	/* Entry priority. */
61585 	uint16_t	priority;
61586 	/* Describes the type of tracking id to be used */
61587 	uint8_t	track_type;
61588 	/* Invalid track type */
61589 	#define HWRM_TFC_TCAM_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID \
61590 		UINT32_C(0x0)
61591 	/* Tracked by session id */
61592 	#define HWRM_TFC_TCAM_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_SID \
61593 		UINT32_C(0x1)
61594 	/* Tracked by function id */
61595 	#define HWRM_TFC_TCAM_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID \
61596 		UINT32_C(0x2)
61597 	#define HWRM_TFC_TCAM_ALLOC_INPUT_TRACK_TYPE_LAST \
61598 		HWRM_TFC_TCAM_ALLOC_INPUT_TRACK_TYPE_TRACK_TYPE_FID
61599 	/* Unused. */
61600 	uint8_t	unused0[5];
61601 } __rte_packed_end;
61602 
61603 /* hwrm_tfc_tcam_alloc_output (size:128b/16B) */
61604 struct __rte_packed_begin hwrm_tfc_tcam_alloc_output {
61605 	/* The specific error status for the command. */
61606 	uint16_t	error_code;
61607 	/* The HWRM command request type. */
61608 	uint16_t	req_type;
61609 	/* The sequence ID from the original command. */
61610 	uint16_t	seq_id;
61611 	/* The length of the response data in number of bytes. */
61612 	uint16_t	resp_len;
61613 	/*
61614 	 * Index table entry allocated by the firmware using the
61615 	 * parameters above.
61616 	 */
61617 	uint16_t	idx;
61618 	/* Reserved */
61619 	uint8_t	unused0[5];
61620 	/*
61621 	 * This field is used in Output records to indicate that the output
61622 	 * is completely written to RAM. This field should be read as '1'
61623 	 * to indicate that the output has been completely written.
61624 	 * When writing a command completion or response to an internal
61625 	 * processor, the order of writes has to be such that this field
61626 	 * is written last.
61627 	 */
61628 	uint8_t	valid;
61629 } __rte_packed_end;
61630 
61631 /***************************
61632  * hwrm_tfc_tcam_alloc_set *
61633  ***************************/
61634 
61635 
61636 /* hwrm_tfc_tcam_alloc_set_input (size:1088b/136B) */
61637 struct __rte_packed_begin hwrm_tfc_tcam_alloc_set_input {
61638 	/* The HWRM command request type. */
61639 	uint16_t	req_type;
61640 	/*
61641 	 * The completion ring to send the completion event on. This should
61642 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61643 	 */
61644 	uint16_t	cmpl_ring;
61645 	/*
61646 	 * The sequence ID is used by the driver for tracking multiple
61647 	 * commands. This ID is treated as opaque data by the firmware and
61648 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61649 	 */
61650 	uint16_t	seq_id;
61651 	/*
61652 	 * The target ID of the command:
61653 	 * * 0x0-0xFFF8 - The function ID
61654 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61655 	 * * 0xFFFD - Reserved for user-space HWRM interface
61656 	 * * 0xFFFF - HWRM
61657 	 */
61658 	uint16_t	target_id;
61659 	/*
61660 	 * A physical address pointer pointing to a host buffer that the
61661 	 * command's response data will be written. This can be either a host
61662 	 * physical address (HPA) or a guest physical address (GPA) and must
61663 	 * point to a physically contiguous block of memory.
61664 	 */
61665 	uint64_t	resp_addr;
61666 	/* Control flags. */
61667 	uint8_t	flags;
61668 	/* Indicates the flow direction. */
61669 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
61670 	/* If this bit set to 0, then it indicates rx flow. */
61671 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
61672 	/* If this bit is set to 1, then it indicates tx flow. */
61673 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
61674 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DIR_LAST \
61675 		HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DIR_TX
61676 	/* Indicate device data is being sent via DMA. */
61677 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_FLAGS_DMA     UINT32_C(0x2)
61678 	/*
61679 	 * Subtype of TCAM resource. See
61680 	 * cfa_v3/include/cfa_resources.h.
61681 	 */
61682 	uint8_t	subtype;
61683 	/*
61684 	 * Function ID.
61685 	 * If running on a trusted VF or PF, the fid field can be used to
61686 	 * specify that the function is a non-trusted VF of the parent PF.
61687 	 * If this command is used for the target_id itself, this field is
61688 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
61689 	 * field.
61690 	 */
61691 	uint16_t	fid;
61692 	/*
61693 	 * Unique session id for the session created by the
61694 	 * firmware. Will be used to track this index table entry
61695 	 * only if track type is track_type_sid.
61696 	 */
61697 	uint16_t	sid;
61698 	/* Number of bytes in the TCAM key. */
61699 	uint16_t	key_size;
61700 	/* The size of the TCAM table entry in bytes. */
61701 	uint16_t	result_size;
61702 	/* Entry priority. */
61703 	uint16_t	priority;
61704 	/* Describes the type of tracking id to be used */
61705 	uint8_t	track_type;
61706 	/* Invalid track type */
61707 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID \
61708 		UINT32_C(0x0)
61709 	/* Tracked by session id */
61710 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_SID \
61711 		UINT32_C(0x1)
61712 	/* Tracked by function id */
61713 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_FID \
61714 		UINT32_C(0x2)
61715 	#define HWRM_TFC_TCAM_ALLOC_SET_INPUT_TRACK_TYPE_LAST \
61716 		HWRM_TFC_TCAM_ALLOC_SET_INPUT_TRACK_TYPE_TRACK_TYPE_FID
61717 	/* Unused */
61718 	uint8_t	unused[3];
61719 	/* The location of the response dma buffer */
61720 	uint64_t	dma_addr;
61721 	/*
61722 	 * Index table data located at offset 0. If dma bit is set,
61723 	 * then this field contains the DMA buffer pointer.
61724 	 */
61725 	uint8_t	dev_data[96];
61726 } __rte_packed_end;
61727 
61728 /* hwrm_tfc_tcam_alloc_set_output (size:128b/16B) */
61729 struct __rte_packed_begin hwrm_tfc_tcam_alloc_set_output {
61730 	/* The specific error status for the command. */
61731 	uint16_t	error_code;
61732 	/* The HWRM command request type. */
61733 	uint16_t	req_type;
61734 	/* The sequence ID from the original command. */
61735 	uint16_t	seq_id;
61736 	/* The length of the response data in number of bytes. */
61737 	uint16_t	resp_len;
61738 	/* Logical TCAM ID. */
61739 	uint16_t	tcam_id;
61740 	/* Reserved */
61741 	uint8_t	unused0[5];
61742 	/*
61743 	 * This field is used in Output records to indicate that the output
61744 	 * is completely written to RAM. This field should be read as '1'
61745 	 * to indicate that the output has been completely written.
61746 	 * When writing a command completion or response to an internal
61747 	 * processor, the order of writes has to be such that this field
61748 	 * is written last.
61749 	 */
61750 	uint8_t	valid;
61751 } __rte_packed_end;
61752 
61753 /**********************
61754  * hwrm_tfc_tcam_free *
61755  **********************/
61756 
61757 
61758 /* hwrm_tfc_tcam_free_input (size:192b/24B) */
61759 struct __rte_packed_begin hwrm_tfc_tcam_free_input {
61760 	/* The HWRM command request type. */
61761 	uint16_t	req_type;
61762 	/*
61763 	 * The completion ring to send the completion event on. This should
61764 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61765 	 */
61766 	uint16_t	cmpl_ring;
61767 	/*
61768 	 * The sequence ID is used by the driver for tracking multiple
61769 	 * commands. This ID is treated as opaque data by the firmware and
61770 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61771 	 */
61772 	uint16_t	seq_id;
61773 	/*
61774 	 * The target ID of the command:
61775 	 * * 0x0-0xFFF8 - The function ID
61776 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61777 	 * * 0xFFFD - Reserved for user-space HWRM interface
61778 	 * * 0xFFFF - HWRM
61779 	 */
61780 	uint16_t	target_id;
61781 	/*
61782 	 * A physical address pointer pointing to a host buffer that the
61783 	 * command's response data will be written. This can be either a host
61784 	 * physical address (HPA) or a guest physical address (GPA) and must
61785 	 * point to a physically contiguous block of memory.
61786 	 */
61787 	uint64_t	resp_addr;
61788 	/* Control flags. */
61789 	uint8_t	flags;
61790 	/* Indicates the flow direction. */
61791 	#define HWRM_TFC_TCAM_FREE_INPUT_FLAGS_DIR     UINT32_C(0x1)
61792 	/* If this bit set to 0, then it indicates rx flow. */
61793 	#define HWRM_TFC_TCAM_FREE_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
61794 	/* If this bit is set to 1, then it indicates tx flow. */
61795 	#define HWRM_TFC_TCAM_FREE_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
61796 	#define HWRM_TFC_TCAM_FREE_INPUT_FLAGS_DIR_LAST \
61797 		HWRM_TFC_TCAM_FREE_INPUT_FLAGS_DIR_TX
61798 	/*
61799 	 * Subtype of TCAM resource. See
61800 	 * cfa_v3/include/cfa_resources.h.
61801 	 */
61802 	uint8_t	subtype;
61803 	/*
61804 	 * Function ID.
61805 	 * If running on a trusted VF or PF, the fid field can be used to
61806 	 * specify that the function is a non-trusted VF of the parent PF.
61807 	 * If this command is used for the target_id itself, this field is
61808 	 * set to 0xffff. A non-trusted VF cannot specify a valid FID in this
61809 	 * field.
61810 	 */
61811 	uint16_t	fid;
61812 	/*
61813 	 * Session id associated with the firmware. Will be used
61814 	 * for validation if the track type matches.
61815 	 */
61816 	uint16_t	sid;
61817 	/* Logical TCAM ID. */
61818 	uint16_t	tcam_id;
61819 } __rte_packed_end;
61820 
61821 /* hwrm_tfc_tcam_free_output (size:128b/16B) */
61822 struct __rte_packed_begin hwrm_tfc_tcam_free_output {
61823 	/* The specific error status for the command. */
61824 	uint16_t	error_code;
61825 	/* The HWRM command request type. */
61826 	uint16_t	req_type;
61827 	/* The sequence ID from the original command. */
61828 	uint16_t	seq_id;
61829 	/* The length of the response data in number of bytes. */
61830 	uint16_t	resp_len;
61831 	/* Reserved */
61832 	uint8_t	unused0[7];
61833 	/*
61834 	 * This field is used in Output records to indicate that the output
61835 	 * is completely written to RAM. This field should be read as '1'
61836 	 * to indicate that the output has been completely written.
61837 	 * When writing a command completion or response to an internal
61838 	 * processor, the order of writes has to be such that this field
61839 	 * is written last.
61840 	 */
61841 	uint8_t	valid;
61842 } __rte_packed_end;
61843 
61844 /***********************
61845  * hwrm_tfc_if_tbl_set *
61846  ***********************/
61847 
61848 
61849 /* hwrm_tfc_if_tbl_set_input (size:960b/120B) */
61850 struct __rte_packed_begin hwrm_tfc_if_tbl_set_input {
61851 	/* The HWRM command request type. */
61852 	uint16_t	req_type;
61853 	/*
61854 	 * The completion ring to send the completion event on. This should
61855 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61856 	 */
61857 	uint16_t	cmpl_ring;
61858 	/*
61859 	 * The sequence ID is used by the driver for tracking multiple
61860 	 * commands. This ID is treated as opaque data by the firmware and
61861 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61862 	 */
61863 	uint16_t	seq_id;
61864 	/*
61865 	 * The target ID of the command:
61866 	 * * 0x0-0xFFF8 - The function ID
61867 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61868 	 * * 0xFFFD - Reserved for user-space HWRM interface
61869 	 * * 0xFFFF - HWRM
61870 	 */
61871 	uint16_t	target_id;
61872 	/*
61873 	 * A physical address pointer pointing to a host buffer that the
61874 	 * command's response data will be written. This can be either a host
61875 	 * physical address (HPA) or a guest physical address (GPA) and must
61876 	 * point to a physically contiguous block of memory.
61877 	 */
61878 	uint64_t	resp_addr;
61879 	/* Session identifier. */
61880 	uint16_t	sid;
61881 	/* Function identifier. */
61882 	uint16_t	fid;
61883 	/*
61884 	 * Subtype identifying IF table type. See
61885 	 * cfa_v3/include/cfa_resources.h.
61886 	 */
61887 	uint8_t	subtype;
61888 	/* Control flags. */
61889 	uint8_t	flags;
61890 	/* Indicates the flow direction. */
61891 	#define HWRM_TFC_IF_TBL_SET_INPUT_FLAGS_DIR     UINT32_C(0x1)
61892 	/* If this bit set to 0, then it indicates rx flow. */
61893 	#define HWRM_TFC_IF_TBL_SET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
61894 	/* If this bit is set to 1, then it indicates tx flow. */
61895 	#define HWRM_TFC_IF_TBL_SET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
61896 	#define HWRM_TFC_IF_TBL_SET_INPUT_FLAGS_DIR_LAST \
61897 		HWRM_TFC_IF_TBL_SET_INPUT_FLAGS_DIR_TX
61898 	/* Table entry index. */
61899 	uint16_t	index;
61900 	/* Size of data in data field. */
61901 	uint8_t	data_size;
61902 	/* Reserved */
61903 	uint8_t	unused0[7];
61904 	/* Table data. */
61905 	uint8_t	data[88];
61906 } __rte_packed_end;
61907 
61908 /* hwrm_tfc_if_tbl_set_output (size:128b/16B) */
61909 struct __rte_packed_begin hwrm_tfc_if_tbl_set_output {
61910 	/* The specific error status for the command. */
61911 	uint16_t	error_code;
61912 	/* The HWRM command request type. */
61913 	uint16_t	req_type;
61914 	/* The sequence ID from the original command. */
61915 	uint16_t	seq_id;
61916 	/* The length of the response data in number of bytes. */
61917 	uint16_t	resp_len;
61918 	/* Reserved */
61919 	uint8_t	unused0[7];
61920 	/*
61921 	 * This field is used in Output records to indicate that the output
61922 	 * is completely written to RAM. This field should be read as '1'
61923 	 * to indicate that the output has been completely written.
61924 	 * When writing a command completion or response to an internal
61925 	 * processor, the order of writes has to be such that this field
61926 	 * is written last.
61927 	 */
61928 	uint8_t	valid;
61929 } __rte_packed_end;
61930 
61931 /***********************
61932  * hwrm_tfc_if_tbl_get *
61933  ***********************/
61934 
61935 
61936 /* hwrm_tfc_if_tbl_get_input (size:256b/32B) */
61937 struct __rte_packed_begin hwrm_tfc_if_tbl_get_input {
61938 	/* The HWRM command request type. */
61939 	uint16_t	req_type;
61940 	/*
61941 	 * The completion ring to send the completion event on. This should
61942 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
61943 	 */
61944 	uint16_t	cmpl_ring;
61945 	/*
61946 	 * The sequence ID is used by the driver for tracking multiple
61947 	 * commands. This ID is treated as opaque data by the firmware and
61948 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
61949 	 */
61950 	uint16_t	seq_id;
61951 	/*
61952 	 * The target ID of the command:
61953 	 * * 0x0-0xFFF8 - The function ID
61954 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
61955 	 * * 0xFFFD - Reserved for user-space HWRM interface
61956 	 * * 0xFFFF - HWRM
61957 	 */
61958 	uint16_t	target_id;
61959 	/*
61960 	 * A physical address pointer pointing to a host buffer that the
61961 	 * command's response data will be written. This can be either a host
61962 	 * physical address (HPA) or a guest physical address (GPA) and must
61963 	 * point to a physically contiguous block of memory.
61964 	 */
61965 	uint64_t	resp_addr;
61966 	/* Session identifier. */
61967 	uint16_t	sid;
61968 	/* Function identifier. */
61969 	uint16_t	fid;
61970 	/*
61971 	 * Subtype identifying IF table type. See
61972 	 * cfa_v3/include/cfa_resources.h.
61973 	 */
61974 	uint8_t	subtype;
61975 	/* Control flags. */
61976 	uint8_t	flags;
61977 	/* Indicates the flow direction. */
61978 	#define HWRM_TFC_IF_TBL_GET_INPUT_FLAGS_DIR     UINT32_C(0x1)
61979 	/* If this bit set to 0, then it indicates rx flow. */
61980 	#define HWRM_TFC_IF_TBL_GET_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
61981 	/* If this bit is set to 1, then it indicates tx flow. */
61982 	#define HWRM_TFC_IF_TBL_GET_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
61983 	#define HWRM_TFC_IF_TBL_GET_INPUT_FLAGS_DIR_LAST \
61984 		HWRM_TFC_IF_TBL_GET_INPUT_FLAGS_DIR_TX
61985 	/* Table entry index. */
61986 	uint16_t	index;
61987 	/* Size of data in data field. */
61988 	uint8_t	data_size;
61989 	/* Reserved */
61990 	uint8_t	unused0[7];
61991 } __rte_packed_end;
61992 
61993 /* hwrm_tfc_if_tbl_get_output (size:960b/120B) */
61994 struct __rte_packed_begin hwrm_tfc_if_tbl_get_output {
61995 	/* The specific error status for the command. */
61996 	uint16_t	error_code;
61997 	/* The HWRM command request type. */
61998 	uint16_t	req_type;
61999 	/* The sequence ID from the original command. */
62000 	uint16_t	seq_id;
62001 	/* The length of the response data in number of bytes. */
62002 	uint16_t	resp_len;
62003 	/* Session identifier. */
62004 	uint16_t	sid;
62005 	/* Function identifier. */
62006 	uint16_t	fid;
62007 	/*
62008 	 * Subtype identifying IF table type. See
62009 	 * cfa_v3/include/cfa_resources.h.
62010 	 */
62011 	uint8_t	subtype;
62012 	/* Control flags. */
62013 	uint8_t	flags;
62014 	/* Indicates the flow direction. */
62015 	#define HWRM_TFC_IF_TBL_GET_OUTPUT_FLAGS_DIR     UINT32_C(0x1)
62016 	/* If this bit set to 0, then it indicates rx flow. */
62017 	#define HWRM_TFC_IF_TBL_GET_OUTPUT_FLAGS_DIR_RX    UINT32_C(0x0)
62018 	/* If this bit is set to 1, then it indicates tx flow. */
62019 	#define HWRM_TFC_IF_TBL_GET_OUTPUT_FLAGS_DIR_TX    UINT32_C(0x1)
62020 	#define HWRM_TFC_IF_TBL_GET_OUTPUT_FLAGS_DIR_LAST \
62021 		HWRM_TFC_IF_TBL_GET_OUTPUT_FLAGS_DIR_TX
62022 	/* Table entry index. */
62023 	uint16_t	index;
62024 	/* Size of data in data field. */
62025 	uint8_t	data_size;
62026 	/* Reserved */
62027 	uint8_t	unused0[7];
62028 	/* Table data. */
62029 	uint8_t	data[88];
62030 	/* Reserved */
62031 	uint8_t	unused1[7];
62032 	/*
62033 	 * This field is used in Output records to indicate that the output
62034 	 * is completely written to RAM. This field should be read as '1'
62035 	 * to indicate that the output has been completely written.
62036 	 * When writing a command completion or response to an internal
62037 	 * processor, the order of writes has to be such that this field
62038 	 * is written last.
62039 	 */
62040 	uint8_t	valid;
62041 } __rte_packed_end;
62042 
62043 /*********************************
62044  * hwrm_tfc_tbl_scope_config_get *
62045  *********************************/
62046 
62047 
62048 /* TruFlow command to return whether the table scope is fully configured. */
62049 /* hwrm_tfc_tbl_scope_config_get_input (size:192b/24B) */
62050 struct __rte_packed_begin hwrm_tfc_tbl_scope_config_get_input {
62051 	/* The HWRM command request type. */
62052 	uint16_t	req_type;
62053 	/*
62054 	 * The completion ring to send the completion event on. This should
62055 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62056 	 */
62057 	uint16_t	cmpl_ring;
62058 	/*
62059 	 * The sequence ID is used by the driver for tracking multiple
62060 	 * commands. This ID is treated as opaque data by the firmware and
62061 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62062 	 */
62063 	uint16_t	seq_id;
62064 	/*
62065 	 * The target ID of the command:
62066 	 * * 0x0-0xFFF8 - The function ID
62067 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62068 	 * * 0xFFFD - Reserved for user-space HWRM interface
62069 	 * * 0xFFFF - HWRM
62070 	 */
62071 	uint16_t	target_id;
62072 	/*
62073 	 * A physical address pointer pointing to a host buffer that the
62074 	 * command's response data will be written. This can be either a host
62075 	 * physical address (HPA) or a guest physical address (GPA) and must
62076 	 * point to a physically contiguous block of memory.
62077 	 */
62078 	uint64_t	resp_addr;
62079 	/* The table scope ID. */
62080 	uint8_t	tsid;
62081 	/* unused. */
62082 	uint8_t	unused0[7];
62083 } __rte_packed_end;
62084 
62085 /* hwrm_tfc_tbl_scope_config_get_output (size:128b/16B) */
62086 struct __rte_packed_begin hwrm_tfc_tbl_scope_config_get_output {
62087 	/* The specific error status for the command. */
62088 	uint16_t	error_code;
62089 	/* The HWRM command request type. */
62090 	uint16_t	req_type;
62091 	/* The sequence ID from the original command. */
62092 	uint16_t	seq_id;
62093 	/* The length of the response data in number of bytes. */
62094 	uint16_t	resp_len;
62095 	/* If set to 1, the table scope is configured. */
62096 	uint8_t	configured;
62097 	/* unused. */
62098 	uint8_t	unused0[6];
62099 	/*
62100 	 * This field is used in Output records to indicate that the output
62101 	 * is completely written to RAM. This field should be read as '1'
62102 	 * to indicate that the output has been completely written.
62103 	 * When writing a command completion or response to an internal
62104 	 * processor, the order of writes has to be such that this field
62105 	 * is written last.
62106 	 */
62107 	uint8_t	valid;
62108 } __rte_packed_end;
62109 
62110 /*****************************
62111  * hwrm_tfc_resc_usage_query *
62112  *****************************/
62113 
62114 
62115 /* hwrm_tfc_resc_usage_query_input (size:256b/32B) */
62116 struct __rte_packed_begin hwrm_tfc_resc_usage_query_input {
62117 	/* The HWRM command request type. */
62118 	uint16_t	req_type;
62119 	/*
62120 	 * The completion ring to send the completion event on. This should
62121 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62122 	 */
62123 	uint16_t	cmpl_ring;
62124 	/*
62125 	 * The sequence ID is used by the driver for tracking multiple
62126 	 * commands. This ID is treated as opaque data by the firmware and
62127 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62128 	 */
62129 	uint16_t	seq_id;
62130 	/*
62131 	 * The target ID of the command:
62132 	 * * 0x0-0xFFF8 - The function ID
62133 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62134 	 * * 0xFFFD - Reserved for user-space HWRM interface
62135 	 * * 0xFFFF - HWRM
62136 	 */
62137 	uint16_t	target_id;
62138 	/*
62139 	 * A physical address pointer pointing to a host buffer that the
62140 	 * command's response data will be written. This can be either a host
62141 	 * physical address (HPA) or a guest physical address (GPA) and must
62142 	 * point to a physically contiguous block of memory.
62143 	 */
62144 	uint64_t	resp_addr;
62145 	/* Session identifier. */
62146 	uint16_t	sid;
62147 	/* Function identifier. */
62148 	uint16_t	fid;
62149 	/* Control flags. */
62150 	uint8_t	flags;
62151 	/* Indicates the flow direction. */
62152 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_FLAGS_DIR     UINT32_C(0x1)
62153 	/* If this bit set to 0, then it indicates rx flow. */
62154 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_RX    UINT32_C(0x0)
62155 	/* If this bit is set to 1, then it indicates tx flow. */
62156 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX    UINT32_C(0x1)
62157 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_LAST \
62158 		HWRM_TFC_RESC_USAGE_QUERY_INPUT_FLAGS_DIR_TX
62159 	/* Describes the type of tracking id to be used */
62160 	uint8_t	track_type;
62161 	/* Invalid track type */
62162 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_TRACK_TYPE_TRACK_TYPE_INVALID \
62163 		UINT32_C(0x0)
62164 	/* Tracked by session id */
62165 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_TRACK_TYPE_TRACK_TYPE_SID \
62166 		UINT32_C(0x1)
62167 	/* Tracked by function id */
62168 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_TRACK_TYPE_TRACK_TYPE_FID \
62169 		UINT32_C(0x2)
62170 	#define HWRM_TFC_RESC_USAGE_QUERY_INPUT_TRACK_TYPE_LAST \
62171 		HWRM_TFC_RESC_USAGE_QUERY_INPUT_TRACK_TYPE_TRACK_TYPE_FID
62172 	/* Size of data in data field. */
62173 	uint16_t	data_size;
62174 	/* unused */
62175 	uint8_t	unused1[8];
62176 } __rte_packed_end;
62177 
62178 /* hwrm_tfc_resc_usage_query_output (size:960b/120B) */
62179 struct __rte_packed_begin hwrm_tfc_resc_usage_query_output {
62180 	/* The specific error status for the command. */
62181 	uint16_t	error_code;
62182 	/* The HWRM command request type. */
62183 	uint16_t	req_type;
62184 	/* The sequence ID from the original command. */
62185 	uint16_t	seq_id;
62186 	/* The length of the response data in number of bytes. */
62187 	uint16_t	resp_len;
62188 	/* Response code. */
62189 	uint32_t	resp_code;
62190 	/* Size of data in data field. */
62191 	uint16_t	data_size;
62192 	/* unused */
62193 	uint16_t	unused0;
62194 	/* Response data. */
62195 	uint8_t	data[96];
62196 	/* unused */
62197 	uint8_t	unused1[7];
62198 	/*
62199 	 * This field is used in Output records to indicate that the output
62200 	 * is completely written to RAM. This field should be read as '1'
62201 	 * to indicate that the output has been completely written.
62202 	 * When writing a command completion or response to an internal
62203 	 * processor, the order of writes has to be such that this field
62204 	 * is written last.
62205 	 */
62206 	uint8_t	valid;
62207 } __rte_packed_end;
62208 
62209 /******************************
62210  * hwrm_tunnel_dst_port_query *
62211  ******************************/
62212 
62213 
62214 /* hwrm_tunnel_dst_port_query_input (size:192b/24B) */
62215 struct __rte_packed_begin hwrm_tunnel_dst_port_query_input {
62216 	/* The HWRM command request type. */
62217 	uint16_t	req_type;
62218 	/*
62219 	 * The completion ring to send the completion event on. This should
62220 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62221 	 */
62222 	uint16_t	cmpl_ring;
62223 	/*
62224 	 * The sequence ID is used by the driver for tracking multiple
62225 	 * commands. This ID is treated as opaque data by the firmware and
62226 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62227 	 */
62228 	uint16_t	seq_id;
62229 	/*
62230 	 * The target ID of the command:
62231 	 * * 0x0-0xFFF8 - The function ID
62232 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62233 	 * * 0xFFFD - Reserved for user-space HWRM interface
62234 	 * * 0xFFFF - HWRM
62235 	 */
62236 	uint16_t	target_id;
62237 	/*
62238 	 * A physical address pointer pointing to a host buffer that the
62239 	 * command's response data will be written. This can be either a host
62240 	 * physical address (HPA) or a guest physical address (GPA) and must
62241 	 * point to a physically contiguous block of memory.
62242 	 */
62243 	uint64_t	resp_addr;
62244 	/* Tunnel Type. */
62245 	uint8_t	tunnel_type;
62246 	/* Virtual eXtensible Local Area Network (VXLAN) */
62247 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN \
62248 		UINT32_C(0x1)
62249 	/* Generic Network Virtualization Encapsulation (Geneve) */
62250 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_GENEVE \
62251 		UINT32_C(0x5)
62252 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
62253 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN_V4 \
62254 		UINT32_C(0x9)
62255 	/*
62256 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
62257 	 * datagram payload
62258 	 */
62259 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_IPGRE_V1 \
62260 		UINT32_C(0xa)
62261 	/* Use fixed layer 2 ether type of 0xFFFF */
62262 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_L2_ETYPE \
62263 		UINT32_C(0xb)
62264 	/*
62265 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
62266 	 * (IPV6oVXLANGPE)
62267 	 */
62268 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
62269 		UINT32_C(0xc)
62270 	/* Custom GRE uses UPAR to parse customized GRE packets */
62271 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_CUSTOM_GRE \
62272 		UINT32_C(0xd)
62273 	/* Enhanced Common Packet Radio Interface (eCPRI) */
62274 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ECPRI \
62275 		UINT32_C(0xe)
62276 	/* IPv6 Segment Routing (SRv6) */
62277 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_SRV6 \
62278 		UINT32_C(0xf)
62279 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
62280 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_VXLAN_GPE \
62281 		UINT32_C(0x10)
62282 	/* Generic Routing Encapsulation */
62283 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_GRE \
62284 		UINT32_C(0x11)
62285 	/* ULP Dynamic UPAR tunnel */
62286 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR \
62287 		UINT32_C(0x12)
62288 	/* ULP Dynamic UPAR tunnel reserved 1 */
62289 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES01 \
62290 		UINT32_C(0x13)
62291 	/* ULP Dynamic UPAR tunnel reserved 2 */
62292 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES02 \
62293 		UINT32_C(0x14)
62294 	/* ULP Dynamic UPAR tunnel reserved 3 */
62295 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES03 \
62296 		UINT32_C(0x15)
62297 	/* ULP Dynamic UPAR tunnel reserved 4 */
62298 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES04 \
62299 		UINT32_C(0x16)
62300 	/* ULP Dynamic UPAR tunnel reserved 5 */
62301 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES05 \
62302 		UINT32_C(0x17)
62303 	/* ULP Dynamic UPAR tunnel reserved 6 */
62304 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES06 \
62305 		UINT32_C(0x18)
62306 	/* ULP Dynamic UPAR tunnel reserved 7 */
62307 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07 \
62308 		UINT32_C(0x19)
62309 	#define HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_LAST \
62310 		HWRM_TUNNEL_DST_PORT_QUERY_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07
62311 	/*
62312 	 * This field is used to specify the next protocol value defined in the
62313 	 * corresponding RFC spec for the applicable tunnel type.
62314 	 */
62315 	uint8_t	tunnel_next_proto;
62316 	uint8_t	unused_0[6];
62317 } __rte_packed_end;
62318 
62319 /* hwrm_tunnel_dst_port_query_output (size:128b/16B) */
62320 struct __rte_packed_begin hwrm_tunnel_dst_port_query_output {
62321 	/* The specific error status for the command. */
62322 	uint16_t	error_code;
62323 	/* The HWRM command request type. */
62324 	uint16_t	req_type;
62325 	/* The sequence ID from the original command. */
62326 	uint16_t	seq_id;
62327 	/* The length of the response data in number of bytes. */
62328 	uint16_t	resp_len;
62329 	/*
62330 	 * This field represents the identifier of L4 destination port
62331 	 * used for the given tunnel type. This field is valid for
62332 	 * specific tunnel types that use layer 4 (e.g. UDP)
62333 	 * transports for tunneling.
62334 	 */
62335 	uint16_t	tunnel_dst_port_id;
62336 	/*
62337 	 * This field represents the value of L4 destination port
62338 	 * identified by tunnel_dst_port_id. This field is valid for
62339 	 * specific tunnel types that use layer 4 (e.g. UDP)
62340 	 * transports for tunneling.
62341 	 * This field is in network byte order.
62342 	 *
62343 	 * A value of 0 means that the destination port is not
62344 	 * configured.
62345 	 */
62346 	uint16_t	tunnel_dst_port_val;
62347 	/*
62348 	 * This field represents the UPAR usage status.
62349 	 * Available UPARs on wh+ are UPAR0 and UPAR1
62350 	 * Available UPARs on Thor are UPAR0 to UPAR3
62351 	 * Available UPARs on Thor2 are UPAR0 to UPAR7
62352 	 */
62353 	uint8_t	upar_in_use;
62354 	/* This bit will be '1' when UPAR0 is IN_USE */
62355 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR0 \
62356 		UINT32_C(0x1)
62357 	/* This bit will be '1' when UPAR1 is IN_USE */
62358 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR1 \
62359 		UINT32_C(0x2)
62360 	/* This bit will be '1' when UPAR2 is IN_USE */
62361 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR2 \
62362 		UINT32_C(0x4)
62363 	/* This bit will be '1' when UPAR3 is IN_USE */
62364 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR3 \
62365 		UINT32_C(0x8)
62366 	/* This bit will be '1' when UPAR4 is IN_USE */
62367 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR4 \
62368 		UINT32_C(0x10)
62369 	/* This bit will be '1' when UPAR5 is IN_USE */
62370 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR5 \
62371 		UINT32_C(0x20)
62372 	/* This bit will be '1' when UPAR6 is IN_USE */
62373 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR6 \
62374 		UINT32_C(0x40)
62375 	/* This bit will be '1' when UPAR7 is IN_USE */
62376 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_UPAR_IN_USE_UPAR7 \
62377 		UINT32_C(0x80)
62378 	/*
62379 	 * This field is used to convey the status of non udp port based
62380 	 * tunnel parsing at chip level and at function level.
62381 	 */
62382 	uint8_t	status;
62383 	/* This bit will be '1' when tunnel parsing is enabled globally. */
62384 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_STATUS_CHIP_LEVEL \
62385 		UINT32_C(0x1)
62386 	/*
62387 	 * This bit will be '1' when tunnel parsing is enabled
62388 	 * on the corresponding function.
62389 	 */
62390 	#define HWRM_TUNNEL_DST_PORT_QUERY_OUTPUT_STATUS_FUNC_LEVEL \
62391 		UINT32_C(0x2)
62392 	uint8_t	unused_0;
62393 	/*
62394 	 * This field is used in Output records to indicate that the output
62395 	 * is completely written to RAM. This field should be read as '1'
62396 	 * to indicate that the output has been completely written. When
62397 	 * writing a command completion or response to an internal processor,
62398 	 * the order of writes has to be such that this field is written last.
62399 	 */
62400 	uint8_t	valid;
62401 } __rte_packed_end;
62402 
62403 /******************************
62404  * hwrm_tunnel_dst_port_alloc *
62405  ******************************/
62406 
62407 
62408 /* hwrm_tunnel_dst_port_alloc_input (size:192b/24B) */
62409 struct __rte_packed_begin hwrm_tunnel_dst_port_alloc_input {
62410 	/* The HWRM command request type. */
62411 	uint16_t	req_type;
62412 	/*
62413 	 * The completion ring to send the completion event on. This should
62414 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62415 	 */
62416 	uint16_t	cmpl_ring;
62417 	/*
62418 	 * The sequence ID is used by the driver for tracking multiple
62419 	 * commands. This ID is treated as opaque data by the firmware and
62420 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62421 	 */
62422 	uint16_t	seq_id;
62423 	/*
62424 	 * The target ID of the command:
62425 	 * * 0x0-0xFFF8 - The function ID
62426 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62427 	 * * 0xFFFD - Reserved for user-space HWRM interface
62428 	 * * 0xFFFF - HWRM
62429 	 */
62430 	uint16_t	target_id;
62431 	/*
62432 	 * A physical address pointer pointing to a host buffer that the
62433 	 * command's response data will be written. This can be either a host
62434 	 * physical address (HPA) or a guest physical address (GPA) and must
62435 	 * point to a physically contiguous block of memory.
62436 	 */
62437 	uint64_t	resp_addr;
62438 	/* Tunnel Type. */
62439 	uint8_t	tunnel_type;
62440 	/* Virtual eXtensible Local Area Network (VXLAN) */
62441 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN \
62442 		UINT32_C(0x1)
62443 	/* Generic Network Virtualization Encapsulation (Geneve) */
62444 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE \
62445 		UINT32_C(0x5)
62446 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
62447 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_V4 \
62448 		UINT32_C(0x9)
62449 	/*
62450 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
62451 	 * datagram payload
62452 	 */
62453 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_IPGRE_V1 \
62454 		UINT32_C(0xa)
62455 	/* Use fixed layer 2 ether type of 0xFFFF */
62456 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_L2_ETYPE \
62457 		UINT32_C(0xb)
62458 	/*
62459 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
62460 	 * (IPV6oVXLANGPE)
62461 	 */
62462 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
62463 		UINT32_C(0xc)
62464 	/*
62465 	 * Custom GRE uses UPAR to parse customized GRE packets. This is not
62466 	 * supported.
62467 	 */
62468 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_CUSTOM_GRE \
62469 		UINT32_C(0xd)
62470 	/* Enhanced Common Packet Radio Interface (eCPRI) */
62471 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ECPRI \
62472 		UINT32_C(0xe)
62473 	/* IPv6 Segment Routing (SRv6) */
62474 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_SRV6 \
62475 		UINT32_C(0xf)
62476 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
62477 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN_GPE \
62478 		UINT32_C(0x10)
62479 	/* Generic Routing Encapsulation */
62480 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GRE \
62481 		UINT32_C(0x11)
62482 	/* ULP Dynamic UPAR tunnel */
62483 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR \
62484 		UINT32_C(0x12)
62485 	/* ULP Dynamic UPAR tunnel reserved 1 */
62486 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES01 \
62487 		UINT32_C(0x13)
62488 	/* ULP Dynamic UPAR tunnel reserved 2 */
62489 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES02 \
62490 		UINT32_C(0x14)
62491 	/* ULP Dynamic UPAR tunnel reserved 3 */
62492 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES03 \
62493 		UINT32_C(0x15)
62494 	/* ULP Dynamic UPAR tunnel reserved 4 */
62495 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES04 \
62496 		UINT32_C(0x16)
62497 	/* ULP Dynamic UPAR tunnel reserved 5 */
62498 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES05 \
62499 		UINT32_C(0x17)
62500 	/* ULP Dynamic UPAR tunnel reserved 6 */
62501 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES06 \
62502 		UINT32_C(0x18)
62503 	/* ULP Dynamic UPAR tunnel reserved 7 */
62504 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07 \
62505 		UINT32_C(0x19)
62506 	#define HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_LAST \
62507 		HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07
62508 	/*
62509 	 * This field is used to specify the next protocol value defined in the
62510 	 * corresponding RFC spec for the applicable tunnel type.
62511 	 */
62512 	uint8_t	tunnel_next_proto;
62513 	/*
62514 	 * This field represents the value of L4 destination port used
62515 	 * for the given tunnel type. This field is valid for
62516 	 * specific tunnel types that use layer 4 (e.g. UDP)
62517 	 * transports for tunneling.
62518 	 *
62519 	 * This field is in network byte order.
62520 	 *
62521 	 * A value of 0 shall fail the command.
62522 	 */
62523 	uint16_t	tunnel_dst_port_val;
62524 	uint8_t	unused_0[4];
62525 } __rte_packed_end;
62526 
62527 /* hwrm_tunnel_dst_port_alloc_output (size:128b/16B) */
62528 struct __rte_packed_begin hwrm_tunnel_dst_port_alloc_output {
62529 	/* The specific error status for the command. */
62530 	uint16_t	error_code;
62531 	/* The HWRM command request type. */
62532 	uint16_t	req_type;
62533 	/* The sequence ID from the original command. */
62534 	uint16_t	seq_id;
62535 	/* The length of the response data in number of bytes. */
62536 	uint16_t	resp_len;
62537 	/*
62538 	 * Identifier of a tunnel L4 destination port value. Only applies to
62539 	 * tunnel types that has l4 destination port parameters.
62540 	 */
62541 	uint16_t	tunnel_dst_port_id;
62542 	/* Error information */
62543 	uint8_t	error_info;
62544 	/* No error */
62545 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_SUCCESS \
62546 		UINT32_C(0x0)
62547 	/* Tunnel port is already allocated */
62548 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_ERR_ALLOCATED \
62549 		UINT32_C(0x1)
62550 	/* Out of resources error */
62551 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_ERR_NO_RESOURCE \
62552 		UINT32_C(0x2)
62553 	/* Tunnel type is already enabled */
62554 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_ERR_ENABLED \
62555 		UINT32_C(0x3)
62556 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_LAST \
62557 		HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_ERROR_INFO_ERR_ENABLED
62558 	/*
62559 	 * This field represents the UPAR usage status.
62560 	 * Available UPARs on wh+ are UPAR0 and UPAR1
62561 	 * Available UPARs on Thor are UPAR0 to UPAR3
62562 	 * Available UPARs on Thor2 are UPAR0 to UPAR7
62563 	 */
62564 	uint8_t	upar_in_use;
62565 	/* This bit will be '1' when UPAR0 is IN_USE */
62566 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR0 \
62567 		UINT32_C(0x1)
62568 	/* This bit will be '1' when UPAR1 is IN_USE */
62569 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR1 \
62570 		UINT32_C(0x2)
62571 	/* This bit will be '1' when UPAR2 is IN_USE */
62572 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR2 \
62573 		UINT32_C(0x4)
62574 	/* This bit will be '1' when UPAR3 is IN_USE */
62575 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR3 \
62576 		UINT32_C(0x8)
62577 	/* This bit will be '1' when UPAR4 is IN_USE */
62578 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR4 \
62579 		UINT32_C(0x10)
62580 	/* This bit will be '1' when UPAR5 is IN_USE */
62581 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR5 \
62582 		UINT32_C(0x20)
62583 	/* This bit will be '1' when UPAR6 is IN_USE */
62584 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR6 \
62585 		UINT32_C(0x40)
62586 	/* This bit will be '1' when UPAR7 is IN_USE */
62587 	#define HWRM_TUNNEL_DST_PORT_ALLOC_OUTPUT_UPAR_IN_USE_UPAR7 \
62588 		UINT32_C(0x80)
62589 	uint8_t	unused_0[3];
62590 	/*
62591 	 * This field is used in Output records to indicate that the output
62592 	 * is completely written to RAM. This field should be read as '1'
62593 	 * to indicate that the output has been completely written. When
62594 	 * writing a command completion or response to an internal processor,
62595 	 * the order of writes has to be such that this field is written last.
62596 	 */
62597 	uint8_t	valid;
62598 } __rte_packed_end;
62599 
62600 /*****************************
62601  * hwrm_tunnel_dst_port_free *
62602  *****************************/
62603 
62604 
62605 /* hwrm_tunnel_dst_port_free_input (size:192b/24B) */
62606 struct __rte_packed_begin hwrm_tunnel_dst_port_free_input {
62607 	/* The HWRM command request type. */
62608 	uint16_t	req_type;
62609 	/*
62610 	 * The completion ring to send the completion event on. This should
62611 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62612 	 */
62613 	uint16_t	cmpl_ring;
62614 	/*
62615 	 * The sequence ID is used by the driver for tracking multiple
62616 	 * commands. This ID is treated as opaque data by the firmware and
62617 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62618 	 */
62619 	uint16_t	seq_id;
62620 	/*
62621 	 * The target ID of the command:
62622 	 * * 0x0-0xFFF8 - The function ID
62623 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62624 	 * * 0xFFFD - Reserved for user-space HWRM interface
62625 	 * * 0xFFFF - HWRM
62626 	 */
62627 	uint16_t	target_id;
62628 	/*
62629 	 * A physical address pointer pointing to a host buffer that the
62630 	 * command's response data will be written. This can be either a host
62631 	 * physical address (HPA) or a guest physical address (GPA) and must
62632 	 * point to a physically contiguous block of memory.
62633 	 */
62634 	uint64_t	resp_addr;
62635 	/* Tunnel Type. */
62636 	uint8_t	tunnel_type;
62637 	/* Virtual eXtensible Local Area Network (VXLAN) */
62638 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN \
62639 		UINT32_C(0x1)
62640 	/* Generic Network Virtualization Encapsulation (Geneve) */
62641 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GENEVE \
62642 		UINT32_C(0x5)
62643 	/* IPV4 over virtual eXtensible Local Area Network (IPV4oVXLAN) */
62644 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN_V4 \
62645 		UINT32_C(0x9)
62646 	/*
62647 	 * Enhance Generic Routing Encapsulation (GRE version 1) inside IP
62648 	 * datagram payload
62649 	 */
62650 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_IPGRE_V1 \
62651 		UINT32_C(0xa)
62652 	/* Use fixed layer 2 ether type of 0xFFFF */
62653 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_L2_ETYPE \
62654 		UINT32_C(0xb)
62655 	/*
62656 	 * IPV6 over virtual eXtensible Local Area Network with GPE header
62657 	 * (IPV6oVXLANGPE)
62658 	 */
62659 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN_GPE_V6 \
62660 		UINT32_C(0xc)
62661 	/*
62662 	 * Custom GRE uses UPAR to parse customized GRE packets. This is not
62663 	 * supported.
62664 	 */
62665 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_CUSTOM_GRE \
62666 		UINT32_C(0xd)
62667 	/* Enhanced Common Packet Radio Interface (eCPRI) */
62668 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ECPRI \
62669 		UINT32_C(0xe)
62670 	/* IPv6 Segment Routing (SRv6) */
62671 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_SRV6 \
62672 		UINT32_C(0xf)
62673 	/* Generic Protocol Extension for VXLAN (VXLAN-GPE) */
62674 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_VXLAN_GPE \
62675 		UINT32_C(0x10)
62676 	/* Generic Routing Encapsulation */
62677 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_GRE \
62678 		UINT32_C(0x11)
62679 	/* ULP Dynamic UPAR tunnel */
62680 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR \
62681 		UINT32_C(0x12)
62682 	/* ULP Dynamic UPAR tunnel reserved 1 */
62683 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES01 \
62684 		UINT32_C(0x13)
62685 	/* ULP Dynamic UPAR tunnel reserved 2 */
62686 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES02 \
62687 		UINT32_C(0x14)
62688 	/* ULP Dynamic UPAR tunnel reserved 3 */
62689 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES03 \
62690 		UINT32_C(0x15)
62691 	/* ULP Dynamic UPAR tunnel reserved 4 */
62692 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES04 \
62693 		UINT32_C(0x16)
62694 	/* ULP Dynamic UPAR tunnel reserved 5 */
62695 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES05 \
62696 		UINT32_C(0x17)
62697 	/* ULP Dynamic UPAR tunnel reserved 6 */
62698 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES06 \
62699 		UINT32_C(0x18)
62700 	/* ULP Dynamic UPAR tunnel reserved 7 */
62701 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07 \
62702 		UINT32_C(0x19)
62703 	#define HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_LAST \
62704 		HWRM_TUNNEL_DST_PORT_FREE_INPUT_TUNNEL_TYPE_ULP_DYN_UPAR_RES07
62705 	/*
62706 	 * This field is used to specify the next protocol value defined in the
62707 	 * corresponding RFC spec for the applicable tunnel type.
62708 	 */
62709 	uint8_t	tunnel_next_proto;
62710 	/*
62711 	 * Identifier of a tunnel L4 destination port value. Only applies to
62712 	 * tunnel types that has l4 destination port parameters.
62713 	 */
62714 	uint16_t	tunnel_dst_port_id;
62715 	uint8_t	unused_0[4];
62716 } __rte_packed_end;
62717 
62718 /* hwrm_tunnel_dst_port_free_output (size:128b/16B) */
62719 struct __rte_packed_begin hwrm_tunnel_dst_port_free_output {
62720 	/* The specific error status for the command. */
62721 	uint16_t	error_code;
62722 	/* The HWRM command request type. */
62723 	uint16_t	req_type;
62724 	/* The sequence ID from the original command. */
62725 	uint16_t	seq_id;
62726 	/* The length of the response data in number of bytes. */
62727 	uint16_t	resp_len;
62728 	/* Error information */
62729 	uint8_t	error_info;
62730 	/* No error */
62731 	#define HWRM_TUNNEL_DST_PORT_FREE_OUTPUT_ERROR_INFO_SUCCESS \
62732 		UINT32_C(0x0)
62733 	/* Not owner error */
62734 	#define HWRM_TUNNEL_DST_PORT_FREE_OUTPUT_ERROR_INFO_ERR_NOT_OWNER \
62735 		UINT32_C(0x1)
62736 	/* Not allocated error */
62737 	#define HWRM_TUNNEL_DST_PORT_FREE_OUTPUT_ERROR_INFO_ERR_NOT_ALLOCATED \
62738 		UINT32_C(0x2)
62739 	#define HWRM_TUNNEL_DST_PORT_FREE_OUTPUT_ERROR_INFO_LAST \
62740 		HWRM_TUNNEL_DST_PORT_FREE_OUTPUT_ERROR_INFO_ERR_NOT_ALLOCATED
62741 	uint8_t	unused_1[6];
62742 	/*
62743 	 * This field is used in Output records to indicate that the output
62744 	 * is completely written to RAM. This field should be read as '1'
62745 	 * to indicate that the output has been completely written. When
62746 	 * writing a command completion or response to an internal processor,
62747 	 * the order of writes has to be such that this field is written last.
62748 	 */
62749 	uint8_t	valid;
62750 } __rte_packed_end;
62751 
62752 /* Periodic statistics context DMA to host. */
62753 /* ctx_hw_stats (size:1280b/160B) */
62754 struct __rte_packed_begin ctx_hw_stats {
62755 	/* Number of received unicast packets */
62756 	uint64_t	rx_ucast_pkts;
62757 	/* Number of received multicast packets */
62758 	uint64_t	rx_mcast_pkts;
62759 	/* Number of received broadcast packets */
62760 	uint64_t	rx_bcast_pkts;
62761 	/* Number of discarded packets on receive path */
62762 	uint64_t	rx_discard_pkts;
62763 	/* Number of packets on receive path with error */
62764 	uint64_t	rx_error_pkts;
62765 	/* Number of received bytes for unicast traffic */
62766 	uint64_t	rx_ucast_bytes;
62767 	/* Number of received bytes for multicast traffic */
62768 	uint64_t	rx_mcast_bytes;
62769 	/* Number of received bytes for broadcast traffic */
62770 	uint64_t	rx_bcast_bytes;
62771 	/* Number of transmitted unicast packets */
62772 	uint64_t	tx_ucast_pkts;
62773 	/* Number of transmitted multicast packets */
62774 	uint64_t	tx_mcast_pkts;
62775 	/* Number of transmitted broadcast packets */
62776 	uint64_t	tx_bcast_pkts;
62777 	/* Number of packets on transmit path with error */
62778 	uint64_t	tx_error_pkts;
62779 	/* Number of discarded packets on transmit path */
62780 	uint64_t	tx_discard_pkts;
62781 	/* Number of transmitted bytes for unicast traffic */
62782 	uint64_t	tx_ucast_bytes;
62783 	/* Number of transmitted bytes for multicast traffic */
62784 	uint64_t	tx_mcast_bytes;
62785 	/* Number of transmitted bytes for broadcast traffic */
62786 	uint64_t	tx_bcast_bytes;
62787 	/* Number of TPA packets */
62788 	uint64_t	tpa_pkts;
62789 	/* Number of TPA bytes */
62790 	uint64_t	tpa_bytes;
62791 	/* Number of TPA events */
62792 	uint64_t	tpa_events;
62793 	/* Number of TPA aborts */
62794 	uint64_t	tpa_aborts;
62795 } __rte_packed_end;
62796 
62797 /*
62798  * Extended periodic statistics context DMA to host. On cards that
62799  * support TPA v2, additional TPA related stats exist and can be retrieved
62800  * by DMA of ctx_hw_stats_ext, rather than legacy ctx_hw_stats structure.
62801  */
62802 /* ctx_hw_stats_ext (size:1408b/176B) */
62803 struct __rte_packed_begin ctx_hw_stats_ext {
62804 	/* Number of received unicast packets */
62805 	uint64_t	rx_ucast_pkts;
62806 	/* Number of received multicast packets */
62807 	uint64_t	rx_mcast_pkts;
62808 	/* Number of received broadcast packets */
62809 	uint64_t	rx_bcast_pkts;
62810 	/* Number of discarded packets on receive path */
62811 	uint64_t	rx_discard_pkts;
62812 	/* Number of packets on receive path with error */
62813 	uint64_t	rx_error_pkts;
62814 	/* Number of received bytes for unicast traffic */
62815 	uint64_t	rx_ucast_bytes;
62816 	/* Number of received bytes for multicast traffic */
62817 	uint64_t	rx_mcast_bytes;
62818 	/* Number of received bytes for broadcast traffic */
62819 	uint64_t	rx_bcast_bytes;
62820 	/* Number of transmitted unicast packets */
62821 	uint64_t	tx_ucast_pkts;
62822 	/* Number of transmitted multicast packets */
62823 	uint64_t	tx_mcast_pkts;
62824 	/* Number of transmitted broadcast packets */
62825 	uint64_t	tx_bcast_pkts;
62826 	/* Number of packets on transmit path with error */
62827 	uint64_t	tx_error_pkts;
62828 	/* Number of discarded packets on transmit path */
62829 	uint64_t	tx_discard_pkts;
62830 	/* Number of transmitted bytes for unicast traffic */
62831 	uint64_t	tx_ucast_bytes;
62832 	/* Number of transmitted bytes for multicast traffic */
62833 	uint64_t	tx_mcast_bytes;
62834 	/* Number of transmitted bytes for broadcast traffic */
62835 	uint64_t	tx_bcast_bytes;
62836 	/* Number of TPA eligible packets */
62837 	uint64_t	rx_tpa_eligible_pkt;
62838 	/* Number of TPA eligible bytes */
62839 	uint64_t	rx_tpa_eligible_bytes;
62840 	/* Number of TPA packets */
62841 	uint64_t	rx_tpa_pkt;
62842 	/* Number of TPA bytes */
62843 	uint64_t	rx_tpa_bytes;
62844 	/* Number of TPA errors */
62845 	uint64_t	rx_tpa_errors;
62846 	/* Number of TPA events */
62847 	uint64_t	rx_tpa_events;
62848 } __rte_packed_end;
62849 
62850 /* Periodic Engine statistics context DMA to host. */
62851 /* ctx_eng_stats (size:512b/64B) */
62852 struct __rte_packed_begin ctx_eng_stats {
62853 	/*
62854 	 * Count of data bytes into the Engine.
62855 	 * This includes any user supplied prefix,
62856 	 * but does not include any predefined
62857 	 * prefix data.
62858 	 */
62859 	uint64_t	eng_bytes_in;
62860 	/* Count of data bytes out of the Engine. */
62861 	uint64_t	eng_bytes_out;
62862 	/*
62863 	 * Count, in 4-byte (dword) units, of bytes
62864 	 * that are input as auxiliary data.
62865 	 * This includes the aux_cmd data.
62866 	 */
62867 	uint64_t	aux_bytes_in;
62868 	/*
62869 	 * Count, in 4-byte (dword) units, of bytes
62870 	 * that are output as auxiliary data.
62871 	 * This count is the buffer space for aux_data
62872 	 * output provided in the RQE, not the actual
62873 	 * aux_data written
62874 	 */
62875 	uint64_t	aux_bytes_out;
62876 	/* Count of number of commands executed. */
62877 	uint64_t	commands;
62878 	/*
62879 	 * Count of number of error commands.
62880 	 * These are the commands with a
62881 	 * non-zero status value.
62882 	 */
62883 	uint64_t	error_commands;
62884 	/*
62885 	 * Compression/Encryption Engine usage,
62886 	 * the unit is count of clock cycles
62887 	 */
62888 	uint64_t	cce_engine_usage;
62889 	/*
62890 	 * De-Compression/De-cryption Engine usage,
62891 	 * the unit is count of clock cycles
62892 	 */
62893 	uint64_t	cdd_engine_usage;
62894 } __rte_packed_end;
62895 
62896 /***********************
62897  * hwrm_stat_ctx_alloc *
62898  ***********************/
62899 
62900 
62901 /* hwrm_stat_ctx_alloc_input (size:320b/40B) */
62902 struct __rte_packed_begin hwrm_stat_ctx_alloc_input {
62903 	/* The HWRM command request type. */
62904 	uint16_t	req_type;
62905 	/*
62906 	 * The completion ring to send the completion event on. This should
62907 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
62908 	 */
62909 	uint16_t	cmpl_ring;
62910 	/*
62911 	 * The sequence ID is used by the driver for tracking multiple
62912 	 * commands. This ID is treated as opaque data by the firmware and
62913 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
62914 	 */
62915 	uint16_t	seq_id;
62916 	/*
62917 	 * The target ID of the command:
62918 	 * * 0x0-0xFFF8 - The function ID
62919 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
62920 	 * * 0xFFFD - Reserved for user-space HWRM interface
62921 	 * * 0xFFFF - HWRM
62922 	 */
62923 	uint16_t	target_id;
62924 	/*
62925 	 * A physical address pointer pointing to a host buffer that the
62926 	 * command's response data will be written. This can be either a host
62927 	 * physical address (HPA) or a guest physical address (GPA) and must
62928 	 * point to a physically contiguous block of memory.
62929 	 */
62930 	uint64_t	resp_addr;
62931 	/*
62932 	 * This is the address for statistic block.
62933 	 * > For new versions of the chip, this address should be 128B
62934 	 * > aligned.
62935 	 */
62936 	uint64_t	stats_dma_addr;
62937 	/*
62938 	 * The statistic block update period in ms.
62939 	 * e.g. 250ms, 500ms, 750ms, 1000ms.
62940 	 * If update_period_ms is 0, then the stats update
62941 	 * shall be never done and the DMA address shall not be used.
62942 	 * In this case, the stat block can only be read by
62943 	 * hwrm_stat_ctx_query command.
62944 	 * On Ethernet/L2 based devices:
62945 	 *   if tpa v2 supported (hwrm_vnic_qcaps[max_aggs_supported]>0),
62946 	 *       ctx_hw_stats_ext is used for DMA,
62947 	 *   else
62948 	 *       ctx_hw_stats is used for DMA.
62949 	 */
62950 	uint32_t	update_period_ms;
62951 	/*
62952 	 * This field is used to specify statistics context specific
62953 	 * configuration flags.
62954 	 */
62955 	uint8_t	stat_ctx_flags;
62956 	/*
62957 	 * When this bit is set to '1', the statistics context shall be
62958 	 * allocated for RoCE traffic only. In this case, traffic other
62959 	 * than offloaded RoCE traffic shall not be included in this
62960 	 * statistic context.
62961 	 * When this bit is set to '0', the statistics context shall be
62962 	 * used for network traffic or engine traffic.
62963 	 */
62964 	#define HWRM_STAT_CTX_ALLOC_INPUT_STAT_CTX_FLAGS_ROCE     UINT32_C(0x1)
62965 	uint8_t	unused_0;
62966 	/*
62967 	 * This is the size of the structure (ctx_hw_stats or
62968 	 * ctx_hw_stats_ext) that the driver has allocated to be used
62969 	 * for the periodic DMA updates.
62970 	 */
62971 	uint16_t	stats_dma_length;
62972 	uint16_t	flags;
62973 	/* This stats context uses the steering tag specified in the command. */
62974 	#define HWRM_STAT_CTX_ALLOC_INPUT_FLAGS_STEERING_TAG_VALID \
62975 		UINT32_C(0x1)
62976 	/*
62977 	 * Steering tag to use for memory transactions from the periodic DMA
62978 	 * updates. 'steering_tag_valid' should be set and 'steering_tag'
62979 	 * should be specified, when the 'steering_tag_supported' bit is set
62980 	 * under the 'flags_ext2' field of the hwrm_func_qcaps_output.
62981 	 */
62982 	uint16_t	steering_tag;
62983 	uint32_t	unused_1;
62984 } __rte_packed_end;
62985 
62986 /* hwrm_stat_ctx_alloc_output (size:128b/16B) */
62987 struct __rte_packed_begin hwrm_stat_ctx_alloc_output {
62988 	/* The specific error status for the command. */
62989 	uint16_t	error_code;
62990 	/* The HWRM command request type. */
62991 	uint16_t	req_type;
62992 	/* The sequence ID from the original command. */
62993 	uint16_t	seq_id;
62994 	/* The length of the response data in number of bytes. */
62995 	uint16_t	resp_len;
62996 	/* This is the statistics context ID value. */
62997 	uint32_t	stat_ctx_id;
62998 	uint8_t	unused_0[3];
62999 	/*
63000 	 * This field is used in Output records to indicate that the output
63001 	 * is completely written to RAM. This field should be read as '1'
63002 	 * to indicate that the output has been completely written. When
63003 	 * writing a command completion or response to an internal processor,
63004 	 * the order of writes has to be such that this field is written last.
63005 	 */
63006 	uint8_t	valid;
63007 } __rte_packed_end;
63008 
63009 /**********************
63010  * hwrm_stat_ctx_free *
63011  **********************/
63012 
63013 
63014 /* hwrm_stat_ctx_free_input (size:192b/24B) */
63015 struct __rte_packed_begin hwrm_stat_ctx_free_input {
63016 	/* The HWRM command request type. */
63017 	uint16_t	req_type;
63018 	/*
63019 	 * The completion ring to send the completion event on. This should
63020 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63021 	 */
63022 	uint16_t	cmpl_ring;
63023 	/*
63024 	 * The sequence ID is used by the driver for tracking multiple
63025 	 * commands. This ID is treated as opaque data by the firmware and
63026 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63027 	 */
63028 	uint16_t	seq_id;
63029 	/*
63030 	 * The target ID of the command:
63031 	 * * 0x0-0xFFF8 - The function ID
63032 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63033 	 * * 0xFFFD - Reserved for user-space HWRM interface
63034 	 * * 0xFFFF - HWRM
63035 	 */
63036 	uint16_t	target_id;
63037 	/*
63038 	 * A physical address pointer pointing to a host buffer that the
63039 	 * command's response data will be written. This can be either a host
63040 	 * physical address (HPA) or a guest physical address (GPA) and must
63041 	 * point to a physically contiguous block of memory.
63042 	 */
63043 	uint64_t	resp_addr;
63044 	/* ID of the statistics context that is being queried. */
63045 	uint32_t	stat_ctx_id;
63046 	uint8_t	unused_0[4];
63047 } __rte_packed_end;
63048 
63049 /* hwrm_stat_ctx_free_output (size:128b/16B) */
63050 struct __rte_packed_begin hwrm_stat_ctx_free_output {
63051 	/* The specific error status for the command. */
63052 	uint16_t	error_code;
63053 	/* The HWRM command request type. */
63054 	uint16_t	req_type;
63055 	/* The sequence ID from the original command. */
63056 	uint16_t	seq_id;
63057 	/* The length of the response data in number of bytes. */
63058 	uint16_t	resp_len;
63059 	/* This is the statistics context ID value. */
63060 	uint32_t	stat_ctx_id;
63061 	uint8_t	unused_0[3];
63062 	/*
63063 	 * This field is used in Output records to indicate that the output
63064 	 * is completely written to RAM. This field should be read as '1'
63065 	 * to indicate that the output has been completely written. When
63066 	 * writing a command completion or response to an internal processor,
63067 	 * the order of writes has to be such that this field is written last.
63068 	 */
63069 	uint8_t	valid;
63070 } __rte_packed_end;
63071 
63072 /***********************
63073  * hwrm_stat_ctx_query *
63074  ***********************/
63075 
63076 
63077 /* hwrm_stat_ctx_query_input (size:192b/24B) */
63078 struct __rte_packed_begin hwrm_stat_ctx_query_input {
63079 	/* The HWRM command request type. */
63080 	uint16_t	req_type;
63081 	/*
63082 	 * The completion ring to send the completion event on. This should
63083 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63084 	 */
63085 	uint16_t	cmpl_ring;
63086 	/*
63087 	 * The sequence ID is used by the driver for tracking multiple
63088 	 * commands. This ID is treated as opaque data by the firmware and
63089 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63090 	 */
63091 	uint16_t	seq_id;
63092 	/*
63093 	 * The target ID of the command:
63094 	 * * 0x0-0xFFF8 - The function ID
63095 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63096 	 * * 0xFFFD - Reserved for user-space HWRM interface
63097 	 * * 0xFFFF - HWRM
63098 	 */
63099 	uint16_t	target_id;
63100 	/*
63101 	 * A physical address pointer pointing to a host buffer that the
63102 	 * command's response data will be written. This can be either a host
63103 	 * physical address (HPA) or a guest physical address (GPA) and must
63104 	 * point to a physically contiguous block of memory.
63105 	 */
63106 	uint64_t	resp_addr;
63107 	/* ID of the statistics context that is being queried. */
63108 	uint32_t	stat_ctx_id;
63109 	uint8_t	flags;
63110 	/*
63111 	 * This bit is set to 1 when request is for a counter mask,
63112 	 * representing the width of each of the stats counters, rather
63113 	 * than counters themselves.
63114 	 */
63115 	#define HWRM_STAT_CTX_QUERY_INPUT_FLAGS_COUNTER_MASK     UINT32_C(0x1)
63116 	uint8_t	unused_0[3];
63117 } __rte_packed_end;
63118 
63119 /* hwrm_stat_ctx_query_output (size:1408b/176B) */
63120 struct __rte_packed_begin hwrm_stat_ctx_query_output {
63121 	/* The specific error status for the command. */
63122 	uint16_t	error_code;
63123 	/* The HWRM command request type. */
63124 	uint16_t	req_type;
63125 	/* The sequence ID from the original command. */
63126 	uint16_t	seq_id;
63127 	/* The length of the response data in number of bytes. */
63128 	uint16_t	resp_len;
63129 	/* Number of transmitted unicast packets */
63130 	uint64_t	tx_ucast_pkts;
63131 	/* Number of transmitted multicast packets */
63132 	uint64_t	tx_mcast_pkts;
63133 	/* Number of transmitted broadcast packets */
63134 	uint64_t	tx_bcast_pkts;
63135 	/* Number of packets discarded in transmit path */
63136 	uint64_t	tx_discard_pkts;
63137 	/* Number of packets in transmit path with error */
63138 	uint64_t	tx_error_pkts;
63139 	/* Number of transmitted bytes for unicast traffic */
63140 	uint64_t	tx_ucast_bytes;
63141 	/* Number of transmitted bytes for multicast traffic */
63142 	uint64_t	tx_mcast_bytes;
63143 	/* Number of transmitted bytes for broadcast traffic */
63144 	uint64_t	tx_bcast_bytes;
63145 	/* Number of received unicast packets */
63146 	uint64_t	rx_ucast_pkts;
63147 	/* Number of received multicast packets */
63148 	uint64_t	rx_mcast_pkts;
63149 	/* Number of received broadcast packets */
63150 	uint64_t	rx_bcast_pkts;
63151 	/* Number of packets discarded in receive path */
63152 	uint64_t	rx_discard_pkts;
63153 	/* Number of packets in receive path with errors */
63154 	uint64_t	rx_error_pkts;
63155 	/* Number of received bytes for unicast traffic */
63156 	uint64_t	rx_ucast_bytes;
63157 	/* Number of received bytes for multicast traffic */
63158 	uint64_t	rx_mcast_bytes;
63159 	/* Number of received bytes for broadcast traffic */
63160 	uint64_t	rx_bcast_bytes;
63161 	/* Number of aggregated unicast packets */
63162 	uint64_t	rx_agg_pkts;
63163 	/* Number of aggregated unicast bytes */
63164 	uint64_t	rx_agg_bytes;
63165 	/* Number of aggregation events */
63166 	uint64_t	rx_agg_events;
63167 	/* Number of aborted aggregations */
63168 	uint64_t	rx_agg_aborts;
63169 	uint8_t	unused_0[7];
63170 	/*
63171 	 * This field is used in Output records to indicate that the output
63172 	 * is completely written to RAM. This field should be read as '1'
63173 	 * to indicate that the output has been completely written. When
63174 	 * writing a command completion or response to an internal processor,
63175 	 * the order of writes has to be such that this field is written last.
63176 	 */
63177 	uint8_t	valid;
63178 } __rte_packed_end;
63179 
63180 /***************************
63181  * hwrm_stat_ext_ctx_query *
63182  ***************************/
63183 
63184 
63185 /* hwrm_stat_ext_ctx_query_input (size:192b/24B) */
63186 struct __rte_packed_begin hwrm_stat_ext_ctx_query_input {
63187 	/* The HWRM command request type. */
63188 	uint16_t	req_type;
63189 	/*
63190 	 * The completion ring to send the completion event on. This should
63191 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63192 	 */
63193 	uint16_t	cmpl_ring;
63194 	/*
63195 	 * The sequence ID is used by the driver for tracking multiple
63196 	 * commands. This ID is treated as opaque data by the firmware and
63197 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63198 	 */
63199 	uint16_t	seq_id;
63200 	/*
63201 	 * The target ID of the command:
63202 	 * * 0x0-0xFFF8 - The function ID
63203 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63204 	 * * 0xFFFD - Reserved for user-space HWRM interface
63205 	 * * 0xFFFF - HWRM
63206 	 */
63207 	uint16_t	target_id;
63208 	/*
63209 	 * A physical address pointer pointing to a host buffer that the
63210 	 * command's response data will be written. This can be either a host
63211 	 * physical address (HPA) or a guest physical address (GPA) and must
63212 	 * point to a physically contiguous block of memory.
63213 	 */
63214 	uint64_t	resp_addr;
63215 	/* ID of the extended statistics context that is being queried. */
63216 	uint32_t	stat_ctx_id;
63217 	uint8_t	flags;
63218 	/*
63219 	 * This bit is set to 1 when request is for a counter mask,
63220 	 * representing the width of each of the stats counters, rather
63221 	 * than counters themselves.
63222 	 */
63223 	#define HWRM_STAT_EXT_CTX_QUERY_INPUT_FLAGS_COUNTER_MASK \
63224 		UINT32_C(0x1)
63225 	uint8_t	unused_0[3];
63226 } __rte_packed_end;
63227 
63228 /* hwrm_stat_ext_ctx_query_output (size:1536b/192B) */
63229 struct __rte_packed_begin hwrm_stat_ext_ctx_query_output {
63230 	/* The specific error status for the command. */
63231 	uint16_t	error_code;
63232 	/* The HWRM command request type. */
63233 	uint16_t	req_type;
63234 	/* The sequence ID from the original command. */
63235 	uint16_t	seq_id;
63236 	/* The length of the response data in number of bytes. */
63237 	uint16_t	resp_len;
63238 	/* Number of received unicast packets */
63239 	uint64_t	rx_ucast_pkts;
63240 	/* Number of received multicast packets */
63241 	uint64_t	rx_mcast_pkts;
63242 	/* Number of received broadcast packets */
63243 	uint64_t	rx_bcast_pkts;
63244 	/* Number of discarded packets on receive path */
63245 	uint64_t	rx_discard_pkts;
63246 	/* Number of packets on receive path with error */
63247 	uint64_t	rx_error_pkts;
63248 	/* Number of received bytes for unicast traffic */
63249 	uint64_t	rx_ucast_bytes;
63250 	/* Number of received bytes for multicast traffic */
63251 	uint64_t	rx_mcast_bytes;
63252 	/* Number of received bytes for broadcast traffic */
63253 	uint64_t	rx_bcast_bytes;
63254 	/* Number of transmitted unicast packets */
63255 	uint64_t	tx_ucast_pkts;
63256 	/* Number of transmitted multicast packets */
63257 	uint64_t	tx_mcast_pkts;
63258 	/* Number of transmitted broadcast packets */
63259 	uint64_t	tx_bcast_pkts;
63260 	/* Number of packets on transmit path with error */
63261 	uint64_t	tx_error_pkts;
63262 	/* Number of discarded packets on transmit path */
63263 	uint64_t	tx_discard_pkts;
63264 	/* Number of transmitted bytes for unicast traffic */
63265 	uint64_t	tx_ucast_bytes;
63266 	/* Number of transmitted bytes for multicast traffic */
63267 	uint64_t	tx_mcast_bytes;
63268 	/* Number of transmitted bytes for broadcast traffic */
63269 	uint64_t	tx_bcast_bytes;
63270 	/* Number of TPA eligible packets */
63271 	uint64_t	rx_tpa_eligible_pkt;
63272 	/* Number of TPA eligible bytes */
63273 	uint64_t	rx_tpa_eligible_bytes;
63274 	/* Number of TPA packets */
63275 	uint64_t	rx_tpa_pkt;
63276 	/* Number of TPA bytes */
63277 	uint64_t	rx_tpa_bytes;
63278 	/* Number of TPA errors */
63279 	uint64_t	rx_tpa_errors;
63280 	/* Number of TPA events */
63281 	uint64_t	rx_tpa_events;
63282 	uint8_t	unused_0[7];
63283 	/*
63284 	 * This field is used in Output records to indicate that the output
63285 	 * is completely written to RAM. This field should be read as '1'
63286 	 * to indicate that the output has been completely written. When
63287 	 * writing a command completion or response to an internal processor,
63288 	 * the order of writes has to be such that this field is written last.
63289 	 */
63290 	uint8_t	valid;
63291 } __rte_packed_end;
63292 
63293 /***************************
63294  * hwrm_stat_ctx_eng_query *
63295  ***************************/
63296 
63297 
63298 /* hwrm_stat_ctx_eng_query_input (size:192b/24B) */
63299 struct __rte_packed_begin hwrm_stat_ctx_eng_query_input {
63300 	/* The HWRM command request type. */
63301 	uint16_t	req_type;
63302 	/*
63303 	 * The completion ring to send the completion event on. This should
63304 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63305 	 */
63306 	uint16_t	cmpl_ring;
63307 	/*
63308 	 * The sequence ID is used by the driver for tracking multiple
63309 	 * commands. This ID is treated as opaque data by the firmware and
63310 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63311 	 */
63312 	uint16_t	seq_id;
63313 	/*
63314 	 * The target ID of the command:
63315 	 * * 0x0-0xFFF8 - The function ID
63316 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63317 	 * * 0xFFFD - Reserved for user-space HWRM interface
63318 	 * * 0xFFFF - HWRM
63319 	 */
63320 	uint16_t	target_id;
63321 	/*
63322 	 * A physical address pointer pointing to a host buffer that the
63323 	 * command's response data will be written. This can be either a host
63324 	 * physical address (HPA) or a guest physical address (GPA) and must
63325 	 * point to a physically contiguous block of memory.
63326 	 */
63327 	uint64_t	resp_addr;
63328 	/* ID of the statistics context that is being queried. */
63329 	uint32_t	stat_ctx_id;
63330 	uint8_t	unused_0[4];
63331 } __rte_packed_end;
63332 
63333 /* hwrm_stat_ctx_eng_query_output (size:640b/80B) */
63334 struct __rte_packed_begin hwrm_stat_ctx_eng_query_output {
63335 	/* The specific error status for the command. */
63336 	uint16_t	error_code;
63337 	/* The HWRM command request type. */
63338 	uint16_t	req_type;
63339 	/* The sequence ID from the original command. */
63340 	uint16_t	seq_id;
63341 	/* The length of the response data in number of bytes. */
63342 	uint16_t	resp_len;
63343 	/*
63344 	 * Count of data bytes into the Engine.
63345 	 * This includes any user supplied prefix,
63346 	 * but does not include any predefined
63347 	 * prefix data.
63348 	 */
63349 	uint64_t	eng_bytes_in;
63350 	/* Count of data bytes out of the Engine. */
63351 	uint64_t	eng_bytes_out;
63352 	/*
63353 	 * Count, in 4-byte (dword) units, of bytes
63354 	 * that are input as auxiliary data.
63355 	 * This includes the aux_cmd data.
63356 	 */
63357 	uint64_t	aux_bytes_in;
63358 	/*
63359 	 * Count, in 4-byte (dword) units, of bytes
63360 	 * that are output as auxiliary data.
63361 	 * This count is the buffer space for aux_data
63362 	 * output provided in the RQE, not the actual
63363 	 * aux_data written
63364 	 */
63365 	uint64_t	aux_bytes_out;
63366 	/* Count of number of commands executed. */
63367 	uint64_t	commands;
63368 	/*
63369 	 * Count of number of error commands.
63370 	 * These are the commands with a
63371 	 * non-zero status value.
63372 	 */
63373 	uint64_t	error_commands;
63374 	/*
63375 	 * Compression/Encryption Engine usage,
63376 	 * the unit is count of clock cycles
63377 	 */
63378 	uint64_t	cce_engine_usage;
63379 	/*
63380 	 * De-Compression/De-cryption Engine usage,
63381 	 * the unit is count of clock cycles
63382 	 */
63383 	uint64_t	cdd_engine_usage;
63384 	uint8_t	unused_0[7];
63385 	/*
63386 	 * This field is used in Output records to indicate that the output
63387 	 * is completely written to RAM. This field should be read as '1'
63388 	 * to indicate that the output has been completely written. When
63389 	 * writing a command completion or response to an internal processor,
63390 	 * the order of writes has to be such that this field is written last.
63391 	 */
63392 	uint8_t	valid;
63393 } __rte_packed_end;
63394 
63395 /***************************
63396  * hwrm_stat_ctx_clr_stats *
63397  ***************************/
63398 
63399 
63400 /* hwrm_stat_ctx_clr_stats_input (size:192b/24B) */
63401 struct __rte_packed_begin hwrm_stat_ctx_clr_stats_input {
63402 	/* The HWRM command request type. */
63403 	uint16_t	req_type;
63404 	/*
63405 	 * The completion ring to send the completion event on. This should
63406 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63407 	 */
63408 	uint16_t	cmpl_ring;
63409 	/*
63410 	 * The sequence ID is used by the driver for tracking multiple
63411 	 * commands. This ID is treated as opaque data by the firmware and
63412 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63413 	 */
63414 	uint16_t	seq_id;
63415 	/*
63416 	 * The target ID of the command:
63417 	 * * 0x0-0xFFF8 - The function ID
63418 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63419 	 * * 0xFFFD - Reserved for user-space HWRM interface
63420 	 * * 0xFFFF - HWRM
63421 	 */
63422 	uint16_t	target_id;
63423 	/*
63424 	 * A physical address pointer pointing to a host buffer that the
63425 	 * command's response data will be written. This can be either a host
63426 	 * physical address (HPA) or a guest physical address (GPA) and must
63427 	 * point to a physically contiguous block of memory.
63428 	 */
63429 	uint64_t	resp_addr;
63430 	/* ID of the statistics context that is being queried. */
63431 	uint32_t	stat_ctx_id;
63432 	uint8_t	unused_0[4];
63433 } __rte_packed_end;
63434 
63435 /* hwrm_stat_ctx_clr_stats_output (size:128b/16B) */
63436 struct __rte_packed_begin hwrm_stat_ctx_clr_stats_output {
63437 	/* The specific error status for the command. */
63438 	uint16_t	error_code;
63439 	/* The HWRM command request type. */
63440 	uint16_t	req_type;
63441 	/* The sequence ID from the original command. */
63442 	uint16_t	seq_id;
63443 	/* The length of the response data in number of bytes. */
63444 	uint16_t	resp_len;
63445 	uint8_t	unused_0[7];
63446 	/*
63447 	 * This field is used in Output records to indicate that the output
63448 	 * is completely written to RAM. This field should be read as '1'
63449 	 * to indicate that the output has been completely written. When
63450 	 * writing a command completion or response to an internal processor,
63451 	 * the order of writes has to be such that this field is written last.
63452 	 */
63453 	uint8_t	valid;
63454 } __rte_packed_end;
63455 
63456 /********************
63457  * hwrm_pcie_qstats *
63458  ********************/
63459 
63460 
63461 /* hwrm_pcie_qstats_input (size:256b/32B) */
63462 struct __rte_packed_begin hwrm_pcie_qstats_input {
63463 	/* The HWRM command request type. */
63464 	uint16_t	req_type;
63465 	/*
63466 	 * The completion ring to send the completion event on. This should
63467 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63468 	 */
63469 	uint16_t	cmpl_ring;
63470 	/*
63471 	 * The sequence ID is used by the driver for tracking multiple
63472 	 * commands. This ID is treated as opaque data by the firmware and
63473 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63474 	 */
63475 	uint16_t	seq_id;
63476 	/*
63477 	 * The target ID of the command:
63478 	 * * 0x0-0xFFF8 - The function ID
63479 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63480 	 * * 0xFFFD - Reserved for user-space HWRM interface
63481 	 * * 0xFFFF - HWRM
63482 	 */
63483 	uint16_t	target_id;
63484 	/*
63485 	 * A physical address pointer pointing to a host buffer that the
63486 	 * command's response data will be written. This can be either a host
63487 	 * physical address (HPA) or a guest physical address (GPA) and must
63488 	 * point to a physically contiguous block of memory.
63489 	 */
63490 	uint64_t	resp_addr;
63491 	/*
63492 	 * The size of PCIe statistics block in bytes.
63493 	 * Firmware will DMA the PCIe statistics to
63494 	 * the host with this field size in the response.
63495 	 */
63496 	uint16_t	pcie_stat_size;
63497 	uint8_t	unused_0[6];
63498 	/*
63499 	 * This is the host address where
63500 	 * PCIe statistics will be stored
63501 	 */
63502 	uint64_t	pcie_stat_host_addr;
63503 } __rte_packed_end;
63504 
63505 /* hwrm_pcie_qstats_output (size:128b/16B) */
63506 struct __rte_packed_begin hwrm_pcie_qstats_output {
63507 	/* The specific error status for the command. */
63508 	uint16_t	error_code;
63509 	/* The HWRM command request type. */
63510 	uint16_t	req_type;
63511 	/* The sequence ID from the original command. */
63512 	uint16_t	seq_id;
63513 	/* The length of the response data in number of bytes. */
63514 	uint16_t	resp_len;
63515 	/* The size of PCIe statistics block in bytes. */
63516 	uint16_t	pcie_stat_size;
63517 	uint8_t	unused_0[5];
63518 	/*
63519 	 * This field is used in Output records to indicate that the output
63520 	 * is completely written to RAM. This field should be read as '1'
63521 	 * to indicate that the output has been completely written. When
63522 	 * writing a command completion or response to an internal processor,
63523 	 * the order of writes has to be such that this field is written last.
63524 	 */
63525 	uint8_t	valid;
63526 } __rte_packed_end;
63527 
63528 /* PCIe Statistics Formats */
63529 /* pcie_ctx_hw_stats (size:768b/96B) */
63530 struct __rte_packed_begin pcie_ctx_hw_stats {
63531 	/* Number of physical layer receiver errors */
63532 	uint64_t	pcie_pl_signal_integrity;
63533 	/* Number of DLLP CRC errors detected by Data Link Layer */
63534 	uint64_t	pcie_dl_signal_integrity;
63535 	/*
63536 	 * Number of TLP LCRC and sequence number errors detected
63537 	 * by Data Link Layer
63538 	 */
63539 	uint64_t	pcie_tl_signal_integrity;
63540 	/* Number of times LTSSM entered Recovery state */
63541 	uint64_t	pcie_link_integrity;
63542 	/* Report number of TLP bits that have been transmitted in Mbps */
63543 	uint64_t	pcie_tx_traffic_rate;
63544 	/* Report number of TLP bits that have been received in Mbps */
63545 	uint64_t	pcie_rx_traffic_rate;
63546 	/* Number of DLLP bytes that have been transmitted */
63547 	uint64_t	pcie_tx_dllp_statistics;
63548 	/* Number of DLLP bytes that have been received */
63549 	uint64_t	pcie_rx_dllp_statistics;
63550 	/*
63551 	 * Number of times spent in each phase of gen3
63552 	 * equalization
63553 	 */
63554 	uint64_t	pcie_equalization_time;
63555 	/* Records the last 16 transitions of the LTSSM */
63556 	uint32_t	pcie_ltssm_histogram[4];
63557 	/*
63558 	 * Record the last 8 reasons on why LTSSM transitioned
63559 	 * to Recovery
63560 	 */
63561 	uint64_t	pcie_recovery_histogram;
63562 } __rte_packed_end;
63563 
63564 /****************************
63565  * hwrm_stat_generic_qstats *
63566  ****************************/
63567 
63568 
63569 /* hwrm_stat_generic_qstats_input (size:256b/32B) */
63570 struct __rte_packed_begin hwrm_stat_generic_qstats_input {
63571 	/* The HWRM command request type. */
63572 	uint16_t	req_type;
63573 	/*
63574 	 * The completion ring to send the completion event on. This should
63575 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63576 	 */
63577 	uint16_t	cmpl_ring;
63578 	/*
63579 	 * The sequence ID is used by the driver for tracking multiple
63580 	 * commands. This ID is treated as opaque data by the firmware and
63581 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63582 	 */
63583 	uint16_t	seq_id;
63584 	/*
63585 	 * The target ID of the command:
63586 	 * * 0x0-0xFFF8 - The function ID
63587 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63588 	 * * 0xFFFD - Reserved for user-space HWRM interface
63589 	 * * 0xFFFF - HWRM
63590 	 */
63591 	uint16_t	target_id;
63592 	/*
63593 	 * A physical address pointer pointing to a host buffer that the
63594 	 * command's response data will be written. This can be either a host
63595 	 * physical address (HPA) or a guest physical address (GPA) and must
63596 	 * point to a physically contiguous block of memory.
63597 	 */
63598 	uint64_t	resp_addr;
63599 	/*
63600 	 * The size of the generic statistics buffer passed in the
63601 	 * generic_stat_host_addr in bytes.
63602 	 * Firmware will not exceed this size when it DMAs the
63603 	 * statistics structure to the host. The actual DMA size
63604 	 * will be returned in the response.
63605 	 */
63606 	uint16_t	generic_stat_size;
63607 	uint8_t	flags;
63608 	/*
63609 	 * The bit should be set to 1 when request is for the counter mask
63610 	 * representing the width of each of the stats counters, rather
63611 	 * than counters themselves.
63612 	 */
63613 	#define HWRM_STAT_GENERIC_QSTATS_INPUT_FLAGS_COUNTER_MASK \
63614 		UINT32_C(0x1)
63615 	uint8_t	unused_0[5];
63616 	/*
63617 	 * This is the host address where
63618 	 * generic statistics will be stored
63619 	 */
63620 	uint64_t	generic_stat_host_addr;
63621 } __rte_packed_end;
63622 
63623 /* hwrm_stat_generic_qstats_output (size:128b/16B) */
63624 struct __rte_packed_begin hwrm_stat_generic_qstats_output {
63625 	/* The specific error status for the command. */
63626 	uint16_t	error_code;
63627 	/* The HWRM command request type. */
63628 	uint16_t	req_type;
63629 	/* The sequence ID from the original command. */
63630 	uint16_t	seq_id;
63631 	/* The length of the response data in number of bytes. */
63632 	uint16_t	resp_len;
63633 	/* The size of Generic Statistics block in bytes. */
63634 	uint16_t	generic_stat_size;
63635 	uint8_t	unused_0[5];
63636 	/*
63637 	 * This field is used in Output records to indicate that the output
63638 	 * is completely written to RAM. This field should be read as '1'
63639 	 * to indicate that the output has been completely written.
63640 	 * When writing a command completion or response to an internal
63641 	 * processor, the order of writes has to be such that this field is
63642 	 * written last.
63643 	 */
63644 	uint8_t	valid;
63645 } __rte_packed_end;
63646 
63647 /* Generic Statistic Format */
63648 /* generic_sw_hw_stats (size:1472b/184B) */
63649 struct __rte_packed_begin generic_sw_hw_stats {
63650 	/*
63651 	 * This is the number of TLP bytes that have been transmitted for
63652 	 * the caller PF.
63653 	 */
63654 	uint64_t	pcie_statistics_tx_tlp;
63655 	/*
63656 	 * This is the number of TLP bytes that have been received
63657 	 * for the caller PF.
63658 	 */
63659 	uint64_t	pcie_statistics_rx_tlp;
63660 	/* Posted Header Flow Control credits available for the caller PF. */
63661 	uint64_t	pcie_credit_fc_hdr_posted;
63662 	/* Non-posted Header Flow Control credits available for the caller PF. */
63663 	uint64_t	pcie_credit_fc_hdr_nonposted;
63664 	/* Completion Header Flow Control credits available for the caller PF. */
63665 	uint64_t	pcie_credit_fc_hdr_cmpl;
63666 	/* Posted Data Flow Control credits available for the caller PF. */
63667 	uint64_t	pcie_credit_fc_data_posted;
63668 	/* Non-Posted Data Flow Control credits available for the caller PF. */
63669 	uint64_t	pcie_credit_fc_data_nonposted;
63670 	/* Completion Data Flow Control credits available for the caller PF. */
63671 	uint64_t	pcie_credit_fc_data_cmpl;
63672 	/*
63673 	 * Available Non-posted credit for target flow control reads or
63674 	 * config for the caller PF.
63675 	 */
63676 	uint64_t	pcie_credit_fc_tgt_nonposted;
63677 	/*
63678 	 * Available posted data credit for target flow control writes
63679 	 * for the caller PF.
63680 	 */
63681 	uint64_t	pcie_credit_fc_tgt_data_posted;
63682 	/*
63683 	 * Available posted header credit for target flow control writes
63684 	 * for the caller PF.
63685 	 */
63686 	uint64_t	pcie_credit_fc_tgt_hdr_posted;
63687 	/* Available completion flow control header credits for the caller PF. */
63688 	uint64_t	pcie_credit_fc_cmpl_hdr_posted;
63689 	/* Available completion flow control data credits. */
63690 	uint64_t	pcie_credit_fc_cmpl_data_posted;
63691 	/*
63692 	 * Displays Time information of the longest completion time from any of
63693 	 * the 4 tags for the caller PF. The unit of time recorded is in
63694 	 * microseconds.
63695 	 */
63696 	uint64_t	pcie_cmpl_longest;
63697 	/*
63698 	 * Displays Time information of the shortest completion time from any
63699 	 * of the 4 tags for the caller PF. The unit of time recorded is in
63700 	 * microseconds.
63701 	 */
63702 	uint64_t	pcie_cmpl_shortest;
63703 	/*
63704 	 * This field contains the total number of CFCQ 'misses' observed for
63705 	 * all the PF's.
63706 	 */
63707 	uint64_t	cache_miss_count_cfcq;
63708 	/*
63709 	 * This field contains the total number of CFCS 'misses' observed for
63710 	 * all the PF's.
63711 	 */
63712 	uint64_t	cache_miss_count_cfcs;
63713 	/*
63714 	 * This field contains the total number of CFCC 'misses' observed for
63715 	 * all the PF's.
63716 	 */
63717 	uint64_t	cache_miss_count_cfcc;
63718 	/*
63719 	 * This field contains the total number of CFCM 'misses' observed
63720 	 * for all the PF's.
63721 	 */
63722 	uint64_t	cache_miss_count_cfcm;
63723 	/*
63724 	 * Total number of Doorbell messages dropped from the DB FIFO.
63725 	 * This counter is only applicable for devices that support
63726 	 * the hardware based doorbell drop recovery feature.
63727 	 */
63728 	uint64_t	hw_db_recov_dbs_dropped;
63729 	/*
63730 	 * Total number of doorbell drops serviced.
63731 	 * This counter is only applicable for devices that support
63732 	 * the hardware based doorbell drop recovery feature.
63733 	 */
63734 	uint64_t	hw_db_recov_drops_serviced;
63735 	/*
63736 	 * Total number of dropped doorbells recovered.
63737 	 * This counter is only applicable for devices that support
63738 	 * the hardware based doorbell drop recovery feature.
63739 	 */
63740 	uint64_t	hw_db_recov_dbs_recovered;
63741 	/*
63742 	 * Total number of out of order doorbell messages dropped.
63743 	 * This counter is only applicable for devices that support
63744 	 * the hardware based doorbell drop recovery feature.
63745 	 */
63746 	uint64_t	hw_db_recov_oo_drop_count;
63747 } __rte_packed_end;
63748 
63749 /*****************************
63750  * hwrm_stat_db_error_qstats *
63751  *****************************/
63752 
63753 
63754 /* hwrm_stat_db_error_qstats_input (size:128b/16B) */
63755 struct __rte_packed_begin hwrm_stat_db_error_qstats_input {
63756 	/* The HWRM command request type. */
63757 	uint16_t	req_type;
63758 	/*
63759 	 * The completion ring to send the completion event on. This should
63760 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63761 	 */
63762 	uint16_t	cmpl_ring;
63763 	/*
63764 	 * The sequence ID is used by the driver for tracking multiple
63765 	 * commands. This ID is treated as opaque data by the firmware and
63766 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63767 	 */
63768 	uint16_t	seq_id;
63769 	/*
63770 	 * The target ID of the command:
63771 	 * * 0x0-0xFFF8 - The function ID
63772 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63773 	 * * 0xFFFD - Reserved for user-space HWRM interface
63774 	 * * 0xFFFF - HWRM
63775 	 */
63776 	uint16_t	target_id;
63777 	/*
63778 	 * A physical address pointer pointing to a host buffer that the
63779 	 * command's response data will be written. This can be either a host
63780 	 * physical address (HPA) or a guest physical address (GPA) and must
63781 	 * point to a physically contiguous block of memory.
63782 	 */
63783 	uint64_t	resp_addr;
63784 } __rte_packed_end;
63785 
63786 /* hwrm_stat_db_error_qstats_output (size:320b/40B) */
63787 struct __rte_packed_begin hwrm_stat_db_error_qstats_output {
63788 	/* The specific error status for the command. */
63789 	uint16_t	error_code;
63790 	/* The HWRM command request type. */
63791 	uint16_t	req_type;
63792 	/* The sequence ID from the original command. */
63793 	uint16_t	seq_id;
63794 	/* The length of the response data in number of bytes. */
63795 	uint16_t	resp_len;
63796 	/*
63797 	 * Specifies count of doorbells dropped due to RoCE SQs or L2
63798 	 * Tx Rings being in invalid state.
63799 	 */
63800 	uint32_t	tx_db_drop_invalid_qp_state;
63801 	/*
63802 	 * Specifies count of doorbells dropped due to RoCE RQs/SRQs or
63803 	 * L2 Rx Rings being used in invalid state.
63804 	 */
63805 	uint32_t	rx_db_drop_invalid_rq_state;
63806 	/*
63807 	 * Specifies count of doorbells dropped for any doorbell type
63808 	 * due to formatting errors such as illegal doorbell message
63809 	 * type, index out of range etc.
63810 	 */
63811 	uint32_t	tx_db_drop_format_error;
63812 	/*
63813 	 * Specifies count of express mode doorbells dropped for any
63814 	 * doorbell type due to error conditions such as DPI check,
63815 	 * context load error etc.
63816 	 */
63817 	uint32_t	express_db_dropped_misc_error;
63818 	/*
63819 	 * Specifies count of express mode doorbells dropped due to
63820 	 * RoCE SQ overflow.
63821 	 */
63822 	uint32_t	express_db_dropped_sq_overflow;
63823 	/*
63824 	 * Specifies count of express mode doorbells dropped due to
63825 	 * RoCE RQ overflow.
63826 	 */
63827 	uint32_t	express_db_dropped_rq_overflow;
63828 	uint8_t	unused_0[7];
63829 	/*
63830 	 * This field is used in Output records to indicate that the output
63831 	 * is completely written to RAM. This field should be read as '1'
63832 	 * to indicate that the output has been completely written.
63833 	 * When writing a command completion or response to an internal
63834 	 * processor, the order of writes has to be such that this field is
63835 	 * written last.
63836 	 */
63837 	uint8_t	valid;
63838 } __rte_packed_end;
63839 
63840 /**********************
63841  * hwrm_exec_fwd_resp *
63842  **********************/
63843 
63844 
63845 /* hwrm_exec_fwd_resp_input (size:1024b/128B) */
63846 struct __rte_packed_begin hwrm_exec_fwd_resp_input {
63847 	/* The HWRM command request type. */
63848 	uint16_t	req_type;
63849 	/*
63850 	 * The completion ring to send the completion event on. This should
63851 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63852 	 */
63853 	uint16_t	cmpl_ring;
63854 	/*
63855 	 * The sequence ID is used by the driver for tracking multiple
63856 	 * commands. This ID is treated as opaque data by the firmware and
63857 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63858 	 */
63859 	uint16_t	seq_id;
63860 	/*
63861 	 * The target ID of the command:
63862 	 * * 0x0-0xFFF8 - The function ID
63863 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63864 	 * * 0xFFFD - Reserved for user-space HWRM interface
63865 	 * * 0xFFFF - HWRM
63866 	 */
63867 	uint16_t	target_id;
63868 	/*
63869 	 * A physical address pointer pointing to a host buffer that the
63870 	 * command's response data will be written. This can be either a host
63871 	 * physical address (HPA) or a guest physical address (GPA) and must
63872 	 * point to a physically contiguous block of memory.
63873 	 */
63874 	uint64_t	resp_addr;
63875 	/*
63876 	 * This is an encapsulated request. This request should
63877 	 * be executed by the HWRM and the response should be
63878 	 * provided in the response buffer inside the encapsulated
63879 	 * request.
63880 	 */
63881 	uint32_t	encap_request[26];
63882 	/*
63883 	 * This value indicates the target id of the response to
63884 	 * the encapsulated request.
63885 	 * 0x0 - 0xFFF8 - Used for function ids
63886 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
63887 	 * 0xFFFF - HWRM
63888 	 */
63889 	uint16_t	encap_resp_target_id;
63890 	uint8_t	unused_0[6];
63891 } __rte_packed_end;
63892 
63893 /* hwrm_exec_fwd_resp_output (size:128b/16B) */
63894 struct __rte_packed_begin hwrm_exec_fwd_resp_output {
63895 	/* The specific error status for the command. */
63896 	uint16_t	error_code;
63897 	/* The HWRM command request type. */
63898 	uint16_t	req_type;
63899 	/* The sequence ID from the original command. */
63900 	uint16_t	seq_id;
63901 	/* The length of the response data in number of bytes. */
63902 	uint16_t	resp_len;
63903 	uint8_t	unused_0[7];
63904 	/*
63905 	 * This field is used in Output records to indicate that the output
63906 	 * is completely written to RAM. This field should be read as '1'
63907 	 * to indicate that the output has been completely written. When
63908 	 * writing a command completion or response to an internal processor,
63909 	 * the order of writes has to be such that this field is written last.
63910 	 */
63911 	uint8_t	valid;
63912 } __rte_packed_end;
63913 
63914 /************************
63915  * hwrm_reject_fwd_resp *
63916  ************************/
63917 
63918 
63919 /* hwrm_reject_fwd_resp_input (size:1024b/128B) */
63920 struct __rte_packed_begin hwrm_reject_fwd_resp_input {
63921 	/* The HWRM command request type. */
63922 	uint16_t	req_type;
63923 	/*
63924 	 * The completion ring to send the completion event on. This should
63925 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
63926 	 */
63927 	uint16_t	cmpl_ring;
63928 	/*
63929 	 * The sequence ID is used by the driver for tracking multiple
63930 	 * commands. This ID is treated as opaque data by the firmware and
63931 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
63932 	 */
63933 	uint16_t	seq_id;
63934 	/*
63935 	 * The target ID of the command:
63936 	 * * 0x0-0xFFF8 - The function ID
63937 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
63938 	 * * 0xFFFD - Reserved for user-space HWRM interface
63939 	 * * 0xFFFF - HWRM
63940 	 */
63941 	uint16_t	target_id;
63942 	/*
63943 	 * A physical address pointer pointing to a host buffer that the
63944 	 * command's response data will be written. This can be either a host
63945 	 * physical address (HPA) or a guest physical address (GPA) and must
63946 	 * point to a physically contiguous block of memory.
63947 	 */
63948 	uint64_t	resp_addr;
63949 	/*
63950 	 * This is an encapsulated request. This request should
63951 	 * be rejected by the HWRM and the error response should be
63952 	 * provided in the response buffer inside the encapsulated
63953 	 * request.
63954 	 */
63955 	uint32_t	encap_request[26];
63956 	/*
63957 	 * This value indicates the target id of the response to
63958 	 * the encapsulated request.
63959 	 * 0x0 - 0xFFF8 - Used for function ids
63960 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
63961 	 * 0xFFFF - HWRM
63962 	 */
63963 	uint16_t	encap_resp_target_id;
63964 	uint8_t	unused_0[6];
63965 } __rte_packed_end;
63966 
63967 /* hwrm_reject_fwd_resp_output (size:128b/16B) */
63968 struct __rte_packed_begin hwrm_reject_fwd_resp_output {
63969 	/* The specific error status for the command. */
63970 	uint16_t	error_code;
63971 	/* The HWRM command request type. */
63972 	uint16_t	req_type;
63973 	/* The sequence ID from the original command. */
63974 	uint16_t	seq_id;
63975 	/* The length of the response data in number of bytes. */
63976 	uint16_t	resp_len;
63977 	uint8_t	unused_0[7];
63978 	/*
63979 	 * This field is used in Output records to indicate that the output
63980 	 * is completely written to RAM. This field should be read as '1'
63981 	 * to indicate that the output has been completely written. When
63982 	 * writing a command completion or response to an internal processor,
63983 	 * the order of writes has to be such that this field is written last.
63984 	 */
63985 	uint8_t	valid;
63986 } __rte_packed_end;
63987 
63988 /*****************
63989  * hwrm_fwd_resp *
63990  *****************/
63991 
63992 
63993 /* hwrm_fwd_resp_input (size:1024b/128B) */
63994 struct __rte_packed_begin hwrm_fwd_resp_input {
63995 	/* The HWRM command request type. */
63996 	uint16_t	req_type;
63997 	/*
63998 	 * The completion ring to send the completion event on. This should
63999 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64000 	 */
64001 	uint16_t	cmpl_ring;
64002 	/*
64003 	 * The sequence ID is used by the driver for tracking multiple
64004 	 * commands. This ID is treated as opaque data by the firmware and
64005 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64006 	 */
64007 	uint16_t	seq_id;
64008 	/*
64009 	 * The target ID of the command:
64010 	 * * 0x0-0xFFF8 - The function ID
64011 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64012 	 * * 0xFFFD - Reserved for user-space HWRM interface
64013 	 * * 0xFFFF - HWRM
64014 	 */
64015 	uint16_t	target_id;
64016 	/*
64017 	 * A physical address pointer pointing to a host buffer that the
64018 	 * command's response data will be written. This can be either a host
64019 	 * physical address (HPA) or a guest physical address (GPA) and must
64020 	 * point to a physically contiguous block of memory.
64021 	 */
64022 	uint64_t	resp_addr;
64023 	/*
64024 	 * This value indicates the target id of the encapsulated
64025 	 * response.
64026 	 * 0x0 - 0xFFF8 - Used for function ids
64027 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
64028 	 * 0xFFFF - HWRM
64029 	 */
64030 	uint16_t	encap_resp_target_id;
64031 	/*
64032 	 * This value indicates the completion ring the encapsulated
64033 	 * response will be optionally completed on. If the value is
64034 	 * -1, then no CR completion shall be generated for the
64035 	 * encapsulated response. Any other value must be a
64036 	 * valid CR ring_id value. If a valid encap_resp_cmpl_ring
64037 	 * is provided, then a CR completion shall be generated for
64038 	 * the encapsulated response.
64039 	 */
64040 	uint16_t	encap_resp_cmpl_ring;
64041 	/* This field indicates the length of encapsulated response. */
64042 	uint16_t	encap_resp_len;
64043 	uint8_t	unused_0;
64044 	uint8_t	unused_1;
64045 	/*
64046 	 * This is the host address where the encapsulated response
64047 	 * will be written.
64048 	 * This area must be 16B aligned and must be cleared to zero
64049 	 * before the original request is made.
64050 	 */
64051 	uint64_t	encap_resp_addr;
64052 	/* This is an encapsulated response. */
64053 	uint32_t	encap_resp[24];
64054 } __rte_packed_end;
64055 
64056 /* hwrm_fwd_resp_output (size:128b/16B) */
64057 struct __rte_packed_begin hwrm_fwd_resp_output {
64058 	/* The specific error status for the command. */
64059 	uint16_t	error_code;
64060 	/* The HWRM command request type. */
64061 	uint16_t	req_type;
64062 	/* The sequence ID from the original command. */
64063 	uint16_t	seq_id;
64064 	/* The length of the response data in number of bytes. */
64065 	uint16_t	resp_len;
64066 	uint8_t	unused_0[7];
64067 	/*
64068 	 * This field is used in Output records to indicate that the output
64069 	 * is completely written to RAM. This field should be read as '1'
64070 	 * to indicate that the output has been completely written. When
64071 	 * writing a command completion or response to an internal processor,
64072 	 * the order of writes has to be such that this field is written last.
64073 	 */
64074 	uint8_t	valid;
64075 } __rte_packed_end;
64076 
64077 /*****************************
64078  * hwrm_fwd_async_event_cmpl *
64079  *****************************/
64080 
64081 
64082 /* hwrm_fwd_async_event_cmpl_input (size:320b/40B) */
64083 struct __rte_packed_begin hwrm_fwd_async_event_cmpl_input {
64084 	/* The HWRM command request type. */
64085 	uint16_t	req_type;
64086 	/*
64087 	 * The completion ring to send the completion event on. This should
64088 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64089 	 */
64090 	uint16_t	cmpl_ring;
64091 	/*
64092 	 * The sequence ID is used by the driver for tracking multiple
64093 	 * commands. This ID is treated as opaque data by the firmware and
64094 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64095 	 */
64096 	uint16_t	seq_id;
64097 	/*
64098 	 * The target ID of the command:
64099 	 * * 0x0-0xFFF8 - The function ID
64100 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64101 	 * * 0xFFFD - Reserved for user-space HWRM interface
64102 	 * * 0xFFFF - HWRM
64103 	 */
64104 	uint16_t	target_id;
64105 	/*
64106 	 * A physical address pointer pointing to a host buffer that the
64107 	 * command's response data will be written. This can be either a host
64108 	 * physical address (HPA) or a guest physical address (GPA) and must
64109 	 * point to a physically contiguous block of memory.
64110 	 */
64111 	uint64_t	resp_addr;
64112 	/*
64113 	 * This value indicates the target id of the encapsulated
64114 	 * asynchronous event.
64115 	 * 0x0 - 0xFFF8 - Used for function ids
64116 	 * 0xFFF8 - 0xFFFE - Reserved for internal processors
64117 	 * 0xFFFF - Broadcast to all children VFs (only applicable when
64118 	 * a PF is the requester)
64119 	 */
64120 	uint16_t	encap_async_event_target_id;
64121 	uint8_t	unused_0[6];
64122 	/* This is an encapsulated asynchronous event completion. */
64123 	uint32_t	encap_async_event_cmpl[4];
64124 } __rte_packed_end;
64125 
64126 /* hwrm_fwd_async_event_cmpl_output (size:128b/16B) */
64127 struct __rte_packed_begin hwrm_fwd_async_event_cmpl_output {
64128 	/* The specific error status for the command. */
64129 	uint16_t	error_code;
64130 	/* The HWRM command request type. */
64131 	uint16_t	req_type;
64132 	/* The sequence ID from the original command. */
64133 	uint16_t	seq_id;
64134 	/* The length of the response data in number of bytes. */
64135 	uint16_t	resp_len;
64136 	uint8_t	unused_0[7];
64137 	/*
64138 	 * This field is used in Output records to indicate that the output
64139 	 * is completely written to RAM. This field should be read as '1'
64140 	 * to indicate that the output has been completely written. When
64141 	 * writing a command completion or response to an internal processor,
64142 	 * the order of writes has to be such that this field is written last.
64143 	 */
64144 	uint8_t	valid;
64145 } __rte_packed_end;
64146 
64147 /**************************
64148  * hwrm_nvm_raw_write_blk *
64149  **************************/
64150 
64151 
64152 /* hwrm_nvm_raw_write_blk_input (size:256b/32B) */
64153 struct __rte_packed_begin hwrm_nvm_raw_write_blk_input {
64154 	/* The HWRM command request type. */
64155 	uint16_t	req_type;
64156 	/*
64157 	 * The completion ring to send the completion event on. This should
64158 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64159 	 */
64160 	uint16_t	cmpl_ring;
64161 	/*
64162 	 * The sequence ID is used by the driver for tracking multiple
64163 	 * commands. This ID is treated as opaque data by the firmware and
64164 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64165 	 */
64166 	uint16_t	seq_id;
64167 	/*
64168 	 * The target ID of the command:
64169 	 * * 0x0-0xFFF8 - The function ID
64170 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64171 	 * * 0xFFFD - Reserved for user-space HWRM interface
64172 	 * * 0xFFFF - HWRM
64173 	 */
64174 	uint16_t	target_id;
64175 	/*
64176 	 * A physical address pointer pointing to a host buffer that the
64177 	 * command's response data will be written. This can be either a host
64178 	 * physical address (HPA) or a guest physical address (GPA) and must
64179 	 * point to a physically contiguous block of memory.
64180 	 */
64181 	uint64_t	resp_addr;
64182 	/*
64183 	 * 64-bit Host Source Address.
64184 	 * This is the location of the source data to be written.
64185 	 */
64186 	uint64_t	host_src_addr;
64187 	/*
64188 	 * 32-bit Destination Address.
64189 	 * This is the NVRAM byte-offset where the source data will be written
64190 	 * to.
64191 	 */
64192 	uint32_t	dest_addr;
64193 	/* Length of data to be written, in bytes. */
64194 	uint32_t	len;
64195 } __rte_packed_end;
64196 
64197 /* hwrm_nvm_raw_write_blk_output (size:128b/16B) */
64198 struct __rte_packed_begin hwrm_nvm_raw_write_blk_output {
64199 	/* The specific error status for the command. */
64200 	uint16_t	error_code;
64201 	/* The HWRM command request type. */
64202 	uint16_t	req_type;
64203 	/* The sequence ID from the original command. */
64204 	uint16_t	seq_id;
64205 	/* The length of the response data in number of bytes. */
64206 	uint16_t	resp_len;
64207 	uint8_t	unused_0[7];
64208 	/*
64209 	 * This field is used in Output records to indicate that the output
64210 	 * is completely written to RAM. This field should be read as '1'
64211 	 * to indicate that the output has been completely written. When
64212 	 * writing a command completion or response to an internal processor,
64213 	 * the order of writes has to be such that this field is written last.
64214 	 */
64215 	uint8_t	valid;
64216 } __rte_packed_end;
64217 
64218 /*****************
64219  * hwrm_nvm_read *
64220  *****************/
64221 
64222 
64223 /* hwrm_nvm_read_input (size:320b/40B) */
64224 struct __rte_packed_begin hwrm_nvm_read_input {
64225 	/* The HWRM command request type. */
64226 	uint16_t	req_type;
64227 	/*
64228 	 * The completion ring to send the completion event on. This should
64229 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64230 	 */
64231 	uint16_t	cmpl_ring;
64232 	/*
64233 	 * The sequence ID is used by the driver for tracking multiple
64234 	 * commands. This ID is treated as opaque data by the firmware and
64235 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64236 	 */
64237 	uint16_t	seq_id;
64238 	/*
64239 	 * The target ID of the command:
64240 	 * * 0x0-0xFFF8 - The function ID
64241 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64242 	 * * 0xFFFD - Reserved for user-space HWRM interface
64243 	 * * 0xFFFF - HWRM
64244 	 */
64245 	uint16_t	target_id;
64246 	/*
64247 	 * A physical address pointer pointing to a host buffer that the
64248 	 * command's response data will be written. This can be either a host
64249 	 * physical address (HPA) or a guest physical address (GPA) and must
64250 	 * point to a physically contiguous block of memory.
64251 	 */
64252 	uint64_t	resp_addr;
64253 	/*
64254 	 * 64-bit Host Destination Address.
64255 	 * This is the host address where the data will be written to.
64256 	 */
64257 	uint64_t	host_dest_addr;
64258 	/* The 0-based index of the directory entry. */
64259 	uint16_t	dir_idx;
64260 	uint8_t	unused_0[2];
64261 	/* The NVRAM byte-offset to read from. */
64262 	uint32_t	offset;
64263 	/* The length of the data to be read, in bytes. */
64264 	uint32_t	len;
64265 	uint8_t	unused_1[4];
64266 } __rte_packed_end;
64267 
64268 /* hwrm_nvm_read_output (size:128b/16B) */
64269 struct __rte_packed_begin hwrm_nvm_read_output {
64270 	/* The specific error status for the command. */
64271 	uint16_t	error_code;
64272 	/* The HWRM command request type. */
64273 	uint16_t	req_type;
64274 	/* The sequence ID from the original command. */
64275 	uint16_t	seq_id;
64276 	/* The length of the response data in number of bytes. */
64277 	uint16_t	resp_len;
64278 	uint8_t	unused_0[7];
64279 	/*
64280 	 * This field is used in Output records to indicate that the output
64281 	 * is completely written to RAM. This field should be read as '1'
64282 	 * to indicate that the output has been completely written. When
64283 	 * writing a command completion or response to an internal processor,
64284 	 * the order of writes has to be such that this field is written last.
64285 	 */
64286 	uint8_t	valid;
64287 } __rte_packed_end;
64288 
64289 /*********************
64290  * hwrm_nvm_raw_dump *
64291  *********************/
64292 
64293 
64294 /* hwrm_nvm_raw_dump_input (size:256b/32B) */
64295 struct __rte_packed_begin hwrm_nvm_raw_dump_input {
64296 	/* The HWRM command request type. */
64297 	uint16_t	req_type;
64298 	/*
64299 	 * The completion ring to send the completion event on. This should
64300 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64301 	 */
64302 	uint16_t	cmpl_ring;
64303 	/*
64304 	 * The sequence ID is used by the driver for tracking multiple
64305 	 * commands. This ID is treated as opaque data by the firmware and
64306 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64307 	 */
64308 	uint16_t	seq_id;
64309 	/*
64310 	 * The target ID of the command:
64311 	 * * 0x0-0xFFF8 - The function ID
64312 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64313 	 * * 0xFFFD - Reserved for user-space HWRM interface
64314 	 * * 0xFFFF - HWRM
64315 	 */
64316 	uint16_t	target_id;
64317 	/*
64318 	 * A physical address pointer pointing to a host buffer that the
64319 	 * command's response data will be written. This can be either a host
64320 	 * physical address (HPA) or a guest physical address (GPA) and must
64321 	 * point to a physically contiguous block of memory.
64322 	 */
64323 	uint64_t	resp_addr;
64324 	/*
64325 	 * 64-bit Host Destination Address.
64326 	 * This is the host address where the data will be written to.
64327 	 */
64328 	uint64_t	host_dest_addr;
64329 	/* 32-bit NVRAM byte-offset to read from. */
64330 	uint32_t	offset;
64331 	/* Total length of NVRAM contents to be read, in bytes. */
64332 	uint32_t	len;
64333 } __rte_packed_end;
64334 
64335 /* hwrm_nvm_raw_dump_output (size:128b/16B) */
64336 struct __rte_packed_begin hwrm_nvm_raw_dump_output {
64337 	/* The specific error status for the command. */
64338 	uint16_t	error_code;
64339 	/* The HWRM command request type. */
64340 	uint16_t	req_type;
64341 	/* The sequence ID from the original command. */
64342 	uint16_t	seq_id;
64343 	/* The length of the response data in number of bytes. */
64344 	uint16_t	resp_len;
64345 	uint8_t	unused_0[7];
64346 	/*
64347 	 * This field is used in Output records to indicate that the output
64348 	 * is completely written to RAM. This field should be read as '1'
64349 	 * to indicate that the output has been completely written. When
64350 	 * writing a command completion or response to an internal processor,
64351 	 * the order of writes has to be such that this field is written last.
64352 	 */
64353 	uint8_t	valid;
64354 } __rte_packed_end;
64355 
64356 /****************************
64357  * hwrm_nvm_get_dir_entries *
64358  ****************************/
64359 
64360 
64361 /* hwrm_nvm_get_dir_entries_input (size:192b/24B) */
64362 struct __rte_packed_begin hwrm_nvm_get_dir_entries_input {
64363 	/* The HWRM command request type. */
64364 	uint16_t	req_type;
64365 	/*
64366 	 * The completion ring to send the completion event on. This should
64367 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64368 	 */
64369 	uint16_t	cmpl_ring;
64370 	/*
64371 	 * The sequence ID is used by the driver for tracking multiple
64372 	 * commands. This ID is treated as opaque data by the firmware and
64373 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64374 	 */
64375 	uint16_t	seq_id;
64376 	/*
64377 	 * The target ID of the command:
64378 	 * * 0x0-0xFFF8 - The function ID
64379 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64380 	 * * 0xFFFD - Reserved for user-space HWRM interface
64381 	 * * 0xFFFF - HWRM
64382 	 */
64383 	uint16_t	target_id;
64384 	/*
64385 	 * A physical address pointer pointing to a host buffer that the
64386 	 * command's response data will be written. This can be either a host
64387 	 * physical address (HPA) or a guest physical address (GPA) and must
64388 	 * point to a physically contiguous block of memory.
64389 	 */
64390 	uint64_t	resp_addr;
64391 	/*
64392 	 * 64-bit Host Destination Address.
64393 	 * This is the host address where the directory will be written.
64394 	 */
64395 	uint64_t	host_dest_addr;
64396 } __rte_packed_end;
64397 
64398 /* hwrm_nvm_get_dir_entries_output (size:128b/16B) */
64399 struct __rte_packed_begin hwrm_nvm_get_dir_entries_output {
64400 	/* The specific error status for the command. */
64401 	uint16_t	error_code;
64402 	/* The HWRM command request type. */
64403 	uint16_t	req_type;
64404 	/* The sequence ID from the original command. */
64405 	uint16_t	seq_id;
64406 	/* The length of the response data in number of bytes. */
64407 	uint16_t	resp_len;
64408 	uint8_t	unused_0[7];
64409 	/*
64410 	 * This field is used in Output records to indicate that the output
64411 	 * is completely written to RAM. This field should be read as '1'
64412 	 * to indicate that the output has been completely written. When
64413 	 * writing a command completion or response to an internal processor,
64414 	 * the order of writes has to be such that this field is written last.
64415 	 */
64416 	uint8_t	valid;
64417 } __rte_packed_end;
64418 
64419 /*************************
64420  * hwrm_nvm_get_dir_info *
64421  *************************/
64422 
64423 
64424 /* hwrm_nvm_get_dir_info_input (size:128b/16B) */
64425 struct __rte_packed_begin hwrm_nvm_get_dir_info_input {
64426 	/* The HWRM command request type. */
64427 	uint16_t	req_type;
64428 	/*
64429 	 * The completion ring to send the completion event on. This should
64430 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64431 	 */
64432 	uint16_t	cmpl_ring;
64433 	/*
64434 	 * The sequence ID is used by the driver for tracking multiple
64435 	 * commands. This ID is treated as opaque data by the firmware and
64436 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64437 	 */
64438 	uint16_t	seq_id;
64439 	/*
64440 	 * The target ID of the command:
64441 	 * * 0x0-0xFFF8 - The function ID
64442 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64443 	 * * 0xFFFD - Reserved for user-space HWRM interface
64444 	 * * 0xFFFF - HWRM
64445 	 */
64446 	uint16_t	target_id;
64447 	/*
64448 	 * A physical address pointer pointing to a host buffer that the
64449 	 * command's response data will be written. This can be either a host
64450 	 * physical address (HPA) or a guest physical address (GPA) and must
64451 	 * point to a physically contiguous block of memory.
64452 	 */
64453 	uint64_t	resp_addr;
64454 } __rte_packed_end;
64455 
64456 /* hwrm_nvm_get_dir_info_output (size:192b/24B) */
64457 struct __rte_packed_begin hwrm_nvm_get_dir_info_output {
64458 	/* The specific error status for the command. */
64459 	uint16_t	error_code;
64460 	/* The HWRM command request type. */
64461 	uint16_t	req_type;
64462 	/* The sequence ID from the original command. */
64463 	uint16_t	seq_id;
64464 	/* The length of the response data in number of bytes. */
64465 	uint16_t	resp_len;
64466 	/* Number of directory entries in the directory. */
64467 	uint32_t	entries;
64468 	/* Size of each directory entry, in bytes. */
64469 	uint32_t	entry_length;
64470 	uint8_t	unused_0[7];
64471 	/*
64472 	 * This field is used in Output records to indicate that the output
64473 	 * is completely written to RAM. This field should be read as '1'
64474 	 * to indicate that the output has been completely written. When
64475 	 * writing a command completion or response to an internal processor,
64476 	 * the order of writes has to be such that this field is written last.
64477 	 */
64478 	uint8_t	valid;
64479 } __rte_packed_end;
64480 
64481 /******************
64482  * hwrm_nvm_write *
64483  ******************/
64484 
64485 
64486 /* hwrm_nvm_write_input (size:448b/56B) */
64487 struct __rte_packed_begin hwrm_nvm_write_input {
64488 	/* The HWRM command request type. */
64489 	uint16_t	req_type;
64490 	/*
64491 	 * The completion ring to send the completion event on. This should
64492 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64493 	 */
64494 	uint16_t	cmpl_ring;
64495 	/*
64496 	 * The sequence ID is used by the driver for tracking multiple
64497 	 * commands. This ID is treated as opaque data by the firmware and
64498 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64499 	 */
64500 	uint16_t	seq_id;
64501 	/*
64502 	 * The target ID of the command:
64503 	 * * 0x0-0xFFF8 - The function ID
64504 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64505 	 * * 0xFFFD - Reserved for user-space HWRM interface
64506 	 * * 0xFFFF - HWRM
64507 	 */
64508 	uint16_t	target_id;
64509 	/*
64510 	 * A physical address pointer pointing to a host buffer that the
64511 	 * command's response data will be written. This can be either a host
64512 	 * physical address (HPA) or a guest physical address (GPA) and must
64513 	 * point to a physically contiguous block of memory.
64514 	 */
64515 	uint64_t	resp_addr;
64516 	/*
64517 	 * 64-bit Host Source Address.
64518 	 * This is where the source data is.
64519 	 */
64520 	uint64_t	host_src_addr;
64521 	/*
64522 	 * The Directory Entry Type (valid values are defined in the
64523 	 * bnxnvm_directory_type enum defined in the file bnxnvm_defs.h).
64524 	 */
64525 	uint16_t	dir_type;
64526 	/*
64527 	 * Directory ordinal.
64528 	 * The 0-based instance of the combined Directory Entry Type and
64529 	 * Extension.
64530 	 */
64531 	uint16_t	dir_ordinal;
64532 	/*
64533 	 * The Directory Entry Extension flags (see BNX_DIR_EXT_* in the file
64534 	 * bnxnvm_defs.h).
64535 	 */
64536 	uint16_t	dir_ext;
64537 	/*
64538 	 * Directory Entry Attribute flags (see BNX_DIR_ATTR_* in the file
64539 	 * bnxnvm_defs.h).
64540 	 */
64541 	uint16_t	dir_attr;
64542 	/*
64543 	 * Length of data to write, in bytes. May be less than or equal to the
64544 	 * allocated size for the directory entry.
64545 	 * The data length stored in the directory entry will be updated to
64546 	 * reflect this value once the write is complete.
64547 	 */
64548 	uint32_t	dir_data_length;
64549 	/* Option. */
64550 	uint16_t	option;
64551 	uint16_t	flags;
64552 	/*
64553 	 * When this bit is '1', the original active image
64554 	 * will not be removed. TBD: what purpose is this?
64555 	 */
64556 	#define HWRM_NVM_WRITE_INPUT_FLAGS_KEEP_ORIG_ACTIVE_IMG \
64557 		UINT32_C(0x1)
64558 	/*
64559 	 * This flag indicates the sender wants to modify a continuous
64560 	 * NVRAM area using a batch of this HWRM requests. The
64561 	 * offset of a request must be continuous to the end of previous
64562 	 * request's. Firmware does not update the directory entry until
64563 	 * receiving the last request, which is indicated by the batch_last
64564 	 * flag. This flag is set usually when a sender does not have a
64565 	 * block of memory that is big enough to hold the entire NVRAM
64566 	 * data for send at one time.
64567 	 */
64568 	#define HWRM_NVM_WRITE_INPUT_FLAGS_BATCH_MODE \
64569 		UINT32_C(0x2)
64570 	/*
64571 	 * This flag can be used only when the batch_mode flag is set. It
64572 	 * indicates this request is the last of batch requests.
64573 	 */
64574 	#define HWRM_NVM_WRITE_INPUT_FLAGS_BATCH_LAST \
64575 		UINT32_C(0x4)
64576 	/*
64577 	 * The requested length of the allocated NVM for the item, in bytes.
64578 	 * This value may be greater than or equal to the specified data
64579 	 * length (dir_data_length).
64580 	 * If this value is less than the specified data length, it will be
64581 	 * ignored. The response will contain the actual allocated item length,
64582 	 * which may be greater than the requested item length.
64583 	 * The purpose for allocating more than the required number of bytes
64584 	 * for an item's data is to pre-allocate extra storage (padding) to
64585 	 * accommodate the potential future growth of an item (e.g. upgraded
64586 	 * firmware with a size increase, log growth, expanded configuration
64587 	 * data).
64588 	 */
64589 	uint32_t	dir_item_length;
64590 	/*
64591 	 * 32-bit offset of data blob from where data is being written.
64592 	 * Only valid for batch mode. For non-batch writes 'dont care'.
64593 	 */
64594 	uint32_t	offset;
64595 	/*
64596 	 * Length of data to be written.Should be non-zero.
64597 	 * Only valid for batch mode. For non-batch writes 'dont care'.
64598 	 */
64599 	uint32_t	len;
64600 	uint32_t	unused_0;
64601 } __rte_packed_end;
64602 
64603 /* hwrm_nvm_write_output (size:128b/16B) */
64604 struct __rte_packed_begin hwrm_nvm_write_output {
64605 	/* The specific error status for the command. */
64606 	uint16_t	error_code;
64607 	/* The HWRM command request type. */
64608 	uint16_t	req_type;
64609 	/* The sequence ID from the original command. */
64610 	uint16_t	seq_id;
64611 	/* The length of the response data in number of bytes. */
64612 	uint16_t	resp_len;
64613 	/*
64614 	 * Length of the allocated NVM for the item, in bytes. The value may be
64615 	 * greater than or equal to the specified data length or the requested
64616 	 * item length.
64617 	 * The actual item length used when creating a new directory entry will
64618 	 * be a multiple of an NVM block size.
64619 	 */
64620 	uint32_t	dir_item_length;
64621 	/* The directory index of the created or modified item. */
64622 	uint16_t	dir_idx;
64623 	uint8_t	unused_0;
64624 	/*
64625 	 * This field is used in Output records to indicate that the output
64626 	 * is completely written to RAM. This field should be read as '1'
64627 	 * to indicate that the output has been completely written. When
64628 	 * writing a command completion or response to an internal processor,
64629 	 * the order of writes has to be such that this field is written last.
64630 	 */
64631 	uint8_t	valid;
64632 } __rte_packed_end;
64633 
64634 /* hwrm_nvm_write_cmd_err (size:64b/8B) */
64635 struct __rte_packed_begin hwrm_nvm_write_cmd_err {
64636 	/*
64637 	 * command specific error codes that goes to
64638 	 * the cmd_err field in Common HWRM Error Response.
64639 	 */
64640 	uint8_t	code;
64641 	/* Unknown error */
64642 	#define HWRM_NVM_WRITE_CMD_ERR_CODE_UNKNOWN  UINT32_C(0x0)
64643 	/* Unable to complete operation due to fragmentation */
64644 	#define HWRM_NVM_WRITE_CMD_ERR_CODE_FRAG_ERR UINT32_C(0x1)
64645 	/* nvm is completely full. */
64646 	#define HWRM_NVM_WRITE_CMD_ERR_CODE_NO_SPACE UINT32_C(0x2)
64647 	#define HWRM_NVM_WRITE_CMD_ERR_CODE_LAST \
64648 		HWRM_NVM_WRITE_CMD_ERR_CODE_NO_SPACE
64649 	uint8_t	unused_0[7];
64650 } __rte_packed_end;
64651 
64652 /*******************
64653  * hwrm_nvm_modify *
64654  *******************/
64655 
64656 
64657 /* hwrm_nvm_modify_input (size:320b/40B) */
64658 struct __rte_packed_begin hwrm_nvm_modify_input {
64659 	/* The HWRM command request type. */
64660 	uint16_t	req_type;
64661 	/*
64662 	 * The completion ring to send the completion event on. This should
64663 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64664 	 */
64665 	uint16_t	cmpl_ring;
64666 	/*
64667 	 * The sequence ID is used by the driver for tracking multiple
64668 	 * commands. This ID is treated as opaque data by the firmware and
64669 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64670 	 */
64671 	uint16_t	seq_id;
64672 	/*
64673 	 * The target ID of the command:
64674 	 * * 0x0-0xFFF8 - The function ID
64675 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64676 	 * * 0xFFFD - Reserved for user-space HWRM interface
64677 	 * * 0xFFFF - HWRM
64678 	 */
64679 	uint16_t	target_id;
64680 	/*
64681 	 * A physical address pointer pointing to a host buffer that the
64682 	 * command's response data will be written. This can be either a host
64683 	 * physical address (HPA) or a guest physical address (GPA) and must
64684 	 * point to a physically contiguous block of memory.
64685 	 */
64686 	uint64_t	resp_addr;
64687 	/*
64688 	 * 64-bit Host Source Address.
64689 	 * This is where the modified data is.
64690 	 */
64691 	uint64_t	host_src_addr;
64692 	/* 16-bit directory entry index. */
64693 	uint16_t	dir_idx;
64694 	uint16_t	flags;
64695 	/*
64696 	 * This flag indicates the sender wants to modify a continuous NVRAM
64697 	 * area using a batch of this HWRM requests. The offset of a request
64698 	 * must be continuous to the end of previous request's. Firmware does
64699 	 * not update the directory entry until receiving the last request,
64700 	 * which is indicated by the batch_last flag.
64701 	 * This flag is set usually when a sender does not have a block of
64702 	 * memory that is big enough to hold the entire NVRAM data for send
64703 	 * at one time.
64704 	 */
64705 	#define HWRM_NVM_MODIFY_INPUT_FLAGS_BATCH_MODE     UINT32_C(0x1)
64706 	/*
64707 	 * This flag can be used only when the batch_mode flag is set.
64708 	 * It indicates this request is the last of batch requests.
64709 	 */
64710 	#define HWRM_NVM_MODIFY_INPUT_FLAGS_BATCH_LAST     UINT32_C(0x2)
64711 	/* 32-bit NVRAM byte-offset to modify content from. */
64712 	uint32_t	offset;
64713 	/*
64714 	 * Length of data to be modified, in bytes. The length shall
64715 	 * be non-zero.
64716 	 */
64717 	uint32_t	len;
64718 	uint8_t	unused_1[4];
64719 } __rte_packed_end;
64720 
64721 /* hwrm_nvm_modify_output (size:128b/16B) */
64722 struct __rte_packed_begin hwrm_nvm_modify_output {
64723 	/* The specific error status for the command. */
64724 	uint16_t	error_code;
64725 	/* The HWRM command request type. */
64726 	uint16_t	req_type;
64727 	/* The sequence ID from the original command. */
64728 	uint16_t	seq_id;
64729 	/* The length of the response data in number of bytes. */
64730 	uint16_t	resp_len;
64731 	uint8_t	unused_0[7];
64732 	/*
64733 	 * This field is used in Output records to indicate that the output
64734 	 * is completely written to RAM. This field should be read as '1'
64735 	 * to indicate that the output has been completely written. When
64736 	 * writing a command completion or response to an internal processor,
64737 	 * the order of writes has to be such that this field is written last.
64738 	 */
64739 	uint8_t	valid;
64740 } __rte_packed_end;
64741 
64742 /***************************
64743  * hwrm_nvm_find_dir_entry *
64744  ***************************/
64745 
64746 
64747 /* hwrm_nvm_find_dir_entry_input (size:256b/32B) */
64748 struct __rte_packed_begin hwrm_nvm_find_dir_entry_input {
64749 	/* The HWRM command request type. */
64750 	uint16_t	req_type;
64751 	/*
64752 	 * The completion ring to send the completion event on. This should
64753 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64754 	 */
64755 	uint16_t	cmpl_ring;
64756 	/*
64757 	 * The sequence ID is used by the driver for tracking multiple
64758 	 * commands. This ID is treated as opaque data by the firmware and
64759 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64760 	 */
64761 	uint16_t	seq_id;
64762 	/*
64763 	 * The target ID of the command:
64764 	 * * 0x0-0xFFF8 - The function ID
64765 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64766 	 * * 0xFFFD - Reserved for user-space HWRM interface
64767 	 * * 0xFFFF - HWRM
64768 	 */
64769 	uint16_t	target_id;
64770 	/*
64771 	 * A physical address pointer pointing to a host buffer that the
64772 	 * command's response data will be written. This can be either a host
64773 	 * physical address (HPA) or a guest physical address (GPA) and must
64774 	 * point to a physically contiguous block of memory.
64775 	 */
64776 	uint64_t	resp_addr;
64777 	uint32_t	enables;
64778 	/*
64779 	 * This bit must be '1' for the dir_idx_valid field to be
64780 	 * configured.
64781 	 */
64782 	#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_ENABLES_DIR_IDX_VALID \
64783 		UINT32_C(0x1)
64784 	/* Directory Entry Index */
64785 	uint16_t	dir_idx;
64786 	/* Directory Entry (Image) Type */
64787 	uint16_t	dir_type;
64788 	/*
64789 	 * Directory ordinal.
64790 	 * The instance of this Directory Type
64791 	 */
64792 	uint16_t	dir_ordinal;
64793 	/* The Directory Entry Extension flags. */
64794 	uint16_t	dir_ext;
64795 	/* This value indicates the search option using dir_ordinal. */
64796 	uint8_t	opt_ordinal;
64797 	/* This value indicates the search option using dir_ordinal. */
64798 	#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_MASK UINT32_C(0x3)
64799 	#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_SFT 0
64800 	/* Equal to specified ordinal value. */
64801 	#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_EQ    UINT32_C(0x0)
64802 	/* Greater than or equal to specified ordinal value */
64803 	#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GE    UINT32_C(0x1)
64804 	/* Greater than specified ordinal value */
64805 	#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GT    UINT32_C(0x2)
64806 	#define HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_LAST \
64807 		HWRM_NVM_FIND_DIR_ENTRY_INPUT_OPT_ORDINAL_GT
64808 	uint8_t	unused_0[3];
64809 } __rte_packed_end;
64810 
64811 /* hwrm_nvm_find_dir_entry_output (size:256b/32B) */
64812 struct __rte_packed_begin hwrm_nvm_find_dir_entry_output {
64813 	/* The specific error status for the command. */
64814 	uint16_t	error_code;
64815 	/* The HWRM command request type. */
64816 	uint16_t	req_type;
64817 	/* The sequence ID from the original command. */
64818 	uint16_t	seq_id;
64819 	/* The length of the response data in number of bytes. */
64820 	uint16_t	resp_len;
64821 	/* Allocated NVRAM for this directory entry, in bytes. */
64822 	uint32_t	dir_item_length;
64823 	/* Size of the stored data for this directory entry, in bytes. */
64824 	uint32_t	dir_data_length;
64825 	/*
64826 	 * Firmware version.
64827 	 * Only valid if the directory entry is for embedded firmware stored
64828 	 * in APE_BIN Format.
64829 	 */
64830 	uint32_t	fw_ver;
64831 	/* Directory ordinal. */
64832 	uint16_t	dir_ordinal;
64833 	/* Directory Entry Index */
64834 	uint16_t	dir_idx;
64835 	uint8_t	unused_0[7];
64836 	/*
64837 	 * This field is used in Output records to indicate that the output
64838 	 * is completely written to RAM. This field should be read as '1'
64839 	 * to indicate that the output has been completely written. When
64840 	 * writing a command completion or response to an internal processor,
64841 	 * the order of writes has to be such that this field is written last.
64842 	 */
64843 	uint8_t	valid;
64844 } __rte_packed_end;
64845 
64846 /****************************
64847  * hwrm_nvm_erase_dir_entry *
64848  ****************************/
64849 
64850 
64851 /* hwrm_nvm_erase_dir_entry_input (size:192b/24B) */
64852 struct __rte_packed_begin hwrm_nvm_erase_dir_entry_input {
64853 	/* The HWRM command request type. */
64854 	uint16_t	req_type;
64855 	/*
64856 	 * The completion ring to send the completion event on. This should
64857 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64858 	 */
64859 	uint16_t	cmpl_ring;
64860 	/*
64861 	 * The sequence ID is used by the driver for tracking multiple
64862 	 * commands. This ID is treated as opaque data by the firmware and
64863 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64864 	 */
64865 	uint16_t	seq_id;
64866 	/*
64867 	 * The target ID of the command:
64868 	 * * 0x0-0xFFF8 - The function ID
64869 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64870 	 * * 0xFFFD - Reserved for user-space HWRM interface
64871 	 * * 0xFFFF - HWRM
64872 	 */
64873 	uint16_t	target_id;
64874 	/*
64875 	 * A physical address pointer pointing to a host buffer that the
64876 	 * command's response data will be written. This can be either a host
64877 	 * physical address (HPA) or a guest physical address (GPA) and must
64878 	 * point to a physically contiguous block of memory.
64879 	 */
64880 	uint64_t	resp_addr;
64881 	/* Directory Entry Index */
64882 	uint16_t	dir_idx;
64883 	uint8_t	unused_0[6];
64884 } __rte_packed_end;
64885 
64886 /* hwrm_nvm_erase_dir_entry_output (size:128b/16B) */
64887 struct __rte_packed_begin hwrm_nvm_erase_dir_entry_output {
64888 	/* The specific error status for the command. */
64889 	uint16_t	error_code;
64890 	/* The HWRM command request type. */
64891 	uint16_t	req_type;
64892 	/* The sequence ID from the original command. */
64893 	uint16_t	seq_id;
64894 	/* The length of the response data in number of bytes. */
64895 	uint16_t	resp_len;
64896 	uint8_t	unused_0[7];
64897 	/*
64898 	 * This field is used in Output records to indicate that the output
64899 	 * is completely written to RAM. This field should be read as '1'
64900 	 * to indicate that the output has been completely written. When
64901 	 * writing a command completion or response to an internal processor,
64902 	 * the order of writes has to be such that this field is written last.
64903 	 */
64904 	uint8_t	valid;
64905 } __rte_packed_end;
64906 
64907 /*************************
64908  * hwrm_nvm_get_dev_info *
64909  *************************/
64910 
64911 
64912 /* hwrm_nvm_get_dev_info_input (size:128b/16B) */
64913 struct __rte_packed_begin hwrm_nvm_get_dev_info_input {
64914 	/* The HWRM command request type. */
64915 	uint16_t	req_type;
64916 	/*
64917 	 * The completion ring to send the completion event on. This should
64918 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
64919 	 */
64920 	uint16_t	cmpl_ring;
64921 	/*
64922 	 * The sequence ID is used by the driver for tracking multiple
64923 	 * commands. This ID is treated as opaque data by the firmware and
64924 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
64925 	 */
64926 	uint16_t	seq_id;
64927 	/*
64928 	 * The target ID of the command:
64929 	 * * 0x0-0xFFF8 - The function ID
64930 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
64931 	 * * 0xFFFD - Reserved for user-space HWRM interface
64932 	 * * 0xFFFF - HWRM
64933 	 */
64934 	uint16_t	target_id;
64935 	/*
64936 	 * A physical address pointer pointing to a host buffer that the
64937 	 * command's response data will be written. This can be either a host
64938 	 * physical address (HPA) or a guest physical address (GPA) and must
64939 	 * point to a physically contiguous block of memory.
64940 	 */
64941 	uint64_t	resp_addr;
64942 } __rte_packed_end;
64943 
64944 /* hwrm_nvm_get_dev_info_output (size:704b/88B) */
64945 struct __rte_packed_begin hwrm_nvm_get_dev_info_output {
64946 	/* The specific error status for the command. */
64947 	uint16_t	error_code;
64948 	/* The HWRM command request type. */
64949 	uint16_t	req_type;
64950 	/* The sequence ID from the original command. */
64951 	uint16_t	seq_id;
64952 	/* The length of the response data in number of bytes. */
64953 	uint16_t	resp_len;
64954 	/* Manufacturer ID. */
64955 	uint16_t	manufacturer_id;
64956 	/* Device ID. */
64957 	uint16_t	device_id;
64958 	/* Sector size of the NVRAM device. */
64959 	uint32_t	sector_size;
64960 	/* Total size, in bytes of the NVRAM device. */
64961 	uint32_t	nvram_size;
64962 	uint32_t	reserved_size;
64963 	/*
64964 	 * Available size that can be used, in bytes. Available size is the
64965 	 * NVRAM size take away the used size and reserved size.
64966 	 */
64967 	uint32_t	available_size;
64968 	/* This field represents the major version of NVM cfg */
64969 	uint8_t	nvm_cfg_ver_maj;
64970 	/* This field represents the minor version of NVM cfg */
64971 	uint8_t	nvm_cfg_ver_min;
64972 	/* This field represents the update version of NVM cfg */
64973 	uint8_t	nvm_cfg_ver_upd;
64974 	uint8_t	flags;
64975 	/*
64976 	 * If set to 1, firmware will provide various firmware version
64977 	 * information stored in the flash.
64978 	 */
64979 	#define HWRM_NVM_GET_DEV_INFO_OUTPUT_FLAGS_FW_VER_VALID \
64980 		UINT32_C(0x1)
64981 	/*
64982 	 * This field represents the board package name stored in the flash.
64983 	 * (ASCII chars with NULL at the end).
64984 	 */
64985 	char	pkg_name[16];
64986 	/*
64987 	 * This field represents the major version of HWRM firmware, stored in
64988 	 * the flash.
64989 	 */
64990 	uint16_t	hwrm_fw_major;
64991 	/*
64992 	 * This field represents the minor version of HWRM firmware, stored in
64993 	 * the flash.
64994 	 */
64995 	uint16_t	hwrm_fw_minor;
64996 	/*
64997 	 * This field represents the build version of HWRM firmware, stored in
64998 	 * the flash.
64999 	 */
65000 	uint16_t	hwrm_fw_build;
65001 	/*
65002 	 * This field can be used to represent firmware branches or customer
65003 	 * specific releases tied to a specific (major, minor, build) version
65004 	 * of the HWRM firmware.
65005 	 */
65006 	uint16_t	hwrm_fw_patch;
65007 	/*
65008 	 * This field represents the major version of mgmt firmware, stored in
65009 	 * the flash.
65010 	 */
65011 	uint16_t	mgmt_fw_major;
65012 	/*
65013 	 * This field represents the minor version of mgmt firmware, stored in
65014 	 * the flash.
65015 	 */
65016 	uint16_t	mgmt_fw_minor;
65017 	/*
65018 	 * This field represents the build version of mgmt firmware, stored in
65019 	 * the flash.
65020 	 */
65021 	uint16_t	mgmt_fw_build;
65022 	/*
65023 	 * This field can be used to represent firmware branches or customer
65024 	 * specific releases tied to a specific (major, minor, build) version
65025 	 * of the mgmt firmware.
65026 	 */
65027 	uint16_t	mgmt_fw_patch;
65028 	/*
65029 	 * This field represents the major version of roce firmware, stored in
65030 	 * the flash.
65031 	 */
65032 	uint16_t	roce_fw_major;
65033 	/*
65034 	 * This field represents the minor version of roce firmware, stored in
65035 	 * the flash.
65036 	 */
65037 	uint16_t	roce_fw_minor;
65038 	/*
65039 	 * This field represents the build version of roce firmware, stored in
65040 	 * the flash.
65041 	 */
65042 	uint16_t	roce_fw_build;
65043 	/*
65044 	 * This field can be used to represent firmware branches or customer
65045 	 * specific releases tied to a specific (major, minor, build) version
65046 	 * of the roce firmware.
65047 	 */
65048 	uint16_t	roce_fw_patch;
65049 	/*
65050 	 * This field represents the major version of network control firmware,
65051 	 * stored in the flash.
65052 	 */
65053 	uint16_t	netctrl_fw_major;
65054 	/*
65055 	 * This field represents the minor version of network control firmware,
65056 	 * stored in the flash.
65057 	 */
65058 	uint16_t	netctrl_fw_minor;
65059 	/*
65060 	 * This field represents the build version of network control firmware,
65061 	 * stored in the flash.
65062 	 */
65063 	uint16_t	netctrl_fw_build;
65064 	/*
65065 	 * This field can be used to represent firmware branches or customer
65066 	 * specific releases tied to a specific (major, minor, build) version
65067 	 * of the network control firmware.
65068 	 */
65069 	uint16_t	netctrl_fw_patch;
65070 	uint8_t	unused_0[7];
65071 	/*
65072 	 * This field is used in Output records to indicate that the output
65073 	 * is completely written to RAM. This field should be read as '1'
65074 	 * to indicate that the output has been completely written. When
65075 	 * writing a command completion or response to an internal processor,
65076 	 * the order of writes has to be such that this field is written last.
65077 	 */
65078 	uint8_t	valid;
65079 } __rte_packed_end;
65080 
65081 /**************************
65082  * hwrm_nvm_mod_dir_entry *
65083  **************************/
65084 
65085 
65086 /* hwrm_nvm_mod_dir_entry_input (size:256b/32B) */
65087 struct __rte_packed_begin hwrm_nvm_mod_dir_entry_input {
65088 	/* The HWRM command request type. */
65089 	uint16_t	req_type;
65090 	/*
65091 	 * The completion ring to send the completion event on. This should
65092 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65093 	 */
65094 	uint16_t	cmpl_ring;
65095 	/*
65096 	 * The sequence ID is used by the driver for tracking multiple
65097 	 * commands. This ID is treated as opaque data by the firmware and
65098 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65099 	 */
65100 	uint16_t	seq_id;
65101 	/*
65102 	 * The target ID of the command:
65103 	 * * 0x0-0xFFF8 - The function ID
65104 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65105 	 * * 0xFFFD - Reserved for user-space HWRM interface
65106 	 * * 0xFFFF - HWRM
65107 	 */
65108 	uint16_t	target_id;
65109 	/*
65110 	 * A physical address pointer pointing to a host buffer that the
65111 	 * command's response data will be written. This can be either a host
65112 	 * physical address (HPA) or a guest physical address (GPA) and must
65113 	 * point to a physically contiguous block of memory.
65114 	 */
65115 	uint64_t	resp_addr;
65116 	uint32_t	enables;
65117 	/*
65118 	 * This bit must be '1' for the checksum field to be
65119 	 * configured.
65120 	 */
65121 	#define HWRM_NVM_MOD_DIR_ENTRY_INPUT_ENABLES_CHECKSUM     UINT32_C(0x1)
65122 	/* Directory Entry Index */
65123 	uint16_t	dir_idx;
65124 	/*
65125 	 * Directory ordinal.
65126 	 * The (0-based) instance of this Directory Type.
65127 	 */
65128 	uint16_t	dir_ordinal;
65129 	/*
65130 	 * The Directory Entry Extension flags (see BNX_DIR_EXT_* for
65131 	 * extension flag definitions).
65132 	 */
65133 	uint16_t	dir_ext;
65134 	/*
65135 	 * Directory Entry Attribute flags (see BNX_DIR_ATTR_* for attribute
65136 	 * flag definitions).
65137 	 */
65138 	uint16_t	dir_attr;
65139 	/*
65140 	 * If valid, then this field updates the checksum
65141 	 * value of the content in the directory entry.
65142 	 */
65143 	uint32_t	checksum;
65144 } __rte_packed_end;
65145 
65146 /* hwrm_nvm_mod_dir_entry_output (size:128b/16B) */
65147 struct __rte_packed_begin hwrm_nvm_mod_dir_entry_output {
65148 	/* The specific error status for the command. */
65149 	uint16_t	error_code;
65150 	/* The HWRM command request type. */
65151 	uint16_t	req_type;
65152 	/* The sequence ID from the original command. */
65153 	uint16_t	seq_id;
65154 	/* The length of the response data in number of bytes. */
65155 	uint16_t	resp_len;
65156 	uint8_t	unused_0[7];
65157 	/*
65158 	 * This field is used in Output records to indicate that the output
65159 	 * is completely written to RAM. This field should be read as '1'
65160 	 * to indicate that the output has been completely written. When
65161 	 * writing a command completion or response to an internal processor,
65162 	 * the order of writes has to be such that this field is written last.
65163 	 */
65164 	uint8_t	valid;
65165 } __rte_packed_end;
65166 
65167 /**************************
65168  * hwrm_nvm_verify_update *
65169  **************************/
65170 
65171 
65172 /* hwrm_nvm_verify_update_input (size:192b/24B) */
65173 struct __rte_packed_begin hwrm_nvm_verify_update_input {
65174 	/* The HWRM command request type. */
65175 	uint16_t	req_type;
65176 	/*
65177 	 * The completion ring to send the completion event on. This should
65178 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65179 	 */
65180 	uint16_t	cmpl_ring;
65181 	/*
65182 	 * The sequence ID is used by the driver for tracking multiple
65183 	 * commands. This ID is treated as opaque data by the firmware and
65184 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65185 	 */
65186 	uint16_t	seq_id;
65187 	/*
65188 	 * The target ID of the command:
65189 	 * * 0x0-0xFFF8 - The function ID
65190 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65191 	 * * 0xFFFD - Reserved for user-space HWRM interface
65192 	 * * 0xFFFF - HWRM
65193 	 */
65194 	uint16_t	target_id;
65195 	/*
65196 	 * A physical address pointer pointing to a host buffer that the
65197 	 * command's response data will be written. This can be either a host
65198 	 * physical address (HPA) or a guest physical address (GPA) and must
65199 	 * point to a physically contiguous block of memory.
65200 	 */
65201 	uint64_t	resp_addr;
65202 	/* Directory Entry Type, to be verified. */
65203 	uint16_t	dir_type;
65204 	/*
65205 	 * Directory ordinal.
65206 	 * The instance of the Directory Type to be verified.
65207 	 */
65208 	uint16_t	dir_ordinal;
65209 	/*
65210 	 * The Directory Entry Extension flags.
65211 	 * The "UPDATE" extension flag must be set in this value.
65212 	 * A corresponding directory entry with the same type and ordinal
65213 	 * values but *without*
65214 	 * the "UPDATE" extension flag must also exist. The other flags of
65215 	 * the extension must
65216 	 * be identical between the active and update entries.
65217 	 */
65218 	uint16_t	dir_ext;
65219 	uint8_t	unused_0[2];
65220 } __rte_packed_end;
65221 
65222 /* hwrm_nvm_verify_update_output (size:128b/16B) */
65223 struct __rte_packed_begin hwrm_nvm_verify_update_output {
65224 	/* The specific error status for the command. */
65225 	uint16_t	error_code;
65226 	/* The HWRM command request type. */
65227 	uint16_t	req_type;
65228 	/* The sequence ID from the original command. */
65229 	uint16_t	seq_id;
65230 	/* The length of the response data in number of bytes. */
65231 	uint16_t	resp_len;
65232 	uint8_t	unused_0[7];
65233 	/*
65234 	 * This field is used in Output records to indicate that the output
65235 	 * is completely written to RAM. This field should be read as '1'
65236 	 * to indicate that the output has been completely written. When
65237 	 * writing a command completion or response to an internal processor,
65238 	 * the order of writes has to be such that this field is written last.
65239 	 */
65240 	uint8_t	valid;
65241 } __rte_packed_end;
65242 
65243 /***************************
65244  * hwrm_nvm_install_update *
65245  ***************************/
65246 
65247 
65248 /* hwrm_nvm_install_update_input (size:192b/24B) */
65249 struct __rte_packed_begin hwrm_nvm_install_update_input {
65250 	/* The HWRM command request type. */
65251 	uint16_t	req_type;
65252 	/*
65253 	 * The completion ring to send the completion event on. This should
65254 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65255 	 */
65256 	uint16_t	cmpl_ring;
65257 	/*
65258 	 * The sequence ID is used by the driver for tracking multiple
65259 	 * commands. This ID is treated as opaque data by the firmware and
65260 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65261 	 */
65262 	uint16_t	seq_id;
65263 	/*
65264 	 * The target ID of the command:
65265 	 * * 0x0-0xFFF8 - The function ID
65266 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65267 	 * * 0xFFFD - Reserved for user-space HWRM interface
65268 	 * * 0xFFFF - HWRM
65269 	 */
65270 	uint16_t	target_id;
65271 	/*
65272 	 * A physical address pointer pointing to a host buffer that the
65273 	 * command's response data will be written. This can be either a host
65274 	 * physical address (HPA) or a guest physical address (GPA) and must
65275 	 * point to a physically contiguous block of memory.
65276 	 */
65277 	uint64_t	resp_addr;
65278 	/*
65279 	 * Installation type. If the value 3 through 0xffff is used,
65280 	 * only packaged items with that type value will be installed and
65281 	 * conditional installation directives for those packaged items
65282 	 * will be over-ridden (i.e. 'create' or 'replace' will be treated
65283 	 * as 'install').
65284 	 */
65285 	uint32_t	install_type;
65286 	/*
65287 	 * Perform a normal package installation. Conditional installation
65288 	 * directives (e.g. 'create' and 'replace') of packaged items
65289 	 * will be followed.
65290 	 */
65291 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_NORMAL UINT32_C(0x0)
65292 	/*
65293 	 * Install all packaged items regardless of installation directive
65294 	 * (i.e. treat all packaged items as though they have an installation
65295 	 * directive of 'install').
65296 	 */
65297 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_ALL \
65298 		UINT32_C(0xffffffff)
65299 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_LAST \
65300 		HWRM_NVM_INSTALL_UPDATE_INPUT_INSTALL_TYPE_ALL
65301 	uint16_t	flags;
65302 	/*
65303 	 * If set to 1, then securely erase all unused locations in
65304 	 * persistent storage.
65305 	 */
65306 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_ERASE_UNUSED_SPACE \
65307 		UINT32_C(0x1)
65308 	/*
65309 	 * If set to 1, then unspecified images, images not in the package
65310 	 * file, will be safely deleted.
65311 	 * When combined with erase_unused_space then unspecified images will
65312 	 * be securely erased.
65313 	 */
65314 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_REMOVE_UNUSED_PKG \
65315 		UINT32_C(0x2)
65316 	/*
65317 	 * If set to 1, FW will defragment the NVM if defragmentation is
65318 	 * required for the update.
65319 	 * Allow additional time for this command to complete if this bit is
65320 	 * set to 1.
65321 	 */
65322 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_ALLOWED_TO_DEFRAG \
65323 		UINT32_C(0x4)
65324 	/*
65325 	 * If set to 1, FW will verify the package in the "UPDATE" NVM item
65326 	 * without installing it. This flag is for FW internal use only.
65327 	 * Users should not set this flag. The request will otherwise fail.
65328 	 */
65329 	#define HWRM_NVM_INSTALL_UPDATE_INPUT_FLAGS_VERIFY_ONLY \
65330 		UINT32_C(0x8)
65331 	uint8_t	unused_0[2];
65332 } __rte_packed_end;
65333 
65334 /* hwrm_nvm_install_update_output (size:192b/24B) */
65335 struct __rte_packed_begin hwrm_nvm_install_update_output {
65336 	/* The specific error status for the command. */
65337 	uint16_t	error_code;
65338 	/* The HWRM command request type. */
65339 	uint16_t	req_type;
65340 	/* The sequence ID from the original command. */
65341 	uint16_t	seq_id;
65342 	/* The length of the response data in number of bytes. */
65343 	uint16_t	resp_len;
65344 	/*
65345 	 * Bit-mask of successfully installed items.
65346 	 * Bit-0 corresponding to the first packaged item, Bit-1 for the second
65347 	 * item, etc. A value of 0 indicates that no items were successfully
65348 	 * installed.
65349 	 */
65350 	uint64_t	installed_items;
65351 	/* result is 8 b corresponding to BCMRETVAL error codes */
65352 	uint8_t	result;
65353 	/* There was no problem with the package installation. */
65354 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_SUCCESS \
65355 		UINT32_C(0x0)
65356 	/* Generic failure */
65357 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_FAILURE \
65358 		UINT32_C(0xff)
65359 	/* Allocation error malloc failure */
65360 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_MALLOC_FAILURE \
65361 		UINT32_C(0xfd)
65362 	/* NVM install error due to invalid index */
65363 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_INDEX_PARAMETER \
65364 		UINT32_C(0xfb)
65365 	/* NVM install error due to invalid type */
65366 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_TYPE_PARAMETER \
65367 		UINT32_C(0xf3)
65368 	/* Invalid package due to invalid prerequisite */
65369 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_PREREQUISITE \
65370 		UINT32_C(0xf2)
65371 	/* Invalid package due to invalid file header */
65372 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_FILE_HEADER \
65373 		UINT32_C(0xec)
65374 	/* Invalid package due to invalid format */
65375 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_SIGNATURE \
65376 		UINT32_C(0xeb)
65377 	/* Invalid package due to invalid property stream */
65378 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_PROP_STREAM \
65379 		UINT32_C(0xea)
65380 	/* Invalid package due to invalid property length */
65381 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_PROP_LENGTH \
65382 		UINT32_C(0xe9)
65383 	/* Invalid package due to invalid manifest */
65384 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_MANIFEST \
65385 		UINT32_C(0xe8)
65386 	/* Invalid package due to invalid trailer */
65387 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_TRAILER \
65388 		UINT32_C(0xe7)
65389 	/* Invalid package due to invalid checksum */
65390 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_CHECKSUM \
65391 		UINT32_C(0xe6)
65392 	/* Invalid package due to invalid item checksum */
65393 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_ITEM_CHECKSUM \
65394 		UINT32_C(0xe5)
65395 	/* Invalid package due to invalid length */
65396 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_DATA_LENGTH \
65397 		UINT32_C(0xe4)
65398 	/* Invalid package due to invalid directive */
65399 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INVALID_DIRECTIVE \
65400 		UINT32_C(0xe1)
65401 	/* Invalid device due to unsupported chip revision */
65402 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_UNSUPPORTED_CHIP_REV \
65403 		UINT32_C(0xce)
65404 	/* Invalid device due to unsupported device ID */
65405 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_UNSUPPORTED_DEVICE_ID \
65406 		UINT32_C(0xcd)
65407 	/* Invalid device due to unsupported subsystem vendor */
65408 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_UNSUPPORTED_SUBSYS_VENDOR \
65409 		UINT32_C(0xcc)
65410 	/* Invalid device due to unsupported subsystem ID */
65411 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_UNSUPPORTED_SUBSYS_ID \
65412 		UINT32_C(0xcb)
65413 	/* Invalid device due to unsupported product ID or customer ID */
65414 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_UNSUPPORTED_PLATFORM \
65415 		UINT32_C(0xc5)
65416 	/* Invalid package due to duplicate item */
65417 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_DUPLICATE_ITEM \
65418 		UINT32_C(0xc4)
65419 	/* Invalid package due to zero length item */
65420 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_ZERO_LENGTH_ITEM \
65421 		UINT32_C(0xc3)
65422 	/* NVM integrity error checksum */
65423 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INSTALL_CHECKSUM_ERROR \
65424 		UINT32_C(0xb9)
65425 	/* NVM integrity error */
65426 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INSTALL_DATA_ERROR \
65427 		UINT32_C(0xb8)
65428 	/* Authentication error */
65429 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_INSTALL_AUTHENTICATION_ERROR \
65430 		UINT32_C(0xb7)
65431 	/* NVM install error item not found */
65432 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_ITEM_NOT_FOUND \
65433 		UINT32_C(0xb0)
65434 	/* NVM install error item locked */
65435 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_ITEM_LOCKED \
65436 		UINT32_C(0xa7)
65437 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_LAST \
65438 		HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESULT_ITEM_LOCKED
65439 	/* problem_item is 8 b */
65440 	uint8_t	problem_item;
65441 	/* There was no problem with any packaged items. */
65442 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_NONE \
65443 		UINT32_C(0x0)
65444 	/* There was a problem with the NVM package itself. */
65445 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_PACKAGE \
65446 		UINT32_C(0xff)
65447 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_LAST \
65448 		HWRM_NVM_INSTALL_UPDATE_OUTPUT_PROBLEM_ITEM_PACKAGE
65449 	/* reset_required is 8 b */
65450 	uint8_t	reset_required;
65451 	/*
65452 	 * No reset is required for installed/updated firmware or
65453 	 * microcode to take effect.
65454 	 */
65455 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_NONE \
65456 		UINT32_C(0x0)
65457 	/*
65458 	 * A PCIe reset (e.g. system reboot) is
65459 	 * required for newly installed/updated firmware or
65460 	 * microcode to take effect.
65461 	 */
65462 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_PCI \
65463 		UINT32_C(0x1)
65464 	/*
65465 	 * A controller power reset (e.g. system power-cycle) is
65466 	 * required for newly installed/updated firmware or
65467 	 * microcode to take effect. Some newly installed/updated
65468 	 * firmware or microcode may still take effect upon the
65469 	 * next PCIe reset.
65470 	 */
65471 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_POWER \
65472 		UINT32_C(0x2)
65473 	#define HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_LAST \
65474 		HWRM_NVM_INSTALL_UPDATE_OUTPUT_RESET_REQUIRED_POWER
65475 	uint8_t	unused_0[4];
65476 	/*
65477 	 * This field is used in Output records to indicate that the output
65478 	 * is completely written to RAM. This field should be read as '1'
65479 	 * to indicate that the output has been completely written. When
65480 	 * writing a command completion or response to an internal processor,
65481 	 * the order of writes has to be such that this field is written last.
65482 	 */
65483 	uint8_t	valid;
65484 } __rte_packed_end;
65485 
65486 /* hwrm_nvm_install_update_cmd_err (size:64b/8B) */
65487 struct __rte_packed_begin hwrm_nvm_install_update_cmd_err {
65488 	/*
65489 	 * command specific error codes that goes to
65490 	 * the cmd_err field in Common HWRM Error Response.
65491 	 */
65492 	uint8_t	code;
65493 	/* Unknown error */
65494 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_UNKNOWN \
65495 		UINT32_C(0x0)
65496 	/* Unable to complete operation due to fragmentation */
65497 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR \
65498 		UINT32_C(0x1)
65499 	/* nvm is completely full. */
65500 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_NO_SPACE \
65501 		UINT32_C(0x2)
65502 	/* Firmware update failed due to Anti-rollback. */
65503 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_ANTI_ROLLBACK \
65504 		UINT32_C(0x3)
65505 	/* Firmware update does not support voltage regulators on the device. */
65506 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_NO_VOLTREG_SUPPORT \
65507 		UINT32_C(0x4)
65508 	#define HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_LAST \
65509 		HWRM_NVM_INSTALL_UPDATE_CMD_ERR_CODE_NO_VOLTREG_SUPPORT
65510 	uint8_t	unused_0[7];
65511 } __rte_packed_end;
65512 
65513 /******************
65514  * hwrm_nvm_flush *
65515  ******************/
65516 
65517 
65518 /* hwrm_nvm_flush_input (size:128b/16B) */
65519 struct __rte_packed_begin hwrm_nvm_flush_input {
65520 	/* The HWRM command request type. */
65521 	uint16_t	req_type;
65522 	/*
65523 	 * The completion ring to send the completion event on. This should
65524 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65525 	 */
65526 	uint16_t	cmpl_ring;
65527 	/*
65528 	 * The sequence ID is used by the driver for tracking multiple
65529 	 * commands. This ID is treated as opaque data by the firmware and
65530 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65531 	 */
65532 	uint16_t	seq_id;
65533 	/*
65534 	 * The target ID of the command:
65535 	 * * 0x0-0xFFF8 - The function ID
65536 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65537 	 * * 0xFFFD - Reserved for user-space HWRM interface
65538 	 * * 0xFFFF - HWRM
65539 	 */
65540 	uint16_t	target_id;
65541 	/*
65542 	 * A physical address pointer pointing to a host buffer that the
65543 	 * command's response data will be written. This can be either a host
65544 	 * physical address (HPA) or a guest physical address (GPA) and must
65545 	 * point to a physically contiguous block of memory.
65546 	 */
65547 	uint64_t	resp_addr;
65548 } __rte_packed_end;
65549 
65550 /* hwrm_nvm_flush_output (size:128b/16B) */
65551 struct __rte_packed_begin hwrm_nvm_flush_output {
65552 	/* The specific error status for the command. */
65553 	uint16_t	error_code;
65554 	/* The HWRM command request type. */
65555 	uint16_t	req_type;
65556 	/* The sequence ID from the original command. */
65557 	uint16_t	seq_id;
65558 	/* The length of the response data in number of bytes. */
65559 	uint16_t	resp_len;
65560 	uint8_t	unused_0[7];
65561 	/*
65562 	 * This field is used in Output records to indicate that the output
65563 	 * is completely written to RAM. This field should be read as '1'
65564 	 * to indicate that the output has been completely written. When
65565 	 * writing a command completion or response to an internal processor,
65566 	 * the order of writes has to be such that this field is written last.
65567 	 */
65568 	uint8_t	valid;
65569 } __rte_packed_end;
65570 
65571 /* hwrm_nvm_flush_cmd_err (size:64b/8B) */
65572 struct __rte_packed_begin hwrm_nvm_flush_cmd_err {
65573 	/*
65574 	 * command specific error codes that goes to
65575 	 * the cmd_err field in Common HWRM Error Response.
65576 	 */
65577 	uint8_t	code;
65578 	/* Unknown error */
65579 	#define HWRM_NVM_FLUSH_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0)
65580 	/* flush could not be performed */
65581 	#define HWRM_NVM_FLUSH_CMD_ERR_CODE_FAIL    UINT32_C(0x1)
65582 	#define HWRM_NVM_FLUSH_CMD_ERR_CODE_LAST \
65583 		HWRM_NVM_FLUSH_CMD_ERR_CODE_FAIL
65584 	uint8_t	unused_0[7];
65585 } __rte_packed_end;
65586 
65587 /*************************
65588  * hwrm_nvm_get_variable *
65589  *************************/
65590 
65591 
65592 /* hwrm_nvm_get_variable_input (size:320b/40B) */
65593 struct __rte_packed_begin hwrm_nvm_get_variable_input {
65594 	/* The HWRM command request type. */
65595 	uint16_t	req_type;
65596 	/*
65597 	 * The completion ring to send the completion event on. This should
65598 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65599 	 */
65600 	uint16_t	cmpl_ring;
65601 	/*
65602 	 * The sequence ID is used by the driver for tracking multiple
65603 	 * commands. This ID is treated as opaque data by the firmware and
65604 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65605 	 */
65606 	uint16_t	seq_id;
65607 	/*
65608 	 * The target ID of the command:
65609 	 * * 0x0-0xFFF8 - The function ID
65610 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65611 	 * * 0xFFFD - Reserved for user-space HWRM interface
65612 	 * * 0xFFFF - HWRM
65613 	 */
65614 	uint16_t	target_id;
65615 	/*
65616 	 * A physical address pointer pointing to a host buffer that the
65617 	 * command's response data will be written. This can be either a host
65618 	 * physical address (HPA) or a guest physical address (GPA) and must
65619 	 * point to a physically contiguous block of memory.
65620 	 */
65621 	uint64_t	resp_addr;
65622 	/*
65623 	 * This is the host address where
65624 	 * nvm variable will be stored
65625 	 */
65626 	uint64_t	dest_data_addr;
65627 	/* size of data in bits */
65628 	uint16_t	data_len;
65629 	/* nvm cfg option number */
65630 	uint16_t	option_num;
65631 	/* reserved. */
65632 	#define HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_RSVD_0    UINT32_C(0x0)
65633 	/* reserved. */
65634 	#define HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF \
65635 		UINT32_C(0xffff)
65636 	#define HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_LAST \
65637 		HWRM_NVM_GET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF
65638 	/*
65639 	 * Number of dimensions for this nvm configuration variable.
65640 	 * This value indicates how many of the indexN values to use.
65641 	 * A value of 0 means that none of the indexN values are valid.
65642 	 * A value of 1 requires at index0 is valued, a value of 2
65643 	 * requires that index0 and index1 are valid, and so forth
65644 	 */
65645 	uint16_t	dimensions;
65646 	/* index for the 1st dimensions */
65647 	uint16_t	index_0;
65648 	/* index for the 2nd dimensions */
65649 	uint16_t	index_1;
65650 	/* index for the 3rd dimensions */
65651 	uint16_t	index_2;
65652 	/* index for the 4th dimensions */
65653 	uint16_t	index_3;
65654 	uint8_t	flags;
65655 	/*
65656 	 * When this bit is set to 1, the factory default value will be
65657 	 * returned, 0 returns the operational value.
65658 	 */
65659 	#define HWRM_NVM_GET_VARIABLE_INPUT_FLAGS_FACTORY_DFLT \
65660 		UINT32_C(0x1)
65661 	uint8_t	unused_0;
65662 } __rte_packed_end;
65663 
65664 /* hwrm_nvm_get_variable_output (size:128b/16B) */
65665 struct __rte_packed_begin hwrm_nvm_get_variable_output {
65666 	/* The specific error status for the command. */
65667 	uint16_t	error_code;
65668 	/* The HWRM command request type. */
65669 	uint16_t	req_type;
65670 	/* The sequence ID from the original command. */
65671 	uint16_t	seq_id;
65672 	/* The length of the response data in number of bytes. */
65673 	uint16_t	resp_len;
65674 	/* size of data of the actual variable retrieved in bits */
65675 	uint16_t	data_len;
65676 	/*
65677 	 * option_num is the option number for the data retrieved. It is
65678 	 * possible in the future that the option number returned would be
65679 	 * different than requested. This condition could occur if an option is
65680 	 * deprecated and a new option id is defined with similar
65681 	 * characteristics, but has a slightly different definition. This
65682 	 * also makes it convenient for the caller to identify the variable
65683 	 * result with the option id from the response.
65684 	 */
65685 	uint16_t	option_num;
65686 	/* reserved. */
65687 	#define HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_RSVD_0    UINT32_C(0x0)
65688 	/* reserved. */
65689 	#define HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_RSVD_FFFF \
65690 		UINT32_C(0xffff)
65691 	#define HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_LAST \
65692 		HWRM_NVM_GET_VARIABLE_OUTPUT_OPTION_NUM_RSVD_FFFF
65693 	uint8_t	unused_0[3];
65694 	/*
65695 	 * This field is used in Output records to indicate that the output
65696 	 * is completely written to RAM. This field should be read as '1'
65697 	 * to indicate that the output has been completely written. When
65698 	 * writing a command completion or response to an internal processor,
65699 	 * the order of writes has to be such that this field is written last.
65700 	 */
65701 	uint8_t	valid;
65702 } __rte_packed_end;
65703 
65704 /* hwrm_nvm_get_variable_cmd_err (size:64b/8B) */
65705 struct __rte_packed_begin hwrm_nvm_get_variable_cmd_err {
65706 	/*
65707 	 * command specific error codes that goes to
65708 	 * the cmd_err field in Common HWRM Error Response.
65709 	 */
65710 	uint8_t	code;
65711 	/* Unknown error */
65712 	#define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_UNKNOWN       UINT32_C(0x0)
65713 	/* variable does not exist */
65714 	#define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_VAR_NOT_EXIST UINT32_C(0x1)
65715 	/* configuration is corrupted and the variable cannot be saved */
65716 	#define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR   UINT32_C(0x2)
65717 	/* length specified is too small */
65718 	#define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_LEN_TOO_SHORT UINT32_C(0x3)
65719 	#define HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_LAST \
65720 		HWRM_NVM_GET_VARIABLE_CMD_ERR_CODE_LEN_TOO_SHORT
65721 	uint8_t	unused_0[7];
65722 } __rte_packed_end;
65723 
65724 /*************************
65725  * hwrm_nvm_set_variable *
65726  *************************/
65727 
65728 
65729 /* hwrm_nvm_set_variable_input (size:320b/40B) */
65730 struct __rte_packed_begin hwrm_nvm_set_variable_input {
65731 	/* The HWRM command request type. */
65732 	uint16_t	req_type;
65733 	/*
65734 	 * The completion ring to send the completion event on. This should
65735 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65736 	 */
65737 	uint16_t	cmpl_ring;
65738 	/*
65739 	 * The sequence ID is used by the driver for tracking multiple
65740 	 * commands. This ID is treated as opaque data by the firmware and
65741 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65742 	 */
65743 	uint16_t	seq_id;
65744 	/*
65745 	 * The target ID of the command:
65746 	 * * 0x0-0xFFF8 - The function ID
65747 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65748 	 * * 0xFFFD - Reserved for user-space HWRM interface
65749 	 * * 0xFFFF - HWRM
65750 	 */
65751 	uint16_t	target_id;
65752 	/*
65753 	 * A physical address pointer pointing to a host buffer that the
65754 	 * command's response data will be written. This can be either a host
65755 	 * physical address (HPA) or a guest physical address (GPA) and must
65756 	 * point to a physically contiguous block of memory.
65757 	 */
65758 	uint64_t	resp_addr;
65759 	/*
65760 	 * This is the host address where
65761 	 * nvm variable will be copied from
65762 	 */
65763 	uint64_t	src_data_addr;
65764 	/* size of data in bits */
65765 	uint16_t	data_len;
65766 	/* nvm cfg option number */
65767 	uint16_t	option_num;
65768 	/* reserved. */
65769 	#define HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_RSVD_0    UINT32_C(0x0)
65770 	/* reserved. */
65771 	#define HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF \
65772 		UINT32_C(0xffff)
65773 	#define HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_LAST \
65774 		HWRM_NVM_SET_VARIABLE_INPUT_OPTION_NUM_RSVD_FFFF
65775 	/*
65776 	 * Number of dimensions for this nvm configuration variable.
65777 	 * This value indicates how many of the indexN values to use.
65778 	 * A value of 0 means that none of the indexN values are valid.
65779 	 * A value of 1 requires at index0 is valued, a value of 2
65780 	 * requires that index0 and index1 are valid, and so forth
65781 	 */
65782 	uint16_t	dimensions;
65783 	/* index for the 1st dimensions */
65784 	uint16_t	index_0;
65785 	/* index for the 2nd dimensions */
65786 	uint16_t	index_1;
65787 	/* index for the 3rd dimensions */
65788 	uint16_t	index_2;
65789 	/* index for the 4th dimensions */
65790 	uint16_t	index_3;
65791 	uint8_t	flags;
65792 	/*
65793 	 * When this bit is 1, flush internal cache after this write
65794 	 * operation (see hwrm_nvm_flush command.)
65795 	 */
65796 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_FORCE_FLUSH \
65797 		UINT32_C(0x1)
65798 	/* encryption method */
65799 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_MASK \
65800 		UINT32_C(0xe)
65801 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_SFT           1
65802 	/* No encryption. */
65803 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_NONE \
65804 		(UINT32_C(0x0) << 1)
65805 	/* one-way encryption. */
65806 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_HMAC_SHA1 \
65807 		(UINT32_C(0x1) << 1)
65808 	/* symmetric AES256 encryption. */
65809 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_AES256 \
65810 		(UINT32_C(0x2) << 1)
65811 	/* SHA1 digest appended to plaintext contents, for authentication */
65812 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_HMAC_SHA1_AUTH \
65813 		(UINT32_C(0x3) << 1)
65814 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_LAST \
65815 		HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_ENCRYPT_MODE_HMAC_SHA1_AUTH
65816 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_FLAGS_UNUSED_0_MASK \
65817 		UINT32_C(0x70)
65818 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_FLAGS_UNUSED_0_SFT         4
65819 	/* When this bit is 1, update the factory default region */
65820 	#define HWRM_NVM_SET_VARIABLE_INPUT_FLAGS_FACTORY_DEFAULT \
65821 		UINT32_C(0x80)
65822 	uint8_t	unused_0;
65823 } __rte_packed_end;
65824 
65825 /* hwrm_nvm_set_variable_output (size:128b/16B) */
65826 struct __rte_packed_begin hwrm_nvm_set_variable_output {
65827 	/* The specific error status for the command. */
65828 	uint16_t	error_code;
65829 	/* The HWRM command request type. */
65830 	uint16_t	req_type;
65831 	/* The sequence ID from the original command. */
65832 	uint16_t	seq_id;
65833 	/* The length of the response data in number of bytes. */
65834 	uint16_t	resp_len;
65835 	uint8_t	unused_0[7];
65836 	/*
65837 	 * This field is used in Output records to indicate that the output
65838 	 * is completely written to RAM. This field should be read as '1'
65839 	 * to indicate that the output has been completely written. When
65840 	 * writing a command completion or response to an internal processor,
65841 	 * the order of writes has to be such that this field is written last.
65842 	 */
65843 	uint8_t	valid;
65844 } __rte_packed_end;
65845 
65846 /* hwrm_nvm_set_variable_cmd_err (size:64b/8B) */
65847 struct __rte_packed_begin hwrm_nvm_set_variable_cmd_err {
65848 	/*
65849 	 * command specific error codes that goes to
65850 	 * the cmd_err field in Common HWRM Error Response.
65851 	 */
65852 	uint8_t	code;
65853 	/* Unknown error */
65854 	#define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_UNKNOWN       UINT32_C(0x0)
65855 	/* variable does not exist */
65856 	#define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_VAR_NOT_EXIST UINT32_C(0x1)
65857 	/* configuration is corrupted and the variable cannot be saved */
65858 	#define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR   UINT32_C(0x2)
65859 	#define HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_LAST \
65860 		HWRM_NVM_SET_VARIABLE_CMD_ERR_CODE_CORRUPT_VAR
65861 	uint8_t	unused_0[7];
65862 } __rte_packed_end;
65863 
65864 /****************************
65865  * hwrm_nvm_validate_option *
65866  ****************************/
65867 
65868 
65869 /* hwrm_nvm_validate_option_input (size:320b/40B) */
65870 struct __rte_packed_begin hwrm_nvm_validate_option_input {
65871 	/* The HWRM command request type. */
65872 	uint16_t	req_type;
65873 	/*
65874 	 * The completion ring to send the completion event on. This should
65875 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65876 	 */
65877 	uint16_t	cmpl_ring;
65878 	/*
65879 	 * The sequence ID is used by the driver for tracking multiple
65880 	 * commands. This ID is treated as opaque data by the firmware and
65881 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
65882 	 */
65883 	uint16_t	seq_id;
65884 	/*
65885 	 * The target ID of the command:
65886 	 * * 0x0-0xFFF8 - The function ID
65887 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
65888 	 * * 0xFFFD - Reserved for user-space HWRM interface
65889 	 * * 0xFFFF - HWRM
65890 	 */
65891 	uint16_t	target_id;
65892 	/*
65893 	 * A physical address pointer pointing to a host buffer that the
65894 	 * command's response data will be written. This can be either a host
65895 	 * physical address (HPA) or a guest physical address (GPA) and must
65896 	 * point to a physically contiguous block of memory.
65897 	 */
65898 	uint64_t	resp_addr;
65899 	/*
65900 	 * This is the host address where
65901 	 * nvm variable will be copied from
65902 	 */
65903 	uint64_t	src_data_addr;
65904 	/* size of data in bits */
65905 	uint16_t	data_len;
65906 	/* nvm cfg option number */
65907 	uint16_t	option_num;
65908 	/* reserved. */
65909 	#define HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_RSVD_0 \
65910 		UINT32_C(0x0)
65911 	/* reserved. */
65912 	#define HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_RSVD_FFFF \
65913 		UINT32_C(0xffff)
65914 	#define HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_LAST \
65915 		HWRM_NVM_VALIDATE_OPTION_INPUT_OPTION_NUM_RSVD_FFFF
65916 	/*
65917 	 * Number of dimensions for this nvm configuration variable.
65918 	 * This value indicates how many of the indexN values to use.
65919 	 * A value of 0 means that none of the indexN values are valid.
65920 	 * A value of 1 requires at index0 is valued, a value of 2
65921 	 * requires that index0 and index1 are valid, and so forth
65922 	 */
65923 	uint16_t	dimensions;
65924 	/* index for the 1st dimensions */
65925 	uint16_t	index_0;
65926 	/* index for the 2nd dimensions */
65927 	uint16_t	index_1;
65928 	/* index for the 3rd dimensions */
65929 	uint16_t	index_2;
65930 	/* index for the 4th dimensions */
65931 	uint16_t	index_3;
65932 	uint8_t	unused_0[2];
65933 } __rte_packed_end;
65934 
65935 /* hwrm_nvm_validate_option_output (size:128b/16B) */
65936 struct __rte_packed_begin hwrm_nvm_validate_option_output {
65937 	/* The specific error status for the command. */
65938 	uint16_t	error_code;
65939 	/* The HWRM command request type. */
65940 	uint16_t	req_type;
65941 	/* The sequence ID from the original command. */
65942 	uint16_t	seq_id;
65943 	/* The length of the response data in number of bytes. */
65944 	uint16_t	resp_len;
65945 	uint8_t	result;
65946 	/*
65947 	 * indicates that the value provided for the option is not matching
65948 	 * with the saved data.
65949 	 */
65950 	#define HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_NOT_MATCH UINT32_C(0x0)
65951 	/*
65952 	 * indicates that the value provided for the option is matching the
65953 	 * saved data.
65954 	 */
65955 	#define HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_MATCH     UINT32_C(0x1)
65956 	#define HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_LAST \
65957 		HWRM_NVM_VALIDATE_OPTION_OUTPUT_RESULT_MATCH
65958 	uint8_t	unused_0[6];
65959 	/*
65960 	 * This field is used in Output records to indicate that the output
65961 	 * is completely written to RAM. This field should be read as '1'
65962 	 * to indicate that the output has been completely written. When
65963 	 * writing a command completion or response to an internal processor,
65964 	 * the order of writes has to be such that this field is written last.
65965 	 */
65966 	uint8_t	valid;
65967 } __rte_packed_end;
65968 
65969 /* hwrm_nvm_validate_option_cmd_err (size:64b/8B) */
65970 struct __rte_packed_begin hwrm_nvm_validate_option_cmd_err {
65971 	/*
65972 	 * command specific error codes that goes to
65973 	 * the cmd_err field in Common HWRM Error Response.
65974 	 */
65975 	uint8_t	code;
65976 	/* Unknown error */
65977 	#define HWRM_NVM_VALIDATE_OPTION_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0)
65978 	#define HWRM_NVM_VALIDATE_OPTION_CMD_ERR_CODE_LAST \
65979 		HWRM_NVM_VALIDATE_OPTION_CMD_ERR_CODE_UNKNOWN
65980 	uint8_t	unused_0[7];
65981 } __rte_packed_end;
65982 
65983 /*******************
65984  * hwrm_nvm_defrag *
65985  *******************/
65986 
65987 
65988 /* hwrm_nvm_defrag_input (size:192b/24B) */
65989 struct __rte_packed_begin hwrm_nvm_defrag_input {
65990 	/* The HWRM command request type. */
65991 	uint16_t	req_type;
65992 	/*
65993 	 * The completion ring to send the completion event on. This should
65994 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
65995 	 */
65996 	uint16_t	cmpl_ring;
65997 	/*
65998 	 * The sequence ID is used by the driver for tracking multiple
65999 	 * commands. This ID is treated as opaque data by the firmware and
66000 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66001 	 */
66002 	uint16_t	seq_id;
66003 	/*
66004 	 * The target ID of the command:
66005 	 * * 0x0-0xFFF8 - The function ID
66006 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66007 	 * * 0xFFFD - Reserved for user-space HWRM interface
66008 	 * * 0xFFFF - HWRM
66009 	 */
66010 	uint16_t	target_id;
66011 	/*
66012 	 * A physical address pointer pointing to a host buffer that the
66013 	 * command's response data will be written. This can be either a host
66014 	 * physical address (HPA) or a guest physical address (GPA) and must
66015 	 * point to a physically contiguous block of memory.
66016 	 */
66017 	uint64_t	resp_addr;
66018 	uint32_t	flags;
66019 	/* This bit must be '1' to perform NVM defragmentation. */
66020 	#define HWRM_NVM_DEFRAG_INPUT_FLAGS_DEFRAG     UINT32_C(0x1)
66021 	uint8_t	unused_0[4];
66022 } __rte_packed_end;
66023 
66024 /* hwrm_nvm_defrag_output (size:128b/16B) */
66025 struct __rte_packed_begin hwrm_nvm_defrag_output {
66026 	/* The specific error status for the command. */
66027 	uint16_t	error_code;
66028 	/* The HWRM command request type. */
66029 	uint16_t	req_type;
66030 	/* The sequence ID from the original command. */
66031 	uint16_t	seq_id;
66032 	/* The length of the response data in number of bytes. */
66033 	uint16_t	resp_len;
66034 	uint8_t	unused_0[7];
66035 	/*
66036 	 * This field is used in Output records to indicate that the output
66037 	 * is completely written to RAM. This field should be read as '1'
66038 	 * to indicate that the output has been completely written. When
66039 	 * writing a command completion or response to an internal processor,
66040 	 * the order of writes has to be such that this field is written last.
66041 	 */
66042 	uint8_t	valid;
66043 } __rte_packed_end;
66044 
66045 /* hwrm_nvm_defrag_cmd_err (size:64b/8B) */
66046 struct __rte_packed_begin hwrm_nvm_defrag_cmd_err {
66047 	/*
66048 	 * command specific error codes that goes to
66049 	 * the cmd_err field in Common HWRM Error Response.
66050 	 */
66051 	uint8_t	code;
66052 	/* Unknown error */
66053 	#define HWRM_NVM_DEFRAG_CMD_ERR_CODE_UNKNOWN UINT32_C(0x0)
66054 	/* NVM defragmentation could not be performed */
66055 	#define HWRM_NVM_DEFRAG_CMD_ERR_CODE_FAIL    UINT32_C(0x1)
66056 	#define HWRM_NVM_DEFRAG_CMD_ERR_CODE_LAST \
66057 		HWRM_NVM_DEFRAG_CMD_ERR_CODE_FAIL
66058 	uint8_t	unused_0[7];
66059 } __rte_packed_end;
66060 
66061 /*******************************
66062  * hwrm_nvm_get_vpd_field_info *
66063  *******************************/
66064 
66065 
66066 /* hwrm_nvm_get_vpd_field_info_input (size:192b/24B) */
66067 struct __rte_packed_begin hwrm_nvm_get_vpd_field_info_input {
66068 	/* The HWRM command request type. */
66069 	uint16_t	req_type;
66070 	/*
66071 	 * The completion ring to send the completion event on. This should
66072 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66073 	 */
66074 	uint16_t	cmpl_ring;
66075 	/*
66076 	 * The sequence ID is used by the driver for tracking multiple
66077 	 * commands. This ID is treated as opaque data by the firmware and
66078 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66079 	 */
66080 	uint16_t	seq_id;
66081 	/*
66082 	 * The target ID of the command:
66083 	 * * 0x0-0xFFF8 - The function ID
66084 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66085 	 * * 0xFFFD - Reserved for user-space HWRM interface
66086 	 * * 0xFFFF - HWRM
66087 	 */
66088 	uint16_t	target_id;
66089 	/*
66090 	 * A physical address pointer pointing to a host buffer that the
66091 	 * command's response data will be written. This can be either a host
66092 	 * physical address (HPA) or a guest physical address (GPA) and must
66093 	 * point to a physically contiguous block of memory.
66094 	 */
66095 	uint64_t	resp_addr;
66096 	/*
66097 	 * Tag ID of the requested field. To request the Product Name
66098 	 * a value of [0x00, 0x82] should be used. All other fields
66099 	 * would use the two byte hexadecimal value of the ASCII
66100 	 * characters. The first letter of the ASCII keyword is recorded
66101 	 * in tag_id[0] and the next letter in tag_id[1].
66102 	 */
66103 	uint8_t	tag_id[2];
66104 	uint8_t	unused_0[6];
66105 } __rte_packed_end;
66106 
66107 /* hwrm_nvm_get_vpd_field_info_output (size:2176b/272B) */
66108 struct __rte_packed_begin hwrm_nvm_get_vpd_field_info_output {
66109 	/* The specific error status for the command. */
66110 	uint16_t	error_code;
66111 	/* The HWRM command request type. */
66112 	uint16_t	req_type;
66113 	/* The sequence ID from the original command. */
66114 	uint16_t	seq_id;
66115 	/* The length of the response data in number of bytes. */
66116 	uint16_t	resp_len;
66117 	/* Data retrieved from VPD field */
66118 	uint8_t	data[256];
66119 	/* size of data retrieved in bytes */
66120 	uint16_t	data_len;
66121 	uint8_t	unused_0[5];
66122 	/*
66123 	 * This field is used in Output records to indicate that the output
66124 	 * is completely written to RAM. This field should be read as '1'
66125 	 * to indicate that the output has been completely written. When
66126 	 * writing a command completion or response to an internal processor,
66127 	 * the order of writes has to be such that this field is written last.
66128 	 */
66129 	uint8_t	valid;
66130 } __rte_packed_end;
66131 
66132 /*******************************
66133  * hwrm_nvm_set_vpd_field_info *
66134  *******************************/
66135 
66136 
66137 /* hwrm_nvm_set_vpd_field_info_input (size:256b/32B) */
66138 struct __rte_packed_begin hwrm_nvm_set_vpd_field_info_input {
66139 	/* The HWRM command request type. */
66140 	uint16_t	req_type;
66141 	/*
66142 	 * The completion ring to send the completion event on. This should
66143 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66144 	 */
66145 	uint16_t	cmpl_ring;
66146 	/*
66147 	 * The sequence ID is used by the driver for tracking multiple
66148 	 * commands. This ID is treated as opaque data by the firmware and
66149 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66150 	 */
66151 	uint16_t	seq_id;
66152 	/*
66153 	 * The target ID of the command:
66154 	 * * 0x0-0xFFF8 - The function ID
66155 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66156 	 * * 0xFFFD - Reserved for user-space HWRM interface
66157 	 * * 0xFFFF - HWRM
66158 	 */
66159 	uint16_t	target_id;
66160 	/*
66161 	 * A physical address pointer pointing to a host buffer that the
66162 	 * command's response data will be written. This can be either a host
66163 	 * physical address (HPA) or a guest physical address (GPA) and must
66164 	 * point to a physically contiguous block of memory.
66165 	 */
66166 	uint64_t	resp_addr;
66167 	/*
66168 	 * This is the host address where
66169 	 * VPD data value will be copied from
66170 	 */
66171 	uint64_t	host_src_addr;
66172 	/*
66173 	 * Tag ID of the requested field. To request the Product Name
66174 	 * a value of [0x00, 0x82] should be used. All other fields
66175 	 * would use the two byte hexadecimal value of the ASCII
66176 	 * characters. The first letter of the ASCII keyword is recorded
66177 	 * in tag_id[0] and the next letter in tag_id[1].
66178 	 */
66179 	uint8_t	tag_id[2];
66180 	/* size of data in bytes */
66181 	uint16_t	data_len;
66182 	uint8_t	unused_0[4];
66183 } __rte_packed_end;
66184 
66185 /* hwrm_nvm_set_vpd_field_info_output (size:128b/16B) */
66186 struct __rte_packed_begin hwrm_nvm_set_vpd_field_info_output {
66187 	/* The specific error status for the command. */
66188 	uint16_t	error_code;
66189 	/* The HWRM command request type. */
66190 	uint16_t	req_type;
66191 	/* The sequence ID from the original command. */
66192 	uint16_t	seq_id;
66193 	/* The length of the response data in number of bytes. */
66194 	uint16_t	resp_len;
66195 	uint8_t	unused_0[7];
66196 	/*
66197 	 * This field is used in Output records to indicate that the output
66198 	 * is completely written to RAM. This field should be read as '1'
66199 	 * to indicate that the output has been completely written. When
66200 	 * writing a command completion or response to an internal processor,
66201 	 * the order of writes has to be such that this field is written last.
66202 	 */
66203 	uint8_t	valid;
66204 } __rte_packed_end;
66205 
66206 /****************
66207  * hwrm_oem_cmd *
66208  ****************/
66209 
66210 
66211 /* hwrm_oem_cmd_input (size:1024b/128B) */
66212 struct __rte_packed_begin hwrm_oem_cmd_input {
66213 	/* The HWRM command request type. */
66214 	uint16_t	req_type;
66215 	/*
66216 	 * The completion ring to send the completion event on. This should
66217 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66218 	 */
66219 	uint16_t	cmpl_ring;
66220 	/*
66221 	 * The sequence ID is used by the driver for tracking multiple
66222 	 * commands. This ID is treated as opaque data by the firmware and
66223 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66224 	 */
66225 	uint16_t	seq_id;
66226 	/*
66227 	 * The target ID of the command:
66228 	 * * 0x0-0xFFF8 - The function ID
66229 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66230 	 * * 0xFFFD - Reserved for user-space HWRM interface
66231 	 * * 0xFFFF - HWRM
66232 	 */
66233 	uint16_t	target_id;
66234 	/*
66235 	 * A physical address pointer pointing to a host buffer that the
66236 	 * command's response data will be written. This can be either a host
66237 	 * physical address (HPA) or a guest physical address (GPA) and must
66238 	 * point to a physically contiguous block of memory.
66239 	 */
66240 	uint64_t	resp_addr;
66241 	/*
66242 	 * The organization owning the message format. Set this field
66243 	 * to 0x14e4 when used for Broadcom internal use when
66244 	 * the naming authority is set to PCI_SIG.
66245 	 */
66246 	uint32_t	oem_id;
66247 	/* The naming authority used for setting the oem_id. */
66248 	uint8_t	naming_authority;
66249 	/* Invalid naming authority */
66250 	#define HWRM_OEM_CMD_INPUT_NAMING_AUTHORITY_INVALID UINT32_C(0x0)
66251 	/* PCI_SIG naming authority numbering is used */
66252 	#define HWRM_OEM_CMD_INPUT_NAMING_AUTHORITY_PCI_SIG UINT32_C(0x1)
66253 	#define HWRM_OEM_CMD_INPUT_NAMING_AUTHORITY_LAST \
66254 		HWRM_OEM_CMD_INPUT_NAMING_AUTHORITY_PCI_SIG
66255 	/* The message family within the organization. */
66256 	uint8_t	message_family;
66257 	/* Invalid message family */
66258 	#define HWRM_OEM_CMD_INPUT_MESSAGE_FAMILY_INVALID UINT32_C(0x0)
66259 	/* This message is targeted for Truflow */
66260 	#define HWRM_OEM_CMD_INPUT_MESSAGE_FAMILY_TRUFLOW UINT32_C(0x1)
66261 	/* This message is targeted for RoCE */
66262 	#define HWRM_OEM_CMD_INPUT_MESSAGE_FAMILY_ROCE    UINT32_C(0x2)
66263 	#define HWRM_OEM_CMD_INPUT_MESSAGE_FAMILY_LAST \
66264 		HWRM_OEM_CMD_INPUT_MESSAGE_FAMILY_ROCE
66265 	uint16_t	unused;
66266 	/* This field contains the vendor specific command data. */
66267 	uint32_t	oem_data[26];
66268 } __rte_packed_end;
66269 
66270 /* hwrm_oem_cmd_output (size:768b/96B) */
66271 struct __rte_packed_begin hwrm_oem_cmd_output {
66272 	/* The specific error status for the command. */
66273 	uint16_t	error_code;
66274 	/* The HWRM command request type. */
66275 	uint16_t	req_type;
66276 	/* The sequence ID from the original command. */
66277 	uint16_t	seq_id;
66278 	/* The length of the response data in number of bytes. */
66279 	uint16_t	resp_len;
66280 	/* The organization owning the message format. */
66281 	uint32_t	oem_id;
66282 	/* The naming authority used for setting the oem_id. */
66283 	uint8_t	naming_authority;
66284 	/* The message family within the organization. */
66285 	uint8_t	message_family;
66286 	uint16_t	unused;
66287 	/* This field contains the vendor specific response data. */
66288 	uint32_t	oem_data[18];
66289 	uint8_t	unused_1[7];
66290 	/*
66291 	 * This field is used in Output records to indicate that the output
66292 	 * is completely written to RAM. This field should be read as '1'
66293 	 * to indicate that the output has been completely written. When
66294 	 * writing a command completion or response to an internal processor,
66295 	 * the order of writes has to be such that this field is written last.
66296 	 */
66297 	uint8_t	valid;
66298 } __rte_packed_end;
66299 
66300 /*****************************
66301  * hwrm_dbg_crashdump_header *
66302  *****************************/
66303 
66304 
66305 /* hwrm_dbg_crashdump_header_input (size:192b/24B) */
66306 struct __rte_packed_begin hwrm_dbg_crashdump_header_input {
66307 	/* The HWRM command request type. */
66308 	uint16_t	req_type;
66309 	/*
66310 	 * The completion ring to send the completion event on. This should
66311 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66312 	 */
66313 	uint16_t	cmpl_ring;
66314 	/*
66315 	 * The sequence ID is used by the driver for tracking multiple
66316 	 * commands. This ID is treated as opaque data by the firmware and
66317 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66318 	 */
66319 	uint16_t	seq_id;
66320 	/*
66321 	 * The target ID of the command:
66322 	 * * 0x0-0xFFF8 - The function ID
66323 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66324 	 * * 0xFFFD - Reserved for user-space HWRM interface
66325 	 * * 0xFFFF - HWRM
66326 	 */
66327 	uint16_t	target_id;
66328 	/*
66329 	 * A physical address pointer pointing to a host buffer that the
66330 	 * command's response data will be written. This can be either a host
66331 	 * physical address (HPA) or a guest physical address (GPA) and must
66332 	 * point to a physically contiguous block of memory.
66333 	 */
66334 	uint64_t	resp_addr;
66335 	uint32_t	unused_0[2];
66336 } __rte_packed_end;
66337 
66338 /* hwrm_dbg_crashdump_header_output (size:512b/64B) */
66339 struct __rte_packed_begin hwrm_dbg_crashdump_header_output {
66340 	/* The specific error status for the command. */
66341 	uint16_t	error_code;
66342 	/* The HWRM command request type. */
66343 	uint16_t	req_type;
66344 	/* The sequence ID from the original command. */
66345 	uint16_t	seq_id;
66346 	/* The length of the response data in number of bytes. */
66347 	uint16_t	resp_len;
66348 	/* Major version. */
66349 	uint8_t	version_hi;
66350 	/* Minor version. */
66351 	uint8_t	version_low;
66352 	/*
66353 	 * Header length in bytes. This includes all fields from version
66354 	 * to dev_uid (whose length is specified in dev_uid_length).
66355 	 */
66356 	uint16_t	header_len;
66357 	/* This is the crash dump size in bytes. */
66358 	uint32_t	dump_size;
66359 	/*
66360 	 * This is a "wall clock" timestamp value of when the crash occurred.
66361 	 * Format is of time_t type.
66362 	 */
66363 	uint32_t	crash_time;
66364 	/* This is the timezone information for the crash_time. */
66365 	int8_t	utc_offset;
66366 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_UTC \
66367 		INT32_C(0)
66368 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMSTERDAM \
66369 		INT32_C(4)
66370 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_EGYPT \
66371 		INT32_C(8)
66372 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_EUROPE_MOSCOW \
66373 		INT32_C(12)
66374 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_IRAN \
66375 		INT32_C(14)
66376 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_DUBAI \
66377 		INT32_C(16)
66378 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_KABUL \
66379 		INT32_C(18)
66380 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ANTARCTICA_MAWSON \
66381 		INT32_C(20)
66382 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_COLOMBO \
66383 		INT32_C(22)
66384 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_KATHMANDU \
66385 		INT32_C(23)
66386 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_INDIAN_CHAGOS \
66387 		INT32_C(24)
66388 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_INDIAN_COCOS \
66389 		INT32_C(26)
66390 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_BANGKOK \
66391 		INT32_C(28)
66392 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_HONG_KONG \
66393 		INT32_C(32)
66394 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_PYONGYANG \
66395 		INT32_C(34)
66396 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_EUCLA \
66397 		INT32_C(35)
66398 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ASIA_TOKYO \
66399 		INT32_C(36)
66400 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_ADELAIDE \
66401 		INT32_C(38)
66402 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_BROKEN_HILL \
66403 		INT32_C(38)
66404 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_DARWIN \
66405 		INT32_C(38)
66406 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_SYDNEY \
66407 		INT32_C(40)
66408 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AUSTRALIA_LORD_HOWE \
66409 		INT32_C(42)
66410 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ANTARCTICA_MACQUARIE \
66411 		INT32_C(44)
66412 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ANTARCTICA_SOUTH_POLE \
66413 		INT32_C(48)
66414 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_CHATHAM \
66415 		INT32_C(51)
66416 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_APIA \
66417 		INT32_C(52)
66418 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_KIRITIMATIS \
66419 		INT32_C(56)
66420 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ATLANTIC_CAPE_VERDE \
66421 		INT32_C(-4)
66422 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_ATLANTIC_SOUTH_GEORGIA \
66423 		INT32_C(-8)
66424 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_ARGENTINA_BUENOS_AIRES \
66425 		INT32_C(-12)
66426 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_SAO_PAULO \
66427 		INT32_C(-12)
66428 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_NEWFOUNDLAND \
66429 		INT32_C(-14)
66430 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_BARBADOS \
66431 		INT32_C(-16)
66432 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_CANCUN \
66433 		INT32_C(-20)
66434 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_COSTA_RICA \
66435 		INT32_C(-24)
66436 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_AMERICA_PHOENIX \
66437 		INT32_C(-28)
66438 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_US_ARIZONA \
66439 		INT32_C(-28)
66440 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_US_PACIFIC \
66441 		INT32_C(-32)
66442 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_US_ALASKA \
66443 		INT32_C(-36)
66444 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_MARQUESAS \
66445 		INT32_C(-38)
66446 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_HAWAII \
66447 		INT32_C(-40)
66448 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_MIDWAY \
66449 		INT32_C(-44)
66450 	#define HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_LAST \
66451 		HWRM_DBG_CRASHDUMP_HEADER_OUTPUT_UTC_OFFSET_PACIFIC_MIDWAY
66452 	/*
66453 	 * This field is a counter value of the crash dump available. This
66454 	 * value is incremented monotonically at each crash.
66455 	 */
66456 	uint8_t	crash_cntr;
66457 	/*
66458 	 * This specifies the length of the dev_uid in bytes. The maximum
66459 	 * value is 31.
66460 	 */
66461 	uint16_t	dev_uid_length;
66462 	/*
66463 	 * This is a unique device identifier (e.g. the first port MAC
66464 	 * address for a network controller or a serial number for an
66465 	 * en/decryption device) in ASCII format. It is used to identify
66466 	 * where the crash dump content is coming from. Unused bytes must
66467 	 * have '\0' character.
66468 	 */
66469 	uint8_t	dev_uid[32];
66470 	/*
66471 	 * This is a count value tracking the number of successful boots
66472 	 * before the crash occurred.
66473 	 */
66474 	uint32_t	power_on_count;
66475 	uint8_t	unused_2[3];
66476 	/*
66477 	 * This field is used in Output records to indicate that the output
66478 	 * is completely written to RAM. This field should be read as '1'
66479 	 * to indicate that the output has been completely written. When
66480 	 * writing a command completion or response to an internal processor,
66481 	 * the order of writes has to be such that this field is written last.
66482 	 */
66483 	uint8_t	valid;
66484 } __rte_packed_end;
66485 
66486 /****************************
66487  * hwrm_dbg_crashdump_erase *
66488  ****************************/
66489 
66490 
66491 /* hwrm_dbg_crashdump_erase_input (size:192b/24B) */
66492 struct __rte_packed_begin hwrm_dbg_crashdump_erase_input {
66493 	/* The HWRM command request type. */
66494 	uint16_t	req_type;
66495 	/*
66496 	 * The completion ring to send the completion event on. This should
66497 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66498 	 */
66499 	uint16_t	cmpl_ring;
66500 	/*
66501 	 * The sequence ID is used by the driver for tracking multiple
66502 	 * commands. This ID is treated as opaque data by the firmware and
66503 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66504 	 */
66505 	uint16_t	seq_id;
66506 	/*
66507 	 * The target ID of the command:
66508 	 * * 0x0-0xFFF8 - The function ID
66509 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66510 	 * * 0xFFFD - Reserved for user-space HWRM interface
66511 	 * * 0xFFFF - HWRM
66512 	 */
66513 	uint16_t	target_id;
66514 	/*
66515 	 * A physical address pointer pointing to a host buffer that the
66516 	 * command's response data will be written. This can be either a host
66517 	 * physical address (HPA) or a guest physical address (GPA) and must
66518 	 * point to a physically contiguous block of memory.
66519 	 */
66520 	uint64_t	resp_addr;
66521 	/* The scope of the erase */
66522 	uint8_t	scope;
66523 	/*
66524 	 * Wipe all crashdump data blocks, making them available for
66525 	 * the next crash(es). This is the typical value to be used.
66526 	 */
66527 	#define HWRM_DBG_CRASHDUMP_ERASE_INPUT_SCOPE_INVALIDATE UINT32_C(0x0)
66528 	/*
66529 	 * Experimental: Remove all data blocks from the directory
66530 	 * (without erasing any existing contents), re-allocate and
66531 	 * re-initialize new ones. In case where the crash dump feature
66532 	 * stops functioning, this can be used to restore it back to the
66533 	 * clean slate.
66534 	 */
66535 	#define HWRM_DBG_CRASHDUMP_ERASE_INPUT_SCOPE_REINIT     UINT32_C(0x1)
66536 	#define HWRM_DBG_CRASHDUMP_ERASE_INPUT_SCOPE_LAST \
66537 		HWRM_DBG_CRASHDUMP_ERASE_INPUT_SCOPE_REINIT
66538 	uint8_t	unused_0[3];
66539 	uint32_t	unused_1;
66540 } __rte_packed_end;
66541 
66542 /* hwrm_dbg_crashdump_erase_output (size:128b/16B) */
66543 struct __rte_packed_begin hwrm_dbg_crashdump_erase_output {
66544 	/* The specific error status for the command. */
66545 	uint16_t	error_code;
66546 	/* The HWRM command request type. */
66547 	uint16_t	req_type;
66548 	/* The sequence ID from the original command. */
66549 	uint16_t	seq_id;
66550 	/* The length of the response data in number of bytes. */
66551 	uint16_t	resp_len;
66552 	uint8_t	unused_1[7];
66553 	/*
66554 	 * This field is used in Output records to indicate that the output
66555 	 * is completely written to RAM. This field should be read as '1'
66556 	 * to indicate that the output has been completely written. When
66557 	 * writing a command completion or response to an internal processor,
66558 	 * the order of writes has to be such that this field is written last.
66559 	 */
66560 	uint8_t	valid;
66561 } __rte_packed_end;
66562 
66563 /******************
66564  * hwrm_dbg_qcaps *
66565  ******************/
66566 
66567 
66568 /* hwrm_dbg_qcaps_input (size:192b/24B) */
66569 struct __rte_packed_begin hwrm_dbg_qcaps_input {
66570 	/* The HWRM command request type. */
66571 	uint16_t	req_type;
66572 	/*
66573 	 * The completion ring to send the completion event on. This should
66574 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66575 	 */
66576 	uint16_t	cmpl_ring;
66577 	/*
66578 	 * The sequence ID is used by the driver for tracking multiple
66579 	 * commands. This ID is treated as opaque data by the firmware and
66580 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66581 	 */
66582 	uint16_t	seq_id;
66583 	/*
66584 	 * The target ID of the command:
66585 	 * * 0x0-0xFFF8 - The function ID
66586 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66587 	 * * 0xFFFD - Reserved for user-space HWRM interface
66588 	 * * 0xFFFF - HWRM
66589 	 */
66590 	uint16_t	target_id;
66591 	/*
66592 	 * A physical address pointer pointing to a host buffer that the
66593 	 * command's response data will be written. This can be either a host
66594 	 * physical address (HPA) or a guest physical address (GPA) and must
66595 	 * point to a physically contiguous block of memory.
66596 	 */
66597 	uint64_t	resp_addr;
66598 	/*
66599 	 * Function ID of the function that is being queried.
66600 	 * 0xFF... (All Fs) if the query is for the requesting
66601 	 * function.
66602 	 */
66603 	uint16_t	fid;
66604 	uint8_t	unused_0[6];
66605 } __rte_packed_end;
66606 
66607 /* hwrm_dbg_qcaps_output (size:192b/24B) */
66608 struct __rte_packed_begin hwrm_dbg_qcaps_output {
66609 	/* The specific error status for the command. */
66610 	uint16_t	error_code;
66611 	/* The HWRM command request type. */
66612 	uint16_t	req_type;
66613 	/* The sequence ID from the original command. */
66614 	uint16_t	seq_id;
66615 	/* The length of the response data in number of bytes. */
66616 	uint16_t	resp_len;
66617 	/*
66618 	 * FID value. This value is used to identify operations on the PCI
66619 	 * bus as belonging to a particular PCI function.
66620 	 */
66621 	uint16_t	fid;
66622 	uint8_t	unused_0[2];
66623 	/*
66624 	 * Bitwise field of components FW supports skipping during collection
66625 	 * of coredump as part of a crash collection.
66626 	 */
66627 	uint32_t	coredump_component_disable_caps;
66628 	/*
66629 	 * If 1, FW supports disabling the collection of NVM during a
66630 	 * coredump taken as part of crash collection.
66631 	 */
66632 	#define HWRM_DBG_QCAPS_OUTPUT_COREDUMP_COMPONENT_DISABLE_CAPS_NVRAM \
66633 		UINT32_C(0x1)
66634 	uint32_t	flags;
66635 	/* If 1, FW supports writing a crashdump to NVM. */
66636 	#define HWRM_DBG_QCAPS_OUTPUT_FLAGS_CRASHDUMP_NVM \
66637 		UINT32_C(0x1)
66638 	/* If 1, FW supports writing a crashdump to host ddr. */
66639 	#define HWRM_DBG_QCAPS_OUTPUT_FLAGS_CRASHDUMP_HOST_DDR \
66640 		UINT32_C(0x2)
66641 	/* If 1, FW supports writing a crashdump to soc ddr. */
66642 	#define HWRM_DBG_QCAPS_OUTPUT_FLAGS_CRASHDUMP_SOC_DDR \
66643 		UINT32_C(0x4)
66644 	/* If 1, FW supports USEQ operations */
66645 	#define HWRM_DBG_QCAPS_OUTPUT_FLAGS_USEQ \
66646 		UINT32_C(0x8)
66647 	uint8_t	unused_1[3];
66648 	/*
66649 	 * This field is used in Output records to indicate that the output
66650 	 * is completely written to RAM. This field should be read as '1'
66651 	 * to indicate that the output has been completely written. When
66652 	 * writing a command completion or response to an internal processor,
66653 	 * the order of writes has to be such that this field is written last.
66654 	 */
66655 	uint8_t	valid;
66656 } __rte_packed_end;
66657 
66658 /*****************
66659  * hwrm_dbg_qcfg *
66660  *****************/
66661 
66662 
66663 /* hwrm_dbg_qcfg_input (size:192b/24B) */
66664 struct __rte_packed_begin hwrm_dbg_qcfg_input {
66665 	/* The HWRM command request type. */
66666 	uint16_t	req_type;
66667 	/*
66668 	 * The completion ring to send the completion event on. This should
66669 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66670 	 */
66671 	uint16_t	cmpl_ring;
66672 	/*
66673 	 * The sequence ID is used by the driver for tracking multiple
66674 	 * commands. This ID is treated as opaque data by the firmware and
66675 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66676 	 */
66677 	uint16_t	seq_id;
66678 	/*
66679 	 * The target ID of the command:
66680 	 * * 0x0-0xFFF8 - The function ID
66681 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66682 	 * * 0xFFFD - Reserved for user-space HWRM interface
66683 	 * * 0xFFFF - HWRM
66684 	 */
66685 	uint16_t	target_id;
66686 	/*
66687 	 * A physical address pointer pointing to a host buffer that the
66688 	 * command's response data will be written. This can be either a host
66689 	 * physical address (HPA) or a guest physical address (GPA) and must
66690 	 * point to a physically contiguous block of memory.
66691 	 */
66692 	uint64_t	resp_addr;
66693 	/*
66694 	 * Function ID of the function that is being queried.
66695 	 * 0xFF... (All Fs) if the query is for the requesting
66696 	 * function.
66697 	 */
66698 	uint16_t	fid;
66699 	uint16_t	flags;
66700 	/*
66701 	 * The crashdump size represents size of crashdump
66702 	 * written to the specified destination.
66703 	 */
66704 	#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_MASK \
66705 		UINT32_C(0x3)
66706 	#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_SFT \
66707 		0
66708 	/* crashdump size written to nvm */
66709 	#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_DEST_NVM \
66710 		UINT32_C(0x0)
66711 	/* crashdump size written to host_ddr */
66712 	#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_DEST_HOST_DDR \
66713 		UINT32_C(0x1)
66714 	/* crashdump size written to soc_ddr */
66715 	#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_DEST_SOC_DDR \
66716 		UINT32_C(0x2)
66717 	#define HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_LAST \
66718 		HWRM_DBG_QCFG_INPUT_FLAGS_CRASHDUMP_SIZE_FOR_DEST_DEST_SOC_DDR
66719 	/*
66720 	 * Bitwise field of components requested for FW to skip when
66721 	 * calculating the size of a coredump collection.
66722 	 */
66723 	uint32_t	coredump_component_disable_flags;
66724 	/*
66725 	 * If 1, NVM will not be collected during a coredump taken as part
66726 	 * of crash collection.
66727 	 */
66728 	#define HWRM_DBG_QCFG_INPUT_COREDUMP_COMPONENT_DISABLE_FLAGS_NVRAM \
66729 		UINT32_C(0x1)
66730 } __rte_packed_end;
66731 
66732 /* hwrm_dbg_qcfg_output (size:256b/32B) */
66733 struct __rte_packed_begin hwrm_dbg_qcfg_output {
66734 	/* The specific error status for the command. */
66735 	uint16_t	error_code;
66736 	/* The HWRM command request type. */
66737 	uint16_t	req_type;
66738 	/* The sequence ID from the original command. */
66739 	uint16_t	seq_id;
66740 	/* The length of the response data in number of bytes. */
66741 	uint16_t	resp_len;
66742 	/*
66743 	 * FID value. This value is used to identify operations on the PCI
66744 	 * bus as belonging to a particular PCI function.
66745 	 */
66746 	uint16_t	fid;
66747 	uint8_t	unused_0[2];
66748 	/*
66749 	 * Size in bytes of a coredump file created by the FW. This takes into
66750 	 * consideration any components selected in the
66751 	 * coredump_component_disable_flags field from hwrm_dbg_qcfg_input.
66752 	 */
66753 	uint32_t	coredump_size;
66754 	uint32_t	flags;
66755 	/*
66756 	 * If set to 1, then UART logging is enabled for the primary
66757 	 * firmware. Disabled otherwise.
66758 	 */
66759 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_UART_LOG               UINT32_C(0x1)
66760 	/*
66761 	 * If set to 1, then UART logging is enabled for the secondary
66762 	 * firmware. Disabled otherwise.
66763 	 */
66764 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_UART_LOG_SECONDARY     UINT32_C(0x2)
66765 	/*
66766 	 * If set to 1, then completion ring logging is enabled for the
66767 	 * primary firmware. Disabled otherwise.
66768 	 */
66769 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_FW_TRACE               UINT32_C(0x4)
66770 	/*
66771 	 * If set to 1, then completion ring logging is enabled for the
66772 	 * secondary firmware. Disabled otherwise.
66773 	 */
66774 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_FW_TRACE_SECONDARY     UINT32_C(0x8)
66775 	/*
66776 	 * If set to 1, firmware will generate debug_notification async
66777 	 * events to the driver as applicable.
66778 	 */
66779 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_DEBUG_NOTIFY \
66780 		UINT32_C(0x10)
66781 	/*
66782 	 * If set to 1, firmware is allowed to be unresponsive to heartbeat
66783 	 * health checks, allowing for JTAG debugging scenarios where the
66784 	 * debugger has the firmware processes stopped indefinitely. This
66785 	 * flag has effect only on debug builds of firmware.
66786 	 */
66787 	#define HWRM_DBG_QCFG_OUTPUT_FLAGS_JTAG_DEBUG \
66788 		UINT32_C(0x20)
66789 	/*
66790 	 * Notification queue (completion ring) used by the firmware to post
66791 	 * async debug notifications and fw trace logs. This field is valid
66792 	 * when fw_trace, fw_trace_secondary or debug_notify flags are set.
66793 	 */
66794 	uint16_t	async_cmpl_ring;
66795 	uint8_t	unused_2[2];
66796 	/*
66797 	 * Size in bytes of a crashdump file created by the FW. Uses input
66798 	 * flags to determine medium destination and corresponding size.
66799 	 */
66800 	uint32_t	crashdump_size;
66801 	uint8_t	unused_3[3];
66802 	/*
66803 	 * This field is used in Output records to indicate that the output
66804 	 * is completely written to RAM. This field should be read as '1'
66805 	 * to indicate that the output has been completely written. When
66806 	 * writing a command completion or response to an internal processor,
66807 	 * the order of writes has to be such that this field is written last.
66808 	 */
66809 	uint8_t	valid;
66810 } __rte_packed_end;
66811 
66812 /*********************************
66813  * hwrm_dbg_crashdump_medium_cfg *
66814  *********************************/
66815 
66816 
66817 /* hwrm_dbg_crashdump_medium_cfg_input (size:320b/40B) */
66818 struct __rte_packed_begin hwrm_dbg_crashdump_medium_cfg_input {
66819 	/* The HWRM command request type. */
66820 	uint16_t	req_type;
66821 	/*
66822 	 * The completion ring to send the completion event on. This should
66823 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66824 	 */
66825 	uint16_t	cmpl_ring;
66826 	/*
66827 	 * The sequence ID is used by the driver for tracking multiple
66828 	 * commands. This ID is treated as opaque data by the firmware and
66829 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66830 	 */
66831 	uint16_t	seq_id;
66832 	/*
66833 	 * The target ID of the command:
66834 	 * * 0x0-0xFFF8 - The function ID
66835 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66836 	 * * 0xFFFD - Reserved for user-space HWRM interface
66837 	 * * 0xFFFF - HWRM
66838 	 */
66839 	uint16_t	target_id;
66840 	/*
66841 	 * A physical address pointer pointing to a host buffer that the
66842 	 * command's response data will be written. This can be either a host
66843 	 * physical address (HPA) or a guest physical address (GPA) and must
66844 	 * point to a physically contiguous block of memory.
66845 	 */
66846 	uint64_t	resp_addr;
66847 	uint16_t	output_dest_flags;
66848 	/* Destination is DDR ram. */
66849 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_TYPE_DDR     UINT32_C(0x1)
66850 	uint16_t	pg_size_lvl;
66851 	/* PBL indirect levels. */
66852 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_MASK      UINT32_C(0x3)
66853 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_SFT       0
66854 	/* PBL pointer is physical start address. */
66855 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_LVL_0 \
66856 		UINT32_C(0x0)
66857 	/* PBL pointer points to PTE table. */
66858 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_LVL_1 \
66859 		UINT32_C(0x1)
66860 	/*
66861 	 * PBL pointer points to PDE table with each entry pointing to
66862 	 * PTE tables.
66863 	 */
66864 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_LVL_2 \
66865 		UINT32_C(0x2)
66866 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_LAST \
66867 		HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_LVL_LVL_2
66868 	/* page size. */
66869 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_MASK \
66870 		UINT32_C(0x1c)
66871 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_SFT   2
66872 	/* 4KB. */
66873 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_4K \
66874 		(UINT32_C(0x0) << 2)
66875 	/* 8KB. */
66876 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_8K \
66877 		(UINT32_C(0x1) << 2)
66878 	/* 64KB. */
66879 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_64K \
66880 		(UINT32_C(0x2) << 2)
66881 	/* 2MB. */
66882 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_2M \
66883 		(UINT32_C(0x3) << 2)
66884 	/* 8MB. */
66885 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_8M \
66886 		(UINT32_C(0x4) << 2)
66887 	/* 1GB. */
66888 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_1G \
66889 		(UINT32_C(0x5) << 2)
66890 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_LAST \
66891 		HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_PG_SIZE_PG_1G
66892 	/* unused11 is 11 b */
66893 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_UNUSED11_MASK \
66894 		UINT32_C(0xffe0)
66895 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_UNUSED11_SFT  5
66896 	/* Crashdump buffer size. */
66897 	uint32_t	size;
66898 	/*
66899 	 * Bitwise field of components that FW is requested to skip during
66900 	 * coredump as part of a crash collection.
66901 	 */
66902 	uint32_t	coredump_component_disable_flags;
66903 	/*
66904 	 * If 1, then NVM will not be collected during a coredump taken as
66905 	 * part of crash collection.
66906 	 */
66907 	#define HWRM_DBG_CRASHDUMP_MEDIUM_CFG_INPUT_NVRAM     UINT32_C(0x1)
66908 	uint32_t	unused_0;
66909 	/* Crashdump buffer PBL physical address. */
66910 	uint64_t	pbl;
66911 } __rte_packed_end;
66912 
66913 /* hwrm_dbg_crashdump_medium_cfg_output (size:128b/16B) */
66914 struct __rte_packed_begin hwrm_dbg_crashdump_medium_cfg_output {
66915 	/* The specific error status for the command. */
66916 	uint16_t	error_code;
66917 	/* The HWRM command request type. */
66918 	uint16_t	req_type;
66919 	/* The sequence ID from the original command. */
66920 	uint16_t	seq_id;
66921 	/* The length of the response data in number of bytes. */
66922 	uint16_t	resp_len;
66923 	uint8_t	unused_1[7];
66924 	/*
66925 	 * This field is used in Output records to indicate that the output
66926 	 * is completely written to RAM. This field should be read as '1'
66927 	 * to indicate that the output has been completely written. When
66928 	 * writing a command completion or response to an internal processor,
66929 	 * the order of writes has to be such that this field is written last.
66930 	 */
66931 	uint8_t	valid;
66932 } __rte_packed_end;
66933 
66934 /* coredump_segment_record (size:128b/16B) */
66935 struct __rte_packed_begin coredump_segment_record {
66936 	/* Component id of the returned component. */
66937 	uint16_t	component_id;
66938 	/* Segment id of the returned component. */
66939 	uint16_t	segment_id;
66940 	/* Not used. */
66941 	uint16_t	max_instances;
66942 	/* Major version. */
66943 	uint8_t	version_hi;
66944 	/* Minor version. */
66945 	uint8_t	version_low;
66946 	/*
66947 	 * bit 0: live data
66948 	 * bit 1: crashed data
66949 	 */
66950 	uint8_t	seg_flags;
66951 	/* This field is used to indicate the segment is compressed. */
66952 	uint8_t	compress_flags;
66953 	/*
66954 	 * SFLAG_COMPRESSED_ZLIB indicates that the segment data is
66955 	 * compressed.
66956 	 */
66957 	#define SFLAG_COMPRESSED_ZLIB     UINT32_C(0x1)
66958 	uint8_t	unused_0[2];
66959 	/*
66960 	 * This field is the length of the segment data. It will be zero if
66961 	 * the firmware does not support returning the segment data length.
66962 	 */
66963 	uint32_t	segment_len;
66964 } __rte_packed_end;
66965 
66966 /**************************
66967  * hwrm_dbg_coredump_list *
66968  **************************/
66969 
66970 
66971 /* hwrm_dbg_coredump_list_input (size:256b/32B) */
66972 struct __rte_packed_begin hwrm_dbg_coredump_list_input {
66973 	/* The HWRM command request type. */
66974 	uint16_t	req_type;
66975 	/*
66976 	 * The completion ring to send the completion event on. This should
66977 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
66978 	 */
66979 	uint16_t	cmpl_ring;
66980 	/*
66981 	 * The sequence ID is used by the driver for tracking multiple
66982 	 * commands. This ID is treated as opaque data by the firmware and
66983 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
66984 	 */
66985 	uint16_t	seq_id;
66986 	/*
66987 	 * The target ID of the command:
66988 	 * * 0x0-0xFFF8 - The function ID
66989 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
66990 	 * * 0xFFFD - Reserved for user-space HWRM interface
66991 	 * * 0xFFFF - HWRM
66992 	 */
66993 	uint16_t	target_id;
66994 	/*
66995 	 * A physical address pointer pointing to a host buffer that the
66996 	 * command's response data will be written. This can be either a host
66997 	 * physical address (HPA) or a guest physical address (GPA) and must
66998 	 * point to a physically contiguous block of memory.
66999 	 */
67000 	uint64_t	resp_addr;
67001 	/*
67002 	 * host address where the data content will be written
67003 	 * when the request is complete. This area must be 16B aligned.
67004 	 */
67005 	uint64_t	host_dest_addr;
67006 	/* Length of host buffer used for transferring debug data. */
67007 	uint32_t	host_buf_len;
67008 	/* Sequence number of the request. Starts at 0. */
67009 	uint16_t	seq_no;
67010 	/*  */
67011 	uint8_t	flags;
67012 	/*
67013 	 * If set to 1, crash dump is requested.
67014 	 * If set to 0, both live core and crash dump are requested.
67015 	 */
67016 	#define HWRM_DBG_COREDUMP_LIST_INPUT_FLAGS_CRASHDUMP     UINT32_C(0x1)
67017 	uint8_t	unused_0[1];
67018 } __rte_packed_end;
67019 
67020 /* hwrm_dbg_coredump_list_output (size:128b/16B) */
67021 struct __rte_packed_begin hwrm_dbg_coredump_list_output {
67022 	/* The specific error status for the command. */
67023 	uint16_t	error_code;
67024 	/* The HWRM command request type. */
67025 	uint16_t	req_type;
67026 	/* The sequence ID from the original command. */
67027 	uint16_t	seq_id;
67028 	/* The length of the response data in number of bytes. */
67029 	uint16_t	resp_len;
67030 	uint8_t	flags;
67031 	/*
67032 	 * Value of 1 means that there is more data available.
67033 	 * Issue the request again with the next sequence number.
67034 	 */
67035 	#define HWRM_DBG_COREDUMP_LIST_OUTPUT_FLAGS_MORE     UINT32_C(0x1)
67036 	uint8_t	unused_0;
67037 	/* Total number of segments to be returned. */
67038 	uint16_t	total_segments;
67039 	/* Actual length of data returned in bytes. */
67040 	uint16_t	data_len;
67041 	uint8_t	unused_1;
67042 	/*
67043 	 * This field is used in Output records to indicate that the output
67044 	 * is completely written to RAM. This field should be read as '1'
67045 	 * to indicate that the output has been completely written. When
67046 	 * writing a command completion or response to an internal processor,
67047 	 * the order of writes has to be such that this field is written last.
67048 	 */
67049 	uint8_t	valid;
67050 } __rte_packed_end;
67051 
67052 /******************************
67053  * hwrm_dbg_coredump_initiate *
67054  ******************************/
67055 
67056 
67057 /* hwrm_dbg_coredump_initiate_input (size:256b/32B) */
67058 struct __rte_packed_begin hwrm_dbg_coredump_initiate_input {
67059 	/* The HWRM command request type. */
67060 	uint16_t	req_type;
67061 	/*
67062 	 * The completion ring to send the completion event on. This should
67063 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67064 	 */
67065 	uint16_t	cmpl_ring;
67066 	/*
67067 	 * The sequence ID is used by the driver for tracking multiple
67068 	 * commands. This ID is treated as opaque data by the firmware and
67069 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67070 	 */
67071 	uint16_t	seq_id;
67072 	/*
67073 	 * The target ID of the command:
67074 	 * * 0x0-0xFFF8 - The function ID
67075 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67076 	 * * 0xFFFD - Reserved for user-space HWRM interface
67077 	 * * 0xFFFF - HWRM
67078 	 */
67079 	uint16_t	target_id;
67080 	/*
67081 	 * A physical address pointer pointing to a host buffer that the
67082 	 * command's response data will be written. This can be either a host
67083 	 * physical address (HPA) or a guest physical address (GPA) and must
67084 	 * point to a physically contiguous block of memory.
67085 	 */
67086 	uint64_t	resp_addr;
67087 	/* Component id of the returned component. */
67088 	uint16_t	component_id;
67089 	/* Segment id of the returned component. */
67090 	uint16_t	segment_id;
67091 	/* Not used. */
67092 	uint16_t	instance;
67093 	/* Not used. */
67094 	uint16_t	unused_0;
67095 	/*
67096 	 * bit 0: live data
67097 	 * bit 1: crashed data
67098 	 */
67099 	uint8_t	seg_flags;
67100 	/* Not used. */
67101 	uint8_t	unused_1[7];
67102 } __rte_packed_end;
67103 
67104 /* hwrm_dbg_coredump_initiate_output (size:128b/16B) */
67105 struct __rte_packed_begin hwrm_dbg_coredump_initiate_output {
67106 	/* The specific error status for the command. */
67107 	uint16_t	error_code;
67108 	/* The HWRM command request type. */
67109 	uint16_t	req_type;
67110 	/* The sequence ID from the original command. */
67111 	uint16_t	seq_id;
67112 	/* The length of the response data in number of bytes. */
67113 	uint16_t	resp_len;
67114 	uint8_t	unused_0[7];
67115 	/*
67116 	 * This field is used in Output records to indicate that the output
67117 	 * is completely written to RAM. This field should be read as '1'
67118 	 * to indicate that the output has been completely written. When
67119 	 * writing a command completion or response to an internal processor,
67120 	 * the order of writes has to be such that this field is written last.
67121 	 */
67122 	uint8_t	valid;
67123 } __rte_packed_end;
67124 
67125 /* coredump_data_hdr (size:128b/16B) */
67126 struct __rte_packed_begin coredump_data_hdr {
67127 	/* Starting address of the register range. */
67128 	uint32_t	address;
67129 	/*
67130 	 * length: 0 - 23 bits represents the actual data without the pad.
67131 	 * flags: 24 - 31 bits represents indirect register ranges.
67132 	 *   - bit 24: Set if registers in this segment are indirect accessed.
67133 	 */
67134 	uint32_t	flags_length;
67135 	/* These bits represents the actual length of the data segment */
67136 	#define COREDUMP_DATA_HDR_FLAGS_LENGTH_ACTUAL_LEN_MASK \
67137 		UINT32_C(0xffffff)
67138 	#define COREDUMP_DATA_HDR_FLAGS_LENGTH_ACTUAL_LEN_SFT      0
67139 	/* Set if registers in this segment are indirect accessed. */
67140 	#define COREDUMP_DATA_HDR_FLAGS_LENGTH_INDIRECT_ACCESS \
67141 		UINT32_C(0x1000000)
67142 	/* Value in the partner register for indirect or multi-field registers. */
67143 	uint32_t	instance;
67144 	/* Starting address of the next register after the current data range */
67145 	uint32_t	next_offset;
67146 } __rte_packed_end;
67147 
67148 /******************************
67149  * hwrm_dbg_coredump_retrieve *
67150  ******************************/
67151 
67152 
67153 /* hwrm_dbg_coredump_retrieve_input (size:448b/56B) */
67154 struct __rte_packed_begin hwrm_dbg_coredump_retrieve_input {
67155 	/* The HWRM command request type. */
67156 	uint16_t	req_type;
67157 	/*
67158 	 * The completion ring to send the completion event on. This should
67159 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67160 	 */
67161 	uint16_t	cmpl_ring;
67162 	/*
67163 	 * The sequence ID is used by the driver for tracking multiple
67164 	 * commands. This ID is treated as opaque data by the firmware and
67165 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67166 	 */
67167 	uint16_t	seq_id;
67168 	/*
67169 	 * The target ID of the command:
67170 	 * * 0x0-0xFFF8 - The function ID
67171 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67172 	 * * 0xFFFD - Reserved for user-space HWRM interface
67173 	 * * 0xFFFF - HWRM
67174 	 */
67175 	uint16_t	target_id;
67176 	/*
67177 	 * A physical address pointer pointing to a host buffer that the
67178 	 * command's response data will be written. This can be either a host
67179 	 * physical address (HPA) or a guest physical address (GPA) and must
67180 	 * point to a physically contiguous block of memory.
67181 	 */
67182 	uint64_t	resp_addr;
67183 	/*
67184 	 * host address where the data content will be written
67185 	 * when the request is complete. This area must be 16B aligned.
67186 	 */
67187 	uint64_t	host_dest_addr;
67188 	/* Length of host buffer used for transferring debug data. */
67189 	uint32_t	host_buf_len;
67190 	/* Not used. */
67191 	uint32_t	unused_0;
67192 	/* Component id of the returned component. */
67193 	uint16_t	component_id;
67194 	/* Segment id of the returned component. */
67195 	uint16_t	segment_id;
67196 	/* Not used. */
67197 	uint16_t	instance;
67198 	/* Not used. */
67199 	uint16_t	unused_1;
67200 	/*
67201 	 * bit 0: live data
67202 	 * bit 1: crashed data
67203 	 */
67204 	uint8_t	seg_flags;
67205 	uint8_t	unused_2;
67206 	uint16_t	unused_3;
67207 	/* Not used. */
67208 	uint32_t	unused_4;
67209 	/* Sequence number is used per segment request. Starts at 0. */
67210 	uint32_t	seq_no;
67211 	uint32_t	unused_5;
67212 } __rte_packed_end;
67213 
67214 /* hwrm_dbg_coredump_retrieve_output (size:128b/16B) */
67215 struct __rte_packed_begin hwrm_dbg_coredump_retrieve_output {
67216 	/* The specific error status for the command. */
67217 	uint16_t	error_code;
67218 	/* The HWRM command request type. */
67219 	uint16_t	req_type;
67220 	/* The sequence ID from the original command. */
67221 	uint16_t	seq_id;
67222 	/* The length of the response data in number of bytes. */
67223 	uint16_t	resp_len;
67224 	uint8_t	flags;
67225 	/*
67226 	 * Value of 1 means that there is more data available.
67227 	 * Issue the request again with the next sequence number.
67228 	 */
67229 	#define HWRM_DBG_COREDUMP_RETRIEVE_OUTPUT_FLAGS_MORE     UINT32_C(0x1)
67230 	uint8_t	unused_0;
67231 	/* Actual length of data returned in bytes. */
67232 	uint16_t	data_len;
67233 	uint8_t	unused_1[3];
67234 	/*
67235 	 * This field is used in Output records to indicate that the output
67236 	 * is completely written to RAM. This field should be read as '1'
67237 	 * to indicate that the output has been completely written. When
67238 	 * writing a command completion or response to an internal processor,
67239 	 * the order of writes has to be such that this field is written last.
67240 	 */
67241 	uint8_t	valid;
67242 } __rte_packed_end;
67243 
67244 /*******************
67245  * hwrm_dbg_fw_cli *
67246  *******************/
67247 
67248 
67249 /* hwrm_dbg_fw_cli_input (size:1024b/128B) */
67250 struct __rte_packed_begin hwrm_dbg_fw_cli_input {
67251 	/* The HWRM command request type. */
67252 	uint16_t	req_type;
67253 	/*
67254 	 * The completion ring to send the completion event on. This should
67255 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67256 	 */
67257 	uint16_t	cmpl_ring;
67258 	/*
67259 	 * The sequence ID is used by the driver for tracking multiple
67260 	 * commands. This ID is treated as opaque data by the firmware and
67261 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67262 	 */
67263 	uint16_t	seq_id;
67264 	/*
67265 	 * The target ID of the command:
67266 	 * * 0x0-0xFFF8 - The function ID
67267 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67268 	 * * 0xFFFD - Reserved for user-space HWRM interface
67269 	 * * 0xFFFF - HWRM
67270 	 */
67271 	uint16_t	target_id;
67272 	/*
67273 	 * A physical address pointer pointing to a host buffer that the
67274 	 * command's response data will be written. This can be either a host
67275 	 * physical address (HPA) or a guest physical address (GPA) and must
67276 	 * point to a physically contiguous block of memory.
67277 	 */
67278 	uint64_t	resp_addr;
67279 	/*
67280 	 * Address of the host buffer where debug CLI data
67281 	 * is requested to be dumped.
67282 	 */
67283 	uint64_t	host_dest_addr;
67284 	/* Length of host buffer used for transferring debug data. */
67285 	uint32_t	host_buf_len;
67286 	/* Length of CLI command. */
67287 	uint16_t	cli_cmd_len;
67288 	uint8_t	unused_0[2];
67289 	/* CLI command string, a single ASCII encoded null terminated string. */
67290 	uint8_t	cli_cmd[96];
67291 } __rte_packed_end;
67292 
67293 /* hwrm_dbg_fw_cli_output (size:128b/16B) */
67294 struct __rte_packed_begin hwrm_dbg_fw_cli_output {
67295 	/* The specific error status for the command. */
67296 	uint16_t	error_code;
67297 	/* The HWRM command request type. */
67298 	uint16_t	req_type;
67299 	/* The sequence ID from the original command. */
67300 	uint16_t	seq_id;
67301 	/* The length of the response data in number of bytes. */
67302 	uint16_t	resp_len;
67303 	/* Size of debug CLI data returned in bytes. */
67304 	uint32_t	cli_data_len;
67305 	uint8_t	unused_0[3];
67306 	/*
67307 	 * This field is used in Output records to indicate that the output
67308 	 * is completely written to RAM. This field should be read as '1'
67309 	 * to indicate that the output has been completely written. When
67310 	 * writing a command completion or response to an internal processor,
67311 	 * the order of writes has to be such that this field is written last.
67312 	 */
67313 	uint8_t	valid;
67314 } __rte_packed_end;
67315 
67316 /**************************
67317  * hwrm_dbg_ring_info_get *
67318  **************************/
67319 
67320 
67321 /* hwrm_dbg_ring_info_get_input (size:192b/24B) */
67322 struct __rte_packed_begin hwrm_dbg_ring_info_get_input {
67323 	/* The HWRM command request type. */
67324 	uint16_t	req_type;
67325 	/*
67326 	 * The completion ring to send the completion event on. This should
67327 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67328 	 */
67329 	uint16_t	cmpl_ring;
67330 	/*
67331 	 * The sequence ID is used by the driver for tracking multiple
67332 	 * commands. This ID is treated as opaque data by the firmware and
67333 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67334 	 */
67335 	uint16_t	seq_id;
67336 	/*
67337 	 * The target ID of the command:
67338 	 * * 0x0-0xFFF8 - The function ID
67339 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67340 	 * * 0xFFFD - Reserved for user-space HWRM interface
67341 	 * * 0xFFFF - HWRM
67342 	 */
67343 	uint16_t	target_id;
67344 	/*
67345 	 * A physical address pointer pointing to a host buffer that the
67346 	 * command's response data will be written. This can be either a host
67347 	 * physical address (HPA) or a guest physical address (GPA) and must
67348 	 * point to a physically contiguous block of memory.
67349 	 */
67350 	uint64_t	resp_addr;
67351 	/* Ring Type. */
67352 	uint8_t	ring_type;
67353 	/* L2 Completion Ring (CR) */
67354 	#define HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_L2_CMPL UINT32_C(0x0)
67355 	/* TX Ring (TR) */
67356 	#define HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_TX      UINT32_C(0x1)
67357 	/* RX Ring (RR) */
67358 	#define HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_RX      UINT32_C(0x2)
67359 	/* Notification Queue (NQ) */
67360 	#define HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_NQ      UINT32_C(0x3)
67361 	#define HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_LAST \
67362 		HWRM_DBG_RING_INFO_GET_INPUT_RING_TYPE_NQ
67363 	uint8_t	unused_0[3];
67364 	/* Firmware ring ID associated with ring being queried. */
67365 	uint32_t	fw_ring_id;
67366 } __rte_packed_end;
67367 
67368 /* hwrm_dbg_ring_info_get_output (size:192b/24B) */
67369 struct __rte_packed_begin hwrm_dbg_ring_info_get_output {
67370 	/* The specific error status for the command. */
67371 	uint16_t	error_code;
67372 	/* The HWRM command request type. */
67373 	uint16_t	req_type;
67374 	/* The sequence ID from the original command. */
67375 	uint16_t	seq_id;
67376 	/* The length of the response data in number of bytes. */
67377 	uint16_t	resp_len;
67378 	/* Producer index for the queried ring. */
67379 	uint32_t	producer_index;
67380 	/* Consumer index for the queried ring. */
67381 	uint32_t	consumer_index;
67382 	/*
67383 	 * CAG Vector Control for the queried NQ ring.
67384 	 * Not valid for other ring types.
67385 	 */
67386 	uint32_t	cag_vector_ctrl;
67387 	/*
67388 	 * Steering Tag. The current value of the steering tag for the ring.
67389 	 * The steering tag is only valid if it is advertised by Firmware in
67390 	 * flags_ext2.steering_tag_supported of hwrm_func_qcaps response.
67391 	 */
67392 	uint16_t	st_tag;
67393 	uint8_t	unused_0;
67394 	/*
67395 	 * This field is used in Output records to indicate that the output
67396 	 * is completely written to RAM. This field should be read as '1'
67397 	 * to indicate that the output has been completely written. When
67398 	 * writing a command completion or response to an internal processor,
67399 	 * the order of writes has to be such that this field is written last.
67400 	 */
67401 	uint8_t	valid;
67402 } __rte_packed_end;
67403 
67404 /**********************
67405  * hwrm_dbg_drv_trace *
67406  **********************/
67407 
67408 
67409 /* hwrm_dbg_drv_trace_input (size:1024b/128B) */
67410 struct __rte_packed_begin hwrm_dbg_drv_trace_input {
67411 	/* The HWRM command request type. */
67412 	uint16_t	req_type;
67413 	/*
67414 	 * The completion ring to send the completion event on. This should
67415 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67416 	 */
67417 	uint16_t	cmpl_ring;
67418 	/*
67419 	 * The sequence ID is used by the driver for tracking multiple
67420 	 * commands. This ID is treated as opaque data by the firmware and
67421 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67422 	 */
67423 	uint16_t	seq_id;
67424 	/*
67425 	 * The target ID of the command:
67426 	 * * 0x0-0xFFF8 - The function ID
67427 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67428 	 * * 0xFFFD - Reserved for user-space HWRM interface
67429 	 * * 0xFFFF - HWRM
67430 	 */
67431 	uint16_t	target_id;
67432 	/*
67433 	 * A physical address pointer pointing to a host buffer that the
67434 	 * command's response data will be written. This can be either a host
67435 	 * physical address (HPA) or a guest physical address (GPA) and must
67436 	 * point to a physically contiguous block of memory.
67437 	 */
67438 	uint64_t	resp_addr;
67439 	/* Severity of the message. */
67440 	uint8_t	severity;
67441 	/* Fatal */
67442 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_FATAL \
67443 		UINT32_C(0x0)
67444 	/* Error */
67445 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_ERROR \
67446 		UINT32_C(0x1)
67447 	/* Warning */
67448 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_WARNING \
67449 		UINT32_C(0x2)
67450 	/* Info */
67451 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_INFO \
67452 		UINT32_C(0x3)
67453 	/* Debug */
67454 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_DEBUG \
67455 		UINT32_C(0x4)
67456 	#define HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_LAST \
67457 		HWRM_DBG_DRV_TRACE_INPUT_SEVERITY_TRACE_LEVEL_DEBUG
67458 	/* Number of bytes to write including terminating 'NULL' if any. */
67459 	uint8_t	write_len;
67460 	uint8_t	unused_0[6];
67461 	/*
67462 	 * This field represents the debug data sent by driver
67463 	 * ASCII chars, 'NULL' termination not required.
67464 	 */
67465 	char	trace_data[104];
67466 } __rte_packed_end;
67467 
67468 /* hwrm_dbg_drv_trace_output (size:128b/16B) */
67469 struct __rte_packed_begin hwrm_dbg_drv_trace_output {
67470 	/* The specific error status for the command. */
67471 	uint16_t	error_code;
67472 	/* The HWRM command request type. */
67473 	uint16_t	req_type;
67474 	/* The sequence ID from the original command. */
67475 	uint16_t	seq_id;
67476 	/* The length of the response data in number of bytes. */
67477 	uint16_t	resp_len;
67478 	uint8_t	unused_0[7];
67479 	/*
67480 	 * This field is used in Output records to indicate that the output
67481 	 * is completely written to RAM. This field should be read as '1'
67482 	 * to indicate that the output has been completely written. When
67483 	 * writing a command completion or response to an internal processor,
67484 	 * the order of writes has to be such that this field is written last.
67485 	 */
67486 	uint8_t	valid;
67487 } __rte_packed_end;
67488 
67489 /***********************
67490  * hwrm_dbg_useq_alloc *
67491  ***********************/
67492 
67493 
67494 /* hwrm_dbg_useq_alloc_input (size:192b/24B) */
67495 struct __rte_packed_begin hwrm_dbg_useq_alloc_input {
67496 	/* The HWRM command request type. */
67497 	uint16_t	req_type;
67498 	/*
67499 	 * The completion ring to send the completion event on. This should
67500 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67501 	 */
67502 	uint16_t	cmpl_ring;
67503 	/*
67504 	 * The sequence ID is used by the driver for tracking multiple
67505 	 * commands. This ID is treated as opaque data by the firmware and
67506 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67507 	 */
67508 	uint16_t	seq_id;
67509 	/*
67510 	 * The target ID of the command:
67511 	 * * 0x0-0xFFF8 - The function ID
67512 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67513 	 * * 0xFFFD - Reserved for user-space HWRM interface
67514 	 * * 0xFFFF - HWRM
67515 	 */
67516 	uint16_t	target_id;
67517 	/*
67518 	 * A physical address pointer pointing to a host buffer that the
67519 	 * command's response data will be written. This can be either a host
67520 	 * physical address (HPA) or a guest physical address (GPA) and must
67521 	 * point to a physically contiguous block of memory.
67522 	 */
67523 	uint64_t	resp_addr;
67524 	/*
67525 	 * Number size of the allocation, in bytes, for the USEQ in the code
67526 	 * words array
67527 	 */
67528 	uint32_t	size;
67529 	/*
67530 	 * Number of bytes executing the USEQ will produce. Must be a multiple
67531 	 * of 4
67532 	 */
67533 	uint16_t	output_bytes;
67534 	/* This field is reserved */
67535 	uint16_t	unused_0;
67536 } __rte_packed_end;
67537 
67538 /* hwrm_dbg_useq_alloc_output (size:256b/32B) */
67539 struct __rte_packed_begin hwrm_dbg_useq_alloc_output {
67540 	/* The specific error status for the command. */
67541 	uint16_t	error_code;
67542 	/* The HWRM command request type. */
67543 	uint16_t	req_type;
67544 	/* The sequence ID from the original command. */
67545 	uint16_t	seq_id;
67546 	/* The length of the response data in number of bytes. */
67547 	uint16_t	resp_len;
67548 	/* Non-zero firmware timestamp */
67549 	uint32_t	nz_fw_timestamp;
67550 	/* The last selected USID */
67551 	uint16_t	last_usid;
67552 	/* The number of USEQs currently allocated */
67553 	uint16_t	num_useq_allocd;
67554 	/* Flags indicating current USEQ engine state */
67555 	uint32_t	useq_resp_flags;
67556 	/* When set, there is at least some data available to be delivered */
67557 	#define HWRM_DBG_USEQ_ALLOC_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL \
67558 		UINT32_C(0x1)
67559 	/* When set, all internal buffers are full */
67560 	#define HWRM_DBG_USEQ_ALLOC_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW \
67561 		UINT32_C(0x2)
67562 	#define HWRM_DBG_USEQ_ALLOC_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST \
67563 		HWRM_DBG_USEQ_ALLOC_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
67564 	/* Current count of the number of full buffers available for delivery */
67565 	uint8_t	full_cnt;
67566 	/* Reserved */
67567 	uint8_t	useq_resp_unused_0[3];
67568 	/* This is the allocated usid */
67569 	uint16_t	alloc_usid;
67570 	/* This field is reserved */
67571 	uint16_t	unused_0;
67572 	/*
67573 	 * This field is used in Output records to indicate that the output
67574 	 * is completely written to RAM. This field should be read as '1'
67575 	 * to indicate that the output has been completely written. When
67576 	 * writing a command completion or response to an internal processor,
67577 	 * the order of writes has to be such that this field is written last.
67578 	 */
67579 	uint32_t	valid;
67580 } __rte_packed_end;
67581 
67582 /**********************
67583  * hwrm_dbg_useq_free *
67584  **********************/
67585 
67586 
67587 /* hwrm_dbg_useq_free_input (size:192b/24B) */
67588 struct __rte_packed_begin hwrm_dbg_useq_free_input {
67589 	/* The HWRM command request type. */
67590 	uint16_t	req_type;
67591 	/*
67592 	 * The completion ring to send the completion event on. This should
67593 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67594 	 */
67595 	uint16_t	cmpl_ring;
67596 	/*
67597 	 * The sequence ID is used by the driver for tracking multiple
67598 	 * commands. This ID is treated as opaque data by the firmware and
67599 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67600 	 */
67601 	uint16_t	seq_id;
67602 	/*
67603 	 * The target ID of the command:
67604 	 * * 0x0-0xFFF8 - The function ID
67605 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67606 	 * * 0xFFFD - Reserved for user-space HWRM interface
67607 	 * * 0xFFFF - HWRM
67608 	 */
67609 	uint16_t	target_id;
67610 	/*
67611 	 * A physical address pointer pointing to a host buffer that the
67612 	 * command's response data will be written. This can be either a host
67613 	 * physical address (HPA) or a guest physical address (GPA) and must
67614 	 * point to a physically contiguous block of memory.
67615 	 */
67616 	uint64_t	resp_addr;
67617 	/* The USID of the sequence to free */
67618 	uint16_t	usid;
67619 	/* This field is reserved */
67620 	uint8_t	unused_0[6];
67621 } __rte_packed_end;
67622 
67623 /* hwrm_dbg_useq_free_output (size:256b/32B) */
67624 struct __rte_packed_begin hwrm_dbg_useq_free_output {
67625 	/* The specific error status for the command. */
67626 	uint16_t	error_code;
67627 	/* The HWRM command request type. */
67628 	uint16_t	req_type;
67629 	/* The sequence ID from the original command. */
67630 	uint16_t	seq_id;
67631 	/* The length of the response data in number of bytes. */
67632 	uint16_t	resp_len;
67633 	/* Non-zero firmware timestamp */
67634 	uint32_t	nz_fw_timestamp;
67635 	/* The last selected USID */
67636 	uint16_t	last_usid;
67637 	/* The number of USEQs currently allocated */
67638 	uint16_t	num_useq_allocd;
67639 	/* Flags indicating current USEQ engine state */
67640 	uint32_t	useq_resp_flags;
67641 	/* When set, there is at least some data available to be delivered */
67642 	#define HWRM_DBG_USEQ_FREE_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL \
67643 		UINT32_C(0x1)
67644 	/* When set, all internal buffers are full */
67645 	#define HWRM_DBG_USEQ_FREE_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW \
67646 		UINT32_C(0x2)
67647 	#define HWRM_DBG_USEQ_FREE_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST \
67648 		HWRM_DBG_USEQ_FREE_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
67649 	/* Current count of the number of full buffers available for delivery */
67650 	uint8_t	full_cnt;
67651 	/* Reserved */
67652 	uint8_t	useq_resp_unused_0[3];
67653 	/* This field is reserved */
67654 	uint32_t	unused_0;
67655 	/*
67656 	 * This field is used in Output records to indicate that the output
67657 	 * is completely written to RAM. This field should be read as '1'
67658 	 * to indicate that the output has been completely written. When
67659 	 * writing a command completion or response to an internal processor,
67660 	 * the order of writes has to be such that this field is written last.
67661 	 */
67662 	uint32_t	valid;
67663 } __rte_packed_end;
67664 
67665 /***********************
67666  * hwrm_dbg_useq_flush *
67667  ***********************/
67668 
67669 
67670 /* hwrm_dbg_useq_flush_input (size:192b/24B) */
67671 struct __rte_packed_begin hwrm_dbg_useq_flush_input {
67672 	/* The HWRM command request type. */
67673 	uint16_t	req_type;
67674 	/*
67675 	 * The completion ring to send the completion event on. This should
67676 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67677 	 */
67678 	uint16_t	cmpl_ring;
67679 	/*
67680 	 * The sequence ID is used by the driver for tracking multiple
67681 	 * commands. This ID is treated as opaque data by the firmware and
67682 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67683 	 */
67684 	uint16_t	seq_id;
67685 	/*
67686 	 * The target ID of the command:
67687 	 * * 0x0-0xFFF8 - The function ID
67688 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67689 	 * * 0xFFFD - Reserved for user-space HWRM interface
67690 	 * * 0xFFFF - HWRM
67691 	 */
67692 	uint16_t	target_id;
67693 	/*
67694 	 * A physical address pointer pointing to a host buffer that the
67695 	 * command's response data will be written. This can be either a host
67696 	 * physical address (HPA) or a guest physical address (GPA) and must
67697 	 * point to a physically contiguous block of memory.
67698 	 */
67699 	uint64_t	resp_addr;
67700 	/* Bitwise flags described below */
67701 	uint16_t	flags;
67702 	/* Flush all USEQ code words, resetting all USIDs to invalid */
67703 	#define HWRM_DBG_USEQ_FLUSH_INPUT_USEQ_CODE_WORDS UINT32_C(0x1)
67704 	/* Initialize all buffers, clearing out any collected data */
67705 	#define HWRM_DBG_USEQ_FLUSH_INPUT_BUFFERS         UINT32_C(0x2)
67706 	#define HWRM_DBG_USEQ_FLUSH_INPUT_LAST \
67707 		HWRM_DBG_USEQ_FLUSH_INPUT_BUFFERS
67708 	/* This field is reserved */
67709 	uint8_t	unused_0[6];
67710 } __rte_packed_end;
67711 
67712 /* hwrm_dbg_useq_flush_output (size:256b/32B) */
67713 struct __rte_packed_begin hwrm_dbg_useq_flush_output {
67714 	/* The specific error status for the command. */
67715 	uint16_t	error_code;
67716 	/* The HWRM command request type. */
67717 	uint16_t	req_type;
67718 	/* The sequence ID from the original command. */
67719 	uint16_t	seq_id;
67720 	/* The length of the response data in number of bytes. */
67721 	uint16_t	resp_len;
67722 	/* Non-zero firmware timestamp */
67723 	uint32_t	nz_fw_timestamp;
67724 	/* The last selected USID */
67725 	uint16_t	last_usid;
67726 	/* The number of USEQs currently allocated */
67727 	uint16_t	num_useq_allocd;
67728 	/* Flags indicating current USEQ engine state */
67729 	uint32_t	useq_resp_flags;
67730 	/* When set, there is at least some data available to be delivered */
67731 	#define HWRM_DBG_USEQ_FLUSH_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL \
67732 		UINT32_C(0x1)
67733 	/* When set, all internal buffers are full */
67734 	#define HWRM_DBG_USEQ_FLUSH_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW \
67735 		UINT32_C(0x2)
67736 	#define HWRM_DBG_USEQ_FLUSH_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST \
67737 		HWRM_DBG_USEQ_FLUSH_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
67738 	/* Current count of the number of full buffers available for delivery */
67739 	uint8_t	full_cnt;
67740 	/* Reserved */
67741 	uint8_t	useq_resp_unused_0[3];
67742 	/* This field is reserved */
67743 	uint32_t	unused_0;
67744 	/*
67745 	 * This field is used in Output records to indicate that the output
67746 	 * is completely written to RAM. This field should be read as '1'
67747 	 * to indicate that the output has been completely written. When
67748 	 * writing a command completion or response to an internal processor,
67749 	 * the order of writes has to be such that this field is written last.
67750 	 */
67751 	uint32_t	valid;
67752 } __rte_packed_end;
67753 
67754 /************************
67755  * hwrm_dbg_useq_cw_cfg *
67756  ************************/
67757 
67758 
67759 /* hwrm_dbg_useq_cw_cfg_input (size:960b/120B) */
67760 struct __rte_packed_begin hwrm_dbg_useq_cw_cfg_input {
67761 	/* The HWRM command request type. */
67762 	uint16_t	req_type;
67763 	/*
67764 	 * The completion ring to send the completion event on. This should
67765 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67766 	 */
67767 	uint16_t	cmpl_ring;
67768 	/*
67769 	 * The sequence ID is used by the driver for tracking multiple
67770 	 * commands. This ID is treated as opaque data by the firmware and
67771 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67772 	 */
67773 	uint16_t	seq_id;
67774 	/*
67775 	 * The target ID of the command:
67776 	 * * 0x0-0xFFF8 - The function ID
67777 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67778 	 * * 0xFFFD - Reserved for user-space HWRM interface
67779 	 * * 0xFFFF - HWRM
67780 	 */
67781 	uint16_t	target_id;
67782 	/*
67783 	 * A physical address pointer pointing to a host buffer that the
67784 	 * command's response data will be written. This can be either a host
67785 	 * physical address (HPA) or a guest physical address (GPA) and must
67786 	 * point to a physically contiguous block of memory.
67787 	 */
67788 	uint64_t	resp_addr;
67789 	/* The USID of the sequence being configured */
67790 	uint16_t	usid;
67791 	/*
67792 	 * The code words given in this message will be placed
67793 	 * at this offset from the starting code word for this
67794 	 * usid. NOTE: when offset is zero, the first 6 32-bit
67795 	 * words may contain values for F0-F7 as well as the
67796 	 * main code word index. This is determined by checking
67797 	 * the usid_ctrl_present flag.
67798 	 */
67799 	uint16_t	offset;
67800 	/*
67801 	 * When the use_dma flag is clear, this is the length in bytes
67802 	 * to be digested from the opaque data area.
67803 	 */
67804 	uint16_t	size;
67805 	/*
67806 	 * Flags associated with the current message
67807 	 * data area.
67808 	 */
67809 	uint16_t	flags;
67810 	/*
67811 	 * When set, the opaque data begins with a block of control
67812 	 * information to be associated with the usid. This includes
67813 	 * F0-F7 code word indexes as well as the code word index for
67814 	 * main.
67815 	 */
67816 	#define HWRM_DBG_USEQ_CW_CFG_INPUT_FLAGS_USID_CTRL_PRESENT \
67817 		UINT32_C(0x1)
67818 	/*
67819 	 * When set, opaque contains a 64b host address used to DMA
67820 	 * the entire code word sequence. The offset within the
67821 	 * opaque data depends on the state of other flags.
67822 	 */
67823 	#define HWRM_DBG_USEQ_CW_CFG_INPUT_FLAGS_USE_DMA \
67824 		UINT32_C(0x2)
67825 	/*
67826 	 * When set, this message is the last configuration message
67827 	 * for the given usid.
67828 	 */
67829 	#define HWRM_DBG_USEQ_CW_CFG_INPUT_FLAGS_END \
67830 		UINT32_C(0x8000)
67831 	#define HWRM_DBG_USEQ_CW_CFG_INPUT_FLAGS_LAST \
67832 		HWRM_DBG_USEQ_CW_CFG_INPUT_FLAGS_END
67833 	/* command dependent data (e.g. function id for host dma command) */
67834 	uint32_t	opaque[24];
67835 } __rte_packed_end;
67836 
67837 /* hwrm_dbg_useq_cw_cfg_output (size:192b/24B) */
67838 struct __rte_packed_begin hwrm_dbg_useq_cw_cfg_output {
67839 	/* The specific error status for the command. */
67840 	uint16_t	error_code;
67841 	/* The HWRM command request type. */
67842 	uint16_t	req_type;
67843 	/* The sequence ID from the original command. */
67844 	uint16_t	seq_id;
67845 	/* The length of the response data in number of bytes. */
67846 	uint16_t	resp_len;
67847 	/* Non-zero firmware timestamp */
67848 	uint32_t	nz_fw_timestamp;
67849 	/* The last selected USID */
67850 	uint16_t	last_usid;
67851 	/* The number of USEQs currently allocated */
67852 	uint16_t	num_useq_allocd;
67853 	/* Flags indicating current USEQ engine state */
67854 	uint32_t	useq_resp_flags;
67855 	/* When set, there is at least some data available to be delivered */
67856 	#define HWRM_DBG_USEQ_CW_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL \
67857 		UINT32_C(0x1)
67858 	/* When set, all internal buffers are full */
67859 	#define HWRM_DBG_USEQ_CW_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW \
67860 		UINT32_C(0x2)
67861 	#define HWRM_DBG_USEQ_CW_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST \
67862 		HWRM_DBG_USEQ_CW_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
67863 	/* Current count of the number of full buffers available for delivery */
67864 	uint8_t	full_cnt;
67865 	/* Reserved */
67866 	uint8_t	useq_resp_unused_0[3];
67867 } __rte_packed_end;
67868 
67869 /***********************
67870  * hwrm_dbg_useq_qcaps *
67871  ***********************/
67872 
67873 
67874 /* hwrm_dbg_useq_qcaps_input (size:128b/16B) */
67875 struct __rte_packed_begin hwrm_dbg_useq_qcaps_input {
67876 	/* The HWRM command request type. */
67877 	uint16_t	req_type;
67878 	/*
67879 	 * The completion ring to send the completion event on. This should
67880 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67881 	 */
67882 	uint16_t	cmpl_ring;
67883 	/*
67884 	 * The sequence ID is used by the driver for tracking multiple
67885 	 * commands. This ID is treated as opaque data by the firmware and
67886 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67887 	 */
67888 	uint16_t	seq_id;
67889 	/*
67890 	 * The target ID of the command:
67891 	 * * 0x0-0xFFF8 - The function ID
67892 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67893 	 * * 0xFFFD - Reserved for user-space HWRM interface
67894 	 * * 0xFFFF - HWRM
67895 	 */
67896 	uint16_t	target_id;
67897 	/*
67898 	 * A physical address pointer pointing to a host buffer that the
67899 	 * command's response data will be written. This can be either a host
67900 	 * physical address (HPA) or a guest physical address (GPA) and must
67901 	 * point to a physically contiguous block of memory.
67902 	 */
67903 	uint64_t	resp_addr;
67904 } __rte_packed_end;
67905 
67906 /* hwrm_dbg_useq_qcaps_output (size:384b/48B) */
67907 struct __rte_packed_begin hwrm_dbg_useq_qcaps_output {
67908 	/* The specific error status for the command. */
67909 	uint16_t	error_code;
67910 	/* The HWRM command request type. */
67911 	uint16_t	req_type;
67912 	/* The sequence ID from the original command. */
67913 	uint16_t	seq_id;
67914 	/* The length of the response data in number of bytes. */
67915 	uint16_t	resp_len;
67916 	/* Non-zero firmware timestamp */
67917 	uint32_t	nz_fw_timestamp;
67918 	/* The last selected USID */
67919 	uint16_t	last_usid;
67920 	/* The number of USEQs currently allocated */
67921 	uint16_t	num_useq_allocd;
67922 	/* Flags indicating current USEQ engine state */
67923 	uint32_t	useq_resp_flags;
67924 	/* When set, there is at least some data available to be delivered */
67925 	#define HWRM_DBG_USEQ_QCAPS_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL \
67926 		UINT32_C(0x1)
67927 	/* When set, all internal buffers are full */
67928 	#define HWRM_DBG_USEQ_QCAPS_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW \
67929 		UINT32_C(0x2)
67930 	#define HWRM_DBG_USEQ_QCAPS_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST \
67931 		HWRM_DBG_USEQ_QCAPS_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
67932 	/* Current count of the number of full buffers available for delivery */
67933 	uint8_t	full_cnt;
67934 	/* Reserved */
67935 	uint8_t	useq_resp_unused_0[3];
67936 	/* Maximum number of USEQ that can be tracked by firmware */
67937 	uint32_t	max_num_useq;
67938 	/* Maximum number of code word bytes for a single USEQ */
67939 	uint32_t	max_useq_size;
67940 	/* The maximum number of output bytes a single USEQ may generate */
67941 	uint32_t	max_useq_32b_output_size;
67942 	/* The number of internal USEQ output buffers, each of 4096 bytes */
67943 	uint32_t	num_buf;
67944 	/* This field is reserved */
67945 	uint32_t	unused_0;
67946 	/*
67947 	 * This field is used in Output records to indicate that the output
67948 	 * is completely written to RAM. This field should be read as '1'
67949 	 * to indicate that the output has been completely written. When
67950 	 * writing a command completion or response to an internal processor,
67951 	 * the order of writes has to be such that this field is written last.
67952 	 */
67953 	uint32_t	valid;
67954 } __rte_packed_end;
67955 
67956 /***************************
67957  * hwrm_dbg_useq_sched_cfg *
67958  ***************************/
67959 
67960 
67961 /* hwrm_dbg_useq_sched_cfg_input (size:192b/24B) */
67962 struct __rte_packed_begin hwrm_dbg_useq_sched_cfg_input {
67963 	/* The HWRM command request type. */
67964 	uint16_t	req_type;
67965 	/*
67966 	 * The completion ring to send the completion event on. This should
67967 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
67968 	 */
67969 	uint16_t	cmpl_ring;
67970 	/*
67971 	 * The sequence ID is used by the driver for tracking multiple
67972 	 * commands. This ID is treated as opaque data by the firmware and
67973 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
67974 	 */
67975 	uint16_t	seq_id;
67976 	/*
67977 	 * The target ID of the command:
67978 	 * * 0x0-0xFFF8 - The function ID
67979 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
67980 	 * * 0xFFFD - Reserved for user-space HWRM interface
67981 	 * * 0xFFFF - HWRM
67982 	 */
67983 	uint16_t	target_id;
67984 	/*
67985 	 * A physical address pointer pointing to a host buffer that the
67986 	 * command's response data will be written. This can be either a host
67987 	 * physical address (HPA) or a guest physical address (GPA) and must
67988 	 * point to a physically contiguous block of memory.
67989 	 */
67990 	uint64_t	resp_addr;
67991 	/* Enumeration values for enabling, disabling scheduler */
67992 	uint16_t	global_cfg;
67993 	/* This value will leave the global scheduler in its current state */
67994 	#define HWRM_DBG_USEQ_SCHED_CFG_INPUT_NO_CHANGE UINT32_C(0x0)
67995 	/*
67996 	 * This value disables the global scheduler. This mode must be used
67997 	 * when the RUN command is being used to run individual sequences.
67998 	 */
67999 	#define HWRM_DBG_USEQ_SCHED_CFG_INPUT_DISABLE   UINT32_C(0x1)
68000 	/*
68001 	 * This value enables the global scheduler. When enabled, USEQs will
68002 	 * be scheduled based on their polling intervals
68003 	 */
68004 	#define HWRM_DBG_USEQ_SCHED_CFG_INPUT_ENABLE    UINT32_C(0x2)
68005 	#define HWRM_DBG_USEQ_SCHED_CFG_INPUT_LAST \
68006 		HWRM_DBG_USEQ_SCHED_CFG_INPUT_ENABLE
68007 	/*
68008 	 * The given polling interval will be associated with this USID. A
68009 	 * value of -1 indicates that the USID is invalid. The invalid USID is
68010 	 * used when using this message only for global scheduler
68011 	 * configuration.
68012 	 */
68013 	uint16_t	usid;
68014 	/* This value represents microseconds between runs of the USEQ */
68015 	uint32_t	polling_interval;
68016 } __rte_packed_end;
68017 
68018 /* hwrm_dbg_useq_sched_cfg_output (size:256b/32B) */
68019 struct __rte_packed_begin hwrm_dbg_useq_sched_cfg_output {
68020 	/* The specific error status for the command. */
68021 	uint16_t	error_code;
68022 	/* The HWRM command request type. */
68023 	uint16_t	req_type;
68024 	/* The sequence ID from the original command. */
68025 	uint16_t	seq_id;
68026 	/* The length of the response data in number of bytes. */
68027 	uint16_t	resp_len;
68028 	/* Non-zero firmware timestamp */
68029 	uint32_t	nz_fw_timestamp;
68030 	/* The last selected USID */
68031 	uint16_t	last_usid;
68032 	/* The number of USEQs currently allocated */
68033 	uint16_t	num_useq_allocd;
68034 	/* Flags indicating current USEQ engine state */
68035 	uint32_t	useq_resp_flags;
68036 	/* When set, there is at least some data available to be delivered */
68037 	#define HWRM_DBG_USEQ_SCHED_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL \
68038 		UINT32_C(0x1)
68039 	/* When set, all internal buffers are full */
68040 	#define HWRM_DBG_USEQ_SCHED_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW \
68041 		UINT32_C(0x2)
68042 	#define HWRM_DBG_USEQ_SCHED_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST \
68043 		HWRM_DBG_USEQ_SCHED_CFG_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
68044 	/* Current count of the number of full buffers available for delivery */
68045 	uint8_t	full_cnt;
68046 	/* Reserved */
68047 	uint8_t	useq_resp_unused_0[3];
68048 	/* This field is reserved */
68049 	uint32_t	unused_0;
68050 	/*
68051 	 * This field is used in Output records to indicate that the output
68052 	 * is completely written to RAM. This field should be read as '1'
68053 	 * to indicate that the output has been completely written. When
68054 	 * writing a command completion or response to an internal processor,
68055 	 * the order of writes has to be such that this field is written last.
68056 	 */
68057 	uint32_t	valid;
68058 } __rte_packed_end;
68059 
68060 /*********************
68061  * hwrm_dbg_useq_run *
68062  *********************/
68063 
68064 
68065 /* hwrm_dbg_useq_run_input (size:320b/40B) */
68066 struct __rte_packed_begin hwrm_dbg_useq_run_input {
68067 	/* The HWRM command request type. */
68068 	uint16_t	req_type;
68069 	/*
68070 	 * The completion ring to send the completion event on. This should
68071 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68072 	 */
68073 	uint16_t	cmpl_ring;
68074 	/*
68075 	 * The sequence ID is used by the driver for tracking multiple
68076 	 * commands. This ID is treated as opaque data by the firmware and
68077 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68078 	 */
68079 	uint16_t	seq_id;
68080 	/*
68081 	 * The target ID of the command:
68082 	 * * 0x0-0xFFF8 - The function ID
68083 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68084 	 * * 0xFFFD - Reserved for user-space HWRM interface
68085 	 * * 0xFFFF - HWRM
68086 	 */
68087 	uint16_t	target_id;
68088 	/*
68089 	 * A physical address pointer pointing to a host buffer that the
68090 	 * command's response data will be written. This can be either a host
68091 	 * physical address (HPA) or a guest physical address (GPA) and must
68092 	 * point to a physically contiguous block of memory.
68093 	 */
68094 	uint64_t	resp_addr;
68095 	/* The USID to be run */
68096 	uint16_t	usid;
68097 	/* Type of run to execute for the given USID */
68098 	uint8_t	run_type;
68099 	/* This run type will execute the requested USEQ only a single time */
68100 	#define HWRM_DBG_USEQ_RUN_INPUT_RUN_TYPE_SINGLE   UINT32_C(0x0)
68101 	/*
68102 	 * This run type will execute the requested USEQ a number of times
68103 	 * given by run_cnt with a run interval given by the run_interval
68104 	 * parameter.
68105 	 */
68106 	#define HWRM_DBG_USEQ_RUN_INPUT_RUN_TYPE_CNT      UINT32_C(0x1)
68107 	/*
68108 	 * This run type will execute the requested USEQ as many times as it
68109 	 * needs to fill an entire buffer to return to the host. The runs
68110 	 * will occur with a run interval given by the run_interval
68111 	 * parameter.
68112 	 */
68113 	#define HWRM_DBG_USEQ_RUN_INPUT_RUN_TYPE_FILL_BUF UINT32_C(0x2)
68114 	#define HWRM_DBG_USEQ_RUN_INPUT_RUN_TYPE_LAST \
68115 		HWRM_DBG_USEQ_RUN_INPUT_RUN_TYPE_FILL_BUF
68116 	/*
68117 	 * If indicated by flags, this represents the number of times to run
68118 	 * the USEQ. Note that runs are stopped if the buffer fills prior
68119 	 * regardless of the number of runs. For example, if a run_cnt of 10 is
68120 	 * specified and 3 runs results in the buffer being full then only 3
68121 	 * runs are executed.
68122 	 */
68123 	uint8_t	run_cnt;
68124 	/*
68125 	 * This value represents microseconds between runs of the USEQ when
68126 	 * running multiple times as indicated by flags.
68127 	 */
68128 	uint32_t	run_interval;
68129 	/*
68130 	 * Address of the host buffer where collected USEQ output data will be
68131 	 * placed
68132 	 */
68133 	uint64_t	host_dest_addr;
68134 	/*
68135 	 * Size, in bytes, of the memory associated with host_dest_addr. It is
68136 	 * expected that this is >= 4096
68137 	 */
68138 	uint32_t	host_dest_len;
68139 	/* This field is reserved */
68140 	uint32_t	unused_0;
68141 } __rte_packed_end;
68142 
68143 /* hwrm_dbg_useq_run_output (size:256b/32B) */
68144 struct __rte_packed_begin hwrm_dbg_useq_run_output {
68145 	/* The specific error status for the command. */
68146 	uint16_t	error_code;
68147 	/* The HWRM command request type. */
68148 	uint16_t	req_type;
68149 	/* The sequence ID from the original command. */
68150 	uint16_t	seq_id;
68151 	/* The length of the response data in number of bytes. */
68152 	uint16_t	resp_len;
68153 	/* Non-zero firmware timestamp */
68154 	uint32_t	nz_fw_timestamp;
68155 	/* The last selected USID */
68156 	uint16_t	last_usid;
68157 	/* The number of USEQs currently allocated */
68158 	uint16_t	num_useq_allocd;
68159 	/* Flags indicating current USEQ engine state */
68160 	uint32_t	useq_resp_flags;
68161 	/* When set, there is at least some data available to be delivered */
68162 	#define HWRM_DBG_USEQ_RUN_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL \
68163 		UINT32_C(0x1)
68164 	/* When set, all internal buffers are full */
68165 	#define HWRM_DBG_USEQ_RUN_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW \
68166 		UINT32_C(0x2)
68167 	#define HWRM_DBG_USEQ_RUN_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST \
68168 		HWRM_DBG_USEQ_RUN_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
68169 	/* Current count of the number of full buffers available for delivery */
68170 	uint8_t	full_cnt;
68171 	/* Reserved */
68172 	uint8_t	useq_resp_unused_0[3];
68173 	/*
68174 	 * The length, in bytes, of the amount of data placed in the
68175 	 * corresponding host_dest_addr given in the input message. This will
68176 	 * always be a multiple of 4096
68177 	 */
68178 	uint32_t	host_dest_filled_len;
68179 	/*
68180 	 * This field is used in Output records to indicate that the output
68181 	 * is completely written to RAM. This field should be read as '1'
68182 	 * to indicate that the output has been completely written. When
68183 	 * writing a command completion or response to an internal processor,
68184 	 * the order of writes has to be such that this field is written last.
68185 	 */
68186 	uint32_t	valid;
68187 } __rte_packed_end;
68188 
68189 /******************************
68190  * hwrm_dbg_useq_delivery_req *
68191  ******************************/
68192 
68193 
68194 /* hwrm_dbg_useq_delivery_req_input (size:896b/112B) */
68195 struct __rte_packed_begin hwrm_dbg_useq_delivery_req_input {
68196 	/* The HWRM command request type. */
68197 	uint16_t	req_type;
68198 	/*
68199 	 * The completion ring to send the completion event on. This should
68200 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68201 	 */
68202 	uint16_t	cmpl_ring;
68203 	/*
68204 	 * The sequence ID is used by the driver for tracking multiple
68205 	 * commands. This ID is treated as opaque data by the firmware and
68206 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68207 	 */
68208 	uint16_t	seq_id;
68209 	/*
68210 	 * The target ID of the command:
68211 	 * * 0x0-0xFFF8 - The function ID
68212 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68213 	 * * 0xFFFD - Reserved for user-space HWRM interface
68214 	 * * 0xFFFF - HWRM
68215 	 */
68216 	uint16_t	target_id;
68217 	/*
68218 	 * A physical address pointer pointing to a host buffer that the
68219 	 * command's response data will be written. This can be either a host
68220 	 * physical address (HPA) or a guest physical address (GPA) and must
68221 	 * point to a physically contiguous block of memory.
68222 	 */
68223 	uint64_t	resp_addr;
68224 	/*
68225 	 * Eight destination addresses provide host memory space for FW to
68226 	 * deliver USEQ output details. A value of 0x0 for the address can be
68227 	 * used to inform FW that the buffer is not available.
68228 	 */
68229 	uint64_t	host_dest_addrs[8];
68230 	/*
68231 	 * The length, in bytes, of the corresponding host_dest_addrs array
68232 	 * entry. Each valid hist_dest_addrs entry must have a len of at least
68233 	 * 4096 bytes.
68234 	 */
68235 	uint32_t	host_dest_len[8];
68236 } __rte_packed_end;
68237 
68238 /* hwrm_dbg_useq_delivery_req_output (size:512b/64B) */
68239 struct __rte_packed_begin hwrm_dbg_useq_delivery_req_output {
68240 	/* The specific error status for the command. */
68241 	uint16_t	error_code;
68242 	/* The HWRM command request type. */
68243 	uint16_t	req_type;
68244 	/* The sequence ID from the original command. */
68245 	uint16_t	seq_id;
68246 	/* The length of the response data in number of bytes. */
68247 	uint16_t	resp_len;
68248 	/* Non-zero firmware timestamp */
68249 	uint32_t	nz_fw_timestamp;
68250 	/* The last selected USID */
68251 	uint16_t	last_usid;
68252 	/* The number of USEQs currently allocated */
68253 	uint16_t	num_useq_allocd;
68254 	/* Flags indicating current USEQ engine state */
68255 	uint32_t	useq_resp_flags;
68256 	/* When set, there is at least some data available to be delivered */
68257 	#define HWRM_DBG_USEQ_DELIVERY_REQ_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_AVAIL \
68258 		UINT32_C(0x1)
68259 	/* When set, all internal buffers are full */
68260 	#define HWRM_DBG_USEQ_DELIVERY_REQ_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW \
68261 		UINT32_C(0x2)
68262 	#define HWRM_DBG_USEQ_DELIVERY_REQ_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_LAST \
68263 		HWRM_DBG_USEQ_DELIVERY_REQ_OUTPUT_HWRM_DBG_USEQ_RESP_HDR_USEQ_RESP_FLAGS_OVERFLOW
68264 	/* Current count of the number of full buffers available for delivery */
68265 	uint8_t	full_cnt;
68266 	/* Reserved */
68267 	uint8_t	useq_resp_unused_0[3];
68268 	/*
68269 	 * The length, in bytes, of the amount of data placed in the
68270 	 * corresponding host_dest_addrs entry given in the input message. This
68271 	 * will always be a multiple of 4096.
68272 	 */
68273 	uint32_t	host_dest_filled_len[8];
68274 	/* This field is reserved */
68275 	uint32_t	unused_0;
68276 	/*
68277 	 * This field is used in Output records to indicate that the output
68278 	 * is completely written to RAM. This field should be read as '1'
68279 	 * to indicate that the output has been completely written. When
68280 	 * writing a command completion or response to an internal processor,
68281 	 * the order of writes has to be such that this field is written last.
68282 	 */
68283 	uint32_t	valid;
68284 } __rte_packed_end;
68285 
68286 /*****************************
68287  * hwrm_dbg_log_buffer_flush *
68288  *****************************/
68289 
68290 
68291 /* hwrm_dbg_log_buffer_flush_input (size:192b/24B) */
68292 struct __rte_packed_begin hwrm_dbg_log_buffer_flush_input {
68293 	/* The HWRM command request type. */
68294 	uint16_t	req_type;
68295 	/*
68296 	 * The completion ring to send the completion event on. This should
68297 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68298 	 */
68299 	uint16_t	cmpl_ring;
68300 	/*
68301 	 * The sequence ID is used by the driver for tracking multiple
68302 	 * commands. This ID is treated as opaque data by the firmware and
68303 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68304 	 */
68305 	uint16_t	seq_id;
68306 	/*
68307 	 * The target ID of the command:
68308 	 * * 0x0-0xFFF8 - The function ID
68309 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68310 	 * * 0xFFFD - Reserved for user-space HWRM interface
68311 	 * * 0xFFFF - HWRM
68312 	 */
68313 	uint16_t	target_id;
68314 	/*
68315 	 * A physical address pointer pointing to a host buffer that the
68316 	 * command's response data will be written. This can be either a host
68317 	 * physical address (HPA) or a guest physical address (GPA) and must
68318 	 * point to a physically contiguous block of memory.
68319 	 */
68320 	uint64_t	resp_addr;
68321 	/* Type of trace buffer to flush. */
68322 	uint16_t	type;
68323 	/* SRT trace. */
68324 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_SRT_TRACE \
68325 		UINT32_C(0x0)
68326 	/* SRT2 trace. */
68327 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_SRT2_TRACE \
68328 		UINT32_C(0x1)
68329 	/* CRT trace. */
68330 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_CRT_TRACE \
68331 		UINT32_C(0x2)
68332 	/* CRT2 trace. */
68333 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_CRT2_TRACE \
68334 		UINT32_C(0x3)
68335 	/* RIGP0 trace. */
68336 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_RIGP0_TRACE \
68337 		UINT32_C(0x4)
68338 	/* L2 HWRM trace. */
68339 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_L2_HWRM_TRACE \
68340 		UINT32_C(0x5)
68341 	/* RoCE HWRM trace. */
68342 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_ROCE_HWRM_TRACE \
68343 		UINT32_C(0x6)
68344 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_LAST \
68345 		HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_TYPE_ROCE_HWRM_TRACE
68346 	uint8_t	unused_1[2];
68347 	/* Control flags. */
68348 	uint32_t	flags;
68349 	/*
68350 	 * When set, it indicates that all buffers should be flushed.
68351 	 * The type will be ignored.
68352 	 */
68353 	#define HWRM_DBG_LOG_BUFFER_FLUSH_INPUT_FLAGS_FLUSH_ALL_BUFFERS \
68354 		UINT32_C(0x1)
68355 } __rte_packed_end;
68356 
68357 /* hwrm_dbg_log_buffer_flush_output (size:128b/16B) */
68358 struct __rte_packed_begin hwrm_dbg_log_buffer_flush_output {
68359 	/* The specific error status for the command. */
68360 	uint16_t	error_code;
68361 	/* The HWRM command request type. */
68362 	uint16_t	req_type;
68363 	/* The sequence ID from the original command. */
68364 	uint16_t	seq_id;
68365 	/* The length of the response data in number of bytes. */
68366 	uint16_t	resp_len;
68367 	/*
68368 	 * Specifies the current host buffer offset. Data up to this offset
68369 	 * has been populated by the firmware. For example, if the firmware
68370 	 * has DMA-ed 8192 bytes to the host buffer, then this field has a
68371 	 * value of 8192. This field rolls over to zero once the firmware
68372 	 * writes the last page of the host buffer
68373 	 */
68374 	uint32_t	current_buffer_offset;
68375 	uint8_t	unused_1[3];
68376 	/*
68377 	 * This field is used in Output records to indicate that the output
68378 	 * is completely written to RAM. This field should be read as '1'
68379 	 * to indicate that the output has been completely written. When
68380 	 * writing a command completion or response to an internal processor,
68381 	 * the order of writes has to be such that this field is written last.
68382 	 */
68383 	uint8_t	valid;
68384 } __rte_packed_end;
68385 
68386 /*****************
68387  * hwrm_fw_reset *
68388  ******************/
68389 
68390 
68391 /* hwrm_fw_reset_input (size:192b/24B) */
68392 struct __rte_packed_begin hwrm_fw_reset_input {
68393 	/* The HWRM command request type. */
68394 	uint16_t        req_type;
68395 	/*
68396 	 * The completion ring to send the completion event on. This should
68397 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68398 	 */
68399 	uint16_t        cmpl_ring;
68400 	/*
68401 	 * The sequence ID is used by the driver for tracking multiple
68402 	 * commands. This ID is treated as opaque data by the firmware and
68403 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68404 	 */
68405 	uint16_t        seq_id;
68406 	/*
68407 	 * The target ID of the command:
68408 	 * * 0x0-0xFFF8 - The function ID
68409 	 * * 0xFFF8-0xFFFE - Reserved for internal processors
68410 	 * * 0xFFFF - HWRM
68411 	 */
68412 	uint16_t        target_id;
68413 	/*
68414 	 * A physical address pointer pointing to a host buffer that the
68415 	 * command's response data will be written. This can be either a host
68416 	 * physical address (HPA) or a guest physical address (GPA) and must
68417 	 * point to a physically contiguous block of memory.
68418 	 */
68419 	uint64_t        resp_addr;
68420 	/* Type of embedded processor. */
68421 	uint8_t embedded_proc_type;
68422 	/* Boot Processor */
68423 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_BOOT \
68424 		UINT32_C(0x0)
68425 	/* Management Processor */
68426 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_MGMT \
68427 		UINT32_C(0x1)
68428 	/* Network control processor */
68429 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_NETCTRL \
68430 		UINT32_C(0x2)
68431 	/* RoCE control processor */
68432 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_ROCE \
68433 		UINT32_C(0x3)
68434 	/*
68435 	 * Host (in multi-host environment): This is only valid if requester is IPC.
68436 	 * Reinit host hardware resources and PCIe.
68437 	 */
68438 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_HOST \
68439 		UINT32_C(0x4)
68440 	/*
68441 	 * AP processor complex (in multi-host environment).
68442 	 * Use host_idx to control which core is reset
68443 	 */
68444 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_AP \
68445 		UINT32_C(0x5)
68446 	/* Reset all blocks of the chip (including all processors) */
68447 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_CHIP \
68448 		UINT32_C(0x6)
68449 	/*
68450 	 * Host (in multi-host environment): This is only valid if requester is IPC.
68451 	 * Reinit host hardware resources.
68452 	 */
68453 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_HOST_RESOURCE_REINIT \
68454 		UINT32_C(0x7)
68455 	#define HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_LAST \
68456 		HWRM_FW_RESET_INPUT_EMBEDDED_PROC_TYPE_HOST_RESOURCE_REINIT
68457 	/* Type of self reset. */
68458 	uint8_t selfrst_status;
68459 	/* No Self Reset */
68460 	#define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTNONE \
68461 		UINT32_C(0x0)
68462 	/* Self Reset as soon as possible to do so safely */
68463 	#define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTASAP \
68464 		UINT32_C(0x1)
68465 	/* Self Reset on PCIe Reset */
68466 	#define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTPCIERST \
68467 		UINT32_C(0x2)
68468 	/* Self Reset immediately after notification to all clients. */
68469 	#define HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTIMMEDIATE \
68470 		UINT32_C(0x3)
68471 	#define HWRM_FW_RESET_INPUT_SELFRST_STATUS_LAST \
68472 		HWRM_FW_RESET_INPUT_SELFRST_STATUS_SELFRSTIMMEDIATE
68473 	/*
68474 	 * Indicate which host is being reset. 0 means first host.
68475 	 * Only valid when embedded_proc_type is host in multihost
68476 	 * environment
68477 	 */
68478 	uint8_t host_idx;
68479 	uint8_t flags;
68480 	/*
68481 	 * When this bit is '1', then the core firmware initiates
68482 	 * the reset only after graceful shut down of all registered instances.
68483 	 * If not, the device will continue with the existing firmware.
68484 	 */
68485 	#define HWRM_FW_RESET_INPUT_FLAGS_RESET_GRACEFUL     UINT32_C(0x1)
68486 	uint8_t unused_0[4];
68487 } __rte_packed_end;
68488 
68489 /* hwrm_fw_reset_output (size:128b/16B) */
68490 struct __rte_packed_begin hwrm_fw_reset_output {
68491 	/* The specific error status for the command. */
68492 	uint16_t        error_code;
68493 	/* The HWRM command request type. */
68494 	uint16_t        req_type;
68495 	/* The sequence ID from the original command. */
68496 	uint16_t        seq_id;
68497 	/* The length of the response data in number of bytes. */
68498 	uint16_t        resp_len;
68499 	/* Type of self reset. */
68500 	uint8_t selfrst_status;
68501 	/* No Self Reset */
68502 	#define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTNONE \
68503 		UINT32_C(0x0)
68504 	/* Self Reset as soon as possible to do so safely */
68505 	#define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTASAP \
68506 		UINT32_C(0x1)
68507 	/* Self Reset on PCIe Reset */
68508 	#define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTPCIERST \
68509 		UINT32_C(0x2)
68510 	/* Self Reset immediately after notification to all clients. */
68511 	#define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTIMMEDIATE \
68512 		UINT32_C(0x3)
68513 	#define HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_LAST \
68514 		HWRM_FW_RESET_OUTPUT_SELFRST_STATUS_SELFRSTIMMEDIATE
68515 	uint8_t unused_0[6];
68516 	/*
68517 	 * This field is used in Output records to indicate that the output
68518 	 * is completely written to RAM.  This field should be read as '1'
68519 	 * to indicate that the output has been completely written.
68520 	 * When writing a command completion or response to an internal processor,
68521 	 * the order of writes has to be such that this field is written last.
68522 	 */
68523 	uint8_t valid;
68524 } __rte_packed_end;
68525 
68526 /**********************
68527  * hwrm_port_ts_query *
68528  ***********************/
68529 
68530 
68531 /* hwrm_port_ts_query_input (size:192b/24B) */
68532 struct __rte_packed_begin hwrm_port_ts_query_input {
68533 	/* The HWRM command request type. */
68534 	uint16_t	req_type;
68535 	/*
68536 	 * The completion ring to send the completion event on. This should
68537 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68538 	 */
68539 	uint16_t	cmpl_ring;
68540 	/*
68541 	 * The sequence ID is used by the driver for tracking multiple
68542 	 * commands. This ID is treated as opaque data by the firmware and
68543 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68544 	 */
68545 	uint16_t	seq_id;
68546 	/*
68547 	 * The target ID of the command:
68548 	 * * 0x0-0xFFF8 - The function ID
68549 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68550 	 * * 0xFFFD - Reserved for user-space HWRM interface
68551 	 * * 0xFFFF - HWRM
68552 	 */
68553 	uint16_t	target_id;
68554 	/*
68555 	 * A physical address pointer pointing to a host buffer that the
68556 	 * command's response data will be written. This can be either a host
68557 	 * physical address (HPA) or a guest physical address (GPA) and must
68558 	 * point to a physically contiguous block of memory.
68559 	 */
68560 	uint64_t	resp_addr;
68561 	uint32_t	flags;
68562 	/*
68563 	 * Enumeration denoting the RX, TX type of the resource.
68564 	 * This enumeration is used for resources that are similar for both
68565 	 * TX and RX paths of the chip.
68566 	 */
68567 	#define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH		0x1UL
68568 	/* tx path */
68569 	#define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_TX		0x0UL
68570 	/* rx path */
68571 	#define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_RX		0x1UL
68572 	#define HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_LAST	\
68573 		HWRM_PORT_TS_QUERY_INPUT_FLAGS_PATH_RX
68574 	/*
68575 	 * If set, the response includes the current value of the free
68576 	 * running timer.
68577 	 */
68578 	#define HWRM_PORT_TS_QUERY_INPUT_FLAGS_CURRENT_TIME	0x2UL
68579 	/* Port ID of port that is being queried. */
68580 	uint16_t	port_id;
68581 	uint8_t		unused_0[2];
68582 } __rte_packed_end;
68583 
68584 /* hwrm_port_ts_query_output (size:192b/24B) */
68585 struct __rte_packed_begin hwrm_port_ts_query_output {
68586 	/* The specific error status for the command. */
68587 	uint16_t	error_code;
68588 	/* The HWRM command request type. */
68589 	uint16_t	req_type;
68590 	/* The sequence ID from the original command. */
68591 	uint16_t	seq_id;
68592 	/* The length of the response data in number of bytes. */
68593 	uint16_t	resp_len;
68594 	/*
68595 	 * Timestamp value of PTP message captured, or current value of
68596 	 * free running timer.
68597 	 */
68598 	uint32_t	ptp_msg_ts[2];
68599 	/* Sequence ID of the PTP message captured. */
68600 	uint16_t	ptp_msg_seqid;
68601 	uint8_t		unused_0[5];
68602 	/*
68603 	 * This field is used in Output records to indicate that the output
68604 	 * is completely written to RAM.  This field should be read as '1'
68605 	 * to indicate that the output has been completely written.
68606 	 * When writing a command completion or response to an internal processor,
68607 	 * the order of writes has to be such that this field is written last.
68608 	 */
68609 	uint8_t		valid;
68610 } __rte_packed_end;
68611 
68612 /*
68613  * This structure is fixed at the beginning of the ChiMP SRAM (GRC
68614  * offset: 0x31001F0). Host software is expected to read from this
68615  * location for a defined signature. If it exists, the software can
68616  * assume the presence of this structure and the validity of the
68617  * FW_STATUS location in the next field.
68618  */
68619 /* hcomm_status (size:64b/8B) */
68620 struct __rte_packed_begin hcomm_status {
68621 	uint32_t	sig_ver;
68622 	/*
68623 	 * This field defines the version of the structure. The latest
68624 	 * version value is 1.
68625 	 */
68626 	#define HCOMM_STATUS_VER_MASK		UINT32_C(0xff)
68627 	#define HCOMM_STATUS_VER_SFT		0
68628 	#define HCOMM_STATUS_VER_LATEST		UINT32_C(0x1)
68629 	#define HCOMM_STATUS_VER_LAST		HCOMM_STATUS_VER_LATEST
68630 	/*
68631 	 * This field is to store the signature value to indicate the
68632 	 * presence of the structure.
68633 	 */
68634 	#define HCOMM_STATUS_SIGNATURE_MASK	UINT32_C(0xffffff00)
68635 	#define HCOMM_STATUS_SIGNATURE_SFT	8
68636 	#define HCOMM_STATUS_SIGNATURE_VAL	(UINT32_C(0x484353) << 8)
68637 	#define HCOMM_STATUS_SIGNATURE_LAST	HCOMM_STATUS_SIGNATURE_VAL
68638 	uint32_t	fw_status_loc;
68639 	#define HCOMM_STATUS_TRUE_ADDR_SPACE_MASK	UINT32_C(0x3)
68640 	#define HCOMM_STATUS_TRUE_ADDR_SPACE_SFT	0
68641 	/* PCIE configuration space */
68642 	#define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_PCIE_CFG	UINT32_C(0x0)
68643 	/* GRC space */
68644 	#define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_GRC	UINT32_C(0x1)
68645 	/* BAR0 space */
68646 	#define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_BAR0	UINT32_C(0x2)
68647 	/* BAR1 space */
68648 	#define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_BAR1	UINT32_C(0x3)
68649 	#define HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_LAST	\
68650 		HCOMM_STATUS_FW_STATUS_LOC_ADDR_SPACE_BAR1
68651 	/*
68652 	 * This offset where the fw_status register is located. The value
68653 	 * is generally 4-byte aligned.
68654 	 */
68655 	#define HCOMM_STATUS_TRUE_OFFSET_MASK		UINT32_C(0xfffffffc)
68656 	#define HCOMM_STATUS_TRUE_OFFSET_SFT		2
68657 } __rte_packed_end;
68658 /* This is the GRC offset where the hcomm_status struct resides. */
68659 #define HCOMM_STATUS_STRUCT_LOC		0x31001F0UL
68660 
68661 /**************************
68662  * hwrm_port_phy_i2c_read *
68663  **************************/
68664 
68665 
68666 /* hwrm_port_phy_i2c_read_input (size:320b/40B) */
68667 struct __rte_packed_begin hwrm_port_phy_i2c_read_input {
68668 	/* The HWRM command request type. */
68669 	uint16_t	req_type;
68670 	/*
68671 	 * The completion ring to send the completion event on. This should
68672 	 * be the NQ ID returned from the `nq_alloc` HWRM command.
68673 	 */
68674 	uint16_t	cmpl_ring;
68675 	/*
68676 	 * The sequence ID is used by the driver for tracking multiple
68677 	 * commands. This ID is treated as opaque data by the firmware and
68678 	 * the value is returned in the `hwrm_resp_hdr` upon completion.
68679 	 */
68680 	uint16_t	seq_id;
68681 	/*
68682 	 * The target ID of the command:
68683 	 * * 0x0-0xFFF8 - The function ID
68684 	 * * 0xFFF8-0xFFFC, 0xFFFE - Reserved for internal processors
68685 	 * * 0xFFFD - Reserved for user-space HWRM interface
68686 	 * * 0xFFFF - HWRM
68687 	 */
68688 	uint16_t	target_id;
68689 	/*
68690 	 * A physical address pointer pointing to a host buffer that the
68691 	 * command's response data will be written. This can be either a host
68692 	 * physical address (HPA) or a guest physical address (GPA) and must
68693 	 * point to a physically contiguous block of memory.
68694 	 */
68695 	uint64_t	resp_addr;
68696 	uint32_t	flags;
68697 	uint32_t	enables;
68698 	/*
68699 	 * This bit must be '1' for the page_offset field to be
68700 	 * configured.
68701 	 */
68702 	#define HWRM_PORT_PHY_I2C_READ_INPUT_ENABLES_PAGE_OFFSET     0x1UL
68703 	/* Port ID of port. */
68704 	uint16_t	port_id;
68705 	/* 8-bit I2C slave address. */
68706 	uint8_t	i2c_slave_addr;
68707 	uint8_t	unused_0;
68708 	/* The page number that is being accessed over I2C. */
68709 	uint16_t	page_number;
68710 	/* Offset within the page that is being accessed over I2C. */
68711 	uint16_t	page_offset;
68712 	/*
68713 	 * Length of data to read, in bytes starting at the offset
68714 	 * specified above. If the offset is not specified, then
68715 	 * the data shall be read from the beginning of the page.
68716 	 */
68717 	uint8_t	data_length;
68718 	uint8_t	unused_1[7];
68719 } __rte_packed_end;
68720 
68721 /* hwrm_port_phy_i2c_read_output (size:640b/80B) */
68722 struct __rte_packed_begin hwrm_port_phy_i2c_read_output {
68723 	/* The specific error status for the command. */
68724 	uint16_t	error_code;
68725 	/* The HWRM command request type. */
68726 	uint16_t	req_type;
68727 	/* The sequence ID from the original command. */
68728 	uint16_t	seq_id;
68729 	/* The length of the response data in number of bytes. */
68730 	uint16_t	resp_len;
68731 	/* Up to 64B of data. */
68732 	uint32_t	data[16];
68733 	uint8_t	unused_0[7];
68734 	/*
68735 	 * This field is used in Output records to indicate that the output
68736 	 * is completely written to RAM.  This field should be read as '1'
68737 	 * to indicate that the output has been completely written.
68738 	 * When writing a command completion or response to an internal processor,
68739 	 * the order of writes has to be such that this field is written last.
68740 	 */
68741 	uint8_t	valid;
68742 } __rte_packed_end;
68743 #endif /* _HSI_STRUCT_DEF_DPDK_H_ */
68744