162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (c) 2020, Mellanox Technologies inc. All rights reserved.
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * This file is IBTA volume 1, chapter 12 declarations:
662306a36Sopenharmony_ci *  CHAPTER 12: COMMUNICATION MANAGEMENT
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci#ifndef _IBTA_VOL1_C12_H_
962306a36Sopenharmony_ci#define _IBTA_VOL1_C12_H_
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#include <rdma/iba.h>
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#define CM_FIELD_BLOC(field_struct, byte_offset, bits_offset, width)           \
1462306a36Sopenharmony_ci	IBA_FIELD_BLOC(field_struct,                                           \
1562306a36Sopenharmony_ci		       (byte_offset + sizeof(struct ib_mad_hdr)), bits_offset, \
1662306a36Sopenharmony_ci		       width)
1762306a36Sopenharmony_ci#define CM_FIELD8_LOC(field_struct, byte_offset, width)                        \
1862306a36Sopenharmony_ci	IBA_FIELD8_LOC(field_struct,                                           \
1962306a36Sopenharmony_ci		       (byte_offset + sizeof(struct ib_mad_hdr)), width)
2062306a36Sopenharmony_ci#define CM_FIELD16_LOC(field_struct, byte_offset, width)                       \
2162306a36Sopenharmony_ci	IBA_FIELD16_LOC(field_struct,                                          \
2262306a36Sopenharmony_ci			(byte_offset + sizeof(struct ib_mad_hdr)), width)
2362306a36Sopenharmony_ci#define CM_FIELD32_LOC(field_struct, byte_offset, width)                       \
2462306a36Sopenharmony_ci	IBA_FIELD32_LOC(field_struct,                                          \
2562306a36Sopenharmony_ci			(byte_offset + sizeof(struct ib_mad_hdr)), width)
2662306a36Sopenharmony_ci#define CM_FIELD64_LOC(field_struct, byte_offset)                              \
2762306a36Sopenharmony_ci	IBA_FIELD64_LOC(field_struct, (byte_offset + sizeof(struct ib_mad_hdr)))
2862306a36Sopenharmony_ci#define CM_FIELD_MLOC(field_struct, byte_offset, width, type)                  \
2962306a36Sopenharmony_ci	IBA_FIELD_MLOC(field_struct,                                           \
3062306a36Sopenharmony_ci		       (byte_offset + sizeof(struct ib_mad_hdr)), width, type)
3162306a36Sopenharmony_ci#define CM_STRUCT(field_struct, total_len)                                     \
3262306a36Sopenharmony_ci	field_struct                                                           \
3362306a36Sopenharmony_ci	{                                                                      \
3462306a36Sopenharmony_ci		struct ib_mad_hdr hdr;                                         \
3562306a36Sopenharmony_ci		u32 _data[(total_len) / 32 +                                   \
3662306a36Sopenharmony_ci			  BUILD_BUG_ON_ZERO((total_len) % 32 != 0)];           \
3762306a36Sopenharmony_ci	}
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci/* Table 106 REQ Message Contents */
4062306a36Sopenharmony_ci#define CM_REQ_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_req_msg, 0, 32)
4162306a36Sopenharmony_ci#define CM_REQ_VENDOR_ID CM_FIELD32_LOC(struct cm_req_msg, 5, 24)
4262306a36Sopenharmony_ci#define CM_REQ_SERVICE_ID CM_FIELD64_LOC(struct cm_req_msg, 8)
4362306a36Sopenharmony_ci#define CM_REQ_LOCAL_CA_GUID CM_FIELD64_LOC(struct cm_req_msg, 16)
4462306a36Sopenharmony_ci#define CM_REQ_LOCAL_Q_KEY CM_FIELD32_LOC(struct cm_req_msg, 28, 32)
4562306a36Sopenharmony_ci#define CM_REQ_LOCAL_QPN CM_FIELD32_LOC(struct cm_req_msg, 32, 24)
4662306a36Sopenharmony_ci#define CM_REQ_RESPONDER_RESOURCES CM_FIELD8_LOC(struct cm_req_msg, 35, 8)
4762306a36Sopenharmony_ci#define CM_REQ_LOCAL_EECN CM_FIELD32_LOC(struct cm_req_msg, 36, 24)
4862306a36Sopenharmony_ci#define CM_REQ_INITIATOR_DEPTH CM_FIELD8_LOC(struct cm_req_msg, 39, 8)
4962306a36Sopenharmony_ci#define CM_REQ_REMOTE_EECN CM_FIELD32_LOC(struct cm_req_msg, 40, 24)
5062306a36Sopenharmony_ci#define CM_REQ_REMOTE_CM_RESPONSE_TIMEOUT                                      \
5162306a36Sopenharmony_ci	CM_FIELD8_LOC(struct cm_req_msg, 43, 5)
5262306a36Sopenharmony_ci#define CM_REQ_TRANSPORT_SERVICE_TYPE CM_FIELD_BLOC(struct cm_req_msg, 43, 5, 2)
5362306a36Sopenharmony_ci#define CM_REQ_END_TO_END_FLOW_CONTROL                                         \
5462306a36Sopenharmony_ci	CM_FIELD_BLOC(struct cm_req_msg, 43, 7, 1)
5562306a36Sopenharmony_ci#define CM_REQ_STARTING_PSN CM_FIELD32_LOC(struct cm_req_msg, 44, 24)
5662306a36Sopenharmony_ci#define CM_REQ_LOCAL_CM_RESPONSE_TIMEOUT CM_FIELD8_LOC(struct cm_req_msg, 47, 5)
5762306a36Sopenharmony_ci#define CM_REQ_RETRY_COUNT CM_FIELD_BLOC(struct cm_req_msg, 47, 5, 3)
5862306a36Sopenharmony_ci#define CM_REQ_PARTITION_KEY CM_FIELD16_LOC(struct cm_req_msg, 48, 16)
5962306a36Sopenharmony_ci#define CM_REQ_PATH_PACKET_PAYLOAD_MTU CM_FIELD8_LOC(struct cm_req_msg, 50, 4)
6062306a36Sopenharmony_ci#define CM_REQ_RDC_EXISTS CM_FIELD_BLOC(struct cm_req_msg, 50, 4, 1)
6162306a36Sopenharmony_ci#define CM_REQ_RNR_RETRY_COUNT CM_FIELD_BLOC(struct cm_req_msg, 50, 5, 3)
6262306a36Sopenharmony_ci#define CM_REQ_MAX_CM_RETRIES CM_FIELD8_LOC(struct cm_req_msg, 51, 4)
6362306a36Sopenharmony_ci#define CM_REQ_SRQ CM_FIELD_BLOC(struct cm_req_msg, 51, 4, 1)
6462306a36Sopenharmony_ci#define CM_REQ_EXTENDED_TRANSPORT_TYPE                                         \
6562306a36Sopenharmony_ci	CM_FIELD_BLOC(struct cm_req_msg, 51, 5, 3)
6662306a36Sopenharmony_ci#define CM_REQ_PRIMARY_LOCAL_PORT_LID CM_FIELD16_LOC(struct cm_req_msg, 52, 16)
6762306a36Sopenharmony_ci#define CM_REQ_PRIMARY_REMOTE_PORT_LID CM_FIELD16_LOC(struct cm_req_msg, 54, 16)
6862306a36Sopenharmony_ci#define CM_REQ_PRIMARY_LOCAL_PORT_GID                                          \
6962306a36Sopenharmony_ci	CM_FIELD_MLOC(struct cm_req_msg, 56, 128, union ib_gid)
7062306a36Sopenharmony_ci#define CM_REQ_PRIMARY_REMOTE_PORT_GID                                         \
7162306a36Sopenharmony_ci	CM_FIELD_MLOC(struct cm_req_msg, 72, 128, union ib_gid)
7262306a36Sopenharmony_ci#define CM_REQ_PRIMARY_FLOW_LABEL CM_FIELD32_LOC(struct cm_req_msg, 88, 20)
7362306a36Sopenharmony_ci#define CM_REQ_PRIMARY_PACKET_RATE CM_FIELD_BLOC(struct cm_req_msg, 91, 2, 6)
7462306a36Sopenharmony_ci#define CM_REQ_PRIMARY_TRAFFIC_CLASS CM_FIELD8_LOC(struct cm_req_msg, 92, 8)
7562306a36Sopenharmony_ci#define CM_REQ_PRIMARY_HOP_LIMIT CM_FIELD8_LOC(struct cm_req_msg, 93, 8)
7662306a36Sopenharmony_ci#define CM_REQ_PRIMARY_SL CM_FIELD8_LOC(struct cm_req_msg, 94, 4)
7762306a36Sopenharmony_ci#define CM_REQ_PRIMARY_SUBNET_LOCAL CM_FIELD_BLOC(struct cm_req_msg, 94, 4, 1)
7862306a36Sopenharmony_ci#define CM_REQ_PRIMARY_LOCAL_ACK_TIMEOUT CM_FIELD8_LOC(struct cm_req_msg, 95, 5)
7962306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_LOCAL_PORT_LID                                        \
8062306a36Sopenharmony_ci	CM_FIELD16_LOC(struct cm_req_msg, 96, 16)
8162306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_REMOTE_PORT_LID                                       \
8262306a36Sopenharmony_ci	CM_FIELD16_LOC(struct cm_req_msg, 98, 16)
8362306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_LOCAL_PORT_GID                                        \
8462306a36Sopenharmony_ci	CM_FIELD_MLOC(struct cm_req_msg, 100, 128, union ib_gid)
8562306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_REMOTE_PORT_GID                                       \
8662306a36Sopenharmony_ci	CM_FIELD_MLOC(struct cm_req_msg, 116, 128, union ib_gid)
8762306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_FLOW_LABEL CM_FIELD32_LOC(struct cm_req_msg, 132, 20)
8862306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_PACKET_RATE CM_FIELD_BLOC(struct cm_req_msg, 135, 2, 6)
8962306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_TRAFFIC_CLASS CM_FIELD8_LOC(struct cm_req_msg, 136, 8)
9062306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_HOP_LIMIT CM_FIELD8_LOC(struct cm_req_msg, 137, 8)
9162306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_SL CM_FIELD8_LOC(struct cm_req_msg, 138, 4)
9262306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_SUBNET_LOCAL                                          \
9362306a36Sopenharmony_ci	CM_FIELD_BLOC(struct cm_req_msg, 138, 4, 1)
9462306a36Sopenharmony_ci#define CM_REQ_ALTERNATE_LOCAL_ACK_TIMEOUT                                     \
9562306a36Sopenharmony_ci	CM_FIELD8_LOC(struct cm_req_msg, 139, 5)
9662306a36Sopenharmony_ci#define CM_REQ_SAP_SUPPORTED CM_FIELD_BLOC(struct cm_req_msg, 139, 5, 1)
9762306a36Sopenharmony_ci#define CM_REQ_PRIVATE_DATA CM_FIELD_MLOC(struct cm_req_msg, 140, 736, void)
9862306a36Sopenharmony_ciCM_STRUCT(struct cm_req_msg, 140 * 8 + 736);
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ci/* Table 107 MRA Message Contents */
10162306a36Sopenharmony_ci#define CM_MRA_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_mra_msg, 0, 32)
10262306a36Sopenharmony_ci#define CM_MRA_REMOTE_COMM_ID CM_FIELD32_LOC(struct cm_mra_msg, 4, 32)
10362306a36Sopenharmony_ci#define CM_MRA_MESSAGE_MRAED CM_FIELD8_LOC(struct cm_mra_msg, 8, 2)
10462306a36Sopenharmony_ci#define CM_MRA_SERVICE_TIMEOUT CM_FIELD8_LOC(struct cm_mra_msg, 9, 5)
10562306a36Sopenharmony_ci#define CM_MRA_PRIVATE_DATA CM_FIELD_MLOC(struct cm_mra_msg, 10, 1776, void)
10662306a36Sopenharmony_ciCM_STRUCT(struct cm_mra_msg, 10 * 8 + 1776);
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci/* Table 108 REJ Message Contents */
10962306a36Sopenharmony_ci#define CM_REJ_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_rej_msg, 0, 32)
11062306a36Sopenharmony_ci#define CM_REJ_REMOTE_COMM_ID CM_FIELD32_LOC(struct cm_rej_msg, 4, 32)
11162306a36Sopenharmony_ci#define CM_REJ_MESSAGE_REJECTED CM_FIELD8_LOC(struct cm_rej_msg, 8, 2)
11262306a36Sopenharmony_ci#define CM_REJ_REJECTED_INFO_LENGTH CM_FIELD8_LOC(struct cm_rej_msg, 9, 7)
11362306a36Sopenharmony_ci#define CM_REJ_REASON CM_FIELD16_LOC(struct cm_rej_msg, 10, 16)
11462306a36Sopenharmony_ci#define CM_REJ_ARI CM_FIELD_MLOC(struct cm_rej_msg, 12, 576, void)
11562306a36Sopenharmony_ci#define CM_REJ_PRIVATE_DATA CM_FIELD_MLOC(struct cm_rej_msg, 84, 1184, void)
11662306a36Sopenharmony_ciCM_STRUCT(struct cm_rej_msg, 84 * 8 + 1184);
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ci/* Table 110 REP Message Contents */
11962306a36Sopenharmony_ci#define CM_REP_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_rep_msg, 0, 32)
12062306a36Sopenharmony_ci#define CM_REP_REMOTE_COMM_ID CM_FIELD32_LOC(struct cm_rep_msg, 4, 32)
12162306a36Sopenharmony_ci#define CM_REP_LOCAL_Q_KEY CM_FIELD32_LOC(struct cm_rep_msg, 8, 32)
12262306a36Sopenharmony_ci#define CM_REP_LOCAL_QPN CM_FIELD32_LOC(struct cm_rep_msg, 12, 24)
12362306a36Sopenharmony_ci#define CM_REP_VENDOR_ID_H CM_FIELD8_LOC(struct cm_rep_msg, 15, 8)
12462306a36Sopenharmony_ci#define CM_REP_LOCAL_EE_CONTEXT_NUMBER CM_FIELD32_LOC(struct cm_rep_msg, 16, 24)
12562306a36Sopenharmony_ci#define CM_REP_VENDOR_ID_M CM_FIELD8_LOC(struct cm_rep_msg, 19, 8)
12662306a36Sopenharmony_ci#define CM_REP_STARTING_PSN CM_FIELD32_LOC(struct cm_rep_msg, 20, 24)
12762306a36Sopenharmony_ci#define CM_REP_VENDOR_ID_L CM_FIELD8_LOC(struct cm_rep_msg, 23, 8)
12862306a36Sopenharmony_ci#define CM_REP_RESPONDER_RESOURCES CM_FIELD8_LOC(struct cm_rep_msg, 24, 8)
12962306a36Sopenharmony_ci#define CM_REP_INITIATOR_DEPTH CM_FIELD8_LOC(struct cm_rep_msg, 25, 8)
13062306a36Sopenharmony_ci#define CM_REP_TARGET_ACK_DELAY CM_FIELD8_LOC(struct cm_rep_msg, 26, 5)
13162306a36Sopenharmony_ci#define CM_REP_FAILOVER_ACCEPTED CM_FIELD_BLOC(struct cm_rep_msg, 26, 5, 2)
13262306a36Sopenharmony_ci#define CM_REP_END_TO_END_FLOW_CONTROL                                         \
13362306a36Sopenharmony_ci	CM_FIELD_BLOC(struct cm_rep_msg, 26, 7, 1)
13462306a36Sopenharmony_ci#define CM_REP_RNR_RETRY_COUNT CM_FIELD8_LOC(struct cm_rep_msg, 27, 3)
13562306a36Sopenharmony_ci#define CM_REP_SRQ CM_FIELD_BLOC(struct cm_rep_msg, 27, 3, 1)
13662306a36Sopenharmony_ci#define CM_REP_LOCAL_CA_GUID CM_FIELD64_LOC(struct cm_rep_msg, 28)
13762306a36Sopenharmony_ci#define CM_REP_PRIVATE_DATA CM_FIELD_MLOC(struct cm_rep_msg, 36, 1568, void)
13862306a36Sopenharmony_ciCM_STRUCT(struct cm_rep_msg, 36 * 8 + 1568);
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ci/* Table 111 RTU Message Contents */
14162306a36Sopenharmony_ci#define CM_RTU_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_rtu_msg, 0, 32)
14262306a36Sopenharmony_ci#define CM_RTU_REMOTE_COMM_ID CM_FIELD32_LOC(struct cm_rtu_msg, 4, 32)
14362306a36Sopenharmony_ci#define CM_RTU_PRIVATE_DATA CM_FIELD_MLOC(struct cm_rtu_msg, 8, 1792, void)
14462306a36Sopenharmony_ciCM_STRUCT(struct cm_rtu_msg, 8 * 8 + 1792);
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ci/* Table 112 DREQ Message Contents */
14762306a36Sopenharmony_ci#define CM_DREQ_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_dreq_msg, 0, 32)
14862306a36Sopenharmony_ci#define CM_DREQ_REMOTE_COMM_ID CM_FIELD32_LOC(struct cm_dreq_msg, 4, 32)
14962306a36Sopenharmony_ci#define CM_DREQ_REMOTE_QPN_EECN CM_FIELD32_LOC(struct cm_dreq_msg, 8, 24)
15062306a36Sopenharmony_ci#define CM_DREQ_PRIVATE_DATA CM_FIELD_MLOC(struct cm_dreq_msg, 12, 1760, void)
15162306a36Sopenharmony_ciCM_STRUCT(struct cm_dreq_msg, 12 * 8 + 1760);
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ci/* Table 113 DREP Message Contents */
15462306a36Sopenharmony_ci#define CM_DREP_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_drep_msg, 0, 32)
15562306a36Sopenharmony_ci#define CM_DREP_REMOTE_COMM_ID CM_FIELD32_LOC(struct cm_drep_msg, 4, 32)
15662306a36Sopenharmony_ci#define CM_DREP_PRIVATE_DATA CM_FIELD_MLOC(struct cm_drep_msg, 8, 1792, void)
15762306a36Sopenharmony_ciCM_STRUCT(struct cm_drep_msg, 8 * 8 + 1792);
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci/* Table 115 LAP Message Contents */
16062306a36Sopenharmony_ci#define CM_LAP_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_lap_msg, 0, 32)
16162306a36Sopenharmony_ci#define CM_LAP_REMOTE_COMM_ID CM_FIELD32_LOC(struct cm_lap_msg, 4, 32)
16262306a36Sopenharmony_ci#define CM_LAP_REMOTE_QPN_EECN CM_FIELD32_LOC(struct cm_lap_msg, 12, 24)
16362306a36Sopenharmony_ci#define CM_LAP_REMOTE_CM_RESPONSE_TIMEOUT                                      \
16462306a36Sopenharmony_ci	CM_FIELD8_LOC(struct cm_lap_msg, 15, 5)
16562306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_LOCAL_PORT_LID                                        \
16662306a36Sopenharmony_ci	CM_FIELD16_LOC(struct cm_lap_msg, 20, 16)
16762306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_REMOTE_PORT_LID                                       \
16862306a36Sopenharmony_ci	CM_FIELD16_LOC(struct cm_lap_msg, 22, 16)
16962306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_LOCAL_PORT_GID                                        \
17062306a36Sopenharmony_ci	CM_FIELD_MLOC(struct cm_lap_msg, 24, 128, union ib_gid)
17162306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_REMOTE_PORT_GID                                       \
17262306a36Sopenharmony_ci	CM_FIELD_MLOC(struct cm_lap_msg, 40, 128, union ib_gid)
17362306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_FLOW_LABEL CM_FIELD32_LOC(struct cm_lap_msg, 56, 20)
17462306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_TRAFFIC_CLASS CM_FIELD8_LOC(struct cm_lap_msg, 59, 8)
17562306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_HOP_LIMIT CM_FIELD8_LOC(struct cm_lap_msg, 60, 8)
17662306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_PACKET_RATE CM_FIELD_BLOC(struct cm_lap_msg, 61, 2, 6)
17762306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_SL CM_FIELD8_LOC(struct cm_lap_msg, 62, 4)
17862306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_SUBNET_LOCAL CM_FIELD_BLOC(struct cm_lap_msg, 62, 4, 1)
17962306a36Sopenharmony_ci#define CM_LAP_ALTERNATE_LOCAL_ACK_TIMEOUT                                     \
18062306a36Sopenharmony_ci	CM_FIELD8_LOC(struct cm_lap_msg, 63, 5)
18162306a36Sopenharmony_ci#define CM_LAP_PRIVATE_DATA CM_FIELD_MLOC(struct cm_lap_msg, 64, 1344, void)
18262306a36Sopenharmony_ciCM_STRUCT(struct cm_lap_msg, 64 * 8 + 1344);
18362306a36Sopenharmony_ci
18462306a36Sopenharmony_ci/* Table 116 APR Message Contents */
18562306a36Sopenharmony_ci#define CM_APR_LOCAL_COMM_ID CM_FIELD32_LOC(struct cm_apr_msg, 0, 32)
18662306a36Sopenharmony_ci#define CM_APR_REMOTE_COMM_ID CM_FIELD32_LOC(struct cm_apr_msg, 4, 32)
18762306a36Sopenharmony_ci#define CM_APR_ADDITIONAL_INFORMATION_LENGTH                                   \
18862306a36Sopenharmony_ci	CM_FIELD8_LOC(struct cm_apr_msg, 8, 8)
18962306a36Sopenharmony_ci#define CM_APR_AR_STATUS CM_FIELD8_LOC(struct cm_apr_msg, 9, 8)
19062306a36Sopenharmony_ci#define CM_APR_ADDITIONAL_INFORMATION                                          \
19162306a36Sopenharmony_ci	CM_FIELD_MLOC(struct cm_apr_msg, 12, 576, void)
19262306a36Sopenharmony_ci#define CM_APR_PRIVATE_DATA CM_FIELD_MLOC(struct cm_apr_msg, 84, 1184, void)
19362306a36Sopenharmony_ciCM_STRUCT(struct cm_apr_msg, 84 * 8 + 1184);
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_ci/* Table 119 SIDR_REQ Message Contents */
19662306a36Sopenharmony_ci#define CM_SIDR_REQ_REQUESTID CM_FIELD32_LOC(struct cm_sidr_req_msg, 0, 32)
19762306a36Sopenharmony_ci#define CM_SIDR_REQ_PARTITION_KEY CM_FIELD16_LOC(struct cm_sidr_req_msg, 4, 16)
19862306a36Sopenharmony_ci#define CM_SIDR_REQ_SERVICEID CM_FIELD64_LOC(struct cm_sidr_req_msg, 8)
19962306a36Sopenharmony_ci#define CM_SIDR_REQ_PRIVATE_DATA                                               \
20062306a36Sopenharmony_ci	CM_FIELD_MLOC(struct cm_sidr_req_msg, 16, 1728, void)
20162306a36Sopenharmony_ciCM_STRUCT(struct cm_sidr_req_msg, 16 * 8 + 1728);
20262306a36Sopenharmony_ci
20362306a36Sopenharmony_ci/* Table 120 SIDR_REP Message Contents */
20462306a36Sopenharmony_ci#define CM_SIDR_REP_REQUESTID CM_FIELD32_LOC(struct cm_sidr_rep_msg, 0, 32)
20562306a36Sopenharmony_ci#define CM_SIDR_REP_STATUS CM_FIELD8_LOC(struct cm_sidr_rep_msg, 4, 8)
20662306a36Sopenharmony_ci#define CM_SIDR_REP_ADDITIONAL_INFORMATION_LENGTH                              \
20762306a36Sopenharmony_ci	CM_FIELD8_LOC(struct cm_sidr_rep_msg, 5, 8)
20862306a36Sopenharmony_ci#define CM_SIDR_REP_VENDOR_ID_H CM_FIELD16_LOC(struct cm_sidr_rep_msg, 6, 16)
20962306a36Sopenharmony_ci#define CM_SIDR_REP_QPN CM_FIELD32_LOC(struct cm_sidr_rep_msg, 8, 24)
21062306a36Sopenharmony_ci#define CM_SIDR_REP_VENDOR_ID_L CM_FIELD8_LOC(struct cm_sidr_rep_msg, 11, 8)
21162306a36Sopenharmony_ci#define CM_SIDR_REP_SERVICEID CM_FIELD64_LOC(struct cm_sidr_rep_msg, 12)
21262306a36Sopenharmony_ci#define CM_SIDR_REP_Q_KEY CM_FIELD32_LOC(struct cm_sidr_rep_msg, 20, 32)
21362306a36Sopenharmony_ci#define CM_SIDR_REP_ADDITIONAL_INFORMATION                                     \
21462306a36Sopenharmony_ci	CM_FIELD_MLOC(struct cm_sidr_rep_msg, 24, 576, void)
21562306a36Sopenharmony_ci#define CM_SIDR_REP_PRIVATE_DATA                                               \
21662306a36Sopenharmony_ci	CM_FIELD_MLOC(struct cm_sidr_rep_msg, 96, 1088, void)
21762306a36Sopenharmony_ciCM_STRUCT(struct cm_sidr_rep_msg, 96 * 8 + 1088);
21862306a36Sopenharmony_ci
21962306a36Sopenharmony_ci#endif /* _IBTA_VOL1_C12_H_ */
220