Lines Matching +full:smc +full:- +full:id
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Shared Memory Communications over RDMA (SMC-R) and RoCE
18 #include "smc.h"
25 #define SMC_TYPE_R 0 /* SMC-R only */
26 #define SMC_TYPE_D 1 /* SMC-D only */
27 #define SMC_TYPE_N 2 /* neither SMC-R nor SMC-D */
28 #define SMC_TYPE_B 3 /* SMC-R and SMC-D */
35 #define SMC_CLC_DECL_PEERNOSMC 0x03010000 /* peer did not indicate SMC */
37 #define SMC_CLC_DECL_NOSMCDEV 0x03030000 /* no SMC device found (R or D) */
38 #define SMC_CLC_DECL_NOSMCDDEV 0x03030001 /* no SMC-D device found */
39 #define SMC_CLC_DECL_NOSMCRDEV 0x03030002 /* no SMC-R device found */
42 #define SMC_CLC_DECL_NOV2DEXT 0x03030005 /* peer sent no clc SMC-Dv2 ext. */
44 #define SMC_CLC_DECL_NOSMCD2DEV 0x03030007 /* no SMC-Dv2 device found */
45 #define SMC_CLC_DECL_MODEUNSUPP 0x03040000 /* smc modes do not match (R or D)*/
49 #define SMC_CLC_DECL_GETVLANERR 0x03080000 /* err to get vlan id of ip device*/
50 #define SMC_CLC_DECL_ISMVLANERR 0x03090000 /* err to reg vlan id on ism dev */
51 #define SMC_CLC_DECL_NOACTLINK 0x030a0000 /* no active smc-r link in lgr */
52 #define SMC_CLC_DECL_NOSRVLINK 0x030b0000 /* SMC-R link from srv not found */
53 #define SMC_CLC_DECL_VERSMISMAT 0x030c0000 /* SMC version mismatch */
54 #define SMC_CLC_DECL_MAX_DMB 0x030d0000 /* SMC-D DMB limit exceeded */
84 u8 id_for_peer[SMC_SYSTEMID_LEN]; /* unique system id */
117 __be16 smcd_v2_ext_offset; /* SMC-Dv2 Extension Offset */
142 struct smc_clc_msg_smcd { /* SMC-D GID information */
144 __be16 v2_ext_offset; /* SMC Version 2 Extension Offset */
178 __be32 rmbe_alert_token; /* unique connection id */
227 struct smcr_clc_msg_accept_confirm r0; /* SMC-R */
228 struct { /* SMC-D */
238 struct smcr_clc_msg_accept_confirm r0; /* SMC-R */
239 struct { /* SMC-D */
268 ((u8 *)pclc + sizeof(*pclc) + ntohs(pclc->iparea_offset)); in smc_clc_proposal_get_prefix()
281 /* get SMC-D info from proposal message */
285 if (smcd_indicated(prop->hdr.typev1) && in smc_get_clc_msg_smcd()
286 ntohs(prop->iparea_offset) != sizeof(struct smc_clc_msg_smcd)) in smc_get_clc_msg_smcd()
297 if (!prop_smcd || !ntohs(prop_smcd->v2_ext_offset)) in smc_get_clc_v2_ext()
303 sizeof(prop_smcd->v2_ext_offset) + in smc_get_clc_v2_ext()
304 ntohs(prop_smcd->v2_ext_offset)); in smc_get_clc_v2_ext()
312 if (!ntohs(prop_v2ext->hdr.smcd_v2_ext_offset)) in smc_get_clc_smcd_v2_ext()
319 sizeof(prop_v2ext->hdr.smcd_v2_ext_offset) + in smc_get_clc_smcd_v2_ext()
320 ntohs(prop_v2ext->hdr.smcd_v2_ext_offset)); in smc_get_clc_smcd_v2_ext()
328 int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen,
330 int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info, u8 version);
331 int smc_clc_send_proposal(struct smc_sock *smc, struct smc_init_info *ini);
332 int smc_clc_send_confirm(struct smc_sock *smc, bool clnt_first_contact,
334 int smc_clc_send_accept(struct smc_sock *smc, bool srv_first_contact,