162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * Broadcom NetXtreme-E RoCE driver.
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * Copyright (c) 2016 - 2017, Broadcom. All rights reserved.  The term
562306a36Sopenharmony_ci * Broadcom refers to Broadcom Limited and/or its subsidiaries.
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * This software is available to you under a choice of one of two
862306a36Sopenharmony_ci * licenses.  You may choose to be licensed under the terms of the GNU
962306a36Sopenharmony_ci * General Public License (GPL) Version 2, available from the file
1062306a36Sopenharmony_ci * COPYING in the main directory of this source tree, or the
1162306a36Sopenharmony_ci * BSD license below:
1262306a36Sopenharmony_ci *
1362306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or without
1462306a36Sopenharmony_ci * modification, are permitted provided that the following conditions
1562306a36Sopenharmony_ci * are met:
1662306a36Sopenharmony_ci *
1762306a36Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright
1862306a36Sopenharmony_ci *    notice, this list of conditions and the following disclaimer.
1962306a36Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright
2062306a36Sopenharmony_ci *    notice, this list of conditions and the following disclaimer in
2162306a36Sopenharmony_ci *    the documentation and/or other materials provided with the
2262306a36Sopenharmony_ci *    distribution.
2362306a36Sopenharmony_ci *
2462306a36Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
2562306a36Sopenharmony_ci * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
2662306a36Sopenharmony_ci * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2762306a36Sopenharmony_ci * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
2862306a36Sopenharmony_ci * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2962306a36Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
3062306a36Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
3162306a36Sopenharmony_ci * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
3262306a36Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
3362306a36Sopenharmony_ci * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
3462306a36Sopenharmony_ci * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3562306a36Sopenharmony_ci *
3662306a36Sopenharmony_ci * Description: RoCE HSI File - Autogenerated
3762306a36Sopenharmony_ci */
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci#ifndef __BNXT_RE_HSI_H__
4062306a36Sopenharmony_ci#define __BNXT_RE_HSI_H__
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci/* include bnxt_hsi.h from bnxt_en driver */
4362306a36Sopenharmony_ci#include "bnxt_hsi.h"
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci/* tx_doorbell (size:32b/4B) */
4662306a36Sopenharmony_cistruct tx_doorbell {
4762306a36Sopenharmony_ci	__le32	key_idx;
4862306a36Sopenharmony_ci	#define TX_DOORBELL_IDX_MASK 0xffffffUL
4962306a36Sopenharmony_ci	#define TX_DOORBELL_IDX_SFT 0
5062306a36Sopenharmony_ci	#define TX_DOORBELL_KEY_MASK 0xf0000000UL
5162306a36Sopenharmony_ci	#define TX_DOORBELL_KEY_SFT 28
5262306a36Sopenharmony_ci	#define TX_DOORBELL_KEY_TX    (0x0UL << 28)
5362306a36Sopenharmony_ci	#define TX_DOORBELL_KEY_LAST TX_DOORBELL_KEY_TX
5462306a36Sopenharmony_ci};
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci/* rx_doorbell (size:32b/4B) */
5762306a36Sopenharmony_cistruct rx_doorbell {
5862306a36Sopenharmony_ci	__le32	key_idx;
5962306a36Sopenharmony_ci	#define RX_DOORBELL_IDX_MASK 0xffffffUL
6062306a36Sopenharmony_ci	#define RX_DOORBELL_IDX_SFT 0
6162306a36Sopenharmony_ci	#define RX_DOORBELL_KEY_MASK 0xf0000000UL
6262306a36Sopenharmony_ci	#define RX_DOORBELL_KEY_SFT 28
6362306a36Sopenharmony_ci	#define RX_DOORBELL_KEY_RX    (0x1UL << 28)
6462306a36Sopenharmony_ci	#define RX_DOORBELL_KEY_LAST RX_DOORBELL_KEY_RX
6562306a36Sopenharmony_ci};
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci/* cmpl_doorbell (size:32b/4B) */
6862306a36Sopenharmony_cistruct cmpl_doorbell {
6962306a36Sopenharmony_ci	__le32	key_mask_valid_idx;
7062306a36Sopenharmony_ci	#define CMPL_DOORBELL_IDX_MASK      0xffffffUL
7162306a36Sopenharmony_ci	#define CMPL_DOORBELL_IDX_SFT       0
7262306a36Sopenharmony_ci	#define CMPL_DOORBELL_IDX_VALID     0x4000000UL
7362306a36Sopenharmony_ci	#define CMPL_DOORBELL_MASK          0x8000000UL
7462306a36Sopenharmony_ci	#define CMPL_DOORBELL_KEY_MASK      0xf0000000UL
7562306a36Sopenharmony_ci	#define CMPL_DOORBELL_KEY_SFT       28
7662306a36Sopenharmony_ci	#define CMPL_DOORBELL_KEY_CMPL        (0x2UL << 28)
7762306a36Sopenharmony_ci	#define CMPL_DOORBELL_KEY_LAST       CMPL_DOORBELL_KEY_CMPL
7862306a36Sopenharmony_ci};
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ci/* status_doorbell (size:32b/4B) */
8162306a36Sopenharmony_cistruct status_doorbell {
8262306a36Sopenharmony_ci	__le32	key_idx;
8362306a36Sopenharmony_ci	#define STATUS_DOORBELL_IDX_MASK 0xffffffUL
8462306a36Sopenharmony_ci	#define STATUS_DOORBELL_IDX_SFT 0
8562306a36Sopenharmony_ci	#define STATUS_DOORBELL_KEY_MASK 0xf0000000UL
8662306a36Sopenharmony_ci	#define STATUS_DOORBELL_KEY_SFT 28
8762306a36Sopenharmony_ci	#define STATUS_DOORBELL_KEY_STAT  (0x3UL << 28)
8862306a36Sopenharmony_ci	#define STATUS_DOORBELL_KEY_LAST STATUS_DOORBELL_KEY_STAT
8962306a36Sopenharmony_ci};
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci/* cmdq_init (size:128b/16B) */
9262306a36Sopenharmony_cistruct cmdq_init {
9362306a36Sopenharmony_ci	__le64	cmdq_pbl;
9462306a36Sopenharmony_ci	__le16	cmdq_size_cmdq_lvl;
9562306a36Sopenharmony_ci	#define CMDQ_INIT_CMDQ_LVL_MASK 0x3UL
9662306a36Sopenharmony_ci	#define CMDQ_INIT_CMDQ_LVL_SFT  0
9762306a36Sopenharmony_ci	#define CMDQ_INIT_CMDQ_SIZE_MASK 0xfffcUL
9862306a36Sopenharmony_ci	#define CMDQ_INIT_CMDQ_SIZE_SFT 2
9962306a36Sopenharmony_ci	__le16	creq_ring_id;
10062306a36Sopenharmony_ci	__le32	prod_idx;
10162306a36Sopenharmony_ci};
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci/* cmdq_base (size:128b/16B) */
10462306a36Sopenharmony_cistruct cmdq_base {
10562306a36Sopenharmony_ci	u8	opcode;
10662306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_CREATE_QP              0x1UL
10762306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_DESTROY_QP             0x2UL
10862306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_MODIFY_QP              0x3UL
10962306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_QUERY_QP               0x4UL
11062306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_CREATE_SRQ             0x5UL
11162306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_DESTROY_SRQ            0x6UL
11262306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_QUERY_SRQ              0x8UL
11362306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_CREATE_CQ              0x9UL
11462306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_DESTROY_CQ             0xaUL
11562306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_RESIZE_CQ              0xcUL
11662306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_ALLOCATE_MRW           0xdUL
11762306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_DEALLOCATE_KEY         0xeUL
11862306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_REGISTER_MR            0xfUL
11962306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_DEREGISTER_MR          0x10UL
12062306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_ADD_GID                0x11UL
12162306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_DELETE_GID             0x12UL
12262306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_MODIFY_GID             0x17UL
12362306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_QUERY_GID              0x18UL
12462306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_CREATE_QP1             0x13UL
12562306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_DESTROY_QP1            0x14UL
12662306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_CREATE_AH              0x15UL
12762306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_DESTROY_AH             0x16UL
12862306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_INITIALIZE_FW          0x80UL
12962306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_DEINITIALIZE_FW        0x81UL
13062306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_STOP_FUNC              0x82UL
13162306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_QUERY_FUNC             0x83UL
13262306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_SET_FUNC_RESOURCES     0x84UL
13362306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_READ_CONTEXT           0x85UL
13462306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_VF_BACKCHANNEL_REQUEST 0x86UL
13562306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_READ_VF_MEMORY         0x87UL
13662306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_COMPLETE_VF_REQUEST    0x88UL
13762306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_EXTEND_CONTEXT_ARRRAY  0x89UL
13862306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_MAP_TC_TO_COS          0x8aUL
13962306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_QUERY_VERSION          0x8bUL
14062306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_MODIFY_ROCE_CC         0x8cUL
14162306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_QUERY_ROCE_CC          0x8dUL
14262306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_QUERY_ROCE_STATS       0x8eUL
14362306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_SET_LINK_AGGR_MODE     0x8fUL
14462306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_MODIFY_CQ              0x90UL
14562306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_QUERY_QP_EXTEND        0x91UL
14662306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_QUERY_ROCE_STATS_EXT   0x92UL
14762306a36Sopenharmony_ci	#define CMDQ_BASE_OPCODE_LAST                  CMDQ_BASE_OPCODE_QUERY_ROCE_STATS_EXT
14862306a36Sopenharmony_ci	u8	cmd_size;
14962306a36Sopenharmony_ci	__le16	flags;
15062306a36Sopenharmony_ci	__le16	cookie;
15162306a36Sopenharmony_ci	u8	resp_size;
15262306a36Sopenharmony_ci	u8	reserved8;
15362306a36Sopenharmony_ci	__le64	resp_addr;
15462306a36Sopenharmony_ci};
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ci/* creq_base (size:128b/16B) */
15762306a36Sopenharmony_cistruct creq_base {
15862306a36Sopenharmony_ci	u8	type;
15962306a36Sopenharmony_ci	#define CREQ_BASE_TYPE_MASK      0x3fUL
16062306a36Sopenharmony_ci	#define CREQ_BASE_TYPE_SFT       0
16162306a36Sopenharmony_ci	#define CREQ_BASE_TYPE_QP_EVENT    0x38UL
16262306a36Sopenharmony_ci	#define CREQ_BASE_TYPE_FUNC_EVENT  0x3aUL
16362306a36Sopenharmony_ci	#define CREQ_BASE_TYPE_LAST       CREQ_BASE_TYPE_FUNC_EVENT
16462306a36Sopenharmony_ci	u8	reserved56[7];
16562306a36Sopenharmony_ci	u8	v;
16662306a36Sopenharmony_ci	#define CREQ_BASE_V     0x1UL
16762306a36Sopenharmony_ci	u8	event;
16862306a36Sopenharmony_ci	u8	reserved48[6];
16962306a36Sopenharmony_ci};
17062306a36Sopenharmony_ci
17162306a36Sopenharmony_ci/* cmdq_query_version (size:128b/16B) */
17262306a36Sopenharmony_cistruct cmdq_query_version {
17362306a36Sopenharmony_ci	u8	opcode;
17462306a36Sopenharmony_ci	#define CMDQ_QUERY_VERSION_OPCODE_QUERY_VERSION 0x8bUL
17562306a36Sopenharmony_ci	#define CMDQ_QUERY_VERSION_OPCODE_LAST         CMDQ_QUERY_VERSION_OPCODE_QUERY_VERSION
17662306a36Sopenharmony_ci	u8	cmd_size;
17762306a36Sopenharmony_ci	__le16	flags;
17862306a36Sopenharmony_ci	__le16	cookie;
17962306a36Sopenharmony_ci	u8	resp_size;
18062306a36Sopenharmony_ci	u8	reserved8;
18162306a36Sopenharmony_ci	__le64	resp_addr;
18262306a36Sopenharmony_ci};
18362306a36Sopenharmony_ci
18462306a36Sopenharmony_ci/* creq_query_version_resp (size:128b/16B) */
18562306a36Sopenharmony_cistruct creq_query_version_resp {
18662306a36Sopenharmony_ci	u8	type;
18762306a36Sopenharmony_ci	#define CREQ_QUERY_VERSION_RESP_TYPE_MASK    0x3fUL
18862306a36Sopenharmony_ci	#define CREQ_QUERY_VERSION_RESP_TYPE_SFT     0
18962306a36Sopenharmony_ci	#define CREQ_QUERY_VERSION_RESP_TYPE_QP_EVENT  0x38UL
19062306a36Sopenharmony_ci	#define CREQ_QUERY_VERSION_RESP_TYPE_LAST     CREQ_QUERY_VERSION_RESP_TYPE_QP_EVENT
19162306a36Sopenharmony_ci	u8	status;
19262306a36Sopenharmony_ci	__le16	cookie;
19362306a36Sopenharmony_ci	u8	fw_maj;
19462306a36Sopenharmony_ci	u8	fw_minor;
19562306a36Sopenharmony_ci	u8	fw_bld;
19662306a36Sopenharmony_ci	u8	fw_rsvd;
19762306a36Sopenharmony_ci	u8	v;
19862306a36Sopenharmony_ci	#define CREQ_QUERY_VERSION_RESP_V     0x1UL
19962306a36Sopenharmony_ci	u8	event;
20062306a36Sopenharmony_ci	#define CREQ_QUERY_VERSION_RESP_EVENT_QUERY_VERSION 0x8bUL
20162306a36Sopenharmony_ci	#define CREQ_QUERY_VERSION_RESP_EVENT_LAST         \
20262306a36Sopenharmony_ci		CREQ_QUERY_VERSION_RESP_EVENT_QUERY_VERSION
20362306a36Sopenharmony_ci	__le16	reserved16;
20462306a36Sopenharmony_ci	u8	intf_maj;
20562306a36Sopenharmony_ci	u8	intf_minor;
20662306a36Sopenharmony_ci	u8	intf_bld;
20762306a36Sopenharmony_ci	u8	intf_rsvd;
20862306a36Sopenharmony_ci};
20962306a36Sopenharmony_ci
21062306a36Sopenharmony_ci/* cmdq_initialize_fw (size:896b/112B) */
21162306a36Sopenharmony_cistruct cmdq_initialize_fw {
21262306a36Sopenharmony_ci	u8	opcode;
21362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_OPCODE_INITIALIZE_FW 0x80UL
21462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_OPCODE_LAST         CMDQ_INITIALIZE_FW_OPCODE_INITIALIZE_FW
21562306a36Sopenharmony_ci	u8	cmd_size;
21662306a36Sopenharmony_ci	__le16	flags;
21762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_FLAGS_MRAV_RESERVATION_SPLIT          0x1UL
21862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_FLAGS_HW_REQUESTER_RETX_SUPPORTED     0x2UL
21962306a36Sopenharmony_ci	__le16	cookie;
22062306a36Sopenharmony_ci	u8	resp_size;
22162306a36Sopenharmony_ci	u8	reserved8;
22262306a36Sopenharmony_ci	__le64	resp_addr;
22362306a36Sopenharmony_ci	u8	qpc_pg_size_qpc_lvl;
22462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_LVL_MASK      0xfUL
22562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_LVL_SFT       0
22662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_LVL_LVL_0       0x0UL
22762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_LVL_LVL_1       0x1UL
22862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_LVL_LVL_2       0x2UL
22962306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_LVL_LAST       CMDQ_INITIALIZE_FW_QPC_LVL_LVL_2
23062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_MASK  0xf0UL
23162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_SFT   4
23262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_4K   (0x0UL << 4)
23362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_8K   (0x1UL << 4)
23462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_64K  (0x2UL << 4)
23562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_2M   (0x3UL << 4)
23662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_8M   (0x4UL << 4)
23762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_1G   (0x5UL << 4)
23862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_1G
23962306a36Sopenharmony_ci	u8	mrw_pg_size_mrw_lvl;
24062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_LVL_MASK      0xfUL
24162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_LVL_SFT       0
24262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_LVL_LVL_0       0x0UL
24362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_LVL_LVL_1       0x1UL
24462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_LVL_LVL_2       0x2UL
24562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_LVL_LAST       CMDQ_INITIALIZE_FW_MRW_LVL_LVL_2
24662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_MASK  0xf0UL
24762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_SFT   4
24862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_4K   (0x0UL << 4)
24962306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_8K   (0x1UL << 4)
25062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_64K  (0x2UL << 4)
25162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_2M   (0x3UL << 4)
25262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_8M   (0x4UL << 4)
25362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_1G   (0x5UL << 4)
25462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_1G
25562306a36Sopenharmony_ci	u8	srq_pg_size_srq_lvl;
25662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_LVL_MASK      0xfUL
25762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_LVL_SFT       0
25862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_0       0x0UL
25962306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_1       0x1UL
26062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_2       0x2UL
26162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_LVL_LAST       CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_2
26262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_MASK  0xf0UL
26362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_SFT   4
26462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_4K   (0x0UL << 4)
26562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_8K   (0x1UL << 4)
26662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_64K  (0x2UL << 4)
26762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_2M   (0x3UL << 4)
26862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_8M   (0x4UL << 4)
26962306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_1G   (0x5UL << 4)
27062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_1G
27162306a36Sopenharmony_ci	u8	cq_pg_size_cq_lvl;
27262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_LVL_MASK      0xfUL
27362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_LVL_SFT       0
27462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_LVL_LVL_0       0x0UL
27562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_LVL_LVL_1       0x1UL
27662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_LVL_LVL_2       0x2UL
27762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_LVL_LAST       CMDQ_INITIALIZE_FW_CQ_LVL_LVL_2
27862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_MASK  0xf0UL
27962306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_SFT   4
28062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_4K   (0x0UL << 4)
28162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_8K   (0x1UL << 4)
28262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_64K  (0x2UL << 4)
28362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_2M   (0x3UL << 4)
28462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_8M   (0x4UL << 4)
28562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_1G   (0x5UL << 4)
28662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_1G
28762306a36Sopenharmony_ci	u8	tqm_pg_size_tqm_lvl;
28862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_LVL_MASK      0xfUL
28962306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_LVL_SFT       0
29062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_LVL_LVL_0       0x0UL
29162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_LVL_LVL_1       0x1UL
29262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_LVL_LVL_2       0x2UL
29362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_LVL_LAST       CMDQ_INITIALIZE_FW_TQM_LVL_LVL_2
29462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_MASK  0xf0UL
29562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_SFT   4
29662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_4K   (0x0UL << 4)
29762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_8K   (0x1UL << 4)
29862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_64K  (0x2UL << 4)
29962306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_2M   (0x3UL << 4)
30062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_8M   (0x4UL << 4)
30162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_1G   (0x5UL << 4)
30262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_1G
30362306a36Sopenharmony_ci	u8	tim_pg_size_tim_lvl;
30462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_LVL_MASK      0xfUL
30562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_LVL_SFT       0
30662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_LVL_LVL_0       0x0UL
30762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_LVL_LVL_1       0x1UL
30862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_LVL_LVL_2       0x2UL
30962306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_LVL_LAST       CMDQ_INITIALIZE_FW_TIM_LVL_LVL_2
31062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_MASK  0xf0UL
31162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_SFT   4
31262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_4K   (0x0UL << 4)
31362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_8K   (0x1UL << 4)
31462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_64K  (0x2UL << 4)
31562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_2M   (0x3UL << 4)
31662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_8M   (0x4UL << 4)
31762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_1G   (0x5UL << 4)
31862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_LAST   CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_1G
31962306a36Sopenharmony_ci	__le16	log2_dbr_pg_size;
32062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_MASK   0xfUL
32162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_SFT    0
32262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_4K    0x0UL
32362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_8K    0x1UL
32462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_16K   0x2UL
32562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_32K   0x3UL
32662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_64K   0x4UL
32762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_128K  0x5UL
32862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_256K  0x6UL
32962306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_512K  0x7UL
33062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_1M    0x8UL
33162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_2M    0x9UL
33262306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_4M    0xaUL
33362306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_8M    0xbUL
33462306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_16M   0xcUL
33562306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_32M   0xdUL
33662306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_64M   0xeUL
33762306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_128M  0xfUL
33862306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_LAST    \
33962306a36Sopenharmony_ci		CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_128M
34062306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_RSVD_MASK               0xfff0UL
34162306a36Sopenharmony_ci	#define CMDQ_INITIALIZE_FW_RSVD_SFT                4
34262306a36Sopenharmony_ci	__le64	qpc_page_dir;
34362306a36Sopenharmony_ci	__le64	mrw_page_dir;
34462306a36Sopenharmony_ci	__le64	srq_page_dir;
34562306a36Sopenharmony_ci	__le64	cq_page_dir;
34662306a36Sopenharmony_ci	__le64	tqm_page_dir;
34762306a36Sopenharmony_ci	__le64	tim_page_dir;
34862306a36Sopenharmony_ci	__le32	number_of_qp;
34962306a36Sopenharmony_ci	__le32	number_of_mrw;
35062306a36Sopenharmony_ci	__le32	number_of_srq;
35162306a36Sopenharmony_ci	__le32	number_of_cq;
35262306a36Sopenharmony_ci	__le32	max_qp_per_vf;
35362306a36Sopenharmony_ci	__le32	max_mrw_per_vf;
35462306a36Sopenharmony_ci	__le32	max_srq_per_vf;
35562306a36Sopenharmony_ci	__le32	max_cq_per_vf;
35662306a36Sopenharmony_ci	__le32	max_gid_per_vf;
35762306a36Sopenharmony_ci	__le32	stat_ctx_id;
35862306a36Sopenharmony_ci};
35962306a36Sopenharmony_ci
36062306a36Sopenharmony_ci/* creq_initialize_fw_resp (size:128b/16B) */
36162306a36Sopenharmony_cistruct creq_initialize_fw_resp {
36262306a36Sopenharmony_ci	u8	type;
36362306a36Sopenharmony_ci	#define CREQ_INITIALIZE_FW_RESP_TYPE_MASK    0x3fUL
36462306a36Sopenharmony_ci	#define CREQ_INITIALIZE_FW_RESP_TYPE_SFT     0
36562306a36Sopenharmony_ci	#define CREQ_INITIALIZE_FW_RESP_TYPE_QP_EVENT  0x38UL
36662306a36Sopenharmony_ci	#define CREQ_INITIALIZE_FW_RESP_TYPE_LAST     CREQ_INITIALIZE_FW_RESP_TYPE_QP_EVENT
36762306a36Sopenharmony_ci	u8	status;
36862306a36Sopenharmony_ci	__le16	cookie;
36962306a36Sopenharmony_ci	__le32	reserved32;
37062306a36Sopenharmony_ci	u8	v;
37162306a36Sopenharmony_ci	#define CREQ_INITIALIZE_FW_RESP_V     0x1UL
37262306a36Sopenharmony_ci	u8	event;
37362306a36Sopenharmony_ci	#define CREQ_INITIALIZE_FW_RESP_EVENT_INITIALIZE_FW 0x80UL
37462306a36Sopenharmony_ci	#define CREQ_INITIALIZE_FW_RESP_EVENT_LAST         \
37562306a36Sopenharmony_ci		CREQ_INITIALIZE_FW_RESP_EVENT_INITIALIZE_FW
37662306a36Sopenharmony_ci	u8	reserved48[6];
37762306a36Sopenharmony_ci};
37862306a36Sopenharmony_ci
37962306a36Sopenharmony_ci/* cmdq_deinitialize_fw (size:128b/16B) */
38062306a36Sopenharmony_cistruct cmdq_deinitialize_fw {
38162306a36Sopenharmony_ci	u8	opcode;
38262306a36Sopenharmony_ci	#define CMDQ_DEINITIALIZE_FW_OPCODE_DEINITIALIZE_FW 0x81UL
38362306a36Sopenharmony_ci	#define CMDQ_DEINITIALIZE_FW_OPCODE_LAST           \
38462306a36Sopenharmony_ci		CMDQ_DEINITIALIZE_FW_OPCODE_DEINITIALIZE_FW
38562306a36Sopenharmony_ci	u8	cmd_size;
38662306a36Sopenharmony_ci	__le16	flags;
38762306a36Sopenharmony_ci	__le16	cookie;
38862306a36Sopenharmony_ci	u8	resp_size;
38962306a36Sopenharmony_ci	u8	reserved8;
39062306a36Sopenharmony_ci	__le64	resp_addr;
39162306a36Sopenharmony_ci};
39262306a36Sopenharmony_ci
39362306a36Sopenharmony_ci/* creq_deinitialize_fw_resp (size:128b/16B) */
39462306a36Sopenharmony_cistruct creq_deinitialize_fw_resp {
39562306a36Sopenharmony_ci	u8	type;
39662306a36Sopenharmony_ci	#define CREQ_DEINITIALIZE_FW_RESP_TYPE_MASK    0x3fUL
39762306a36Sopenharmony_ci	#define CREQ_DEINITIALIZE_FW_RESP_TYPE_SFT     0
39862306a36Sopenharmony_ci	#define CREQ_DEINITIALIZE_FW_RESP_TYPE_QP_EVENT  0x38UL
39962306a36Sopenharmony_ci	#define CREQ_DEINITIALIZE_FW_RESP_TYPE_LAST     CREQ_DEINITIALIZE_FW_RESP_TYPE_QP_EVENT
40062306a36Sopenharmony_ci	u8	status;
40162306a36Sopenharmony_ci	__le16	cookie;
40262306a36Sopenharmony_ci	__le32	reserved32;
40362306a36Sopenharmony_ci	u8	v;
40462306a36Sopenharmony_ci	#define CREQ_DEINITIALIZE_FW_RESP_V     0x1UL
40562306a36Sopenharmony_ci	u8	event;
40662306a36Sopenharmony_ci	#define CREQ_DEINITIALIZE_FW_RESP_EVENT_DEINITIALIZE_FW 0x81UL
40762306a36Sopenharmony_ci	#define CREQ_DEINITIALIZE_FW_RESP_EVENT_LAST           \
40862306a36Sopenharmony_ci		CREQ_DEINITIALIZE_FW_RESP_EVENT_DEINITIALIZE_FW
40962306a36Sopenharmony_ci	u8	reserved48[6];
41062306a36Sopenharmony_ci};
41162306a36Sopenharmony_ci
41262306a36Sopenharmony_ci/* cmdq_create_qp (size:768b/96B) */
41362306a36Sopenharmony_cistruct cmdq_create_qp {
41462306a36Sopenharmony_ci	u8	opcode;
41562306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_OPCODE_CREATE_QP 0x1UL
41662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_OPCODE_LAST     CMDQ_CREATE_QP_OPCODE_CREATE_QP
41762306a36Sopenharmony_ci	u8	cmd_size;
41862306a36Sopenharmony_ci	__le16	flags;
41962306a36Sopenharmony_ci	__le16	cookie;
42062306a36Sopenharmony_ci	u8	resp_size;
42162306a36Sopenharmony_ci	u8	reserved8;
42262306a36Sopenharmony_ci	__le64	resp_addr;
42362306a36Sopenharmony_ci	__le64	qp_handle;
42462306a36Sopenharmony_ci	__le32	qp_flags;
42562306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_QP_FLAGS_SRQ_USED                   0x1UL
42662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_QP_FLAGS_FORCE_COMPLETION           0x2UL
42762306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_QP_FLAGS_RESERVED_LKEY_ENABLE       0x4UL
42862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_QP_FLAGS_FR_PMR_ENABLED             0x8UL
42962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_QP_FLAGS_VARIABLE_SIZED_WQE_ENABLED 0x10UL
43062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_QP_FLAGS_OPTIMIZED_TRANSMIT_ENABLED 0x20UL
43162306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_QP_FLAGS_RESPONDER_UD_CQE_WITH_CFA  0x40UL
43262306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_QP_FLAGS_EXT_STATS_ENABLED          0x80UL
43362306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_QP_FLAGS_LAST                      \
43462306a36Sopenharmony_ci		CMDQ_CREATE_QP_QP_FLAGS_EXT_STATS_ENABLED
43562306a36Sopenharmony_ci	u8	type;
43662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_TYPE_RC            0x2UL
43762306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_TYPE_UD            0x4UL
43862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_TYPE_RAW_ETHERTYPE 0x6UL
43962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_TYPE_GSI           0x7UL
44062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_TYPE_LAST         CMDQ_CREATE_QP_TYPE_GSI
44162306a36Sopenharmony_ci	u8	sq_pg_size_sq_lvl;
44262306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_LVL_MASK      0xfUL
44362306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_LVL_SFT       0
44462306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_LVL_LVL_0       0x0UL
44562306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_LVL_LVL_1       0x1UL
44662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_LVL_LVL_2       0x2UL
44762306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_LVL_LAST       CMDQ_CREATE_QP_SQ_LVL_LVL_2
44862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_PG_SIZE_MASK  0xf0UL
44962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_PG_SIZE_SFT   4
45062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_4K   (0x0UL << 4)
45162306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_8K   (0x1UL << 4)
45262306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_64K  (0x2UL << 4)
45362306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_2M   (0x3UL << 4)
45462306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_8M   (0x4UL << 4)
45562306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_1G   (0x5UL << 4)
45662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_PG_SIZE_LAST   CMDQ_CREATE_QP_SQ_PG_SIZE_PG_1G
45762306a36Sopenharmony_ci	u8	rq_pg_size_rq_lvl;
45862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_LVL_MASK      0xfUL
45962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_LVL_SFT       0
46062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_LVL_LVL_0       0x0UL
46162306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_LVL_LVL_1       0x1UL
46262306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_LVL_LVL_2       0x2UL
46362306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_LVL_LAST       CMDQ_CREATE_QP_RQ_LVL_LVL_2
46462306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_PG_SIZE_MASK  0xf0UL
46562306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_PG_SIZE_SFT   4
46662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_4K   (0x0UL << 4)
46762306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_8K   (0x1UL << 4)
46862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_64K  (0x2UL << 4)
46962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_2M   (0x3UL << 4)
47062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_8M   (0x4UL << 4)
47162306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_1G   (0x5UL << 4)
47262306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_PG_SIZE_LAST   CMDQ_CREATE_QP_RQ_PG_SIZE_PG_1G
47362306a36Sopenharmony_ci	u8	unused_0;
47462306a36Sopenharmony_ci	__le32	dpi;
47562306a36Sopenharmony_ci	__le32	sq_size;
47662306a36Sopenharmony_ci	__le32	rq_size;
47762306a36Sopenharmony_ci	__le16	sq_fwo_sq_sge;
47862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_SGE_MASK 0xfUL
47962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_SGE_SFT 0
48062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_FWO_MASK 0xfff0UL
48162306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_SQ_FWO_SFT 4
48262306a36Sopenharmony_ci	__le16	rq_fwo_rq_sge;
48362306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_SGE_MASK 0xfUL
48462306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_SGE_SFT 0
48562306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_FWO_MASK 0xfff0UL
48662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP_RQ_FWO_SFT 4
48762306a36Sopenharmony_ci	__le32	scq_cid;
48862306a36Sopenharmony_ci	__le32	rcq_cid;
48962306a36Sopenharmony_ci	__le32	srq_cid;
49062306a36Sopenharmony_ci	__le32	pd_id;
49162306a36Sopenharmony_ci	__le64	sq_pbl;
49262306a36Sopenharmony_ci	__le64	rq_pbl;
49362306a36Sopenharmony_ci	__le64	irrq_addr;
49462306a36Sopenharmony_ci	__le64	orrq_addr;
49562306a36Sopenharmony_ci};
49662306a36Sopenharmony_ci
49762306a36Sopenharmony_ci/* creq_create_qp_resp (size:128b/16B) */
49862306a36Sopenharmony_cistruct creq_create_qp_resp {
49962306a36Sopenharmony_ci	u8	type;
50062306a36Sopenharmony_ci	#define CREQ_CREATE_QP_RESP_TYPE_MASK    0x3fUL
50162306a36Sopenharmony_ci	#define CREQ_CREATE_QP_RESP_TYPE_SFT     0
50262306a36Sopenharmony_ci	#define CREQ_CREATE_QP_RESP_TYPE_QP_EVENT  0x38UL
50362306a36Sopenharmony_ci	#define CREQ_CREATE_QP_RESP_TYPE_LAST     CREQ_CREATE_QP_RESP_TYPE_QP_EVENT
50462306a36Sopenharmony_ci	u8	status;
50562306a36Sopenharmony_ci	__le16	cookie;
50662306a36Sopenharmony_ci	__le32	xid;
50762306a36Sopenharmony_ci	u8	v;
50862306a36Sopenharmony_ci	#define CREQ_CREATE_QP_RESP_V     0x1UL
50962306a36Sopenharmony_ci	u8	event;
51062306a36Sopenharmony_ci	#define CREQ_CREATE_QP_RESP_EVENT_CREATE_QP 0x1UL
51162306a36Sopenharmony_ci	#define CREQ_CREATE_QP_RESP_EVENT_LAST     CREQ_CREATE_QP_RESP_EVENT_CREATE_QP
51262306a36Sopenharmony_ci	u8	optimized_transmit_enabled;
51362306a36Sopenharmony_ci	u8	reserved48[5];
51462306a36Sopenharmony_ci};
51562306a36Sopenharmony_ci
51662306a36Sopenharmony_ci/* cmdq_destroy_qp (size:192b/24B) */
51762306a36Sopenharmony_cistruct cmdq_destroy_qp {
51862306a36Sopenharmony_ci	u8	opcode;
51962306a36Sopenharmony_ci	#define CMDQ_DESTROY_QP_OPCODE_DESTROY_QP 0x2UL
52062306a36Sopenharmony_ci	#define CMDQ_DESTROY_QP_OPCODE_LAST      CMDQ_DESTROY_QP_OPCODE_DESTROY_QP
52162306a36Sopenharmony_ci	u8	cmd_size;
52262306a36Sopenharmony_ci	__le16	flags;
52362306a36Sopenharmony_ci	__le16	cookie;
52462306a36Sopenharmony_ci	u8	resp_size;
52562306a36Sopenharmony_ci	u8	reserved8;
52662306a36Sopenharmony_ci	__le64	resp_addr;
52762306a36Sopenharmony_ci	__le32	qp_cid;
52862306a36Sopenharmony_ci	__le32	unused_0;
52962306a36Sopenharmony_ci};
53062306a36Sopenharmony_ci
53162306a36Sopenharmony_ci/* creq_destroy_qp_resp (size:128b/16B) */
53262306a36Sopenharmony_cistruct creq_destroy_qp_resp {
53362306a36Sopenharmony_ci	u8	type;
53462306a36Sopenharmony_ci	#define CREQ_DESTROY_QP_RESP_TYPE_MASK    0x3fUL
53562306a36Sopenharmony_ci	#define CREQ_DESTROY_QP_RESP_TYPE_SFT     0
53662306a36Sopenharmony_ci	#define CREQ_DESTROY_QP_RESP_TYPE_QP_EVENT  0x38UL
53762306a36Sopenharmony_ci	#define CREQ_DESTROY_QP_RESP_TYPE_LAST     CREQ_DESTROY_QP_RESP_TYPE_QP_EVENT
53862306a36Sopenharmony_ci	u8	status;
53962306a36Sopenharmony_ci	__le16	cookie;
54062306a36Sopenharmony_ci	__le32	xid;
54162306a36Sopenharmony_ci	u8	v;
54262306a36Sopenharmony_ci	#define CREQ_DESTROY_QP_RESP_V     0x1UL
54362306a36Sopenharmony_ci	u8	event;
54462306a36Sopenharmony_ci	#define CREQ_DESTROY_QP_RESP_EVENT_DESTROY_QP 0x2UL
54562306a36Sopenharmony_ci	#define CREQ_DESTROY_QP_RESP_EVENT_LAST      CREQ_DESTROY_QP_RESP_EVENT_DESTROY_QP
54662306a36Sopenharmony_ci	u8	reserved48[6];
54762306a36Sopenharmony_ci};
54862306a36Sopenharmony_ci
54962306a36Sopenharmony_ci/* cmdq_modify_qp (size:1024b/128B) */
55062306a36Sopenharmony_cistruct cmdq_modify_qp {
55162306a36Sopenharmony_ci	u8	opcode;
55262306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_OPCODE_MODIFY_QP 0x3UL
55362306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_OPCODE_LAST     CMDQ_MODIFY_QP_OPCODE_MODIFY_QP
55462306a36Sopenharmony_ci	u8	cmd_size;
55562306a36Sopenharmony_ci	__le16	flags;
55662306a36Sopenharmony_ci	__le16	cookie;
55762306a36Sopenharmony_ci	u8	resp_size;
55862306a36Sopenharmony_ci	u8	reserved8;
55962306a36Sopenharmony_ci	__le64	resp_addr;
56062306a36Sopenharmony_ci	__le32	modify_mask;
56162306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_STATE                   0x1UL
56262306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_EN_SQD_ASYNC_NOTIFY     0x2UL
56362306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_ACCESS                  0x4UL
56462306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_PKEY                    0x8UL
56562306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_QKEY                    0x10UL
56662306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_DGID                    0x20UL
56762306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_FLOW_LABEL              0x40UL
56862306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_SGID_INDEX              0x80UL
56962306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_HOP_LIMIT               0x100UL
57062306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_TRAFFIC_CLASS           0x200UL
57162306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_DEST_MAC                0x400UL
57262306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_PINGPONG_PUSH_MODE      0x800UL
57362306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_PATH_MTU                0x1000UL
57462306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_TIMEOUT                 0x2000UL
57562306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_RETRY_CNT               0x4000UL
57662306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_RNR_RETRY               0x8000UL
57762306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_RQ_PSN                  0x10000UL
57862306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_MAX_RD_ATOMIC           0x20000UL
57962306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_MIN_RNR_TIMER           0x40000UL
58062306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_SQ_PSN                  0x80000UL
58162306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_MAX_DEST_RD_ATOMIC      0x100000UL
58262306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_SQ_SIZE                 0x200000UL
58362306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_RQ_SIZE                 0x400000UL
58462306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_SQ_SGE                  0x800000UL
58562306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_RQ_SGE                  0x1000000UL
58662306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_MAX_INLINE_DATA         0x2000000UL
58762306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_DEST_QP_ID              0x4000000UL
58862306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_SRC_MAC                 0x8000000UL
58962306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_VLAN_ID                 0x10000000UL
59062306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_ENABLE_CC               0x20000000UL
59162306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_TOS_ECN                 0x40000000UL
59262306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_MODIFY_MASK_TOS_DSCP                0x80000000UL
59362306a36Sopenharmony_ci	__le32	qp_cid;
59462306a36Sopenharmony_ci	u8	network_type_en_sqd_async_notify_new_state;
59562306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NEW_STATE_MASK          0xfUL
59662306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NEW_STATE_SFT           0
59762306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NEW_STATE_RESET           0x0UL
59862306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NEW_STATE_INIT            0x1UL
59962306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NEW_STATE_RTR             0x2UL
60062306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NEW_STATE_RTS             0x3UL
60162306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NEW_STATE_SQD             0x4UL
60262306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NEW_STATE_SQE             0x5UL
60362306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NEW_STATE_ERR             0x6UL
60462306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NEW_STATE_LAST           CMDQ_MODIFY_QP_NEW_STATE_ERR
60562306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_EN_SQD_ASYNC_NOTIFY     0x10UL
60662306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_UNUSED1                 0x20UL
60762306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NETWORK_TYPE_MASK       0xc0UL
60862306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NETWORK_TYPE_SFT        6
60962306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV1       (0x0UL << 6)
61062306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV2_IPV4  (0x2UL << 6)
61162306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV2_IPV6  (0x3UL << 6)
61262306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_NETWORK_TYPE_LAST        CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV2_IPV6
61362306a36Sopenharmony_ci	u8	access;
61462306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_ACCESS_REMOTE_ATOMIC_REMOTE_READ_REMOTE_WRITE_LOCAL_WRITE_MASK \
61562306a36Sopenharmony_ci		0xffUL
61662306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_ACCESS_REMOTE_ATOMIC_REMOTE_READ_REMOTE_WRITE_LOCAL_WRITE_SFT	\
61762306a36Sopenharmony_ci		0
61862306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_ACCESS_LOCAL_WRITE	0x1UL
61962306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_ACCESS_REMOTE_WRITE	0x2UL
62062306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_ACCESS_REMOTE_READ	0x4UL
62162306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_ACCESS_REMOTE_ATOMIC	0x8UL
62262306a36Sopenharmony_ci	__le16	pkey;
62362306a36Sopenharmony_ci	__le32	qkey;
62462306a36Sopenharmony_ci	__le32	dgid[4];
62562306a36Sopenharmony_ci	__le32	flow_label;
62662306a36Sopenharmony_ci	__le16	sgid_index;
62762306a36Sopenharmony_ci	u8	hop_limit;
62862306a36Sopenharmony_ci	u8	traffic_class;
62962306a36Sopenharmony_ci	__le16	dest_mac[3];
63062306a36Sopenharmony_ci	u8	tos_dscp_tos_ecn;
63162306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_TOS_ECN_MASK 0x3UL
63262306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_TOS_ECN_SFT  0
63362306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_TOS_DSCP_MASK 0xfcUL
63462306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_TOS_DSCP_SFT 2
63562306a36Sopenharmony_ci	u8	path_mtu_pingpong_push_enable;
63662306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_PINGPONG_PUSH_ENABLE     0x1UL
63762306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_UNUSED3_MASK             0xeUL
63862306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_UNUSED3_SFT              1
63962306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_PATH_MTU_MASK            0xf0UL
64062306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_PATH_MTU_SFT             4
64162306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_PATH_MTU_MTU_256           (0x0UL << 4)
64262306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_PATH_MTU_MTU_512           (0x1UL << 4)
64362306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_PATH_MTU_MTU_1024          (0x2UL << 4)
64462306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_PATH_MTU_MTU_2048          (0x3UL << 4)
64562306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_PATH_MTU_MTU_4096          (0x4UL << 4)
64662306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_PATH_MTU_MTU_8192          (0x5UL << 4)
64762306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_PATH_MTU_LAST             CMDQ_MODIFY_QP_PATH_MTU_MTU_8192
64862306a36Sopenharmony_ci	u8	timeout;
64962306a36Sopenharmony_ci	u8	retry_cnt;
65062306a36Sopenharmony_ci	u8	rnr_retry;
65162306a36Sopenharmony_ci	u8	min_rnr_timer;
65262306a36Sopenharmony_ci	__le32	rq_psn;
65362306a36Sopenharmony_ci	__le32	sq_psn;
65462306a36Sopenharmony_ci	u8	max_rd_atomic;
65562306a36Sopenharmony_ci	u8	max_dest_rd_atomic;
65662306a36Sopenharmony_ci	__le16	enable_cc;
65762306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_ENABLE_CC     0x1UL
65862306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_UNUSED15_MASK 0xfffeUL
65962306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_UNUSED15_SFT  1
66062306a36Sopenharmony_ci	__le32	sq_size;
66162306a36Sopenharmony_ci	__le32	rq_size;
66262306a36Sopenharmony_ci	__le16	sq_sge;
66362306a36Sopenharmony_ci	__le16	rq_sge;
66462306a36Sopenharmony_ci	__le32	max_inline_data;
66562306a36Sopenharmony_ci	__le32	dest_qp_id;
66662306a36Sopenharmony_ci	__le32	pingpong_push_dpi;
66762306a36Sopenharmony_ci	__le16	src_mac[3];
66862306a36Sopenharmony_ci	__le16	vlan_pcp_vlan_dei_vlan_id;
66962306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_VLAN_ID_MASK 0xfffUL
67062306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_VLAN_ID_SFT  0
67162306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_VLAN_DEI     0x1000UL
67262306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_VLAN_PCP_MASK 0xe000UL
67362306a36Sopenharmony_ci	#define CMDQ_MODIFY_QP_VLAN_PCP_SFT 13
67462306a36Sopenharmony_ci	__le64	irrq_addr;
67562306a36Sopenharmony_ci	__le64	orrq_addr;
67662306a36Sopenharmony_ci};
67762306a36Sopenharmony_ci
67862306a36Sopenharmony_ci/* creq_modify_qp_resp (size:128b/16B) */
67962306a36Sopenharmony_cistruct creq_modify_qp_resp {
68062306a36Sopenharmony_ci	u8	type;
68162306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_TYPE_MASK    0x3fUL
68262306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_TYPE_SFT     0
68362306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_TYPE_QP_EVENT  0x38UL
68462306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_TYPE_LAST     CREQ_MODIFY_QP_RESP_TYPE_QP_EVENT
68562306a36Sopenharmony_ci	u8	status;
68662306a36Sopenharmony_ci	__le16	cookie;
68762306a36Sopenharmony_ci	__le32	xid;
68862306a36Sopenharmony_ci	u8	v;
68962306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_V     0x1UL
69062306a36Sopenharmony_ci	u8	event;
69162306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_EVENT_MODIFY_QP 0x3UL
69262306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_EVENT_LAST     CREQ_MODIFY_QP_RESP_EVENT_MODIFY_QP
69362306a36Sopenharmony_ci	u8	pingpong_push_state_index_enabled;
69462306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_PINGPONG_PUSH_ENABLED     0x1UL
69562306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_PINGPONG_PUSH_INDEX_MASK  0xeUL
69662306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_PINGPONG_PUSH_INDEX_SFT   1
69762306a36Sopenharmony_ci	#define CREQ_MODIFY_QP_RESP_PINGPONG_PUSH_STATE       0x10UL
69862306a36Sopenharmony_ci	u8	reserved8;
69962306a36Sopenharmony_ci	__le32	lag_src_mac;
70062306a36Sopenharmony_ci};
70162306a36Sopenharmony_ci
70262306a36Sopenharmony_ci/* cmdq_query_qp (size:192b/24B) */
70362306a36Sopenharmony_cistruct cmdq_query_qp {
70462306a36Sopenharmony_ci	u8	opcode;
70562306a36Sopenharmony_ci	#define CMDQ_QUERY_QP_OPCODE_QUERY_QP 0x4UL
70662306a36Sopenharmony_ci	#define CMDQ_QUERY_QP_OPCODE_LAST    CMDQ_QUERY_QP_OPCODE_QUERY_QP
70762306a36Sopenharmony_ci	u8	cmd_size;
70862306a36Sopenharmony_ci	__le16	flags;
70962306a36Sopenharmony_ci	__le16	cookie;
71062306a36Sopenharmony_ci	u8	resp_size;
71162306a36Sopenharmony_ci	u8	reserved8;
71262306a36Sopenharmony_ci	__le64	resp_addr;
71362306a36Sopenharmony_ci	__le32	qp_cid;
71462306a36Sopenharmony_ci	__le32	unused_0;
71562306a36Sopenharmony_ci};
71662306a36Sopenharmony_ci
71762306a36Sopenharmony_ci/* creq_query_qp_resp (size:128b/16B) */
71862306a36Sopenharmony_cistruct creq_query_qp_resp {
71962306a36Sopenharmony_ci	u8	type;
72062306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_TYPE_MASK    0x3fUL
72162306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_TYPE_SFT     0
72262306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_TYPE_QP_EVENT  0x38UL
72362306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_TYPE_LAST     CREQ_QUERY_QP_RESP_TYPE_QP_EVENT
72462306a36Sopenharmony_ci	u8	status;
72562306a36Sopenharmony_ci	__le16	cookie;
72662306a36Sopenharmony_ci	__le32	size;
72762306a36Sopenharmony_ci	u8	v;
72862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_V     0x1UL
72962306a36Sopenharmony_ci	u8	event;
73062306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_EVENT_QUERY_QP 0x4UL
73162306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_EVENT_LAST    CREQ_QUERY_QP_RESP_EVENT_QUERY_QP
73262306a36Sopenharmony_ci	u8	reserved48[6];
73362306a36Sopenharmony_ci};
73462306a36Sopenharmony_ci
73562306a36Sopenharmony_ci/* creq_query_qp_resp_sb (size:832b/104B) */
73662306a36Sopenharmony_cistruct creq_query_qp_resp_sb {
73762306a36Sopenharmony_ci	u8	opcode;
73862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_OPCODE_QUERY_QP 0x4UL
73962306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_OPCODE_LAST    CREQ_QUERY_QP_RESP_SB_OPCODE_QUERY_QP
74062306a36Sopenharmony_ci	u8	status;
74162306a36Sopenharmony_ci	__le16	cookie;
74262306a36Sopenharmony_ci	__le16	flags;
74362306a36Sopenharmony_ci	u8	resp_size;
74462306a36Sopenharmony_ci	u8	reserved8;
74562306a36Sopenharmony_ci	__le32	xid;
74662306a36Sopenharmony_ci	u8	en_sqd_async_notify_state;
74762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_STATE_MASK              0xfUL
74862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_STATE_SFT               0
74962306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_STATE_RESET               0x0UL
75062306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_STATE_INIT                0x1UL
75162306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_STATE_RTR                 0x2UL
75262306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_STATE_RTS                 0x3UL
75362306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_STATE_SQD                 0x4UL
75462306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_STATE_SQE                 0x5UL
75562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_STATE_ERR                 0x6UL
75662306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_STATE_LAST               CREQ_QUERY_QP_RESP_SB_STATE_ERR
75762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_EN_SQD_ASYNC_NOTIFY     0x10UL
75862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_UNUSED3_MASK            0xe0UL
75962306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_UNUSED3_SFT             5
76062306a36Sopenharmony_ci	u8	access;
76162306a36Sopenharmony_ci	#define \
76262306a36Sopenharmony_ci	CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_ATOMIC_REMOTE_READ_REMOTE_WRITE_LOCAL_WRITE_MASK\
76362306a36Sopenharmony_ci		0xffUL
76462306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_ATOMIC_REMOTE_READ_REMOTE_WRITE_LOCAL_WRITE_SFT\
76562306a36Sopenharmony_ci		0
76662306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_ACCESS_LOCAL_WRITE 0x1UL
76762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_WRITE 0x2UL
76862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_READ 0x4UL
76962306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_ATOMIC 0x8UL
77062306a36Sopenharmony_ci	__le16	pkey;
77162306a36Sopenharmony_ci	__le32	qkey;
77262306a36Sopenharmony_ci	__le32	reserved32;
77362306a36Sopenharmony_ci	__le32	dgid[4];
77462306a36Sopenharmony_ci	__le32	flow_label;
77562306a36Sopenharmony_ci	__le16	sgid_index;
77662306a36Sopenharmony_ci	u8	hop_limit;
77762306a36Sopenharmony_ci	u8	traffic_class;
77862306a36Sopenharmony_ci	__le16	dest_mac[3];
77962306a36Sopenharmony_ci	__le16	path_mtu_dest_vlan_id;
78062306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_DEST_VLAN_ID_MASK 0xfffUL
78162306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_DEST_VLAN_ID_SFT 0
78262306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MASK    0xf000UL
78362306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_SFT     12
78462306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_256   (0x0UL << 12)
78562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_512   (0x1UL << 12)
78662306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_1024  (0x2UL << 12)
78762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_2048  (0x3UL << 12)
78862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_4096  (0x4UL << 12)
78962306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_8192  (0x5UL << 12)
79062306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_PATH_MTU_LAST     CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_8192
79162306a36Sopenharmony_ci	u8	timeout;
79262306a36Sopenharmony_ci	u8	retry_cnt;
79362306a36Sopenharmony_ci	u8	rnr_retry;
79462306a36Sopenharmony_ci	u8	min_rnr_timer;
79562306a36Sopenharmony_ci	__le32	rq_psn;
79662306a36Sopenharmony_ci	__le32	sq_psn;
79762306a36Sopenharmony_ci	u8	max_rd_atomic;
79862306a36Sopenharmony_ci	u8	max_dest_rd_atomic;
79962306a36Sopenharmony_ci	u8	tos_dscp_tos_ecn;
80062306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_TOS_ECN_MASK 0x3UL
80162306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_TOS_ECN_SFT  0
80262306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_TOS_DSCP_MASK 0xfcUL
80362306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_TOS_DSCP_SFT 2
80462306a36Sopenharmony_ci	u8	enable_cc;
80562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_ENABLE_CC     0x1UL
80662306a36Sopenharmony_ci	__le32	sq_size;
80762306a36Sopenharmony_ci	__le32	rq_size;
80862306a36Sopenharmony_ci	__le16	sq_sge;
80962306a36Sopenharmony_ci	__le16	rq_sge;
81062306a36Sopenharmony_ci	__le32	max_inline_data;
81162306a36Sopenharmony_ci	__le32	dest_qp_id;
81262306a36Sopenharmony_ci	__le16	port_id;
81362306a36Sopenharmony_ci	u8	unused_0;
81462306a36Sopenharmony_ci	u8	stat_collection_id;
81562306a36Sopenharmony_ci	__le16	src_mac[3];
81662306a36Sopenharmony_ci	__le16	vlan_pcp_vlan_dei_vlan_id;
81762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_VLAN_ID_MASK 0xfffUL
81862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_VLAN_ID_SFT  0
81962306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_VLAN_DEI     0x1000UL
82062306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_VLAN_PCP_MASK 0xe000UL
82162306a36Sopenharmony_ci	#define CREQ_QUERY_QP_RESP_SB_VLAN_PCP_SFT 13
82262306a36Sopenharmony_ci};
82362306a36Sopenharmony_ci
82462306a36Sopenharmony_ci/* cmdq_query_qp_extend (size:192b/24B) */
82562306a36Sopenharmony_cistruct cmdq_query_qp_extend {
82662306a36Sopenharmony_ci	u8	opcode;
82762306a36Sopenharmony_ci	#define CMDQ_QUERY_QP_EXTEND_OPCODE_QUERY_QP_EXTEND 0x91UL
82862306a36Sopenharmony_ci	#define CMDQ_QUERY_QP_EXTEND_OPCODE_LAST CMDQ_QUERY_QP_EXTEND_OPCODE_QUERY_QP_EXTEND
82962306a36Sopenharmony_ci	u8	cmd_size;
83062306a36Sopenharmony_ci	__le16	flags;
83162306a36Sopenharmony_ci	__le16	cookie;
83262306a36Sopenharmony_ci	u8	resp_size;
83362306a36Sopenharmony_ci	u8	num_qps;
83462306a36Sopenharmony_ci	__le64	resp_addr;
83562306a36Sopenharmony_ci	__le32	function_id;
83662306a36Sopenharmony_ci	#define CMDQ_QUERY_QP_EXTEND_PF_NUM_MASK  0xffUL
83762306a36Sopenharmony_ci	#define CMDQ_QUERY_QP_EXTEND_PF_NUM_SFT   0
83862306a36Sopenharmony_ci	#define CMDQ_QUERY_QP_EXTEND_VF_NUM_MASK  0xffff00UL
83962306a36Sopenharmony_ci	#define CMDQ_QUERY_QP_EXTEND_VF_NUM_SFT   8
84062306a36Sopenharmony_ci	#define CMDQ_QUERY_QP_EXTEND_VF_VALID     0x1000000UL
84162306a36Sopenharmony_ci	__le32	current_index;
84262306a36Sopenharmony_ci};
84362306a36Sopenharmony_ci
84462306a36Sopenharmony_ci/* creq_query_qp_extend_resp (size:128b/16B) */
84562306a36Sopenharmony_cistruct creq_query_qp_extend_resp {
84662306a36Sopenharmony_ci	u8	type;
84762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_TYPE_MASK    0x3fUL
84862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_TYPE_SFT     0
84962306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_TYPE_QP_EVENT  0x38UL
85062306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_TYPE_LAST     CREQ_QUERY_QP_EXTEND_RESP_TYPE_QP_EVENT
85162306a36Sopenharmony_ci	u8	status;
85262306a36Sopenharmony_ci	__le16	cookie;
85362306a36Sopenharmony_ci	__le32	size;
85462306a36Sopenharmony_ci	u8	v;
85562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_V     0x1UL
85662306a36Sopenharmony_ci	u8	event;
85762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_EVENT_QUERY_QP_EXTEND 0x91UL
85862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_EVENT_LAST CREQ_QUERY_QP_EXTEND_RESP_EVENT_QUERY_QP_EXTEND
85962306a36Sopenharmony_ci	__le16	reserved16;
86062306a36Sopenharmony_ci	__le32	current_index;
86162306a36Sopenharmony_ci};
86262306a36Sopenharmony_ci
86362306a36Sopenharmony_ci/* creq_query_qp_extend_resp_sb (size:384b/48B) */
86462306a36Sopenharmony_cistruct creq_query_qp_extend_resp_sb {
86562306a36Sopenharmony_ci	u8	opcode;
86662306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_OPCODE_QUERY_QP_EXTEND 0x91UL
86762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_OPCODE_LAST \
86862306a36Sopenharmony_ci		CREQ_QUERY_QP_EXTEND_RESP_SB_OPCODE_QUERY_QP_EXTEND
86962306a36Sopenharmony_ci	u8	status;
87062306a36Sopenharmony_ci	__le16	cookie;
87162306a36Sopenharmony_ci	__le16	flags;
87262306a36Sopenharmony_ci	u8	resp_size;
87362306a36Sopenharmony_ci	u8	reserved8;
87462306a36Sopenharmony_ci	__le32	xid;
87562306a36Sopenharmony_ci	u8	state;
87662306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_MASK  0xfUL
87762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_SFT   0
87862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_RESET   0x0UL
87962306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_INIT    0x1UL
88062306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_RTR     0x2UL
88162306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_RTS     0x3UL
88262306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_SQD     0x4UL
88362306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_SQE     0x5UL
88462306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_ERR     0x6UL
88562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_LAST   CREQ_QUERY_QP_EXTEND_RESP_SB_STATE_ERR
88662306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_UNUSED4_MASK 0xf0UL
88762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_UNUSED4_SFT 4
88862306a36Sopenharmony_ci	u8	reserved_8;
88962306a36Sopenharmony_ci	__le16	port_id;
89062306a36Sopenharmony_ci	__le32	qkey;
89162306a36Sopenharmony_ci	__le16	sgid_index;
89262306a36Sopenharmony_ci	u8	network_type;
89362306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_NETWORK_TYPE_ROCEV1      0x0UL
89462306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_NETWORK_TYPE_ROCEV2_IPV4 0x2UL
89562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_NETWORK_TYPE_ROCEV2_IPV6 0x3UL
89662306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_NETWORK_TYPE_LAST \
89762306a36Sopenharmony_ci		CREQ_QUERY_QP_EXTEND_RESP_SB_NETWORK_TYPE_ROCEV2_IPV6
89862306a36Sopenharmony_ci	u8	unused_0;
89962306a36Sopenharmony_ci	__le32	dgid[4];
90062306a36Sopenharmony_ci	__le32	dest_qp_id;
90162306a36Sopenharmony_ci	u8	stat_collection_id;
90262306a36Sopenharmony_ci	u8	reservred_8;
90362306a36Sopenharmony_ci	__le16	reserved_16;
90462306a36Sopenharmony_ci};
90562306a36Sopenharmony_ci
90662306a36Sopenharmony_ci/* creq_query_qp_extend_resp_sb_tlv (size:512b/64B) */
90762306a36Sopenharmony_cistruct creq_query_qp_extend_resp_sb_tlv {
90862306a36Sopenharmony_ci	__le16	cmd_discr;
90962306a36Sopenharmony_ci	u8	reserved_8b;
91062306a36Sopenharmony_ci	u8	tlv_flags;
91162306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_MORE         0x1UL
91262306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_MORE_LAST      0x0UL
91362306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_MORE_NOT_LAST  0x1UL
91462306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_REQUIRED     0x2UL
91562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_REQUIRED_NO    (0x0UL << 1)
91662306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES   (0x1UL << 1)
91762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_REQUIRED_LAST \
91862306a36Sopenharmony_ci		CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES
91962306a36Sopenharmony_ci	__le16	tlv_type;
92062306a36Sopenharmony_ci	__le16	length;
92162306a36Sopenharmony_ci	u8	total_size;
92262306a36Sopenharmony_ci	u8	reserved56[7];
92362306a36Sopenharmony_ci	u8	opcode;
92462306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_OPCODE_QUERY_QP_EXTEND 0x91UL
92562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_OPCODE_LAST \
92662306a36Sopenharmony_ci		CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_OPCODE_QUERY_QP_EXTEND
92762306a36Sopenharmony_ci	u8	status;
92862306a36Sopenharmony_ci	__le16	cookie;
92962306a36Sopenharmony_ci	__le16	flags;
93062306a36Sopenharmony_ci	u8	resp_size;
93162306a36Sopenharmony_ci	u8	reserved8;
93262306a36Sopenharmony_ci	__le32	xid;
93362306a36Sopenharmony_ci	u8	state;
93462306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_MASK  0xfUL
93562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_SFT   0
93662306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_RESET   0x0UL
93762306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_INIT    0x1UL
93862306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_RTR     0x2UL
93962306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_RTS     0x3UL
94062306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_SQD     0x4UL
94162306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_SQE     0x5UL
94262306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_ERR     0x6UL
94362306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_LAST \
94462306a36Sopenharmony_ci		CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_STATE_ERR
94562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_UNUSED4_MASK 0xf0UL
94662306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_UNUSED4_SFT 4
94762306a36Sopenharmony_ci	u8	reserved_8;
94862306a36Sopenharmony_ci	__le16	port_id;
94962306a36Sopenharmony_ci	__le32	qkey;
95062306a36Sopenharmony_ci	__le16	sgid_index;
95162306a36Sopenharmony_ci	u8	network_type;
95262306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_NETWORK_TYPE_ROCEV1      0x0UL
95362306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_NETWORK_TYPE_ROCEV2_IPV4 0x2UL
95462306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_NETWORK_TYPE_ROCEV2_IPV6 0x3UL
95562306a36Sopenharmony_ci	#define CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_NETWORK_TYPE_LAST \
95662306a36Sopenharmony_ci		CREQ_QUERY_QP_EXTEND_RESP_SB_TLV_NETWORK_TYPE_ROCEV2_IPV6
95762306a36Sopenharmony_ci	u8	unused_0;
95862306a36Sopenharmony_ci	__le32	dgid[4];
95962306a36Sopenharmony_ci	__le32	dest_qp_id;
96062306a36Sopenharmony_ci	u8	stat_collection_id;
96162306a36Sopenharmony_ci	u8	reservred_8;
96262306a36Sopenharmony_ci	__le16	reserved_16;
96362306a36Sopenharmony_ci};
96462306a36Sopenharmony_ci
96562306a36Sopenharmony_ci/* cmdq_create_srq (size:384b/48B) */
96662306a36Sopenharmony_cistruct cmdq_create_srq {
96762306a36Sopenharmony_ci	u8	opcode;
96862306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_OPCODE_CREATE_SRQ 0x5UL
96962306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_OPCODE_LAST      CMDQ_CREATE_SRQ_OPCODE_CREATE_SRQ
97062306a36Sopenharmony_ci	u8	cmd_size;
97162306a36Sopenharmony_ci	__le16	flags;
97262306a36Sopenharmony_ci	__le16	cookie;
97362306a36Sopenharmony_ci	u8	resp_size;
97462306a36Sopenharmony_ci	u8	reserved8;
97562306a36Sopenharmony_ci	__le64	resp_addr;
97662306a36Sopenharmony_ci	__le64	srq_handle;
97762306a36Sopenharmony_ci	__le16	pg_size_lvl;
97862306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_LVL_MASK      0x3UL
97962306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_LVL_SFT       0
98062306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_LVL_LVL_0       0x0UL
98162306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_LVL_LVL_1       0x1UL
98262306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_LVL_LVL_2       0x2UL
98362306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_LVL_LAST       CMDQ_CREATE_SRQ_LVL_LVL_2
98462306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_PG_SIZE_MASK  0x1cUL
98562306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_PG_SIZE_SFT   2
98662306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_PG_SIZE_PG_4K   (0x0UL << 2)
98762306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_PG_SIZE_PG_8K   (0x1UL << 2)
98862306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_PG_SIZE_PG_64K  (0x2UL << 2)
98962306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_PG_SIZE_PG_2M   (0x3UL << 2)
99062306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_PG_SIZE_PG_8M   (0x4UL << 2)
99162306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_PG_SIZE_PG_1G   (0x5UL << 2)
99262306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_PG_SIZE_LAST   CMDQ_CREATE_SRQ_PG_SIZE_PG_1G
99362306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_UNUSED11_MASK 0xffe0UL
99462306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_UNUSED11_SFT  5
99562306a36Sopenharmony_ci	__le16	eventq_id;
99662306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_EVENTQ_ID_MASK 0xfffUL
99762306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_EVENTQ_ID_SFT 0
99862306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_UNUSED4_MASK  0xf000UL
99962306a36Sopenharmony_ci	#define CMDQ_CREATE_SRQ_UNUSED4_SFT   12
100062306a36Sopenharmony_ci	__le16	srq_size;
100162306a36Sopenharmony_ci	__le16	srq_fwo;
100262306a36Sopenharmony_ci	__le32	dpi;
100362306a36Sopenharmony_ci	__le32	pd_id;
100462306a36Sopenharmony_ci	__le64	pbl;
100562306a36Sopenharmony_ci};
100662306a36Sopenharmony_ci
100762306a36Sopenharmony_ci/* creq_create_srq_resp (size:128b/16B) */
100862306a36Sopenharmony_cistruct creq_create_srq_resp {
100962306a36Sopenharmony_ci	u8	type;
101062306a36Sopenharmony_ci	#define CREQ_CREATE_SRQ_RESP_TYPE_MASK    0x3fUL
101162306a36Sopenharmony_ci	#define CREQ_CREATE_SRQ_RESP_TYPE_SFT     0
101262306a36Sopenharmony_ci	#define CREQ_CREATE_SRQ_RESP_TYPE_QP_EVENT  0x38UL
101362306a36Sopenharmony_ci	#define CREQ_CREATE_SRQ_RESP_TYPE_LAST     CREQ_CREATE_SRQ_RESP_TYPE_QP_EVENT
101462306a36Sopenharmony_ci	u8	status;
101562306a36Sopenharmony_ci	__le16	cookie;
101662306a36Sopenharmony_ci	__le32	xid;
101762306a36Sopenharmony_ci	u8	v;
101862306a36Sopenharmony_ci	#define CREQ_CREATE_SRQ_RESP_V     0x1UL
101962306a36Sopenharmony_ci	u8	event;
102062306a36Sopenharmony_ci	#define CREQ_CREATE_SRQ_RESP_EVENT_CREATE_SRQ 0x5UL
102162306a36Sopenharmony_ci	#define CREQ_CREATE_SRQ_RESP_EVENT_LAST      CREQ_CREATE_SRQ_RESP_EVENT_CREATE_SRQ
102262306a36Sopenharmony_ci	u8	reserved48[6];
102362306a36Sopenharmony_ci};
102462306a36Sopenharmony_ci
102562306a36Sopenharmony_ci/* cmdq_destroy_srq (size:192b/24B) */
102662306a36Sopenharmony_cistruct cmdq_destroy_srq {
102762306a36Sopenharmony_ci	u8	opcode;
102862306a36Sopenharmony_ci	#define CMDQ_DESTROY_SRQ_OPCODE_DESTROY_SRQ 0x6UL
102962306a36Sopenharmony_ci	#define CMDQ_DESTROY_SRQ_OPCODE_LAST       CMDQ_DESTROY_SRQ_OPCODE_DESTROY_SRQ
103062306a36Sopenharmony_ci	u8	cmd_size;
103162306a36Sopenharmony_ci	__le16	flags;
103262306a36Sopenharmony_ci	__le16	cookie;
103362306a36Sopenharmony_ci	u8	resp_size;
103462306a36Sopenharmony_ci	u8	reserved8;
103562306a36Sopenharmony_ci	__le64	resp_addr;
103662306a36Sopenharmony_ci	__le32	srq_cid;
103762306a36Sopenharmony_ci	__le32	unused_0;
103862306a36Sopenharmony_ci};
103962306a36Sopenharmony_ci
104062306a36Sopenharmony_ci/* creq_destroy_srq_resp (size:128b/16B) */
104162306a36Sopenharmony_cistruct creq_destroy_srq_resp {
104262306a36Sopenharmony_ci	u8	type;
104362306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_TYPE_MASK    0x3fUL
104462306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_TYPE_SFT     0
104562306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_TYPE_QP_EVENT  0x38UL
104662306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_TYPE_LAST     CREQ_DESTROY_SRQ_RESP_TYPE_QP_EVENT
104762306a36Sopenharmony_ci	u8	status;
104862306a36Sopenharmony_ci	__le16	cookie;
104962306a36Sopenharmony_ci	__le32	xid;
105062306a36Sopenharmony_ci	u8	v;
105162306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_V     0x1UL
105262306a36Sopenharmony_ci	u8	event;
105362306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_EVENT_DESTROY_SRQ 0x6UL
105462306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_EVENT_LAST       CREQ_DESTROY_SRQ_RESP_EVENT_DESTROY_SRQ
105562306a36Sopenharmony_ci	__le16	enable_for_arm[3];
105662306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_UNUSED0_MASK       0xffffUL
105762306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_UNUSED0_SFT        0
105862306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_ENABLE_FOR_ARM_MASK 0x30000UL
105962306a36Sopenharmony_ci	#define CREQ_DESTROY_SRQ_RESP_ENABLE_FOR_ARM_SFT 16
106062306a36Sopenharmony_ci};
106162306a36Sopenharmony_ci
106262306a36Sopenharmony_ci/* cmdq_query_srq (size:192b/24B) */
106362306a36Sopenharmony_cistruct cmdq_query_srq {
106462306a36Sopenharmony_ci	u8	opcode;
106562306a36Sopenharmony_ci	#define CMDQ_QUERY_SRQ_OPCODE_QUERY_SRQ 0x8UL
106662306a36Sopenharmony_ci	#define CMDQ_QUERY_SRQ_OPCODE_LAST     CMDQ_QUERY_SRQ_OPCODE_QUERY_SRQ
106762306a36Sopenharmony_ci	u8	cmd_size;
106862306a36Sopenharmony_ci	__le16	flags;
106962306a36Sopenharmony_ci	__le16	cookie;
107062306a36Sopenharmony_ci	u8	resp_size;
107162306a36Sopenharmony_ci	u8	reserved8;
107262306a36Sopenharmony_ci	__le64	resp_addr;
107362306a36Sopenharmony_ci	__le32	srq_cid;
107462306a36Sopenharmony_ci	__le32	unused_0;
107562306a36Sopenharmony_ci};
107662306a36Sopenharmony_ci
107762306a36Sopenharmony_ci/* creq_query_srq_resp (size:128b/16B) */
107862306a36Sopenharmony_cistruct creq_query_srq_resp {
107962306a36Sopenharmony_ci	u8	type;
108062306a36Sopenharmony_ci	#define CREQ_QUERY_SRQ_RESP_TYPE_MASK    0x3fUL
108162306a36Sopenharmony_ci	#define CREQ_QUERY_SRQ_RESP_TYPE_SFT     0
108262306a36Sopenharmony_ci	#define CREQ_QUERY_SRQ_RESP_TYPE_QP_EVENT  0x38UL
108362306a36Sopenharmony_ci	#define CREQ_QUERY_SRQ_RESP_TYPE_LAST     CREQ_QUERY_SRQ_RESP_TYPE_QP_EVENT
108462306a36Sopenharmony_ci	u8	status;
108562306a36Sopenharmony_ci	__le16	cookie;
108662306a36Sopenharmony_ci	__le32	size;
108762306a36Sopenharmony_ci	u8	v;
108862306a36Sopenharmony_ci	#define CREQ_QUERY_SRQ_RESP_V     0x1UL
108962306a36Sopenharmony_ci	u8	event;
109062306a36Sopenharmony_ci	#define CREQ_QUERY_SRQ_RESP_EVENT_QUERY_SRQ 0x8UL
109162306a36Sopenharmony_ci	#define CREQ_QUERY_SRQ_RESP_EVENT_LAST     CREQ_QUERY_SRQ_RESP_EVENT_QUERY_SRQ
109262306a36Sopenharmony_ci	u8	reserved48[6];
109362306a36Sopenharmony_ci};
109462306a36Sopenharmony_ci
109562306a36Sopenharmony_ci/* creq_query_srq_resp_sb (size:256b/32B) */
109662306a36Sopenharmony_cistruct creq_query_srq_resp_sb {
109762306a36Sopenharmony_ci	u8	opcode;
109862306a36Sopenharmony_ci	#define CREQ_QUERY_SRQ_RESP_SB_OPCODE_QUERY_SRQ 0x8UL
109962306a36Sopenharmony_ci	#define CREQ_QUERY_SRQ_RESP_SB_OPCODE_LAST     CREQ_QUERY_SRQ_RESP_SB_OPCODE_QUERY_SRQ
110062306a36Sopenharmony_ci	u8	status;
110162306a36Sopenharmony_ci	__le16	cookie;
110262306a36Sopenharmony_ci	__le16	flags;
110362306a36Sopenharmony_ci	u8	resp_size;
110462306a36Sopenharmony_ci	u8	reserved8;
110562306a36Sopenharmony_ci	__le32	xid;
110662306a36Sopenharmony_ci	__le16	srq_limit;
110762306a36Sopenharmony_ci	__le16	reserved16;
110862306a36Sopenharmony_ci	__le32	data[4];
110962306a36Sopenharmony_ci};
111062306a36Sopenharmony_ci
111162306a36Sopenharmony_ci/* cmdq_create_cq (size:384b/48B) */
111262306a36Sopenharmony_cistruct cmdq_create_cq {
111362306a36Sopenharmony_ci	u8	opcode;
111462306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_OPCODE_CREATE_CQ 0x9UL
111562306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_OPCODE_LAST     CMDQ_CREATE_CQ_OPCODE_CREATE_CQ
111662306a36Sopenharmony_ci	u8	cmd_size;
111762306a36Sopenharmony_ci	__le16	flags;
111862306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_FLAGS_DISABLE_CQ_OVERFLOW_DETECTION     0x1UL
111962306a36Sopenharmony_ci	__le16	cookie;
112062306a36Sopenharmony_ci	u8	resp_size;
112162306a36Sopenharmony_ci	u8	reserved8;
112262306a36Sopenharmony_ci	__le64	resp_addr;
112362306a36Sopenharmony_ci	__le64	cq_handle;
112462306a36Sopenharmony_ci	__le32	pg_size_lvl;
112562306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_LVL_MASK      0x3UL
112662306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_LVL_SFT       0
112762306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_LVL_LVL_0       0x0UL
112862306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_LVL_LVL_1       0x1UL
112962306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_LVL_LVL_2       0x2UL
113062306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_LVL_LAST       CMDQ_CREATE_CQ_LVL_LVL_2
113162306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_PG_SIZE_MASK  0x1cUL
113262306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_PG_SIZE_SFT   2
113362306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_PG_SIZE_PG_4K   (0x0UL << 2)
113462306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_PG_SIZE_PG_8K   (0x1UL << 2)
113562306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_PG_SIZE_PG_64K  (0x2UL << 2)
113662306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_PG_SIZE_PG_2M   (0x3UL << 2)
113762306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_PG_SIZE_PG_8M   (0x4UL << 2)
113862306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_PG_SIZE_PG_1G   (0x5UL << 2)
113962306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_PG_SIZE_LAST   CMDQ_CREATE_CQ_PG_SIZE_PG_1G
114062306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_UNUSED27_MASK 0xffffffe0UL
114162306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_UNUSED27_SFT  5
114262306a36Sopenharmony_ci	__le32	cq_fco_cnq_id;
114362306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_CNQ_ID_MASK 0xfffUL
114462306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_CNQ_ID_SFT 0
114562306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_CQ_FCO_MASK 0xfffff000UL
114662306a36Sopenharmony_ci	#define CMDQ_CREATE_CQ_CQ_FCO_SFT 12
114762306a36Sopenharmony_ci	__le32	dpi;
114862306a36Sopenharmony_ci	__le32	cq_size;
114962306a36Sopenharmony_ci	__le64	pbl;
115062306a36Sopenharmony_ci};
115162306a36Sopenharmony_ci
115262306a36Sopenharmony_ci/* creq_create_cq_resp (size:128b/16B) */
115362306a36Sopenharmony_cistruct creq_create_cq_resp {
115462306a36Sopenharmony_ci	u8	type;
115562306a36Sopenharmony_ci	#define CREQ_CREATE_CQ_RESP_TYPE_MASK    0x3fUL
115662306a36Sopenharmony_ci	#define CREQ_CREATE_CQ_RESP_TYPE_SFT     0
115762306a36Sopenharmony_ci	#define CREQ_CREATE_CQ_RESP_TYPE_QP_EVENT  0x38UL
115862306a36Sopenharmony_ci	#define CREQ_CREATE_CQ_RESP_TYPE_LAST     CREQ_CREATE_CQ_RESP_TYPE_QP_EVENT
115962306a36Sopenharmony_ci	u8	status;
116062306a36Sopenharmony_ci	__le16	cookie;
116162306a36Sopenharmony_ci	__le32	xid;
116262306a36Sopenharmony_ci	u8	v;
116362306a36Sopenharmony_ci	#define CREQ_CREATE_CQ_RESP_V     0x1UL
116462306a36Sopenharmony_ci	u8	event;
116562306a36Sopenharmony_ci	#define CREQ_CREATE_CQ_RESP_EVENT_CREATE_CQ 0x9UL
116662306a36Sopenharmony_ci	#define CREQ_CREATE_CQ_RESP_EVENT_LAST     CREQ_CREATE_CQ_RESP_EVENT_CREATE_CQ
116762306a36Sopenharmony_ci	u8	reserved48[6];
116862306a36Sopenharmony_ci};
116962306a36Sopenharmony_ci
117062306a36Sopenharmony_ci/* cmdq_destroy_cq (size:192b/24B) */
117162306a36Sopenharmony_cistruct cmdq_destroy_cq {
117262306a36Sopenharmony_ci	u8	opcode;
117362306a36Sopenharmony_ci	#define CMDQ_DESTROY_CQ_OPCODE_DESTROY_CQ 0xaUL
117462306a36Sopenharmony_ci	#define CMDQ_DESTROY_CQ_OPCODE_LAST      CMDQ_DESTROY_CQ_OPCODE_DESTROY_CQ
117562306a36Sopenharmony_ci	u8	cmd_size;
117662306a36Sopenharmony_ci	__le16	flags;
117762306a36Sopenharmony_ci	__le16	cookie;
117862306a36Sopenharmony_ci	u8	resp_size;
117962306a36Sopenharmony_ci	u8	reserved8;
118062306a36Sopenharmony_ci	__le64	resp_addr;
118162306a36Sopenharmony_ci	__le32	cq_cid;
118262306a36Sopenharmony_ci	__le32	unused_0;
118362306a36Sopenharmony_ci};
118462306a36Sopenharmony_ci
118562306a36Sopenharmony_ci/* creq_destroy_cq_resp (size:128b/16B) */
118662306a36Sopenharmony_cistruct creq_destroy_cq_resp {
118762306a36Sopenharmony_ci	u8	type;
118862306a36Sopenharmony_ci	#define CREQ_DESTROY_CQ_RESP_TYPE_MASK    0x3fUL
118962306a36Sopenharmony_ci	#define CREQ_DESTROY_CQ_RESP_TYPE_SFT     0
119062306a36Sopenharmony_ci	#define CREQ_DESTROY_CQ_RESP_TYPE_QP_EVENT  0x38UL
119162306a36Sopenharmony_ci	#define CREQ_DESTROY_CQ_RESP_TYPE_LAST     CREQ_DESTROY_CQ_RESP_TYPE_QP_EVENT
119262306a36Sopenharmony_ci	u8	status;
119362306a36Sopenharmony_ci	__le16	cookie;
119462306a36Sopenharmony_ci	__le32	xid;
119562306a36Sopenharmony_ci	u8	v;
119662306a36Sopenharmony_ci	#define CREQ_DESTROY_CQ_RESP_V     0x1UL
119762306a36Sopenharmony_ci	u8	event;
119862306a36Sopenharmony_ci	#define CREQ_DESTROY_CQ_RESP_EVENT_DESTROY_CQ 0xaUL
119962306a36Sopenharmony_ci	#define CREQ_DESTROY_CQ_RESP_EVENT_LAST      CREQ_DESTROY_CQ_RESP_EVENT_DESTROY_CQ
120062306a36Sopenharmony_ci	__le16	cq_arm_lvl;
120162306a36Sopenharmony_ci	#define CREQ_DESTROY_CQ_RESP_CQ_ARM_LVL_MASK 0x3UL
120262306a36Sopenharmony_ci	#define CREQ_DESTROY_CQ_RESP_CQ_ARM_LVL_SFT 0
120362306a36Sopenharmony_ci	__le16	total_cnq_events;
120462306a36Sopenharmony_ci	__le16	reserved16;
120562306a36Sopenharmony_ci};
120662306a36Sopenharmony_ci
120762306a36Sopenharmony_ci/* cmdq_resize_cq (size:320b/40B) */
120862306a36Sopenharmony_cistruct cmdq_resize_cq {
120962306a36Sopenharmony_ci	u8	opcode;
121062306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_OPCODE_RESIZE_CQ 0xcUL
121162306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_OPCODE_LAST     CMDQ_RESIZE_CQ_OPCODE_RESIZE_CQ
121262306a36Sopenharmony_ci	u8	cmd_size;
121362306a36Sopenharmony_ci	__le16	flags;
121462306a36Sopenharmony_ci	__le16	cookie;
121562306a36Sopenharmony_ci	u8	resp_size;
121662306a36Sopenharmony_ci	u8	reserved8;
121762306a36Sopenharmony_ci	__le64	resp_addr;
121862306a36Sopenharmony_ci	__le32	cq_cid;
121962306a36Sopenharmony_ci	__le32	new_cq_size_pg_size_lvl;
122062306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_LVL_MASK        0x3UL
122162306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_LVL_SFT         0
122262306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_LVL_LVL_0         0x0UL
122362306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_LVL_LVL_1         0x1UL
122462306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_LVL_LVL_2         0x2UL
122562306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_LVL_LAST         CMDQ_RESIZE_CQ_LVL_LVL_2
122662306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_PG_SIZE_MASK    0x1cUL
122762306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_PG_SIZE_SFT     2
122862306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_PG_SIZE_PG_4K     (0x0UL << 2)
122962306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_PG_SIZE_PG_8K     (0x1UL << 2)
123062306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_PG_SIZE_PG_64K    (0x2UL << 2)
123162306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_PG_SIZE_PG_2M     (0x3UL << 2)
123262306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_PG_SIZE_PG_8M     (0x4UL << 2)
123362306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_PG_SIZE_PG_1G     (0x5UL << 2)
123462306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_PG_SIZE_LAST     CMDQ_RESIZE_CQ_PG_SIZE_PG_1G
123562306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_NEW_CQ_SIZE_MASK 0x1fffffe0UL
123662306a36Sopenharmony_ci	#define CMDQ_RESIZE_CQ_NEW_CQ_SIZE_SFT 5
123762306a36Sopenharmony_ci	__le64	new_pbl;
123862306a36Sopenharmony_ci	__le32	new_cq_fco;
123962306a36Sopenharmony_ci	__le32	unused_0;
124062306a36Sopenharmony_ci};
124162306a36Sopenharmony_ci
124262306a36Sopenharmony_ci/* creq_resize_cq_resp (size:128b/16B) */
124362306a36Sopenharmony_cistruct creq_resize_cq_resp {
124462306a36Sopenharmony_ci	u8	type;
124562306a36Sopenharmony_ci	#define CREQ_RESIZE_CQ_RESP_TYPE_MASK    0x3fUL
124662306a36Sopenharmony_ci	#define CREQ_RESIZE_CQ_RESP_TYPE_SFT     0
124762306a36Sopenharmony_ci	#define CREQ_RESIZE_CQ_RESP_TYPE_QP_EVENT  0x38UL
124862306a36Sopenharmony_ci	#define CREQ_RESIZE_CQ_RESP_TYPE_LAST     CREQ_RESIZE_CQ_RESP_TYPE_QP_EVENT
124962306a36Sopenharmony_ci	u8	status;
125062306a36Sopenharmony_ci	__le16	cookie;
125162306a36Sopenharmony_ci	__le32	xid;
125262306a36Sopenharmony_ci	u8	v;
125362306a36Sopenharmony_ci	#define CREQ_RESIZE_CQ_RESP_V     0x1UL
125462306a36Sopenharmony_ci	u8	event;
125562306a36Sopenharmony_ci	#define CREQ_RESIZE_CQ_RESP_EVENT_RESIZE_CQ 0xcUL
125662306a36Sopenharmony_ci	#define CREQ_RESIZE_CQ_RESP_EVENT_LAST     CREQ_RESIZE_CQ_RESP_EVENT_RESIZE_CQ
125762306a36Sopenharmony_ci	u8	reserved48[6];
125862306a36Sopenharmony_ci};
125962306a36Sopenharmony_ci
126062306a36Sopenharmony_ci/* cmdq_allocate_mrw (size:256b/32B) */
126162306a36Sopenharmony_cistruct cmdq_allocate_mrw {
126262306a36Sopenharmony_ci	u8	opcode;
126362306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_OPCODE_ALLOCATE_MRW 0xdUL
126462306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_OPCODE_LAST        CMDQ_ALLOCATE_MRW_OPCODE_ALLOCATE_MRW
126562306a36Sopenharmony_ci	u8	cmd_size;
126662306a36Sopenharmony_ci	__le16	flags;
126762306a36Sopenharmony_ci	__le16	cookie;
126862306a36Sopenharmony_ci	u8	resp_size;
126962306a36Sopenharmony_ci	u8	reserved8;
127062306a36Sopenharmony_ci	__le64	resp_addr;
127162306a36Sopenharmony_ci	__le64	mrw_handle;
127262306a36Sopenharmony_ci	u8	mrw_flags;
127362306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MASK     0xfUL
127462306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_SFT      0
127562306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MR         0x0UL
127662306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR        0x1UL
127762306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1   0x2UL
127862306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A  0x3UL
127962306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B  0x4UL
128062306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_MRW_FLAGS_LAST      CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B
128162306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_UNUSED4_MASK       0xf0UL
128262306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_UNUSED4_SFT        4
128362306a36Sopenharmony_ci	u8	access;
128462306a36Sopenharmony_ci	#define CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY     0x20UL
128562306a36Sopenharmony_ci	__le16	unused16;
128662306a36Sopenharmony_ci	__le32	pd_id;
128762306a36Sopenharmony_ci};
128862306a36Sopenharmony_ci
128962306a36Sopenharmony_ci/* creq_allocate_mrw_resp (size:128b/16B) */
129062306a36Sopenharmony_cistruct creq_allocate_mrw_resp {
129162306a36Sopenharmony_ci	u8	type;
129262306a36Sopenharmony_ci	#define CREQ_ALLOCATE_MRW_RESP_TYPE_MASK    0x3fUL
129362306a36Sopenharmony_ci	#define CREQ_ALLOCATE_MRW_RESP_TYPE_SFT     0
129462306a36Sopenharmony_ci	#define CREQ_ALLOCATE_MRW_RESP_TYPE_QP_EVENT  0x38UL
129562306a36Sopenharmony_ci	#define CREQ_ALLOCATE_MRW_RESP_TYPE_LAST     CREQ_ALLOCATE_MRW_RESP_TYPE_QP_EVENT
129662306a36Sopenharmony_ci	u8	status;
129762306a36Sopenharmony_ci	__le16	cookie;
129862306a36Sopenharmony_ci	__le32	xid;
129962306a36Sopenharmony_ci	u8	v;
130062306a36Sopenharmony_ci	#define CREQ_ALLOCATE_MRW_RESP_V     0x1UL
130162306a36Sopenharmony_ci	u8	event;
130262306a36Sopenharmony_ci	#define CREQ_ALLOCATE_MRW_RESP_EVENT_ALLOCATE_MRW 0xdUL
130362306a36Sopenharmony_ci	#define CREQ_ALLOCATE_MRW_RESP_EVENT_LAST        CREQ_ALLOCATE_MRW_RESP_EVENT_ALLOCATE_MRW
130462306a36Sopenharmony_ci	u8	reserved48[6];
130562306a36Sopenharmony_ci};
130662306a36Sopenharmony_ci
130762306a36Sopenharmony_ci/* cmdq_deallocate_key (size:192b/24B) */
130862306a36Sopenharmony_cistruct cmdq_deallocate_key {
130962306a36Sopenharmony_ci	u8	opcode;
131062306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_OPCODE_DEALLOCATE_KEY 0xeUL
131162306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_OPCODE_LAST          CMDQ_DEALLOCATE_KEY_OPCODE_DEALLOCATE_KEY
131262306a36Sopenharmony_ci	u8	cmd_size;
131362306a36Sopenharmony_ci	__le16	flags;
131462306a36Sopenharmony_ci	__le16	cookie;
131562306a36Sopenharmony_ci	u8	resp_size;
131662306a36Sopenharmony_ci	u8	reserved8;
131762306a36Sopenharmony_ci	__le64	resp_addr;
131862306a36Sopenharmony_ci	u8	mrw_flags;
131962306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MASK     0xfUL
132062306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_SFT      0
132162306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MR         0x0UL
132262306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_PMR        0x1UL
132362306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE1   0x2UL
132462306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE2A  0x3UL
132562306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE2B  0x4UL
132662306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_LAST      CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE2B
132762306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_UNUSED4_MASK       0xf0UL
132862306a36Sopenharmony_ci	#define CMDQ_DEALLOCATE_KEY_UNUSED4_SFT        4
132962306a36Sopenharmony_ci	u8	unused24[3];
133062306a36Sopenharmony_ci	__le32	key;
133162306a36Sopenharmony_ci};
133262306a36Sopenharmony_ci
133362306a36Sopenharmony_ci/* creq_deallocate_key_resp (size:128b/16B) */
133462306a36Sopenharmony_cistruct creq_deallocate_key_resp {
133562306a36Sopenharmony_ci	u8	type;
133662306a36Sopenharmony_ci	#define CREQ_DEALLOCATE_KEY_RESP_TYPE_MASK    0x3fUL
133762306a36Sopenharmony_ci	#define CREQ_DEALLOCATE_KEY_RESP_TYPE_SFT     0
133862306a36Sopenharmony_ci	#define CREQ_DEALLOCATE_KEY_RESP_TYPE_QP_EVENT  0x38UL
133962306a36Sopenharmony_ci	#define CREQ_DEALLOCATE_KEY_RESP_TYPE_LAST     CREQ_DEALLOCATE_KEY_RESP_TYPE_QP_EVENT
134062306a36Sopenharmony_ci	u8	status;
134162306a36Sopenharmony_ci	__le16	cookie;
134262306a36Sopenharmony_ci	__le32	xid;
134362306a36Sopenharmony_ci	u8	v;
134462306a36Sopenharmony_ci	#define CREQ_DEALLOCATE_KEY_RESP_V     0x1UL
134562306a36Sopenharmony_ci	u8	event;
134662306a36Sopenharmony_ci	#define CREQ_DEALLOCATE_KEY_RESP_EVENT_DEALLOCATE_KEY 0xeUL
134762306a36Sopenharmony_ci	#define CREQ_DEALLOCATE_KEY_RESP_EVENT_LAST CREQ_DEALLOCATE_KEY_RESP_EVENT_DEALLOCATE_KEY
134862306a36Sopenharmony_ci	__le16	reserved16;
134962306a36Sopenharmony_ci	__le32	bound_window_info;
135062306a36Sopenharmony_ci};
135162306a36Sopenharmony_ci
135262306a36Sopenharmony_ci/* cmdq_register_mr (size:384b/48B) */
135362306a36Sopenharmony_cistruct cmdq_register_mr {
135462306a36Sopenharmony_ci	u8	opcode;
135562306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_OPCODE_REGISTER_MR 0xfUL
135662306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_OPCODE_LAST       CMDQ_REGISTER_MR_OPCODE_REGISTER_MR
135762306a36Sopenharmony_ci	u8	cmd_size;
135862306a36Sopenharmony_ci	__le16	flags;
135962306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_FLAGS_ALLOC_MR     0x1UL
136062306a36Sopenharmony_ci	__le16	cookie;
136162306a36Sopenharmony_ci	u8	resp_size;
136262306a36Sopenharmony_ci	u8	reserved8;
136362306a36Sopenharmony_ci	__le64	resp_addr;
136462306a36Sopenharmony_ci	u8	log2_pg_size_lvl;
136562306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LVL_MASK            0x3UL
136662306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LVL_SFT             0
136762306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LVL_LVL_0             0x0UL
136862306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LVL_LVL_1             0x1UL
136962306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LVL_LVL_2             0x2UL
137062306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LVL_LAST             CMDQ_REGISTER_MR_LVL_LVL_2
137162306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_MASK   0x7cUL
137262306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_SFT    2
137362306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_4K    (0xcUL << 2)
137462306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_8K    (0xdUL << 2)
137562306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_64K   (0x10UL << 2)
137662306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_256K  (0x12UL << 2)
137762306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_1M    (0x14UL << 2)
137862306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_2M    (0x15UL << 2)
137962306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_4M    (0x16UL << 2)
138062306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_1G    (0x1eUL << 2)
138162306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PG_SIZE_LAST    CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_1G
138262306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_UNUSED1             0x80UL
138362306a36Sopenharmony_ci	u8	access;
138462306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_ACCESS_LOCAL_WRITE       0x1UL
138562306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_ACCESS_REMOTE_READ       0x2UL
138662306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_ACCESS_REMOTE_WRITE      0x4UL
138762306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_ACCESS_REMOTE_ATOMIC     0x8UL
138862306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_ACCESS_MW_BIND           0x10UL
138962306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_ACCESS_ZERO_BASED        0x20UL
139062306a36Sopenharmony_ci	__le16	log2_pbl_pg_size;
139162306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_MASK   0x1fUL
139262306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_SFT    0
139362306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_4K    0xcUL
139462306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_8K    0xdUL
139562306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_64K   0x10UL
139662306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_256K  0x12UL
139762306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_1M    0x14UL
139862306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_2M    0x15UL
139962306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_4M    0x16UL
140062306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_1G    0x1eUL
140162306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_LAST    CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_1G
140262306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_UNUSED11_MASK           0xffe0UL
140362306a36Sopenharmony_ci	#define CMDQ_REGISTER_MR_UNUSED11_SFT            5
140462306a36Sopenharmony_ci	__le32	key;
140562306a36Sopenharmony_ci	__le64	pbl;
140662306a36Sopenharmony_ci	__le64	va;
140762306a36Sopenharmony_ci	__le64	mr_size;
140862306a36Sopenharmony_ci};
140962306a36Sopenharmony_ci
141062306a36Sopenharmony_ci/* creq_register_mr_resp (size:128b/16B) */
141162306a36Sopenharmony_cistruct creq_register_mr_resp {
141262306a36Sopenharmony_ci	u8	type;
141362306a36Sopenharmony_ci	#define CREQ_REGISTER_MR_RESP_TYPE_MASK    0x3fUL
141462306a36Sopenharmony_ci	#define CREQ_REGISTER_MR_RESP_TYPE_SFT     0
141562306a36Sopenharmony_ci	#define CREQ_REGISTER_MR_RESP_TYPE_QP_EVENT  0x38UL
141662306a36Sopenharmony_ci	#define CREQ_REGISTER_MR_RESP_TYPE_LAST     CREQ_REGISTER_MR_RESP_TYPE_QP_EVENT
141762306a36Sopenharmony_ci	u8	status;
141862306a36Sopenharmony_ci	__le16	cookie;
141962306a36Sopenharmony_ci	__le32	xid;
142062306a36Sopenharmony_ci	u8	v;
142162306a36Sopenharmony_ci	#define CREQ_REGISTER_MR_RESP_V     0x1UL
142262306a36Sopenharmony_ci	u8	event;
142362306a36Sopenharmony_ci	#define CREQ_REGISTER_MR_RESP_EVENT_REGISTER_MR 0xfUL
142462306a36Sopenharmony_ci	#define CREQ_REGISTER_MR_RESP_EVENT_LAST       CREQ_REGISTER_MR_RESP_EVENT_REGISTER_MR
142562306a36Sopenharmony_ci	u8	reserved48[6];
142662306a36Sopenharmony_ci};
142762306a36Sopenharmony_ci
142862306a36Sopenharmony_ci/* cmdq_deregister_mr (size:192b/24B) */
142962306a36Sopenharmony_cistruct cmdq_deregister_mr {
143062306a36Sopenharmony_ci	u8	opcode;
143162306a36Sopenharmony_ci	#define CMDQ_DEREGISTER_MR_OPCODE_DEREGISTER_MR 0x10UL
143262306a36Sopenharmony_ci	#define CMDQ_DEREGISTER_MR_OPCODE_LAST         CMDQ_DEREGISTER_MR_OPCODE_DEREGISTER_MR
143362306a36Sopenharmony_ci	u8	cmd_size;
143462306a36Sopenharmony_ci	__le16	flags;
143562306a36Sopenharmony_ci	__le16	cookie;
143662306a36Sopenharmony_ci	u8	resp_size;
143762306a36Sopenharmony_ci	u8	reserved8;
143862306a36Sopenharmony_ci	__le64	resp_addr;
143962306a36Sopenharmony_ci	__le32	lkey;
144062306a36Sopenharmony_ci	__le32	unused_0;
144162306a36Sopenharmony_ci};
144262306a36Sopenharmony_ci
144362306a36Sopenharmony_ci/* creq_deregister_mr_resp (size:128b/16B) */
144462306a36Sopenharmony_cistruct creq_deregister_mr_resp {
144562306a36Sopenharmony_ci	u8	type;
144662306a36Sopenharmony_ci	#define CREQ_DEREGISTER_MR_RESP_TYPE_MASK    0x3fUL
144762306a36Sopenharmony_ci	#define CREQ_DEREGISTER_MR_RESP_TYPE_SFT     0
144862306a36Sopenharmony_ci	#define CREQ_DEREGISTER_MR_RESP_TYPE_QP_EVENT  0x38UL
144962306a36Sopenharmony_ci	#define CREQ_DEREGISTER_MR_RESP_TYPE_LAST     CREQ_DEREGISTER_MR_RESP_TYPE_QP_EVENT
145062306a36Sopenharmony_ci	u8	status;
145162306a36Sopenharmony_ci	__le16	cookie;
145262306a36Sopenharmony_ci	__le32	xid;
145362306a36Sopenharmony_ci	u8	v;
145462306a36Sopenharmony_ci	#define CREQ_DEREGISTER_MR_RESP_V     0x1UL
145562306a36Sopenharmony_ci	u8	event;
145662306a36Sopenharmony_ci	#define CREQ_DEREGISTER_MR_RESP_EVENT_DEREGISTER_MR 0x10UL
145762306a36Sopenharmony_ci	#define CREQ_DEREGISTER_MR_RESP_EVENT_LAST CREQ_DEREGISTER_MR_RESP_EVENT_DEREGISTER_MR
145862306a36Sopenharmony_ci	__le16	reserved16;
145962306a36Sopenharmony_ci	__le32	bound_windows;
146062306a36Sopenharmony_ci};
146162306a36Sopenharmony_ci
146262306a36Sopenharmony_ci/* cmdq_add_gid (size:384b/48B) */
146362306a36Sopenharmony_cistruct cmdq_add_gid {
146462306a36Sopenharmony_ci	u8	opcode;
146562306a36Sopenharmony_ci	#define CMDQ_ADD_GID_OPCODE_ADD_GID 0x11UL
146662306a36Sopenharmony_ci	#define CMDQ_ADD_GID_OPCODE_LAST   CMDQ_ADD_GID_OPCODE_ADD_GID
146762306a36Sopenharmony_ci	u8	cmd_size;
146862306a36Sopenharmony_ci	__le16	flags;
146962306a36Sopenharmony_ci	__le16	cookie;
147062306a36Sopenharmony_ci	u8	resp_size;
147162306a36Sopenharmony_ci	u8	reserved8;
147262306a36Sopenharmony_ci	__le64	resp_addr;
147362306a36Sopenharmony_ci	__be32	gid[4];
147462306a36Sopenharmony_ci	__be16	src_mac[3];
147562306a36Sopenharmony_ci	__le16	vlan;
147662306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_VLAN_EN_TPID_VLAN_ID_MASK          0xffffUL
147762306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_VLAN_EN_TPID_VLAN_ID_SFT           0
147862306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_VLAN_ID_MASK                       0xfffUL
147962306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_VLAN_ID_SFT                        0
148062306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_MASK                          0x7000UL
148162306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_SFT                           12
148262306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_TPID_88A8                       (0x0UL << 12)
148362306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_TPID_8100                       (0x1UL << 12)
148462306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_TPID_9100                       (0x2UL << 12)
148562306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_TPID_9200                       (0x3UL << 12)
148662306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_TPID_9300                       (0x4UL << 12)
148762306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_TPID_CFG1                       (0x5UL << 12)
148862306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_TPID_CFG2                       (0x6UL << 12)
148962306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_TPID_CFG3                       (0x7UL << 12)
149062306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_TPID_LAST CMDQ_ADD_GID_VLAN_TPID_TPID_CFG3
149162306a36Sopenharmony_ci	#define CMDQ_ADD_GID_VLAN_VLAN_EN                            0x8000UL
149262306a36Sopenharmony_ci	__le16	ipid;
149362306a36Sopenharmony_ci	__le16	stats_ctx;
149462306a36Sopenharmony_ci	#define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_VALID_STATS_CTX_ID_MASK                0xffffUL
149562306a36Sopenharmony_ci	#define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_VALID_STATS_CTX_ID_SFT                 0
149662306a36Sopenharmony_ci	#define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_ID_MASK                                0x7fffUL
149762306a36Sopenharmony_ci	#define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_ID_SFT                                 0
149862306a36Sopenharmony_ci	#define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_VALID                                  0x8000UL
149962306a36Sopenharmony_ci	__le32	unused_0;
150062306a36Sopenharmony_ci};
150162306a36Sopenharmony_ci
150262306a36Sopenharmony_ci/* creq_add_gid_resp (size:128b/16B) */
150362306a36Sopenharmony_cistruct creq_add_gid_resp {
150462306a36Sopenharmony_ci	u8	type;
150562306a36Sopenharmony_ci	#define CREQ_ADD_GID_RESP_TYPE_MASK    0x3fUL
150662306a36Sopenharmony_ci	#define CREQ_ADD_GID_RESP_TYPE_SFT     0
150762306a36Sopenharmony_ci	#define CREQ_ADD_GID_RESP_TYPE_QP_EVENT  0x38UL
150862306a36Sopenharmony_ci	#define CREQ_ADD_GID_RESP_TYPE_LAST     CREQ_ADD_GID_RESP_TYPE_QP_EVENT
150962306a36Sopenharmony_ci	u8	status;
151062306a36Sopenharmony_ci	__le16	cookie;
151162306a36Sopenharmony_ci	__le32	xid;
151262306a36Sopenharmony_ci	u8	v;
151362306a36Sopenharmony_ci	#define CREQ_ADD_GID_RESP_V     0x1UL
151462306a36Sopenharmony_ci	u8	event;
151562306a36Sopenharmony_ci	#define CREQ_ADD_GID_RESP_EVENT_ADD_GID 0x11UL
151662306a36Sopenharmony_ci	#define CREQ_ADD_GID_RESP_EVENT_LAST   CREQ_ADD_GID_RESP_EVENT_ADD_GID
151762306a36Sopenharmony_ci	u8	reserved48[6];
151862306a36Sopenharmony_ci};
151962306a36Sopenharmony_ci
152062306a36Sopenharmony_ci/* cmdq_delete_gid (size:192b/24B) */
152162306a36Sopenharmony_cistruct cmdq_delete_gid {
152262306a36Sopenharmony_ci	u8	opcode;
152362306a36Sopenharmony_ci	#define CMDQ_DELETE_GID_OPCODE_DELETE_GID 0x12UL
152462306a36Sopenharmony_ci	#define CMDQ_DELETE_GID_OPCODE_LAST      CMDQ_DELETE_GID_OPCODE_DELETE_GID
152562306a36Sopenharmony_ci	u8	cmd_size;
152662306a36Sopenharmony_ci	__le16	flags;
152762306a36Sopenharmony_ci	__le16	cookie;
152862306a36Sopenharmony_ci	u8	resp_size;
152962306a36Sopenharmony_ci	u8	reserved8;
153062306a36Sopenharmony_ci	__le64	resp_addr;
153162306a36Sopenharmony_ci	__le16	gid_index;
153262306a36Sopenharmony_ci	u8	unused_0[6];
153362306a36Sopenharmony_ci};
153462306a36Sopenharmony_ci
153562306a36Sopenharmony_ci/* creq_delete_gid_resp (size:128b/16B) */
153662306a36Sopenharmony_cistruct creq_delete_gid_resp {
153762306a36Sopenharmony_ci	u8	type;
153862306a36Sopenharmony_ci	#define CREQ_DELETE_GID_RESP_TYPE_MASK    0x3fUL
153962306a36Sopenharmony_ci	#define CREQ_DELETE_GID_RESP_TYPE_SFT     0
154062306a36Sopenharmony_ci	#define CREQ_DELETE_GID_RESP_TYPE_QP_EVENT  0x38UL
154162306a36Sopenharmony_ci	#define CREQ_DELETE_GID_RESP_TYPE_LAST     CREQ_DELETE_GID_RESP_TYPE_QP_EVENT
154262306a36Sopenharmony_ci	u8	status;
154362306a36Sopenharmony_ci	__le16	cookie;
154462306a36Sopenharmony_ci	__le32	xid;
154562306a36Sopenharmony_ci	u8	v;
154662306a36Sopenharmony_ci	#define CREQ_DELETE_GID_RESP_V     0x1UL
154762306a36Sopenharmony_ci	u8	event;
154862306a36Sopenharmony_ci	#define CREQ_DELETE_GID_RESP_EVENT_DELETE_GID 0x12UL
154962306a36Sopenharmony_ci	#define CREQ_DELETE_GID_RESP_EVENT_LAST      CREQ_DELETE_GID_RESP_EVENT_DELETE_GID
155062306a36Sopenharmony_ci	u8	reserved48[6];
155162306a36Sopenharmony_ci};
155262306a36Sopenharmony_ci
155362306a36Sopenharmony_ci/* cmdq_modify_gid (size:384b/48B) */
155462306a36Sopenharmony_cistruct cmdq_modify_gid {
155562306a36Sopenharmony_ci	u8	opcode;
155662306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_OPCODE_MODIFY_GID 0x17UL
155762306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_OPCODE_LAST      CMDQ_MODIFY_GID_OPCODE_MODIFY_GID
155862306a36Sopenharmony_ci	u8	cmd_size;
155962306a36Sopenharmony_ci	__le16	flags;
156062306a36Sopenharmony_ci	__le16	cookie;
156162306a36Sopenharmony_ci	u8	resp_size;
156262306a36Sopenharmony_ci	u8	reserved8;
156362306a36Sopenharmony_ci	__le64	resp_addr;
156462306a36Sopenharmony_ci	__be32	gid[4];
156562306a36Sopenharmony_ci	__be16	src_mac[3];
156662306a36Sopenharmony_ci	__le16	vlan;
156762306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_VLAN_ID_MASK  0xfffUL
156862306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_VLAN_ID_SFT   0
156962306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_MASK     0x7000UL
157062306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_SFT      12
157162306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_88A8  (0x0UL << 12)
157262306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_8100  (0x1UL << 12)
157362306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_9100  (0x2UL << 12)
157462306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_9200  (0x3UL << 12)
157562306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_9300  (0x4UL << 12)
157662306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG1  (0x5UL << 12)
157762306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG2  (0x6UL << 12)
157862306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG3  (0x7UL << 12)
157962306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_TPID_LAST      CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG3
158062306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_VLAN_VLAN_EN       0x8000UL
158162306a36Sopenharmony_ci	__le16	ipid;
158262306a36Sopenharmony_ci	__le16	gid_index;
158362306a36Sopenharmony_ci	__le16	stats_ctx;
158462306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_STATS_CTX_STATS_CTX_ID_MASK   0x7fffUL
158562306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_STATS_CTX_STATS_CTX_ID_SFT    0
158662306a36Sopenharmony_ci	#define CMDQ_MODIFY_GID_STATS_CTX_STATS_CTX_VALID     0x8000UL
158762306a36Sopenharmony_ci	__le16	unused_0;
158862306a36Sopenharmony_ci};
158962306a36Sopenharmony_ci
159062306a36Sopenharmony_ci/* creq_modify_gid_resp (size:128b/16B) */
159162306a36Sopenharmony_cistruct creq_modify_gid_resp {
159262306a36Sopenharmony_ci	u8	type;
159362306a36Sopenharmony_ci	#define CREQ_MODIFY_GID_RESP_TYPE_MASK    0x3fUL
159462306a36Sopenharmony_ci	#define CREQ_MODIFY_GID_RESP_TYPE_SFT     0
159562306a36Sopenharmony_ci	#define CREQ_MODIFY_GID_RESP_TYPE_QP_EVENT  0x38UL
159662306a36Sopenharmony_ci	#define CREQ_MODIFY_GID_RESP_TYPE_LAST     CREQ_MODIFY_GID_RESP_TYPE_QP_EVENT
159762306a36Sopenharmony_ci	u8	status;
159862306a36Sopenharmony_ci	__le16	cookie;
159962306a36Sopenharmony_ci	__le32	xid;
160062306a36Sopenharmony_ci	u8	v;
160162306a36Sopenharmony_ci	#define CREQ_MODIFY_GID_RESP_V     0x1UL
160262306a36Sopenharmony_ci	u8	event;
160362306a36Sopenharmony_ci	#define CREQ_MODIFY_GID_RESP_EVENT_ADD_GID 0x11UL
160462306a36Sopenharmony_ci	#define CREQ_MODIFY_GID_RESP_EVENT_LAST   CREQ_MODIFY_GID_RESP_EVENT_ADD_GID
160562306a36Sopenharmony_ci	u8	reserved48[6];
160662306a36Sopenharmony_ci};
160762306a36Sopenharmony_ci
160862306a36Sopenharmony_ci/* cmdq_query_gid (size:192b/24B) */
160962306a36Sopenharmony_cistruct cmdq_query_gid {
161062306a36Sopenharmony_ci	u8	opcode;
161162306a36Sopenharmony_ci	#define CMDQ_QUERY_GID_OPCODE_QUERY_GID 0x18UL
161262306a36Sopenharmony_ci	#define CMDQ_QUERY_GID_OPCODE_LAST     CMDQ_QUERY_GID_OPCODE_QUERY_GID
161362306a36Sopenharmony_ci	u8	cmd_size;
161462306a36Sopenharmony_ci	__le16	flags;
161562306a36Sopenharmony_ci	__le16	cookie;
161662306a36Sopenharmony_ci	u8	resp_size;
161762306a36Sopenharmony_ci	u8	reserved8;
161862306a36Sopenharmony_ci	__le64	resp_addr;
161962306a36Sopenharmony_ci	__le16	gid_index;
162062306a36Sopenharmony_ci	u8	unused16[6];
162162306a36Sopenharmony_ci};
162262306a36Sopenharmony_ci
162362306a36Sopenharmony_ci/* creq_query_gid_resp (size:128b/16B) */
162462306a36Sopenharmony_cistruct creq_query_gid_resp {
162562306a36Sopenharmony_ci	u8	type;
162662306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_TYPE_MASK    0x3fUL
162762306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_TYPE_SFT     0
162862306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_TYPE_QP_EVENT  0x38UL
162962306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_TYPE_LAST     CREQ_QUERY_GID_RESP_TYPE_QP_EVENT
163062306a36Sopenharmony_ci	u8	status;
163162306a36Sopenharmony_ci	__le16	cookie;
163262306a36Sopenharmony_ci	__le32	size;
163362306a36Sopenharmony_ci	u8	v;
163462306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_V     0x1UL
163562306a36Sopenharmony_ci	u8	event;
163662306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_EVENT_QUERY_GID 0x18UL
163762306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_EVENT_LAST     CREQ_QUERY_GID_RESP_EVENT_QUERY_GID
163862306a36Sopenharmony_ci	u8	reserved48[6];
163962306a36Sopenharmony_ci};
164062306a36Sopenharmony_ci
164162306a36Sopenharmony_ci/* creq_query_gid_resp_sb (size:320b/40B) */
164262306a36Sopenharmony_cistruct creq_query_gid_resp_sb {
164362306a36Sopenharmony_ci	u8	opcode;
164462306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_OPCODE_QUERY_GID 0x18UL
164562306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_OPCODE_LAST     CREQ_QUERY_GID_RESP_SB_OPCODE_QUERY_GID
164662306a36Sopenharmony_ci	u8	status;
164762306a36Sopenharmony_ci	__le16	cookie;
164862306a36Sopenharmony_ci	__le16	flags;
164962306a36Sopenharmony_ci	u8	resp_size;
165062306a36Sopenharmony_ci	u8	reserved8;
165162306a36Sopenharmony_ci	__le32	gid[4];
165262306a36Sopenharmony_ci	__le16	src_mac[3];
165362306a36Sopenharmony_ci	__le16	vlan;
165462306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_EN_TPID_VLAN_ID_MASK          0xffffUL
165562306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_EN_TPID_VLAN_ID_SFT           0
165662306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_ID_MASK                       0xfffUL
165762306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_ID_SFT                        0
165862306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_MASK                          0x7000UL
165962306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_SFT                           12
166062306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_88A8                       (0x0UL << 12)
166162306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_8100                       (0x1UL << 12)
166262306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_9100                       (0x2UL << 12)
166362306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_9200                       (0x3UL << 12)
166462306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_9300                       (0x4UL << 12)
166562306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG1                       (0x5UL << 12)
166662306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG2                       (0x6UL << 12)
166762306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG3                       (0x7UL << 12)
166862306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_LAST CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG3
166962306a36Sopenharmony_ci	#define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_EN                            0x8000UL
167062306a36Sopenharmony_ci	__le16	ipid;
167162306a36Sopenharmony_ci	__le16	gid_index;
167262306a36Sopenharmony_ci	__le32	unused_0;
167362306a36Sopenharmony_ci};
167462306a36Sopenharmony_ci
167562306a36Sopenharmony_ci/* cmdq_create_qp1 (size:640b/80B) */
167662306a36Sopenharmony_cistruct cmdq_create_qp1 {
167762306a36Sopenharmony_ci	u8	opcode;
167862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_OPCODE_CREATE_QP1 0x13UL
167962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_OPCODE_LAST      CMDQ_CREATE_QP1_OPCODE_CREATE_QP1
168062306a36Sopenharmony_ci	u8	cmd_size;
168162306a36Sopenharmony_ci	__le16	flags;
168262306a36Sopenharmony_ci	__le16	cookie;
168362306a36Sopenharmony_ci	u8	resp_size;
168462306a36Sopenharmony_ci	u8	reserved8;
168562306a36Sopenharmony_ci	__le64	resp_addr;
168662306a36Sopenharmony_ci	__le64	qp_handle;
168762306a36Sopenharmony_ci	__le32	qp_flags;
168862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_QP_FLAGS_SRQ_USED             0x1UL
168962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_QP_FLAGS_FORCE_COMPLETION     0x2UL
169062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_QP_FLAGS_RESERVED_LKEY_ENABLE 0x4UL
169162306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_QP_FLAGS_LAST     CMDQ_CREATE_QP1_QP_FLAGS_RESERVED_LKEY_ENABLE
169262306a36Sopenharmony_ci	u8	type;
169362306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_TYPE_GSI 0x1UL
169462306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_TYPE_LAST CMDQ_CREATE_QP1_TYPE_GSI
169562306a36Sopenharmony_ci	u8	sq_pg_size_sq_lvl;
169662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_LVL_MASK      0xfUL
169762306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_LVL_SFT       0
169862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_LVL_LVL_0       0x0UL
169962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_LVL_LVL_1       0x1UL
170062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_LVL_LVL_2       0x2UL
170162306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_LVL_LAST       CMDQ_CREATE_QP1_SQ_LVL_LVL_2
170262306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_MASK  0xf0UL
170362306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_SFT   4
170462306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_4K   (0x0UL << 4)
170562306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_8K   (0x1UL << 4)
170662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_64K  (0x2UL << 4)
170762306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_2M   (0x3UL << 4)
170862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_8M   (0x4UL << 4)
170962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_1G   (0x5UL << 4)
171062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_PG_SIZE_LAST   CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_1G
171162306a36Sopenharmony_ci	u8	rq_pg_size_rq_lvl;
171262306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_LVL_MASK      0xfUL
171362306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_LVL_SFT       0
171462306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_LVL_LVL_0       0x0UL
171562306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_LVL_LVL_1       0x1UL
171662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_LVL_LVL_2       0x2UL
171762306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_LVL_LAST       CMDQ_CREATE_QP1_RQ_LVL_LVL_2
171862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_MASK  0xf0UL
171962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_SFT   4
172062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_4K   (0x0UL << 4)
172162306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_8K   (0x1UL << 4)
172262306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_64K  (0x2UL << 4)
172362306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_2M   (0x3UL << 4)
172462306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_8M   (0x4UL << 4)
172562306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_1G   (0x5UL << 4)
172662306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_PG_SIZE_LAST   CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_1G
172762306a36Sopenharmony_ci	u8	unused_0;
172862306a36Sopenharmony_ci	__le32	dpi;
172962306a36Sopenharmony_ci	__le32	sq_size;
173062306a36Sopenharmony_ci	__le32	rq_size;
173162306a36Sopenharmony_ci	__le16	sq_fwo_sq_sge;
173262306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_SGE_MASK 0xfUL
173362306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_SGE_SFT 0
173462306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_FWO_MASK 0xfff0UL
173562306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_SQ_FWO_SFT 4
173662306a36Sopenharmony_ci	__le16	rq_fwo_rq_sge;
173762306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_SGE_MASK 0xfUL
173862306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_SGE_SFT 0
173962306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_FWO_MASK 0xfff0UL
174062306a36Sopenharmony_ci	#define CMDQ_CREATE_QP1_RQ_FWO_SFT 4
174162306a36Sopenharmony_ci	__le32	scq_cid;
174262306a36Sopenharmony_ci	__le32	rcq_cid;
174362306a36Sopenharmony_ci	__le32	srq_cid;
174462306a36Sopenharmony_ci	__le32	pd_id;
174562306a36Sopenharmony_ci	__le64	sq_pbl;
174662306a36Sopenharmony_ci	__le64	rq_pbl;
174762306a36Sopenharmony_ci};
174862306a36Sopenharmony_ci
174962306a36Sopenharmony_ci/* creq_create_qp1_resp (size:128b/16B) */
175062306a36Sopenharmony_cistruct creq_create_qp1_resp {
175162306a36Sopenharmony_ci	u8	type;
175262306a36Sopenharmony_ci	#define CREQ_CREATE_QP1_RESP_TYPE_MASK    0x3fUL
175362306a36Sopenharmony_ci	#define CREQ_CREATE_QP1_RESP_TYPE_SFT     0
175462306a36Sopenharmony_ci	#define CREQ_CREATE_QP1_RESP_TYPE_QP_EVENT  0x38UL
175562306a36Sopenharmony_ci	#define CREQ_CREATE_QP1_RESP_TYPE_LAST     CREQ_CREATE_QP1_RESP_TYPE_QP_EVENT
175662306a36Sopenharmony_ci	u8	status;
175762306a36Sopenharmony_ci	__le16	cookie;
175862306a36Sopenharmony_ci	__le32	xid;
175962306a36Sopenharmony_ci	u8	v;
176062306a36Sopenharmony_ci	#define CREQ_CREATE_QP1_RESP_V     0x1UL
176162306a36Sopenharmony_ci	u8	event;
176262306a36Sopenharmony_ci	#define CREQ_CREATE_QP1_RESP_EVENT_CREATE_QP1 0x13UL
176362306a36Sopenharmony_ci	#define CREQ_CREATE_QP1_RESP_EVENT_LAST      CREQ_CREATE_QP1_RESP_EVENT_CREATE_QP1
176462306a36Sopenharmony_ci	u8	reserved48[6];
176562306a36Sopenharmony_ci};
176662306a36Sopenharmony_ci
176762306a36Sopenharmony_ci/* cmdq_destroy_qp1 (size:192b/24B) */
176862306a36Sopenharmony_cistruct cmdq_destroy_qp1 {
176962306a36Sopenharmony_ci	u8	opcode;
177062306a36Sopenharmony_ci	#define CMDQ_DESTROY_QP1_OPCODE_DESTROY_QP1 0x14UL
177162306a36Sopenharmony_ci	#define CMDQ_DESTROY_QP1_OPCODE_LAST       CMDQ_DESTROY_QP1_OPCODE_DESTROY_QP1
177262306a36Sopenharmony_ci	u8	cmd_size;
177362306a36Sopenharmony_ci	__le16	flags;
177462306a36Sopenharmony_ci	__le16	cookie;
177562306a36Sopenharmony_ci	u8	resp_size;
177662306a36Sopenharmony_ci	u8	reserved8;
177762306a36Sopenharmony_ci	__le64	resp_addr;
177862306a36Sopenharmony_ci	__le32	qp1_cid;
177962306a36Sopenharmony_ci	__le32	unused_0;
178062306a36Sopenharmony_ci};
178162306a36Sopenharmony_ci
178262306a36Sopenharmony_ci/* creq_destroy_qp1_resp (size:128b/16B) */
178362306a36Sopenharmony_cistruct creq_destroy_qp1_resp {
178462306a36Sopenharmony_ci	u8	type;
178562306a36Sopenharmony_ci	#define CREQ_DESTROY_QP1_RESP_TYPE_MASK    0x3fUL
178662306a36Sopenharmony_ci	#define CREQ_DESTROY_QP1_RESP_TYPE_SFT     0
178762306a36Sopenharmony_ci	#define CREQ_DESTROY_QP1_RESP_TYPE_QP_EVENT  0x38UL
178862306a36Sopenharmony_ci	#define CREQ_DESTROY_QP1_RESP_TYPE_LAST     CREQ_DESTROY_QP1_RESP_TYPE_QP_EVENT
178962306a36Sopenharmony_ci	u8	status;
179062306a36Sopenharmony_ci	__le16	cookie;
179162306a36Sopenharmony_ci	__le32	xid;
179262306a36Sopenharmony_ci	u8	v;
179362306a36Sopenharmony_ci	#define CREQ_DESTROY_QP1_RESP_V     0x1UL
179462306a36Sopenharmony_ci	u8	event;
179562306a36Sopenharmony_ci	#define CREQ_DESTROY_QP1_RESP_EVENT_DESTROY_QP1 0x14UL
179662306a36Sopenharmony_ci	#define CREQ_DESTROY_QP1_RESP_EVENT_LAST       CREQ_DESTROY_QP1_RESP_EVENT_DESTROY_QP1
179762306a36Sopenharmony_ci	u8	reserved48[6];
179862306a36Sopenharmony_ci};
179962306a36Sopenharmony_ci
180062306a36Sopenharmony_ci/* cmdq_create_ah (size:512b/64B) */
180162306a36Sopenharmony_cistruct cmdq_create_ah {
180262306a36Sopenharmony_ci	u8	opcode;
180362306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_OPCODE_CREATE_AH 0x15UL
180462306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_OPCODE_LAST     CMDQ_CREATE_AH_OPCODE_CREATE_AH
180562306a36Sopenharmony_ci	u8	cmd_size;
180662306a36Sopenharmony_ci	__le16	flags;
180762306a36Sopenharmony_ci	__le16	cookie;
180862306a36Sopenharmony_ci	u8	resp_size;
180962306a36Sopenharmony_ci	u8	reserved8;
181062306a36Sopenharmony_ci	__le64	resp_addr;
181162306a36Sopenharmony_ci	__le64	ah_handle;
181262306a36Sopenharmony_ci	__le32	dgid[4];
181362306a36Sopenharmony_ci	u8	type;
181462306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_TYPE_V1     0x0UL
181562306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_TYPE_V2IPV4 0x2UL
181662306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_TYPE_V2IPV6 0x3UL
181762306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_TYPE_LAST  CMDQ_CREATE_AH_TYPE_V2IPV6
181862306a36Sopenharmony_ci	u8	hop_limit;
181962306a36Sopenharmony_ci	__le16	sgid_index;
182062306a36Sopenharmony_ci	__le32	dest_vlan_id_flow_label;
182162306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_FLOW_LABEL_MASK  0xfffffUL
182262306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_FLOW_LABEL_SFT   0
182362306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_DEST_VLAN_ID_MASK 0xfff00000UL
182462306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_DEST_VLAN_ID_SFT 20
182562306a36Sopenharmony_ci	__le32	pd_id;
182662306a36Sopenharmony_ci	__le32	unused_0;
182762306a36Sopenharmony_ci	__le16	dest_mac[3];
182862306a36Sopenharmony_ci	u8	traffic_class;
182962306a36Sopenharmony_ci	u8	enable_cc;
183062306a36Sopenharmony_ci	#define CMDQ_CREATE_AH_ENABLE_CC     0x1UL
183162306a36Sopenharmony_ci};
183262306a36Sopenharmony_ci
183362306a36Sopenharmony_ci/* creq_create_ah_resp (size:128b/16B) */
183462306a36Sopenharmony_cistruct creq_create_ah_resp {
183562306a36Sopenharmony_ci	u8	type;
183662306a36Sopenharmony_ci	#define CREQ_CREATE_AH_RESP_TYPE_MASK    0x3fUL
183762306a36Sopenharmony_ci	#define CREQ_CREATE_AH_RESP_TYPE_SFT     0
183862306a36Sopenharmony_ci	#define CREQ_CREATE_AH_RESP_TYPE_QP_EVENT  0x38UL
183962306a36Sopenharmony_ci	#define CREQ_CREATE_AH_RESP_TYPE_LAST     CREQ_CREATE_AH_RESP_TYPE_QP_EVENT
184062306a36Sopenharmony_ci	u8	status;
184162306a36Sopenharmony_ci	__le16	cookie;
184262306a36Sopenharmony_ci	__le32	xid;
184362306a36Sopenharmony_ci	u8	v;
184462306a36Sopenharmony_ci	#define CREQ_CREATE_AH_RESP_V     0x1UL
184562306a36Sopenharmony_ci	u8	event;
184662306a36Sopenharmony_ci	#define CREQ_CREATE_AH_RESP_EVENT_CREATE_AH 0x15UL
184762306a36Sopenharmony_ci	#define CREQ_CREATE_AH_RESP_EVENT_LAST     CREQ_CREATE_AH_RESP_EVENT_CREATE_AH
184862306a36Sopenharmony_ci	u8	reserved48[6];
184962306a36Sopenharmony_ci};
185062306a36Sopenharmony_ci
185162306a36Sopenharmony_ci/* cmdq_destroy_ah (size:192b/24B) */
185262306a36Sopenharmony_cistruct cmdq_destroy_ah {
185362306a36Sopenharmony_ci	u8	opcode;
185462306a36Sopenharmony_ci	#define CMDQ_DESTROY_AH_OPCODE_DESTROY_AH 0x16UL
185562306a36Sopenharmony_ci	#define CMDQ_DESTROY_AH_OPCODE_LAST      CMDQ_DESTROY_AH_OPCODE_DESTROY_AH
185662306a36Sopenharmony_ci	u8	cmd_size;
185762306a36Sopenharmony_ci	__le16	flags;
185862306a36Sopenharmony_ci	__le16	cookie;
185962306a36Sopenharmony_ci	u8	resp_size;
186062306a36Sopenharmony_ci	u8	reserved8;
186162306a36Sopenharmony_ci	__le64	resp_addr;
186262306a36Sopenharmony_ci	__le32	ah_cid;
186362306a36Sopenharmony_ci	__le32	unused_0;
186462306a36Sopenharmony_ci};
186562306a36Sopenharmony_ci
186662306a36Sopenharmony_ci/* creq_destroy_ah_resp (size:128b/16B) */
186762306a36Sopenharmony_cistruct creq_destroy_ah_resp {
186862306a36Sopenharmony_ci	u8	type;
186962306a36Sopenharmony_ci	#define CREQ_DESTROY_AH_RESP_TYPE_MASK    0x3fUL
187062306a36Sopenharmony_ci	#define CREQ_DESTROY_AH_RESP_TYPE_SFT     0
187162306a36Sopenharmony_ci	#define CREQ_DESTROY_AH_RESP_TYPE_QP_EVENT  0x38UL
187262306a36Sopenharmony_ci	#define CREQ_DESTROY_AH_RESP_TYPE_LAST     CREQ_DESTROY_AH_RESP_TYPE_QP_EVENT
187362306a36Sopenharmony_ci	u8	status;
187462306a36Sopenharmony_ci	__le16	cookie;
187562306a36Sopenharmony_ci	__le32	xid;
187662306a36Sopenharmony_ci	u8	v;
187762306a36Sopenharmony_ci	#define CREQ_DESTROY_AH_RESP_V     0x1UL
187862306a36Sopenharmony_ci	u8	event;
187962306a36Sopenharmony_ci	#define CREQ_DESTROY_AH_RESP_EVENT_DESTROY_AH 0x16UL
188062306a36Sopenharmony_ci	#define CREQ_DESTROY_AH_RESP_EVENT_LAST      CREQ_DESTROY_AH_RESP_EVENT_DESTROY_AH
188162306a36Sopenharmony_ci	u8	reserved48[6];
188262306a36Sopenharmony_ci};
188362306a36Sopenharmony_ci
188462306a36Sopenharmony_ci/* cmdq_query_roce_stats (size:192b/24B) */
188562306a36Sopenharmony_cistruct cmdq_query_roce_stats {
188662306a36Sopenharmony_ci	u8	opcode;
188762306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_OPCODE_QUERY_ROCE_STATS 0x8eUL
188862306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_OPCODE_LAST    CMDQ_QUERY_ROCE_STATS_OPCODE_QUERY_ROCE_STATS
188962306a36Sopenharmony_ci	u8	cmd_size;
189062306a36Sopenharmony_ci	__le16	flags;
189162306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_FLAGS_COLLECTION_ID     0x1UL
189262306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_FLAGS_FUNCTION_ID       0x2UL
189362306a36Sopenharmony_ci	__le16	cookie;
189462306a36Sopenharmony_ci	u8	resp_size;
189562306a36Sopenharmony_ci	u8	collection_id;
189662306a36Sopenharmony_ci	__le64	resp_addr;
189762306a36Sopenharmony_ci	__le32	function_id;
189862306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_PF_NUM_MASK  0xffUL
189962306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_PF_NUM_SFT   0
190062306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_VF_NUM_MASK  0xffff00UL
190162306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_VF_NUM_SFT   8
190262306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_VF_VALID     0x1000000UL
190362306a36Sopenharmony_ci	__le32	reserved32;
190462306a36Sopenharmony_ci};
190562306a36Sopenharmony_ci
190662306a36Sopenharmony_ci/* creq_query_roce_stats_resp (size:128b/16B) */
190762306a36Sopenharmony_cistruct creq_query_roce_stats_resp {
190862306a36Sopenharmony_ci	u8	type;
190962306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_RESP_TYPE_MASK    0x3fUL
191062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_RESP_TYPE_SFT     0
191162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_RESP_TYPE_QP_EVENT  0x38UL
191262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_RESP_TYPE_LAST     CREQ_QUERY_ROCE_STATS_RESP_TYPE_QP_EVENT
191362306a36Sopenharmony_ci	u8	status;
191462306a36Sopenharmony_ci	__le16	cookie;
191562306a36Sopenharmony_ci	__le32	size;
191662306a36Sopenharmony_ci	u8	v;
191762306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_RESP_V     0x1UL
191862306a36Sopenharmony_ci	u8	event;
191962306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_RESP_EVENT_QUERY_ROCE_STATS 0x8eUL
192062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_RESP_EVENT_LAST \
192162306a36Sopenharmony_ci		CREQ_QUERY_ROCE_STATS_RESP_EVENT_QUERY_ROCE_STATS
192262306a36Sopenharmony_ci	u8	reserved48[6];
192362306a36Sopenharmony_ci};
192462306a36Sopenharmony_ci
192562306a36Sopenharmony_ci/* creq_query_roce_stats_resp_sb (size:2944b/368B) */
192662306a36Sopenharmony_cistruct creq_query_roce_stats_resp_sb {
192762306a36Sopenharmony_ci	u8	opcode;
192862306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_RESP_SB_OPCODE_QUERY_ROCE_STATS 0x8eUL
192962306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_RESP_SB_OPCODE_LAST \
193062306a36Sopenharmony_ci		CREQ_QUERY_ROCE_STATS_RESP_SB_OPCODE_QUERY_ROCE_STATS
193162306a36Sopenharmony_ci	u8	status;
193262306a36Sopenharmony_ci	__le16	cookie;
193362306a36Sopenharmony_ci	__le16	flags;
193462306a36Sopenharmony_ci	u8	resp_size;
193562306a36Sopenharmony_ci	u8	rsvd;
193662306a36Sopenharmony_ci	__le32	num_counters;
193762306a36Sopenharmony_ci	__le32	rsvd1;
193862306a36Sopenharmony_ci	__le64	to_retransmits;
193962306a36Sopenharmony_ci	__le64	seq_err_naks_rcvd;
194062306a36Sopenharmony_ci	__le64	max_retry_exceeded;
194162306a36Sopenharmony_ci	__le64	rnr_naks_rcvd;
194262306a36Sopenharmony_ci	__le64	missing_resp;
194362306a36Sopenharmony_ci	__le64	unrecoverable_err;
194462306a36Sopenharmony_ci	__le64	bad_resp_err;
194562306a36Sopenharmony_ci	__le64	local_qp_op_err;
194662306a36Sopenharmony_ci	__le64	local_protection_err;
194762306a36Sopenharmony_ci	__le64	mem_mgmt_op_err;
194862306a36Sopenharmony_ci	__le64	remote_invalid_req_err;
194962306a36Sopenharmony_ci	__le64	remote_access_err;
195062306a36Sopenharmony_ci	__le64	remote_op_err;
195162306a36Sopenharmony_ci	__le64	dup_req;
195262306a36Sopenharmony_ci	__le64	res_exceed_max;
195362306a36Sopenharmony_ci	__le64	res_length_mismatch;
195462306a36Sopenharmony_ci	__le64	res_exceeds_wqe;
195562306a36Sopenharmony_ci	__le64	res_opcode_err;
195662306a36Sopenharmony_ci	__le64	res_rx_invalid_rkey;
195762306a36Sopenharmony_ci	__le64	res_rx_domain_err;
195862306a36Sopenharmony_ci	__le64	res_rx_no_perm;
195962306a36Sopenharmony_ci	__le64	res_rx_range_err;
196062306a36Sopenharmony_ci	__le64	res_tx_invalid_rkey;
196162306a36Sopenharmony_ci	__le64	res_tx_domain_err;
196262306a36Sopenharmony_ci	__le64	res_tx_no_perm;
196362306a36Sopenharmony_ci	__le64	res_tx_range_err;
196462306a36Sopenharmony_ci	__le64	res_irrq_oflow;
196562306a36Sopenharmony_ci	__le64	res_unsup_opcode;
196662306a36Sopenharmony_ci	__le64	res_unaligned_atomic;
196762306a36Sopenharmony_ci	__le64	res_rem_inv_err;
196862306a36Sopenharmony_ci	__le64	res_mem_error;
196962306a36Sopenharmony_ci	__le64	res_srq_err;
197062306a36Sopenharmony_ci	__le64	res_cmp_err;
197162306a36Sopenharmony_ci	__le64	res_invalid_dup_rkey;
197262306a36Sopenharmony_ci	__le64	res_wqe_format_err;
197362306a36Sopenharmony_ci	__le64	res_cq_load_err;
197462306a36Sopenharmony_ci	__le64	res_srq_load_err;
197562306a36Sopenharmony_ci	__le64	res_tx_pci_err;
197662306a36Sopenharmony_ci	__le64	res_rx_pci_err;
197762306a36Sopenharmony_ci	__le64	res_oos_drop_count;
197862306a36Sopenharmony_ci	__le64	active_qp_count_p0;
197962306a36Sopenharmony_ci	__le64	active_qp_count_p1;
198062306a36Sopenharmony_ci	__le64	active_qp_count_p2;
198162306a36Sopenharmony_ci	__le64	active_qp_count_p3;
198262306a36Sopenharmony_ci};
198362306a36Sopenharmony_ci
198462306a36Sopenharmony_ci/* cmdq_query_roce_stats_ext (size:192b/24B) */
198562306a36Sopenharmony_cistruct cmdq_query_roce_stats_ext {
198662306a36Sopenharmony_ci	u8	opcode;
198762306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_EXT_OPCODE_QUERY_ROCE_STATS 0x92UL
198862306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_EXT_OPCODE_LAST \
198962306a36Sopenharmony_ci			CMDQ_QUERY_ROCE_STATS_EXT_OPCODE_QUERY_ROCE_STATS
199062306a36Sopenharmony_ci	u8	cmd_size;
199162306a36Sopenharmony_ci	__le16	flags;
199262306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_EXT_FLAGS_COLLECTION_ID     0x1UL
199362306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_EXT_FLAGS_FUNCTION_ID       0x2UL
199462306a36Sopenharmony_ci	__le16	cookie;
199562306a36Sopenharmony_ci	u8	resp_size;
199662306a36Sopenharmony_ci	u8	collection_id;
199762306a36Sopenharmony_ci	__le64	resp_addr;
199862306a36Sopenharmony_ci	__le32	function_id;
199962306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_EXT_PF_NUM_MASK  0xffUL
200062306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_EXT_PF_NUM_SFT   0
200162306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_EXT_VF_NUM_MASK  0xffff00UL
200262306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_EXT_VF_NUM_SFT   8
200362306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_STATS_EXT_VF_VALID     0x1000000UL
200462306a36Sopenharmony_ci	__le32	reserved32;
200562306a36Sopenharmony_ci};
200662306a36Sopenharmony_ci
200762306a36Sopenharmony_ci/* creq_query_roce_stats_ext_resp (size:128b/16B) */
200862306a36Sopenharmony_cistruct creq_query_roce_stats_ext_resp {
200962306a36Sopenharmony_ci	u8	type;
201062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_TYPE_MASK    0x3fUL
201162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_TYPE_SFT     0
201262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_TYPE_QP_EVENT  0x38UL
201362306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_TYPE_LAST \
201462306a36Sopenharmony_ci		CREQ_QUERY_ROCE_STATS_EXT_RESP_TYPE_QP_EVENT
201562306a36Sopenharmony_ci	u8	status;
201662306a36Sopenharmony_ci	__le16	cookie;
201762306a36Sopenharmony_ci	__le32	size;
201862306a36Sopenharmony_ci	u8	v;
201962306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_V     0x1UL
202062306a36Sopenharmony_ci	u8	event;
202162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_EVENT_QUERY_ROCE_STATS_EXT 0x92UL
202262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_EVENT_LAST \
202362306a36Sopenharmony_ci		CREQ_QUERY_ROCE_STATS_EXT_RESP_EVENT_QUERY_ROCE_STATS_EXT
202462306a36Sopenharmony_ci	u8	reserved48[6];
202562306a36Sopenharmony_ci};
202662306a36Sopenharmony_ci
202762306a36Sopenharmony_ci/* creq_query_roce_stats_ext_resp_sb (size:1856b/232B) */
202862306a36Sopenharmony_cistruct creq_query_roce_stats_ext_resp_sb {
202962306a36Sopenharmony_ci	u8	opcode;
203062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_SB_OPCODE_QUERY_ROCE_STATS_EXT 0x92UL
203162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_STATS_EXT_RESP_SB_OPCODE_LAST \
203262306a36Sopenharmony_ci		CREQ_QUERY_ROCE_STATS_EXT_RESP_SB_OPCODE_QUERY_ROCE_STATS_EXT
203362306a36Sopenharmony_ci	u8	status;
203462306a36Sopenharmony_ci	__le16	cookie;
203562306a36Sopenharmony_ci	__le16	flags;
203662306a36Sopenharmony_ci	u8	resp_size;
203762306a36Sopenharmony_ci	u8	rsvd;
203862306a36Sopenharmony_ci	__le64	tx_atomic_req_pkts;
203962306a36Sopenharmony_ci	__le64	tx_read_req_pkts;
204062306a36Sopenharmony_ci	__le64	tx_read_res_pkts;
204162306a36Sopenharmony_ci	__le64	tx_write_req_pkts;
204262306a36Sopenharmony_ci	__le64	tx_send_req_pkts;
204362306a36Sopenharmony_ci	__le64	tx_roce_pkts;
204462306a36Sopenharmony_ci	__le64	tx_roce_bytes;
204562306a36Sopenharmony_ci	__le64	rx_atomic_req_pkts;
204662306a36Sopenharmony_ci	__le64	rx_read_req_pkts;
204762306a36Sopenharmony_ci	__le64	rx_read_res_pkts;
204862306a36Sopenharmony_ci	__le64	rx_write_req_pkts;
204962306a36Sopenharmony_ci	__le64	rx_send_req_pkts;
205062306a36Sopenharmony_ci	__le64	rx_roce_pkts;
205162306a36Sopenharmony_ci	__le64	rx_roce_bytes;
205262306a36Sopenharmony_ci	__le64	rx_roce_good_pkts;
205362306a36Sopenharmony_ci	__le64	rx_roce_good_bytes;
205462306a36Sopenharmony_ci	__le64	rx_out_of_buffer_pkts;
205562306a36Sopenharmony_ci	__le64	rx_out_of_sequence_pkts;
205662306a36Sopenharmony_ci	__le64	tx_cnp_pkts;
205762306a36Sopenharmony_ci	__le64	rx_cnp_pkts;
205862306a36Sopenharmony_ci	__le64	rx_ecn_marked_pkts;
205962306a36Sopenharmony_ci	__le64	tx_cnp_bytes;
206062306a36Sopenharmony_ci	__le64	rx_cnp_bytes;
206162306a36Sopenharmony_ci	__le64	seq_err_naks_rcvd;
206262306a36Sopenharmony_ci	__le64	rnr_naks_rcvd;
206362306a36Sopenharmony_ci	__le64	missing_resp;
206462306a36Sopenharmony_ci	__le64	to_retransmit;
206562306a36Sopenharmony_ci	__le64	dup_req;
206662306a36Sopenharmony_ci};
206762306a36Sopenharmony_ci
206862306a36Sopenharmony_ci/* cmdq_query_func (size:128b/16B) */
206962306a36Sopenharmony_cistruct cmdq_query_func {
207062306a36Sopenharmony_ci	u8	opcode;
207162306a36Sopenharmony_ci	#define CMDQ_QUERY_FUNC_OPCODE_QUERY_FUNC 0x83UL
207262306a36Sopenharmony_ci	#define CMDQ_QUERY_FUNC_OPCODE_LAST      CMDQ_QUERY_FUNC_OPCODE_QUERY_FUNC
207362306a36Sopenharmony_ci	u8	cmd_size;
207462306a36Sopenharmony_ci	__le16	flags;
207562306a36Sopenharmony_ci	__le16	cookie;
207662306a36Sopenharmony_ci	u8	resp_size;
207762306a36Sopenharmony_ci	u8	reserved8;
207862306a36Sopenharmony_ci	__le64	resp_addr;
207962306a36Sopenharmony_ci};
208062306a36Sopenharmony_ci
208162306a36Sopenharmony_ci/* creq_query_func_resp (size:128b/16B) */
208262306a36Sopenharmony_cistruct creq_query_func_resp {
208362306a36Sopenharmony_ci	u8	type;
208462306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_TYPE_MASK    0x3fUL
208562306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_TYPE_SFT     0
208662306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_TYPE_QP_EVENT  0x38UL
208762306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_TYPE_LAST     CREQ_QUERY_FUNC_RESP_TYPE_QP_EVENT
208862306a36Sopenharmony_ci	u8	status;
208962306a36Sopenharmony_ci	__le16	cookie;
209062306a36Sopenharmony_ci	__le32	size;
209162306a36Sopenharmony_ci	u8	v;
209262306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_V     0x1UL
209362306a36Sopenharmony_ci	u8	event;
209462306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_EVENT_QUERY_FUNC 0x83UL
209562306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_EVENT_LAST      CREQ_QUERY_FUNC_RESP_EVENT_QUERY_FUNC
209662306a36Sopenharmony_ci	u8	reserved48[6];
209762306a36Sopenharmony_ci};
209862306a36Sopenharmony_ci
209962306a36Sopenharmony_ci/* creq_query_func_resp_sb (size:1088b/136B) */
210062306a36Sopenharmony_cistruct creq_query_func_resp_sb {
210162306a36Sopenharmony_ci	u8	opcode;
210262306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_OPCODE_QUERY_FUNC 0x83UL
210362306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_OPCODE_LAST      CREQ_QUERY_FUNC_RESP_SB_OPCODE_QUERY_FUNC
210462306a36Sopenharmony_ci	u8	status;
210562306a36Sopenharmony_ci	__le16	cookie;
210662306a36Sopenharmony_ci	__le16	flags;
210762306a36Sopenharmony_ci	u8	resp_size;
210862306a36Sopenharmony_ci	u8	reserved8;
210962306a36Sopenharmony_ci	__le64	max_mr_size;
211062306a36Sopenharmony_ci	__le32	max_qp;
211162306a36Sopenharmony_ci	__le16	max_qp_wr;
211262306a36Sopenharmony_ci	__le16	dev_cap_flags;
211362306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_RESIZE_QP                      0x1UL
211462306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_MASK             0xeUL
211562306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_SFT              1
211662306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_CC_GEN0            (0x0UL << 1)
211762306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_CC_GEN1            (0x1UL << 1)
211862306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_CC_GEN1_EXT        (0x2UL << 1)
211962306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_LAST \
212062306a36Sopenharmony_ci		CREQ_QUERY_FUNC_RESP_SB_CC_GENERATION_CC_GEN1_EXT
212162306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_EXT_STATS                      0x10UL
212262306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_MR_REGISTER_ALLOC              0x20UL
212362306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_OPTIMIZED_TRANSMIT_ENABLED     0x40UL
212462306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_CQE_V2                         0x80UL
212562306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_PINGPONG_PUSH_MODE             0x100UL
212662306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_HW_REQUESTER_RETX_ENABLED      0x200UL
212762306a36Sopenharmony_ci	#define CREQ_QUERY_FUNC_RESP_SB_HW_RESPONDER_RETX_ENABLED      0x400UL
212862306a36Sopenharmony_ci	__le32	max_cq;
212962306a36Sopenharmony_ci	__le32	max_cqe;
213062306a36Sopenharmony_ci	__le32	max_pd;
213162306a36Sopenharmony_ci	u8	max_sge;
213262306a36Sopenharmony_ci	u8	max_srq_sge;
213362306a36Sopenharmony_ci	u8	max_qp_rd_atom;
213462306a36Sopenharmony_ci	u8	max_qp_init_rd_atom;
213562306a36Sopenharmony_ci	__le32	max_mr;
213662306a36Sopenharmony_ci	__le32	max_mw;
213762306a36Sopenharmony_ci	__le32	max_raw_eth_qp;
213862306a36Sopenharmony_ci	__le32	max_ah;
213962306a36Sopenharmony_ci	__le32	max_fmr;
214062306a36Sopenharmony_ci	__le32	max_srq_wr;
214162306a36Sopenharmony_ci	__le32	max_pkeys;
214262306a36Sopenharmony_ci	__le32	max_inline_data;
214362306a36Sopenharmony_ci	u8	max_map_per_fmr;
214462306a36Sopenharmony_ci	u8	l2_db_space_size;
214562306a36Sopenharmony_ci	__le16	max_srq;
214662306a36Sopenharmony_ci	__le32	max_gid;
214762306a36Sopenharmony_ci	__le32	tqm_alloc_reqs[12];
214862306a36Sopenharmony_ci	__le32	max_dpi;
214962306a36Sopenharmony_ci	u8	max_sge_var_wqe;
215062306a36Sopenharmony_ci	u8	reserved_8;
215162306a36Sopenharmony_ci	__le16	max_inline_data_var_wqe;
215262306a36Sopenharmony_ci};
215362306a36Sopenharmony_ci
215462306a36Sopenharmony_ci/* cmdq_set_func_resources (size:448b/56B) */
215562306a36Sopenharmony_cistruct cmdq_set_func_resources {
215662306a36Sopenharmony_ci	u8	opcode;
215762306a36Sopenharmony_ci	#define CMDQ_SET_FUNC_RESOURCES_OPCODE_SET_FUNC_RESOURCES 0x84UL
215862306a36Sopenharmony_ci	#define CMDQ_SET_FUNC_RESOURCES_OPCODE_LAST\
215962306a36Sopenharmony_ci			CMDQ_SET_FUNC_RESOURCES_OPCODE_SET_FUNC_RESOURCES
216062306a36Sopenharmony_ci	u8	cmd_size;
216162306a36Sopenharmony_ci	__le16	flags;
216262306a36Sopenharmony_ci	#define CMDQ_SET_FUNC_RESOURCES_FLAGS_MRAV_RESERVATION_SPLIT     0x1UL
216362306a36Sopenharmony_ci	__le16	cookie;
216462306a36Sopenharmony_ci	u8	resp_size;
216562306a36Sopenharmony_ci	u8	reserved8;
216662306a36Sopenharmony_ci	__le64	resp_addr;
216762306a36Sopenharmony_ci	__le32	number_of_qp;
216862306a36Sopenharmony_ci	__le32	number_of_mrw;
216962306a36Sopenharmony_ci	__le32	number_of_srq;
217062306a36Sopenharmony_ci	__le32	number_of_cq;
217162306a36Sopenharmony_ci	__le32	max_qp_per_vf;
217262306a36Sopenharmony_ci	__le32	max_mrw_per_vf;
217362306a36Sopenharmony_ci	__le32	max_srq_per_vf;
217462306a36Sopenharmony_ci	__le32	max_cq_per_vf;
217562306a36Sopenharmony_ci	__le32	max_gid_per_vf;
217662306a36Sopenharmony_ci	__le32	stat_ctx_id;
217762306a36Sopenharmony_ci};
217862306a36Sopenharmony_ci
217962306a36Sopenharmony_ci/* creq_set_func_resources_resp (size:128b/16B) */
218062306a36Sopenharmony_cistruct creq_set_func_resources_resp {
218162306a36Sopenharmony_ci	u8	type;
218262306a36Sopenharmony_ci	#define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_MASK    0x3fUL
218362306a36Sopenharmony_ci	#define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_SFT     0
218462306a36Sopenharmony_ci	#define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_QP_EVENT  0x38UL
218562306a36Sopenharmony_ci	#define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_LAST CREQ_SET_FUNC_RESOURCES_RESP_TYPE_QP_EVENT
218662306a36Sopenharmony_ci	u8	status;
218762306a36Sopenharmony_ci	__le16	cookie;
218862306a36Sopenharmony_ci	__le32	reserved32;
218962306a36Sopenharmony_ci	u8	v;
219062306a36Sopenharmony_ci	#define CREQ_SET_FUNC_RESOURCES_RESP_V     0x1UL
219162306a36Sopenharmony_ci	u8	event;
219262306a36Sopenharmony_ci	#define CREQ_SET_FUNC_RESOURCES_RESP_EVENT_SET_FUNC_RESOURCES 0x84UL
219362306a36Sopenharmony_ci	#define CREQ_SET_FUNC_RESOURCES_RESP_EVENT_LAST \
219462306a36Sopenharmony_ci		CREQ_SET_FUNC_RESOURCES_RESP_EVENT_SET_FUNC_RESOURCES
219562306a36Sopenharmony_ci	u8	reserved48[6];
219662306a36Sopenharmony_ci};
219762306a36Sopenharmony_ci
219862306a36Sopenharmony_ci/* cmdq_map_tc_to_cos (size:192b/24B) */
219962306a36Sopenharmony_cistruct cmdq_map_tc_to_cos {
220062306a36Sopenharmony_ci	u8	opcode;
220162306a36Sopenharmony_ci	#define CMDQ_MAP_TC_TO_COS_OPCODE_MAP_TC_TO_COS 0x8aUL
220262306a36Sopenharmony_ci	#define CMDQ_MAP_TC_TO_COS_OPCODE_LAST         CMDQ_MAP_TC_TO_COS_OPCODE_MAP_TC_TO_COS
220362306a36Sopenharmony_ci	u8	cmd_size;
220462306a36Sopenharmony_ci	__le16	flags;
220562306a36Sopenharmony_ci	__le16	cookie;
220662306a36Sopenharmony_ci	u8	resp_size;
220762306a36Sopenharmony_ci	u8	reserved8;
220862306a36Sopenharmony_ci	__le64	resp_addr;
220962306a36Sopenharmony_ci	__le16	cos0;
221062306a36Sopenharmony_ci	#define CMDQ_MAP_TC_TO_COS_COS0_NO_CHANGE 0xffffUL
221162306a36Sopenharmony_ci	#define CMDQ_MAP_TC_TO_COS_COS0_LAST     CMDQ_MAP_TC_TO_COS_COS0_NO_CHANGE
221262306a36Sopenharmony_ci	__le16	cos1;
221362306a36Sopenharmony_ci	#define CMDQ_MAP_TC_TO_COS_COS1_DISABLE   0x8000UL
221462306a36Sopenharmony_ci	#define CMDQ_MAP_TC_TO_COS_COS1_NO_CHANGE 0xffffUL
221562306a36Sopenharmony_ci	#define CMDQ_MAP_TC_TO_COS_COS1_LAST     CMDQ_MAP_TC_TO_COS_COS1_NO_CHANGE
221662306a36Sopenharmony_ci	__le32	unused_0;
221762306a36Sopenharmony_ci};
221862306a36Sopenharmony_ci
221962306a36Sopenharmony_ci/* creq_map_tc_to_cos_resp (size:128b/16B) */
222062306a36Sopenharmony_cistruct creq_map_tc_to_cos_resp {
222162306a36Sopenharmony_ci	u8	type;
222262306a36Sopenharmony_ci	#define CREQ_MAP_TC_TO_COS_RESP_TYPE_MASK    0x3fUL
222362306a36Sopenharmony_ci	#define CREQ_MAP_TC_TO_COS_RESP_TYPE_SFT     0
222462306a36Sopenharmony_ci	#define CREQ_MAP_TC_TO_COS_RESP_TYPE_QP_EVENT  0x38UL
222562306a36Sopenharmony_ci	#define CREQ_MAP_TC_TO_COS_RESP_TYPE_LAST     CREQ_MAP_TC_TO_COS_RESP_TYPE_QP_EVENT
222662306a36Sopenharmony_ci	u8	status;
222762306a36Sopenharmony_ci	__le16	cookie;
222862306a36Sopenharmony_ci	__le32	reserved32;
222962306a36Sopenharmony_ci	u8	v;
223062306a36Sopenharmony_ci	#define CREQ_MAP_TC_TO_COS_RESP_V     0x1UL
223162306a36Sopenharmony_ci	u8	event;
223262306a36Sopenharmony_ci	#define CREQ_MAP_TC_TO_COS_RESP_EVENT_MAP_TC_TO_COS 0x8aUL
223362306a36Sopenharmony_ci	#define CREQ_MAP_TC_TO_COS_RESP_EVENT_LAST CREQ_MAP_TC_TO_COS_RESP_EVENT_MAP_TC_TO_COS
223462306a36Sopenharmony_ci	u8	reserved48[6];
223562306a36Sopenharmony_ci};
223662306a36Sopenharmony_ci
223762306a36Sopenharmony_ci/* cmdq_query_roce_cc (size:128b/16B) */
223862306a36Sopenharmony_cistruct cmdq_query_roce_cc {
223962306a36Sopenharmony_ci	u8	opcode;
224062306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_CC_OPCODE_QUERY_ROCE_CC 0x8dUL
224162306a36Sopenharmony_ci	#define CMDQ_QUERY_ROCE_CC_OPCODE_LAST CMDQ_QUERY_ROCE_CC_OPCODE_QUERY_ROCE_CC
224262306a36Sopenharmony_ci	u8	cmd_size;
224362306a36Sopenharmony_ci	__le16	flags;
224462306a36Sopenharmony_ci	__le16	cookie;
224562306a36Sopenharmony_ci	u8	resp_size;
224662306a36Sopenharmony_ci	u8	reserved8;
224762306a36Sopenharmony_ci	__le64	resp_addr;
224862306a36Sopenharmony_ci};
224962306a36Sopenharmony_ci
225062306a36Sopenharmony_ci/* creq_query_roce_cc_resp (size:128b/16B) */
225162306a36Sopenharmony_cistruct creq_query_roce_cc_resp {
225262306a36Sopenharmony_ci	u8	type;
225362306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_TYPE_MASK    0x3fUL
225462306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_TYPE_SFT     0
225562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_TYPE_QP_EVENT  0x38UL
225662306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_TYPE_LAST     CREQ_QUERY_ROCE_CC_RESP_TYPE_QP_EVENT
225762306a36Sopenharmony_ci	u8	status;
225862306a36Sopenharmony_ci	__le16	cookie;
225962306a36Sopenharmony_ci	__le32	size;
226062306a36Sopenharmony_ci	u8	v;
226162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_V     0x1UL
226262306a36Sopenharmony_ci	u8	event;
226362306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_EVENT_QUERY_ROCE_CC 0x8dUL
226462306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_EVENT_LAST  CREQ_QUERY_ROCE_CC_RESP_EVENT_QUERY_ROCE_CC
226562306a36Sopenharmony_ci	u8	reserved48[6];
226662306a36Sopenharmony_ci};
226762306a36Sopenharmony_ci
226862306a36Sopenharmony_ci/* creq_query_roce_cc_resp_sb (size:256b/32B) */
226962306a36Sopenharmony_cistruct creq_query_roce_cc_resp_sb {
227062306a36Sopenharmony_ci	u8	opcode;
227162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_OPCODE_QUERY_ROCE_CC 0x8dUL
227262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_OPCODE_LAST \
227362306a36Sopenharmony_ci		CREQ_QUERY_ROCE_CC_RESP_SB_OPCODE_QUERY_ROCE_CC
227462306a36Sopenharmony_ci	u8	status;
227562306a36Sopenharmony_ci	__le16	cookie;
227662306a36Sopenharmony_ci	__le16	flags;
227762306a36Sopenharmony_ci	u8	resp_size;
227862306a36Sopenharmony_ci	u8	reserved8;
227962306a36Sopenharmony_ci	u8	enable_cc;
228062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_ENABLE_CC     0x1UL
228162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_UNUSED7_MASK  0xfeUL
228262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_UNUSED7_SFT   1
228362306a36Sopenharmony_ci	u8	tos_dscp_tos_ecn;
228462306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TOS_ECN_MASK 0x3UL
228562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TOS_ECN_SFT  0
228662306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TOS_DSCP_MASK 0xfcUL
228762306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TOS_DSCP_SFT 2
228862306a36Sopenharmony_ci	u8	g;
228962306a36Sopenharmony_ci	u8	num_phases_per_state;
229062306a36Sopenharmony_ci	__le16	init_cr;
229162306a36Sopenharmony_ci	__le16	init_tr;
229262306a36Sopenharmony_ci	u8	alt_vlan_pcp;
229362306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_ALT_VLAN_PCP_MASK 0x7UL
229462306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_ALT_VLAN_PCP_SFT 0
229562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD1_MASK       0xf8UL
229662306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD1_SFT        3
229762306a36Sopenharmony_ci	u8	alt_tos_dscp;
229862306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_ALT_TOS_DSCP_MASK 0x3fUL
229962306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_ALT_TOS_DSCP_SFT 0
230062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD4_MASK       0xc0UL
230162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD4_SFT        6
230262306a36Sopenharmony_ci	u8	cc_mode;
230362306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_CC_MODE_DCTCP         0x0UL
230462306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_CC_MODE_PROBABILISTIC 0x1UL
230562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_CC_MODE_LAST \
230662306a36Sopenharmony_ci		CREQ_QUERY_ROCE_CC_RESP_SB_CC_MODE_PROBABILISTIC
230762306a36Sopenharmony_ci	u8	tx_queue;
230862306a36Sopenharmony_ci	__le16	rtt;
230962306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_RTT_MASK  0x3fffUL
231062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_RTT_SFT   0
231162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD5_MASK 0xc000UL
231262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD5_SFT 14
231362306a36Sopenharmony_ci	__le16	tcp_cp;
231462306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TCP_CP_MASK 0x3ffUL
231562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TCP_CP_SFT 0
231662306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD6_MASK 0xfc00UL
231762306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_RSVD6_SFT  10
231862306a36Sopenharmony_ci	__le16	inactivity_th;
231962306a36Sopenharmony_ci	u8	pkts_per_phase;
232062306a36Sopenharmony_ci	u8	time_per_phase;
232162306a36Sopenharmony_ci	__le32	reserved32;
232262306a36Sopenharmony_ci};
232362306a36Sopenharmony_ci
232462306a36Sopenharmony_ci/* creq_query_roce_cc_resp_sb_tlv (size:384b/48B) */
232562306a36Sopenharmony_cistruct creq_query_roce_cc_resp_sb_tlv {
232662306a36Sopenharmony_ci	__le16	cmd_discr;
232762306a36Sopenharmony_ci	u8	reserved_8b;
232862306a36Sopenharmony_ci	u8	tlv_flags;
232962306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_MORE         0x1UL
233062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_MORE_LAST      0x0UL
233162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_MORE_NOT_LAST  0x1UL
233262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_REQUIRED     0x2UL
233362306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_REQUIRED_NO    (0x0UL << 1)
233462306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES   (0x1UL << 1)
233562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_REQUIRED_LAST \
233662306a36Sopenharmony_ci		CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES
233762306a36Sopenharmony_ci	__le16	tlv_type;
233862306a36Sopenharmony_ci	__le16	length;
233962306a36Sopenharmony_ci	u8	total_size;
234062306a36Sopenharmony_ci	u8	reserved56[7];
234162306a36Sopenharmony_ci	u8	opcode;
234262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_OPCODE_QUERY_ROCE_CC 0x8dUL
234362306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_OPCODE_LAST \
234462306a36Sopenharmony_ci		CREQ_QUERY_ROCE_CC_RESP_SB_TLV_OPCODE_QUERY_ROCE_CC
234562306a36Sopenharmony_ci	u8	status;
234662306a36Sopenharmony_ci	__le16	cookie;
234762306a36Sopenharmony_ci	__le16	flags;
234862306a36Sopenharmony_ci	u8	resp_size;
234962306a36Sopenharmony_ci	u8	reserved8;
235062306a36Sopenharmony_ci	u8	enable_cc;
235162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_ENABLE_CC     0x1UL
235262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_UNUSED7_MASK  0xfeUL
235362306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_UNUSED7_SFT   1
235462306a36Sopenharmony_ci	u8	tos_dscp_tos_ecn;
235562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TOS_ECN_MASK 0x3UL
235662306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TOS_ECN_SFT  0
235762306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TOS_DSCP_MASK 0xfcUL
235862306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TOS_DSCP_SFT 2
235962306a36Sopenharmony_ci	u8	g;
236062306a36Sopenharmony_ci	u8	num_phases_per_state;
236162306a36Sopenharmony_ci	__le16	init_cr;
236262306a36Sopenharmony_ci	__le16	init_tr;
236362306a36Sopenharmony_ci	u8	alt_vlan_pcp;
236462306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_ALT_VLAN_PCP_MASK 0x7UL
236562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_ALT_VLAN_PCP_SFT 0
236662306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD1_MASK       0xf8UL
236762306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD1_SFT        3
236862306a36Sopenharmony_ci	u8	alt_tos_dscp;
236962306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_ALT_TOS_DSCP_MASK 0x3fUL
237062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_ALT_TOS_DSCP_SFT 0
237162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD4_MASK       0xc0UL
237262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD4_SFT        6
237362306a36Sopenharmony_ci	u8	cc_mode;
237462306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_CC_MODE_DCTCP         0x0UL
237562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_CC_MODE_PROBABILISTIC 0x1UL
237662306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_CC_MODE_LAST\
237762306a36Sopenharmony_ci		CREQ_QUERY_ROCE_CC_RESP_SB_TLV_CC_MODE_PROBABILISTIC
237862306a36Sopenharmony_ci	u8	tx_queue;
237962306a36Sopenharmony_ci	__le16	rtt;
238062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RTT_MASK  0x3fffUL
238162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RTT_SFT   0
238262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD5_MASK 0xc000UL
238362306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD5_SFT 14
238462306a36Sopenharmony_ci	__le16	tcp_cp;
238562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TCP_CP_MASK 0x3ffUL
238662306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_TCP_CP_SFT 0
238762306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD6_MASK 0xfc00UL
238862306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_RESP_SB_TLV_RSVD6_SFT  10
238962306a36Sopenharmony_ci	__le16	inactivity_th;
239062306a36Sopenharmony_ci	u8	pkts_per_phase;
239162306a36Sopenharmony_ci	u8	time_per_phase;
239262306a36Sopenharmony_ci	__le32	reserved32;
239362306a36Sopenharmony_ci};
239462306a36Sopenharmony_ci
239562306a36Sopenharmony_ci/* creq_query_roce_cc_gen1_resp_sb_tlv (size:704b/88B) */
239662306a36Sopenharmony_cistruct creq_query_roce_cc_gen1_resp_sb_tlv {
239762306a36Sopenharmony_ci	__le16	cmd_discr;
239862306a36Sopenharmony_ci	u8	reserved_8b;
239962306a36Sopenharmony_ci	u8	tlv_flags;
240062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_MORE         0x1UL
240162306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_MORE_LAST      0x0UL
240262306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_MORE_NOT_LAST  0x1UL
240362306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_REQUIRED     0x2UL
240462306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_REQUIRED_NO    (0x0UL << 1)
240562306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES   (0x1UL << 1)
240662306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_REQUIRED_LAST \
240762306a36Sopenharmony_ci		CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_TLV_FLAGS_REQUIRED_YES
240862306a36Sopenharmony_ci	__le16	tlv_type;
240962306a36Sopenharmony_ci	__le16	length;
241062306a36Sopenharmony_ci	__le64	reserved64;
241162306a36Sopenharmony_ci	__le16	inactivity_th_hi;
241262306a36Sopenharmony_ci	__le16	min_time_between_cnps;
241362306a36Sopenharmony_ci	__le16	init_cp;
241462306a36Sopenharmony_ci	u8	tr_update_mode;
241562306a36Sopenharmony_ci	u8	tr_update_cycles;
241662306a36Sopenharmony_ci	u8	fr_num_rtts;
241762306a36Sopenharmony_ci	u8	ai_rate_increase;
241862306a36Sopenharmony_ci	__le16	reduction_relax_rtts_th;
241962306a36Sopenharmony_ci	__le16	additional_relax_cr_th;
242062306a36Sopenharmony_ci	__le16	cr_min_th;
242162306a36Sopenharmony_ci	u8	bw_avg_weight;
242262306a36Sopenharmony_ci	u8	actual_cr_factor;
242362306a36Sopenharmony_ci	__le16	max_cp_cr_th;
242462306a36Sopenharmony_ci	u8	cp_bias_en;
242562306a36Sopenharmony_ci	u8	cp_bias;
242662306a36Sopenharmony_ci	u8	cnp_ecn;
242762306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_CNP_ECN_NOT_ECT 0x0UL
242862306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_CNP_ECN_ECT_1   0x1UL
242962306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_CNP_ECN_ECT_0   0x2UL
243062306a36Sopenharmony_ci	#define CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_CNP_ECN_LAST \
243162306a36Sopenharmony_ci		CREQ_QUERY_ROCE_CC_GEN1_RESP_SB_TLV_CNP_ECN_ECT_0
243262306a36Sopenharmony_ci	u8	rtt_jitter_en;
243362306a36Sopenharmony_ci	__le16	link_bytes_per_usec;
243462306a36Sopenharmony_ci	__le16	reset_cc_cr_th;
243562306a36Sopenharmony_ci	u8	cr_width;
243662306a36Sopenharmony_ci	u8	quota_period_min;
243762306a36Sopenharmony_ci	u8	quota_period_max;
243862306a36Sopenharmony_ci	u8	quota_period_abs_max;
243962306a36Sopenharmony_ci	__le16	tr_lower_bound;
244062306a36Sopenharmony_ci	u8	cr_prob_factor;
244162306a36Sopenharmony_ci	u8	tr_prob_factor;
244262306a36Sopenharmony_ci	__le16	fairness_cr_th;
244362306a36Sopenharmony_ci	u8	red_div;
244462306a36Sopenharmony_ci	u8	cnp_ratio_th;
244562306a36Sopenharmony_ci	__le16	exp_ai_rtts;
244662306a36Sopenharmony_ci	u8	exp_ai_cr_cp_ratio;
244762306a36Sopenharmony_ci	u8	use_rate_table;
244862306a36Sopenharmony_ci	__le16	cp_exp_update_th;
244962306a36Sopenharmony_ci	__le16	high_exp_ai_rtts_th1;
245062306a36Sopenharmony_ci	__le16	high_exp_ai_rtts_th2;
245162306a36Sopenharmony_ci	__le16	actual_cr_cong_free_rtts_th;
245262306a36Sopenharmony_ci	__le16	severe_cong_cr_th1;
245362306a36Sopenharmony_ci	__le16	severe_cong_cr_th2;
245462306a36Sopenharmony_ci	__le32	link64B_per_rtt;
245562306a36Sopenharmony_ci	u8	cc_ack_bytes;
245662306a36Sopenharmony_ci	u8	reduce_init_en;
245762306a36Sopenharmony_ci	__le16	reduce_init_cong_free_rtts_th;
245862306a36Sopenharmony_ci	u8	random_no_red_en;
245962306a36Sopenharmony_ci	u8	actual_cr_shift_correction_en;
246062306a36Sopenharmony_ci	u8	quota_period_adjust_en;
246162306a36Sopenharmony_ci	u8	reserved[5];
246262306a36Sopenharmony_ci};
246362306a36Sopenharmony_ci
246462306a36Sopenharmony_ci/* cmdq_modify_roce_cc (size:448b/56B) */
246562306a36Sopenharmony_cistruct cmdq_modify_roce_cc {
246662306a36Sopenharmony_ci	u8	opcode;
246762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_OPCODE_MODIFY_ROCE_CC 0x8cUL
246862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_OPCODE_LAST          CMDQ_MODIFY_ROCE_CC_OPCODE_MODIFY_ROCE_CC
246962306a36Sopenharmony_ci	u8	cmd_size;
247062306a36Sopenharmony_ci	__le16	flags;
247162306a36Sopenharmony_ci	__le16	cookie;
247262306a36Sopenharmony_ci	u8	resp_size;
247362306a36Sopenharmony_ci	u8	reserved8;
247462306a36Sopenharmony_ci	__le64	resp_addr;
247562306a36Sopenharmony_ci	__le32	modify_mask;
247662306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_ENABLE_CC            0x1UL
247762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_G                    0x2UL
247862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_NUMPHASEPERSTATE     0x4UL
247962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INIT_CR              0x8UL
248062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INIT_TR              0x10UL
248162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TOS_ECN              0x20UL
248262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TOS_DSCP             0x40UL
248362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_ALT_VLAN_PCP         0x80UL
248462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_ALT_TOS_DSCP         0x100UL
248562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_RTT                  0x200UL
248662306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_CC_MODE              0x400UL
248762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TCP_CP               0x800UL
248862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TX_QUEUE             0x1000UL
248962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_INACTIVITY_CP        0x2000UL
249062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_TIME_PER_PHASE       0x4000UL
249162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_MODIFY_MASK_PKTS_PER_PHASE       0x8000UL
249262306a36Sopenharmony_ci	u8	enable_cc;
249362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_ENABLE_CC     0x1UL
249462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RSVD1_MASK    0xfeUL
249562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RSVD1_SFT     1
249662306a36Sopenharmony_ci	u8	g;
249762306a36Sopenharmony_ci	u8	num_phases_per_state;
249862306a36Sopenharmony_ci	u8	pkts_per_phase;
249962306a36Sopenharmony_ci	__le16	init_cr;
250062306a36Sopenharmony_ci	__le16	init_tr;
250162306a36Sopenharmony_ci	u8	tos_dscp_tos_ecn;
250262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TOS_ECN_MASK 0x3UL
250362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TOS_ECN_SFT  0
250462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TOS_DSCP_MASK 0xfcUL
250562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TOS_DSCP_SFT 2
250662306a36Sopenharmony_ci	u8	alt_vlan_pcp;
250762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_ALT_VLAN_PCP_MASK 0x7UL
250862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_ALT_VLAN_PCP_SFT 0
250962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RSVD3_MASK       0xf8UL
251062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RSVD3_SFT        3
251162306a36Sopenharmony_ci	__le16	alt_tos_dscp;
251262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_ALT_TOS_DSCP_MASK 0x3fUL
251362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_ALT_TOS_DSCP_SFT 0
251462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RSVD4_MASK       0xffc0UL
251562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RSVD4_SFT        6
251662306a36Sopenharmony_ci	__le16	rtt;
251762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RTT_MASK  0x3fffUL
251862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RTT_SFT   0
251962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RSVD5_MASK 0xc000UL
252062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RSVD5_SFT 14
252162306a36Sopenharmony_ci	__le16	tcp_cp;
252262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TCP_CP_MASK 0x3ffUL
252362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TCP_CP_SFT 0
252462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RSVD6_MASK 0xfc00UL
252562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_RSVD6_SFT  10
252662306a36Sopenharmony_ci	u8	cc_mode;
252762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_CC_MODE_DCTCP_CC_MODE         0x0UL
252862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_CC_MODE_PROBABILISTIC_CC_MODE 0x1UL
252962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_CC_MODE_LAST CMDQ_MODIFY_ROCE_CC_CC_MODE_PROBABILISTIC_CC_MODE
253062306a36Sopenharmony_ci	u8	tx_queue;
253162306a36Sopenharmony_ci	__le16	inactivity_th;
253262306a36Sopenharmony_ci	u8	time_per_phase;
253362306a36Sopenharmony_ci	u8	reserved8_1;
253462306a36Sopenharmony_ci	__le16	reserved16;
253562306a36Sopenharmony_ci	__le32	reserved32;
253662306a36Sopenharmony_ci	__le64	reserved64;
253762306a36Sopenharmony_ci};
253862306a36Sopenharmony_ci
253962306a36Sopenharmony_ci/* cmdq_modify_roce_cc_tlv (size:640b/80B) */
254062306a36Sopenharmony_cistruct cmdq_modify_roce_cc_tlv {
254162306a36Sopenharmony_ci	__le16	cmd_discr;
254262306a36Sopenharmony_ci	u8	reserved_8b;
254362306a36Sopenharmony_ci	u8	tlv_flags;
254462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_MORE         0x1UL
254562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_MORE_LAST      0x0UL
254662306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_MORE_NOT_LAST  0x1UL
254762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_REQUIRED     0x2UL
254862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_REQUIRED_NO    (0x0UL << 1)
254962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_REQUIRED_YES   (0x1UL << 1)
255062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_REQUIRED_LAST \
255162306a36Sopenharmony_ci		CMDQ_MODIFY_ROCE_CC_TLV_TLV_FLAGS_REQUIRED_YES
255262306a36Sopenharmony_ci	__le16	tlv_type;
255362306a36Sopenharmony_ci	__le16	length;
255462306a36Sopenharmony_ci	u8	total_size;
255562306a36Sopenharmony_ci	u8	reserved56[7];
255662306a36Sopenharmony_ci	u8	opcode;
255762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_OPCODE_MODIFY_ROCE_CC 0x8cUL
255862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_OPCODE_LAST CMDQ_MODIFY_ROCE_CC_TLV_OPCODE_MODIFY_ROCE_CC
255962306a36Sopenharmony_ci	u8	cmd_size;
256062306a36Sopenharmony_ci	__le16	flags;
256162306a36Sopenharmony_ci	__le16	cookie;
256262306a36Sopenharmony_ci	u8	resp_size;
256362306a36Sopenharmony_ci	u8	reserved8;
256462306a36Sopenharmony_ci	__le64	resp_addr;
256562306a36Sopenharmony_ci	__le32	modify_mask;
256662306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_ENABLE_CC            0x1UL
256762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_G                    0x2UL
256862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_NUMPHASEPERSTATE     0x4UL
256962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_INIT_CR              0x8UL
257062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_INIT_TR              0x10UL
257162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_TOS_ECN              0x20UL
257262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_TOS_DSCP             0x40UL
257362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_ALT_VLAN_PCP         0x80UL
257462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_ALT_TOS_DSCP         0x100UL
257562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_RTT                  0x200UL
257662306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_CC_MODE              0x400UL
257762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_TCP_CP               0x800UL
257862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_TX_QUEUE             0x1000UL
257962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_INACTIVITY_CP        0x2000UL
258062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_TIME_PER_PHASE       0x4000UL
258162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_MODIFY_MASK_PKTS_PER_PHASE       0x8000UL
258262306a36Sopenharmony_ci	u8	enable_cc;
258362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_ENABLE_CC     0x1UL
258462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD1_MASK    0xfeUL
258562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD1_SFT     1
258662306a36Sopenharmony_ci	u8	g;
258762306a36Sopenharmony_ci	u8	num_phases_per_state;
258862306a36Sopenharmony_ci	u8	pkts_per_phase;
258962306a36Sopenharmony_ci	__le16	init_cr;
259062306a36Sopenharmony_ci	__le16	init_tr;
259162306a36Sopenharmony_ci	u8	tos_dscp_tos_ecn;
259262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TOS_ECN_MASK 0x3UL
259362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TOS_ECN_SFT  0
259462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TOS_DSCP_MASK 0xfcUL
259562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TOS_DSCP_SFT 2
259662306a36Sopenharmony_ci	u8	alt_vlan_pcp;
259762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_ALT_VLAN_PCP_MASK 0x7UL
259862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_ALT_VLAN_PCP_SFT 0
259962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD3_MASK       0xf8UL
260062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD3_SFT        3
260162306a36Sopenharmony_ci	__le16	alt_tos_dscp;
260262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_ALT_TOS_DSCP_MASK 0x3fUL
260362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_ALT_TOS_DSCP_SFT 0
260462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD4_MASK       0xffc0UL
260562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD4_SFT        6
260662306a36Sopenharmony_ci	__le16	rtt;
260762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RTT_MASK  0x3fffUL
260862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RTT_SFT   0
260962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD5_MASK 0xc000UL
261062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD5_SFT 14
261162306a36Sopenharmony_ci	__le16	tcp_cp;
261262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TCP_CP_MASK 0x3ffUL
261362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_TCP_CP_SFT 0
261462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD6_MASK 0xfc00UL
261562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_RSVD6_SFT  10
261662306a36Sopenharmony_ci	u8	cc_mode;
261762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_CC_MODE_DCTCP_CC_MODE         0x0UL
261862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_CC_MODE_PROBABILISTIC_CC_MODE 0x1UL
261962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_TLV_CC_MODE_LAST\
262062306a36Sopenharmony_ci		CMDQ_MODIFY_ROCE_CC_TLV_CC_MODE_PROBABILISTIC_CC_MODE
262162306a36Sopenharmony_ci	u8	tx_queue;
262262306a36Sopenharmony_ci	__le16	inactivity_th;
262362306a36Sopenharmony_ci	u8	time_per_phase;
262462306a36Sopenharmony_ci	u8	reserved8_1;
262562306a36Sopenharmony_ci	__le16	reserved16;
262662306a36Sopenharmony_ci	__le32	reserved32;
262762306a36Sopenharmony_ci	__le64	reserved64;
262862306a36Sopenharmony_ci	__le64	reservedtlvpad;
262962306a36Sopenharmony_ci};
263062306a36Sopenharmony_ci
263162306a36Sopenharmony_ci/* cmdq_modify_roce_cc_gen1_tlv (size:768b/96B) */
263262306a36Sopenharmony_cistruct cmdq_modify_roce_cc_gen1_tlv {
263362306a36Sopenharmony_ci	__le16	cmd_discr;
263462306a36Sopenharmony_ci	u8	reserved_8b;
263562306a36Sopenharmony_ci	u8	tlv_flags;
263662306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_MORE         0x1UL
263762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_MORE_LAST      0x0UL
263862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_MORE_NOT_LAST  0x1UL
263962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_REQUIRED     0x2UL
264062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_REQUIRED_NO    (0x0UL << 1)
264162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_REQUIRED_YES   (0x1UL << 1)
264262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_REQUIRED_LAST\
264362306a36Sopenharmony_ci		CMDQ_MODIFY_ROCE_CC_GEN1_TLV_TLV_FLAGS_REQUIRED_YES
264462306a36Sopenharmony_ci	__le16	tlv_type;
264562306a36Sopenharmony_ci	__le16	length;
264662306a36Sopenharmony_ci	__le64	reserved64;
264762306a36Sopenharmony_ci	__le64	modify_mask;
264862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_MIN_TIME_BETWEEN_CNPS       0x1UL
264962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_INIT_CP                     0x2UL
265062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_TR_UPDATE_MODE              0x4UL
265162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_TR_UPDATE_CYCLES            0x8UL
265262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_FR_NUM_RTTS                 0x10UL
265362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_AI_RATE_INCREASE            0x20UL
265462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_REDUCTION_RELAX_RTTS_TH     0x40UL
265562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_ADDITIONAL_RELAX_CR_TH      0x80UL
265662306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CR_MIN_TH                   0x100UL
265762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_BW_AVG_WEIGHT               0x200UL
265862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_ACTUAL_CR_FACTOR            0x400UL
265962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_MAX_CP_CR_TH                0x800UL
266062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CP_BIAS_EN                  0x1000UL
266162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CP_BIAS                     0x2000UL
266262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CNP_ECN                     0x4000UL
266362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_RTT_JITTER_EN               0x8000UL
266462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_LINK_BYTES_PER_USEC         0x10000UL
266562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_RESET_CC_CR_TH              0x20000UL
266662306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CR_WIDTH                    0x40000UL
266762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_QUOTA_PERIOD_MIN            0x80000UL
266862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_QUOTA_PERIOD_MAX            0x100000UL
266962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_QUOTA_PERIOD_ABS_MAX        0x200000UL
267062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_TR_LOWER_BOUND              0x400000UL
267162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CR_PROB_FACTOR              0x800000UL
267262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_TR_PROB_FACTOR              0x1000000UL
267362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_FAIRNESS_CR_TH              0x2000000UL
267462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_RED_DIV                     0x4000000UL
267562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CNP_RATIO_TH                0x8000000UL
267662306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_EXP_AI_RTTS                 0x10000000UL
267762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_EXP_AI_CR_CP_RATIO          0x20000000UL
267862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CP_EXP_UPDATE_TH            0x40000000UL
267962306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_HIGH_EXP_AI_RTTS_TH1        0x80000000UL
268062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_HIGH_EXP_AI_RTTS_TH2        0x100000000ULL
268162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_USE_RATE_TABLE              0x200000000ULL
268262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_LINK64B_PER_RTT             0x400000000ULL
268362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_ACTUAL_CR_CONG_FREE_RTTS_TH 0x800000000ULL
268462306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_SEVERE_CONG_CR_TH1          0x1000000000ULL
268562306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_SEVERE_CONG_CR_TH2          0x2000000000ULL
268662306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_CC_ACK_BYTES                0x4000000000ULL
268762306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_REDUCE_INIT_EN              0x8000000000ULL
268862306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_REDUCE_INIT_CONG_FREE_RTTS_TH \
268962306a36Sopenharmony_ci										0x10000000000ULL
269062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_RANDOM_NO_RED_EN 0x20000000000ULL
269162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_ACTUAL_CR_SHIFT_CORRECTION_EN \
269262306a36Sopenharmony_ci										0x40000000000ULL
269362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_MODIFY_MASK_QUOTA_PERIOD_ADJUST_EN 0x80000000000ULL
269462306a36Sopenharmony_ci	__le16	inactivity_th_hi;
269562306a36Sopenharmony_ci	__le16	min_time_between_cnps;
269662306a36Sopenharmony_ci	__le16	init_cp;
269762306a36Sopenharmony_ci	u8	tr_update_mode;
269862306a36Sopenharmony_ci	u8	tr_update_cycles;
269962306a36Sopenharmony_ci	u8	fr_num_rtts;
270062306a36Sopenharmony_ci	u8	ai_rate_increase;
270162306a36Sopenharmony_ci	__le16	reduction_relax_rtts_th;
270262306a36Sopenharmony_ci	__le16	additional_relax_cr_th;
270362306a36Sopenharmony_ci	__le16	cr_min_th;
270462306a36Sopenharmony_ci	u8	bw_avg_weight;
270562306a36Sopenharmony_ci	u8	actual_cr_factor;
270662306a36Sopenharmony_ci	__le16	max_cp_cr_th;
270762306a36Sopenharmony_ci	u8	cp_bias_en;
270862306a36Sopenharmony_ci	u8	cp_bias;
270962306a36Sopenharmony_ci	u8	cnp_ecn;
271062306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_CNP_ECN_NOT_ECT 0x0UL
271162306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_CNP_ECN_ECT_1   0x1UL
271262306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_CNP_ECN_ECT_0   0x2UL
271362306a36Sopenharmony_ci	#define CMDQ_MODIFY_ROCE_CC_GEN1_TLV_CNP_ECN_LAST CMDQ_MODIFY_ROCE_CC_GEN1_TLV_CNP_ECN_ECT_0
271462306a36Sopenharmony_ci	u8	rtt_jitter_en;
271562306a36Sopenharmony_ci	__le16	link_bytes_per_usec;
271662306a36Sopenharmony_ci	__le16	reset_cc_cr_th;
271762306a36Sopenharmony_ci	u8	cr_width;
271862306a36Sopenharmony_ci	u8	quota_period_min;
271962306a36Sopenharmony_ci	u8	quota_period_max;
272062306a36Sopenharmony_ci	u8	quota_period_abs_max;
272162306a36Sopenharmony_ci	__le16	tr_lower_bound;
272262306a36Sopenharmony_ci	u8	cr_prob_factor;
272362306a36Sopenharmony_ci	u8	tr_prob_factor;
272462306a36Sopenharmony_ci	__le16	fairness_cr_th;
272562306a36Sopenharmony_ci	u8	red_div;
272662306a36Sopenharmony_ci	u8	cnp_ratio_th;
272762306a36Sopenharmony_ci	__le16	exp_ai_rtts;
272862306a36Sopenharmony_ci	u8	exp_ai_cr_cp_ratio;
272962306a36Sopenharmony_ci	u8	use_rate_table;
273062306a36Sopenharmony_ci	__le16	cp_exp_update_th;
273162306a36Sopenharmony_ci	__le16	high_exp_ai_rtts_th1;
273262306a36Sopenharmony_ci	__le16	high_exp_ai_rtts_th2;
273362306a36Sopenharmony_ci	__le16	actual_cr_cong_free_rtts_th;
273462306a36Sopenharmony_ci	__le16	severe_cong_cr_th1;
273562306a36Sopenharmony_ci	__le16	severe_cong_cr_th2;
273662306a36Sopenharmony_ci	__le32	link64B_per_rtt;
273762306a36Sopenharmony_ci	u8	cc_ack_bytes;
273862306a36Sopenharmony_ci	u8	reduce_init_en;
273962306a36Sopenharmony_ci	__le16	reduce_init_cong_free_rtts_th;
274062306a36Sopenharmony_ci	u8	random_no_red_en;
274162306a36Sopenharmony_ci	u8	actual_cr_shift_correction_en;
274262306a36Sopenharmony_ci	u8	quota_period_adjust_en;
274362306a36Sopenharmony_ci	u8	reserved[5];
274462306a36Sopenharmony_ci};
274562306a36Sopenharmony_ci
274662306a36Sopenharmony_ci/* creq_modify_roce_cc_resp (size:128b/16B) */
274762306a36Sopenharmony_cistruct creq_modify_roce_cc_resp {
274862306a36Sopenharmony_ci	u8	type;
274962306a36Sopenharmony_ci	#define CREQ_MODIFY_ROCE_CC_RESP_TYPE_MASK    0x3fUL
275062306a36Sopenharmony_ci	#define CREQ_MODIFY_ROCE_CC_RESP_TYPE_SFT     0
275162306a36Sopenharmony_ci	#define CREQ_MODIFY_ROCE_CC_RESP_TYPE_QP_EVENT  0x38UL
275262306a36Sopenharmony_ci	#define CREQ_MODIFY_ROCE_CC_RESP_TYPE_LAST     CREQ_MODIFY_ROCE_CC_RESP_TYPE_QP_EVENT
275362306a36Sopenharmony_ci	u8	status;
275462306a36Sopenharmony_ci	__le16	cookie;
275562306a36Sopenharmony_ci	__le32	reserved32;
275662306a36Sopenharmony_ci	u8	v;
275762306a36Sopenharmony_ci	#define CREQ_MODIFY_ROCE_CC_RESP_V     0x1UL
275862306a36Sopenharmony_ci	u8	event;
275962306a36Sopenharmony_ci	#define CREQ_MODIFY_ROCE_CC_RESP_EVENT_MODIFY_ROCE_CC 0x8cUL
276062306a36Sopenharmony_ci	#define CREQ_MODIFY_ROCE_CC_RESP_EVENT_LAST   CREQ_MODIFY_ROCE_CC_RESP_EVENT_MODIFY_ROCE_CC
276162306a36Sopenharmony_ci	u8	reserved48[6];
276262306a36Sopenharmony_ci};
276362306a36Sopenharmony_ci
276462306a36Sopenharmony_ci/* cmdq_set_link_aggr_mode_cc (size:320b/40B) */
276562306a36Sopenharmony_cistruct cmdq_set_link_aggr_mode_cc {
276662306a36Sopenharmony_ci	u8	opcode;
276762306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_OPCODE_SET_LINK_AGGR_MODE 0x8fUL
276862306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_OPCODE_LAST \
276962306a36Sopenharmony_ci		CMDQ_SET_LINK_AGGR_MODE_OPCODE_SET_LINK_AGGR_MODE
277062306a36Sopenharmony_ci	u8	cmd_size;
277162306a36Sopenharmony_ci	__le16	flags;
277262306a36Sopenharmony_ci	__le16	cookie;
277362306a36Sopenharmony_ci	u8	resp_size;
277462306a36Sopenharmony_ci	u8	reserved8;
277562306a36Sopenharmony_ci	__le64	resp_addr;
277662306a36Sopenharmony_ci	__le32	modify_mask;
277762306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_MODIFY_MASK_AGGR_EN             0x1UL
277862306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_MODIFY_MASK_ACTIVE_PORT_MAP     0x2UL
277962306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_MODIFY_MASK_MEMBER_PORT_MAP     0x4UL
278062306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_MODIFY_MASK_AGGR_MODE           0x8UL
278162306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_MODIFY_MASK_STAT_CTX_ID         0x10UL
278262306a36Sopenharmony_ci	u8	aggr_enable;
278362306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_ENABLE     0x1UL
278462306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_RSVD1_MASK      0xfeUL
278562306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_RSVD1_SFT       1
278662306a36Sopenharmony_ci	u8	active_port_map;
278762306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_ACTIVE_PORT_MAP_MASK 0xfUL
278862306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_ACTIVE_PORT_MAP_SFT 0
278962306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_RSVD2_MASK          0xf0UL
279062306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_RSVD2_SFT           4
279162306a36Sopenharmony_ci	u8	member_port_map;
279262306a36Sopenharmony_ci	u8	link_aggr_mode;
279362306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_ACTIVE_ACTIVE 0x1UL
279462306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_ACTIVE_BACKUP 0x2UL
279562306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_BALANCE_XOR   0x3UL
279662306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_802_3_AD      0x4UL
279762306a36Sopenharmony_ci	#define CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_LAST CMDQ_SET_LINK_AGGR_MODE_AGGR_MODE_802_3_AD
279862306a36Sopenharmony_ci	__le16	stat_ctx_id[4];
279962306a36Sopenharmony_ci	__le64	rsvd1;
280062306a36Sopenharmony_ci};
280162306a36Sopenharmony_ci
280262306a36Sopenharmony_ci/* creq_set_link_aggr_mode_resources_resp (size:128b/16B) */
280362306a36Sopenharmony_cistruct creq_set_link_aggr_mode_resources_resp {
280462306a36Sopenharmony_ci	u8	type;
280562306a36Sopenharmony_ci	#define CREQ_SET_LINK_AGGR_MODE_RESP_TYPE_MASK    0x3fUL
280662306a36Sopenharmony_ci	#define CREQ_SET_LINK_AGGR_MODE_RESP_TYPE_SFT     0
280762306a36Sopenharmony_ci	#define CREQ_SET_LINK_AGGR_MODE_RESP_TYPE_QP_EVENT  0x38UL
280862306a36Sopenharmony_ci	#define CREQ_SET_LINK_AGGR_MODE_RESP_TYPE_LAST CREQ_SET_LINK_AGGR_MODE_RESP_TYPE_QP_EVENT
280962306a36Sopenharmony_ci	u8	status;
281062306a36Sopenharmony_ci	__le16	cookie;
281162306a36Sopenharmony_ci	__le32	reserved32;
281262306a36Sopenharmony_ci	u8	v;
281362306a36Sopenharmony_ci	#define CREQ_SET_LINK_AGGR_MODE_RESP_V     0x1UL
281462306a36Sopenharmony_ci	u8	event;
281562306a36Sopenharmony_ci	#define CREQ_SET_LINK_AGGR_MODE_RESP_EVENT_SET_LINK_AGGR_MODE 0x8fUL
281662306a36Sopenharmony_ci	#define CREQ_SET_LINK_AGGR_MODE_RESP_EVENT_LAST\
281762306a36Sopenharmony_ci		CREQ_SET_LINK_AGGR_MODE_RESP_EVENT_SET_LINK_AGGR_MODE
281862306a36Sopenharmony_ci	u8	reserved48[6];
281962306a36Sopenharmony_ci};
282062306a36Sopenharmony_ci
282162306a36Sopenharmony_ci/* creq_func_event (size:128b/16B) */
282262306a36Sopenharmony_cistruct creq_func_event {
282362306a36Sopenharmony_ci	u8	type;
282462306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_TYPE_MASK      0x3fUL
282562306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_TYPE_SFT       0
282662306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_TYPE_FUNC_EVENT  0x3aUL
282762306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_TYPE_LAST       CREQ_FUNC_EVENT_TYPE_FUNC_EVENT
282862306a36Sopenharmony_ci	u8	reserved56[7];
282962306a36Sopenharmony_ci	u8	v;
283062306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_V     0x1UL
283162306a36Sopenharmony_ci	u8	event;
283262306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_TX_WQE_ERROR       0x1UL
283362306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_TX_DATA_ERROR      0x2UL
283462306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_RX_WQE_ERROR       0x3UL
283562306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_RX_DATA_ERROR      0x4UL
283662306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_CQ_ERROR           0x5UL
283762306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_TQM_ERROR          0x6UL
283862306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_CFCQ_ERROR         0x7UL
283962306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_CFCS_ERROR         0x8UL
284062306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_CFCC_ERROR         0x9UL
284162306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_CFCM_ERROR         0xaUL
284262306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_TIM_ERROR          0xbUL
284362306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_VF_COMM_REQUEST    0x80UL
284462306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_RESOURCE_EXHAUSTED 0x81UL
284562306a36Sopenharmony_ci	#define CREQ_FUNC_EVENT_EVENT_LAST              CREQ_FUNC_EVENT_EVENT_RESOURCE_EXHAUSTED
284662306a36Sopenharmony_ci	u8	reserved48[6];
284762306a36Sopenharmony_ci};
284862306a36Sopenharmony_ci
284962306a36Sopenharmony_ci/* creq_qp_event (size:128b/16B) */
285062306a36Sopenharmony_cistruct creq_qp_event {
285162306a36Sopenharmony_ci	u8	type;
285262306a36Sopenharmony_ci	#define CREQ_QP_EVENT_TYPE_MASK    0x3fUL
285362306a36Sopenharmony_ci	#define CREQ_QP_EVENT_TYPE_SFT     0
285462306a36Sopenharmony_ci	#define CREQ_QP_EVENT_TYPE_QP_EVENT  0x38UL
285562306a36Sopenharmony_ci	#define CREQ_QP_EVENT_TYPE_LAST     CREQ_QP_EVENT_TYPE_QP_EVENT
285662306a36Sopenharmony_ci	u8	status;
285762306a36Sopenharmony_ci	#define CREQ_QP_EVENT_STATUS_SUCCESS           0x0UL
285862306a36Sopenharmony_ci	#define CREQ_QP_EVENT_STATUS_FAIL              0x1UL
285962306a36Sopenharmony_ci	#define CREQ_QP_EVENT_STATUS_RESOURCES         0x2UL
286062306a36Sopenharmony_ci	#define CREQ_QP_EVENT_STATUS_INVALID_CMD       0x3UL
286162306a36Sopenharmony_ci	#define CREQ_QP_EVENT_STATUS_NOT_IMPLEMENTED   0x4UL
286262306a36Sopenharmony_ci	#define CREQ_QP_EVENT_STATUS_INVALID_PARAMETER 0x5UL
286362306a36Sopenharmony_ci	#define CREQ_QP_EVENT_STATUS_HARDWARE_ERROR    0x6UL
286462306a36Sopenharmony_ci	#define CREQ_QP_EVENT_STATUS_INTERNAL_ERROR    0x7UL
286562306a36Sopenharmony_ci	#define CREQ_QP_EVENT_STATUS_LAST             CREQ_QP_EVENT_STATUS_INTERNAL_ERROR
286662306a36Sopenharmony_ci	__le16	cookie;
286762306a36Sopenharmony_ci	__le32	reserved32;
286862306a36Sopenharmony_ci	u8	v;
286962306a36Sopenharmony_ci	#define CREQ_QP_EVENT_V     0x1UL
287062306a36Sopenharmony_ci	u8	event;
287162306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_CREATE_QP             0x1UL
287262306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_DESTROY_QP            0x2UL
287362306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_MODIFY_QP             0x3UL
287462306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_QUERY_QP              0x4UL
287562306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_CREATE_SRQ            0x5UL
287662306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_DESTROY_SRQ           0x6UL
287762306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_QUERY_SRQ             0x8UL
287862306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_CREATE_CQ             0x9UL
287962306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_DESTROY_CQ            0xaUL
288062306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_RESIZE_CQ             0xcUL
288162306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_ALLOCATE_MRW          0xdUL
288262306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_DEALLOCATE_KEY        0xeUL
288362306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_REGISTER_MR           0xfUL
288462306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_DEREGISTER_MR         0x10UL
288562306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_ADD_GID               0x11UL
288662306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_DELETE_GID            0x12UL
288762306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_MODIFY_GID            0x17UL
288862306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_QUERY_GID             0x18UL
288962306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_CREATE_QP1            0x13UL
289062306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_DESTROY_QP1           0x14UL
289162306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_CREATE_AH             0x15UL
289262306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_DESTROY_AH            0x16UL
289362306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_INITIALIZE_FW         0x80UL
289462306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_DEINITIALIZE_FW       0x81UL
289562306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_STOP_FUNC             0x82UL
289662306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_QUERY_FUNC            0x83UL
289762306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_SET_FUNC_RESOURCES    0x84UL
289862306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_READ_CONTEXT          0x85UL
289962306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_MAP_TC_TO_COS         0x8aUL
290062306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_QUERY_VERSION         0x8bUL
290162306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_MODIFY_CC             0x8cUL
290262306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_QUERY_CC              0x8dUL
290362306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_QUERY_ROCE_STATS      0x8eUL
290462306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_SET_LINK_AGGR_MODE    0x8fUL
290562306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_QUERY_QP_EXTEND       0x91UL
290662306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_QP_ERROR_NOTIFICATION 0xc0UL
290762306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_CQ_ERROR_NOTIFICATION 0xc1UL
290862306a36Sopenharmony_ci	#define CREQ_QP_EVENT_EVENT_LAST                 CREQ_QP_EVENT_EVENT_CQ_ERROR_NOTIFICATION
290962306a36Sopenharmony_ci	u8	reserved48[6];
291062306a36Sopenharmony_ci};
291162306a36Sopenharmony_ci
291262306a36Sopenharmony_ci/* creq_qp_error_notification (size:128b/16B) */
291362306a36Sopenharmony_cistruct creq_qp_error_notification {
291462306a36Sopenharmony_ci	u8	type;
291562306a36Sopenharmony_ci	#define CREQ_QP_ERROR_NOTIFICATION_TYPE_MASK    0x3fUL
291662306a36Sopenharmony_ci	#define CREQ_QP_ERROR_NOTIFICATION_TYPE_SFT     0
291762306a36Sopenharmony_ci	#define CREQ_QP_ERROR_NOTIFICATION_TYPE_QP_EVENT  0x38UL
291862306a36Sopenharmony_ci	#define CREQ_QP_ERROR_NOTIFICATION_TYPE_LAST     CREQ_QP_ERROR_NOTIFICATION_TYPE_QP_EVENT
291962306a36Sopenharmony_ci	u8	status;
292062306a36Sopenharmony_ci	u8	req_slow_path_state;
292162306a36Sopenharmony_ci	u8	req_err_state_reason;
292262306a36Sopenharmony_ci	__le32	xid;
292362306a36Sopenharmony_ci	u8	v;
292462306a36Sopenharmony_ci	#define CREQ_QP_ERROR_NOTIFICATION_V     0x1UL
292562306a36Sopenharmony_ci	u8	event;
292662306a36Sopenharmony_ci	#define CREQ_QP_ERROR_NOTIFICATION_EVENT_QP_ERROR_NOTIFICATION 0xc0UL
292762306a36Sopenharmony_ci	#define CREQ_QP_ERROR_NOTIFICATION_EVENT_LAST \
292862306a36Sopenharmony_ci		CREQ_QP_ERROR_NOTIFICATION_EVENT_QP_ERROR_NOTIFICATION
292962306a36Sopenharmony_ci	u8	res_slow_path_state;
293062306a36Sopenharmony_ci	u8	res_err_state_reason;
293162306a36Sopenharmony_ci	__le16	sq_cons_idx;
293262306a36Sopenharmony_ci	__le16	rq_cons_idx;
293362306a36Sopenharmony_ci};
293462306a36Sopenharmony_ci
293562306a36Sopenharmony_ci/* creq_cq_error_notification (size:128b/16B) */
293662306a36Sopenharmony_cistruct creq_cq_error_notification {
293762306a36Sopenharmony_ci	u8	type;
293862306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_TYPE_MASK    0x3fUL
293962306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_TYPE_SFT     0
294062306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_TYPE_CQ_EVENT  0x38UL
294162306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_TYPE_LAST     CREQ_CQ_ERROR_NOTIFICATION_TYPE_CQ_EVENT
294262306a36Sopenharmony_ci	u8	status;
294362306a36Sopenharmony_ci	u8	cq_err_reason;
294462306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_REQ_CQ_INVALID_ERROR  0x1UL
294562306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_REQ_CQ_OVERFLOW_ERROR 0x2UL
294662306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_REQ_CQ_LOAD_ERROR     0x3UL
294762306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_RES_CQ_INVALID_ERROR  0x4UL
294862306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_RES_CQ_OVERFLOW_ERROR 0x5UL
294962306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_RES_CQ_LOAD_ERROR     0x6UL
295062306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_LAST \
295162306a36Sopenharmony_ci			CREQ_CQ_ERROR_NOTIFICATION_CQ_ERR_REASON_RES_CQ_LOAD_ERROR
295262306a36Sopenharmony_ci	u8	reserved8;
295362306a36Sopenharmony_ci	__le32	xid;
295462306a36Sopenharmony_ci	u8	v;
295562306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_V     0x1UL
295662306a36Sopenharmony_ci	u8	event;
295762306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_EVENT_CQ_ERROR_NOTIFICATION 0xc1UL
295862306a36Sopenharmony_ci	#define CREQ_CQ_ERROR_NOTIFICATION_EVENT_LAST \
295962306a36Sopenharmony_ci		CREQ_CQ_ERROR_NOTIFICATION_EVENT_CQ_ERROR_NOTIFICATION
296062306a36Sopenharmony_ci	u8	reserved48[6];
296162306a36Sopenharmony_ci};
296262306a36Sopenharmony_ci
296362306a36Sopenharmony_ci/* sq_base (size:64b/8B) */
296462306a36Sopenharmony_cistruct sq_base {
296562306a36Sopenharmony_ci	u8	wqe_type;
296662306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_SEND           0x0UL
296762306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_SEND_W_IMMEAD  0x1UL
296862306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_SEND_W_INVALID 0x2UL
296962306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_WRITE_WQE      0x4UL
297062306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_WRITE_W_IMMEAD 0x5UL
297162306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_READ_WQE       0x6UL
297262306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_ATOMIC_CS      0x8UL
297362306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_ATOMIC_FA      0xbUL
297462306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_LOCAL_INVALID  0xcUL
297562306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_FR_PMR         0xdUL
297662306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_BIND           0xeUL
297762306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_FR_PPMR        0xfUL
297862306a36Sopenharmony_ci	#define SQ_BASE_WQE_TYPE_LAST          SQ_BASE_WQE_TYPE_FR_PPMR
297962306a36Sopenharmony_ci	u8	unused_0[7];
298062306a36Sopenharmony_ci};
298162306a36Sopenharmony_ci
298262306a36Sopenharmony_ci/* sq_sge (size:128b/16B) */
298362306a36Sopenharmony_cistruct sq_sge {
298462306a36Sopenharmony_ci	__le64	va_or_pa;
298562306a36Sopenharmony_ci	__le32	l_key;
298662306a36Sopenharmony_ci	__le32	size;
298762306a36Sopenharmony_ci};
298862306a36Sopenharmony_ci
298962306a36Sopenharmony_ci/* sq_psn_search (size:64b/8B) */
299062306a36Sopenharmony_cistruct sq_psn_search {
299162306a36Sopenharmony_ci	__le32	opcode_start_psn;
299262306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_START_PSN_MASK 0xffffffUL
299362306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_START_PSN_SFT 0
299462306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_OPCODE_MASK   0xff000000UL
299562306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_OPCODE_SFT    24
299662306a36Sopenharmony_ci	__le32	flags_next_psn;
299762306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_NEXT_PSN_MASK 0xffffffUL
299862306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_NEXT_PSN_SFT 0
299962306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_FLAGS_MASK   0xff000000UL
300062306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_FLAGS_SFT    24
300162306a36Sopenharmony_ci};
300262306a36Sopenharmony_ci
300362306a36Sopenharmony_ci/* sq_psn_search_ext (size:128b/16B) */
300462306a36Sopenharmony_cistruct sq_psn_search_ext {
300562306a36Sopenharmony_ci	__le32	opcode_start_psn;
300662306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_EXT_START_PSN_MASK 0xffffffUL
300762306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_EXT_START_PSN_SFT 0
300862306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_EXT_OPCODE_MASK   0xff000000UL
300962306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_EXT_OPCODE_SFT    24
301062306a36Sopenharmony_ci	__le32	flags_next_psn;
301162306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_EXT_NEXT_PSN_MASK 0xffffffUL
301262306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_EXT_NEXT_PSN_SFT 0
301362306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_EXT_FLAGS_MASK   0xff000000UL
301462306a36Sopenharmony_ci	#define SQ_PSN_SEARCH_EXT_FLAGS_SFT    24
301562306a36Sopenharmony_ci	__le16	start_slot_idx;
301662306a36Sopenharmony_ci	__le16	reserved16;
301762306a36Sopenharmony_ci	__le32	reserved32;
301862306a36Sopenharmony_ci};
301962306a36Sopenharmony_ci
302062306a36Sopenharmony_ci/* sq_send (size:1024b/128B) */
302162306a36Sopenharmony_cistruct sq_send {
302262306a36Sopenharmony_ci	u8	wqe_type;
302362306a36Sopenharmony_ci	#define SQ_SEND_WQE_TYPE_SEND           0x0UL
302462306a36Sopenharmony_ci	#define SQ_SEND_WQE_TYPE_SEND_W_IMMEAD  0x1UL
302562306a36Sopenharmony_ci	#define SQ_SEND_WQE_TYPE_SEND_W_INVALID 0x2UL
302662306a36Sopenharmony_ci	#define SQ_SEND_WQE_TYPE_LAST          SQ_SEND_WQE_TYPE_SEND_W_INVALID
302762306a36Sopenharmony_ci	u8	flags;
302862306a36Sopenharmony_ci	#define SQ_SEND_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK 0xffUL
302962306a36Sopenharmony_ci	#define SQ_SEND_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT  0
303062306a36Sopenharmony_ci	#define SQ_SEND_FLAGS_SIGNAL_COMP                                            0x1UL
303162306a36Sopenharmony_ci	#define SQ_SEND_FLAGS_RD_OR_ATOMIC_FENCE                                     0x2UL
303262306a36Sopenharmony_ci	#define SQ_SEND_FLAGS_UC_FENCE                                               0x4UL
303362306a36Sopenharmony_ci	#define SQ_SEND_FLAGS_SE                                                     0x8UL
303462306a36Sopenharmony_ci	#define SQ_SEND_FLAGS_INLINE                                                 0x10UL
303562306a36Sopenharmony_ci	#define SQ_SEND_FLAGS_WQE_TS_EN                                              0x20UL
303662306a36Sopenharmony_ci	#define SQ_SEND_FLAGS_DEBUG_TRACE                                            0x40UL
303762306a36Sopenharmony_ci	u8	wqe_size;
303862306a36Sopenharmony_ci	u8	reserved8_1;
303962306a36Sopenharmony_ci	__le32	inv_key_or_imm_data;
304062306a36Sopenharmony_ci	__le32	length;
304162306a36Sopenharmony_ci	__le32	q_key;
304262306a36Sopenharmony_ci	__le32	dst_qp;
304362306a36Sopenharmony_ci	#define SQ_SEND_DST_QP_MASK 0xffffffUL
304462306a36Sopenharmony_ci	#define SQ_SEND_DST_QP_SFT 0
304562306a36Sopenharmony_ci	__le32	avid;
304662306a36Sopenharmony_ci	#define SQ_SEND_AVID_MASK 0xfffffUL
304762306a36Sopenharmony_ci	#define SQ_SEND_AVID_SFT 0
304862306a36Sopenharmony_ci	__le32	reserved32;
304962306a36Sopenharmony_ci	__le32	timestamp;
305062306a36Sopenharmony_ci	#define SQ_SEND_TIMESTAMP_MASK 0xffffffUL
305162306a36Sopenharmony_ci	#define SQ_SEND_TIMESTAMP_SFT 0
305262306a36Sopenharmony_ci	__le32	data[24];
305362306a36Sopenharmony_ci};
305462306a36Sopenharmony_ci
305562306a36Sopenharmony_ci/* sq_send_hdr (size:256b/32B) */
305662306a36Sopenharmony_cistruct sq_send_hdr {
305762306a36Sopenharmony_ci	u8	wqe_type;
305862306a36Sopenharmony_ci	#define SQ_SEND_HDR_WQE_TYPE_SEND           0x0UL
305962306a36Sopenharmony_ci	#define SQ_SEND_HDR_WQE_TYPE_SEND_W_IMMEAD  0x1UL
306062306a36Sopenharmony_ci	#define SQ_SEND_HDR_WQE_TYPE_SEND_W_INVALID 0x2UL
306162306a36Sopenharmony_ci	#define SQ_SEND_HDR_WQE_TYPE_LAST          SQ_SEND_HDR_WQE_TYPE_SEND_W_INVALID
306262306a36Sopenharmony_ci	u8	flags;
306362306a36Sopenharmony_ci	#define SQ_SEND_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK 0xffUL
306462306a36Sopenharmony_ci	#define SQ_SEND_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT  0
306562306a36Sopenharmony_ci	#define SQ_SEND_HDR_FLAGS_SIGNAL_COMP                                            0x1UL
306662306a36Sopenharmony_ci	#define SQ_SEND_HDR_FLAGS_RD_OR_ATOMIC_FENCE                                     0x2UL
306762306a36Sopenharmony_ci	#define SQ_SEND_HDR_FLAGS_UC_FENCE                                               0x4UL
306862306a36Sopenharmony_ci	#define SQ_SEND_HDR_FLAGS_SE                                                     0x8UL
306962306a36Sopenharmony_ci	#define SQ_SEND_HDR_FLAGS_INLINE                                                 0x10UL
307062306a36Sopenharmony_ci	#define SQ_SEND_HDR_FLAGS_WQE_TS_EN                                              0x20UL
307162306a36Sopenharmony_ci	#define SQ_SEND_HDR_FLAGS_DEBUG_TRACE                                            0x40UL
307262306a36Sopenharmony_ci	u8	wqe_size;
307362306a36Sopenharmony_ci	u8	reserved8_1;
307462306a36Sopenharmony_ci	__le32	inv_key_or_imm_data;
307562306a36Sopenharmony_ci	__le32	length;
307662306a36Sopenharmony_ci	__le32	q_key;
307762306a36Sopenharmony_ci	__le32	dst_qp;
307862306a36Sopenharmony_ci	#define SQ_SEND_HDR_DST_QP_MASK 0xffffffUL
307962306a36Sopenharmony_ci	#define SQ_SEND_HDR_DST_QP_SFT 0
308062306a36Sopenharmony_ci	__le32	avid;
308162306a36Sopenharmony_ci	#define SQ_SEND_HDR_AVID_MASK 0xfffffUL
308262306a36Sopenharmony_ci	#define SQ_SEND_HDR_AVID_SFT 0
308362306a36Sopenharmony_ci	__le32	reserved32;
308462306a36Sopenharmony_ci	__le32	timestamp;
308562306a36Sopenharmony_ci	#define SQ_SEND_HDR_TIMESTAMP_MASK 0xffffffUL
308662306a36Sopenharmony_ci	#define SQ_SEND_HDR_TIMESTAMP_SFT 0
308762306a36Sopenharmony_ci};
308862306a36Sopenharmony_ci
308962306a36Sopenharmony_ci/* sq_send_raweth_qp1 (size:1024b/128B) */
309062306a36Sopenharmony_cistruct sq_send_raweth_qp1 {
309162306a36Sopenharmony_ci	u8	wqe_type;
309262306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_WQE_TYPE_SEND 0x0UL
309362306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_WQE_TYPE_LAST SQ_SEND_RAWETH_QP1_WQE_TYPE_SEND
309462306a36Sopenharmony_ci	u8	flags;
309562306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK \
309662306a36Sopenharmony_ci		0xffUL
309762306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT \
309862306a36Sopenharmony_ci		0
309962306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_FLAGS_SIGNAL_COMP  0x1UL
310062306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_FLAGS_RD_OR_ATOMIC_FENCE  0x2UL
310162306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_FLAGS_UC_FENCE 0x4UL
310262306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_FLAGS_SE	0x8UL
310362306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_FLAGS_INLINE 0x10UL
310462306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_FLAGS_WQE_TS_EN 0x20UL
310562306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_FLAGS_DEBUG_TRACE 0x40UL
310662306a36Sopenharmony_ci	u8	wqe_size;
310762306a36Sopenharmony_ci	u8	reserved8;
310862306a36Sopenharmony_ci	__le16	lflags;
310962306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_LFLAGS_TCP_UDP_CHKSUM     0x1UL
311062306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_LFLAGS_IP_CHKSUM          0x2UL
311162306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_LFLAGS_NOCRC              0x4UL
311262306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_LFLAGS_STAMP              0x8UL
311362306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_LFLAGS_T_IP_CHKSUM        0x10UL
311462306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_LFLAGS_ROCE_CRC           0x100UL
311562306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_LFLAGS_FCOE_CRC           0x200UL
311662306a36Sopenharmony_ci	__le16	cfa_action;
311762306a36Sopenharmony_ci	__le32	length;
311862306a36Sopenharmony_ci	__le32	reserved32_1;
311962306a36Sopenharmony_ci	__le32	cfa_meta;
312062306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_VID_MASK     0xfffUL
312162306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_VID_SFT      0
312262306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_DE           0x1000UL
312362306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_PRI_MASK     0xe000UL
312462306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_PRI_SFT      13
312562306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_MASK    0x70000UL
312662306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_SFT     16
312762306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID88A8  (0x0UL << 16)
312862306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID8100  (0x1UL << 16)
312962306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID9100  (0x2UL << 16)
313062306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID9200  (0x3UL << 16)
313162306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID9300  (0x4UL << 16)
313262306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPIDCFG   (0x5UL << 16)
313362306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_LAST\
313462306a36Sopenharmony_ci		SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPIDCFG
313562306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_RESERVED_MASK 0xff80000UL
313662306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_RESERVED_SFT 19
313762306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_KEY_MASK          0xf0000000UL
313862306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_KEY_SFT           28
313962306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_KEY_NONE            (0x0UL << 28)
314062306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_KEY_VLAN_TAG        (0x1UL << 28)
314162306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_CFA_META_KEY_LAST SQ_SEND_RAWETH_QP1_CFA_META_KEY_VLAN_TAG
314262306a36Sopenharmony_ci	__le32	reserved32_2;
314362306a36Sopenharmony_ci	__le32	reserved32_3;
314462306a36Sopenharmony_ci	__le32	timestamp;
314562306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_TIMESTAMP_MASK 0xffffffUL
314662306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_TIMESTAMP_SFT 0
314762306a36Sopenharmony_ci	__le32	data[24];
314862306a36Sopenharmony_ci};
314962306a36Sopenharmony_ci
315062306a36Sopenharmony_ci/* sq_send_raweth_qp1_hdr (size:256b/32B) */
315162306a36Sopenharmony_cistruct sq_send_raweth_qp1_hdr {
315262306a36Sopenharmony_ci	u8	wqe_type;
315362306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_WQE_TYPE_SEND 0x0UL
315462306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_WQE_TYPE_LAST SQ_SEND_RAWETH_QP1_HDR_WQE_TYPE_SEND
315562306a36Sopenharmony_ci	u8	flags;
315662306a36Sopenharmony_ci	#define \
315762306a36Sopenharmony_ci	SQ_SEND_RAWETH_QP1_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK 0xffUL
315862306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT\
315962306a36Sopenharmony_ci		0
316062306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_SIGNAL_COMP 0x1UL
316162306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_RD_OR_ATOMIC_FENCE 0x2UL
316262306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_UC_FENCE 0x4UL
316362306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_SE 0x8UL
316462306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_INLINE 0x10UL
316562306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_WQE_TS_EN 0x20UL
316662306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_FLAGS_DEBUG_TRACE 0x40UL
316762306a36Sopenharmony_ci	u8	wqe_size;
316862306a36Sopenharmony_ci	u8	reserved8;
316962306a36Sopenharmony_ci	__le16	lflags;
317062306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_TCP_UDP_CHKSUM     0x1UL
317162306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_IP_CHKSUM          0x2UL
317262306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_NOCRC              0x4UL
317362306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_STAMP              0x8UL
317462306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_T_IP_CHKSUM        0x10UL
317562306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_ROCE_CRC           0x100UL
317662306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_LFLAGS_FCOE_CRC           0x200UL
317762306a36Sopenharmony_ci	__le16	cfa_action;
317862306a36Sopenharmony_ci	__le32	length;
317962306a36Sopenharmony_ci	__le32	reserved32_1;
318062306a36Sopenharmony_ci	__le32	cfa_meta;
318162306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_VID_MASK     0xfffUL
318262306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_VID_SFT      0
318362306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_DE           0x1000UL
318462306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_PRI_MASK     0xe000UL
318562306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_PRI_SFT      13
318662306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_MASK    0x70000UL
318762306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_SFT     16
318862306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPID88A8  (0x0UL << 16)
318962306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPID8100  (0x1UL << 16)
319062306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPID9100  (0x2UL << 16)
319162306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPID9200  (0x3UL << 16)
319262306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPID9300  (0x4UL << 16)
319362306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPIDCFG   (0x5UL << 16)
319462306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_LAST\
319562306a36Sopenharmony_ci			SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_TPID_TPIDCFG
319662306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_RESERVED_MASK 0xff80000UL
319762306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_VLAN_RESERVED_SFT 19
319862306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_MASK          0xf0000000UL
319962306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_SFT           28
320062306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_NONE            (0x0UL << 28)
320162306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_VLAN_TAG        (0x1UL << 28)
320262306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_LAST\
320362306a36Sopenharmony_ci		SQ_SEND_RAWETH_QP1_HDR_CFA_META_KEY_VLAN_TAG
320462306a36Sopenharmony_ci	__le32	reserved32_2;
320562306a36Sopenharmony_ci	__le32	reserved32_3;
320662306a36Sopenharmony_ci	__le32	timestamp;
320762306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_TIMESTAMP_MASK 0xffffffUL
320862306a36Sopenharmony_ci	#define SQ_SEND_RAWETH_QP1_HDR_TIMESTAMP_SFT 0
320962306a36Sopenharmony_ci};
321062306a36Sopenharmony_ci
321162306a36Sopenharmony_ci/* sq_rdma (size:1024b/128B) */
321262306a36Sopenharmony_cistruct sq_rdma {
321362306a36Sopenharmony_ci	u8	wqe_type;
321462306a36Sopenharmony_ci	#define SQ_RDMA_WQE_TYPE_WRITE_WQE      0x4UL
321562306a36Sopenharmony_ci	#define SQ_RDMA_WQE_TYPE_WRITE_W_IMMEAD 0x5UL
321662306a36Sopenharmony_ci	#define SQ_RDMA_WQE_TYPE_READ_WQE       0x6UL
321762306a36Sopenharmony_ci	#define SQ_RDMA_WQE_TYPE_LAST          SQ_RDMA_WQE_TYPE_READ_WQE
321862306a36Sopenharmony_ci	u8	flags;
321962306a36Sopenharmony_ci	#define SQ_RDMA_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK 0xffUL
322062306a36Sopenharmony_ci	#define SQ_RDMA_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT  0
322162306a36Sopenharmony_ci	#define SQ_RDMA_FLAGS_SIGNAL_COMP                                            0x1UL
322262306a36Sopenharmony_ci	#define SQ_RDMA_FLAGS_RD_OR_ATOMIC_FENCE                                     0x2UL
322362306a36Sopenharmony_ci	#define SQ_RDMA_FLAGS_UC_FENCE                                               0x4UL
322462306a36Sopenharmony_ci	#define SQ_RDMA_FLAGS_SE                                                     0x8UL
322562306a36Sopenharmony_ci	#define SQ_RDMA_FLAGS_INLINE                                                 0x10UL
322662306a36Sopenharmony_ci	#define SQ_RDMA_FLAGS_WQE_TS_EN                                              0x20UL
322762306a36Sopenharmony_ci	#define SQ_RDMA_FLAGS_DEBUG_TRACE                                            0x40UL
322862306a36Sopenharmony_ci	u8	wqe_size;
322962306a36Sopenharmony_ci	u8	reserved8;
323062306a36Sopenharmony_ci	__le32	imm_data;
323162306a36Sopenharmony_ci	__le32	length;
323262306a36Sopenharmony_ci	__le32	reserved32_1;
323362306a36Sopenharmony_ci	__le64	remote_va;
323462306a36Sopenharmony_ci	__le32	remote_key;
323562306a36Sopenharmony_ci	__le32	timestamp;
323662306a36Sopenharmony_ci	#define SQ_RDMA_TIMESTAMP_MASK 0xffffffUL
323762306a36Sopenharmony_ci	#define SQ_RDMA_TIMESTAMP_SFT 0
323862306a36Sopenharmony_ci	__le32	data[24];
323962306a36Sopenharmony_ci};
324062306a36Sopenharmony_ci
324162306a36Sopenharmony_ci/* sq_rdma_hdr (size:256b/32B) */
324262306a36Sopenharmony_cistruct sq_rdma_hdr {
324362306a36Sopenharmony_ci	u8	wqe_type;
324462306a36Sopenharmony_ci	#define SQ_RDMA_HDR_WQE_TYPE_WRITE_WQE      0x4UL
324562306a36Sopenharmony_ci	#define SQ_RDMA_HDR_WQE_TYPE_WRITE_W_IMMEAD 0x5UL
324662306a36Sopenharmony_ci	#define SQ_RDMA_HDR_WQE_TYPE_READ_WQE       0x6UL
324762306a36Sopenharmony_ci	#define SQ_RDMA_HDR_WQE_TYPE_LAST          SQ_RDMA_HDR_WQE_TYPE_READ_WQE
324862306a36Sopenharmony_ci	u8	flags;
324962306a36Sopenharmony_ci	#define SQ_RDMA_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK 0xffUL
325062306a36Sopenharmony_ci	#define SQ_RDMA_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT  0
325162306a36Sopenharmony_ci	#define SQ_RDMA_HDR_FLAGS_SIGNAL_COMP                                            0x1UL
325262306a36Sopenharmony_ci	#define SQ_RDMA_HDR_FLAGS_RD_OR_ATOMIC_FENCE                                     0x2UL
325362306a36Sopenharmony_ci	#define SQ_RDMA_HDR_FLAGS_UC_FENCE                                               0x4UL
325462306a36Sopenharmony_ci	#define SQ_RDMA_HDR_FLAGS_SE                                                     0x8UL
325562306a36Sopenharmony_ci	#define SQ_RDMA_HDR_FLAGS_INLINE                                                 0x10UL
325662306a36Sopenharmony_ci	#define SQ_RDMA_HDR_FLAGS_WQE_TS_EN                                              0x20UL
325762306a36Sopenharmony_ci	#define SQ_RDMA_HDR_FLAGS_DEBUG_TRACE                                            0x40UL
325862306a36Sopenharmony_ci	u8	wqe_size;
325962306a36Sopenharmony_ci	u8	reserved8;
326062306a36Sopenharmony_ci	__le32	imm_data;
326162306a36Sopenharmony_ci	__le32	length;
326262306a36Sopenharmony_ci	__le32	reserved32_1;
326362306a36Sopenharmony_ci	__le64	remote_va;
326462306a36Sopenharmony_ci	__le32	remote_key;
326562306a36Sopenharmony_ci	__le32	timestamp;
326662306a36Sopenharmony_ci	#define SQ_RDMA_HDR_TIMESTAMP_MASK 0xffffffUL
326762306a36Sopenharmony_ci	#define SQ_RDMA_HDR_TIMESTAMP_SFT 0
326862306a36Sopenharmony_ci};
326962306a36Sopenharmony_ci
327062306a36Sopenharmony_ci/* sq_atomic (size:1024b/128B) */
327162306a36Sopenharmony_cistruct sq_atomic {
327262306a36Sopenharmony_ci	u8	wqe_type;
327362306a36Sopenharmony_ci	#define SQ_ATOMIC_WQE_TYPE_ATOMIC_CS 0x8UL
327462306a36Sopenharmony_ci	#define SQ_ATOMIC_WQE_TYPE_ATOMIC_FA 0xbUL
327562306a36Sopenharmony_ci	#define SQ_ATOMIC_WQE_TYPE_LAST     SQ_ATOMIC_WQE_TYPE_ATOMIC_FA
327662306a36Sopenharmony_ci	u8	flags;
327762306a36Sopenharmony_ci	#define SQ_ATOMIC_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK   0xffUL
327862306a36Sopenharmony_ci	#define SQ_ATOMIC_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT    0
327962306a36Sopenharmony_ci	#define SQ_ATOMIC_FLAGS_SIGNAL_COMP                                              0x1UL
328062306a36Sopenharmony_ci	#define SQ_ATOMIC_FLAGS_RD_OR_ATOMIC_FENCE                                       0x2UL
328162306a36Sopenharmony_ci	#define SQ_ATOMIC_FLAGS_UC_FENCE                                                 0x4UL
328262306a36Sopenharmony_ci	#define SQ_ATOMIC_FLAGS_SE                                                       0x8UL
328362306a36Sopenharmony_ci	#define SQ_ATOMIC_FLAGS_INLINE                                                   0x10UL
328462306a36Sopenharmony_ci	#define SQ_ATOMIC_FLAGS_WQE_TS_EN                                                0x20UL
328562306a36Sopenharmony_ci	#define SQ_ATOMIC_FLAGS_DEBUG_TRACE                                              0x40UL
328662306a36Sopenharmony_ci	__le16	reserved16;
328762306a36Sopenharmony_ci	__le32	remote_key;
328862306a36Sopenharmony_ci	__le64	remote_va;
328962306a36Sopenharmony_ci	__le64	swap_data;
329062306a36Sopenharmony_ci	__le64	cmp_data;
329162306a36Sopenharmony_ci	__le32	data[24];
329262306a36Sopenharmony_ci};
329362306a36Sopenharmony_ci
329462306a36Sopenharmony_ci/* sq_atomic_hdr (size:256b/32B) */
329562306a36Sopenharmony_cistruct sq_atomic_hdr {
329662306a36Sopenharmony_ci	u8	wqe_type;
329762306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_WQE_TYPE_ATOMIC_CS 0x8UL
329862306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_WQE_TYPE_ATOMIC_FA 0xbUL
329962306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_WQE_TYPE_LAST     SQ_ATOMIC_HDR_WQE_TYPE_ATOMIC_FA
330062306a36Sopenharmony_ci	u8	flags;
330162306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK 0xffUL
330262306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT 0
330362306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_FLAGS_SIGNAL_COMP  0x1UL
330462306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_FLAGS_RD_OR_ATOMIC_FENCE  0x2UL
330562306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_FLAGS_UC_FENCE            0x4UL
330662306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_FLAGS_SE                  0x8UL
330762306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_FLAGS_INLINE              0x10UL
330862306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_FLAGS_WQE_TS_EN           0x20UL
330962306a36Sopenharmony_ci	#define SQ_ATOMIC_HDR_FLAGS_DEBUG_TRACE         0x40UL
331062306a36Sopenharmony_ci	__le16	reserved16;
331162306a36Sopenharmony_ci	__le32	remote_key;
331262306a36Sopenharmony_ci	__le64	remote_va;
331362306a36Sopenharmony_ci	__le64	swap_data;
331462306a36Sopenharmony_ci	__le64	cmp_data;
331562306a36Sopenharmony_ci};
331662306a36Sopenharmony_ci
331762306a36Sopenharmony_ci/* sq_localinvalidate (size:1024b/128B) */
331862306a36Sopenharmony_cistruct sq_localinvalidate {
331962306a36Sopenharmony_ci	u8	wqe_type;
332062306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_WQE_TYPE_LOCAL_INVALID 0xcUL
332162306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_WQE_TYPE_LAST         SQ_LOCALINVALIDATE_WQE_TYPE_LOCAL_INVALID
332262306a36Sopenharmony_ci	u8	flags;
332362306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK\
332462306a36Sopenharmony_ci		0xffUL
332562306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT\
332662306a36Sopenharmony_ci		0
332762306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_FLAGS_SIGNAL_COMP   0x1UL
332862306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_FLAGS_RD_OR_ATOMIC_FENCE 0x2UL
332962306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_FLAGS_UC_FENCE 0x4UL
333062306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_FLAGS_SE 0x8UL
333162306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_FLAGS_INLINE 0x10UL
333262306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_FLAGS_WQE_TS_EN 0x20UL
333362306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_FLAGS_DEBUG_TRACE 0x40UL
333462306a36Sopenharmony_ci	__le16	reserved16;
333562306a36Sopenharmony_ci	__le32	inv_l_key;
333662306a36Sopenharmony_ci	__le64	reserved64;
333762306a36Sopenharmony_ci	u8	reserved128[16];
333862306a36Sopenharmony_ci	__le32	data[24];
333962306a36Sopenharmony_ci};
334062306a36Sopenharmony_ci
334162306a36Sopenharmony_ci/* sq_localinvalidate_hdr (size:256b/32B) */
334262306a36Sopenharmony_cistruct sq_localinvalidate_hdr {
334362306a36Sopenharmony_ci	u8	wqe_type;
334462306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_HDR_WQE_TYPE_LOCAL_INVALID 0xcUL
334562306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_HDR_WQE_TYPE_LAST SQ_LOCALINVALIDATE_HDR_WQE_TYPE_LOCAL_INVALID
334662306a36Sopenharmony_ci	u8	flags;
334762306a36Sopenharmony_ci	#define \
334862306a36Sopenharmony_ci	SQ_LOCALINVALIDATE_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK 0xffUL
334962306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT\
335062306a36Sopenharmony_ci		0
335162306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_HDR_FLAGS_SIGNAL_COMP 0x1UL
335262306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_HDR_FLAGS_RD_OR_ATOMIC_FENCE 0x2UL
335362306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_HDR_FLAGS_UC_FENCE 0x4UL
335462306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_HDR_FLAGS_SE 0x8UL
335562306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_HDR_FLAGS_INLINE 0x10UL
335662306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_HDR_FLAGS_WQE_TS_EN  0x20UL
335762306a36Sopenharmony_ci	#define SQ_LOCALINVALIDATE_HDR_FLAGS_DEBUG_TRACE 0x40UL
335862306a36Sopenharmony_ci	__le16	reserved16;
335962306a36Sopenharmony_ci	__le32	inv_l_key;
336062306a36Sopenharmony_ci	__le64	reserved64;
336162306a36Sopenharmony_ci	u8	reserved128[16];
336262306a36Sopenharmony_ci};
336362306a36Sopenharmony_ci
336462306a36Sopenharmony_ci/* sq_fr_pmr (size:1024b/128B) */
336562306a36Sopenharmony_cistruct sq_fr_pmr {
336662306a36Sopenharmony_ci	u8	wqe_type;
336762306a36Sopenharmony_ci	#define SQ_FR_PMR_WQE_TYPE_FR_PMR 0xdUL
336862306a36Sopenharmony_ci	#define SQ_FR_PMR_WQE_TYPE_LAST  SQ_FR_PMR_WQE_TYPE_FR_PMR
336962306a36Sopenharmony_ci	u8	flags;
337062306a36Sopenharmony_ci	#define SQ_FR_PMR_FLAGS_SIGNAL_COMP            0x1UL
337162306a36Sopenharmony_ci	#define SQ_FR_PMR_FLAGS_RD_OR_ATOMIC_FENCE     0x2UL
337262306a36Sopenharmony_ci	#define SQ_FR_PMR_FLAGS_UC_FENCE               0x4UL
337362306a36Sopenharmony_ci	#define SQ_FR_PMR_FLAGS_SE                     0x8UL
337462306a36Sopenharmony_ci	#define SQ_FR_PMR_FLAGS_INLINE                 0x10UL
337562306a36Sopenharmony_ci	#define SQ_FR_PMR_FLAGS_WQE_TS_EN              0x20UL
337662306a36Sopenharmony_ci	#define SQ_FR_PMR_FLAGS_DEBUG_TRACE            0x40UL
337762306a36Sopenharmony_ci	u8	access_cntl;
337862306a36Sopenharmony_ci	#define SQ_FR_PMR_ACCESS_CNTL_LOCAL_WRITE       0x1UL
337962306a36Sopenharmony_ci	#define SQ_FR_PMR_ACCESS_CNTL_REMOTE_READ       0x2UL
338062306a36Sopenharmony_ci	#define SQ_FR_PMR_ACCESS_CNTL_REMOTE_WRITE      0x4UL
338162306a36Sopenharmony_ci	#define SQ_FR_PMR_ACCESS_CNTL_REMOTE_ATOMIC     0x8UL
338262306a36Sopenharmony_ci	#define SQ_FR_PMR_ACCESS_CNTL_WINDOW_BIND       0x10UL
338362306a36Sopenharmony_ci	u8	zero_based_page_size_log;
338462306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_MASK     0x1fUL
338562306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_SFT      0
338662306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_4K    0x0UL
338762306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8K    0x1UL
338862306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_16K   0x2UL
338962306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_32K   0x3UL
339062306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_64K   0x4UL
339162306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_128K  0x5UL
339262306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_256K  0x6UL
339362306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_512K  0x7UL
339462306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_1M    0x8UL
339562306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_2M    0x9UL
339662306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_4M    0xaUL
339762306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8M    0xbUL
339862306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_16M   0xcUL
339962306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_32M   0xdUL
340062306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_64M   0xeUL
340162306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_128M  0xfUL
340262306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_256M  0x10UL
340362306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_512M  0x11UL
340462306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_1G    0x12UL
340562306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_2G    0x13UL
340662306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_4G    0x14UL
340762306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8G    0x15UL
340862306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_16G   0x16UL
340962306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_32G   0x17UL
341062306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_64G   0x18UL
341162306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_128G  0x19UL
341262306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_256G  0x1aUL
341362306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_512G  0x1bUL
341462306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_1T    0x1cUL
341562306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_2T    0x1dUL
341662306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_4T    0x1eUL
341762306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8T    0x1fUL
341862306a36Sopenharmony_ci	#define SQ_FR_PMR_PAGE_SIZE_LOG_LAST      SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8T
341962306a36Sopenharmony_ci	#define SQ_FR_PMR_ZERO_BASED             0x20UL
342062306a36Sopenharmony_ci	__le32	l_key;
342162306a36Sopenharmony_ci	u8	length[5];
342262306a36Sopenharmony_ci	u8	reserved8_1;
342362306a36Sopenharmony_ci	u8	reserved8_2;
342462306a36Sopenharmony_ci	u8	numlevels_pbl_page_size_log;
342562306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_MASK     0x1fUL
342662306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_SFT      0
342762306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_4K    0x0UL
342862306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8K    0x1UL
342962306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_16K   0x2UL
343062306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_32K   0x3UL
343162306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_64K   0x4UL
343262306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_128K  0x5UL
343362306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_256K  0x6UL
343462306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_512K  0x7UL
343562306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_1M    0x8UL
343662306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_2M    0x9UL
343762306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_4M    0xaUL
343862306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8M    0xbUL
343962306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_16M   0xcUL
344062306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_32M   0xdUL
344162306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_64M   0xeUL
344262306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_128M  0xfUL
344362306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_256M  0x10UL
344462306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_512M  0x11UL
344562306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_1G    0x12UL
344662306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_2G    0x13UL
344762306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_4G    0x14UL
344862306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8G    0x15UL
344962306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_16G   0x16UL
345062306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_32G   0x17UL
345162306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_64G   0x18UL
345262306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_128G  0x19UL
345362306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_256G  0x1aUL
345462306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_512G  0x1bUL
345562306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_1T    0x1cUL
345662306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_2T    0x1dUL
345762306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_4T    0x1eUL
345862306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8T    0x1fUL
345962306a36Sopenharmony_ci	#define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_LAST      SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8T
346062306a36Sopenharmony_ci	#define SQ_FR_PMR_NUMLEVELS_MASK             0xc0UL
346162306a36Sopenharmony_ci	#define SQ_FR_PMR_NUMLEVELS_SFT              6
346262306a36Sopenharmony_ci	#define SQ_FR_PMR_NUMLEVELS_PHYSICAL           (0x0UL << 6)
346362306a36Sopenharmony_ci	#define SQ_FR_PMR_NUMLEVELS_LAYER1             (0x1UL << 6)
346462306a36Sopenharmony_ci	#define SQ_FR_PMR_NUMLEVELS_LAYER2             (0x2UL << 6)
346562306a36Sopenharmony_ci	#define SQ_FR_PMR_NUMLEVELS_LAST              SQ_FR_PMR_NUMLEVELS_LAYER2
346662306a36Sopenharmony_ci	__le64	pblptr;
346762306a36Sopenharmony_ci	__le64	va;
346862306a36Sopenharmony_ci	__le32	data[24];
346962306a36Sopenharmony_ci};
347062306a36Sopenharmony_ci
347162306a36Sopenharmony_ci/* sq_fr_pmr_hdr (size:256b/32B) */
347262306a36Sopenharmony_cistruct sq_fr_pmr_hdr {
347362306a36Sopenharmony_ci	u8	wqe_type;
347462306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_WQE_TYPE_FR_PMR 0xdUL
347562306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_WQE_TYPE_LAST  SQ_FR_PMR_HDR_WQE_TYPE_FR_PMR
347662306a36Sopenharmony_ci	u8	flags;
347762306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_FLAGS_SIGNAL_COMP            0x1UL
347862306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_FLAGS_RD_OR_ATOMIC_FENCE     0x2UL
347962306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_FLAGS_UC_FENCE               0x4UL
348062306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_FLAGS_SE                     0x8UL
348162306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_FLAGS_INLINE                 0x10UL
348262306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_FLAGS_WQE_TS_EN              0x20UL
348362306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_FLAGS_DEBUG_TRACE            0x40UL
348462306a36Sopenharmony_ci	u8	access_cntl;
348562306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_ACCESS_CNTL_LOCAL_WRITE       0x1UL
348662306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_ACCESS_CNTL_REMOTE_READ       0x2UL
348762306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_ACCESS_CNTL_REMOTE_WRITE      0x4UL
348862306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_ACCESS_CNTL_REMOTE_ATOMIC     0x8UL
348962306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_ACCESS_CNTL_WINDOW_BIND       0x10UL
349062306a36Sopenharmony_ci	u8	zero_based_page_size_log;
349162306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_MASK     0x1fUL
349262306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_SFT      0
349362306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_4K    0x0UL
349462306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_8K    0x1UL
349562306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_16K   0x2UL
349662306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_32K   0x3UL
349762306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_64K   0x4UL
349862306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_128K  0x5UL
349962306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_256K  0x6UL
350062306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_512K  0x7UL
350162306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_1M    0x8UL
350262306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_2M    0x9UL
350362306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_4M    0xaUL
350462306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_8M    0xbUL
350562306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_16M   0xcUL
350662306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_32M   0xdUL
350762306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_64M   0xeUL
350862306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_128M  0xfUL
350962306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_256M  0x10UL
351062306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_512M  0x11UL
351162306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_1G    0x12UL
351262306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_2G    0x13UL
351362306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_4G    0x14UL
351462306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_8G    0x15UL
351562306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_16G   0x16UL
351662306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_32G   0x17UL
351762306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_64G   0x18UL
351862306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_128G  0x19UL
351962306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_256G  0x1aUL
352062306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_512G  0x1bUL
352162306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_1T    0x1cUL
352262306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_2T    0x1dUL
352362306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_4T    0x1eUL
352462306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_8T    0x1fUL
352562306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PAGE_SIZE_LOG_LAST      SQ_FR_PMR_HDR_PAGE_SIZE_LOG_PGSZ_8T
352662306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_ZERO_BASED             0x20UL
352762306a36Sopenharmony_ci	__le32	l_key;
352862306a36Sopenharmony_ci	u8	length[5];
352962306a36Sopenharmony_ci	u8	reserved8_1;
353062306a36Sopenharmony_ci	u8	reserved8_2;
353162306a36Sopenharmony_ci	u8	numlevels_pbl_page_size_log;
353262306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_MASK     0x1fUL
353362306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_SFT      0
353462306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4K    0x0UL
353562306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8K    0x1UL
353662306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_16K   0x2UL
353762306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_32K   0x3UL
353862306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_64K   0x4UL
353962306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_128K  0x5UL
354062306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_256K  0x6UL
354162306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_512K  0x7UL
354262306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_1M    0x8UL
354362306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_2M    0x9UL
354462306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4M    0xaUL
354562306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8M    0xbUL
354662306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_16M   0xcUL
354762306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_32M   0xdUL
354862306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_64M   0xeUL
354962306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_128M  0xfUL
355062306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_256M  0x10UL
355162306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_512M  0x11UL
355262306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_1G    0x12UL
355362306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_2G    0x13UL
355462306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4G    0x14UL
355562306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8G    0x15UL
355662306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_16G   0x16UL
355762306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_32G   0x17UL
355862306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_64G   0x18UL
355962306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_128G  0x19UL
356062306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_256G  0x1aUL
356162306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_512G  0x1bUL
356262306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_1T    0x1cUL
356362306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_2T    0x1dUL
356462306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_4T    0x1eUL
356562306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8T    0x1fUL
356662306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_LAST      SQ_FR_PMR_HDR_PBL_PAGE_SIZE_LOG_PGSZ_8T
356762306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_NUMLEVELS_MASK             0xc0UL
356862306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_NUMLEVELS_SFT              6
356962306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_NUMLEVELS_PHYSICAL           (0x0UL << 6)
357062306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_NUMLEVELS_LAYER1             (0x1UL << 6)
357162306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_NUMLEVELS_LAYER2             (0x2UL << 6)
357262306a36Sopenharmony_ci	#define SQ_FR_PMR_HDR_NUMLEVELS_LAST              SQ_FR_PMR_HDR_NUMLEVELS_LAYER2
357362306a36Sopenharmony_ci	__le64	pblptr;
357462306a36Sopenharmony_ci	__le64	va;
357562306a36Sopenharmony_ci};
357662306a36Sopenharmony_ci
357762306a36Sopenharmony_ci/* sq_bind (size:1024b/128B) */
357862306a36Sopenharmony_cistruct sq_bind {
357962306a36Sopenharmony_ci	u8	wqe_type;
358062306a36Sopenharmony_ci	#define SQ_BIND_WQE_TYPE_BIND 0xeUL
358162306a36Sopenharmony_ci	#define SQ_BIND_WQE_TYPE_LAST SQ_BIND_WQE_TYPE_BIND
358262306a36Sopenharmony_ci	u8	flags;
358362306a36Sopenharmony_ci	#define SQ_BIND_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK 0xffUL
358462306a36Sopenharmony_ci	#define SQ_BIND_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT  0
358562306a36Sopenharmony_ci	#define SQ_BIND_FLAGS_SIGNAL_COMP                                            0x1UL
358662306a36Sopenharmony_ci	#define SQ_BIND_FLAGS_RD_OR_ATOMIC_FENCE                                     0x2UL
358762306a36Sopenharmony_ci	#define SQ_BIND_FLAGS_UC_FENCE                                               0x4UL
358862306a36Sopenharmony_ci	#define SQ_BIND_FLAGS_SE                                                     0x8UL
358962306a36Sopenharmony_ci	#define SQ_BIND_FLAGS_INLINE                                                 0x10UL
359062306a36Sopenharmony_ci	#define SQ_BIND_FLAGS_WQE_TS_EN                                              0x20UL
359162306a36Sopenharmony_ci	#define SQ_BIND_FLAGS_DEBUG_TRACE                                            0x40UL
359262306a36Sopenharmony_ci	u8	access_cntl;
359362306a36Sopenharmony_ci	#define \
359462306a36Sopenharmony_ci	SQ_BIND_ACCESS_CNTL_WINDOW_BIND_REMOTE_ATOMIC_REMOTE_WRITE_REMOTE_READ_LOCAL_WRITE_MASK\
359562306a36Sopenharmony_ci		0xffUL
359662306a36Sopenharmony_ci	#define \
359762306a36Sopenharmony_ci	SQ_BIND_ACCESS_CNTL_WINDOW_BIND_REMOTE_ATOMIC_REMOTE_WRITE_REMOTE_READ_LOCAL_WRITE_SFT 0
359862306a36Sopenharmony_ci	#define SQ_BIND_ACCESS_CNTL_LOCAL_WRITE       0x1UL
359962306a36Sopenharmony_ci	#define SQ_BIND_ACCESS_CNTL_REMOTE_READ       0x2UL
360062306a36Sopenharmony_ci	#define SQ_BIND_ACCESS_CNTL_REMOTE_WRITE      0x4UL
360162306a36Sopenharmony_ci	#define SQ_BIND_ACCESS_CNTL_REMOTE_ATOMIC     0x8UL
360262306a36Sopenharmony_ci	#define SQ_BIND_ACCESS_CNTL_WINDOW_BIND       0x10UL
360362306a36Sopenharmony_ci	u8	reserved8_1;
360462306a36Sopenharmony_ci	u8	mw_type_zero_based;
360562306a36Sopenharmony_ci	#define SQ_BIND_ZERO_BASED     0x1UL
360662306a36Sopenharmony_ci	#define SQ_BIND_MW_TYPE        0x2UL
360762306a36Sopenharmony_ci	#define SQ_BIND_MW_TYPE_TYPE1    (0x0UL << 1)
360862306a36Sopenharmony_ci	#define SQ_BIND_MW_TYPE_TYPE2    (0x1UL << 1)
360962306a36Sopenharmony_ci	#define SQ_BIND_MW_TYPE_LAST    SQ_BIND_MW_TYPE_TYPE2
361062306a36Sopenharmony_ci	u8	reserved8_2;
361162306a36Sopenharmony_ci	__le16	reserved16;
361262306a36Sopenharmony_ci	__le32	parent_l_key;
361362306a36Sopenharmony_ci	__le32	l_key;
361462306a36Sopenharmony_ci	__le64	va;
361562306a36Sopenharmony_ci	u8	length[5];
361662306a36Sopenharmony_ci	u8	reserved24[3];
361762306a36Sopenharmony_ci	__le32	data[24];
361862306a36Sopenharmony_ci};
361962306a36Sopenharmony_ci
362062306a36Sopenharmony_ci/* sq_bind_hdr (size:256b/32B) */
362162306a36Sopenharmony_cistruct sq_bind_hdr {
362262306a36Sopenharmony_ci	u8	wqe_type;
362362306a36Sopenharmony_ci	#define SQ_BIND_HDR_WQE_TYPE_BIND 0xeUL
362462306a36Sopenharmony_ci	#define SQ_BIND_HDR_WQE_TYPE_LAST SQ_BIND_HDR_WQE_TYPE_BIND
362562306a36Sopenharmony_ci	u8	flags;
362662306a36Sopenharmony_ci	#define SQ_BIND_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_MASK 0xffUL
362762306a36Sopenharmony_ci	#define SQ_BIND_HDR_FLAGS_INLINE_SE_UC_FENCE_RD_OR_ATOMIC_FENCE_SIGNAL_COMP_SFT  0
362862306a36Sopenharmony_ci	#define SQ_BIND_HDR_FLAGS_SIGNAL_COMP		0x1UL
362962306a36Sopenharmony_ci	#define SQ_BIND_HDR_FLAGS_RD_OR_ATOMIC_FENCE	0x2UL
363062306a36Sopenharmony_ci	#define SQ_BIND_HDR_FLAGS_UC_FENCE		0x4UL
363162306a36Sopenharmony_ci	#define SQ_BIND_HDR_FLAGS_SE                    0x8UL
363262306a36Sopenharmony_ci	#define SQ_BIND_HDR_FLAGS_INLINE                0x10UL
363362306a36Sopenharmony_ci	#define SQ_BIND_HDR_FLAGS_WQE_TS_EN             0x20UL
363462306a36Sopenharmony_ci	#define SQ_BIND_HDR_FLAGS_DEBUG_TRACE           0x40UL
363562306a36Sopenharmony_ci	u8	access_cntl;
363662306a36Sopenharmony_ci	#define \
363762306a36Sopenharmony_ci	SQ_BIND_HDR_ACCESS_CNTL_WINDOW_BIND_REMOTE_ATOMIC_REMOTE_WRITE_REMOTE_READ_LOCAL_WRITE_MASK\
363862306a36Sopenharmony_ci		0xffUL
363962306a36Sopenharmony_ci	#define \
364062306a36Sopenharmony_ci	SQ_BIND_HDR_ACCESS_CNTL_WINDOW_BIND_REMOTE_ATOMIC_REMOTE_WRITE_REMOTE_READ_LOCAL_WRITE_SFT \
364162306a36Sopenharmony_ci		0
364262306a36Sopenharmony_ci	#define SQ_BIND_HDR_ACCESS_CNTL_LOCAL_WRITE	0x1UL
364362306a36Sopenharmony_ci	#define SQ_BIND_HDR_ACCESS_CNTL_REMOTE_READ	0x2UL
364462306a36Sopenharmony_ci	#define SQ_BIND_HDR_ACCESS_CNTL_REMOTE_WRITE    0x4UL
364562306a36Sopenharmony_ci	#define SQ_BIND_HDR_ACCESS_CNTL_REMOTE_ATOMIC   0x8UL
364662306a36Sopenharmony_ci	#define SQ_BIND_HDR_ACCESS_CNTL_WINDOW_BIND     0x10UL
364762306a36Sopenharmony_ci	u8	reserved8_1;
364862306a36Sopenharmony_ci	u8	mw_type_zero_based;
364962306a36Sopenharmony_ci	#define SQ_BIND_HDR_ZERO_BASED     0x1UL
365062306a36Sopenharmony_ci	#define SQ_BIND_HDR_MW_TYPE        0x2UL
365162306a36Sopenharmony_ci	#define SQ_BIND_HDR_MW_TYPE_TYPE1    (0x0UL << 1)
365262306a36Sopenharmony_ci	#define SQ_BIND_HDR_MW_TYPE_TYPE2    (0x1UL << 1)
365362306a36Sopenharmony_ci	#define SQ_BIND_HDR_MW_TYPE_LAST    SQ_BIND_HDR_MW_TYPE_TYPE2
365462306a36Sopenharmony_ci	u8	reserved8_2;
365562306a36Sopenharmony_ci	__le16	reserved16;
365662306a36Sopenharmony_ci	__le32	parent_l_key;
365762306a36Sopenharmony_ci	__le32	l_key;
365862306a36Sopenharmony_ci	__le64	va;
365962306a36Sopenharmony_ci	u8	length[5];
366062306a36Sopenharmony_ci	u8	reserved24[3];
366162306a36Sopenharmony_ci};
366262306a36Sopenharmony_ci
366362306a36Sopenharmony_ci/* rq_wqe (size:1024b/128B) */
366462306a36Sopenharmony_cistruct rq_wqe {
366562306a36Sopenharmony_ci	u8	wqe_type;
366662306a36Sopenharmony_ci	#define RQ_WQE_WQE_TYPE_RCV 0x80UL
366762306a36Sopenharmony_ci	#define RQ_WQE_WQE_TYPE_LAST RQ_WQE_WQE_TYPE_RCV
366862306a36Sopenharmony_ci	u8	flags;
366962306a36Sopenharmony_ci	u8	wqe_size;
367062306a36Sopenharmony_ci	u8	reserved8;
367162306a36Sopenharmony_ci	__le32	reserved32;
367262306a36Sopenharmony_ci	__le32	wr_id[2];
367362306a36Sopenharmony_ci	#define RQ_WQE_WR_ID_MASK 0xfffffUL
367462306a36Sopenharmony_ci	#define RQ_WQE_WR_ID_SFT 0
367562306a36Sopenharmony_ci	u8	reserved128[16];
367662306a36Sopenharmony_ci	__le32	data[24];
367762306a36Sopenharmony_ci};
367862306a36Sopenharmony_ci
367962306a36Sopenharmony_ci/* rq_wqe_hdr (size:256b/32B) */
368062306a36Sopenharmony_cistruct rq_wqe_hdr {
368162306a36Sopenharmony_ci	u8	wqe_type;
368262306a36Sopenharmony_ci	#define RQ_WQE_HDR_WQE_TYPE_RCV 0x80UL
368362306a36Sopenharmony_ci	#define RQ_WQE_HDR_WQE_TYPE_LAST RQ_WQE_HDR_WQE_TYPE_RCV
368462306a36Sopenharmony_ci	u8	flags;
368562306a36Sopenharmony_ci	u8	wqe_size;
368662306a36Sopenharmony_ci	u8	reserved8;
368762306a36Sopenharmony_ci	__le32	reserved32;
368862306a36Sopenharmony_ci	__le32	wr_id[2];
368962306a36Sopenharmony_ci	#define RQ_WQE_HDR_WR_ID_MASK 0xfffffUL
369062306a36Sopenharmony_ci	#define RQ_WQE_HDR_WR_ID_SFT 0
369162306a36Sopenharmony_ci	u8	reserved128[16];
369262306a36Sopenharmony_ci};
369362306a36Sopenharmony_ci
369462306a36Sopenharmony_ci/* cq_base (size:256b/32B) */
369562306a36Sopenharmony_cistruct cq_base {
369662306a36Sopenharmony_ci	__le64	reserved64_1;
369762306a36Sopenharmony_ci	__le64	reserved64_2;
369862306a36Sopenharmony_ci	__le64	reserved64_3;
369962306a36Sopenharmony_ci	u8	cqe_type_toggle;
370062306a36Sopenharmony_ci	#define CQ_BASE_TOGGLE                 0x1UL
370162306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_MASK          0x1eUL
370262306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_SFT           1
370362306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_REQ             (0x0UL << 1)
370462306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_RES_RC          (0x1UL << 1)
370562306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_RES_UD          (0x2UL << 1)
370662306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_RES_RAWETH_QP1  (0x3UL << 1)
370762306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_RES_UD_CFA      (0x4UL << 1)
370862306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_NO_OP           (0xdUL << 1)
370962306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_TERMINAL        (0xeUL << 1)
371062306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_CUT_OFF         (0xfUL << 1)
371162306a36Sopenharmony_ci	#define CQ_BASE_CQE_TYPE_LAST           CQ_BASE_CQE_TYPE_CUT_OFF
371262306a36Sopenharmony_ci	u8	status;
371362306a36Sopenharmony_ci	__le16	reserved16;
371462306a36Sopenharmony_ci	__le32	reserved32;
371562306a36Sopenharmony_ci};
371662306a36Sopenharmony_ci
371762306a36Sopenharmony_ci/* cq_req (size:256b/32B) */
371862306a36Sopenharmony_cistruct cq_req {
371962306a36Sopenharmony_ci	__le64	qp_handle;
372062306a36Sopenharmony_ci	__le16	sq_cons_idx;
372162306a36Sopenharmony_ci	__le16	reserved16_1;
372262306a36Sopenharmony_ci	__le32	reserved32_2;
372362306a36Sopenharmony_ci	__le64	reserved64;
372462306a36Sopenharmony_ci	u8	cqe_type_toggle;
372562306a36Sopenharmony_ci	#define CQ_REQ_TOGGLE       0x1UL
372662306a36Sopenharmony_ci	#define CQ_REQ_CQE_TYPE_MASK 0x1eUL
372762306a36Sopenharmony_ci	#define CQ_REQ_CQE_TYPE_SFT 1
372862306a36Sopenharmony_ci	#define CQ_REQ_CQE_TYPE_REQ   (0x0UL << 1)
372962306a36Sopenharmony_ci	#define CQ_REQ_CQE_TYPE_LAST CQ_REQ_CQE_TYPE_REQ
373062306a36Sopenharmony_ci	#define CQ_REQ_PUSH         0x20UL
373162306a36Sopenharmony_ci	u8	status;
373262306a36Sopenharmony_ci	#define CQ_REQ_STATUS_OK                         0x0UL
373362306a36Sopenharmony_ci	#define CQ_REQ_STATUS_BAD_RESPONSE_ERR           0x1UL
373462306a36Sopenharmony_ci	#define CQ_REQ_STATUS_LOCAL_LENGTH_ERR           0x2UL
373562306a36Sopenharmony_ci	#define CQ_REQ_STATUS_LOCAL_QP_OPERATION_ERR     0x3UL
373662306a36Sopenharmony_ci	#define CQ_REQ_STATUS_LOCAL_PROTECTION_ERR       0x4UL
373762306a36Sopenharmony_ci	#define CQ_REQ_STATUS_MEMORY_MGT_OPERATION_ERR   0x5UL
373862306a36Sopenharmony_ci	#define CQ_REQ_STATUS_REMOTE_INVALID_REQUEST_ERR 0x6UL
373962306a36Sopenharmony_ci	#define CQ_REQ_STATUS_REMOTE_ACCESS_ERR          0x7UL
374062306a36Sopenharmony_ci	#define CQ_REQ_STATUS_REMOTE_OPERATION_ERR       0x8UL
374162306a36Sopenharmony_ci	#define CQ_REQ_STATUS_RNR_NAK_RETRY_CNT_ERR      0x9UL
374262306a36Sopenharmony_ci	#define CQ_REQ_STATUS_TRANSPORT_RETRY_CNT_ERR    0xaUL
374362306a36Sopenharmony_ci	#define CQ_REQ_STATUS_WORK_REQUEST_FLUSHED_ERR   0xbUL
374462306a36Sopenharmony_ci	#define CQ_REQ_STATUS_LAST                      CQ_REQ_STATUS_WORK_REQUEST_FLUSHED_ERR
374562306a36Sopenharmony_ci	__le16	reserved16_2;
374662306a36Sopenharmony_ci	__le32	reserved32_1;
374762306a36Sopenharmony_ci};
374862306a36Sopenharmony_ci
374962306a36Sopenharmony_ci/* cq_res_rc (size:256b/32B) */
375062306a36Sopenharmony_cistruct cq_res_rc {
375162306a36Sopenharmony_ci	__le32	length;
375262306a36Sopenharmony_ci	__le32	imm_data_or_inv_r_key;
375362306a36Sopenharmony_ci	__le64	qp_handle;
375462306a36Sopenharmony_ci	__le64	mr_handle;
375562306a36Sopenharmony_ci	u8	cqe_type_toggle;
375662306a36Sopenharmony_ci	#define CQ_RES_RC_TOGGLE         0x1UL
375762306a36Sopenharmony_ci	#define CQ_RES_RC_CQE_TYPE_MASK  0x1eUL
375862306a36Sopenharmony_ci	#define CQ_RES_RC_CQE_TYPE_SFT   1
375962306a36Sopenharmony_ci	#define CQ_RES_RC_CQE_TYPE_RES_RC  (0x1UL << 1)
376062306a36Sopenharmony_ci	#define CQ_RES_RC_CQE_TYPE_LAST   CQ_RES_RC_CQE_TYPE_RES_RC
376162306a36Sopenharmony_ci	u8	status;
376262306a36Sopenharmony_ci	#define CQ_RES_RC_STATUS_OK                         0x0UL
376362306a36Sopenharmony_ci	#define CQ_RES_RC_STATUS_LOCAL_ACCESS_ERROR         0x1UL
376462306a36Sopenharmony_ci	#define CQ_RES_RC_STATUS_LOCAL_LENGTH_ERR           0x2UL
376562306a36Sopenharmony_ci	#define CQ_RES_RC_STATUS_LOCAL_PROTECTION_ERR       0x3UL
376662306a36Sopenharmony_ci	#define CQ_RES_RC_STATUS_LOCAL_QP_OPERATION_ERR     0x4UL
376762306a36Sopenharmony_ci	#define CQ_RES_RC_STATUS_MEMORY_MGT_OPERATION_ERR   0x5UL
376862306a36Sopenharmony_ci	#define CQ_RES_RC_STATUS_REMOTE_INVALID_REQUEST_ERR 0x6UL
376962306a36Sopenharmony_ci	#define CQ_RES_RC_STATUS_WORK_REQUEST_FLUSHED_ERR   0x7UL
377062306a36Sopenharmony_ci	#define CQ_RES_RC_STATUS_HW_FLUSH_ERR               0x8UL
377162306a36Sopenharmony_ci	#define CQ_RES_RC_STATUS_LAST                      CQ_RES_RC_STATUS_HW_FLUSH_ERR
377262306a36Sopenharmony_ci	__le16	flags;
377362306a36Sopenharmony_ci	#define CQ_RES_RC_FLAGS_SRQ            0x1UL
377462306a36Sopenharmony_ci	#define CQ_RES_RC_FLAGS_SRQ_RQ           0x0UL
377562306a36Sopenharmony_ci	#define CQ_RES_RC_FLAGS_SRQ_SRQ          0x1UL
377662306a36Sopenharmony_ci	#define CQ_RES_RC_FLAGS_SRQ_LAST        CQ_RES_RC_FLAGS_SRQ_SRQ
377762306a36Sopenharmony_ci	#define CQ_RES_RC_FLAGS_IMM            0x2UL
377862306a36Sopenharmony_ci	#define CQ_RES_RC_FLAGS_INV            0x4UL
377962306a36Sopenharmony_ci	#define CQ_RES_RC_FLAGS_RDMA           0x8UL
378062306a36Sopenharmony_ci	#define CQ_RES_RC_FLAGS_RDMA_SEND        (0x0UL << 3)
378162306a36Sopenharmony_ci	#define CQ_RES_RC_FLAGS_RDMA_RDMA_WRITE  (0x1UL << 3)
378262306a36Sopenharmony_ci	#define CQ_RES_RC_FLAGS_RDMA_LAST       CQ_RES_RC_FLAGS_RDMA_RDMA_WRITE
378362306a36Sopenharmony_ci	__le32	srq_or_rq_wr_id;
378462306a36Sopenharmony_ci	#define CQ_RES_RC_SRQ_OR_RQ_WR_ID_MASK 0xfffffUL
378562306a36Sopenharmony_ci	#define CQ_RES_RC_SRQ_OR_RQ_WR_ID_SFT 0
378662306a36Sopenharmony_ci};
378762306a36Sopenharmony_ci
378862306a36Sopenharmony_ci/* cq_res_ud (size:256b/32B) */
378962306a36Sopenharmony_cistruct cq_res_ud {
379062306a36Sopenharmony_ci	__le16	length;
379162306a36Sopenharmony_ci	#define CQ_RES_UD_LENGTH_MASK 0x3fffUL
379262306a36Sopenharmony_ci	#define CQ_RES_UD_LENGTH_SFT 0
379362306a36Sopenharmony_ci	__le16	cfa_metadata;
379462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_METADATA_VID_MASK 0xfffUL
379562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_METADATA_VID_SFT 0
379662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_METADATA_DE      0x1000UL
379762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_METADATA_PRI_MASK 0xe000UL
379862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_METADATA_PRI_SFT 13
379962306a36Sopenharmony_ci	__le32	imm_data;
380062306a36Sopenharmony_ci	__le64	qp_handle;
380162306a36Sopenharmony_ci	__le16	src_mac[3];
380262306a36Sopenharmony_ci	__le16	src_qp_low;
380362306a36Sopenharmony_ci	u8	cqe_type_toggle;
380462306a36Sopenharmony_ci	#define CQ_RES_UD_TOGGLE         0x1UL
380562306a36Sopenharmony_ci	#define CQ_RES_UD_CQE_TYPE_MASK  0x1eUL
380662306a36Sopenharmony_ci	#define CQ_RES_UD_CQE_TYPE_SFT   1
380762306a36Sopenharmony_ci	#define CQ_RES_UD_CQE_TYPE_RES_UD  (0x2UL << 1)
380862306a36Sopenharmony_ci	#define CQ_RES_UD_CQE_TYPE_LAST   CQ_RES_UD_CQE_TYPE_RES_UD
380962306a36Sopenharmony_ci	u8	status;
381062306a36Sopenharmony_ci	#define CQ_RES_UD_STATUS_OK                       0x0UL
381162306a36Sopenharmony_ci	#define CQ_RES_UD_STATUS_LOCAL_ACCESS_ERROR       0x1UL
381262306a36Sopenharmony_ci	#define CQ_RES_UD_STATUS_HW_LOCAL_LENGTH_ERR      0x2UL
381362306a36Sopenharmony_ci	#define CQ_RES_UD_STATUS_LOCAL_PROTECTION_ERR     0x3UL
381462306a36Sopenharmony_ci	#define CQ_RES_UD_STATUS_LOCAL_QP_OPERATION_ERR   0x4UL
381562306a36Sopenharmony_ci	#define CQ_RES_UD_STATUS_MEMORY_MGT_OPERATION_ERR 0x5UL
381662306a36Sopenharmony_ci	#define CQ_RES_UD_STATUS_WORK_REQUEST_FLUSHED_ERR 0x7UL
381762306a36Sopenharmony_ci	#define CQ_RES_UD_STATUS_HW_FLUSH_ERR             0x8UL
381862306a36Sopenharmony_ci	#define CQ_RES_UD_STATUS_LAST                    CQ_RES_UD_STATUS_HW_FLUSH_ERR
381962306a36Sopenharmony_ci	__le16	flags;
382062306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_SRQ                   0x1UL
382162306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_SRQ_RQ                  0x0UL
382262306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_SRQ_SRQ                 0x1UL
382362306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_SRQ_LAST               CQ_RES_UD_FLAGS_SRQ_SRQ
382462306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_IMM                   0x2UL
382562306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_UNUSED_MASK           0xcUL
382662306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_UNUSED_SFT            2
382762306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_ROCE_IP_VER_MASK      0x30UL
382862306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_ROCE_IP_VER_SFT       4
382962306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_ROCE_IP_VER_V1          (0x0UL << 4)
383062306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_ROCE_IP_VER_V2IPV4      (0x2UL << 4)
383162306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_ROCE_IP_VER_V2IPV6      (0x3UL << 4)
383262306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_ROCE_IP_VER_LAST       CQ_RES_UD_FLAGS_ROCE_IP_VER_V2IPV6
383362306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_META_FORMAT_MASK      0x3c0UL
383462306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_META_FORMAT_SFT       6
383562306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_META_FORMAT_NONE        (0x0UL << 6)
383662306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_META_FORMAT_VLAN        (0x1UL << 6)
383762306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_META_FORMAT_TUNNEL_ID   (0x2UL << 6)
383862306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_META_FORMAT_CHDR_DATA   (0x3UL << 6)
383962306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_META_FORMAT_HDR_OFFSET  (0x4UL << 6)
384062306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_META_FORMAT_LAST       CQ_RES_UD_FLAGS_META_FORMAT_HDR_OFFSET
384162306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_EXT_META_FORMAT_MASK  0xc00UL
384262306a36Sopenharmony_ci	#define CQ_RES_UD_FLAGS_EXT_META_FORMAT_SFT   10
384362306a36Sopenharmony_ci	__le32	src_qp_high_srq_or_rq_wr_id;
384462306a36Sopenharmony_ci	#define CQ_RES_UD_SRQ_OR_RQ_WR_ID_MASK 0xfffffUL
384562306a36Sopenharmony_ci	#define CQ_RES_UD_SRQ_OR_RQ_WR_ID_SFT 0
384662306a36Sopenharmony_ci	#define CQ_RES_UD_SRC_QP_HIGH_MASK    0xff000000UL
384762306a36Sopenharmony_ci	#define CQ_RES_UD_SRC_QP_HIGH_SFT     24
384862306a36Sopenharmony_ci};
384962306a36Sopenharmony_ci
385062306a36Sopenharmony_ci/* cq_res_ud_v2 (size:256b/32B) */
385162306a36Sopenharmony_cistruct cq_res_ud_v2 {
385262306a36Sopenharmony_ci	__le16	length;
385362306a36Sopenharmony_ci	#define CQ_RES_UD_V2_LENGTH_MASK 0x3fffUL
385462306a36Sopenharmony_ci	#define CQ_RES_UD_V2_LENGTH_SFT 0
385562306a36Sopenharmony_ci	__le16	cfa_metadata0;
385662306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA0_VID_MASK 0xfffUL
385762306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA0_VID_SFT 0
385862306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA0_DE      0x1000UL
385962306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA0_PRI_MASK 0xe000UL
386062306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA0_PRI_SFT 13
386162306a36Sopenharmony_ci	__le32	imm_data;
386262306a36Sopenharmony_ci	__le64	qp_handle;
386362306a36Sopenharmony_ci	__le16	src_mac[3];
386462306a36Sopenharmony_ci	__le16	src_qp_low;
386562306a36Sopenharmony_ci	u8	cqe_type_toggle;
386662306a36Sopenharmony_ci	#define CQ_RES_UD_V2_TOGGLE         0x1UL
386762306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CQE_TYPE_MASK  0x1eUL
386862306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CQE_TYPE_SFT   1
386962306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CQE_TYPE_RES_UD  (0x2UL << 1)
387062306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CQE_TYPE_LAST   CQ_RES_UD_V2_CQE_TYPE_RES_UD
387162306a36Sopenharmony_ci	u8	status;
387262306a36Sopenharmony_ci	#define CQ_RES_UD_V2_STATUS_OK                       0x0UL
387362306a36Sopenharmony_ci	#define CQ_RES_UD_V2_STATUS_LOCAL_ACCESS_ERROR       0x1UL
387462306a36Sopenharmony_ci	#define CQ_RES_UD_V2_STATUS_HW_LOCAL_LENGTH_ERR      0x2UL
387562306a36Sopenharmony_ci	#define CQ_RES_UD_V2_STATUS_LOCAL_PROTECTION_ERR     0x3UL
387662306a36Sopenharmony_ci	#define CQ_RES_UD_V2_STATUS_LOCAL_QP_OPERATION_ERR   0x4UL
387762306a36Sopenharmony_ci	#define CQ_RES_UD_V2_STATUS_MEMORY_MGT_OPERATION_ERR 0x5UL
387862306a36Sopenharmony_ci	#define CQ_RES_UD_V2_STATUS_WORK_REQUEST_FLUSHED_ERR 0x7UL
387962306a36Sopenharmony_ci	#define CQ_RES_UD_V2_STATUS_HW_FLUSH_ERR             0x8UL
388062306a36Sopenharmony_ci	#define CQ_RES_UD_V2_STATUS_LAST                    CQ_RES_UD_V2_STATUS_HW_FLUSH_ERR
388162306a36Sopenharmony_ci	__le16	flags;
388262306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_SRQ                    0x1UL
388362306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_SRQ_RQ                   0x0UL
388462306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_SRQ_SRQ                  0x1UL
388562306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_SRQ_LAST                CQ_RES_UD_V2_FLAGS_SRQ_SRQ
388662306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_IMM                    0x2UL
388762306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_UNUSED_MASK            0xcUL
388862306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_UNUSED_SFT             2
388962306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_MASK       0x30UL
389062306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_SFT        4
389162306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_V1           (0x0UL << 4)
389262306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_V2IPV4       (0x2UL << 4)
389362306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_V2IPV6       (0x3UL << 4)
389462306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_LAST        CQ_RES_UD_V2_FLAGS_ROCE_IP_VER_V2IPV6
389562306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_META_FORMAT_MASK       0x3c0UL
389662306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_META_FORMAT_SFT        6
389762306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_META_FORMAT_NONE         (0x0UL << 6)
389862306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_META_FORMAT_ACT_REC_PTR  (0x1UL << 6)
389962306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_META_FORMAT_TUNNEL_ID    (0x2UL << 6)
390062306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_META_FORMAT_CHDR_DATA    (0x3UL << 6)
390162306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_META_FORMAT_HDR_OFFSET   (0x4UL << 6)
390262306a36Sopenharmony_ci	#define CQ_RES_UD_V2_FLAGS_META_FORMAT_LAST        CQ_RES_UD_V2_FLAGS_META_FORMAT_HDR_OFFSET
390362306a36Sopenharmony_ci	__le32	src_qp_high_srq_or_rq_wr_id;
390462306a36Sopenharmony_ci	#define CQ_RES_UD_V2_SRQ_OR_RQ_WR_ID_MASK           0xfffffUL
390562306a36Sopenharmony_ci	#define CQ_RES_UD_V2_SRQ_OR_RQ_WR_ID_SFT            0
390662306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_MASK             0xf00000UL
390762306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_SFT              20
390862306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_MASK     0x700000UL
390962306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_SFT      20
391062306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPID88A8   (0x0UL << 20)
391162306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPID8100   (0x1UL << 20)
391262306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPID9100   (0x2UL << 20)
391362306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPID9200   (0x3UL << 20)
391462306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPID9300   (0x4UL << 20)
391562306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPIDCFG    (0x5UL << 20)
391662306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_LAST CQ_RES_UD_V2_CFA_METADATA1_TPID_SEL_TPIDCFG
391762306a36Sopenharmony_ci	#define CQ_RES_UD_V2_CFA_METADATA1_VALID             0x800000UL
391862306a36Sopenharmony_ci	#define CQ_RES_UD_V2_SRC_QP_HIGH_MASK               0xff000000UL
391962306a36Sopenharmony_ci	#define CQ_RES_UD_V2_SRC_QP_HIGH_SFT                24
392062306a36Sopenharmony_ci};
392162306a36Sopenharmony_ci
392262306a36Sopenharmony_ci/* cq_res_ud_cfa (size:256b/32B) */
392362306a36Sopenharmony_cistruct cq_res_ud_cfa {
392462306a36Sopenharmony_ci	__le16	length;
392562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_LENGTH_MASK 0x3fffUL
392662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_LENGTH_SFT 0
392762306a36Sopenharmony_ci	__le16	cfa_code;
392862306a36Sopenharmony_ci	__le32	imm_data;
392962306a36Sopenharmony_ci	__le32	qid;
393062306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_QID_MASK 0xfffffUL
393162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_QID_SFT 0
393262306a36Sopenharmony_ci	__le32	cfa_metadata;
393362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CFA_METADATA_VID_MASK 0xfffUL
393462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CFA_METADATA_VID_SFT  0
393562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CFA_METADATA_DE       0x1000UL
393662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CFA_METADATA_PRI_MASK 0xe000UL
393762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CFA_METADATA_PRI_SFT  13
393862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CFA_METADATA_TPID_MASK 0xffff0000UL
393962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CFA_METADATA_TPID_SFT 16
394062306a36Sopenharmony_ci	__le16	src_mac[3];
394162306a36Sopenharmony_ci	__le16	src_qp_low;
394262306a36Sopenharmony_ci	u8	cqe_type_toggle;
394362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_TOGGLE             0x1UL
394462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CQE_TYPE_MASK      0x1eUL
394562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CQE_TYPE_SFT       1
394662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CQE_TYPE_RES_UD_CFA  (0x4UL << 1)
394762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_CQE_TYPE_LAST       CQ_RES_UD_CFA_CQE_TYPE_RES_UD_CFA
394862306a36Sopenharmony_ci	u8	status;
394962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_STATUS_OK                       0x0UL
395062306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_STATUS_LOCAL_ACCESS_ERROR       0x1UL
395162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_STATUS_HW_LOCAL_LENGTH_ERR      0x2UL
395262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_STATUS_LOCAL_PROTECTION_ERR     0x3UL
395362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_STATUS_LOCAL_QP_OPERATION_ERR   0x4UL
395462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_STATUS_MEMORY_MGT_OPERATION_ERR 0x5UL
395562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_STATUS_WORK_REQUEST_FLUSHED_ERR 0x7UL
395662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_STATUS_HW_FLUSH_ERR             0x8UL
395762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_STATUS_LAST                    CQ_RES_UD_CFA_STATUS_HW_FLUSH_ERR
395862306a36Sopenharmony_ci	__le16	flags;
395962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_SRQ                   0x1UL
396062306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_SRQ_RQ                  0x0UL
396162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_SRQ_SRQ                 0x1UL
396262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_SRQ_LAST               CQ_RES_UD_CFA_FLAGS_SRQ_SRQ
396362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_IMM                   0x2UL
396462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_UNUSED_MASK           0xcUL
396562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_UNUSED_SFT            2
396662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_MASK      0x30UL
396762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_SFT       4
396862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_V1          (0x0UL << 4)
396962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_V2IPV4      (0x2UL << 4)
397062306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_V2IPV6      (0x3UL << 4)
397162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_LAST       CQ_RES_UD_CFA_FLAGS_ROCE_IP_VER_V2IPV6
397262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_MASK      0x3c0UL
397362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_SFT       6
397462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_NONE        (0x0UL << 6)
397562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_VLAN        (0x1UL << 6)
397662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_TUNNEL_ID   (0x2UL << 6)
397762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_CHDR_DATA   (0x3UL << 6)
397862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_HDR_OFFSET  (0x4UL << 6)
397962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_META_FORMAT_LAST	CQ_RES_UD_CFA_FLAGS_META_FORMAT_HDR_OFFSET
398062306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_EXT_META_FORMAT_MASK  0xc00UL
398162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_FLAGS_EXT_META_FORMAT_SFT   10
398262306a36Sopenharmony_ci	__le32	src_qp_high_srq_or_rq_wr_id;
398362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_SRQ_OR_RQ_WR_ID_MASK 0xfffffUL
398462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_SRQ_OR_RQ_WR_ID_SFT 0
398562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_SRC_QP_HIGH_MASK    0xff000000UL
398662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_SRC_QP_HIGH_SFT     24
398762306a36Sopenharmony_ci};
398862306a36Sopenharmony_ci
398962306a36Sopenharmony_ci/* cq_res_ud_cfa_v2 (size:256b/32B) */
399062306a36Sopenharmony_cistruct cq_res_ud_cfa_v2 {
399162306a36Sopenharmony_ci	__le16	length;
399262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_LENGTH_MASK 0x3fffUL
399362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_LENGTH_SFT 0
399462306a36Sopenharmony_ci	__le16	cfa_metadata0;
399562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA0_VID_MASK 0xfffUL
399662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA0_VID_SFT 0
399762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA0_DE      0x1000UL
399862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA0_PRI_MASK 0xe000UL
399962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA0_PRI_SFT 13
400062306a36Sopenharmony_ci	__le32	imm_data;
400162306a36Sopenharmony_ci	__le32	qid;
400262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_QID_MASK 0xfffffUL
400362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_QID_SFT 0
400462306a36Sopenharmony_ci	__le32	cfa_metadata2;
400562306a36Sopenharmony_ci	__le16	src_mac[3];
400662306a36Sopenharmony_ci	__le16	src_qp_low;
400762306a36Sopenharmony_ci	u8	cqe_type_toggle;
400862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_TOGGLE             0x1UL
400962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CQE_TYPE_MASK      0x1eUL
401062306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CQE_TYPE_SFT       1
401162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CQE_TYPE_RES_UD_CFA  (0x4UL << 1)
401262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CQE_TYPE_LAST       CQ_RES_UD_CFA_V2_CQE_TYPE_RES_UD_CFA
401362306a36Sopenharmony_ci	u8	status;
401462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_STATUS_OK                       0x0UL
401562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_STATUS_LOCAL_ACCESS_ERROR       0x1UL
401662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_STATUS_HW_LOCAL_LENGTH_ERR      0x2UL
401762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_STATUS_LOCAL_PROTECTION_ERR     0x3UL
401862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_STATUS_LOCAL_QP_OPERATION_ERR   0x4UL
401962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_STATUS_MEMORY_MGT_OPERATION_ERR 0x5UL
402062306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_STATUS_WORK_REQUEST_FLUSHED_ERR 0x7UL
402162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_STATUS_HW_FLUSH_ERR             0x8UL
402262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_STATUS_LAST   CQ_RES_UD_CFA_V2_STATUS_HW_FLUSH_ERR
402362306a36Sopenharmony_ci	__le16	flags;
402462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_SRQ                    0x1UL
402562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_SRQ_RQ                   0x0UL
402662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_SRQ_SRQ                  0x1UL
402762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_SRQ_LAST                CQ_RES_UD_CFA_V2_FLAGS_SRQ_SRQ
402862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_IMM                    0x2UL
402962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_UNUSED_MASK            0xcUL
403062306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_UNUSED_SFT             2
403162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_MASK       0x30UL
403262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_SFT        4
403362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_V1           (0x0UL << 4)
403462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_V2IPV4       (0x2UL << 4)
403562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_V2IPV6       (0x3UL << 4)
403662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_LAST  CQ_RES_UD_CFA_V2_FLAGS_ROCE_IP_VER_V2IPV6
403762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_MASK       0x3c0UL
403862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_SFT        6
403962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_NONE         (0x0UL << 6)
404062306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_ACT_REC_PTR  (0x1UL << 6)
404162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_TUNNEL_ID    (0x2UL << 6)
404262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_CHDR_DATA    (0x3UL << 6)
404362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_HDR_OFFSET   (0x4UL << 6)
404462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_LAST \
404562306a36Sopenharmony_ci		CQ_RES_UD_CFA_V2_FLAGS_META_FORMAT_HDR_OFFSET
404662306a36Sopenharmony_ci	__le32	src_qp_high_srq_or_rq_wr_id;
404762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_SRQ_OR_RQ_WR_ID_MASK           0xfffffUL
404862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_SRQ_OR_RQ_WR_ID_SFT            0
404962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_MASK             0xf00000UL
405062306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_SFT              20
405162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_MASK     0x700000UL
405262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_SFT      20
405362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPID88A8   (0x0UL << 20)
405462306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPID8100   (0x1UL << 20)
405562306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPID9100   (0x2UL << 20)
405662306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPID9200   (0x3UL << 20)
405762306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPID9300   (0x4UL << 20)
405862306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPIDCFG    (0x5UL << 20)
405962306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_LAST \
406062306a36Sopenharmony_ci		CQ_RES_UD_CFA_V2_CFA_METADATA1_TPID_SEL_TPIDCFG
406162306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_CFA_METADATA1_VALID             0x800000UL
406262306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_SRC_QP_HIGH_MASK               0xff000000UL
406362306a36Sopenharmony_ci	#define CQ_RES_UD_CFA_V2_SRC_QP_HIGH_SFT                24
406462306a36Sopenharmony_ci};
406562306a36Sopenharmony_ci
406662306a36Sopenharmony_ci/* cq_res_raweth_qp1 (size:256b/32B) */
406762306a36Sopenharmony_cistruct cq_res_raweth_qp1 {
406862306a36Sopenharmony_ci	__le16	length;
406962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_LENGTH_MASK 0x3fffUL
407062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_LENGTH_SFT 0
407162306a36Sopenharmony_ci	__le16	raweth_qp1_flags;
407262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_MASK                  0x3ffUL
407362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_SFT                   0
407462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ERROR                  0x1UL
407562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_MASK             0x3c0UL
407662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_SFT              6
407762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_NOT_KNOWN          (0x0UL << 6)
407862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_IP                 (0x1UL << 6)
407962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_TCP                (0x2UL << 6)
408062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_UDP                (0x3UL << 6)
408162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_FCOE               (0x4UL << 6)
408262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_ROCE               (0x5UL << 6)
408362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_ICMP               (0x7UL << 6)
408462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_PTP_WO_TIMESTAMP   (0x8UL << 6)
408562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_PTP_W_TIMESTAMP    (0x9UL << 6)
408662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_LAST \
408762306a36Sopenharmony_ci		CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_PTP_W_TIMESTAMP
408862306a36Sopenharmony_ci	__le16	raweth_qp1_errors;
408962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_IP_CS_ERROR   0x10UL
409062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_L4_CS_ERROR   0x20UL
409162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_IP_CS_ERROR 0x40UL
409262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_L4_CS_ERROR 0x80UL
409362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_CRC_ERROR     0x100UL
409462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_MASK  0xe00UL
409562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_SFT   9
409662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_NO_ERROR                (0x0UL << 9)
409762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION        (0x1UL << 9)
409862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN        (0x2UL << 9)
409962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_TUNNEL_TOTAL_ERROR      (0x3UL << 9)
410062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR        (0x4UL << 9)
410162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR       (0x5UL << 9)
410262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL            (0x6UL << 9)
410362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_LAST \
410462306a36Sopenharmony_ci		CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL
410562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_MASK                    0xf000UL
410662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_SFT                     12
410762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_NO_ERROR	(0x0UL << 12)
410862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_VERSION	(0x1UL << 12)
410962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN    (0x2UL << 12)
411062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_TTL        (0x3UL << 12)
411162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_IP_TOTAL_ERROR    (0x4UL << 12)
411262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR   (0x5UL << 12)
411362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN    (0x6UL << 12)
411462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL (0x7UL << 12)
411562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN (0x8UL << 12)
411662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_LAST \
411762306a36Sopenharmony_ci		CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
411862306a36Sopenharmony_ci	__le16	raweth_qp1_cfa_code;
411962306a36Sopenharmony_ci	__le64	qp_handle;
412062306a36Sopenharmony_ci	__le32	raweth_qp1_flags2;
412162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_IP_CS_CALC                 0x1UL
412262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_L4_CS_CALC                 0x2UL
412362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_T_IP_CS_CALC               0x4UL
412462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_T_L4_CS_CALC               0x8UL
412562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_MASK           0xf0UL
412662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_SFT            4
412762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_NONE             (0x0UL << 4)
412862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_VLAN             (0x1UL << 4)
412962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_TUNNEL_ID        (0x2UL << 4)
413062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_CHDR_DATA        (0x3UL << 4)
413162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_HDR_OFFSET       (0x4UL << 4)
413262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_LAST \
413362306a36Sopenharmony_ci		CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_HDR_OFFSET
413462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_IP_TYPE                    0x100UL
413562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_CALC     0x200UL
413662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_EXT_META_FORMAT_MASK       0xc00UL
413762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_EXT_META_FORMAT_SFT        10
413862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_MASK     0xffff0000UL
413962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_SFT      16
414062306a36Sopenharmony_ci	__le32	raweth_qp1_metadata;
414162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_PRI_DE_VID_MASK    0xffffUL
414262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_PRI_DE_VID_SFT     0
414362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_VID_MASK           0xfffUL
414462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_VID_SFT            0
414562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_DE                 0x1000UL
414662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_PRI_MASK           0xe000UL
414762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_PRI_SFT            13
414862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_TPID_MASK          0xffff0000UL
414962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_TPID_SFT           16
415062306a36Sopenharmony_ci	u8	cqe_type_toggle;
415162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_TOGGLE                 0x1UL
415262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_CQE_TYPE_MASK          0x1eUL
415362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_CQE_TYPE_SFT           1
415462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_CQE_TYPE_RES_RAWETH_QP1  (0x3UL << 1)
415562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_CQE_TYPE_LAST           CQ_RES_RAWETH_QP1_CQE_TYPE_RES_RAWETH_QP1
415662306a36Sopenharmony_ci	u8	status;
415762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_STATUS_OK                       0x0UL
415862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_STATUS_LOCAL_ACCESS_ERROR       0x1UL
415962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_STATUS_HW_LOCAL_LENGTH_ERR      0x2UL
416062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_STATUS_LOCAL_PROTECTION_ERR     0x3UL
416162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_STATUS_LOCAL_QP_OPERATION_ERR   0x4UL
416262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_STATUS_MEMORY_MGT_OPERATION_ERR 0x5UL
416362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_STATUS_WORK_REQUEST_FLUSHED_ERR 0x7UL
416462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_STATUS_HW_FLUSH_ERR             0x8UL
416562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_STATUS_LAST  CQ_RES_RAWETH_QP1_STATUS_HW_FLUSH_ERR
416662306a36Sopenharmony_ci	__le16	flags;
416762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_FLAGS_SRQ     0x1UL
416862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_FLAGS_SRQ_RQ    0x0UL
416962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ   0x1UL
417062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_FLAGS_SRQ_LAST CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ
417162306a36Sopenharmony_ci	__le32	raweth_qp1_payload_offset_srq_or_rq_wr_id;
417262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_SRQ_OR_RQ_WR_ID_MASK          0xfffffUL
417362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_SRQ_OR_RQ_WR_ID_SFT           0
417462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_PAYLOAD_OFFSET_MASK 0xff000000UL
417562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_RAWETH_QP1_PAYLOAD_OFFSET_SFT 24
417662306a36Sopenharmony_ci};
417762306a36Sopenharmony_ci
417862306a36Sopenharmony_ci/* cq_res_raweth_qp1_v2 (size:256b/32B) */
417962306a36Sopenharmony_cistruct cq_res_raweth_qp1_v2 {
418062306a36Sopenharmony_ci	__le16	length;
418162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_LENGTH_MASK 0x3fffUL
418262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_LENGTH_SFT 0
418362306a36Sopenharmony_ci	__le16	raweth_qp1_flags;
418462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_MASK                  0x3ffUL
418562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_SFT                   0
418662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ERROR                  0x1UL
418762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_MASK             0x3c0UL
418862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_SFT              6
418962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_NOT_KNOWN          (0x0UL << 6)
419062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_IP                 (0x1UL << 6)
419162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_TCP                (0x2UL << 6)
419262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_UDP                (0x3UL << 6)
419362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_FCOE               (0x4UL << 6)
419462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_ROCE               (0x5UL << 6)
419562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_ICMP               (0x7UL << 6)
419662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_PTP_WO_TIMESTAMP   (0x8UL << 6)
419762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_PTP_W_TIMESTAMP    (0x9UL << 6)
419862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_LAST \
419962306a36Sopenharmony_ci		CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS_ITYPE_PTP_W_TIMESTAMP
420062306a36Sopenharmony_ci	__le16	raweth_qp1_errors;
420162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_IP_CS_ERROR                       0x10UL
420262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_L4_CS_ERROR                       0x20UL
420362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_IP_CS_ERROR                     0x40UL
420462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_L4_CS_ERROR                     0x80UL
420562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_CRC_ERROR                         0x100UL
420662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_MASK                  0xe00UL
420762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_SFT                   9
420862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_NO_ERROR (0x0UL << 9)
420962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION (0x1UL << 9)
421062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN (0x2UL << 9)
421162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_TUNNEL_TOTAL_ERROR (0x3UL << 9)
421262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR (0x4UL << 9)
421362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR (0x5UL << 9)
421462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL (0x6UL << 9)
421562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_LAST \
421662306a36Sopenharmony_ci		CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL
421762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_MASK    0xf000UL
421862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_SFT 12
421962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_NO_ERROR   (0x0UL << 12)
422062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_VERSION  (0x1UL << 12)
422162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN  (0x2UL << 12)
422262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_TTL      (0x3UL << 12)
422362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_IP_TOTAL_ERROR  (0x4UL << 12)
422462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR (0x5UL << 12)
422562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN  (0x6UL << 12)
422662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL \
422762306a36Sopenharmony_ci		(0x7UL << 12)
422862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN \
422962306a36Sopenharmony_ci		(0x8UL << 12)
423062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_LAST \
423162306a36Sopenharmony_ci		CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN
423262306a36Sopenharmony_ci	__le16	cfa_metadata0;
423362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA0_VID_MASK 0xfffUL
423462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA0_VID_SFT 0
423562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA0_DE      0x1000UL
423662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA0_PRI_MASK 0xe000UL
423762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA0_PRI_SFT 13
423862306a36Sopenharmony_ci	__le64	qp_handle;
423962306a36Sopenharmony_ci	__le32	raweth_qp1_flags2;
424062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_CS_ALL_OK_MODE             0x8UL
424162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_MASK           0xf0UL
424262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_SFT            4
424362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_NONE             (0x0UL << 4)
424462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_ACT_REC_PTR      (0x1UL << 4)
424562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_TUNNEL_ID        (0x2UL << 4)
424662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_CHDR_DATA        (0x3UL << 4)
424762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_HDR_OFFSET       (0x4UL << 4)
424862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_LAST \
424962306a36Sopenharmony_ci		CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_META_FORMAT_HDR_OFFSET
425062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_IP_TYPE                    0x100UL
425162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_CALC     0x200UL
425262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_CS_OK_MASK                 0xfc00UL
425362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_CS_OK_SFT                  10
425462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_MASK     0xffff0000UL
425562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_FLAGS2_COMPLETE_CHECKSUM_SFT      16
425662306a36Sopenharmony_ci	__le32	cfa_metadata2;
425762306a36Sopenharmony_ci	u8	cqe_type_toggle;
425862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_TOGGLE                 0x1UL
425962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CQE_TYPE_MASK          0x1eUL
426062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CQE_TYPE_SFT           1
426162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CQE_TYPE_RES_RAWETH_QP1  (0x3UL << 1)
426262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CQE_TYPE_LAST CQ_RES_RAWETH_QP1_V2_CQE_TYPE_RES_RAWETH_QP1
426362306a36Sopenharmony_ci	u8	status;
426462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_STATUS_OK                       0x0UL
426562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_STATUS_LOCAL_ACCESS_ERROR       0x1UL
426662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_STATUS_HW_LOCAL_LENGTH_ERR      0x2UL
426762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_STATUS_LOCAL_PROTECTION_ERR     0x3UL
426862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_STATUS_LOCAL_QP_OPERATION_ERR   0x4UL
426962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_STATUS_MEMORY_MGT_OPERATION_ERR 0x5UL
427062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_STATUS_WORK_REQUEST_FLUSHED_ERR 0x7UL
427162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_STATUS_HW_FLUSH_ERR             0x8UL
427262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_STATUS_LAST CQ_RES_RAWETH_QP1_V2_STATUS_HW_FLUSH_ERR
427362306a36Sopenharmony_ci	__le16	flags;
427462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_FLAGS_SRQ     0x1UL
427562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_FLAGS_SRQ_RQ    0x0UL
427662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_FLAGS_SRQ_SRQ   0x1UL
427762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_FLAGS_SRQ_LAST CQ_RES_RAWETH_QP1_V2_FLAGS_SRQ_SRQ
427862306a36Sopenharmony_ci	__le32	raweth_qp1_payload_offset_srq_or_rq_wr_id;
427962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_SRQ_OR_RQ_WR_ID_MASK           0xfffffUL
428062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_SRQ_OR_RQ_WR_ID_SFT            0
428162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_MASK             0xf00000UL
428262306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_SFT              20
428362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_MASK     0x700000UL
428462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_SFT      20
428562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPID88A8   (0x0UL << 20)
428662306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPID8100   (0x1UL << 20)
428762306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPID9100   (0x2UL << 20)
428862306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPID9200   (0x3UL << 20)
428962306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPID9300   (0x4UL << 20)
429062306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPIDCFG    (0x5UL << 20)
429162306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_LAST \
429262306a36Sopenharmony_ci		CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_TPID_SEL_TPIDCFG
429362306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_CFA_METADATA1_VALID             0x800000UL
429462306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_PAYLOAD_OFFSET_MASK 0xff000000UL
429562306a36Sopenharmony_ci	#define CQ_RES_RAWETH_QP1_V2_RAWETH_QP1_PAYLOAD_OFFSET_SFT  24
429662306a36Sopenharmony_ci};
429762306a36Sopenharmony_ci
429862306a36Sopenharmony_ci/* cq_terminal (size:256b/32B) */
429962306a36Sopenharmony_cistruct cq_terminal {
430062306a36Sopenharmony_ci	__le64	qp_handle;
430162306a36Sopenharmony_ci	__le16	sq_cons_idx;
430262306a36Sopenharmony_ci	__le16	rq_cons_idx;
430362306a36Sopenharmony_ci	__le32	reserved32_1;
430462306a36Sopenharmony_ci	__le64	reserved64_3;
430562306a36Sopenharmony_ci	u8	cqe_type_toggle;
430662306a36Sopenharmony_ci	#define CQ_TERMINAL_TOGGLE           0x1UL
430762306a36Sopenharmony_ci	#define CQ_TERMINAL_CQE_TYPE_MASK    0x1eUL
430862306a36Sopenharmony_ci	#define CQ_TERMINAL_CQE_TYPE_SFT     1
430962306a36Sopenharmony_ci	#define CQ_TERMINAL_CQE_TYPE_TERMINAL  (0xeUL << 1)
431062306a36Sopenharmony_ci	#define CQ_TERMINAL_CQE_TYPE_LAST     CQ_TERMINAL_CQE_TYPE_TERMINAL
431162306a36Sopenharmony_ci	u8	status;
431262306a36Sopenharmony_ci	#define CQ_TERMINAL_STATUS_OK 0x0UL
431362306a36Sopenharmony_ci	#define CQ_TERMINAL_STATUS_LAST CQ_TERMINAL_STATUS_OK
431462306a36Sopenharmony_ci	__le16	reserved16;
431562306a36Sopenharmony_ci	__le32	reserved32_2;
431662306a36Sopenharmony_ci};
431762306a36Sopenharmony_ci
431862306a36Sopenharmony_ci/* cq_cutoff (size:256b/32B) */
431962306a36Sopenharmony_cistruct cq_cutoff {
432062306a36Sopenharmony_ci	__le64	reserved64_1;
432162306a36Sopenharmony_ci	__le64	reserved64_2;
432262306a36Sopenharmony_ci	__le64	reserved64_3;
432362306a36Sopenharmony_ci	u8	cqe_type_toggle;
432462306a36Sopenharmony_ci	#define CQ_CUTOFF_TOGGLE          0x1UL
432562306a36Sopenharmony_ci	#define CQ_CUTOFF_CQE_TYPE_MASK   0x1eUL
432662306a36Sopenharmony_ci	#define CQ_CUTOFF_CQE_TYPE_SFT    1
432762306a36Sopenharmony_ci	#define CQ_CUTOFF_CQE_TYPE_CUT_OFF  (0xfUL << 1)
432862306a36Sopenharmony_ci	#define CQ_CUTOFF_CQE_TYPE_LAST    CQ_CUTOFF_CQE_TYPE_CUT_OFF
432962306a36Sopenharmony_ci	u8	status;
433062306a36Sopenharmony_ci	#define CQ_CUTOFF_STATUS_OK 0x0UL
433162306a36Sopenharmony_ci	#define CQ_CUTOFF_STATUS_LAST CQ_CUTOFF_STATUS_OK
433262306a36Sopenharmony_ci	__le16	reserved16;
433362306a36Sopenharmony_ci	__le32	reserved32;
433462306a36Sopenharmony_ci};
433562306a36Sopenharmony_ci
433662306a36Sopenharmony_ci/* nq_base (size:128b/16B) */
433762306a36Sopenharmony_cistruct nq_base {
433862306a36Sopenharmony_ci	__le16	info10_type;
433962306a36Sopenharmony_ci	#define NQ_BASE_TYPE_MASK           0x3fUL
434062306a36Sopenharmony_ci	#define NQ_BASE_TYPE_SFT            0
434162306a36Sopenharmony_ci	#define NQ_BASE_TYPE_CQ_NOTIFICATION  0x30UL
434262306a36Sopenharmony_ci	#define NQ_BASE_TYPE_SRQ_EVENT        0x32UL
434362306a36Sopenharmony_ci	#define NQ_BASE_TYPE_DBQ_EVENT        0x34UL
434462306a36Sopenharmony_ci	#define NQ_BASE_TYPE_QP_EVENT         0x38UL
434562306a36Sopenharmony_ci	#define NQ_BASE_TYPE_FUNC_EVENT       0x3aUL
434662306a36Sopenharmony_ci	#define NQ_BASE_TYPE_LAST            NQ_BASE_TYPE_FUNC_EVENT
434762306a36Sopenharmony_ci	#define NQ_BASE_INFO10_MASK         0xffc0UL
434862306a36Sopenharmony_ci	#define NQ_BASE_INFO10_SFT          6
434962306a36Sopenharmony_ci	__le16	info16;
435062306a36Sopenharmony_ci	__le32	info32;
435162306a36Sopenharmony_ci	__le32	info63_v[2];
435262306a36Sopenharmony_ci	#define NQ_BASE_V          0x1UL
435362306a36Sopenharmony_ci	#define NQ_BASE_INFO63_MASK 0xfffffffeUL
435462306a36Sopenharmony_ci	#define NQ_BASE_INFO63_SFT 1
435562306a36Sopenharmony_ci};
435662306a36Sopenharmony_ci
435762306a36Sopenharmony_ci/* nq_cn (size:128b/16B) */
435862306a36Sopenharmony_cistruct nq_cn {
435962306a36Sopenharmony_ci	__le16	type;
436062306a36Sopenharmony_ci	#define NQ_CN_TYPE_MASK           0x3fUL
436162306a36Sopenharmony_ci	#define NQ_CN_TYPE_SFT            0
436262306a36Sopenharmony_ci	#define NQ_CN_TYPE_CQ_NOTIFICATION  0x30UL
436362306a36Sopenharmony_ci	#define NQ_CN_TYPE_LAST            NQ_CN_TYPE_CQ_NOTIFICATION
436462306a36Sopenharmony_ci	#define NQ_CN_TOGGLE_MASK         0xc0UL
436562306a36Sopenharmony_ci	#define NQ_CN_TOGGLE_SFT          6
436662306a36Sopenharmony_ci	__le16	reserved16;
436762306a36Sopenharmony_ci	__le32	cq_handle_low;
436862306a36Sopenharmony_ci	__le32	v;
436962306a36Sopenharmony_ci	#define NQ_CN_V     0x1UL
437062306a36Sopenharmony_ci	__le32	cq_handle_high;
437162306a36Sopenharmony_ci};
437262306a36Sopenharmony_ci
437362306a36Sopenharmony_ci/* nq_srq_event (size:128b/16B) */
437462306a36Sopenharmony_cistruct nq_srq_event {
437562306a36Sopenharmony_ci	u8	type;
437662306a36Sopenharmony_ci	#define NQ_SRQ_EVENT_TYPE_MASK     0x3fUL
437762306a36Sopenharmony_ci	#define NQ_SRQ_EVENT_TYPE_SFT      0
437862306a36Sopenharmony_ci	#define NQ_SRQ_EVENT_TYPE_SRQ_EVENT  0x32UL
437962306a36Sopenharmony_ci	#define NQ_SRQ_EVENT_TYPE_LAST      NQ_SRQ_EVENT_TYPE_SRQ_EVENT
438062306a36Sopenharmony_ci	u8	event;
438162306a36Sopenharmony_ci	#define NQ_SRQ_EVENT_EVENT_SRQ_THRESHOLD_EVENT 0x1UL
438262306a36Sopenharmony_ci	#define NQ_SRQ_EVENT_EVENT_LAST               NQ_SRQ_EVENT_EVENT_SRQ_THRESHOLD_EVENT
438362306a36Sopenharmony_ci	__le16	reserved16;
438462306a36Sopenharmony_ci	__le32	srq_handle_low;
438562306a36Sopenharmony_ci	__le32	v;
438662306a36Sopenharmony_ci	#define NQ_SRQ_EVENT_V     0x1UL
438762306a36Sopenharmony_ci	__le32	srq_handle_high;
438862306a36Sopenharmony_ci};
438962306a36Sopenharmony_ci
439062306a36Sopenharmony_ci/* nq_dbq_event (size:128b/16B) */
439162306a36Sopenharmony_cistruct nq_dbq_event {
439262306a36Sopenharmony_ci	u8	type;
439362306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_TYPE_MASK     0x3fUL
439462306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_TYPE_SFT      0
439562306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_TYPE_DBQ_EVENT  0x34UL
439662306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_TYPE_LAST      NQ_DBQ_EVENT_TYPE_DBQ_EVENT
439762306a36Sopenharmony_ci	u8	event;
439862306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_EVENT_DBQ_THRESHOLD_EVENT 0x1UL
439962306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_EVENT_LAST               NQ_DBQ_EVENT_EVENT_DBQ_THRESHOLD_EVENT
440062306a36Sopenharmony_ci	__le16	db_pfid;
440162306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_DB_PFID_MASK 0xfUL
440262306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_DB_PFID_SFT 0
440362306a36Sopenharmony_ci	__le32	db_dpi;
440462306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_DB_DPI_MASK 0xfffffUL
440562306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_DB_DPI_SFT 0
440662306a36Sopenharmony_ci	__le32	v;
440762306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_V     0x1UL
440862306a36Sopenharmony_ci	__le32	db_type_db_xid;
440962306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_DB_XID_MASK 0xfffffUL
441062306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_DB_XID_SFT  0
441162306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_DB_TYPE_MASK 0xf0000000UL
441262306a36Sopenharmony_ci	#define NQ_DBQ_EVENT_DB_TYPE_SFT 28
441362306a36Sopenharmony_ci};
441462306a36Sopenharmony_ci
441562306a36Sopenharmony_ci/* xrrq_irrq (size:256b/32B) */
441662306a36Sopenharmony_cistruct xrrq_irrq {
441762306a36Sopenharmony_ci	__le16	credits_type;
441862306a36Sopenharmony_ci	#define XRRQ_IRRQ_TYPE           0x1UL
441962306a36Sopenharmony_ci	#define XRRQ_IRRQ_TYPE_READ_REQ    0x0UL
442062306a36Sopenharmony_ci	#define XRRQ_IRRQ_TYPE_ATOMIC_REQ  0x1UL
442162306a36Sopenharmony_ci	#define XRRQ_IRRQ_TYPE_LAST       XRRQ_IRRQ_TYPE_ATOMIC_REQ
442262306a36Sopenharmony_ci	#define XRRQ_IRRQ_CREDITS_MASK   0xf800UL
442362306a36Sopenharmony_ci	#define XRRQ_IRRQ_CREDITS_SFT    11
442462306a36Sopenharmony_ci	__le16	reserved16;
442562306a36Sopenharmony_ci	__le32	reserved32;
442662306a36Sopenharmony_ci	__le32	psn;
442762306a36Sopenharmony_ci	#define XRRQ_IRRQ_PSN_MASK 0xffffffUL
442862306a36Sopenharmony_ci	#define XRRQ_IRRQ_PSN_SFT 0
442962306a36Sopenharmony_ci	__le32	msn;
443062306a36Sopenharmony_ci	#define XRRQ_IRRQ_MSN_MASK 0xffffffUL
443162306a36Sopenharmony_ci	#define XRRQ_IRRQ_MSN_SFT 0
443262306a36Sopenharmony_ci	__le64	va_or_atomic_result;
443362306a36Sopenharmony_ci	__le32	rdma_r_key;
443462306a36Sopenharmony_ci	__le32	length;
443562306a36Sopenharmony_ci};
443662306a36Sopenharmony_ci
443762306a36Sopenharmony_ci/* xrrq_orrq (size:256b/32B) */
443862306a36Sopenharmony_cistruct xrrq_orrq {
443962306a36Sopenharmony_ci	__le16	num_sges_type;
444062306a36Sopenharmony_ci	#define XRRQ_ORRQ_TYPE           0x1UL
444162306a36Sopenharmony_ci	#define XRRQ_ORRQ_TYPE_READ_REQ    0x0UL
444262306a36Sopenharmony_ci	#define XRRQ_ORRQ_TYPE_ATOMIC_REQ  0x1UL
444362306a36Sopenharmony_ci	#define XRRQ_ORRQ_TYPE_LAST       XRRQ_ORRQ_TYPE_ATOMIC_REQ
444462306a36Sopenharmony_ci	#define XRRQ_ORRQ_NUM_SGES_MASK  0xf800UL
444562306a36Sopenharmony_ci	#define XRRQ_ORRQ_NUM_SGES_SFT   11
444662306a36Sopenharmony_ci	__le16	reserved16;
444762306a36Sopenharmony_ci	__le32	length;
444862306a36Sopenharmony_ci	__le32	psn;
444962306a36Sopenharmony_ci	#define XRRQ_ORRQ_PSN_MASK 0xffffffUL
445062306a36Sopenharmony_ci	#define XRRQ_ORRQ_PSN_SFT 0
445162306a36Sopenharmony_ci	__le32	end_psn;
445262306a36Sopenharmony_ci	#define XRRQ_ORRQ_END_PSN_MASK 0xffffffUL
445362306a36Sopenharmony_ci	#define XRRQ_ORRQ_END_PSN_SFT 0
445462306a36Sopenharmony_ci	__le64	first_sge_phy_or_sing_sge_va;
445562306a36Sopenharmony_ci	__le32	single_sge_l_key;
445662306a36Sopenharmony_ci	__le32	single_sge_size;
445762306a36Sopenharmony_ci};
445862306a36Sopenharmony_ci
445962306a36Sopenharmony_ci/* ptu_pte (size:64b/8B) */
446062306a36Sopenharmony_cistruct ptu_pte {
446162306a36Sopenharmony_ci	__le32	page_next_to_last_last_valid[2];
446262306a36Sopenharmony_ci	#define PTU_PTE_VALID            0x1UL
446362306a36Sopenharmony_ci	#define PTU_PTE_LAST             0x2UL
446462306a36Sopenharmony_ci	#define PTU_PTE_NEXT_TO_LAST     0x4UL
446562306a36Sopenharmony_ci	#define PTU_PTE_UNUSED_MASK      0xff8UL
446662306a36Sopenharmony_ci	#define PTU_PTE_UNUSED_SFT       3
446762306a36Sopenharmony_ci	#define PTU_PTE_PAGE_MASK        0xfffff000UL
446862306a36Sopenharmony_ci	#define PTU_PTE_PAGE_SFT         12
446962306a36Sopenharmony_ci};
447062306a36Sopenharmony_ci
447162306a36Sopenharmony_ci/* ptu_pde (size:64b/8B) */
447262306a36Sopenharmony_cistruct ptu_pde {
447362306a36Sopenharmony_ci	__le32	page_valid[2];
447462306a36Sopenharmony_ci	#define PTU_PDE_VALID      0x1UL
447562306a36Sopenharmony_ci	#define PTU_PDE_UNUSED_MASK 0xffeUL
447662306a36Sopenharmony_ci	#define PTU_PDE_UNUSED_SFT 1
447762306a36Sopenharmony_ci	#define PTU_PDE_PAGE_MASK  0xfffff000UL
447862306a36Sopenharmony_ci	#define PTU_PDE_PAGE_SFT   12
447962306a36Sopenharmony_ci};
448062306a36Sopenharmony_ci
448162306a36Sopenharmony_ci#endif /* ___BNXT_RE_HSI_H__ */
4482