18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Broadcom NetXtreme-E RoCE driver. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (c) 2016 - 2017, Broadcom. All rights reserved. The term 58c2ecf20Sopenharmony_ci * Broadcom refers to Broadcom Limited and/or its subsidiaries. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * This software is available to you under a choice of one of two 88c2ecf20Sopenharmony_ci * licenses. You may choose to be licensed under the terms of the GNU 98c2ecf20Sopenharmony_ci * General Public License (GPL) Version 2, available from the file 108c2ecf20Sopenharmony_ci * COPYING in the main directory of this source tree, or the 118c2ecf20Sopenharmony_ci * BSD license below: 128c2ecf20Sopenharmony_ci * 138c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 148c2ecf20Sopenharmony_ci * modification, are permitted provided that the following conditions 158c2ecf20Sopenharmony_ci * are met: 168c2ecf20Sopenharmony_ci * 178c2ecf20Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright 188c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer. 198c2ecf20Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright 208c2ecf20Sopenharmony_ci * notice, this list of conditions and the following disclaimer in 218c2ecf20Sopenharmony_ci * the documentation and/or other materials provided with the 228c2ecf20Sopenharmony_ci * distribution. 238c2ecf20Sopenharmony_ci * 248c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' 258c2ecf20Sopenharmony_ci * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 268c2ecf20Sopenharmony_ci * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 278c2ecf20Sopenharmony_ci * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 288c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 298c2ecf20Sopenharmony_ci * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 308c2ecf20Sopenharmony_ci * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 318c2ecf20Sopenharmony_ci * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 328c2ecf20Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 338c2ecf20Sopenharmony_ci * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 348c2ecf20Sopenharmony_ci * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 358c2ecf20Sopenharmony_ci * 368c2ecf20Sopenharmony_ci * Description: RoCE HSI File - Autogenerated 378c2ecf20Sopenharmony_ci */ 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#ifndef __BNXT_RE_HSI_H__ 408c2ecf20Sopenharmony_ci#define __BNXT_RE_HSI_H__ 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci/* include bnxt_hsi.h from bnxt_en driver */ 438c2ecf20Sopenharmony_ci#include "bnxt_hsi.h" 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci/* CMP Door Bell Format (4 bytes) */ 468c2ecf20Sopenharmony_cistruct cmpl_doorbell { 478c2ecf20Sopenharmony_ci __le32 key_mask_valid_idx; 488c2ecf20Sopenharmony_ci #define CMPL_DOORBELL_IDX_MASK 0xffffffUL 498c2ecf20Sopenharmony_ci #define CMPL_DOORBELL_IDX_SFT 0 508c2ecf20Sopenharmony_ci #define CMPL_DOORBELL_RESERVED_MASK 0x3000000UL 518c2ecf20Sopenharmony_ci #define CMPL_DOORBELL_RESERVED_SFT 24 528c2ecf20Sopenharmony_ci #define CMPL_DOORBELL_IDX_VALID 0x4000000UL 538c2ecf20Sopenharmony_ci #define CMPL_DOORBELL_MASK 0x8000000UL 548c2ecf20Sopenharmony_ci #define CMPL_DOORBELL_KEY_MASK 0xf0000000UL 558c2ecf20Sopenharmony_ci #define CMPL_DOORBELL_KEY_SFT 28 568c2ecf20Sopenharmony_ci #define CMPL_DOORBELL_KEY_CMPL (0x2UL << 28) 578c2ecf20Sopenharmony_ci}; 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci/* Status Door Bell Format (4 bytes) */ 608c2ecf20Sopenharmony_cistruct status_doorbell { 618c2ecf20Sopenharmony_ci __le32 key_idx; 628c2ecf20Sopenharmony_ci #define STATUS_DOORBELL_IDX_MASK 0xffffffUL 638c2ecf20Sopenharmony_ci #define STATUS_DOORBELL_IDX_SFT 0 648c2ecf20Sopenharmony_ci #define STATUS_DOORBELL_RESERVED_MASK 0xf000000UL 658c2ecf20Sopenharmony_ci #define STATUS_DOORBELL_RESERVED_SFT 24 668c2ecf20Sopenharmony_ci #define STATUS_DOORBELL_KEY_MASK 0xf0000000UL 678c2ecf20Sopenharmony_ci #define STATUS_DOORBELL_KEY_SFT 28 688c2ecf20Sopenharmony_ci #define STATUS_DOORBELL_KEY_STAT (0x3UL << 28) 698c2ecf20Sopenharmony_ci}; 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci/* RoCE Host Structures */ 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci/* Doorbell Structures */ 748c2ecf20Sopenharmony_ci/* dbc_dbc (size:64b/8B) */ 758c2ecf20Sopenharmony_cistruct dbc_dbc { 768c2ecf20Sopenharmony_ci __le32 index; 778c2ecf20Sopenharmony_ci #define DBC_DBC_INDEX_MASK 0xffffffUL 788c2ecf20Sopenharmony_ci #define DBC_DBC_INDEX_SFT 0 798c2ecf20Sopenharmony_ci __le32 type_path_xid; 808c2ecf20Sopenharmony_ci #define DBC_DBC_XID_MASK 0xfffffUL 818c2ecf20Sopenharmony_ci #define DBC_DBC_XID_SFT 0 828c2ecf20Sopenharmony_ci #define DBC_DBC_PATH_MASK 0x3000000UL 838c2ecf20Sopenharmony_ci #define DBC_DBC_PATH_SFT 24 848c2ecf20Sopenharmony_ci #define DBC_DBC_PATH_ROCE (0x0UL << 24) 858c2ecf20Sopenharmony_ci #define DBC_DBC_PATH_L2 (0x1UL << 24) 868c2ecf20Sopenharmony_ci #define DBC_DBC_PATH_ENGINE (0x2UL << 24) 878c2ecf20Sopenharmony_ci #define DBC_DBC_PATH_LAST DBC_DBC_PATH_ENGINE 888c2ecf20Sopenharmony_ci #define DBC_DBC_DEBUG_TRACE 0x8000000UL 898c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_MASK 0xf0000000UL 908c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_SFT 28 918c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_SQ (0x0UL << 28) 928c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_RQ (0x1UL << 28) 938c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_SRQ (0x2UL << 28) 948c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_SRQ_ARM (0x3UL << 28) 958c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_CQ (0x4UL << 28) 968c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_CQ_ARMSE (0x5UL << 28) 978c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_CQ_ARMALL (0x6UL << 28) 988c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_CQ_ARMENA (0x7UL << 28) 998c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_SRQ_ARMENA (0x8UL << 28) 1008c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_CQ_CUTOFF_ACK (0x9UL << 28) 1018c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_NQ (0xaUL << 28) 1028c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_NQ_ARM (0xbUL << 28) 1038c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_NULL (0xfUL << 28) 1048c2ecf20Sopenharmony_ci #define DBC_DBC_TYPE_LAST DBC_DBC_TYPE_NULL 1058c2ecf20Sopenharmony_ci}; 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ci/* dbc_dbc32 (size:32b/4B) */ 1088c2ecf20Sopenharmony_cistruct dbc_dbc32 { 1098c2ecf20Sopenharmony_ci __le32 type_abs_incr_xid; 1108c2ecf20Sopenharmony_ci #define DBC_DBC32_XID_MASK 0xfffffUL 1118c2ecf20Sopenharmony_ci #define DBC_DBC32_XID_SFT 0 1128c2ecf20Sopenharmony_ci #define DBC_DBC32_PATH_MASK 0xc00000UL 1138c2ecf20Sopenharmony_ci #define DBC_DBC32_PATH_SFT 22 1148c2ecf20Sopenharmony_ci #define DBC_DBC32_PATH_ROCE (0x0UL << 22) 1158c2ecf20Sopenharmony_ci #define DBC_DBC32_PATH_L2 (0x1UL << 22) 1168c2ecf20Sopenharmony_ci #define DBC_DBC32_PATH_LAST DBC_DBC32_PATH_L2 1178c2ecf20Sopenharmony_ci #define DBC_DBC32_INCR_MASK 0xf000000UL 1188c2ecf20Sopenharmony_ci #define DBC_DBC32_INCR_SFT 24 1198c2ecf20Sopenharmony_ci #define DBC_DBC32_ABS 0x10000000UL 1208c2ecf20Sopenharmony_ci #define DBC_DBC32_TYPE_MASK 0xe0000000UL 1218c2ecf20Sopenharmony_ci #define DBC_DBC32_TYPE_SFT 29 1228c2ecf20Sopenharmony_ci #define DBC_DBC32_TYPE_SQ (0x0UL << 29) 1238c2ecf20Sopenharmony_ci #define DBC_DBC32_TYPE_LAST DBC_DBC32_TYPE_SQ 1248c2ecf20Sopenharmony_ci}; 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_ci/* SQ WQE Structures */ 1278c2ecf20Sopenharmony_ci/* Base SQ WQE (8 bytes) */ 1288c2ecf20Sopenharmony_cistruct sq_base { 1298c2ecf20Sopenharmony_ci u8 wqe_type; 1308c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_SEND 0x0UL 1318c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_SEND_W_IMMEAD 0x1UL 1328c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_SEND_W_INVALID 0x2UL 1338c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_WRITE_WQE 0x4UL 1348c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_WRITE_W_IMMEAD 0x5UL 1358c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_READ_WQE 0x6UL 1368c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_ATOMIC_CS 0x8UL 1378c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_ATOMIC_FA 0xbUL 1388c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_LOCAL_INVALID 0xcUL 1398c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_FR_PMR 0xdUL 1408c2ecf20Sopenharmony_ci #define SQ_BASE_WQE_TYPE_BIND 0xeUL 1418c2ecf20Sopenharmony_ci u8 unused_0[7]; 1428c2ecf20Sopenharmony_ci}; 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci/* WQE SGE (16 bytes) */ 1458c2ecf20Sopenharmony_cistruct sq_sge { 1468c2ecf20Sopenharmony_ci __le64 va_or_pa; 1478c2ecf20Sopenharmony_ci __le32 l_key; 1488c2ecf20Sopenharmony_ci __le32 size; 1498c2ecf20Sopenharmony_ci}; 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci/* PSN Search Structure (8 bytes) */ 1528c2ecf20Sopenharmony_cistruct sq_psn_search { 1538c2ecf20Sopenharmony_ci __le32 opcode_start_psn; 1548c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_START_PSN_MASK 0xffffffUL 1558c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_START_PSN_SFT 0 1568c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_OPCODE_MASK 0xff000000UL 1578c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_OPCODE_SFT 24 1588c2ecf20Sopenharmony_ci __le32 flags_next_psn; 1598c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_NEXT_PSN_MASK 0xffffffUL 1608c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_NEXT_PSN_SFT 0 1618c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_FLAGS_MASK 0xff000000UL 1628c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_FLAGS_SFT 24 1638c2ecf20Sopenharmony_ci}; 1648c2ecf20Sopenharmony_ci 1658c2ecf20Sopenharmony_ci/* sq_psn_search_ext (size:128b/16B) */ 1668c2ecf20Sopenharmony_cistruct sq_psn_search_ext { 1678c2ecf20Sopenharmony_ci __le32 opcode_start_psn; 1688c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_EXT_START_PSN_MASK 0xffffffUL 1698c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_EXT_START_PSN_SFT 0 1708c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_EXT_OPCODE_MASK 0xff000000UL 1718c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_EXT_OPCODE_SFT 24 1728c2ecf20Sopenharmony_ci __le32 flags_next_psn; 1738c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_EXT_NEXT_PSN_MASK 0xffffffUL 1748c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_EXT_NEXT_PSN_SFT 0 1758c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_EXT_FLAGS_MASK 0xff000000UL 1768c2ecf20Sopenharmony_ci #define SQ_PSN_SEARCH_EXT_FLAGS_SFT 24 1778c2ecf20Sopenharmony_ci __le16 start_slot_idx; 1788c2ecf20Sopenharmony_ci __le16 reserved16; 1798c2ecf20Sopenharmony_ci __le32 reserved32; 1808c2ecf20Sopenharmony_ci}; 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_ci/* Send SQ WQE (40 bytes) */ 1838c2ecf20Sopenharmony_cistruct sq_send { 1848c2ecf20Sopenharmony_ci u8 wqe_type; 1858c2ecf20Sopenharmony_ci #define SQ_SEND_WQE_TYPE_SEND 0x0UL 1868c2ecf20Sopenharmony_ci #define SQ_SEND_WQE_TYPE_SEND_W_IMMEAD 0x1UL 1878c2ecf20Sopenharmony_ci #define SQ_SEND_WQE_TYPE_SEND_W_INVALID 0x2UL 1888c2ecf20Sopenharmony_ci u8 flags; 1898c2ecf20Sopenharmony_ci #define SQ_SEND_FLAGS_SIGNAL_COMP 0x1UL 1908c2ecf20Sopenharmony_ci #define SQ_SEND_FLAGS_RD_OR_ATOMIC_FENCE 0x2UL 1918c2ecf20Sopenharmony_ci #define SQ_SEND_FLAGS_UC_FENCE 0x4UL 1928c2ecf20Sopenharmony_ci #define SQ_SEND_FLAGS_SE 0x8UL 1938c2ecf20Sopenharmony_ci #define SQ_SEND_FLAGS_INLINE 0x10UL 1948c2ecf20Sopenharmony_ci u8 wqe_size; 1958c2ecf20Sopenharmony_ci u8 reserved8_1; 1968c2ecf20Sopenharmony_ci __le32 inv_key_or_imm_data; 1978c2ecf20Sopenharmony_ci __le32 length; 1988c2ecf20Sopenharmony_ci __le32 q_key; 1998c2ecf20Sopenharmony_ci __le32 dst_qp; 2008c2ecf20Sopenharmony_ci #define SQ_SEND_DST_QP_MASK 0xffffffUL 2018c2ecf20Sopenharmony_ci #define SQ_SEND_DST_QP_SFT 0 2028c2ecf20Sopenharmony_ci #define SQ_SEND_RESERVED8_2_MASK 0xff000000UL 2038c2ecf20Sopenharmony_ci #define SQ_SEND_RESERVED8_2_SFT 24 2048c2ecf20Sopenharmony_ci __le32 avid; 2058c2ecf20Sopenharmony_ci #define SQ_SEND_AVID_MASK 0xfffffUL 2068c2ecf20Sopenharmony_ci #define SQ_SEND_AVID_SFT 0 2078c2ecf20Sopenharmony_ci #define SQ_SEND_RESERVED_AVID_MASK 0xfff00000UL 2088c2ecf20Sopenharmony_ci #define SQ_SEND_RESERVED_AVID_SFT 20 2098c2ecf20Sopenharmony_ci __le64 reserved64; 2108c2ecf20Sopenharmony_ci __le32 data[24]; 2118c2ecf20Sopenharmony_ci}; 2128c2ecf20Sopenharmony_ci 2138c2ecf20Sopenharmony_ci/* sq_send_hdr (size:256b/32B) */ 2148c2ecf20Sopenharmony_cistruct sq_send_hdr { 2158c2ecf20Sopenharmony_ci u8 wqe_type; 2168c2ecf20Sopenharmony_ci u8 flags; 2178c2ecf20Sopenharmony_ci u8 wqe_size; 2188c2ecf20Sopenharmony_ci u8 reserved8_1; 2198c2ecf20Sopenharmony_ci __le32 inv_key_or_imm_data; 2208c2ecf20Sopenharmony_ci __le32 length; 2218c2ecf20Sopenharmony_ci __le32 q_key; 2228c2ecf20Sopenharmony_ci __le32 dst_qp; 2238c2ecf20Sopenharmony_ci __le32 avid; 2248c2ecf20Sopenharmony_ci __le64 reserved64; 2258c2ecf20Sopenharmony_ci}; 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_ci/* Send Raw Ethernet and QP1 SQ WQE (40 bytes) */ 2288c2ecf20Sopenharmony_cistruct sq_send_raweth_qp1 { 2298c2ecf20Sopenharmony_ci u8 wqe_type; 2308c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_WQE_TYPE_SEND 0x0UL 2318c2ecf20Sopenharmony_ci u8 flags; 2328c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_FLAGS_SIGNAL_COMP 0x1UL 2338c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_FLAGS_RD_OR_ATOMIC_FENCE 0x2UL 2348c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_FLAGS_UC_FENCE 0x4UL 2358c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_FLAGS_SE 0x8UL 2368c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_FLAGS_INLINE 0x10UL 2378c2ecf20Sopenharmony_ci u8 wqe_size; 2388c2ecf20Sopenharmony_ci u8 reserved8; 2398c2ecf20Sopenharmony_ci __le16 lflags; 2408c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_LFLAGS_TCP_UDP_CHKSUM 0x1UL 2418c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_LFLAGS_IP_CHKSUM 0x2UL 2428c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_LFLAGS_NOCRC 0x4UL 2438c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_LFLAGS_STAMP 0x8UL 2448c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_LFLAGS_T_IP_CHKSUM 0x10UL 2458c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_LFLAGS_RESERVED1_1 0x20UL 2468c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_LFLAGS_RESERVED1_2 0x40UL 2478c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_LFLAGS_RESERVED1_3 0x80UL 2488c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_LFLAGS_ROCE_CRC 0x100UL 2498c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_LFLAGS_FCOE_CRC 0x200UL 2508c2ecf20Sopenharmony_ci __le16 cfa_action; 2518c2ecf20Sopenharmony_ci __le32 length; 2528c2ecf20Sopenharmony_ci __le32 reserved32_1; 2538c2ecf20Sopenharmony_ci __le32 cfa_meta; 2548c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_VID_MASK 0xfffUL 2558c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_VID_SFT 0 2568c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_DE 0x1000UL 2578c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_PRI_MASK 0xe000UL 2588c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_PRI_SFT 13 2598c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_MASK 0x70000UL 2608c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_SFT 16 2618c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID88A8 (0x0UL << 16) 2628c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID8100 (0x1UL << 16) 2638c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID9100 (0x2UL << 16) 2648c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID9200 (0x3UL << 16) 2658c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPID9300 (0x4UL << 16) 2668c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPIDCFG (0x5UL << 16) 2678c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_LAST \ 2688c2ecf20Sopenharmony_ci SQ_SEND_RAWETH_QP1_CFA_META_VLAN_TPID_TPIDCFG 2698c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_RESERVED_MASK 0xff80000UL 2708c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_VLAN_RESERVED_SFT 19 2718c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_KEY_MASK 0xf0000000UL 2728c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_KEY_SFT 28 2738c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_KEY_NONE (0x0UL << 28) 2748c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_KEY_VLAN_TAG (0x1UL << 28) 2758c2ecf20Sopenharmony_ci #define SQ_SEND_RAWETH_QP1_CFA_META_KEY_LAST \ 2768c2ecf20Sopenharmony_ci SQ_SEND_RAWETH_QP1_CFA_META_KEY_VLAN_TAG 2778c2ecf20Sopenharmony_ci __le32 reserved32_2; 2788c2ecf20Sopenharmony_ci __le64 reserved64; 2798c2ecf20Sopenharmony_ci __le32 data[24]; 2808c2ecf20Sopenharmony_ci}; 2818c2ecf20Sopenharmony_ci 2828c2ecf20Sopenharmony_ci/* sq_send_raweth_qp1_hdr (size:256b/32B) */ 2838c2ecf20Sopenharmony_cistruct sq_send_raweth_qp1_hdr { 2848c2ecf20Sopenharmony_ci u8 wqe_type; 2858c2ecf20Sopenharmony_ci u8 flags; 2868c2ecf20Sopenharmony_ci u8 wqe_size; 2878c2ecf20Sopenharmony_ci u8 reserved8; 2888c2ecf20Sopenharmony_ci __le16 lflags; 2898c2ecf20Sopenharmony_ci __le16 cfa_action; 2908c2ecf20Sopenharmony_ci __le32 length; 2918c2ecf20Sopenharmony_ci __le32 reserved32_1; 2928c2ecf20Sopenharmony_ci __le32 cfa_meta; 2938c2ecf20Sopenharmony_ci __le32 reserved32_2; 2948c2ecf20Sopenharmony_ci __le64 reserved64; 2958c2ecf20Sopenharmony_ci}; 2968c2ecf20Sopenharmony_ci 2978c2ecf20Sopenharmony_ci/* RDMA SQ WQE (40 bytes) */ 2988c2ecf20Sopenharmony_cistruct sq_rdma { 2998c2ecf20Sopenharmony_ci u8 wqe_type; 3008c2ecf20Sopenharmony_ci #define SQ_RDMA_WQE_TYPE_WRITE_WQE 0x4UL 3018c2ecf20Sopenharmony_ci #define SQ_RDMA_WQE_TYPE_WRITE_W_IMMEAD 0x5UL 3028c2ecf20Sopenharmony_ci #define SQ_RDMA_WQE_TYPE_READ_WQE 0x6UL 3038c2ecf20Sopenharmony_ci u8 flags; 3048c2ecf20Sopenharmony_ci #define SQ_RDMA_FLAGS_SIGNAL_COMP 0x1UL 3058c2ecf20Sopenharmony_ci #define SQ_RDMA_FLAGS_RD_OR_ATOMIC_FENCE 0x2UL 3068c2ecf20Sopenharmony_ci #define SQ_RDMA_FLAGS_UC_FENCE 0x4UL 3078c2ecf20Sopenharmony_ci #define SQ_RDMA_FLAGS_SE 0x8UL 3088c2ecf20Sopenharmony_ci #define SQ_RDMA_FLAGS_INLINE 0x10UL 3098c2ecf20Sopenharmony_ci u8 wqe_size; 3108c2ecf20Sopenharmony_ci u8 reserved8; 3118c2ecf20Sopenharmony_ci __le32 imm_data; 3128c2ecf20Sopenharmony_ci __le32 length; 3138c2ecf20Sopenharmony_ci __le32 reserved32_1; 3148c2ecf20Sopenharmony_ci __le64 remote_va; 3158c2ecf20Sopenharmony_ci __le32 remote_key; 3168c2ecf20Sopenharmony_ci __le32 reserved32_2; 3178c2ecf20Sopenharmony_ci __le32 data[24]; 3188c2ecf20Sopenharmony_ci}; 3198c2ecf20Sopenharmony_ci 3208c2ecf20Sopenharmony_ci/* sq_rdma_hdr (size:256b/32B) */ 3218c2ecf20Sopenharmony_cistruct sq_rdma_hdr { 3228c2ecf20Sopenharmony_ci u8 wqe_type; 3238c2ecf20Sopenharmony_ci u8 flags; 3248c2ecf20Sopenharmony_ci u8 wqe_size; 3258c2ecf20Sopenharmony_ci u8 reserved8; 3268c2ecf20Sopenharmony_ci __le32 imm_data; 3278c2ecf20Sopenharmony_ci __le32 length; 3288c2ecf20Sopenharmony_ci __le32 reserved32_1; 3298c2ecf20Sopenharmony_ci __le64 remote_va; 3308c2ecf20Sopenharmony_ci __le32 remote_key; 3318c2ecf20Sopenharmony_ci __le32 reserved32_2; 3328c2ecf20Sopenharmony_ci}; 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ci/* Atomic SQ WQE (40 bytes) */ 3358c2ecf20Sopenharmony_cistruct sq_atomic { 3368c2ecf20Sopenharmony_ci u8 wqe_type; 3378c2ecf20Sopenharmony_ci #define SQ_ATOMIC_WQE_TYPE_ATOMIC_CS 0x8UL 3388c2ecf20Sopenharmony_ci #define SQ_ATOMIC_WQE_TYPE_ATOMIC_FA 0xbUL 3398c2ecf20Sopenharmony_ci u8 flags; 3408c2ecf20Sopenharmony_ci #define SQ_ATOMIC_FLAGS_SIGNAL_COMP 0x1UL 3418c2ecf20Sopenharmony_ci #define SQ_ATOMIC_FLAGS_RD_OR_ATOMIC_FENCE 0x2UL 3428c2ecf20Sopenharmony_ci #define SQ_ATOMIC_FLAGS_UC_FENCE 0x4UL 3438c2ecf20Sopenharmony_ci #define SQ_ATOMIC_FLAGS_SE 0x8UL 3448c2ecf20Sopenharmony_ci #define SQ_ATOMIC_FLAGS_INLINE 0x10UL 3458c2ecf20Sopenharmony_ci __le16 reserved16; 3468c2ecf20Sopenharmony_ci __le32 remote_key; 3478c2ecf20Sopenharmony_ci __le64 remote_va; 3488c2ecf20Sopenharmony_ci __le64 swap_data; 3498c2ecf20Sopenharmony_ci __le64 cmp_data; 3508c2ecf20Sopenharmony_ci __le32 data[24]; 3518c2ecf20Sopenharmony_ci}; 3528c2ecf20Sopenharmony_ci 3538c2ecf20Sopenharmony_ci/* sq_atomic_hdr (size:256b/32B) */ 3548c2ecf20Sopenharmony_cistruct sq_atomic_hdr { 3558c2ecf20Sopenharmony_ci u8 wqe_type; 3568c2ecf20Sopenharmony_ci u8 flags; 3578c2ecf20Sopenharmony_ci __le16 reserved16; 3588c2ecf20Sopenharmony_ci __le32 remote_key; 3598c2ecf20Sopenharmony_ci __le64 remote_va; 3608c2ecf20Sopenharmony_ci __le64 swap_data; 3618c2ecf20Sopenharmony_ci __le64 cmp_data; 3628c2ecf20Sopenharmony_ci}; 3638c2ecf20Sopenharmony_ci 3648c2ecf20Sopenharmony_ci/* Local Invalidate SQ WQE (40 bytes) */ 3658c2ecf20Sopenharmony_cistruct sq_localinvalidate { 3668c2ecf20Sopenharmony_ci u8 wqe_type; 3678c2ecf20Sopenharmony_ci #define SQ_LOCALINVALIDATE_WQE_TYPE_LOCAL_INVALID 0xcUL 3688c2ecf20Sopenharmony_ci u8 flags; 3698c2ecf20Sopenharmony_ci #define SQ_LOCALINVALIDATE_FLAGS_SIGNAL_COMP 0x1UL 3708c2ecf20Sopenharmony_ci #define SQ_LOCALINVALIDATE_FLAGS_RD_OR_ATOMIC_FENCE 0x2UL 3718c2ecf20Sopenharmony_ci #define SQ_LOCALINVALIDATE_FLAGS_UC_FENCE 0x4UL 3728c2ecf20Sopenharmony_ci #define SQ_LOCALINVALIDATE_FLAGS_SE 0x8UL 3738c2ecf20Sopenharmony_ci #define SQ_LOCALINVALIDATE_FLAGS_INLINE 0x10UL 3748c2ecf20Sopenharmony_ci __le16 reserved16; 3758c2ecf20Sopenharmony_ci __le32 inv_l_key; 3768c2ecf20Sopenharmony_ci __le64 reserved64; 3778c2ecf20Sopenharmony_ci __le32 reserved128[4]; 3788c2ecf20Sopenharmony_ci __le32 data[24]; 3798c2ecf20Sopenharmony_ci}; 3808c2ecf20Sopenharmony_ci 3818c2ecf20Sopenharmony_ci/* sq_localinvalidate_hdr (size:256b/32B) */ 3828c2ecf20Sopenharmony_cistruct sq_localinvalidate_hdr { 3838c2ecf20Sopenharmony_ci u8 wqe_type; 3848c2ecf20Sopenharmony_ci u8 flags; 3858c2ecf20Sopenharmony_ci __le16 reserved16; 3868c2ecf20Sopenharmony_ci __le32 inv_l_key; 3878c2ecf20Sopenharmony_ci __le64 reserved64; 3888c2ecf20Sopenharmony_ci u8 reserved128[16]; 3898c2ecf20Sopenharmony_ci}; 3908c2ecf20Sopenharmony_ci 3918c2ecf20Sopenharmony_ci/* FR-PMR SQ WQE (40 bytes) */ 3928c2ecf20Sopenharmony_cistruct sq_fr_pmr { 3938c2ecf20Sopenharmony_ci u8 wqe_type; 3948c2ecf20Sopenharmony_ci #define SQ_FR_PMR_WQE_TYPE_FR_PMR 0xdUL 3958c2ecf20Sopenharmony_ci u8 flags; 3968c2ecf20Sopenharmony_ci #define SQ_FR_PMR_FLAGS_SIGNAL_COMP 0x1UL 3978c2ecf20Sopenharmony_ci #define SQ_FR_PMR_FLAGS_RD_OR_ATOMIC_FENCE 0x2UL 3988c2ecf20Sopenharmony_ci #define SQ_FR_PMR_FLAGS_UC_FENCE 0x4UL 3998c2ecf20Sopenharmony_ci #define SQ_FR_PMR_FLAGS_SE 0x8UL 4008c2ecf20Sopenharmony_ci #define SQ_FR_PMR_FLAGS_INLINE 0x10UL 4018c2ecf20Sopenharmony_ci u8 access_cntl; 4028c2ecf20Sopenharmony_ci #define SQ_FR_PMR_ACCESS_CNTL_LOCAL_WRITE 0x1UL 4038c2ecf20Sopenharmony_ci #define SQ_FR_PMR_ACCESS_CNTL_REMOTE_READ 0x2UL 4048c2ecf20Sopenharmony_ci #define SQ_FR_PMR_ACCESS_CNTL_REMOTE_WRITE 0x4UL 4058c2ecf20Sopenharmony_ci #define SQ_FR_PMR_ACCESS_CNTL_REMOTE_ATOMIC 0x8UL 4068c2ecf20Sopenharmony_ci #define SQ_FR_PMR_ACCESS_CNTL_WINDOW_BIND 0x10UL 4078c2ecf20Sopenharmony_ci u8 zero_based_page_size_log; 4088c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PAGE_SIZE_LOG_MASK 0x1fUL 4098c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PAGE_SIZE_LOG_SFT 0 4108c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_4K 0x0UL 4118c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_8K 0x1UL 4128c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_64K 0x4UL 4138c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_256K 0x6UL 4148c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_1M 0x8UL 4158c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_2M 0x9UL 4168c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_4M 0xaUL 4178c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PAGE_SIZE_LOG_PGSZ_1G 0x12UL 4188c2ecf20Sopenharmony_ci #define SQ_FR_PMR_ZERO_BASED 0x20UL 4198c2ecf20Sopenharmony_ci #define SQ_FR_PMR_RESERVED2_MASK 0xc0UL 4208c2ecf20Sopenharmony_ci #define SQ_FR_PMR_RESERVED2_SFT 6 4218c2ecf20Sopenharmony_ci __le32 l_key; 4228c2ecf20Sopenharmony_ci u8 length[5]; 4238c2ecf20Sopenharmony_ci u8 reserved8_1; 4248c2ecf20Sopenharmony_ci u8 reserved8_2; 4258c2ecf20Sopenharmony_ci u8 numlevels_pbl_page_size_log; 4268c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_MASK 0x1fUL 4278c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_SFT 0 4288c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_4K 0x0UL 4298c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_8K 0x1UL 4308c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_64K 0x4UL 4318c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_256K 0x6UL 4328c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_1M 0x8UL 4338c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_2M 0x9UL 4348c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_4M 0xaUL 4358c2ecf20Sopenharmony_ci #define SQ_FR_PMR_PBL_PAGE_SIZE_LOG_PGSZ_1G 0x12UL 4368c2ecf20Sopenharmony_ci #define SQ_FR_PMR_RESERVED1 0x20UL 4378c2ecf20Sopenharmony_ci #define SQ_FR_PMR_NUMLEVELS_MASK 0xc0UL 4388c2ecf20Sopenharmony_ci #define SQ_FR_PMR_NUMLEVELS_SFT 6 4398c2ecf20Sopenharmony_ci #define SQ_FR_PMR_NUMLEVELS_PHYSICAL (0x0UL << 6) 4408c2ecf20Sopenharmony_ci #define SQ_FR_PMR_NUMLEVELS_LAYER1 (0x1UL << 6) 4418c2ecf20Sopenharmony_ci #define SQ_FR_PMR_NUMLEVELS_LAYER2 (0x2UL << 6) 4428c2ecf20Sopenharmony_ci __le64 pblptr; 4438c2ecf20Sopenharmony_ci __le64 va; 4448c2ecf20Sopenharmony_ci __le32 data[24]; 4458c2ecf20Sopenharmony_ci}; 4468c2ecf20Sopenharmony_ci 4478c2ecf20Sopenharmony_ci/* sq_fr_pmr_hdr (size:256b/32B) */ 4488c2ecf20Sopenharmony_cistruct sq_fr_pmr_hdr { 4498c2ecf20Sopenharmony_ci u8 wqe_type; 4508c2ecf20Sopenharmony_ci u8 flags; 4518c2ecf20Sopenharmony_ci u8 access_cntl; 4528c2ecf20Sopenharmony_ci u8 zero_based_page_size_log; 4538c2ecf20Sopenharmony_ci __le32 l_key; 4548c2ecf20Sopenharmony_ci u8 length[5]; 4558c2ecf20Sopenharmony_ci u8 reserved8_1; 4568c2ecf20Sopenharmony_ci u8 reserved8_2; 4578c2ecf20Sopenharmony_ci u8 numlevels_pbl_page_size_log; 4588c2ecf20Sopenharmony_ci __le64 pblptr; 4598c2ecf20Sopenharmony_ci __le64 va; 4608c2ecf20Sopenharmony_ci}; 4618c2ecf20Sopenharmony_ci 4628c2ecf20Sopenharmony_ci/* Bind SQ WQE (40 bytes) */ 4638c2ecf20Sopenharmony_cistruct sq_bind { 4648c2ecf20Sopenharmony_ci u8 wqe_type; 4658c2ecf20Sopenharmony_ci #define SQ_BIND_WQE_TYPE_BIND 0xeUL 4668c2ecf20Sopenharmony_ci u8 flags; 4678c2ecf20Sopenharmony_ci #define SQ_BIND_FLAGS_SIGNAL_COMP 0x1UL 4688c2ecf20Sopenharmony_ci #define SQ_BIND_FLAGS_RD_OR_ATOMIC_FENCE 0x2UL 4698c2ecf20Sopenharmony_ci #define SQ_BIND_FLAGS_UC_FENCE 0x4UL 4708c2ecf20Sopenharmony_ci #define SQ_BIND_FLAGS_SE 0x8UL 4718c2ecf20Sopenharmony_ci #define SQ_BIND_FLAGS_INLINE 0x10UL 4728c2ecf20Sopenharmony_ci u8 access_cntl; 4738c2ecf20Sopenharmony_ci #define SQ_BIND_ACCESS_CNTL_LOCAL_WRITE 0x1UL 4748c2ecf20Sopenharmony_ci #define SQ_BIND_ACCESS_CNTL_REMOTE_READ 0x2UL 4758c2ecf20Sopenharmony_ci #define SQ_BIND_ACCESS_CNTL_REMOTE_WRITE 0x4UL 4768c2ecf20Sopenharmony_ci #define SQ_BIND_ACCESS_CNTL_REMOTE_ATOMIC 0x8UL 4778c2ecf20Sopenharmony_ci #define SQ_BIND_ACCESS_CNTL_WINDOW_BIND 0x10UL 4788c2ecf20Sopenharmony_ci u8 reserved8_1; 4798c2ecf20Sopenharmony_ci u8 mw_type_zero_based; 4808c2ecf20Sopenharmony_ci #define SQ_BIND_ZERO_BASED 0x1UL 4818c2ecf20Sopenharmony_ci #define SQ_BIND_MW_TYPE 0x2UL 4828c2ecf20Sopenharmony_ci #define SQ_BIND_MW_TYPE_TYPE1 (0x0UL << 1) 4838c2ecf20Sopenharmony_ci #define SQ_BIND_MW_TYPE_TYPE2 (0x1UL << 1) 4848c2ecf20Sopenharmony_ci #define SQ_BIND_RESERVED6_MASK 0xfcUL 4858c2ecf20Sopenharmony_ci #define SQ_BIND_RESERVED6_SFT 2 4868c2ecf20Sopenharmony_ci u8 reserved8_2; 4878c2ecf20Sopenharmony_ci __le16 reserved16; 4888c2ecf20Sopenharmony_ci __le32 parent_l_key; 4898c2ecf20Sopenharmony_ci __le32 l_key; 4908c2ecf20Sopenharmony_ci __le64 va; 4918c2ecf20Sopenharmony_ci u8 length[5]; 4928c2ecf20Sopenharmony_ci u8 data_reserved24[99]; 4938c2ecf20Sopenharmony_ci #define SQ_BIND_RESERVED24_MASK 0xffffff00UL 4948c2ecf20Sopenharmony_ci #define SQ_BIND_RESERVED24_SFT 8 4958c2ecf20Sopenharmony_ci #define SQ_BIND_DATA_MASK 0xffffffffUL 4968c2ecf20Sopenharmony_ci #define SQ_BIND_DATA_SFT 0 4978c2ecf20Sopenharmony_ci}; 4988c2ecf20Sopenharmony_ci 4998c2ecf20Sopenharmony_ci/* sq_bind_hdr (size:256b/32B) */ 5008c2ecf20Sopenharmony_cistruct sq_bind_hdr { 5018c2ecf20Sopenharmony_ci u8 wqe_type; 5028c2ecf20Sopenharmony_ci u8 flags; 5038c2ecf20Sopenharmony_ci u8 access_cntl; 5048c2ecf20Sopenharmony_ci u8 reserved8_1; 5058c2ecf20Sopenharmony_ci u8 mw_type_zero_based; 5068c2ecf20Sopenharmony_ci u8 reserved8_2; 5078c2ecf20Sopenharmony_ci __le16 reserved16; 5088c2ecf20Sopenharmony_ci __le32 parent_l_key; 5098c2ecf20Sopenharmony_ci __le32 l_key; 5108c2ecf20Sopenharmony_ci __le64 va; 5118c2ecf20Sopenharmony_ci u8 length[5]; 5128c2ecf20Sopenharmony_ci u8 reserved24[3]; 5138c2ecf20Sopenharmony_ci}; 5148c2ecf20Sopenharmony_ci 5158c2ecf20Sopenharmony_ci/* RQ/SRQ WQE Structures */ 5168c2ecf20Sopenharmony_ci/* RQ/SRQ WQE (40 bytes) */ 5178c2ecf20Sopenharmony_cistruct rq_wqe { 5188c2ecf20Sopenharmony_ci u8 wqe_type; 5198c2ecf20Sopenharmony_ci #define RQ_WQE_WQE_TYPE_RCV 0x80UL 5208c2ecf20Sopenharmony_ci u8 flags; 5218c2ecf20Sopenharmony_ci u8 wqe_size; 5228c2ecf20Sopenharmony_ci u8 reserved8; 5238c2ecf20Sopenharmony_ci __le32 reserved32; 5248c2ecf20Sopenharmony_ci __le32 wr_id[2]; 5258c2ecf20Sopenharmony_ci #define RQ_WQE_WR_ID_MASK 0xfffffUL 5268c2ecf20Sopenharmony_ci #define RQ_WQE_WR_ID_SFT 0 5278c2ecf20Sopenharmony_ci #define RQ_WQE_RESERVED44_MASK 0xfff00000UL 5288c2ecf20Sopenharmony_ci #define RQ_WQE_RESERVED44_SFT 20 5298c2ecf20Sopenharmony_ci __le32 reserved128[4]; 5308c2ecf20Sopenharmony_ci __le32 data[24]; 5318c2ecf20Sopenharmony_ci}; 5328c2ecf20Sopenharmony_ci 5338c2ecf20Sopenharmony_ci/* rq_wqe_hdr (size:256b/32B) */ 5348c2ecf20Sopenharmony_cistruct rq_wqe_hdr { 5358c2ecf20Sopenharmony_ci u8 wqe_type; 5368c2ecf20Sopenharmony_ci u8 flags; 5378c2ecf20Sopenharmony_ci u8 wqe_size; 5388c2ecf20Sopenharmony_ci u8 reserved8; 5398c2ecf20Sopenharmony_ci __le32 reserved32; 5408c2ecf20Sopenharmony_ci __le32 wr_id[2]; 5418c2ecf20Sopenharmony_ci u8 reserved128[16]; 5428c2ecf20Sopenharmony_ci}; 5438c2ecf20Sopenharmony_ci 5448c2ecf20Sopenharmony_ci/* CQ CQE Structures */ 5458c2ecf20Sopenharmony_ci/* Base CQE (32 bytes) */ 5468c2ecf20Sopenharmony_cistruct cq_base { 5478c2ecf20Sopenharmony_ci __le64 reserved64_1; 5488c2ecf20Sopenharmony_ci __le64 reserved64_2; 5498c2ecf20Sopenharmony_ci __le64 reserved64_3; 5508c2ecf20Sopenharmony_ci u8 cqe_type_toggle; 5518c2ecf20Sopenharmony_ci #define CQ_BASE_TOGGLE 0x1UL 5528c2ecf20Sopenharmony_ci #define CQ_BASE_CQE_TYPE_MASK 0x1eUL 5538c2ecf20Sopenharmony_ci #define CQ_BASE_CQE_TYPE_SFT 1 5548c2ecf20Sopenharmony_ci #define CQ_BASE_CQE_TYPE_REQ (0x0UL << 1) 5558c2ecf20Sopenharmony_ci #define CQ_BASE_CQE_TYPE_RES_RC (0x1UL << 1) 5568c2ecf20Sopenharmony_ci #define CQ_BASE_CQE_TYPE_RES_UD (0x2UL << 1) 5578c2ecf20Sopenharmony_ci #define CQ_BASE_CQE_TYPE_RES_RAWETH_QP1 (0x3UL << 1) 5588c2ecf20Sopenharmony_ci #define CQ_BASE_CQE_TYPE_TERMINAL (0xeUL << 1) 5598c2ecf20Sopenharmony_ci #define CQ_BASE_CQE_TYPE_CUT_OFF (0xfUL << 1) 5608c2ecf20Sopenharmony_ci #define CQ_BASE_RESERVED3_MASK 0xe0UL 5618c2ecf20Sopenharmony_ci #define CQ_BASE_RESERVED3_SFT 5 5628c2ecf20Sopenharmony_ci u8 status; 5638c2ecf20Sopenharmony_ci __le16 reserved16; 5648c2ecf20Sopenharmony_ci __le32 reserved32; 5658c2ecf20Sopenharmony_ci}; 5668c2ecf20Sopenharmony_ci 5678c2ecf20Sopenharmony_ci/* Requester CQ CQE (32 bytes) */ 5688c2ecf20Sopenharmony_cistruct cq_req { 5698c2ecf20Sopenharmony_ci __le64 qp_handle; 5708c2ecf20Sopenharmony_ci __le16 sq_cons_idx; 5718c2ecf20Sopenharmony_ci __le16 reserved16_1; 5728c2ecf20Sopenharmony_ci __le32 reserved32_2; 5738c2ecf20Sopenharmony_ci __le64 reserved64; 5748c2ecf20Sopenharmony_ci u8 cqe_type_toggle; 5758c2ecf20Sopenharmony_ci #define CQ_REQ_TOGGLE 0x1UL 5768c2ecf20Sopenharmony_ci #define CQ_REQ_CQE_TYPE_MASK 0x1eUL 5778c2ecf20Sopenharmony_ci #define CQ_REQ_CQE_TYPE_SFT 1 5788c2ecf20Sopenharmony_ci #define CQ_REQ_CQE_TYPE_REQ (0x0UL << 1) 5798c2ecf20Sopenharmony_ci #define CQ_REQ_RESERVED3_MASK 0xe0UL 5808c2ecf20Sopenharmony_ci #define CQ_REQ_RESERVED3_SFT 5 5818c2ecf20Sopenharmony_ci u8 status; 5828c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_OK 0x0UL 5838c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_BAD_RESPONSE_ERR 0x1UL 5848c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_LOCAL_LENGTH_ERR 0x2UL 5858c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_LOCAL_QP_OPERATION_ERR 0x3UL 5868c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_LOCAL_PROTECTION_ERR 0x4UL 5878c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_MEMORY_MGT_OPERATION_ERR 0x5UL 5888c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_REMOTE_INVALID_REQUEST_ERR 0x6UL 5898c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_REMOTE_ACCESS_ERR 0x7UL 5908c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_REMOTE_OPERATION_ERR 0x8UL 5918c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_RNR_NAK_RETRY_CNT_ERR 0x9UL 5928c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_TRANSPORT_RETRY_CNT_ERR 0xaUL 5938c2ecf20Sopenharmony_ci #define CQ_REQ_STATUS_WORK_REQUEST_FLUSHED_ERR 0xbUL 5948c2ecf20Sopenharmony_ci __le16 reserved16_2; 5958c2ecf20Sopenharmony_ci __le32 reserved32_1; 5968c2ecf20Sopenharmony_ci}; 5978c2ecf20Sopenharmony_ci 5988c2ecf20Sopenharmony_ci/* Responder RC CQE (32 bytes) */ 5998c2ecf20Sopenharmony_cistruct cq_res_rc { 6008c2ecf20Sopenharmony_ci __le32 length; 6018c2ecf20Sopenharmony_ci __le32 imm_data_or_inv_r_key; 6028c2ecf20Sopenharmony_ci __le64 qp_handle; 6038c2ecf20Sopenharmony_ci __le64 mr_handle; 6048c2ecf20Sopenharmony_ci u8 cqe_type_toggle; 6058c2ecf20Sopenharmony_ci #define CQ_RES_RC_TOGGLE 0x1UL 6068c2ecf20Sopenharmony_ci #define CQ_RES_RC_CQE_TYPE_MASK 0x1eUL 6078c2ecf20Sopenharmony_ci #define CQ_RES_RC_CQE_TYPE_SFT 1 6088c2ecf20Sopenharmony_ci #define CQ_RES_RC_CQE_TYPE_RES_RC (0x1UL << 1) 6098c2ecf20Sopenharmony_ci #define CQ_RES_RC_RESERVED3_MASK 0xe0UL 6108c2ecf20Sopenharmony_ci #define CQ_RES_RC_RESERVED3_SFT 5 6118c2ecf20Sopenharmony_ci u8 status; 6128c2ecf20Sopenharmony_ci #define CQ_RES_RC_STATUS_OK 0x0UL 6138c2ecf20Sopenharmony_ci #define CQ_RES_RC_STATUS_LOCAL_ACCESS_ERROR 0x1UL 6148c2ecf20Sopenharmony_ci #define CQ_RES_RC_STATUS_LOCAL_LENGTH_ERR 0x2UL 6158c2ecf20Sopenharmony_ci #define CQ_RES_RC_STATUS_LOCAL_PROTECTION_ERR 0x3UL 6168c2ecf20Sopenharmony_ci #define CQ_RES_RC_STATUS_LOCAL_QP_OPERATION_ERR 0x4UL 6178c2ecf20Sopenharmony_ci #define CQ_RES_RC_STATUS_MEMORY_MGT_OPERATION_ERR 0x5UL 6188c2ecf20Sopenharmony_ci #define CQ_RES_RC_STATUS_REMOTE_INVALID_REQUEST_ERR 0x6UL 6198c2ecf20Sopenharmony_ci #define CQ_RES_RC_STATUS_WORK_REQUEST_FLUSHED_ERR 0x7UL 6208c2ecf20Sopenharmony_ci #define CQ_RES_RC_STATUS_HW_FLUSH_ERR 0x8UL 6218c2ecf20Sopenharmony_ci __le16 flags; 6228c2ecf20Sopenharmony_ci #define CQ_RES_RC_FLAGS_SRQ 0x1UL 6238c2ecf20Sopenharmony_ci #define CQ_RES_RC_FLAGS_SRQ_RQ (0x0UL << 0) 6248c2ecf20Sopenharmony_ci #define CQ_RES_RC_FLAGS_SRQ_SRQ (0x1UL << 0) 6258c2ecf20Sopenharmony_ci #define CQ_RES_RC_FLAGS_SRQ_LAST CQ_RES_RC_FLAGS_SRQ_SRQ 6268c2ecf20Sopenharmony_ci #define CQ_RES_RC_FLAGS_IMM 0x2UL 6278c2ecf20Sopenharmony_ci #define CQ_RES_RC_FLAGS_INV 0x4UL 6288c2ecf20Sopenharmony_ci #define CQ_RES_RC_FLAGS_RDMA 0x8UL 6298c2ecf20Sopenharmony_ci #define CQ_RES_RC_FLAGS_RDMA_SEND (0x0UL << 3) 6308c2ecf20Sopenharmony_ci #define CQ_RES_RC_FLAGS_RDMA_RDMA_WRITE (0x1UL << 3) 6318c2ecf20Sopenharmony_ci #define CQ_RES_RC_FLAGS_RDMA_LAST CQ_RES_RC_FLAGS_RDMA_RDMA_WRITE 6328c2ecf20Sopenharmony_ci __le32 srq_or_rq_wr_id; 6338c2ecf20Sopenharmony_ci #define CQ_RES_RC_SRQ_OR_RQ_WR_ID_MASK 0xfffffUL 6348c2ecf20Sopenharmony_ci #define CQ_RES_RC_SRQ_OR_RQ_WR_ID_SFT 0 6358c2ecf20Sopenharmony_ci #define CQ_RES_RC_RESERVED12_MASK 0xfff00000UL 6368c2ecf20Sopenharmony_ci #define CQ_RES_RC_RESERVED12_SFT 20 6378c2ecf20Sopenharmony_ci}; 6388c2ecf20Sopenharmony_ci 6398c2ecf20Sopenharmony_ci/* Responder UD CQE (32 bytes) */ 6408c2ecf20Sopenharmony_cistruct cq_res_ud { 6418c2ecf20Sopenharmony_ci __le16 length; 6428c2ecf20Sopenharmony_ci #define CQ_RES_UD_LENGTH_MASK 0x3fffUL 6438c2ecf20Sopenharmony_ci #define CQ_RES_UD_LENGTH_SFT 0 6448c2ecf20Sopenharmony_ci __le16 cfa_metadata; 6458c2ecf20Sopenharmony_ci #define CQ_RES_UD_CFA_METADATA_VID_MASK 0xfffUL 6468c2ecf20Sopenharmony_ci #define CQ_RES_UD_CFA_METADATA_VID_SFT 0 6478c2ecf20Sopenharmony_ci #define CQ_RES_UD_CFA_METADATA_DE 0x1000UL 6488c2ecf20Sopenharmony_ci #define CQ_RES_UD_CFA_METADATA_PRI_MASK 0xe000UL 6498c2ecf20Sopenharmony_ci #define CQ_RES_UD_CFA_METADATA_PRI_SFT 13 6508c2ecf20Sopenharmony_ci __le32 imm_data; 6518c2ecf20Sopenharmony_ci __le64 qp_handle; 6528c2ecf20Sopenharmony_ci __le16 src_mac[3]; 6538c2ecf20Sopenharmony_ci __le16 src_qp_low; 6548c2ecf20Sopenharmony_ci u8 cqe_type_toggle; 6558c2ecf20Sopenharmony_ci #define CQ_RES_UD_TOGGLE 0x1UL 6568c2ecf20Sopenharmony_ci #define CQ_RES_UD_CQE_TYPE_MASK 0x1eUL 6578c2ecf20Sopenharmony_ci #define CQ_RES_UD_CQE_TYPE_SFT 1 6588c2ecf20Sopenharmony_ci #define CQ_RES_UD_CQE_TYPE_RES_UD (0x2UL << 1) 6598c2ecf20Sopenharmony_ci u8 status; 6608c2ecf20Sopenharmony_ci #define CQ_RES_UD_STATUS_OK 0x0UL 6618c2ecf20Sopenharmony_ci #define CQ_RES_UD_STATUS_LOCAL_ACCESS_ERROR 0x1UL 6628c2ecf20Sopenharmony_ci #define CQ_RES_UD_STATUS_HW_LOCAL_LENGTH_ERR 0x2UL 6638c2ecf20Sopenharmony_ci #define CQ_RES_UD_STATUS_LOCAL_PROTECTION_ERR 0x3UL 6648c2ecf20Sopenharmony_ci #define CQ_RES_UD_STATUS_LOCAL_QP_OPERATION_ERR 0x4UL 6658c2ecf20Sopenharmony_ci #define CQ_RES_UD_STATUS_MEMORY_MGT_OPERATION_ERR 0x5UL 6668c2ecf20Sopenharmony_ci #define CQ_RES_UD_STATUS_WORK_REQUEST_FLUSHED_ERR 0x7UL 6678c2ecf20Sopenharmony_ci #define CQ_RES_UD_STATUS_HW_FLUSH_ERR 0x8UL 6688c2ecf20Sopenharmony_ci __le16 flags; 6698c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_SRQ 0x1UL 6708c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_SRQ_RQ (0x0UL << 0) 6718c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_SRQ_SRQ (0x1UL << 0) 6728c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_SRQ_LAST CQ_RES_UD_FLAGS_SRQ_SRQ 6738c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_IMM 0x2UL 6748c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_UNUSED_MASK 0xcUL 6758c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_UNUSED_SFT 2 6768c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_ROCE_IP_VER_MASK 0x30UL 6778c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_ROCE_IP_VER_SFT 4 6788c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_ROCE_IP_VER_V1 (0x0UL << 4) 6798c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_ROCE_IP_VER_V2IPV4 (0x2UL << 4) 6808c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_ROCE_IP_VER_V2IPV6 (0x3UL << 4) 6818c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_ROCE_IP_VER_LAST \ 6828c2ecf20Sopenharmony_ci CQ_RES_UD_FLAGS_ROCE_IP_VER_V2IPV6 6838c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_META_FORMAT_MASK 0x3c0UL 6848c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_META_FORMAT_SFT 6 6858c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_META_FORMAT_NONE (0x0UL << 6) 6868c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_META_FORMAT_VLAN (0x1UL << 6) 6878c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_META_FORMAT_TUNNEL_ID (0x2UL << 6) 6888c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_META_FORMAT_CHDR_DATA (0x3UL << 6) 6898c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_META_FORMAT_HDR_OFFSET (0x4UL << 6) 6908c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_META_FORMAT_LAST \ 6918c2ecf20Sopenharmony_ci CQ_RES_UD_FLAGS_META_FORMAT_HDR_OFFSET 6928c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_EXT_META_FORMAT_MASK 0xc00UL 6938c2ecf20Sopenharmony_ci #define CQ_RES_UD_FLAGS_EXT_META_FORMAT_SFT 10 6948c2ecf20Sopenharmony_ci 6958c2ecf20Sopenharmony_ci __le32 src_qp_high_srq_or_rq_wr_id; 6968c2ecf20Sopenharmony_ci #define CQ_RES_UD_SRQ_OR_RQ_WR_ID_MASK 0xfffffUL 6978c2ecf20Sopenharmony_ci #define CQ_RES_UD_SRQ_OR_RQ_WR_ID_SFT 0 6988c2ecf20Sopenharmony_ci #define CQ_RES_UD_SRC_QP_HIGH_MASK 0xff000000UL 6998c2ecf20Sopenharmony_ci #define CQ_RES_UD_SRC_QP_HIGH_SFT 24 7008c2ecf20Sopenharmony_ci}; 7018c2ecf20Sopenharmony_ci 7028c2ecf20Sopenharmony_ci/* Responder RawEth and QP1 CQE (32 bytes) */ 7038c2ecf20Sopenharmony_cistruct cq_res_raweth_qp1 { 7048c2ecf20Sopenharmony_ci __le16 length; 7058c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_LENGTH_MASK 0x3fffUL 7068c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_LENGTH_SFT 0 7078c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RESERVED2_MASK 0xc000UL 7088c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RESERVED2_SFT 14 7098c2ecf20Sopenharmony_ci __le16 raweth_qp1_flags; 7108c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ERROR 0x1UL 7118c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_RESERVED5_1_MASK 0x3eUL 7128c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_RESERVED5_1_SFT 1 7138c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_MASK 0x3c0UL 7148c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_SFT 6 7158c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_NOT_KNOWN (0x0UL << 6) 7168c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_IP (0x1UL << 6) 7178c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_TCP (0x2UL << 6) 7188c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_UDP (0x3UL << 6) 7198c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_FCOE (0x4UL << 6) 7208c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_ROCE (0x5UL << 6) 7218c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_ICMP (0x7UL << 6) 7228c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_PTP_WO_TIMESTAMP \ 7238c2ecf20Sopenharmony_ci (0x8UL << 6) 7248c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_PTP_W_TIMESTAMP \ 7258c2ecf20Sopenharmony_ci (0x9UL << 6) 7268c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_LAST \ 7278c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_ITYPE_PTP_W_TIMESTAMP 7288c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_MASK 0x3ffUL 7298c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS_SFT 0 7308c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RESERVED6_MASK 0xfc00UL 7318c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RESERVED6_SFT 10 7328c2ecf20Sopenharmony_ci __le16 raweth_qp1_errors; 7338c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_RESERVED4_MASK 0xfUL 7348c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_RESERVED4_SFT 0 7358c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_IP_CS_ERROR 0x10UL 7368c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_L4_CS_ERROR 0x20UL 7378c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_IP_CS_ERROR 0x40UL 7388c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_L4_CS_ERROR 0x80UL 7398c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_CRC_ERROR 0x100UL 7408c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_MASK 0xe00UL 7418c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_SFT 9 7428c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_NO_ERROR \ 7438c2ecf20Sopenharmony_ci (0x0UL << 9) 7448c2ecf20Sopenharmony_ci #define \ 7458c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_VERSION \ 7468c2ecf20Sopenharmony_ci (0x1UL << 9) 7478c2ecf20Sopenharmony_ci #define \ 7488c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_HDR_LEN \ 7498c2ecf20Sopenharmony_ci (0x2UL << 9) 7508c2ecf20Sopenharmony_ci #define \ 7518c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_TUNNEL_TOTAL_ERROR \ 7528c2ecf20Sopenharmony_ci (0x3UL << 9) 7538c2ecf20Sopenharmony_ci #define \ 7548c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_IP_TOTAL_ERROR \ 7558c2ecf20Sopenharmony_ci (0x4UL << 9) 7568c2ecf20Sopenharmony_ci #define \ 7578c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_UDP_TOTAL_ERROR \ 7588c2ecf20Sopenharmony_ci (0x5UL << 9) 7598c2ecf20Sopenharmony_ci #define \ 7608c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL \ 7618c2ecf20Sopenharmony_ci (0x6UL << 9) 7628c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_LAST \ 7638c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_T_PKT_ERROR_T_L3_BAD_TTL 7648c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_MASK 0xf000UL 7658c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_SFT 12 7668c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_NO_ERROR \ 7678c2ecf20Sopenharmony_ci (0x0UL << 12) 7688c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_VERSION \ 7698c2ecf20Sopenharmony_ci (0x1UL << 12) 7708c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_HDR_LEN \ 7718c2ecf20Sopenharmony_ci (0x2UL << 12) 7728c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L3_BAD_TTL \ 7738c2ecf20Sopenharmony_ci (0x3UL << 12) 7748c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_IP_TOTAL_ERROR \ 7758c2ecf20Sopenharmony_ci (0x4UL << 12) 7768c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_UDP_TOTAL_ERROR \ 7778c2ecf20Sopenharmony_ci (0x5UL << 12) 7788c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN \ 7798c2ecf20Sopenharmony_ci (0x6UL << 12) 7808c2ecf20Sopenharmony_ci #define \ 7818c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_HDR_LEN_TOO_SMALL\ 7828c2ecf20Sopenharmony_ci (0x7UL << 12) 7838c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN \ 7848c2ecf20Sopenharmony_ci (0x8UL << 12) 7858c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_LAST \ 7868c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_ERRORS_PKT_ERROR_L4_BAD_OPT_LEN 7878c2ecf20Sopenharmony_ci __le16 raweth_qp1_cfa_code; 7888c2ecf20Sopenharmony_ci __le64 qp_handle; 7898c2ecf20Sopenharmony_ci __le32 raweth_qp1_flags2; 7908c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_IP_CS_CALC 0x1UL 7918c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_L4_CS_CALC 0x2UL 7928c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_T_IP_CS_CALC 0x4UL 7938c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_T_L4_CS_CALC 0x8UL 7948c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_MASK 0xf0UL 7958c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_SFT 4 7968c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_NONE \ 7978c2ecf20Sopenharmony_ci (0x0UL << 4) 7988c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_VLAN \ 7998c2ecf20Sopenharmony_ci (0x1UL << 4) 8008c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_LAST\ 8018c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_META_FORMAT_VLAN 8028c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_FLAGS2_IP_TYPE 0x100UL 8038c2ecf20Sopenharmony_ci __le32 raweth_qp1_metadata; 8048c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_VID_MASK 0xfffUL 8058c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_VID_SFT 0 8068c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_DE 0x1000UL 8078c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_PRI_MASK 0xe000UL 8088c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_PRI_SFT 13 8098c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_TPID_MASK 0xffff0000UL 8108c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_METADATA_TPID_SFT 16 8118c2ecf20Sopenharmony_ci u8 cqe_type_toggle; 8128c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_TOGGLE 0x1UL 8138c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_CQE_TYPE_MASK 0x1eUL 8148c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_CQE_TYPE_SFT 1 8158c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_CQE_TYPE_RES_RAWETH_QP1 (0x3UL << 1) 8168c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RESERVED3_MASK 0xe0UL 8178c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RESERVED3_SFT 5 8188c2ecf20Sopenharmony_ci u8 status; 8198c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_STATUS_OK 0x0UL 8208c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_STATUS_LOCAL_ACCESS_ERROR 0x1UL 8218c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_STATUS_HW_LOCAL_LENGTH_ERR 0x2UL 8228c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_STATUS_LOCAL_PROTECTION_ERR 0x3UL 8238c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_STATUS_LOCAL_QP_OPERATION_ERR 0x4UL 8248c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_STATUS_MEMORY_MGT_OPERATION_ERR 0x5UL 8258c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_STATUS_WORK_REQUEST_FLUSHED_ERR 0x7UL 8268c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_STATUS_HW_FLUSH_ERR 0x8UL 8278c2ecf20Sopenharmony_ci __le16 flags; 8288c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_FLAGS_SRQ 0x1UL 8298c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_FLAGS_SRQ_RQ 0x0UL 8308c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ 0x1UL 8318c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_FLAGS_SRQ_LAST \ 8328c2ecf20Sopenharmony_ci CQ_RES_RAWETH_QP1_FLAGS_SRQ_SRQ 8338c2ecf20Sopenharmony_ci __le32 raweth_qp1_payload_offset_srq_or_rq_wr_id; 8348c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_SRQ_OR_RQ_WR_ID_MASK 0xfffffUL 8358c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_SRQ_OR_RQ_WR_ID_SFT 0 8368c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RESERVED4_MASK 0xf00000UL 8378c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RESERVED4_SFT 20 8388c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_PAYLOAD_OFFSET_MASK 0xff000000UL 8398c2ecf20Sopenharmony_ci #define CQ_RES_RAWETH_QP1_RAWETH_QP1_PAYLOAD_OFFSET_SFT 24 8408c2ecf20Sopenharmony_ci}; 8418c2ecf20Sopenharmony_ci 8428c2ecf20Sopenharmony_ci/* Terminal CQE (32 bytes) */ 8438c2ecf20Sopenharmony_cistruct cq_terminal { 8448c2ecf20Sopenharmony_ci __le64 qp_handle; 8458c2ecf20Sopenharmony_ci __le16 sq_cons_idx; 8468c2ecf20Sopenharmony_ci __le16 rq_cons_idx; 8478c2ecf20Sopenharmony_ci __le32 reserved32_1; 8488c2ecf20Sopenharmony_ci __le64 reserved64_3; 8498c2ecf20Sopenharmony_ci u8 cqe_type_toggle; 8508c2ecf20Sopenharmony_ci #define CQ_TERMINAL_TOGGLE 0x1UL 8518c2ecf20Sopenharmony_ci #define CQ_TERMINAL_CQE_TYPE_MASK 0x1eUL 8528c2ecf20Sopenharmony_ci #define CQ_TERMINAL_CQE_TYPE_SFT 1 8538c2ecf20Sopenharmony_ci #define CQ_TERMINAL_CQE_TYPE_TERMINAL (0xeUL << 1) 8548c2ecf20Sopenharmony_ci #define CQ_TERMINAL_RESERVED3_MASK 0xe0UL 8558c2ecf20Sopenharmony_ci #define CQ_TERMINAL_RESERVED3_SFT 5 8568c2ecf20Sopenharmony_ci u8 status; 8578c2ecf20Sopenharmony_ci #define CQ_TERMINAL_STATUS_OK 0x0UL 8588c2ecf20Sopenharmony_ci __le16 reserved16; 8598c2ecf20Sopenharmony_ci __le32 reserved32_2; 8608c2ecf20Sopenharmony_ci}; 8618c2ecf20Sopenharmony_ci 8628c2ecf20Sopenharmony_ci/* Cutoff CQE (32 bytes) */ 8638c2ecf20Sopenharmony_cistruct cq_cutoff { 8648c2ecf20Sopenharmony_ci __le64 reserved64_1; 8658c2ecf20Sopenharmony_ci __le64 reserved64_2; 8668c2ecf20Sopenharmony_ci __le64 reserved64_3; 8678c2ecf20Sopenharmony_ci u8 cqe_type_toggle; 8688c2ecf20Sopenharmony_ci #define CQ_CUTOFF_TOGGLE 0x1UL 8698c2ecf20Sopenharmony_ci #define CQ_CUTOFF_CQE_TYPE_MASK 0x1eUL 8708c2ecf20Sopenharmony_ci #define CQ_CUTOFF_CQE_TYPE_SFT 1 8718c2ecf20Sopenharmony_ci #define CQ_CUTOFF_CQE_TYPE_CUT_OFF (0xfUL << 1) 8728c2ecf20Sopenharmony_ci #define CQ_CUTOFF_RESERVED3_MASK 0xe0UL 8738c2ecf20Sopenharmony_ci #define CQ_CUTOFF_RESERVED3_SFT 5 8748c2ecf20Sopenharmony_ci u8 status; 8758c2ecf20Sopenharmony_ci #define CQ_CUTOFF_STATUS_OK 0x0UL 8768c2ecf20Sopenharmony_ci __le16 reserved16; 8778c2ecf20Sopenharmony_ci __le32 reserved32; 8788c2ecf20Sopenharmony_ci}; 8798c2ecf20Sopenharmony_ci 8808c2ecf20Sopenharmony_ci/* Notification Queue (NQ) Structures */ 8818c2ecf20Sopenharmony_ci/* Base NQ Record (16 bytes) */ 8828c2ecf20Sopenharmony_cistruct nq_base { 8838c2ecf20Sopenharmony_ci __le16 info10_type; 8848c2ecf20Sopenharmony_ci #define NQ_BASE_TYPE_MASK 0x3fUL 8858c2ecf20Sopenharmony_ci #define NQ_BASE_TYPE_SFT 0 8868c2ecf20Sopenharmony_ci #define NQ_BASE_TYPE_CQ_NOTIFICATION 0x30UL 8878c2ecf20Sopenharmony_ci #define NQ_BASE_TYPE_SRQ_EVENT 0x32UL 8888c2ecf20Sopenharmony_ci #define NQ_BASE_TYPE_DBQ_EVENT 0x34UL 8898c2ecf20Sopenharmony_ci #define NQ_BASE_TYPE_QP_EVENT 0x38UL 8908c2ecf20Sopenharmony_ci #define NQ_BASE_TYPE_FUNC_EVENT 0x3aUL 8918c2ecf20Sopenharmony_ci #define NQ_BASE_INFO10_MASK 0xffc0UL 8928c2ecf20Sopenharmony_ci #define NQ_BASE_INFO10_SFT 6 8938c2ecf20Sopenharmony_ci __le16 info16; 8948c2ecf20Sopenharmony_ci __le32 info32; 8958c2ecf20Sopenharmony_ci __le32 info63_v[2]; 8968c2ecf20Sopenharmony_ci #define NQ_BASE_V 0x1UL 8978c2ecf20Sopenharmony_ci #define NQ_BASE_INFO63_MASK 0xfffffffeUL 8988c2ecf20Sopenharmony_ci #define NQ_BASE_INFO63_SFT 1 8998c2ecf20Sopenharmony_ci}; 9008c2ecf20Sopenharmony_ci 9018c2ecf20Sopenharmony_ci/* Completion Queue Notification (16 bytes) */ 9028c2ecf20Sopenharmony_cistruct nq_cn { 9038c2ecf20Sopenharmony_ci __le16 type; 9048c2ecf20Sopenharmony_ci #define NQ_CN_TYPE_MASK 0x3fUL 9058c2ecf20Sopenharmony_ci #define NQ_CN_TYPE_SFT 0 9068c2ecf20Sopenharmony_ci #define NQ_CN_TYPE_CQ_NOTIFICATION 0x30UL 9078c2ecf20Sopenharmony_ci #define NQ_CN_RESERVED9_MASK 0xffc0UL 9088c2ecf20Sopenharmony_ci #define NQ_CN_RESERVED9_SFT 6 9098c2ecf20Sopenharmony_ci __le16 reserved16; 9108c2ecf20Sopenharmony_ci __le32 cq_handle_low; 9118c2ecf20Sopenharmony_ci __le32 v; 9128c2ecf20Sopenharmony_ci #define NQ_CN_V 0x1UL 9138c2ecf20Sopenharmony_ci #define NQ_CN_RESERVED31_MASK 0xfffffffeUL 9148c2ecf20Sopenharmony_ci #define NQ_CN_RESERVED31_SFT 1 9158c2ecf20Sopenharmony_ci __le32 cq_handle_high; 9168c2ecf20Sopenharmony_ci}; 9178c2ecf20Sopenharmony_ci 9188c2ecf20Sopenharmony_ci/* SRQ Event Notification (16 bytes) */ 9198c2ecf20Sopenharmony_cistruct nq_srq_event { 9208c2ecf20Sopenharmony_ci u8 type; 9218c2ecf20Sopenharmony_ci #define NQ_SRQ_EVENT_TYPE_MASK 0x3fUL 9228c2ecf20Sopenharmony_ci #define NQ_SRQ_EVENT_TYPE_SFT 0 9238c2ecf20Sopenharmony_ci #define NQ_SRQ_EVENT_TYPE_SRQ_EVENT 0x32UL 9248c2ecf20Sopenharmony_ci #define NQ_SRQ_EVENT_RESERVED1_MASK 0xc0UL 9258c2ecf20Sopenharmony_ci #define NQ_SRQ_EVENT_RESERVED1_SFT 6 9268c2ecf20Sopenharmony_ci u8 event; 9278c2ecf20Sopenharmony_ci #define NQ_SRQ_EVENT_EVENT_SRQ_THRESHOLD_EVENT 0x1UL 9288c2ecf20Sopenharmony_ci __le16 reserved16; 9298c2ecf20Sopenharmony_ci __le32 srq_handle_low; 9308c2ecf20Sopenharmony_ci __le32 v; 9318c2ecf20Sopenharmony_ci #define NQ_SRQ_EVENT_V 0x1UL 9328c2ecf20Sopenharmony_ci #define NQ_SRQ_EVENT_RESERVED31_MASK 0xfffffffeUL 9338c2ecf20Sopenharmony_ci #define NQ_SRQ_EVENT_RESERVED31_SFT 1 9348c2ecf20Sopenharmony_ci __le32 srq_handle_high; 9358c2ecf20Sopenharmony_ci}; 9368c2ecf20Sopenharmony_ci 9378c2ecf20Sopenharmony_ci/* DBQ Async Event Notification (16 bytes) */ 9388c2ecf20Sopenharmony_cistruct nq_dbq_event { 9398c2ecf20Sopenharmony_ci u8 type; 9408c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_TYPE_MASK 0x3fUL 9418c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_TYPE_SFT 0 9428c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_TYPE_DBQ_EVENT 0x34UL 9438c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_RESERVED1_MASK 0xc0UL 9448c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_RESERVED1_SFT 6 9458c2ecf20Sopenharmony_ci u8 event; 9468c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_EVENT_DBQ_THRESHOLD_EVENT 0x1UL 9478c2ecf20Sopenharmony_ci __le16 db_pfid; 9488c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_DB_PFID_MASK 0xfUL 9498c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_DB_PFID_SFT 0 9508c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_RESERVED12_MASK 0xfff0UL 9518c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_RESERVED12_SFT 4 9528c2ecf20Sopenharmony_ci __le32 db_dpi; 9538c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_DB_DPI_MASK 0xfffffUL 9548c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_DB_DPI_SFT 0 9558c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_RESERVED12_2_MASK 0xfff00000UL 9568c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_RESERVED12_2_SFT 20 9578c2ecf20Sopenharmony_ci __le32 v; 9588c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_V 0x1UL 9598c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_RESERVED32_MASK 0xfffffffeUL 9608c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_RESERVED32_SFT 1 9618c2ecf20Sopenharmony_ci __le32 db_type_db_xid; 9628c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_DB_XID_MASK 0xfffffUL 9638c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_DB_XID_SFT 0 9648c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_RESERVED8_MASK 0xff00000UL 9658c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_RESERVED8_SFT 20 9668c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_DB_TYPE_MASK 0xf0000000UL 9678c2ecf20Sopenharmony_ci #define NQ_DBQ_EVENT_DB_TYPE_SFT 28 9688c2ecf20Sopenharmony_ci}; 9698c2ecf20Sopenharmony_ci 9708c2ecf20Sopenharmony_ci/* Read Request/Response Queue Structures */ 9718c2ecf20Sopenharmony_ci/* Input Read Request Queue (IRRQ) Message (32 bytes) */ 9728c2ecf20Sopenharmony_cistruct xrrq_irrq { 9738c2ecf20Sopenharmony_ci __le16 credits_type; 9748c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_TYPE 0x1UL 9758c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_TYPE_READ_REQ 0x0UL 9768c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_TYPE_ATOMIC_REQ 0x1UL 9778c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_RESERVED10_MASK 0x7feUL 9788c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_RESERVED10_SFT 1 9798c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_CREDITS_MASK 0xf800UL 9808c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_CREDITS_SFT 11 9818c2ecf20Sopenharmony_ci __le16 reserved16; 9828c2ecf20Sopenharmony_ci __le32 reserved32; 9838c2ecf20Sopenharmony_ci __le32 psn; 9848c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_PSN_MASK 0xffffffUL 9858c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_PSN_SFT 0 9868c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_RESERVED8_1_MASK 0xff000000UL 9878c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_RESERVED8_1_SFT 24 9888c2ecf20Sopenharmony_ci __le32 msn; 9898c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_MSN_MASK 0xffffffUL 9908c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_MSN_SFT 0 9918c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_RESERVED8_2_MASK 0xff000000UL 9928c2ecf20Sopenharmony_ci #define XRRQ_IRRQ_RESERVED8_2_SFT 24 9938c2ecf20Sopenharmony_ci __le64 va_or_atomic_result; 9948c2ecf20Sopenharmony_ci __le32 rdma_r_key; 9958c2ecf20Sopenharmony_ci __le32 length; 9968c2ecf20Sopenharmony_ci}; 9978c2ecf20Sopenharmony_ci 9988c2ecf20Sopenharmony_ci/* Output Read Request Queue (ORRQ) Message (32 bytes) */ 9998c2ecf20Sopenharmony_cistruct xrrq_orrq { 10008c2ecf20Sopenharmony_ci __le16 num_sges_type; 10018c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_TYPE 0x1UL 10028c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_TYPE_READ_REQ 0x0UL 10038c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_TYPE_ATOMIC_REQ 0x1UL 10048c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_RESERVED10_MASK 0x7feUL 10058c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_RESERVED10_SFT 1 10068c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_NUM_SGES_MASK 0xf800UL 10078c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_NUM_SGES_SFT 11 10088c2ecf20Sopenharmony_ci __le16 reserved16; 10098c2ecf20Sopenharmony_ci __le32 length; 10108c2ecf20Sopenharmony_ci __le32 psn; 10118c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_PSN_MASK 0xffffffUL 10128c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_PSN_SFT 0 10138c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_RESERVED8_1_MASK 0xff000000UL 10148c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_RESERVED8_1_SFT 24 10158c2ecf20Sopenharmony_ci __le32 end_psn; 10168c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_END_PSN_MASK 0xffffffUL 10178c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_END_PSN_SFT 0 10188c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_RESERVED8_2_MASK 0xff000000UL 10198c2ecf20Sopenharmony_ci #define XRRQ_ORRQ_RESERVED8_2_SFT 24 10208c2ecf20Sopenharmony_ci __le64 first_sge_phy_or_sing_sge_va; 10218c2ecf20Sopenharmony_ci __le32 single_sge_l_key; 10228c2ecf20Sopenharmony_ci __le32 single_sge_size; 10238c2ecf20Sopenharmony_ci}; 10248c2ecf20Sopenharmony_ci 10258c2ecf20Sopenharmony_ci/* Page Buffer List Memory Structures (PBL) */ 10268c2ecf20Sopenharmony_ci/* Page Table Entry (PTE) (8 bytes) */ 10278c2ecf20Sopenharmony_cistruct ptu_pte { 10288c2ecf20Sopenharmony_ci __le32 page_next_to_last_last_valid[2]; 10298c2ecf20Sopenharmony_ci #define PTU_PTE_VALID 0x1UL 10308c2ecf20Sopenharmony_ci #define PTU_PTE_LAST 0x2UL 10318c2ecf20Sopenharmony_ci #define PTU_PTE_NEXT_TO_LAST 0x4UL 10328c2ecf20Sopenharmony_ci #define PTU_PTE_PAGE_MASK 0xfffff000UL 10338c2ecf20Sopenharmony_ci #define PTU_PTE_PAGE_SFT 12 10348c2ecf20Sopenharmony_ci}; 10358c2ecf20Sopenharmony_ci 10368c2ecf20Sopenharmony_ci/* Page Directory Entry (PDE) (8 bytes) */ 10378c2ecf20Sopenharmony_cistruct ptu_pde { 10388c2ecf20Sopenharmony_ci __le32 page_valid[2]; 10398c2ecf20Sopenharmony_ci #define PTU_PDE_VALID 0x1UL 10408c2ecf20Sopenharmony_ci #define PTU_PDE_PAGE_MASK 0xfffff000UL 10418c2ecf20Sopenharmony_ci #define PTU_PDE_PAGE_SFT 12 10428c2ecf20Sopenharmony_ci}; 10438c2ecf20Sopenharmony_ci 10448c2ecf20Sopenharmony_ci/* RoCE Fastpath Host Structures */ 10458c2ecf20Sopenharmony_ci/* Command Queue (CMDQ) Interface */ 10468c2ecf20Sopenharmony_ci/* Init CMDQ (16 bytes) */ 10478c2ecf20Sopenharmony_cistruct cmdq_init { 10488c2ecf20Sopenharmony_ci __le64 cmdq_pbl; 10498c2ecf20Sopenharmony_ci __le16 cmdq_size_cmdq_lvl; 10508c2ecf20Sopenharmony_ci #define CMDQ_INIT_CMDQ_LVL_MASK 0x3UL 10518c2ecf20Sopenharmony_ci #define CMDQ_INIT_CMDQ_LVL_SFT 0 10528c2ecf20Sopenharmony_ci #define CMDQ_INIT_CMDQ_SIZE_MASK 0xfffcUL 10538c2ecf20Sopenharmony_ci #define CMDQ_INIT_CMDQ_SIZE_SFT 2 10548c2ecf20Sopenharmony_ci __le16 creq_ring_id; 10558c2ecf20Sopenharmony_ci __le32 prod_idx; 10568c2ecf20Sopenharmony_ci}; 10578c2ecf20Sopenharmony_ci 10588c2ecf20Sopenharmony_ci/* Update CMDQ producer index (16 bytes) */ 10598c2ecf20Sopenharmony_cistruct cmdq_update { 10608c2ecf20Sopenharmony_ci __le64 reserved64; 10618c2ecf20Sopenharmony_ci __le32 reserved32; 10628c2ecf20Sopenharmony_ci __le32 prod_idx; 10638c2ecf20Sopenharmony_ci}; 10648c2ecf20Sopenharmony_ci 10658c2ecf20Sopenharmony_ci/* CMDQ common header structure (16 bytes) */ 10668c2ecf20Sopenharmony_cistruct cmdq_base { 10678c2ecf20Sopenharmony_ci u8 opcode; 10688c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_CREATE_QP 0x1UL 10698c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_DESTROY_QP 0x2UL 10708c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_MODIFY_QP 0x3UL 10718c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_QUERY_QP 0x4UL 10728c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_CREATE_SRQ 0x5UL 10738c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_DESTROY_SRQ 0x6UL 10748c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_QUERY_SRQ 0x8UL 10758c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_CREATE_CQ 0x9UL 10768c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_DESTROY_CQ 0xaUL 10778c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_RESIZE_CQ 0xcUL 10788c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_ALLOCATE_MRW 0xdUL 10798c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_DEALLOCATE_KEY 0xeUL 10808c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_REGISTER_MR 0xfUL 10818c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_DEREGISTER_MR 0x10UL 10828c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_ADD_GID 0x11UL 10838c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_DELETE_GID 0x12UL 10848c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_MODIFY_GID 0x17UL 10858c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_QUERY_GID 0x18UL 10868c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_CREATE_QP1 0x13UL 10878c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_DESTROY_QP1 0x14UL 10888c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_CREATE_AH 0x15UL 10898c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_DESTROY_AH 0x16UL 10908c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_INITIALIZE_FW 0x80UL 10918c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_DEINITIALIZE_FW 0x81UL 10928c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_STOP_FUNC 0x82UL 10938c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_QUERY_FUNC 0x83UL 10948c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_SET_FUNC_RESOURCES 0x84UL 10958c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_READ_CONTEXT 0x85UL 10968c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_VF_BACKCHANNEL_REQUEST 0x86UL 10978c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_READ_VF_MEMORY 0x87UL 10988c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_COMPLETE_VF_REQUEST 0x88UL 10998c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_EXTEND_CONTEXT_ARRRAY 0x89UL 11008c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_MAP_TC_TO_COS 0x8aUL 11018c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_QUERY_VERSION 0x8bUL 11028c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_MODIFY_CC 0x8cUL 11038c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_QUERY_CC 0x8dUL 11048c2ecf20Sopenharmony_ci #define CMDQ_BASE_OPCODE_QUERY_ROCE_STATS 0x8eUL 11058c2ecf20Sopenharmony_ci u8 cmd_size; 11068c2ecf20Sopenharmony_ci __le16 flags; 11078c2ecf20Sopenharmony_ci __le16 cookie; 11088c2ecf20Sopenharmony_ci u8 resp_size; 11098c2ecf20Sopenharmony_ci u8 reserved8; 11108c2ecf20Sopenharmony_ci __le64 resp_addr; 11118c2ecf20Sopenharmony_ci}; 11128c2ecf20Sopenharmony_ci 11138c2ecf20Sopenharmony_ci/* Create QP command (96 bytes) */ 11148c2ecf20Sopenharmony_cistruct cmdq_create_qp { 11158c2ecf20Sopenharmony_ci u8 opcode; 11168c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_OPCODE_CREATE_QP 0x1UL 11178c2ecf20Sopenharmony_ci u8 cmd_size; 11188c2ecf20Sopenharmony_ci __le16 flags; 11198c2ecf20Sopenharmony_ci __le16 cookie; 11208c2ecf20Sopenharmony_ci u8 resp_size; 11218c2ecf20Sopenharmony_ci u8 reserved8; 11228c2ecf20Sopenharmony_ci __le64 resp_addr; 11238c2ecf20Sopenharmony_ci __le64 qp_handle; 11248c2ecf20Sopenharmony_ci __le32 qp_flags; 11258c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_QP_FLAGS_SRQ_USED 0x1UL 11268c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_QP_FLAGS_FORCE_COMPLETION 0x2UL 11278c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_QP_FLAGS_RESERVED_LKEY_ENABLE 0x4UL 11288c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_QP_FLAGS_FR_PMR_ENABLED 0x8UL 11298c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_QP_FLAGS_VARIABLE_SIZED_WQE_ENABLED 0x10UL 11308c2ecf20Sopenharmony_ci u8 type; 11318c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_TYPE_RC 0x2UL 11328c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_TYPE_UD 0x4UL 11338c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_TYPE_RAW_ETHERTYPE 0x6UL 11348c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_TYPE_GSI 0x7UL 11358c2ecf20Sopenharmony_ci u8 sq_pg_size_sq_lvl; 11368c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_LVL_MASK 0xfUL 11378c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_LVL_SFT 0 11388c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_LVL_LVL_0 0x0UL 11398c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_LVL_LVL_1 0x1UL 11408c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_LVL_LVL_2 0x2UL 11418c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_PG_SIZE_MASK 0xf0UL 11428c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_PG_SIZE_SFT 4 11438c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_4K (0x0UL << 4) 11448c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_8K (0x1UL << 4) 11458c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_64K (0x2UL << 4) 11468c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_2M (0x3UL << 4) 11478c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_8M (0x4UL << 4) 11488c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_PG_SIZE_PG_1G (0x5UL << 4) 11498c2ecf20Sopenharmony_ci u8 rq_pg_size_rq_lvl; 11508c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_LVL_MASK 0xfUL 11518c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_LVL_SFT 0 11528c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_LVL_LVL_0 0x0UL 11538c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_LVL_LVL_1 0x1UL 11548c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_LVL_LVL_2 0x2UL 11558c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_PG_SIZE_MASK 0xf0UL 11568c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_PG_SIZE_SFT 4 11578c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_4K (0x0UL << 4) 11588c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_8K (0x1UL << 4) 11598c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_64K (0x2UL << 4) 11608c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_2M (0x3UL << 4) 11618c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_8M (0x4UL << 4) 11628c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_PG_SIZE_PG_1G (0x5UL << 4) 11638c2ecf20Sopenharmony_ci u8 unused_0; 11648c2ecf20Sopenharmony_ci __le32 dpi; 11658c2ecf20Sopenharmony_ci __le32 sq_size; 11668c2ecf20Sopenharmony_ci __le32 rq_size; 11678c2ecf20Sopenharmony_ci __le16 sq_fwo_sq_sge; 11688c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_SGE_MASK 0xfUL 11698c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_SGE_SFT 0 11708c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_FWO_MASK 0xfff0UL 11718c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_SQ_FWO_SFT 4 11728c2ecf20Sopenharmony_ci __le16 rq_fwo_rq_sge; 11738c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_SGE_MASK 0xfUL 11748c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_SGE_SFT 0 11758c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_FWO_MASK 0xfff0UL 11768c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP_RQ_FWO_SFT 4 11778c2ecf20Sopenharmony_ci __le32 scq_cid; 11788c2ecf20Sopenharmony_ci __le32 rcq_cid; 11798c2ecf20Sopenharmony_ci __le32 srq_cid; 11808c2ecf20Sopenharmony_ci __le32 pd_id; 11818c2ecf20Sopenharmony_ci __le64 sq_pbl; 11828c2ecf20Sopenharmony_ci __le64 rq_pbl; 11838c2ecf20Sopenharmony_ci __le64 irrq_addr; 11848c2ecf20Sopenharmony_ci __le64 orrq_addr; 11858c2ecf20Sopenharmony_ci}; 11868c2ecf20Sopenharmony_ci 11878c2ecf20Sopenharmony_ci/* Destroy QP command (24 bytes) */ 11888c2ecf20Sopenharmony_cistruct cmdq_destroy_qp { 11898c2ecf20Sopenharmony_ci u8 opcode; 11908c2ecf20Sopenharmony_ci #define CMDQ_DESTROY_QP_OPCODE_DESTROY_QP 0x2UL 11918c2ecf20Sopenharmony_ci u8 cmd_size; 11928c2ecf20Sopenharmony_ci __le16 flags; 11938c2ecf20Sopenharmony_ci __le16 cookie; 11948c2ecf20Sopenharmony_ci u8 resp_size; 11958c2ecf20Sopenharmony_ci u8 reserved8; 11968c2ecf20Sopenharmony_ci __le64 resp_addr; 11978c2ecf20Sopenharmony_ci __le32 qp_cid; 11988c2ecf20Sopenharmony_ci __le32 unused_0; 11998c2ecf20Sopenharmony_ci}; 12008c2ecf20Sopenharmony_ci 12018c2ecf20Sopenharmony_ci/* Modify QP command (112 bytes) */ 12028c2ecf20Sopenharmony_cistruct cmdq_modify_qp { 12038c2ecf20Sopenharmony_ci u8 opcode; 12048c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_OPCODE_MODIFY_QP 0x3UL 12058c2ecf20Sopenharmony_ci u8 cmd_size; 12068c2ecf20Sopenharmony_ci __le16 flags; 12078c2ecf20Sopenharmony_ci __le16 cookie; 12088c2ecf20Sopenharmony_ci u8 resp_size; 12098c2ecf20Sopenharmony_ci u8 reserved8; 12108c2ecf20Sopenharmony_ci __le64 resp_addr; 12118c2ecf20Sopenharmony_ci __le32 modify_mask; 12128c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_STATE 0x1UL 12138c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_EN_SQD_ASYNC_NOTIFY 0x2UL 12148c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_ACCESS 0x4UL 12158c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_PKEY 0x8UL 12168c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_QKEY 0x10UL 12178c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_DGID 0x20UL 12188c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_FLOW_LABEL 0x40UL 12198c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_SGID_INDEX 0x80UL 12208c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_HOP_LIMIT 0x100UL 12218c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_TRAFFIC_CLASS 0x200UL 12228c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_DEST_MAC 0x400UL 12238c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_PATH_MTU 0x1000UL 12248c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_TIMEOUT 0x2000UL 12258c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_RETRY_CNT 0x4000UL 12268c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_RNR_RETRY 0x8000UL 12278c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_RQ_PSN 0x10000UL 12288c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_MAX_RD_ATOMIC 0x20000UL 12298c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_MIN_RNR_TIMER 0x40000UL 12308c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_SQ_PSN 0x80000UL 12318c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_MAX_DEST_RD_ATOMIC 0x100000UL 12328c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_SQ_SIZE 0x200000UL 12338c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_RQ_SIZE 0x400000UL 12348c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_SQ_SGE 0x800000UL 12358c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_RQ_SGE 0x1000000UL 12368c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_MAX_INLINE_DATA 0x2000000UL 12378c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_DEST_QP_ID 0x4000000UL 12388c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_SRC_MAC 0x8000000UL 12398c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_VLAN_ID 0x10000000UL 12408c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_ENABLE_CC 0x20000000UL 12418c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_TOS_ECN 0x40000000UL 12428c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_MODIFY_MASK_TOS_DSCP 0x80000000UL 12438c2ecf20Sopenharmony_ci __le32 qp_cid; 12448c2ecf20Sopenharmony_ci u8 network_type_en_sqd_async_notify_new_state; 12458c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NEW_STATE_MASK 0xfUL 12468c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NEW_STATE_SFT 0 12478c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NEW_STATE_RESET 0x0UL 12488c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NEW_STATE_INIT 0x1UL 12498c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NEW_STATE_RTR 0x2UL 12508c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NEW_STATE_RTS 0x3UL 12518c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NEW_STATE_SQD 0x4UL 12528c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NEW_STATE_SQE 0x5UL 12538c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NEW_STATE_ERR 0x6UL 12548c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_EN_SQD_ASYNC_NOTIFY 0x10UL 12558c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NETWORK_TYPE_MASK 0xc0UL 12568c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NETWORK_TYPE_SFT 6 12578c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV1 (0x0UL << 6) 12588c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV2_IPV4 (0x2UL << 6) 12598c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_NETWORK_TYPE_ROCEV2_IPV6 (0x3UL << 6) 12608c2ecf20Sopenharmony_ci u8 access; 12618c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_ACCESS_LOCAL_WRITE 0x1UL 12628c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_ACCESS_REMOTE_WRITE 0x2UL 12638c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_ACCESS_REMOTE_READ 0x4UL 12648c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_ACCESS_REMOTE_ATOMIC 0x8UL 12658c2ecf20Sopenharmony_ci __le16 pkey; 12668c2ecf20Sopenharmony_ci __le32 qkey; 12678c2ecf20Sopenharmony_ci __le32 dgid[4]; 12688c2ecf20Sopenharmony_ci __le32 flow_label; 12698c2ecf20Sopenharmony_ci __le16 sgid_index; 12708c2ecf20Sopenharmony_ci u8 hop_limit; 12718c2ecf20Sopenharmony_ci u8 traffic_class; 12728c2ecf20Sopenharmony_ci __le16 dest_mac[3]; 12738c2ecf20Sopenharmony_ci u8 tos_dscp_tos_ecn; 12748c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_TOS_ECN_MASK 0x3UL 12758c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_TOS_ECN_SFT 0 12768c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_TOS_DSCP_MASK 0xfcUL 12778c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_TOS_DSCP_SFT 2 12788c2ecf20Sopenharmony_ci u8 path_mtu; 12798c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_PATH_MTU_MASK 0xf0UL 12808c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_PATH_MTU_SFT 4 12818c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_PATH_MTU_MTU_256 (0x0UL << 4) 12828c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_PATH_MTU_MTU_512 (0x1UL << 4) 12838c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_PATH_MTU_MTU_1024 (0x2UL << 4) 12848c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_PATH_MTU_MTU_2048 (0x3UL << 4) 12858c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_PATH_MTU_MTU_4096 (0x4UL << 4) 12868c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_PATH_MTU_MTU_8192 (0x5UL << 4) 12878c2ecf20Sopenharmony_ci u8 timeout; 12888c2ecf20Sopenharmony_ci u8 retry_cnt; 12898c2ecf20Sopenharmony_ci u8 rnr_retry; 12908c2ecf20Sopenharmony_ci u8 min_rnr_timer; 12918c2ecf20Sopenharmony_ci __le32 rq_psn; 12928c2ecf20Sopenharmony_ci __le32 sq_psn; 12938c2ecf20Sopenharmony_ci u8 max_rd_atomic; 12948c2ecf20Sopenharmony_ci u8 max_dest_rd_atomic; 12958c2ecf20Sopenharmony_ci __le16 enable_cc; 12968c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_ENABLE_CC 0x1UL 12978c2ecf20Sopenharmony_ci __le32 sq_size; 12988c2ecf20Sopenharmony_ci __le32 rq_size; 12998c2ecf20Sopenharmony_ci __le16 sq_sge; 13008c2ecf20Sopenharmony_ci __le16 rq_sge; 13018c2ecf20Sopenharmony_ci __le32 max_inline_data; 13028c2ecf20Sopenharmony_ci __le32 dest_qp_id; 13038c2ecf20Sopenharmony_ci __le32 unused_3; 13048c2ecf20Sopenharmony_ci __le16 src_mac[3]; 13058c2ecf20Sopenharmony_ci __le16 vlan_pcp_vlan_dei_vlan_id; 13068c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_VLAN_ID_MASK 0xfffUL 13078c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_VLAN_ID_SFT 0 13088c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_VLAN_DEI 0x1000UL 13098c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_VLAN_PCP_MASK 0xe000UL 13108c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_QP_VLAN_PCP_SFT 13 13118c2ecf20Sopenharmony_ci}; 13128c2ecf20Sopenharmony_ci 13138c2ecf20Sopenharmony_ci/* Query QP command (24 bytes) */ 13148c2ecf20Sopenharmony_cistruct cmdq_query_qp { 13158c2ecf20Sopenharmony_ci u8 opcode; 13168c2ecf20Sopenharmony_ci #define CMDQ_QUERY_QP_OPCODE_QUERY_QP 0x4UL 13178c2ecf20Sopenharmony_ci u8 cmd_size; 13188c2ecf20Sopenharmony_ci __le16 flags; 13198c2ecf20Sopenharmony_ci __le16 cookie; 13208c2ecf20Sopenharmony_ci u8 resp_size; 13218c2ecf20Sopenharmony_ci u8 reserved8; 13228c2ecf20Sopenharmony_ci __le64 resp_addr; 13238c2ecf20Sopenharmony_ci __le32 qp_cid; 13248c2ecf20Sopenharmony_ci __le32 unused_0; 13258c2ecf20Sopenharmony_ci}; 13268c2ecf20Sopenharmony_ci 13278c2ecf20Sopenharmony_ci/* Create SRQ command (48 bytes) */ 13288c2ecf20Sopenharmony_cistruct cmdq_create_srq { 13298c2ecf20Sopenharmony_ci u8 opcode; 13308c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_OPCODE_CREATE_SRQ 0x5UL 13318c2ecf20Sopenharmony_ci u8 cmd_size; 13328c2ecf20Sopenharmony_ci __le16 flags; 13338c2ecf20Sopenharmony_ci __le16 cookie; 13348c2ecf20Sopenharmony_ci u8 resp_size; 13358c2ecf20Sopenharmony_ci u8 reserved8; 13368c2ecf20Sopenharmony_ci __le64 resp_addr; 13378c2ecf20Sopenharmony_ci __le64 srq_handle; 13388c2ecf20Sopenharmony_ci __le16 pg_size_lvl; 13398c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_LVL_MASK 0x3UL 13408c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_LVL_SFT 0 13418c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_LVL_LVL_0 0x0UL 13428c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_LVL_LVL_1 0x1UL 13438c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_LVL_LVL_2 0x2UL 13448c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_PG_SIZE_MASK 0x1cUL 13458c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_PG_SIZE_SFT 2 13468c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_PG_SIZE_PG_4K (0x0UL << 2) 13478c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_PG_SIZE_PG_8K (0x1UL << 2) 13488c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_PG_SIZE_PG_64K (0x2UL << 2) 13498c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_PG_SIZE_PG_2M (0x3UL << 2) 13508c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_PG_SIZE_PG_8M (0x4UL << 2) 13518c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_PG_SIZE_PG_1G (0x5UL << 2) 13528c2ecf20Sopenharmony_ci __le16 eventq_id; 13538c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_EVENTQ_ID_MASK 0xfffUL 13548c2ecf20Sopenharmony_ci #define CMDQ_CREATE_SRQ_EVENTQ_ID_SFT 0 13558c2ecf20Sopenharmony_ci __le16 srq_size; 13568c2ecf20Sopenharmony_ci __le16 srq_fwo; 13578c2ecf20Sopenharmony_ci __le32 dpi; 13588c2ecf20Sopenharmony_ci __le32 pd_id; 13598c2ecf20Sopenharmony_ci __le64 pbl; 13608c2ecf20Sopenharmony_ci}; 13618c2ecf20Sopenharmony_ci 13628c2ecf20Sopenharmony_ci/* Destroy SRQ command (24 bytes) */ 13638c2ecf20Sopenharmony_cistruct cmdq_destroy_srq { 13648c2ecf20Sopenharmony_ci u8 opcode; 13658c2ecf20Sopenharmony_ci #define CMDQ_DESTROY_SRQ_OPCODE_DESTROY_SRQ 0x6UL 13668c2ecf20Sopenharmony_ci u8 cmd_size; 13678c2ecf20Sopenharmony_ci __le16 flags; 13688c2ecf20Sopenharmony_ci __le16 cookie; 13698c2ecf20Sopenharmony_ci u8 resp_size; 13708c2ecf20Sopenharmony_ci u8 reserved8; 13718c2ecf20Sopenharmony_ci __le64 resp_addr; 13728c2ecf20Sopenharmony_ci __le32 srq_cid; 13738c2ecf20Sopenharmony_ci __le32 unused_0; 13748c2ecf20Sopenharmony_ci}; 13758c2ecf20Sopenharmony_ci 13768c2ecf20Sopenharmony_ci/* Query SRQ command (24 bytes) */ 13778c2ecf20Sopenharmony_cistruct cmdq_query_srq { 13788c2ecf20Sopenharmony_ci u8 opcode; 13798c2ecf20Sopenharmony_ci #define CMDQ_QUERY_SRQ_OPCODE_QUERY_SRQ 0x8UL 13808c2ecf20Sopenharmony_ci u8 cmd_size; 13818c2ecf20Sopenharmony_ci __le16 flags; 13828c2ecf20Sopenharmony_ci __le16 cookie; 13838c2ecf20Sopenharmony_ci u8 resp_size; 13848c2ecf20Sopenharmony_ci u8 reserved8; 13858c2ecf20Sopenharmony_ci __le64 resp_addr; 13868c2ecf20Sopenharmony_ci __le32 srq_cid; 13878c2ecf20Sopenharmony_ci __le32 unused_0; 13888c2ecf20Sopenharmony_ci}; 13898c2ecf20Sopenharmony_ci 13908c2ecf20Sopenharmony_ci/* Create CQ command (48 bytes) */ 13918c2ecf20Sopenharmony_cistruct cmdq_create_cq { 13928c2ecf20Sopenharmony_ci u8 opcode; 13938c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_OPCODE_CREATE_CQ 0x9UL 13948c2ecf20Sopenharmony_ci u8 cmd_size; 13958c2ecf20Sopenharmony_ci __le16 flags; 13968c2ecf20Sopenharmony_ci __le16 cookie; 13978c2ecf20Sopenharmony_ci u8 resp_size; 13988c2ecf20Sopenharmony_ci u8 reserved8; 13998c2ecf20Sopenharmony_ci __le64 resp_addr; 14008c2ecf20Sopenharmony_ci __le64 cq_handle; 14018c2ecf20Sopenharmony_ci __le32 pg_size_lvl; 14028c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_LVL_MASK 0x3UL 14038c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_LVL_SFT 0 14048c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_LVL_LVL_0 0x0UL 14058c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_LVL_LVL_1 0x1UL 14068c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_LVL_LVL_2 0x2UL 14078c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_PG_SIZE_MASK 0x1cUL 14088c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_PG_SIZE_SFT 2 14098c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_PG_SIZE_PG_4K (0x0UL << 2) 14108c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_PG_SIZE_PG_8K (0x1UL << 2) 14118c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_PG_SIZE_PG_64K (0x2UL << 2) 14128c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_PG_SIZE_PG_2M (0x3UL << 2) 14138c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_PG_SIZE_PG_8M (0x4UL << 2) 14148c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_PG_SIZE_PG_1G (0x5UL << 2) 14158c2ecf20Sopenharmony_ci __le32 cq_fco_cnq_id; 14168c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_CNQ_ID_MASK 0xfffUL 14178c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_CNQ_ID_SFT 0 14188c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_CQ_FCO_MASK 0xfffff000UL 14198c2ecf20Sopenharmony_ci #define CMDQ_CREATE_CQ_CQ_FCO_SFT 12 14208c2ecf20Sopenharmony_ci __le32 dpi; 14218c2ecf20Sopenharmony_ci __le32 cq_size; 14228c2ecf20Sopenharmony_ci __le64 pbl; 14238c2ecf20Sopenharmony_ci}; 14248c2ecf20Sopenharmony_ci 14258c2ecf20Sopenharmony_ci/* Destroy CQ command (24 bytes) */ 14268c2ecf20Sopenharmony_cistruct cmdq_destroy_cq { 14278c2ecf20Sopenharmony_ci u8 opcode; 14288c2ecf20Sopenharmony_ci #define CMDQ_DESTROY_CQ_OPCODE_DESTROY_CQ 0xaUL 14298c2ecf20Sopenharmony_ci u8 cmd_size; 14308c2ecf20Sopenharmony_ci __le16 flags; 14318c2ecf20Sopenharmony_ci __le16 cookie; 14328c2ecf20Sopenharmony_ci u8 resp_size; 14338c2ecf20Sopenharmony_ci u8 reserved8; 14348c2ecf20Sopenharmony_ci __le64 resp_addr; 14358c2ecf20Sopenharmony_ci __le32 cq_cid; 14368c2ecf20Sopenharmony_ci __le32 unused_0; 14378c2ecf20Sopenharmony_ci}; 14388c2ecf20Sopenharmony_ci 14398c2ecf20Sopenharmony_ci/* Resize CQ command (40 bytes) */ 14408c2ecf20Sopenharmony_cistruct cmdq_resize_cq { 14418c2ecf20Sopenharmony_ci u8 opcode; 14428c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_OPCODE_RESIZE_CQ 0xcUL 14438c2ecf20Sopenharmony_ci u8 cmd_size; 14448c2ecf20Sopenharmony_ci __le16 flags; 14458c2ecf20Sopenharmony_ci __le16 cookie; 14468c2ecf20Sopenharmony_ci u8 resp_size; 14478c2ecf20Sopenharmony_ci u8 reserved8; 14488c2ecf20Sopenharmony_ci __le64 resp_addr; 14498c2ecf20Sopenharmony_ci __le32 cq_cid; 14508c2ecf20Sopenharmony_ci __le32 new_cq_size_pg_size_lvl; 14518c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_LVL_MASK 0x3UL 14528c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_LVL_SFT 0 14538c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_LVL_LVL_0 0x0UL 14548c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_LVL_LVL_1 0x1UL 14558c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_LVL_LVL_2 0x2UL 14568c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_PG_SIZE_MASK 0x1cUL 14578c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_PG_SIZE_SFT 2 14588c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_PG_SIZE_PG_4K (0x0UL << 2) 14598c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_PG_SIZE_PG_8K (0x1UL << 2) 14608c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_PG_SIZE_PG_64K (0x2UL << 2) 14618c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_PG_SIZE_PG_2M (0x3UL << 2) 14628c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_PG_SIZE_PG_8M (0x4UL << 2) 14638c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_PG_SIZE_PG_1G (0x5UL << 2) 14648c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_NEW_CQ_SIZE_MASK 0x1fffe0UL 14658c2ecf20Sopenharmony_ci #define CMDQ_RESIZE_CQ_NEW_CQ_SIZE_SFT 5 14668c2ecf20Sopenharmony_ci __le64 new_pbl; 14678c2ecf20Sopenharmony_ci __le32 new_cq_fco; 14688c2ecf20Sopenharmony_ci __le32 unused_2; 14698c2ecf20Sopenharmony_ci}; 14708c2ecf20Sopenharmony_ci 14718c2ecf20Sopenharmony_ci/* Allocate MRW command (32 bytes) */ 14728c2ecf20Sopenharmony_cistruct cmdq_allocate_mrw { 14738c2ecf20Sopenharmony_ci u8 opcode; 14748c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_OPCODE_ALLOCATE_MRW 0xdUL 14758c2ecf20Sopenharmony_ci u8 cmd_size; 14768c2ecf20Sopenharmony_ci __le16 flags; 14778c2ecf20Sopenharmony_ci __le16 cookie; 14788c2ecf20Sopenharmony_ci u8 resp_size; 14798c2ecf20Sopenharmony_ci u8 reserved8; 14808c2ecf20Sopenharmony_ci __le64 resp_addr; 14818c2ecf20Sopenharmony_ci __le64 mrw_handle; 14828c2ecf20Sopenharmony_ci u8 mrw_flags; 14838c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MASK 0xfUL 14848c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_MRW_FLAGS_SFT 0 14858c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MR 0x0UL 14868c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_MRW_FLAGS_PMR 0x1UL 14878c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE1 0x2UL 14888c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2A 0x3UL 14898c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_MRW_FLAGS_MW_TYPE2B 0x4UL 14908c2ecf20Sopenharmony_ci u8 access; 14918c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_ACCESS_RESERVED_MASK 0x1fUL 14928c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_ACCESS_RESERVED_SFT 0 14938c2ecf20Sopenharmony_ci #define CMDQ_ALLOCATE_MRW_ACCESS_CONSUMER_OWNED_KEY 0x20UL 14948c2ecf20Sopenharmony_ci __le16 unused_1; 14958c2ecf20Sopenharmony_ci __le32 pd_id; 14968c2ecf20Sopenharmony_ci}; 14978c2ecf20Sopenharmony_ci 14988c2ecf20Sopenharmony_ci/* De-allocate key command (24 bytes) */ 14998c2ecf20Sopenharmony_cistruct cmdq_deallocate_key { 15008c2ecf20Sopenharmony_ci u8 opcode; 15018c2ecf20Sopenharmony_ci #define CMDQ_DEALLOCATE_KEY_OPCODE_DEALLOCATE_KEY 0xeUL 15028c2ecf20Sopenharmony_ci u8 cmd_size; 15038c2ecf20Sopenharmony_ci __le16 flags; 15048c2ecf20Sopenharmony_ci __le16 cookie; 15058c2ecf20Sopenharmony_ci u8 resp_size; 15068c2ecf20Sopenharmony_ci u8 reserved8; 15078c2ecf20Sopenharmony_ci __le64 resp_addr; 15088c2ecf20Sopenharmony_ci u8 mrw_flags; 15098c2ecf20Sopenharmony_ci #define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MASK 0xfUL 15108c2ecf20Sopenharmony_ci #define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_SFT 0 15118c2ecf20Sopenharmony_ci #define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MR 0x0UL 15128c2ecf20Sopenharmony_ci #define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_PMR 0x1UL 15138c2ecf20Sopenharmony_ci #define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE1 0x2UL 15148c2ecf20Sopenharmony_ci #define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE2A 0x3UL 15158c2ecf20Sopenharmony_ci #define CMDQ_DEALLOCATE_KEY_MRW_FLAGS_MW_TYPE2B 0x4UL 15168c2ecf20Sopenharmony_ci u8 unused_1[3]; 15178c2ecf20Sopenharmony_ci __le32 key; 15188c2ecf20Sopenharmony_ci}; 15198c2ecf20Sopenharmony_ci 15208c2ecf20Sopenharmony_ci/* Register MR command (48 bytes) */ 15218c2ecf20Sopenharmony_cistruct cmdq_register_mr { 15228c2ecf20Sopenharmony_ci u8 opcode; 15238c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_OPCODE_REGISTER_MR 0xfUL 15248c2ecf20Sopenharmony_ci u8 cmd_size; 15258c2ecf20Sopenharmony_ci __le16 flags; 15268c2ecf20Sopenharmony_ci __le16 cookie; 15278c2ecf20Sopenharmony_ci u8 resp_size; 15288c2ecf20Sopenharmony_ci u8 reserved8; 15298c2ecf20Sopenharmony_ci __le64 resp_addr; 15308c2ecf20Sopenharmony_ci u8 log2_pg_size_lvl; 15318c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LVL_MASK 0x3UL 15328c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LVL_SFT 0 15338c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LVL_LVL_0 0x0UL 15348c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LVL_LVL_1 0x1UL 15358c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LVL_LVL_2 0x2UL 15368c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LVL_LAST CMDQ_REGISTER_MR_LVL_LVL_2 15378c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_MASK 0x7cUL 15388c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_SFT 2 15398c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_4K (0xcUL << 2) 15408c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_8K (0xdUL << 2) 15418c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_64K (0x10UL << 2) 15428c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_256K (0x12UL << 2) 15438c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_1M (0x14UL << 2) 15448c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_2M (0x15UL << 2) 15458c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_4M (0x16UL << 2) 15468c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_1G (0x1eUL << 2) 15478c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PG_SIZE_LAST \ 15488c2ecf20Sopenharmony_ci CMDQ_REGISTER_MR_LOG2_PG_SIZE_PG_1G 15498c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_UNUSED1 0x80UL 15508c2ecf20Sopenharmony_ci u8 access; 15518c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_ACCESS_LOCAL_WRITE 0x1UL 15528c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_ACCESS_REMOTE_READ 0x2UL 15538c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_ACCESS_REMOTE_WRITE 0x4UL 15548c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_ACCESS_REMOTE_ATOMIC 0x8UL 15558c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_ACCESS_MW_BIND 0x10UL 15568c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_ACCESS_ZERO_BASED 0x20UL 15578c2ecf20Sopenharmony_ci __le16 log2_pbl_pg_size; 15588c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_MASK 0x1fUL 15598c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_SFT 0 15608c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_4K 0xcUL 15618c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_8K 0xdUL 15628c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_64K 0x10UL 15638c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_256K 0x12UL 15648c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_1M 0x14UL 15658c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_2M 0x15UL 15668c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_4M 0x16UL 15678c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_1G 0x1eUL 15688c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_LAST \ 15698c2ecf20Sopenharmony_ci CMDQ_REGISTER_MR_LOG2_PBL_PG_SIZE_PG_1G 15708c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_UNUSED11_MASK 0xffe0UL 15718c2ecf20Sopenharmony_ci #define CMDQ_REGISTER_MR_UNUSED11_SFT 5 15728c2ecf20Sopenharmony_ci __le32 key; 15738c2ecf20Sopenharmony_ci __le64 pbl; 15748c2ecf20Sopenharmony_ci __le64 va; 15758c2ecf20Sopenharmony_ci __le64 mr_size; 15768c2ecf20Sopenharmony_ci}; 15778c2ecf20Sopenharmony_ci 15788c2ecf20Sopenharmony_ci/* Deregister MR command (24 bytes) */ 15798c2ecf20Sopenharmony_cistruct cmdq_deregister_mr { 15808c2ecf20Sopenharmony_ci u8 opcode; 15818c2ecf20Sopenharmony_ci #define CMDQ_DEREGISTER_MR_OPCODE_DEREGISTER_MR 0x10UL 15828c2ecf20Sopenharmony_ci u8 cmd_size; 15838c2ecf20Sopenharmony_ci __le16 flags; 15848c2ecf20Sopenharmony_ci __le16 cookie; 15858c2ecf20Sopenharmony_ci u8 resp_size; 15868c2ecf20Sopenharmony_ci u8 reserved8; 15878c2ecf20Sopenharmony_ci __le64 resp_addr; 15888c2ecf20Sopenharmony_ci __le32 lkey; 15898c2ecf20Sopenharmony_ci __le32 unused_0; 15908c2ecf20Sopenharmony_ci}; 15918c2ecf20Sopenharmony_ci 15928c2ecf20Sopenharmony_ci/* Add GID command (48 bytes) */ 15938c2ecf20Sopenharmony_cistruct cmdq_add_gid { 15948c2ecf20Sopenharmony_ci u8 opcode; 15958c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_OPCODE_ADD_GID 0x11UL 15968c2ecf20Sopenharmony_ci u8 cmd_size; 15978c2ecf20Sopenharmony_ci __le16 flags; 15988c2ecf20Sopenharmony_ci __le16 cookie; 15998c2ecf20Sopenharmony_ci u8 resp_size; 16008c2ecf20Sopenharmony_ci u8 reserved8; 16018c2ecf20Sopenharmony_ci __le64 resp_addr; 16028c2ecf20Sopenharmony_ci __be32 gid[4]; 16038c2ecf20Sopenharmony_ci __be16 src_mac[3]; 16048c2ecf20Sopenharmony_ci __le16 vlan; 16058c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_VLAN_ID_MASK 0xfffUL 16068c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_VLAN_ID_SFT 0 16078c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_MASK 0x7000UL 16088c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_SFT 12 16098c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_TPID_88A8 (0x0UL << 12) 16108c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_TPID_8100 (0x1UL << 12) 16118c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_TPID_9100 (0x2UL << 12) 16128c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_TPID_9200 (0x3UL << 12) 16138c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_TPID_9300 (0x4UL << 12) 16148c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_TPID_CFG1 (0x5UL << 12) 16158c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_TPID_CFG2 (0x6UL << 12) 16168c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_TPID_CFG3 (0x7UL << 12) 16178c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_TPID_LAST CMDQ_ADD_GID_VLAN_TPID_TPID_CFG3 16188c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_VLAN_VLAN_EN 0x8000UL 16198c2ecf20Sopenharmony_ci __le16 ipid; 16208c2ecf20Sopenharmony_ci __le16 stats_ctx; 16218c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_ID_MASK 0x7fffUL 16228c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_ID_SFT 0 16238c2ecf20Sopenharmony_ci #define CMDQ_ADD_GID_STATS_CTX_STATS_CTX_VALID 0x8000UL 16248c2ecf20Sopenharmony_ci __le32 unused_0; 16258c2ecf20Sopenharmony_ci}; 16268c2ecf20Sopenharmony_ci 16278c2ecf20Sopenharmony_ci/* Delete GID command (24 bytes) */ 16288c2ecf20Sopenharmony_cistruct cmdq_delete_gid { 16298c2ecf20Sopenharmony_ci u8 opcode; 16308c2ecf20Sopenharmony_ci #define CMDQ_DELETE_GID_OPCODE_DELETE_GID 0x12UL 16318c2ecf20Sopenharmony_ci u8 cmd_size; 16328c2ecf20Sopenharmony_ci __le16 flags; 16338c2ecf20Sopenharmony_ci __le16 cookie; 16348c2ecf20Sopenharmony_ci u8 resp_size; 16358c2ecf20Sopenharmony_ci u8 reserved8; 16368c2ecf20Sopenharmony_ci __le64 resp_addr; 16378c2ecf20Sopenharmony_ci __le16 gid_index; 16388c2ecf20Sopenharmony_ci __le16 unused_0; 16398c2ecf20Sopenharmony_ci __le32 unused_1; 16408c2ecf20Sopenharmony_ci}; 16418c2ecf20Sopenharmony_ci 16428c2ecf20Sopenharmony_ci/* Modify GID command (48 bytes) */ 16438c2ecf20Sopenharmony_cistruct cmdq_modify_gid { 16448c2ecf20Sopenharmony_ci u8 opcode; 16458c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_OPCODE_MODIFY_GID 0x17UL 16468c2ecf20Sopenharmony_ci u8 cmd_size; 16478c2ecf20Sopenharmony_ci __le16 flags; 16488c2ecf20Sopenharmony_ci __le16 cookie; 16498c2ecf20Sopenharmony_ci u8 resp_size; 16508c2ecf20Sopenharmony_ci u8 reserved8; 16518c2ecf20Sopenharmony_ci __le64 resp_addr; 16528c2ecf20Sopenharmony_ci __be32 gid[4]; 16538c2ecf20Sopenharmony_ci __be16 src_mac[3]; 16548c2ecf20Sopenharmony_ci __le16 vlan; 16558c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_VLAN_ID_MASK 0xfffUL 16568c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_VLAN_ID_SFT 0 16578c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_MASK 0x7000UL 16588c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_SFT 12 16598c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_TPID_88A8 (0x0UL << 12) 16608c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_TPID_8100 (0x1UL << 12) 16618c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_TPID_9100 (0x2UL << 12) 16628c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_TPID_9200 (0x3UL << 12) 16638c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_TPID_9300 (0x4UL << 12) 16648c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG1 (0x5UL << 12) 16658c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG2 (0x6UL << 12) 16668c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG3 (0x7UL << 12) 16678c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_TPID_LAST \ 16688c2ecf20Sopenharmony_ci CMDQ_MODIFY_GID_VLAN_TPID_TPID_CFG3 16698c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_VLAN_VLAN_EN 0x8000UL 16708c2ecf20Sopenharmony_ci __le16 ipid; 16718c2ecf20Sopenharmony_ci __le16 gid_index; 16728c2ecf20Sopenharmony_ci __le16 stats_ctx; 16738c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_STATS_CTX_STATS_CTX_ID_MASK 0x7fffUL 16748c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_STATS_CTX_STATS_CTX_ID_SFT 0 16758c2ecf20Sopenharmony_ci #define CMDQ_MODIFY_GID_STATS_CTX_STATS_CTX_VALID 0x8000UL 16768c2ecf20Sopenharmony_ci __le16 unused_0; 16778c2ecf20Sopenharmony_ci}; 16788c2ecf20Sopenharmony_ci 16798c2ecf20Sopenharmony_ci/* Query GID command (24 bytes) */ 16808c2ecf20Sopenharmony_cistruct cmdq_query_gid { 16818c2ecf20Sopenharmony_ci u8 opcode; 16828c2ecf20Sopenharmony_ci #define CMDQ_QUERY_GID_OPCODE_QUERY_GID 0x18UL 16838c2ecf20Sopenharmony_ci u8 cmd_size; 16848c2ecf20Sopenharmony_ci __le16 flags; 16858c2ecf20Sopenharmony_ci __le16 cookie; 16868c2ecf20Sopenharmony_ci u8 resp_size; 16878c2ecf20Sopenharmony_ci u8 reserved8; 16888c2ecf20Sopenharmony_ci __le64 resp_addr; 16898c2ecf20Sopenharmony_ci __le16 gid_index; 16908c2ecf20Sopenharmony_ci __le16 unused_0; 16918c2ecf20Sopenharmony_ci __le32 unused_1; 16928c2ecf20Sopenharmony_ci}; 16938c2ecf20Sopenharmony_ci 16948c2ecf20Sopenharmony_ci/* Create QP1 command (80 bytes) */ 16958c2ecf20Sopenharmony_cistruct cmdq_create_qp1 { 16968c2ecf20Sopenharmony_ci u8 opcode; 16978c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_OPCODE_CREATE_QP1 0x13UL 16988c2ecf20Sopenharmony_ci u8 cmd_size; 16998c2ecf20Sopenharmony_ci __le16 flags; 17008c2ecf20Sopenharmony_ci __le16 cookie; 17018c2ecf20Sopenharmony_ci u8 resp_size; 17028c2ecf20Sopenharmony_ci u8 reserved8; 17038c2ecf20Sopenharmony_ci __le64 resp_addr; 17048c2ecf20Sopenharmony_ci __le64 qp_handle; 17058c2ecf20Sopenharmony_ci __le32 qp_flags; 17068c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_QP_FLAGS_SRQ_USED 0x1UL 17078c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_QP_FLAGS_FORCE_COMPLETION 0x2UL 17088c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_QP_FLAGS_RESERVED_LKEY_ENABLE 0x4UL 17098c2ecf20Sopenharmony_ci u8 type; 17108c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_TYPE_GSI 0x1UL 17118c2ecf20Sopenharmony_ci u8 sq_pg_size_sq_lvl; 17128c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_LVL_MASK 0xfUL 17138c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_LVL_SFT 0 17148c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_LVL_LVL_0 0x0UL 17158c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_LVL_LVL_1 0x1UL 17168c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_LVL_LVL_2 0x2UL 17178c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_PG_SIZE_MASK 0xf0UL 17188c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_PG_SIZE_SFT 4 17198c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_4K (0x0UL << 4) 17208c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_8K (0x1UL << 4) 17218c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_64K (0x2UL << 4) 17228c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_2M (0x3UL << 4) 17238c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_8M (0x4UL << 4) 17248c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_PG_SIZE_PG_1G (0x5UL << 4) 17258c2ecf20Sopenharmony_ci u8 rq_pg_size_rq_lvl; 17268c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_LVL_MASK 0xfUL 17278c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_LVL_SFT 0 17288c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_LVL_LVL_0 0x0UL 17298c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_LVL_LVL_1 0x1UL 17308c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_LVL_LVL_2 0x2UL 17318c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_PG_SIZE_MASK 0xf0UL 17328c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_PG_SIZE_SFT 4 17338c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_4K (0x0UL << 4) 17348c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_8K (0x1UL << 4) 17358c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_64K (0x2UL << 4) 17368c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_2M (0x3UL << 4) 17378c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_8M (0x4UL << 4) 17388c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_PG_SIZE_PG_1G (0x5UL << 4) 17398c2ecf20Sopenharmony_ci u8 unused_0; 17408c2ecf20Sopenharmony_ci __le32 dpi; 17418c2ecf20Sopenharmony_ci __le32 sq_size; 17428c2ecf20Sopenharmony_ci __le32 rq_size; 17438c2ecf20Sopenharmony_ci __le16 sq_fwo_sq_sge; 17448c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_SGE_MASK 0xfUL 17458c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_SGE_SFT 0 17468c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_FWO_MASK 0xfff0UL 17478c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_SQ_FWO_SFT 4 17488c2ecf20Sopenharmony_ci __le16 rq_fwo_rq_sge; 17498c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_SGE_MASK 0xfUL 17508c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_SGE_SFT 0 17518c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_FWO_MASK 0xfff0UL 17528c2ecf20Sopenharmony_ci #define CMDQ_CREATE_QP1_RQ_FWO_SFT 4 17538c2ecf20Sopenharmony_ci __le32 scq_cid; 17548c2ecf20Sopenharmony_ci __le32 rcq_cid; 17558c2ecf20Sopenharmony_ci __le32 srq_cid; 17568c2ecf20Sopenharmony_ci __le32 pd_id; 17578c2ecf20Sopenharmony_ci __le64 sq_pbl; 17588c2ecf20Sopenharmony_ci __le64 rq_pbl; 17598c2ecf20Sopenharmony_ci}; 17608c2ecf20Sopenharmony_ci 17618c2ecf20Sopenharmony_ci/* Destroy QP1 command (24 bytes) */ 17628c2ecf20Sopenharmony_cistruct cmdq_destroy_qp1 { 17638c2ecf20Sopenharmony_ci u8 opcode; 17648c2ecf20Sopenharmony_ci #define CMDQ_DESTROY_QP1_OPCODE_DESTROY_QP1 0x14UL 17658c2ecf20Sopenharmony_ci u8 cmd_size; 17668c2ecf20Sopenharmony_ci __le16 flags; 17678c2ecf20Sopenharmony_ci __le16 cookie; 17688c2ecf20Sopenharmony_ci u8 resp_size; 17698c2ecf20Sopenharmony_ci u8 reserved8; 17708c2ecf20Sopenharmony_ci __le64 resp_addr; 17718c2ecf20Sopenharmony_ci __le32 qp1_cid; 17728c2ecf20Sopenharmony_ci __le32 unused_0; 17738c2ecf20Sopenharmony_ci}; 17748c2ecf20Sopenharmony_ci 17758c2ecf20Sopenharmony_ci/* Create AH command (64 bytes) */ 17768c2ecf20Sopenharmony_cistruct cmdq_create_ah { 17778c2ecf20Sopenharmony_ci u8 opcode; 17788c2ecf20Sopenharmony_ci #define CMDQ_CREATE_AH_OPCODE_CREATE_AH 0x15UL 17798c2ecf20Sopenharmony_ci u8 cmd_size; 17808c2ecf20Sopenharmony_ci __le16 flags; 17818c2ecf20Sopenharmony_ci __le16 cookie; 17828c2ecf20Sopenharmony_ci u8 resp_size; 17838c2ecf20Sopenharmony_ci u8 reserved8; 17848c2ecf20Sopenharmony_ci __le64 resp_addr; 17858c2ecf20Sopenharmony_ci __le64 ah_handle; 17868c2ecf20Sopenharmony_ci __le32 dgid[4]; 17878c2ecf20Sopenharmony_ci u8 type; 17888c2ecf20Sopenharmony_ci #define CMDQ_CREATE_AH_TYPE_V1 0x0UL 17898c2ecf20Sopenharmony_ci #define CMDQ_CREATE_AH_TYPE_V2IPV4 0x2UL 17908c2ecf20Sopenharmony_ci #define CMDQ_CREATE_AH_TYPE_V2IPV6 0x3UL 17918c2ecf20Sopenharmony_ci u8 hop_limit; 17928c2ecf20Sopenharmony_ci __le16 sgid_index; 17938c2ecf20Sopenharmony_ci __le32 dest_vlan_id_flow_label; 17948c2ecf20Sopenharmony_ci #define CMDQ_CREATE_AH_FLOW_LABEL_MASK 0xfffffUL 17958c2ecf20Sopenharmony_ci #define CMDQ_CREATE_AH_FLOW_LABEL_SFT 0 17968c2ecf20Sopenharmony_ci #define CMDQ_CREATE_AH_DEST_VLAN_ID_MASK 0xfff00000UL 17978c2ecf20Sopenharmony_ci #define CMDQ_CREATE_AH_DEST_VLAN_ID_SFT 20 17988c2ecf20Sopenharmony_ci __le32 pd_id; 17998c2ecf20Sopenharmony_ci __le32 unused_0; 18008c2ecf20Sopenharmony_ci __le16 dest_mac[3]; 18018c2ecf20Sopenharmony_ci u8 traffic_class; 18028c2ecf20Sopenharmony_ci u8 unused_1; 18038c2ecf20Sopenharmony_ci}; 18048c2ecf20Sopenharmony_ci 18058c2ecf20Sopenharmony_ci/* Destroy AH command (24 bytes) */ 18068c2ecf20Sopenharmony_cistruct cmdq_destroy_ah { 18078c2ecf20Sopenharmony_ci u8 opcode; 18088c2ecf20Sopenharmony_ci #define CMDQ_DESTROY_AH_OPCODE_DESTROY_AH 0x16UL 18098c2ecf20Sopenharmony_ci u8 cmd_size; 18108c2ecf20Sopenharmony_ci __le16 flags; 18118c2ecf20Sopenharmony_ci __le16 cookie; 18128c2ecf20Sopenharmony_ci u8 resp_size; 18138c2ecf20Sopenharmony_ci u8 reserved8; 18148c2ecf20Sopenharmony_ci __le64 resp_addr; 18158c2ecf20Sopenharmony_ci __le32 ah_cid; 18168c2ecf20Sopenharmony_ci __le32 unused_0; 18178c2ecf20Sopenharmony_ci}; 18188c2ecf20Sopenharmony_ci 18198c2ecf20Sopenharmony_ci/* Initialize Firmware command (112 bytes) */ 18208c2ecf20Sopenharmony_cistruct cmdq_initialize_fw { 18218c2ecf20Sopenharmony_ci u8 opcode; 18228c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_OPCODE_INITIALIZE_FW 0x80UL 18238c2ecf20Sopenharmony_ci u8 cmd_size; 18248c2ecf20Sopenharmony_ci __le16 flags; 18258c2ecf20Sopenharmony_ci __le16 cookie; 18268c2ecf20Sopenharmony_ci u8 resp_size; 18278c2ecf20Sopenharmony_ci u8 reserved8; 18288c2ecf20Sopenharmony_ci __le64 resp_addr; 18298c2ecf20Sopenharmony_ci u8 qpc_pg_size_qpc_lvl; 18308c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_LVL_MASK 0xfUL 18318c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_LVL_SFT 0 18328c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_LVL_LVL_0 0x0UL 18338c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_LVL_LVL_1 0x1UL 18348c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_LVL_LVL_2 0x2UL 18358c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_MASK 0xf0UL 18368c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_SFT 4 18378c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_4K (0x0UL << 4) 18388c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_8K (0x1UL << 4) 18398c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_64K (0x2UL << 4) 18408c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_2M (0x3UL << 4) 18418c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_8M (0x4UL << 4) 18428c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_QPC_PG_SIZE_PG_1G (0x5UL << 4) 18438c2ecf20Sopenharmony_ci u8 mrw_pg_size_mrw_lvl; 18448c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_LVL_MASK 0xfUL 18458c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_LVL_SFT 0 18468c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_LVL_LVL_0 0x0UL 18478c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_LVL_LVL_1 0x1UL 18488c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_LVL_LVL_2 0x2UL 18498c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_MASK 0xf0UL 18508c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_SFT 4 18518c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_4K (0x0UL << 4) 18528c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_8K (0x1UL << 4) 18538c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_64K (0x2UL << 4) 18548c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_2M (0x3UL << 4) 18558c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_8M (0x4UL << 4) 18568c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_MRW_PG_SIZE_PG_1G (0x5UL << 4) 18578c2ecf20Sopenharmony_ci u8 srq_pg_size_srq_lvl; 18588c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_LVL_MASK 0xfUL 18598c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_LVL_SFT 0 18608c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_0 0x0UL 18618c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_1 0x1UL 18628c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_LVL_LVL_2 0x2UL 18638c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_MASK 0xf0UL 18648c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_SFT 4 18658c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_4K (0x0UL << 4) 18668c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_8K (0x1UL << 4) 18678c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_64K (0x2UL << 4) 18688c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_2M (0x3UL << 4) 18698c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_8M (0x4UL << 4) 18708c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_SRQ_PG_SIZE_PG_1G (0x5UL << 4) 18718c2ecf20Sopenharmony_ci u8 cq_pg_size_cq_lvl; 18728c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_LVL_MASK 0xfUL 18738c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_LVL_SFT 0 18748c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_LVL_LVL_0 0x0UL 18758c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_LVL_LVL_1 0x1UL 18768c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_LVL_LVL_2 0x2UL 18778c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_MASK 0xf0UL 18788c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_SFT 4 18798c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_4K (0x0UL << 4) 18808c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_8K (0x1UL << 4) 18818c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_64K (0x2UL << 4) 18828c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_2M (0x3UL << 4) 18838c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_8M (0x4UL << 4) 18848c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_CQ_PG_SIZE_PG_1G (0x5UL << 4) 18858c2ecf20Sopenharmony_ci u8 tqm_pg_size_tqm_lvl; 18868c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_LVL_MASK 0xfUL 18878c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_LVL_SFT 0 18888c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_LVL_LVL_0 0x0UL 18898c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_LVL_LVL_1 0x1UL 18908c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_LVL_LVL_2 0x2UL 18918c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_MASK 0xf0UL 18928c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_SFT 4 18938c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_4K (0x0UL << 4) 18948c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_8K (0x1UL << 4) 18958c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_64K (0x2UL << 4) 18968c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_2M (0x3UL << 4) 18978c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_8M (0x4UL << 4) 18988c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TQM_PG_SIZE_PG_1G (0x5UL << 4) 18998c2ecf20Sopenharmony_ci u8 tim_pg_size_tim_lvl; 19008c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_LVL_MASK 0xfUL 19018c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_LVL_SFT 0 19028c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_LVL_LVL_0 0x0UL 19038c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_LVL_LVL_1 0x1UL 19048c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_LVL_LVL_2 0x2UL 19058c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_MASK 0xf0UL 19068c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_SFT 4 19078c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_4K (0x0UL << 4) 19088c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_8K (0x1UL << 4) 19098c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_64K (0x2UL << 4) 19108c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_2M (0x3UL << 4) 19118c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_8M (0x4UL << 4) 19128c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_TIM_PG_SIZE_PG_1G (0x5UL << 4) 19138c2ecf20Sopenharmony_ci /* This value is (log-base-2-of-DBR-page-size - 12). 19148c2ecf20Sopenharmony_ci * 0 for 4KB. HW supported values are enumerated below. 19158c2ecf20Sopenharmony_ci */ 19168c2ecf20Sopenharmony_ci __le16 log2_dbr_pg_size; 19178c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_MASK 0xfUL 19188c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_SFT 0 19198c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_4K 0x0UL 19208c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_8K 0x1UL 19218c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_16K 0x2UL 19228c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_32K 0x3UL 19238c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_64K 0x4UL 19248c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_128K 0x5UL 19258c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_256K 0x6UL 19268c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_512K 0x7UL 19278c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_1M 0x8UL 19288c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_2M 0x9UL 19298c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_4M 0xaUL 19308c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_8M 0xbUL 19318c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_16M 0xcUL 19328c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_32M 0xdUL 19338c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_64M 0xeUL 19348c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_128M 0xfUL 19358c2ecf20Sopenharmony_ci #define CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_LAST \ 19368c2ecf20Sopenharmony_ci CMDQ_INITIALIZE_FW_LOG2_DBR_PG_SIZE_PG_128M 19378c2ecf20Sopenharmony_ci __le64 qpc_page_dir; 19388c2ecf20Sopenharmony_ci __le64 mrw_page_dir; 19398c2ecf20Sopenharmony_ci __le64 srq_page_dir; 19408c2ecf20Sopenharmony_ci __le64 cq_page_dir; 19418c2ecf20Sopenharmony_ci __le64 tqm_page_dir; 19428c2ecf20Sopenharmony_ci __le64 tim_page_dir; 19438c2ecf20Sopenharmony_ci __le32 number_of_qp; 19448c2ecf20Sopenharmony_ci __le32 number_of_mrw; 19458c2ecf20Sopenharmony_ci __le32 number_of_srq; 19468c2ecf20Sopenharmony_ci __le32 number_of_cq; 19478c2ecf20Sopenharmony_ci __le32 max_qp_per_vf; 19488c2ecf20Sopenharmony_ci __le32 max_mrw_per_vf; 19498c2ecf20Sopenharmony_ci __le32 max_srq_per_vf; 19508c2ecf20Sopenharmony_ci __le32 max_cq_per_vf; 19518c2ecf20Sopenharmony_ci __le32 max_gid_per_vf; 19528c2ecf20Sopenharmony_ci __le32 stat_ctx_id; 19538c2ecf20Sopenharmony_ci}; 19548c2ecf20Sopenharmony_ci 19558c2ecf20Sopenharmony_ci/* De-initialize Firmware command (16 bytes) */ 19568c2ecf20Sopenharmony_cistruct cmdq_deinitialize_fw { 19578c2ecf20Sopenharmony_ci u8 opcode; 19588c2ecf20Sopenharmony_ci #define CMDQ_DEINITIALIZE_FW_OPCODE_DEINITIALIZE_FW 0x81UL 19598c2ecf20Sopenharmony_ci u8 cmd_size; 19608c2ecf20Sopenharmony_ci __le16 flags; 19618c2ecf20Sopenharmony_ci __le16 cookie; 19628c2ecf20Sopenharmony_ci u8 resp_size; 19638c2ecf20Sopenharmony_ci u8 reserved8; 19648c2ecf20Sopenharmony_ci __le64 resp_addr; 19658c2ecf20Sopenharmony_ci}; 19668c2ecf20Sopenharmony_ci 19678c2ecf20Sopenharmony_ci/* Stop function command (16 bytes) */ 19688c2ecf20Sopenharmony_cistruct cmdq_stop_func { 19698c2ecf20Sopenharmony_ci u8 opcode; 19708c2ecf20Sopenharmony_ci #define CMDQ_STOP_FUNC_OPCODE_STOP_FUNC 0x82UL 19718c2ecf20Sopenharmony_ci u8 cmd_size; 19728c2ecf20Sopenharmony_ci __le16 flags; 19738c2ecf20Sopenharmony_ci __le16 cookie; 19748c2ecf20Sopenharmony_ci u8 resp_size; 19758c2ecf20Sopenharmony_ci u8 reserved8; 19768c2ecf20Sopenharmony_ci __le64 resp_addr; 19778c2ecf20Sopenharmony_ci}; 19788c2ecf20Sopenharmony_ci 19798c2ecf20Sopenharmony_ci/* Query function command (16 bytes) */ 19808c2ecf20Sopenharmony_cistruct cmdq_query_func { 19818c2ecf20Sopenharmony_ci u8 opcode; 19828c2ecf20Sopenharmony_ci #define CMDQ_QUERY_FUNC_OPCODE_QUERY_FUNC 0x83UL 19838c2ecf20Sopenharmony_ci u8 cmd_size; 19848c2ecf20Sopenharmony_ci __le16 flags; 19858c2ecf20Sopenharmony_ci __le16 cookie; 19868c2ecf20Sopenharmony_ci u8 resp_size; 19878c2ecf20Sopenharmony_ci u8 reserved8; 19888c2ecf20Sopenharmony_ci __le64 resp_addr; 19898c2ecf20Sopenharmony_ci}; 19908c2ecf20Sopenharmony_ci 19918c2ecf20Sopenharmony_ci/* Set function resources command (16 bytes) */ 19928c2ecf20Sopenharmony_cistruct cmdq_set_func_resources { 19938c2ecf20Sopenharmony_ci u8 opcode; 19948c2ecf20Sopenharmony_ci #define CMDQ_SET_FUNC_RESOURCES_OPCODE_SET_FUNC_RESOURCES 0x84UL 19958c2ecf20Sopenharmony_ci u8 cmd_size; 19968c2ecf20Sopenharmony_ci __le16 flags; 19978c2ecf20Sopenharmony_ci __le16 cookie; 19988c2ecf20Sopenharmony_ci u8 resp_size; 19998c2ecf20Sopenharmony_ci u8 reserved8; 20008c2ecf20Sopenharmony_ci __le64 resp_addr; 20018c2ecf20Sopenharmony_ci __le32 number_of_qp; 20028c2ecf20Sopenharmony_ci __le32 number_of_mrw; 20038c2ecf20Sopenharmony_ci __le32 number_of_srq; 20048c2ecf20Sopenharmony_ci __le32 number_of_cq; 20058c2ecf20Sopenharmony_ci __le32 max_qp_per_vf; 20068c2ecf20Sopenharmony_ci __le32 max_mrw_per_vf; 20078c2ecf20Sopenharmony_ci __le32 max_srq_per_vf; 20088c2ecf20Sopenharmony_ci __le32 max_cq_per_vf; 20098c2ecf20Sopenharmony_ci __le32 max_gid_per_vf; 20108c2ecf20Sopenharmony_ci __le32 stat_ctx_id; 20118c2ecf20Sopenharmony_ci}; 20128c2ecf20Sopenharmony_ci 20138c2ecf20Sopenharmony_ci/* Read hardware resource context command (24 bytes) */ 20148c2ecf20Sopenharmony_cistruct cmdq_read_context { 20158c2ecf20Sopenharmony_ci u8 opcode; 20168c2ecf20Sopenharmony_ci #define CMDQ_READ_CONTEXT_OPCODE_READ_CONTEXT 0x85UL 20178c2ecf20Sopenharmony_ci u8 cmd_size; 20188c2ecf20Sopenharmony_ci __le16 flags; 20198c2ecf20Sopenharmony_ci __le16 cookie; 20208c2ecf20Sopenharmony_ci u8 resp_size; 20218c2ecf20Sopenharmony_ci u8 reserved8; 20228c2ecf20Sopenharmony_ci __le64 resp_addr; 20238c2ecf20Sopenharmony_ci __le32 type_xid; 20248c2ecf20Sopenharmony_ci #define CMDQ_READ_CONTEXT_XID_MASK 0xffffffUL 20258c2ecf20Sopenharmony_ci #define CMDQ_READ_CONTEXT_XID_SFT 0 20268c2ecf20Sopenharmony_ci #define CMDQ_READ_CONTEXT_TYPE_MASK 0xff000000UL 20278c2ecf20Sopenharmony_ci #define CMDQ_READ_CONTEXT_TYPE_SFT 24 20288c2ecf20Sopenharmony_ci #define CMDQ_READ_CONTEXT_TYPE_QPC (0x0UL << 24) 20298c2ecf20Sopenharmony_ci #define CMDQ_READ_CONTEXT_TYPE_CQ (0x1UL << 24) 20308c2ecf20Sopenharmony_ci #define CMDQ_READ_CONTEXT_TYPE_MRW (0x2UL << 24) 20318c2ecf20Sopenharmony_ci #define CMDQ_READ_CONTEXT_TYPE_SRQ (0x3UL << 24) 20328c2ecf20Sopenharmony_ci __le32 unused_0; 20338c2ecf20Sopenharmony_ci}; 20348c2ecf20Sopenharmony_ci 20358c2ecf20Sopenharmony_ci/* Map TC to COS. Can only be issued from a PF (24 bytes) */ 20368c2ecf20Sopenharmony_cistruct cmdq_map_tc_to_cos { 20378c2ecf20Sopenharmony_ci u8 opcode; 20388c2ecf20Sopenharmony_ci #define CMDQ_MAP_TC_TO_COS_OPCODE_MAP_TC_TO_COS 0x8aUL 20398c2ecf20Sopenharmony_ci u8 cmd_size; 20408c2ecf20Sopenharmony_ci __le16 flags; 20418c2ecf20Sopenharmony_ci __le16 cookie; 20428c2ecf20Sopenharmony_ci u8 resp_size; 20438c2ecf20Sopenharmony_ci u8 reserved8; 20448c2ecf20Sopenharmony_ci __le64 resp_addr; 20458c2ecf20Sopenharmony_ci __le16 cos0; 20468c2ecf20Sopenharmony_ci #define CMDQ_MAP_TC_TO_COS_COS0_NO_CHANGE 0xffffUL 20478c2ecf20Sopenharmony_ci __le16 cos1; 20488c2ecf20Sopenharmony_ci #define CMDQ_MAP_TC_TO_COS_COS1_DISABLE 0x8000UL 20498c2ecf20Sopenharmony_ci #define CMDQ_MAP_TC_TO_COS_COS1_NO_CHANGE 0xffffUL 20508c2ecf20Sopenharmony_ci __le32 unused_0; 20518c2ecf20Sopenharmony_ci}; 20528c2ecf20Sopenharmony_ci 20538c2ecf20Sopenharmony_ci/* Query version command (16 bytes) */ 20548c2ecf20Sopenharmony_cistruct cmdq_query_version { 20558c2ecf20Sopenharmony_ci u8 opcode; 20568c2ecf20Sopenharmony_ci #define CMDQ_QUERY_VERSION_OPCODE_QUERY_VERSION 0x8bUL 20578c2ecf20Sopenharmony_ci u8 cmd_size; 20588c2ecf20Sopenharmony_ci __le16 flags; 20598c2ecf20Sopenharmony_ci __le16 cookie; 20608c2ecf20Sopenharmony_ci u8 resp_size; 20618c2ecf20Sopenharmony_ci u8 reserved8; 20628c2ecf20Sopenharmony_ci __le64 resp_addr; 20638c2ecf20Sopenharmony_ci}; 20648c2ecf20Sopenharmony_ci 20658c2ecf20Sopenharmony_ci/* Command-Response Event Queue (CREQ) Structures */ 20668c2ecf20Sopenharmony_ci/* Base CREQ Record (16 bytes) */ 20678c2ecf20Sopenharmony_cistruct creq_base { 20688c2ecf20Sopenharmony_ci u8 type; 20698c2ecf20Sopenharmony_ci #define CREQ_BASE_TYPE_MASK 0x3fUL 20708c2ecf20Sopenharmony_ci #define CREQ_BASE_TYPE_SFT 0 20718c2ecf20Sopenharmony_ci #define CREQ_BASE_TYPE_QP_EVENT 0x38UL 20728c2ecf20Sopenharmony_ci #define CREQ_BASE_TYPE_FUNC_EVENT 0x3aUL 20738c2ecf20Sopenharmony_ci #define CREQ_BASE_RESERVED2_MASK 0xc0UL 20748c2ecf20Sopenharmony_ci #define CREQ_BASE_RESERVED2_SFT 6 20758c2ecf20Sopenharmony_ci u8 reserved56[7]; 20768c2ecf20Sopenharmony_ci u8 v; 20778c2ecf20Sopenharmony_ci #define CREQ_BASE_V 0x1UL 20788c2ecf20Sopenharmony_ci #define CREQ_BASE_RESERVED7_MASK 0xfeUL 20798c2ecf20Sopenharmony_ci #define CREQ_BASE_RESERVED7_SFT 1 20808c2ecf20Sopenharmony_ci u8 event; 20818c2ecf20Sopenharmony_ci __le16 reserved48[3]; 20828c2ecf20Sopenharmony_ci}; 20838c2ecf20Sopenharmony_ci 20848c2ecf20Sopenharmony_ci/* RoCE Function Async Event Notification (16 bytes) */ 20858c2ecf20Sopenharmony_cistruct creq_func_event { 20868c2ecf20Sopenharmony_ci u8 type; 20878c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_TYPE_MASK 0x3fUL 20888c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_TYPE_SFT 0 20898c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_TYPE_FUNC_EVENT 0x3aUL 20908c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_RESERVED2_MASK 0xc0UL 20918c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_RESERVED2_SFT 6 20928c2ecf20Sopenharmony_ci u8 reserved56[7]; 20938c2ecf20Sopenharmony_ci u8 v; 20948c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_V 0x1UL 20958c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_RESERVED7_MASK 0xfeUL 20968c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_RESERVED7_SFT 1 20978c2ecf20Sopenharmony_ci u8 event; 20988c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_TX_WQE_ERROR 0x1UL 20998c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_TX_DATA_ERROR 0x2UL 21008c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_RX_WQE_ERROR 0x3UL 21018c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_RX_DATA_ERROR 0x4UL 21028c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_CQ_ERROR 0x5UL 21038c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_TQM_ERROR 0x6UL 21048c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_CFCQ_ERROR 0x7UL 21058c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_CFCS_ERROR 0x8UL 21068c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_CFCC_ERROR 0x9UL 21078c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_CFCM_ERROR 0xaUL 21088c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_TIM_ERROR 0xbUL 21098c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_VF_COMM_REQUEST 0x80UL 21108c2ecf20Sopenharmony_ci #define CREQ_FUNC_EVENT_EVENT_RESOURCE_EXHAUSTED 0x81UL 21118c2ecf20Sopenharmony_ci __le16 reserved48[3]; 21128c2ecf20Sopenharmony_ci}; 21138c2ecf20Sopenharmony_ci 21148c2ecf20Sopenharmony_ci/* RoCE Slowpath Command Completion (16 bytes) */ 21158c2ecf20Sopenharmony_cistruct creq_qp_event { 21168c2ecf20Sopenharmony_ci u8 type; 21178c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_TYPE_MASK 0x3fUL 21188c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_TYPE_SFT 0 21198c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_TYPE_QP_EVENT 0x38UL 21208c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_RESERVED2_MASK 0xc0UL 21218c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_RESERVED2_SFT 6 21228c2ecf20Sopenharmony_ci u8 status; 21238c2ecf20Sopenharmony_ci __le16 cookie; 21248c2ecf20Sopenharmony_ci __le32 reserved32; 21258c2ecf20Sopenharmony_ci u8 v; 21268c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_V 0x1UL 21278c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_RESERVED7_MASK 0xfeUL 21288c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_RESERVED7_SFT 1 21298c2ecf20Sopenharmony_ci u8 event; 21308c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_CREATE_QP 0x1UL 21318c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_DESTROY_QP 0x2UL 21328c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_MODIFY_QP 0x3UL 21338c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_QUERY_QP 0x4UL 21348c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_CREATE_SRQ 0x5UL 21358c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_DESTROY_SRQ 0x6UL 21368c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_QUERY_SRQ 0x8UL 21378c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_CREATE_CQ 0x9UL 21388c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_DESTROY_CQ 0xaUL 21398c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_RESIZE_CQ 0xcUL 21408c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_ALLOCATE_MRW 0xdUL 21418c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_DEALLOCATE_KEY 0xeUL 21428c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_REGISTER_MR 0xfUL 21438c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_DEREGISTER_MR 0x10UL 21448c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_ADD_GID 0x11UL 21458c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_DELETE_GID 0x12UL 21468c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_MODIFY_GID 0x17UL 21478c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_QUERY_GID 0x18UL 21488c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_CREATE_QP1 0x13UL 21498c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_DESTROY_QP1 0x14UL 21508c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_CREATE_AH 0x15UL 21518c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_DESTROY_AH 0x16UL 21528c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_INITIALIZE_FW 0x80UL 21538c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_DEINITIALIZE_FW 0x81UL 21548c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_STOP_FUNC 0x82UL 21558c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_QUERY_FUNC 0x83UL 21568c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_SET_FUNC_RESOURCES 0x84UL 21578c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_MAP_TC_TO_COS 0x8aUL 21588c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_QUERY_VERSION 0x8bUL 21598c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_MODIFY_CC 0x8cUL 21608c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_QUERY_CC 0x8dUL 21618c2ecf20Sopenharmony_ci #define CREQ_QP_EVENT_EVENT_QP_ERROR_NOTIFICATION 0xc0UL 21628c2ecf20Sopenharmony_ci __le16 reserved48[3]; 21638c2ecf20Sopenharmony_ci}; 21648c2ecf20Sopenharmony_ci 21658c2ecf20Sopenharmony_ci/* Create QP command response (16 bytes) */ 21668c2ecf20Sopenharmony_cistruct creq_create_qp_resp { 21678c2ecf20Sopenharmony_ci u8 type; 21688c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP_RESP_TYPE_MASK 0x3fUL 21698c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP_RESP_TYPE_SFT 0 21708c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP_RESP_TYPE_QP_EVENT 0x38UL 21718c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP_RESP_RESERVED2_MASK 0xc0UL 21728c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP_RESP_RESERVED2_SFT 6 21738c2ecf20Sopenharmony_ci u8 status; 21748c2ecf20Sopenharmony_ci __le16 cookie; 21758c2ecf20Sopenharmony_ci __le32 xid; 21768c2ecf20Sopenharmony_ci u8 v; 21778c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP_RESP_V 0x1UL 21788c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP_RESP_RESERVED7_MASK 0xfeUL 21798c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP_RESP_RESERVED7_SFT 1 21808c2ecf20Sopenharmony_ci u8 event; 21818c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP_RESP_EVENT_CREATE_QP 0x1UL 21828c2ecf20Sopenharmony_ci __le16 reserved48[3]; 21838c2ecf20Sopenharmony_ci}; 21848c2ecf20Sopenharmony_ci 21858c2ecf20Sopenharmony_ci/* Destroy QP command response (16 bytes) */ 21868c2ecf20Sopenharmony_cistruct creq_destroy_qp_resp { 21878c2ecf20Sopenharmony_ci u8 type; 21888c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP_RESP_TYPE_MASK 0x3fUL 21898c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP_RESP_TYPE_SFT 0 21908c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP_RESP_TYPE_QP_EVENT 0x38UL 21918c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP_RESP_RESERVED2_MASK 0xc0UL 21928c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP_RESP_RESERVED2_SFT 6 21938c2ecf20Sopenharmony_ci u8 status; 21948c2ecf20Sopenharmony_ci __le16 cookie; 21958c2ecf20Sopenharmony_ci __le32 xid; 21968c2ecf20Sopenharmony_ci u8 v; 21978c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP_RESP_V 0x1UL 21988c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP_RESP_RESERVED7_MASK 0xfeUL 21998c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP_RESP_RESERVED7_SFT 1 22008c2ecf20Sopenharmony_ci u8 event; 22018c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP_RESP_EVENT_DESTROY_QP 0x2UL 22028c2ecf20Sopenharmony_ci __le16 reserved48[3]; 22038c2ecf20Sopenharmony_ci}; 22048c2ecf20Sopenharmony_ci 22058c2ecf20Sopenharmony_ci/* Modify QP command response (16 bytes) */ 22068c2ecf20Sopenharmony_cistruct creq_modify_qp_resp { 22078c2ecf20Sopenharmony_ci u8 type; 22088c2ecf20Sopenharmony_ci #define CREQ_MODIFY_QP_RESP_TYPE_MASK 0x3fUL 22098c2ecf20Sopenharmony_ci #define CREQ_MODIFY_QP_RESP_TYPE_SFT 0 22108c2ecf20Sopenharmony_ci #define CREQ_MODIFY_QP_RESP_TYPE_QP_EVENT 0x38UL 22118c2ecf20Sopenharmony_ci #define CREQ_MODIFY_QP_RESP_RESERVED2_MASK 0xc0UL 22128c2ecf20Sopenharmony_ci #define CREQ_MODIFY_QP_RESP_RESERVED2_SFT 6 22138c2ecf20Sopenharmony_ci u8 status; 22148c2ecf20Sopenharmony_ci __le16 cookie; 22158c2ecf20Sopenharmony_ci __le32 xid; 22168c2ecf20Sopenharmony_ci u8 v; 22178c2ecf20Sopenharmony_ci #define CREQ_MODIFY_QP_RESP_V 0x1UL 22188c2ecf20Sopenharmony_ci #define CREQ_MODIFY_QP_RESP_RESERVED7_MASK 0xfeUL 22198c2ecf20Sopenharmony_ci #define CREQ_MODIFY_QP_RESP_RESERVED7_SFT 1 22208c2ecf20Sopenharmony_ci u8 event; 22218c2ecf20Sopenharmony_ci #define CREQ_MODIFY_QP_RESP_EVENT_MODIFY_QP 0x3UL 22228c2ecf20Sopenharmony_ci __le16 reserved48[3]; 22238c2ecf20Sopenharmony_ci}; 22248c2ecf20Sopenharmony_ci 22258c2ecf20Sopenharmony_ci/* cmdq_query_roce_stats (size:128b/16B) */ 22268c2ecf20Sopenharmony_cistruct cmdq_query_roce_stats { 22278c2ecf20Sopenharmony_ci u8 opcode; 22288c2ecf20Sopenharmony_ci #define CMDQ_QUERY_ROCE_STATS_OPCODE_QUERY_ROCE_STATS 0x8eUL 22298c2ecf20Sopenharmony_ci #define CMDQ_QUERY_ROCE_STATS_OPCODE_LAST \ 22308c2ecf20Sopenharmony_ci CMDQ_QUERY_ROCE_STATS_OPCODE_QUERY_ROCE_STATS 22318c2ecf20Sopenharmony_ci u8 cmd_size; 22328c2ecf20Sopenharmony_ci __le16 flags; 22338c2ecf20Sopenharmony_ci __le16 cookie; 22348c2ecf20Sopenharmony_ci u8 resp_size; 22358c2ecf20Sopenharmony_ci u8 reserved8; 22368c2ecf20Sopenharmony_ci __le64 resp_addr; 22378c2ecf20Sopenharmony_ci}; 22388c2ecf20Sopenharmony_ci 22398c2ecf20Sopenharmony_ci/* Query QP command response (16 bytes) */ 22408c2ecf20Sopenharmony_cistruct creq_query_qp_resp { 22418c2ecf20Sopenharmony_ci u8 type; 22428c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_TYPE_MASK 0x3fUL 22438c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_TYPE_SFT 0 22448c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_TYPE_QP_EVENT 0x38UL 22458c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_RESERVED2_MASK 0xc0UL 22468c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_RESERVED2_SFT 6 22478c2ecf20Sopenharmony_ci u8 status; 22488c2ecf20Sopenharmony_ci __le16 cookie; 22498c2ecf20Sopenharmony_ci __le32 size; 22508c2ecf20Sopenharmony_ci u8 v; 22518c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_V 0x1UL 22528c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_RESERVED7_MASK 0xfeUL 22538c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_RESERVED7_SFT 1 22548c2ecf20Sopenharmony_ci u8 event; 22558c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_EVENT_QUERY_QP 0x4UL 22568c2ecf20Sopenharmony_ci __le16 reserved48[3]; 22578c2ecf20Sopenharmony_ci}; 22588c2ecf20Sopenharmony_ci 22598c2ecf20Sopenharmony_ci/* Query QP command response side buffer structure (104 bytes) */ 22608c2ecf20Sopenharmony_cistruct creq_query_qp_resp_sb { 22618c2ecf20Sopenharmony_ci u8 opcode; 22628c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_OPCODE_QUERY_QP 0x4UL 22638c2ecf20Sopenharmony_ci u8 status; 22648c2ecf20Sopenharmony_ci __le16 cookie; 22658c2ecf20Sopenharmony_ci __le16 flags; 22668c2ecf20Sopenharmony_ci u8 resp_size; 22678c2ecf20Sopenharmony_ci u8 reserved8; 22688c2ecf20Sopenharmony_ci __le32 xid; 22698c2ecf20Sopenharmony_ci u8 en_sqd_async_notify_state; 22708c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_STATE_MASK 0xfUL 22718c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_STATE_SFT 0 22728c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_STATE_RESET 0x0UL 22738c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_STATE_INIT 0x1UL 22748c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_STATE_RTR 0x2UL 22758c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_STATE_RTS 0x3UL 22768c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_STATE_SQD 0x4UL 22778c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_STATE_SQE 0x5UL 22788c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_STATE_ERR 0x6UL 22798c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_EN_SQD_ASYNC_NOTIFY 0x10UL 22808c2ecf20Sopenharmony_ci u8 access; 22818c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_ACCESS_LOCAL_WRITE 0x1UL 22828c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_WRITE 0x2UL 22838c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_READ 0x4UL 22848c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_ACCESS_REMOTE_ATOMIC 0x8UL 22858c2ecf20Sopenharmony_ci __le16 pkey; 22868c2ecf20Sopenharmony_ci __le32 qkey; 22878c2ecf20Sopenharmony_ci __le32 reserved32; 22888c2ecf20Sopenharmony_ci __le32 dgid[4]; 22898c2ecf20Sopenharmony_ci __le32 flow_label; 22908c2ecf20Sopenharmony_ci __le16 sgid_index; 22918c2ecf20Sopenharmony_ci u8 hop_limit; 22928c2ecf20Sopenharmony_ci u8 traffic_class; 22938c2ecf20Sopenharmony_ci __le16 dest_mac[3]; 22948c2ecf20Sopenharmony_ci __le16 path_mtu_dest_vlan_id; 22958c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_DEST_VLAN_ID_MASK 0xfffUL 22968c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_DEST_VLAN_ID_SFT 0 22978c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MASK 0xf000UL 22988c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_PATH_MTU_SFT 12 22998c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_256 (0x0UL << 12) 23008c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_512 (0x1UL << 12) 23018c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_1024 (0x2UL << 12) 23028c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_2048 (0x3UL << 12) 23038c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_4096 (0x4UL << 12) 23048c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_PATH_MTU_MTU_8192 (0x5UL << 12) 23058c2ecf20Sopenharmony_ci u8 timeout; 23068c2ecf20Sopenharmony_ci u8 retry_cnt; 23078c2ecf20Sopenharmony_ci u8 rnr_retry; 23088c2ecf20Sopenharmony_ci u8 min_rnr_timer; 23098c2ecf20Sopenharmony_ci __le32 rq_psn; 23108c2ecf20Sopenharmony_ci __le32 sq_psn; 23118c2ecf20Sopenharmony_ci u8 max_rd_atomic; 23128c2ecf20Sopenharmony_ci u8 max_dest_rd_atomic; 23138c2ecf20Sopenharmony_ci u8 tos_dscp_tos_ecn; 23148c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_TOS_ECN_MASK 0x3UL 23158c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_TOS_ECN_SFT 0 23168c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_TOS_DSCP_MASK 0xfcUL 23178c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_TOS_DSCP_SFT 2 23188c2ecf20Sopenharmony_ci u8 enable_cc; 23198c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_ENABLE_CC 0x1UL 23208c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_RESERVED7_MASK 0xfeUL 23218c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_RESERVED7_SFT 1 23228c2ecf20Sopenharmony_ci __le32 sq_size; 23238c2ecf20Sopenharmony_ci __le32 rq_size; 23248c2ecf20Sopenharmony_ci __le16 sq_sge; 23258c2ecf20Sopenharmony_ci __le16 rq_sge; 23268c2ecf20Sopenharmony_ci __le32 max_inline_data; 23278c2ecf20Sopenharmony_ci __le32 dest_qp_id; 23288c2ecf20Sopenharmony_ci __le32 unused_1; 23298c2ecf20Sopenharmony_ci __le16 src_mac[3]; 23308c2ecf20Sopenharmony_ci __le16 vlan_pcp_vlan_dei_vlan_id; 23318c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_VLAN_ID_MASK 0xfffUL 23328c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_VLAN_ID_SFT 0 23338c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_VLAN_DEI 0x1000UL 23348c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_VLAN_PCP_MASK 0xe000UL 23358c2ecf20Sopenharmony_ci #define CREQ_QUERY_QP_RESP_SB_VLAN_PCP_SFT 13 23368c2ecf20Sopenharmony_ci}; 23378c2ecf20Sopenharmony_ci 23388c2ecf20Sopenharmony_ci/* Create SRQ command response (16 bytes) */ 23398c2ecf20Sopenharmony_cistruct creq_create_srq_resp { 23408c2ecf20Sopenharmony_ci u8 type; 23418c2ecf20Sopenharmony_ci #define CREQ_CREATE_SRQ_RESP_TYPE_MASK 0x3fUL 23428c2ecf20Sopenharmony_ci #define CREQ_CREATE_SRQ_RESP_TYPE_SFT 0 23438c2ecf20Sopenharmony_ci #define CREQ_CREATE_SRQ_RESP_TYPE_QP_EVENT 0x38UL 23448c2ecf20Sopenharmony_ci #define CREQ_CREATE_SRQ_RESP_RESERVED2_MASK 0xc0UL 23458c2ecf20Sopenharmony_ci #define CREQ_CREATE_SRQ_RESP_RESERVED2_SFT 6 23468c2ecf20Sopenharmony_ci u8 status; 23478c2ecf20Sopenharmony_ci __le16 cookie; 23488c2ecf20Sopenharmony_ci __le32 xid; 23498c2ecf20Sopenharmony_ci u8 v; 23508c2ecf20Sopenharmony_ci #define CREQ_CREATE_SRQ_RESP_V 0x1UL 23518c2ecf20Sopenharmony_ci #define CREQ_CREATE_SRQ_RESP_RESERVED7_MASK 0xfeUL 23528c2ecf20Sopenharmony_ci #define CREQ_CREATE_SRQ_RESP_RESERVED7_SFT 1 23538c2ecf20Sopenharmony_ci u8 event; 23548c2ecf20Sopenharmony_ci #define CREQ_CREATE_SRQ_RESP_EVENT_CREATE_SRQ 0x5UL 23558c2ecf20Sopenharmony_ci __le16 reserved48[3]; 23568c2ecf20Sopenharmony_ci}; 23578c2ecf20Sopenharmony_ci 23588c2ecf20Sopenharmony_ci/* Destroy SRQ command response (16 bytes) */ 23598c2ecf20Sopenharmony_cistruct creq_destroy_srq_resp { 23608c2ecf20Sopenharmony_ci u8 type; 23618c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_TYPE_MASK 0x3fUL 23628c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_TYPE_SFT 0 23638c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_TYPE_QP_EVENT 0x38UL 23648c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_RESERVED2_MASK 0xc0UL 23658c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_RESERVED2_SFT 6 23668c2ecf20Sopenharmony_ci u8 status; 23678c2ecf20Sopenharmony_ci __le16 cookie; 23688c2ecf20Sopenharmony_ci __le32 xid; 23698c2ecf20Sopenharmony_ci u8 v; 23708c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_V 0x1UL 23718c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_RESERVED7_MASK 0xfeUL 23728c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_RESERVED7_SFT 1 23738c2ecf20Sopenharmony_ci u8 event; 23748c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_EVENT_DESTROY_SRQ 0x6UL 23758c2ecf20Sopenharmony_ci __le16 enable_for_arm[3]; 23768c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_ENABLE_FOR_ARM_MASK 0x30000UL 23778c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_ENABLE_FOR_ARM_SFT 16 23788c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_RESERVED46_MASK 0xfffc0000UL 23798c2ecf20Sopenharmony_ci #define CREQ_DESTROY_SRQ_RESP_RESERVED46_SFT 18 23808c2ecf20Sopenharmony_ci}; 23818c2ecf20Sopenharmony_ci 23828c2ecf20Sopenharmony_ci/* Query SRQ command response (16 bytes) */ 23838c2ecf20Sopenharmony_cistruct creq_query_srq_resp { 23848c2ecf20Sopenharmony_ci u8 type; 23858c2ecf20Sopenharmony_ci #define CREQ_QUERY_SRQ_RESP_TYPE_MASK 0x3fUL 23868c2ecf20Sopenharmony_ci #define CREQ_QUERY_SRQ_RESP_TYPE_SFT 0 23878c2ecf20Sopenharmony_ci #define CREQ_QUERY_SRQ_RESP_TYPE_QP_EVENT 0x38UL 23888c2ecf20Sopenharmony_ci #define CREQ_QUERY_SRQ_RESP_RESERVED2_MASK 0xc0UL 23898c2ecf20Sopenharmony_ci #define CREQ_QUERY_SRQ_RESP_RESERVED2_SFT 6 23908c2ecf20Sopenharmony_ci u8 status; 23918c2ecf20Sopenharmony_ci __le16 cookie; 23928c2ecf20Sopenharmony_ci __le32 size; 23938c2ecf20Sopenharmony_ci u8 v; 23948c2ecf20Sopenharmony_ci #define CREQ_QUERY_SRQ_RESP_V 0x1UL 23958c2ecf20Sopenharmony_ci #define CREQ_QUERY_SRQ_RESP_RESERVED7_MASK 0xfeUL 23968c2ecf20Sopenharmony_ci #define CREQ_QUERY_SRQ_RESP_RESERVED7_SFT 1 23978c2ecf20Sopenharmony_ci u8 event; 23988c2ecf20Sopenharmony_ci #define CREQ_QUERY_SRQ_RESP_EVENT_QUERY_SRQ 0x8UL 23998c2ecf20Sopenharmony_ci __le16 reserved48[3]; 24008c2ecf20Sopenharmony_ci}; 24018c2ecf20Sopenharmony_ci 24028c2ecf20Sopenharmony_ci/* Query SRQ command response side buffer structure (24 bytes) */ 24038c2ecf20Sopenharmony_cistruct creq_query_srq_resp_sb { 24048c2ecf20Sopenharmony_ci u8 opcode; 24058c2ecf20Sopenharmony_ci #define CREQ_QUERY_SRQ_RESP_SB_OPCODE_QUERY_SRQ 0x8UL 24068c2ecf20Sopenharmony_ci u8 status; 24078c2ecf20Sopenharmony_ci __le16 cookie; 24088c2ecf20Sopenharmony_ci __le16 flags; 24098c2ecf20Sopenharmony_ci u8 resp_size; 24108c2ecf20Sopenharmony_ci u8 reserved8; 24118c2ecf20Sopenharmony_ci __le32 xid; 24128c2ecf20Sopenharmony_ci __le16 srq_limit; 24138c2ecf20Sopenharmony_ci __le16 reserved16; 24148c2ecf20Sopenharmony_ci __le32 data[4]; 24158c2ecf20Sopenharmony_ci}; 24168c2ecf20Sopenharmony_ci 24178c2ecf20Sopenharmony_ci/* Create CQ command Response (16 bytes) */ 24188c2ecf20Sopenharmony_cistruct creq_create_cq_resp { 24198c2ecf20Sopenharmony_ci u8 type; 24208c2ecf20Sopenharmony_ci #define CREQ_CREATE_CQ_RESP_TYPE_MASK 0x3fUL 24218c2ecf20Sopenharmony_ci #define CREQ_CREATE_CQ_RESP_TYPE_SFT 0 24228c2ecf20Sopenharmony_ci #define CREQ_CREATE_CQ_RESP_TYPE_QP_EVENT 0x38UL 24238c2ecf20Sopenharmony_ci #define CREQ_CREATE_CQ_RESP_RESERVED2_MASK 0xc0UL 24248c2ecf20Sopenharmony_ci #define CREQ_CREATE_CQ_RESP_RESERVED2_SFT 6 24258c2ecf20Sopenharmony_ci u8 status; 24268c2ecf20Sopenharmony_ci __le16 cookie; 24278c2ecf20Sopenharmony_ci __le32 xid; 24288c2ecf20Sopenharmony_ci u8 v; 24298c2ecf20Sopenharmony_ci #define CREQ_CREATE_CQ_RESP_V 0x1UL 24308c2ecf20Sopenharmony_ci #define CREQ_CREATE_CQ_RESP_RESERVED7_MASK 0xfeUL 24318c2ecf20Sopenharmony_ci #define CREQ_CREATE_CQ_RESP_RESERVED7_SFT 1 24328c2ecf20Sopenharmony_ci u8 event; 24338c2ecf20Sopenharmony_ci #define CREQ_CREATE_CQ_RESP_EVENT_CREATE_CQ 0x9UL 24348c2ecf20Sopenharmony_ci __le16 reserved48[3]; 24358c2ecf20Sopenharmony_ci}; 24368c2ecf20Sopenharmony_ci 24378c2ecf20Sopenharmony_ci/* Destroy CQ command response (16 bytes) */ 24388c2ecf20Sopenharmony_cistruct creq_destroy_cq_resp { 24398c2ecf20Sopenharmony_ci u8 type; 24408c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_TYPE_MASK 0x3fUL 24418c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_TYPE_SFT 0 24428c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_TYPE_QP_EVENT 0x38UL 24438c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_RESERVED2_MASK 0xc0UL 24448c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_RESERVED2_SFT 6 24458c2ecf20Sopenharmony_ci u8 status; 24468c2ecf20Sopenharmony_ci __le16 cookie; 24478c2ecf20Sopenharmony_ci __le32 xid; 24488c2ecf20Sopenharmony_ci u8 v; 24498c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_V 0x1UL 24508c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_RESERVED7_MASK 0xfeUL 24518c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_RESERVED7_SFT 1 24528c2ecf20Sopenharmony_ci u8 event; 24538c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_EVENT_DESTROY_CQ 0xaUL 24548c2ecf20Sopenharmony_ci __le16 cq_arm_lvl; 24558c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_CQ_ARM_LVL_MASK 0x3UL 24568c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_CQ_ARM_LVL_SFT 0 24578c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_RESERVED14_MASK 0xfffcUL 24588c2ecf20Sopenharmony_ci #define CREQ_DESTROY_CQ_RESP_RESERVED14_SFT 2 24598c2ecf20Sopenharmony_ci __le16 total_cnq_events; 24608c2ecf20Sopenharmony_ci __le16 reserved16; 24618c2ecf20Sopenharmony_ci}; 24628c2ecf20Sopenharmony_ci 24638c2ecf20Sopenharmony_ci/* Resize CQ command response (16 bytes) */ 24648c2ecf20Sopenharmony_cistruct creq_resize_cq_resp { 24658c2ecf20Sopenharmony_ci u8 type; 24668c2ecf20Sopenharmony_ci #define CREQ_RESIZE_CQ_RESP_TYPE_MASK 0x3fUL 24678c2ecf20Sopenharmony_ci #define CREQ_RESIZE_CQ_RESP_TYPE_SFT 0 24688c2ecf20Sopenharmony_ci #define CREQ_RESIZE_CQ_RESP_TYPE_QP_EVENT 0x38UL 24698c2ecf20Sopenharmony_ci #define CREQ_RESIZE_CQ_RESP_RESERVED2_MASK 0xc0UL 24708c2ecf20Sopenharmony_ci #define CREQ_RESIZE_CQ_RESP_RESERVED2_SFT 6 24718c2ecf20Sopenharmony_ci u8 status; 24728c2ecf20Sopenharmony_ci __le16 cookie; 24738c2ecf20Sopenharmony_ci __le32 xid; 24748c2ecf20Sopenharmony_ci u8 v; 24758c2ecf20Sopenharmony_ci #define CREQ_RESIZE_CQ_RESP_V 0x1UL 24768c2ecf20Sopenharmony_ci #define CREQ_RESIZE_CQ_RESP_RESERVED7_MASK 0xfeUL 24778c2ecf20Sopenharmony_ci #define CREQ_RESIZE_CQ_RESP_RESERVED7_SFT 1 24788c2ecf20Sopenharmony_ci u8 event; 24798c2ecf20Sopenharmony_ci #define CREQ_RESIZE_CQ_RESP_EVENT_RESIZE_CQ 0xcUL 24808c2ecf20Sopenharmony_ci __le16 reserved48[3]; 24818c2ecf20Sopenharmony_ci}; 24828c2ecf20Sopenharmony_ci 24838c2ecf20Sopenharmony_ci/* Allocate MRW command response (16 bytes) */ 24848c2ecf20Sopenharmony_cistruct creq_allocate_mrw_resp { 24858c2ecf20Sopenharmony_ci u8 type; 24868c2ecf20Sopenharmony_ci #define CREQ_ALLOCATE_MRW_RESP_TYPE_MASK 0x3fUL 24878c2ecf20Sopenharmony_ci #define CREQ_ALLOCATE_MRW_RESP_TYPE_SFT 0 24888c2ecf20Sopenharmony_ci #define CREQ_ALLOCATE_MRW_RESP_TYPE_QP_EVENT 0x38UL 24898c2ecf20Sopenharmony_ci #define CREQ_ALLOCATE_MRW_RESP_RESERVED2_MASK 0xc0UL 24908c2ecf20Sopenharmony_ci #define CREQ_ALLOCATE_MRW_RESP_RESERVED2_SFT 6 24918c2ecf20Sopenharmony_ci u8 status; 24928c2ecf20Sopenharmony_ci __le16 cookie; 24938c2ecf20Sopenharmony_ci __le32 xid; 24948c2ecf20Sopenharmony_ci u8 v; 24958c2ecf20Sopenharmony_ci #define CREQ_ALLOCATE_MRW_RESP_V 0x1UL 24968c2ecf20Sopenharmony_ci #define CREQ_ALLOCATE_MRW_RESP_RESERVED7_MASK 0xfeUL 24978c2ecf20Sopenharmony_ci #define CREQ_ALLOCATE_MRW_RESP_RESERVED7_SFT 1 24988c2ecf20Sopenharmony_ci u8 event; 24998c2ecf20Sopenharmony_ci #define CREQ_ALLOCATE_MRW_RESP_EVENT_ALLOCATE_MRW 0xdUL 25008c2ecf20Sopenharmony_ci __le16 reserved48[3]; 25018c2ecf20Sopenharmony_ci}; 25028c2ecf20Sopenharmony_ci 25038c2ecf20Sopenharmony_ci/* De-allocate key command response (16 bytes) */ 25048c2ecf20Sopenharmony_cistruct creq_deallocate_key_resp { 25058c2ecf20Sopenharmony_ci u8 type; 25068c2ecf20Sopenharmony_ci #define CREQ_DEALLOCATE_KEY_RESP_TYPE_MASK 0x3fUL 25078c2ecf20Sopenharmony_ci #define CREQ_DEALLOCATE_KEY_RESP_TYPE_SFT 0 25088c2ecf20Sopenharmony_ci #define CREQ_DEALLOCATE_KEY_RESP_TYPE_QP_EVENT 0x38UL 25098c2ecf20Sopenharmony_ci #define CREQ_DEALLOCATE_KEY_RESP_RESERVED2_MASK 0xc0UL 25108c2ecf20Sopenharmony_ci #define CREQ_DEALLOCATE_KEY_RESP_RESERVED2_SFT 6 25118c2ecf20Sopenharmony_ci u8 status; 25128c2ecf20Sopenharmony_ci __le16 cookie; 25138c2ecf20Sopenharmony_ci __le32 xid; 25148c2ecf20Sopenharmony_ci u8 v; 25158c2ecf20Sopenharmony_ci #define CREQ_DEALLOCATE_KEY_RESP_V 0x1UL 25168c2ecf20Sopenharmony_ci #define CREQ_DEALLOCATE_KEY_RESP_RESERVED7_MASK 0xfeUL 25178c2ecf20Sopenharmony_ci #define CREQ_DEALLOCATE_KEY_RESP_RESERVED7_SFT 1 25188c2ecf20Sopenharmony_ci u8 event; 25198c2ecf20Sopenharmony_ci #define CREQ_DEALLOCATE_KEY_RESP_EVENT_DEALLOCATE_KEY 0xeUL 25208c2ecf20Sopenharmony_ci __le16 reserved16; 25218c2ecf20Sopenharmony_ci __le32 bound_window_info; 25228c2ecf20Sopenharmony_ci}; 25238c2ecf20Sopenharmony_ci 25248c2ecf20Sopenharmony_ci/* Register MR command response (16 bytes) */ 25258c2ecf20Sopenharmony_cistruct creq_register_mr_resp { 25268c2ecf20Sopenharmony_ci u8 type; 25278c2ecf20Sopenharmony_ci #define CREQ_REGISTER_MR_RESP_TYPE_MASK 0x3fUL 25288c2ecf20Sopenharmony_ci #define CREQ_REGISTER_MR_RESP_TYPE_SFT 0 25298c2ecf20Sopenharmony_ci #define CREQ_REGISTER_MR_RESP_TYPE_QP_EVENT 0x38UL 25308c2ecf20Sopenharmony_ci #define CREQ_REGISTER_MR_RESP_RESERVED2_MASK 0xc0UL 25318c2ecf20Sopenharmony_ci #define CREQ_REGISTER_MR_RESP_RESERVED2_SFT 6 25328c2ecf20Sopenharmony_ci u8 status; 25338c2ecf20Sopenharmony_ci __le16 cookie; 25348c2ecf20Sopenharmony_ci __le32 xid; 25358c2ecf20Sopenharmony_ci u8 v; 25368c2ecf20Sopenharmony_ci #define CREQ_REGISTER_MR_RESP_V 0x1UL 25378c2ecf20Sopenharmony_ci #define CREQ_REGISTER_MR_RESP_RESERVED7_MASK 0xfeUL 25388c2ecf20Sopenharmony_ci #define CREQ_REGISTER_MR_RESP_RESERVED7_SFT 1 25398c2ecf20Sopenharmony_ci u8 event; 25408c2ecf20Sopenharmony_ci #define CREQ_REGISTER_MR_RESP_EVENT_REGISTER_MR 0xfUL 25418c2ecf20Sopenharmony_ci __le16 reserved48[3]; 25428c2ecf20Sopenharmony_ci}; 25438c2ecf20Sopenharmony_ci 25448c2ecf20Sopenharmony_ci/* Deregister MR command response (16 bytes) */ 25458c2ecf20Sopenharmony_cistruct creq_deregister_mr_resp { 25468c2ecf20Sopenharmony_ci u8 type; 25478c2ecf20Sopenharmony_ci #define CREQ_DEREGISTER_MR_RESP_TYPE_MASK 0x3fUL 25488c2ecf20Sopenharmony_ci #define CREQ_DEREGISTER_MR_RESP_TYPE_SFT 0 25498c2ecf20Sopenharmony_ci #define CREQ_DEREGISTER_MR_RESP_TYPE_QP_EVENT 0x38UL 25508c2ecf20Sopenharmony_ci #define CREQ_DEREGISTER_MR_RESP_RESERVED2_MASK 0xc0UL 25518c2ecf20Sopenharmony_ci #define CREQ_DEREGISTER_MR_RESP_RESERVED2_SFT 6 25528c2ecf20Sopenharmony_ci u8 status; 25538c2ecf20Sopenharmony_ci __le16 cookie; 25548c2ecf20Sopenharmony_ci __le32 xid; 25558c2ecf20Sopenharmony_ci u8 v; 25568c2ecf20Sopenharmony_ci #define CREQ_DEREGISTER_MR_RESP_V 0x1UL 25578c2ecf20Sopenharmony_ci #define CREQ_DEREGISTER_MR_RESP_RESERVED7_MASK 0xfeUL 25588c2ecf20Sopenharmony_ci #define CREQ_DEREGISTER_MR_RESP_RESERVED7_SFT 1 25598c2ecf20Sopenharmony_ci u8 event; 25608c2ecf20Sopenharmony_ci #define CREQ_DEREGISTER_MR_RESP_EVENT_DEREGISTER_MR 0x10UL 25618c2ecf20Sopenharmony_ci __le16 reserved16; 25628c2ecf20Sopenharmony_ci __le32 bound_windows; 25638c2ecf20Sopenharmony_ci}; 25648c2ecf20Sopenharmony_ci 25658c2ecf20Sopenharmony_ci/* Add GID command response (16 bytes) */ 25668c2ecf20Sopenharmony_cistruct creq_add_gid_resp { 25678c2ecf20Sopenharmony_ci u8 type; 25688c2ecf20Sopenharmony_ci #define CREQ_ADD_GID_RESP_TYPE_MASK 0x3fUL 25698c2ecf20Sopenharmony_ci #define CREQ_ADD_GID_RESP_TYPE_SFT 0 25708c2ecf20Sopenharmony_ci #define CREQ_ADD_GID_RESP_TYPE_QP_EVENT 0x38UL 25718c2ecf20Sopenharmony_ci #define CREQ_ADD_GID_RESP_RESERVED2_MASK 0xc0UL 25728c2ecf20Sopenharmony_ci #define CREQ_ADD_GID_RESP_RESERVED2_SFT 6 25738c2ecf20Sopenharmony_ci u8 status; 25748c2ecf20Sopenharmony_ci __le16 cookie; 25758c2ecf20Sopenharmony_ci __le32 xid; 25768c2ecf20Sopenharmony_ci u8 v; 25778c2ecf20Sopenharmony_ci #define CREQ_ADD_GID_RESP_V 0x1UL 25788c2ecf20Sopenharmony_ci #define CREQ_ADD_GID_RESP_RESERVED7_MASK 0xfeUL 25798c2ecf20Sopenharmony_ci #define CREQ_ADD_GID_RESP_RESERVED7_SFT 1 25808c2ecf20Sopenharmony_ci u8 event; 25818c2ecf20Sopenharmony_ci #define CREQ_ADD_GID_RESP_EVENT_ADD_GID 0x11UL 25828c2ecf20Sopenharmony_ci __le16 reserved48[3]; 25838c2ecf20Sopenharmony_ci}; 25848c2ecf20Sopenharmony_ci 25858c2ecf20Sopenharmony_ci/* Delete GID command response (16 bytes) */ 25868c2ecf20Sopenharmony_cistruct creq_delete_gid_resp { 25878c2ecf20Sopenharmony_ci u8 type; 25888c2ecf20Sopenharmony_ci #define CREQ_DELETE_GID_RESP_TYPE_MASK 0x3fUL 25898c2ecf20Sopenharmony_ci #define CREQ_DELETE_GID_RESP_TYPE_SFT 0 25908c2ecf20Sopenharmony_ci #define CREQ_DELETE_GID_RESP_TYPE_QP_EVENT 0x38UL 25918c2ecf20Sopenharmony_ci #define CREQ_DELETE_GID_RESP_RESERVED2_MASK 0xc0UL 25928c2ecf20Sopenharmony_ci #define CREQ_DELETE_GID_RESP_RESERVED2_SFT 6 25938c2ecf20Sopenharmony_ci u8 status; 25948c2ecf20Sopenharmony_ci __le16 cookie; 25958c2ecf20Sopenharmony_ci __le32 xid; 25968c2ecf20Sopenharmony_ci u8 v; 25978c2ecf20Sopenharmony_ci #define CREQ_DELETE_GID_RESP_V 0x1UL 25988c2ecf20Sopenharmony_ci #define CREQ_DELETE_GID_RESP_RESERVED7_MASK 0xfeUL 25998c2ecf20Sopenharmony_ci #define CREQ_DELETE_GID_RESP_RESERVED7_SFT 1 26008c2ecf20Sopenharmony_ci u8 event; 26018c2ecf20Sopenharmony_ci #define CREQ_DELETE_GID_RESP_EVENT_DELETE_GID 0x12UL 26028c2ecf20Sopenharmony_ci __le16 reserved48[3]; 26038c2ecf20Sopenharmony_ci}; 26048c2ecf20Sopenharmony_ci 26058c2ecf20Sopenharmony_ci/* Modify GID command response (16 bytes) */ 26068c2ecf20Sopenharmony_cistruct creq_modify_gid_resp { 26078c2ecf20Sopenharmony_ci u8 type; 26088c2ecf20Sopenharmony_ci #define CREQ_MODIFY_GID_RESP_TYPE_MASK 0x3fUL 26098c2ecf20Sopenharmony_ci #define CREQ_MODIFY_GID_RESP_TYPE_SFT 0 26108c2ecf20Sopenharmony_ci #define CREQ_MODIFY_GID_RESP_TYPE_QP_EVENT 0x38UL 26118c2ecf20Sopenharmony_ci #define CREQ_MODIFY_GID_RESP_RESERVED2_MASK 0xc0UL 26128c2ecf20Sopenharmony_ci #define CREQ_MODIFY_GID_RESP_RESERVED2_SFT 6 26138c2ecf20Sopenharmony_ci u8 status; 26148c2ecf20Sopenharmony_ci __le16 cookie; 26158c2ecf20Sopenharmony_ci __le32 xid; 26168c2ecf20Sopenharmony_ci u8 v; 26178c2ecf20Sopenharmony_ci #define CREQ_MODIFY_GID_RESP_V 0x1UL 26188c2ecf20Sopenharmony_ci #define CREQ_MODIFY_GID_RESP_RESERVED7_MASK 0xfeUL 26198c2ecf20Sopenharmony_ci #define CREQ_MODIFY_GID_RESP_RESERVED7_SFT 1 26208c2ecf20Sopenharmony_ci u8 event; 26218c2ecf20Sopenharmony_ci #define CREQ_MODIFY_GID_RESP_EVENT_ADD_GID 0x11UL 26228c2ecf20Sopenharmony_ci __le16 reserved48[3]; 26238c2ecf20Sopenharmony_ci}; 26248c2ecf20Sopenharmony_ci 26258c2ecf20Sopenharmony_ci/* Query GID command response (16 bytes) */ 26268c2ecf20Sopenharmony_cistruct creq_query_gid_resp { 26278c2ecf20Sopenharmony_ci u8 type; 26288c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_TYPE_MASK 0x3fUL 26298c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_TYPE_SFT 0 26308c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_TYPE_QP_EVENT 0x38UL 26318c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_RESERVED2_MASK 0xc0UL 26328c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_RESERVED2_SFT 6 26338c2ecf20Sopenharmony_ci u8 status; 26348c2ecf20Sopenharmony_ci __le16 cookie; 26358c2ecf20Sopenharmony_ci __le32 size; 26368c2ecf20Sopenharmony_ci u8 v; 26378c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_V 0x1UL 26388c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_RESERVED7_MASK 0xfeUL 26398c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_RESERVED7_SFT 1 26408c2ecf20Sopenharmony_ci u8 event; 26418c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_EVENT_QUERY_GID 0x18UL 26428c2ecf20Sopenharmony_ci __le16 reserved48[3]; 26438c2ecf20Sopenharmony_ci}; 26448c2ecf20Sopenharmony_ci 26458c2ecf20Sopenharmony_ci/* Query GID command response side buffer structure (40 bytes) */ 26468c2ecf20Sopenharmony_cistruct creq_query_gid_resp_sb { 26478c2ecf20Sopenharmony_ci u8 opcode; 26488c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_OPCODE_QUERY_GID 0x18UL 26498c2ecf20Sopenharmony_ci u8 status; 26508c2ecf20Sopenharmony_ci __le16 cookie; 26518c2ecf20Sopenharmony_ci __le16 flags; 26528c2ecf20Sopenharmony_ci u8 resp_size; 26538c2ecf20Sopenharmony_ci u8 reserved8; 26548c2ecf20Sopenharmony_ci __le32 gid[4]; 26558c2ecf20Sopenharmony_ci __le16 src_mac[3]; 26568c2ecf20Sopenharmony_ci __le16 vlan; 26578c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_ID_MASK 0xfffUL 26588c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_ID_SFT 0 26598c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_MASK 0x7000UL 26608c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_SFT 12 26618c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_88A8 (0x0UL << 12) 26628c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_8100 (0x1UL << 12) 26638c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_9100 (0x2UL << 12) 26648c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_9200 (0x3UL << 12) 26658c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_9300 (0x4UL << 12) 26668c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG1 (0x5UL << 12) 26678c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG2 (0x6UL << 12) 26688c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG3 (0x7UL << 12) 26698c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_TPID_LAST \ 26708c2ecf20Sopenharmony_ci CREQ_QUERY_GID_RESP_SB_VLAN_TPID_TPID_CFG3 26718c2ecf20Sopenharmony_ci #define CREQ_QUERY_GID_RESP_SB_VLAN_VLAN_EN 0x8000UL 26728c2ecf20Sopenharmony_ci __le16 ipid; 26738c2ecf20Sopenharmony_ci __le16 gid_index; 26748c2ecf20Sopenharmony_ci __le32 unused_0; 26758c2ecf20Sopenharmony_ci}; 26768c2ecf20Sopenharmony_ci 26778c2ecf20Sopenharmony_ci/* Create QP1 command response (16 bytes) */ 26788c2ecf20Sopenharmony_cistruct creq_create_qp1_resp { 26798c2ecf20Sopenharmony_ci u8 type; 26808c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP1_RESP_TYPE_MASK 0x3fUL 26818c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP1_RESP_TYPE_SFT 0 26828c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP1_RESP_TYPE_QP_EVENT 0x38UL 26838c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP1_RESP_RESERVED2_MASK 0xc0UL 26848c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP1_RESP_RESERVED2_SFT 6 26858c2ecf20Sopenharmony_ci u8 status; 26868c2ecf20Sopenharmony_ci __le16 cookie; 26878c2ecf20Sopenharmony_ci __le32 xid; 26888c2ecf20Sopenharmony_ci u8 v; 26898c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP1_RESP_V 0x1UL 26908c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP1_RESP_RESERVED7_MASK 0xfeUL 26918c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP1_RESP_RESERVED7_SFT 1 26928c2ecf20Sopenharmony_ci u8 event; 26938c2ecf20Sopenharmony_ci #define CREQ_CREATE_QP1_RESP_EVENT_CREATE_QP1 0x13UL 26948c2ecf20Sopenharmony_ci __le16 reserved48[3]; 26958c2ecf20Sopenharmony_ci}; 26968c2ecf20Sopenharmony_ci 26978c2ecf20Sopenharmony_ci/* Destroy QP1 command response (16 bytes) */ 26988c2ecf20Sopenharmony_cistruct creq_destroy_qp1_resp { 26998c2ecf20Sopenharmony_ci u8 type; 27008c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP1_RESP_TYPE_MASK 0x3fUL 27018c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP1_RESP_TYPE_SFT 0 27028c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP1_RESP_TYPE_QP_EVENT 0x38UL 27038c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP1_RESP_RESERVED2_MASK 0xc0UL 27048c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP1_RESP_RESERVED2_SFT 6 27058c2ecf20Sopenharmony_ci u8 status; 27068c2ecf20Sopenharmony_ci __le16 cookie; 27078c2ecf20Sopenharmony_ci __le32 xid; 27088c2ecf20Sopenharmony_ci u8 v; 27098c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP1_RESP_V 0x1UL 27108c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP1_RESP_RESERVED7_MASK 0xfeUL 27118c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP1_RESP_RESERVED7_SFT 1 27128c2ecf20Sopenharmony_ci u8 event; 27138c2ecf20Sopenharmony_ci #define CREQ_DESTROY_QP1_RESP_EVENT_DESTROY_QP1 0x14UL 27148c2ecf20Sopenharmony_ci __le16 reserved48[3]; 27158c2ecf20Sopenharmony_ci}; 27168c2ecf20Sopenharmony_ci 27178c2ecf20Sopenharmony_ci/* Create AH command response (16 bytes) */ 27188c2ecf20Sopenharmony_cistruct creq_create_ah_resp { 27198c2ecf20Sopenharmony_ci u8 type; 27208c2ecf20Sopenharmony_ci #define CREQ_CREATE_AH_RESP_TYPE_MASK 0x3fUL 27218c2ecf20Sopenharmony_ci #define CREQ_CREATE_AH_RESP_TYPE_SFT 0 27228c2ecf20Sopenharmony_ci #define CREQ_CREATE_AH_RESP_TYPE_QP_EVENT 0x38UL 27238c2ecf20Sopenharmony_ci #define CREQ_CREATE_AH_RESP_RESERVED2_MASK 0xc0UL 27248c2ecf20Sopenharmony_ci #define CREQ_CREATE_AH_RESP_RESERVED2_SFT 6 27258c2ecf20Sopenharmony_ci u8 status; 27268c2ecf20Sopenharmony_ci __le16 cookie; 27278c2ecf20Sopenharmony_ci __le32 xid; 27288c2ecf20Sopenharmony_ci u8 v; 27298c2ecf20Sopenharmony_ci #define CREQ_CREATE_AH_RESP_V 0x1UL 27308c2ecf20Sopenharmony_ci #define CREQ_CREATE_AH_RESP_RESERVED7_MASK 0xfeUL 27318c2ecf20Sopenharmony_ci #define CREQ_CREATE_AH_RESP_RESERVED7_SFT 1 27328c2ecf20Sopenharmony_ci u8 event; 27338c2ecf20Sopenharmony_ci #define CREQ_CREATE_AH_RESP_EVENT_CREATE_AH 0x15UL 27348c2ecf20Sopenharmony_ci __le16 reserved48[3]; 27358c2ecf20Sopenharmony_ci}; 27368c2ecf20Sopenharmony_ci 27378c2ecf20Sopenharmony_ci/* Destroy AH command response (16 bytes) */ 27388c2ecf20Sopenharmony_cistruct creq_destroy_ah_resp { 27398c2ecf20Sopenharmony_ci u8 type; 27408c2ecf20Sopenharmony_ci #define CREQ_DESTROY_AH_RESP_TYPE_MASK 0x3fUL 27418c2ecf20Sopenharmony_ci #define CREQ_DESTROY_AH_RESP_TYPE_SFT 0 27428c2ecf20Sopenharmony_ci #define CREQ_DESTROY_AH_RESP_TYPE_QP_EVENT 0x38UL 27438c2ecf20Sopenharmony_ci #define CREQ_DESTROY_AH_RESP_RESERVED2_MASK 0xc0UL 27448c2ecf20Sopenharmony_ci #define CREQ_DESTROY_AH_RESP_RESERVED2_SFT 6 27458c2ecf20Sopenharmony_ci u8 status; 27468c2ecf20Sopenharmony_ci __le16 cookie; 27478c2ecf20Sopenharmony_ci __le32 xid; 27488c2ecf20Sopenharmony_ci u8 v; 27498c2ecf20Sopenharmony_ci #define CREQ_DESTROY_AH_RESP_V 0x1UL 27508c2ecf20Sopenharmony_ci #define CREQ_DESTROY_AH_RESP_RESERVED7_MASK 0xfeUL 27518c2ecf20Sopenharmony_ci #define CREQ_DESTROY_AH_RESP_RESERVED7_SFT 1 27528c2ecf20Sopenharmony_ci u8 event; 27538c2ecf20Sopenharmony_ci #define CREQ_DESTROY_AH_RESP_EVENT_DESTROY_AH 0x16UL 27548c2ecf20Sopenharmony_ci __le16 reserved48[3]; 27558c2ecf20Sopenharmony_ci}; 27568c2ecf20Sopenharmony_ci 27578c2ecf20Sopenharmony_ci/* Initialize Firmware command response (16 bytes) */ 27588c2ecf20Sopenharmony_cistruct creq_initialize_fw_resp { 27598c2ecf20Sopenharmony_ci u8 type; 27608c2ecf20Sopenharmony_ci #define CREQ_INITIALIZE_FW_RESP_TYPE_MASK 0x3fUL 27618c2ecf20Sopenharmony_ci #define CREQ_INITIALIZE_FW_RESP_TYPE_SFT 0 27628c2ecf20Sopenharmony_ci #define CREQ_INITIALIZE_FW_RESP_TYPE_QP_EVENT 0x38UL 27638c2ecf20Sopenharmony_ci #define CREQ_INITIALIZE_FW_RESP_RESERVED2_MASK 0xc0UL 27648c2ecf20Sopenharmony_ci #define CREQ_INITIALIZE_FW_RESP_RESERVED2_SFT 6 27658c2ecf20Sopenharmony_ci u8 status; 27668c2ecf20Sopenharmony_ci __le16 cookie; 27678c2ecf20Sopenharmony_ci __le32 reserved32; 27688c2ecf20Sopenharmony_ci u8 v; 27698c2ecf20Sopenharmony_ci #define CREQ_INITIALIZE_FW_RESP_V 0x1UL 27708c2ecf20Sopenharmony_ci #define CREQ_INITIALIZE_FW_RESP_RESERVED7_MASK 0xfeUL 27718c2ecf20Sopenharmony_ci #define CREQ_INITIALIZE_FW_RESP_RESERVED7_SFT 1 27728c2ecf20Sopenharmony_ci u8 event; 27738c2ecf20Sopenharmony_ci #define CREQ_INITIALIZE_FW_RESP_EVENT_INITIALIZE_FW 0x80UL 27748c2ecf20Sopenharmony_ci __le16 reserved48[3]; 27758c2ecf20Sopenharmony_ci}; 27768c2ecf20Sopenharmony_ci 27778c2ecf20Sopenharmony_ci/* De-initialize Firmware command response (16 bytes) */ 27788c2ecf20Sopenharmony_cistruct creq_deinitialize_fw_resp { 27798c2ecf20Sopenharmony_ci u8 type; 27808c2ecf20Sopenharmony_ci #define CREQ_DEINITIALIZE_FW_RESP_TYPE_MASK 0x3fUL 27818c2ecf20Sopenharmony_ci #define CREQ_DEINITIALIZE_FW_RESP_TYPE_SFT 0 27828c2ecf20Sopenharmony_ci #define CREQ_DEINITIALIZE_FW_RESP_TYPE_QP_EVENT 0x38UL 27838c2ecf20Sopenharmony_ci #define CREQ_DEINITIALIZE_FW_RESP_RESERVED2_MASK 0xc0UL 27848c2ecf20Sopenharmony_ci #define CREQ_DEINITIALIZE_FW_RESP_RESERVED2_SFT 6 27858c2ecf20Sopenharmony_ci u8 status; 27868c2ecf20Sopenharmony_ci __le16 cookie; 27878c2ecf20Sopenharmony_ci __le32 reserved32; 27888c2ecf20Sopenharmony_ci u8 v; 27898c2ecf20Sopenharmony_ci #define CREQ_DEINITIALIZE_FW_RESP_V 0x1UL 27908c2ecf20Sopenharmony_ci #define CREQ_DEINITIALIZE_FW_RESP_RESERVED7_MASK 0xfeUL 27918c2ecf20Sopenharmony_ci #define CREQ_DEINITIALIZE_FW_RESP_RESERVED7_SFT 1 27928c2ecf20Sopenharmony_ci u8 event; 27938c2ecf20Sopenharmony_ci #define CREQ_DEINITIALIZE_FW_RESP_EVENT_DEINITIALIZE_FW 0x81UL 27948c2ecf20Sopenharmony_ci __le16 reserved48[3]; 27958c2ecf20Sopenharmony_ci}; 27968c2ecf20Sopenharmony_ci 27978c2ecf20Sopenharmony_ci/* Stop function command response (16 bytes) */ 27988c2ecf20Sopenharmony_cistruct creq_stop_func_resp { 27998c2ecf20Sopenharmony_ci u8 type; 28008c2ecf20Sopenharmony_ci #define CREQ_STOP_FUNC_RESP_TYPE_MASK 0x3fUL 28018c2ecf20Sopenharmony_ci #define CREQ_STOP_FUNC_RESP_TYPE_SFT 0 28028c2ecf20Sopenharmony_ci #define CREQ_STOP_FUNC_RESP_TYPE_QP_EVENT 0x38UL 28038c2ecf20Sopenharmony_ci #define CREQ_STOP_FUNC_RESP_RESERVED2_MASK 0xc0UL 28048c2ecf20Sopenharmony_ci #define CREQ_STOP_FUNC_RESP_RESERVED2_SFT 6 28058c2ecf20Sopenharmony_ci u8 status; 28068c2ecf20Sopenharmony_ci __le16 cookie; 28078c2ecf20Sopenharmony_ci __le32 reserved32; 28088c2ecf20Sopenharmony_ci u8 v; 28098c2ecf20Sopenharmony_ci #define CREQ_STOP_FUNC_RESP_V 0x1UL 28108c2ecf20Sopenharmony_ci #define CREQ_STOP_FUNC_RESP_RESERVED7_MASK 0xfeUL 28118c2ecf20Sopenharmony_ci #define CREQ_STOP_FUNC_RESP_RESERVED7_SFT 1 28128c2ecf20Sopenharmony_ci u8 event; 28138c2ecf20Sopenharmony_ci #define CREQ_STOP_FUNC_RESP_EVENT_STOP_FUNC 0x82UL 28148c2ecf20Sopenharmony_ci __le16 reserved48[3]; 28158c2ecf20Sopenharmony_ci}; 28168c2ecf20Sopenharmony_ci 28178c2ecf20Sopenharmony_ci/* Query function command response (16 bytes) */ 28188c2ecf20Sopenharmony_cistruct creq_query_func_resp { 28198c2ecf20Sopenharmony_ci u8 type; 28208c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_TYPE_MASK 0x3fUL 28218c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_TYPE_SFT 0 28228c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_TYPE_QP_EVENT 0x38UL 28238c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_RESERVED2_MASK 0xc0UL 28248c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_RESERVED2_SFT 6 28258c2ecf20Sopenharmony_ci u8 status; 28268c2ecf20Sopenharmony_ci __le16 cookie; 28278c2ecf20Sopenharmony_ci __le32 size; 28288c2ecf20Sopenharmony_ci u8 v; 28298c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_V 0x1UL 28308c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_RESERVED7_MASK 0xfeUL 28318c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_RESERVED7_SFT 1 28328c2ecf20Sopenharmony_ci u8 event; 28338c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_EVENT_QUERY_FUNC 0x83UL 28348c2ecf20Sopenharmony_ci __le16 reserved48[3]; 28358c2ecf20Sopenharmony_ci}; 28368c2ecf20Sopenharmony_ci 28378c2ecf20Sopenharmony_ci/* Query function command response side buffer structure (88 bytes) */ 28388c2ecf20Sopenharmony_cistruct creq_query_func_resp_sb { 28398c2ecf20Sopenharmony_ci u8 opcode; 28408c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_SB_OPCODE_QUERY_FUNC 0x83UL 28418c2ecf20Sopenharmony_ci u8 status; 28428c2ecf20Sopenharmony_ci __le16 cookie; 28438c2ecf20Sopenharmony_ci __le16 flags; 28448c2ecf20Sopenharmony_ci u8 resp_size; 28458c2ecf20Sopenharmony_ci u8 reserved8; 28468c2ecf20Sopenharmony_ci __le64 max_mr_size; 28478c2ecf20Sopenharmony_ci __le32 max_qp; 28488c2ecf20Sopenharmony_ci __le16 max_qp_wr; 28498c2ecf20Sopenharmony_ci __le16 dev_cap_flags; 28508c2ecf20Sopenharmony_ci #define CREQ_QUERY_FUNC_RESP_SB_DEV_CAP_FLAGS_RESIZE_QP 0x1UL 28518c2ecf20Sopenharmony_ci __le32 max_cq; 28528c2ecf20Sopenharmony_ci __le32 max_cqe; 28538c2ecf20Sopenharmony_ci __le32 max_pd; 28548c2ecf20Sopenharmony_ci u8 max_sge; 28558c2ecf20Sopenharmony_ci u8 max_srq_sge; 28568c2ecf20Sopenharmony_ci u8 max_qp_rd_atom; 28578c2ecf20Sopenharmony_ci u8 max_qp_init_rd_atom; 28588c2ecf20Sopenharmony_ci __le32 max_mr; 28598c2ecf20Sopenharmony_ci __le32 max_mw; 28608c2ecf20Sopenharmony_ci __le32 max_raw_eth_qp; 28618c2ecf20Sopenharmony_ci __le32 max_ah; 28628c2ecf20Sopenharmony_ci __le32 max_fmr; 28638c2ecf20Sopenharmony_ci __le32 max_srq_wr; 28648c2ecf20Sopenharmony_ci __le32 max_pkeys; 28658c2ecf20Sopenharmony_ci __le32 max_inline_data; 28668c2ecf20Sopenharmony_ci u8 max_map_per_fmr; 28678c2ecf20Sopenharmony_ci u8 l2_db_space_size; 28688c2ecf20Sopenharmony_ci __le16 max_srq; 28698c2ecf20Sopenharmony_ci __le32 max_gid; 28708c2ecf20Sopenharmony_ci __le32 tqm_alloc_reqs[12]; 28718c2ecf20Sopenharmony_ci __le32 max_dpi; 28728c2ecf20Sopenharmony_ci __le32 reserved_32; 28738c2ecf20Sopenharmony_ci}; 28748c2ecf20Sopenharmony_ci 28758c2ecf20Sopenharmony_ci/* Set resources command response (16 bytes) */ 28768c2ecf20Sopenharmony_cistruct creq_set_func_resources_resp { 28778c2ecf20Sopenharmony_ci u8 type; 28788c2ecf20Sopenharmony_ci #define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_MASK 0x3fUL 28798c2ecf20Sopenharmony_ci #define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_SFT 0 28808c2ecf20Sopenharmony_ci #define CREQ_SET_FUNC_RESOURCES_RESP_TYPE_QP_EVENT 0x38UL 28818c2ecf20Sopenharmony_ci #define CREQ_SET_FUNC_RESOURCES_RESP_RESERVED2_MASK 0xc0UL 28828c2ecf20Sopenharmony_ci #define CREQ_SET_FUNC_RESOURCES_RESP_RESERVED2_SFT 6 28838c2ecf20Sopenharmony_ci u8 status; 28848c2ecf20Sopenharmony_ci __le16 cookie; 28858c2ecf20Sopenharmony_ci __le32 reserved32; 28868c2ecf20Sopenharmony_ci u8 v; 28878c2ecf20Sopenharmony_ci #define CREQ_SET_FUNC_RESOURCES_RESP_V 0x1UL 28888c2ecf20Sopenharmony_ci #define CREQ_SET_FUNC_RESOURCES_RESP_RESERVED7_MASK 0xfeUL 28898c2ecf20Sopenharmony_ci #define CREQ_SET_FUNC_RESOURCES_RESP_RESERVED7_SFT 1 28908c2ecf20Sopenharmony_ci u8 event; 28918c2ecf20Sopenharmony_ci #define CREQ_SET_FUNC_RESOURCES_RESP_EVENT_SET_FUNC_RESOURCES 0x84UL 28928c2ecf20Sopenharmony_ci __le16 reserved48[3]; 28938c2ecf20Sopenharmony_ci}; 28948c2ecf20Sopenharmony_ci 28958c2ecf20Sopenharmony_ci/* Map TC to COS response (16 bytes) */ 28968c2ecf20Sopenharmony_cistruct creq_map_tc_to_cos_resp { 28978c2ecf20Sopenharmony_ci u8 type; 28988c2ecf20Sopenharmony_ci #define CREQ_MAP_TC_TO_COS_RESP_TYPE_MASK 0x3fUL 28998c2ecf20Sopenharmony_ci #define CREQ_MAP_TC_TO_COS_RESP_TYPE_SFT 0 29008c2ecf20Sopenharmony_ci #define CREQ_MAP_TC_TO_COS_RESP_TYPE_QP_EVENT 0x38UL 29018c2ecf20Sopenharmony_ci #define CREQ_MAP_TC_TO_COS_RESP_RESERVED2_MASK 0xc0UL 29028c2ecf20Sopenharmony_ci #define CREQ_MAP_TC_TO_COS_RESP_RESERVED2_SFT 6 29038c2ecf20Sopenharmony_ci u8 status; 29048c2ecf20Sopenharmony_ci __le16 cookie; 29058c2ecf20Sopenharmony_ci __le32 reserved32; 29068c2ecf20Sopenharmony_ci u8 v; 29078c2ecf20Sopenharmony_ci #define CREQ_MAP_TC_TO_COS_RESP_V 0x1UL 29088c2ecf20Sopenharmony_ci #define CREQ_MAP_TC_TO_COS_RESP_RESERVED7_MASK 0xfeUL 29098c2ecf20Sopenharmony_ci #define CREQ_MAP_TC_TO_COS_RESP_RESERVED7_SFT 1 29108c2ecf20Sopenharmony_ci u8 event; 29118c2ecf20Sopenharmony_ci #define CREQ_MAP_TC_TO_COS_RESP_EVENT_MAP_TC_TO_COS 0x8aUL 29128c2ecf20Sopenharmony_ci __le16 reserved48[3]; 29138c2ecf20Sopenharmony_ci}; 29148c2ecf20Sopenharmony_ci 29158c2ecf20Sopenharmony_ci/* Query version response (16 bytes) */ 29168c2ecf20Sopenharmony_cistruct creq_query_version_resp { 29178c2ecf20Sopenharmony_ci u8 type; 29188c2ecf20Sopenharmony_ci #define CREQ_QUERY_VERSION_RESP_TYPE_MASK 0x3fUL 29198c2ecf20Sopenharmony_ci #define CREQ_QUERY_VERSION_RESP_TYPE_SFT 0 29208c2ecf20Sopenharmony_ci #define CREQ_QUERY_VERSION_RESP_TYPE_QP_EVENT 0x38UL 29218c2ecf20Sopenharmony_ci #define CREQ_QUERY_VERSION_RESP_RESERVED2_MASK 0xc0UL 29228c2ecf20Sopenharmony_ci #define CREQ_QUERY_VERSION_RESP_RESERVED2_SFT 6 29238c2ecf20Sopenharmony_ci u8 status; 29248c2ecf20Sopenharmony_ci __le16 cookie; 29258c2ecf20Sopenharmony_ci u8 fw_maj; 29268c2ecf20Sopenharmony_ci u8 fw_minor; 29278c2ecf20Sopenharmony_ci u8 fw_bld; 29288c2ecf20Sopenharmony_ci u8 fw_rsvd; 29298c2ecf20Sopenharmony_ci u8 v; 29308c2ecf20Sopenharmony_ci #define CREQ_QUERY_VERSION_RESP_V 0x1UL 29318c2ecf20Sopenharmony_ci #define CREQ_QUERY_VERSION_RESP_RESERVED7_MASK 0xfeUL 29328c2ecf20Sopenharmony_ci #define CREQ_QUERY_VERSION_RESP_RESERVED7_SFT 1 29338c2ecf20Sopenharmony_ci u8 event; 29348c2ecf20Sopenharmony_ci #define CREQ_QUERY_VERSION_RESP_EVENT_QUERY_VERSION 0x8bUL 29358c2ecf20Sopenharmony_ci __le16 reserved16; 29368c2ecf20Sopenharmony_ci u8 intf_maj; 29378c2ecf20Sopenharmony_ci u8 intf_minor; 29388c2ecf20Sopenharmony_ci u8 intf_bld; 29398c2ecf20Sopenharmony_ci u8 intf_rsvd; 29408c2ecf20Sopenharmony_ci}; 29418c2ecf20Sopenharmony_ci 29428c2ecf20Sopenharmony_ci/* Modify congestion control command response (16 bytes) */ 29438c2ecf20Sopenharmony_cistruct creq_modify_cc_resp { 29448c2ecf20Sopenharmony_ci u8 type; 29458c2ecf20Sopenharmony_ci #define CREQ_MODIFY_CC_RESP_TYPE_MASK 0x3fUL 29468c2ecf20Sopenharmony_ci #define CREQ_MODIFY_CC_RESP_TYPE_SFT 0 29478c2ecf20Sopenharmony_ci #define CREQ_MODIFY_CC_RESP_TYPE_QP_EVENT 0x38UL 29488c2ecf20Sopenharmony_ci #define CREQ_MODIFY_CC_RESP_RESERVED2_MASK 0xc0UL 29498c2ecf20Sopenharmony_ci #define CREQ_MODIFY_CC_RESP_RESERVED2_SFT 6 29508c2ecf20Sopenharmony_ci u8 status; 29518c2ecf20Sopenharmony_ci __le16 cookie; 29528c2ecf20Sopenharmony_ci __le32 reserved32; 29538c2ecf20Sopenharmony_ci u8 v; 29548c2ecf20Sopenharmony_ci #define CREQ_MODIFY_CC_RESP_V 0x1UL 29558c2ecf20Sopenharmony_ci #define CREQ_MODIFY_CC_RESP_RESERVED7_MASK 0xfeUL 29568c2ecf20Sopenharmony_ci #define CREQ_MODIFY_CC_RESP_RESERVED7_SFT 1 29578c2ecf20Sopenharmony_ci u8 event; 29588c2ecf20Sopenharmony_ci #define CREQ_MODIFY_CC_RESP_EVENT_MODIFY_CC 0x8cUL 29598c2ecf20Sopenharmony_ci __le16 reserved48[3]; 29608c2ecf20Sopenharmony_ci}; 29618c2ecf20Sopenharmony_ci 29628c2ecf20Sopenharmony_ci/* Query congestion control command response (16 bytes) */ 29638c2ecf20Sopenharmony_cistruct creq_query_cc_resp { 29648c2ecf20Sopenharmony_ci u8 type; 29658c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_TYPE_MASK 0x3fUL 29668c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_TYPE_SFT 0 29678c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_TYPE_QP_EVENT 0x38UL 29688c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_RESERVED2_MASK 0xc0UL 29698c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_RESERVED2_SFT 6 29708c2ecf20Sopenharmony_ci u8 status; 29718c2ecf20Sopenharmony_ci __le16 cookie; 29728c2ecf20Sopenharmony_ci __le32 size; 29738c2ecf20Sopenharmony_ci u8 v; 29748c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_V 0x1UL 29758c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_RESERVED7_MASK 0xfeUL 29768c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_RESERVED7_SFT 1 29778c2ecf20Sopenharmony_ci u8 event; 29788c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_EVENT_QUERY_CC 0x8dUL 29798c2ecf20Sopenharmony_ci __le16 reserved48[3]; 29808c2ecf20Sopenharmony_ci}; 29818c2ecf20Sopenharmony_ci 29828c2ecf20Sopenharmony_ci/* Query congestion control command response side buffer structure (32 bytes) */ 29838c2ecf20Sopenharmony_cistruct creq_query_cc_resp_sb { 29848c2ecf20Sopenharmony_ci u8 opcode; 29858c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_SB_OPCODE_QUERY_CC 0x8dUL 29868c2ecf20Sopenharmony_ci u8 status; 29878c2ecf20Sopenharmony_ci __le16 cookie; 29888c2ecf20Sopenharmony_ci __le16 flags; 29898c2ecf20Sopenharmony_ci u8 resp_size; 29908c2ecf20Sopenharmony_ci u8 reserved8; 29918c2ecf20Sopenharmony_ci u8 enable_cc; 29928c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_SB_ENABLE_CC 0x1UL 29938c2ecf20Sopenharmony_ci u8 g; 29948c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_SB_G_MASK 0x7UL 29958c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_SB_G_SFT 0 29968c2ecf20Sopenharmony_ci u8 num_phases_per_state; 29978c2ecf20Sopenharmony_ci __le16 init_cr; 29988c2ecf20Sopenharmony_ci u8 unused_2; 29998c2ecf20Sopenharmony_ci __le16 unused_3; 30008c2ecf20Sopenharmony_ci u8 unused_4; 30018c2ecf20Sopenharmony_ci __le16 init_tr; 30028c2ecf20Sopenharmony_ci u8 tos_dscp_tos_ecn; 30038c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_SB_TOS_ECN_MASK 0x3UL 30048c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_SB_TOS_ECN_SFT 0 30058c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_SB_TOS_DSCP_MASK 0xfcUL 30068c2ecf20Sopenharmony_ci #define CREQ_QUERY_CC_RESP_SB_TOS_DSCP_SFT 2 30078c2ecf20Sopenharmony_ci __le64 reserved64; 30088c2ecf20Sopenharmony_ci __le64 reserved64_1; 30098c2ecf20Sopenharmony_ci}; 30108c2ecf20Sopenharmony_ci 30118c2ecf20Sopenharmony_ci/* creq_query_roce_stats_resp (size:128b/16B) */ 30128c2ecf20Sopenharmony_cistruct creq_query_roce_stats_resp { 30138c2ecf20Sopenharmony_ci u8 type; 30148c2ecf20Sopenharmony_ci #define CREQ_QUERY_ROCE_STATS_RESP_TYPE_MASK 0x3fUL 30158c2ecf20Sopenharmony_ci #define CREQ_QUERY_ROCE_STATS_RESP_TYPE_SFT 0 30168c2ecf20Sopenharmony_ci #define CREQ_QUERY_ROCE_STATS_RESP_TYPE_QP_EVENT 0x38UL 30178c2ecf20Sopenharmony_ci #define CREQ_QUERY_ROCE_STATS_RESP_TYPE_LAST \ 30188c2ecf20Sopenharmony_ci CREQ_QUERY_ROCE_STATS_RESP_TYPE_QP_EVENT 30198c2ecf20Sopenharmony_ci u8 status; 30208c2ecf20Sopenharmony_ci __le16 cookie; 30218c2ecf20Sopenharmony_ci __le32 size; 30228c2ecf20Sopenharmony_ci u8 v; 30238c2ecf20Sopenharmony_ci #define CREQ_QUERY_ROCE_STATS_RESP_V 0x1UL 30248c2ecf20Sopenharmony_ci u8 event; 30258c2ecf20Sopenharmony_ci #define CREQ_QUERY_ROCE_STATS_RESP_EVENT_QUERY_ROCE_STATS 0x8eUL 30268c2ecf20Sopenharmony_ci #define CREQ_QUERY_ROCE_STATS_RESP_EVENT_LAST \ 30278c2ecf20Sopenharmony_ci CREQ_QUERY_ROCE_STATS_RESP_EVENT_QUERY_ROCE_STATS 30288c2ecf20Sopenharmony_ci u8 reserved48[6]; 30298c2ecf20Sopenharmony_ci}; 30308c2ecf20Sopenharmony_ci 30318c2ecf20Sopenharmony_ci/* creq_query_roce_stats_resp_sb (size:2624b/328B) */ 30328c2ecf20Sopenharmony_cistruct creq_query_roce_stats_resp_sb { 30338c2ecf20Sopenharmony_ci u8 opcode; 30348c2ecf20Sopenharmony_ci #define CREQ_QUERY_ROCE_STATS_RESP_SB_OPCODE_QUERY_ROCE_STATS 0x8eUL 30358c2ecf20Sopenharmony_ci #define CREQ_QUERY_ROCE_STATS_RESP_SB_OPCODE_LAST \ 30368c2ecf20Sopenharmony_ci CREQ_QUERY_ROCE_STATS_RESP_SB_OPCODE_QUERY_ROCE_STATS 30378c2ecf20Sopenharmony_ci u8 status; 30388c2ecf20Sopenharmony_ci __le16 cookie; 30398c2ecf20Sopenharmony_ci __le16 flags; 30408c2ecf20Sopenharmony_ci u8 resp_size; 30418c2ecf20Sopenharmony_ci u8 rsvd; 30428c2ecf20Sopenharmony_ci __le32 num_counters; 30438c2ecf20Sopenharmony_ci __le32 rsvd1; 30448c2ecf20Sopenharmony_ci __le64 to_retransmits; 30458c2ecf20Sopenharmony_ci __le64 seq_err_naks_rcvd; 30468c2ecf20Sopenharmony_ci __le64 max_retry_exceeded; 30478c2ecf20Sopenharmony_ci __le64 rnr_naks_rcvd; 30488c2ecf20Sopenharmony_ci __le64 missing_resp; 30498c2ecf20Sopenharmony_ci __le64 unrecoverable_err; 30508c2ecf20Sopenharmony_ci __le64 bad_resp_err; 30518c2ecf20Sopenharmony_ci __le64 local_qp_op_err; 30528c2ecf20Sopenharmony_ci __le64 local_protection_err; 30538c2ecf20Sopenharmony_ci __le64 mem_mgmt_op_err; 30548c2ecf20Sopenharmony_ci __le64 remote_invalid_req_err; 30558c2ecf20Sopenharmony_ci __le64 remote_access_err; 30568c2ecf20Sopenharmony_ci __le64 remote_op_err; 30578c2ecf20Sopenharmony_ci __le64 dup_req; 30588c2ecf20Sopenharmony_ci __le64 res_exceed_max; 30598c2ecf20Sopenharmony_ci __le64 res_length_mismatch; 30608c2ecf20Sopenharmony_ci __le64 res_exceeds_wqe; 30618c2ecf20Sopenharmony_ci __le64 res_opcode_err; 30628c2ecf20Sopenharmony_ci __le64 res_rx_invalid_rkey; 30638c2ecf20Sopenharmony_ci __le64 res_rx_domain_err; 30648c2ecf20Sopenharmony_ci __le64 res_rx_no_perm; 30658c2ecf20Sopenharmony_ci __le64 res_rx_range_err; 30668c2ecf20Sopenharmony_ci __le64 res_tx_invalid_rkey; 30678c2ecf20Sopenharmony_ci __le64 res_tx_domain_err; 30688c2ecf20Sopenharmony_ci __le64 res_tx_no_perm; 30698c2ecf20Sopenharmony_ci __le64 res_tx_range_err; 30708c2ecf20Sopenharmony_ci __le64 res_irrq_oflow; 30718c2ecf20Sopenharmony_ci __le64 res_unsup_opcode; 30728c2ecf20Sopenharmony_ci __le64 res_unaligned_atomic; 30738c2ecf20Sopenharmony_ci __le64 res_rem_inv_err; 30748c2ecf20Sopenharmony_ci __le64 res_mem_error; 30758c2ecf20Sopenharmony_ci __le64 res_srq_err; 30768c2ecf20Sopenharmony_ci __le64 res_cmp_err; 30778c2ecf20Sopenharmony_ci __le64 res_invalid_dup_rkey; 30788c2ecf20Sopenharmony_ci __le64 res_wqe_format_err; 30798c2ecf20Sopenharmony_ci __le64 res_cq_load_err; 30808c2ecf20Sopenharmony_ci __le64 res_srq_load_err; 30818c2ecf20Sopenharmony_ci __le64 res_tx_pci_err; 30828c2ecf20Sopenharmony_ci __le64 res_rx_pci_err; 30838c2ecf20Sopenharmony_ci __le64 res_oos_drop_count; 30848c2ecf20Sopenharmony_ci __le64 active_qp_count_p0; 30858c2ecf20Sopenharmony_ci __le64 active_qp_count_p1; 30868c2ecf20Sopenharmony_ci __le64 active_qp_count_p2; 30878c2ecf20Sopenharmony_ci __le64 active_qp_count_p3; 30888c2ecf20Sopenharmony_ci}; 30898c2ecf20Sopenharmony_ci 30908c2ecf20Sopenharmony_ci/* QP error notification event (16 bytes) */ 30918c2ecf20Sopenharmony_cistruct creq_qp_error_notification { 30928c2ecf20Sopenharmony_ci u8 type; 30938c2ecf20Sopenharmony_ci #define CREQ_QP_ERROR_NOTIFICATION_TYPE_MASK 0x3fUL 30948c2ecf20Sopenharmony_ci #define CREQ_QP_ERROR_NOTIFICATION_TYPE_SFT 0 30958c2ecf20Sopenharmony_ci #define CREQ_QP_ERROR_NOTIFICATION_TYPE_QP_EVENT 0x38UL 30968c2ecf20Sopenharmony_ci #define CREQ_QP_ERROR_NOTIFICATION_RESERVED2_MASK 0xc0UL 30978c2ecf20Sopenharmony_ci #define CREQ_QP_ERROR_NOTIFICATION_RESERVED2_SFT 6 30988c2ecf20Sopenharmony_ci u8 status; 30998c2ecf20Sopenharmony_ci u8 req_slow_path_state; 31008c2ecf20Sopenharmony_ci u8 req_err_state_reason; 31018c2ecf20Sopenharmony_ci __le32 xid; 31028c2ecf20Sopenharmony_ci u8 v; 31038c2ecf20Sopenharmony_ci #define CREQ_QP_ERROR_NOTIFICATION_V 0x1UL 31048c2ecf20Sopenharmony_ci #define CREQ_QP_ERROR_NOTIFICATION_RESERVED7_MASK 0xfeUL 31058c2ecf20Sopenharmony_ci #define CREQ_QP_ERROR_NOTIFICATION_RESERVED7_SFT 1 31068c2ecf20Sopenharmony_ci u8 event; 31078c2ecf20Sopenharmony_ci #define CREQ_QP_ERROR_NOTIFICATION_EVENT_QP_ERROR_NOTIFICATION 0xc0UL 31088c2ecf20Sopenharmony_ci u8 res_slow_path_state; 31098c2ecf20Sopenharmony_ci u8 res_err_state_reason; 31108c2ecf20Sopenharmony_ci __le16 sq_cons_idx; 31118c2ecf20Sopenharmony_ci __le16 rq_cons_idx; 31128c2ecf20Sopenharmony_ci}; 31138c2ecf20Sopenharmony_ci 31148c2ecf20Sopenharmony_ci/* RoCE Slowpath HSI Specification 1.6.0 */ 31158c2ecf20Sopenharmony_ci#define ROCE_SP_HSI_VERSION_MAJOR 1 31168c2ecf20Sopenharmony_ci#define ROCE_SP_HSI_VERSION_MINOR 6 31178c2ecf20Sopenharmony_ci#define ROCE_SP_HSI_VERSION_UPDATE 0 31188c2ecf20Sopenharmony_ci 31198c2ecf20Sopenharmony_ci#define ROCE_SP_HSI_VERSION_STR "1.6.0" 31208c2ecf20Sopenharmony_ci/* 31218c2ecf20Sopenharmony_ci * Following is the signature for ROCE_SP_HSI message field that indicates not 31228c2ecf20Sopenharmony_ci * applicable (All F's). Need to cast it the size of the field if needed. 31238c2ecf20Sopenharmony_ci */ 31248c2ecf20Sopenharmony_ci#define ROCE_SP_HSI_NA_SIGNATURE ((__le32)(-1)) 31258c2ecf20Sopenharmony_ci#endif /* __BNXT_RE_HSI_H__ */ 3126