Lines Matching +full:smc +full:- +full:id

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Shared Memory Communications over RDMA (SMC-R) and RoCE
17 #include <linux/smc.h>
19 #include "smc.h"
27 #define SMC_TYPE_R 0 /* SMC-R only */
28 #define SMC_TYPE_D 1 /* SMC-D only */
29 #define SMC_TYPE_N 2 /* neither SMC-R nor SMC-D */
30 #define SMC_TYPE_B 3 /* SMC-R and SMC-D */
37 #define SMC_CLC_DECL_PEERNOSMC 0x03010000 /* peer did not indicate SMC */
39 #define SMC_CLC_DECL_NOSMCDEV 0x03030000 /* no SMC device found (R or D) */
40 #define SMC_CLC_DECL_NOSMCDDEV 0x03030001 /* no SMC-D device found */
41 #define SMC_CLC_DECL_NOSMCRDEV 0x03030002 /* no SMC-R device found */
44 #define SMC_CLC_DECL_NOV2DEXT 0x03030005 /* peer sent no clc SMC-Dv2 ext. */
46 #define SMC_CLC_DECL_NOSMCD2DEV 0x03030007 /* no SMC-Dv2 device found */
51 #define SMC_CLC_DECL_MODEUNSUPP 0x03040000 /* smc modes do not match (R or D)*/
55 #define SMC_CLC_DECL_GETVLANERR 0x03080000 /* err to get vlan id of ip device*/
56 #define SMC_CLC_DECL_ISMVLANERR 0x03090000 /* err to reg vlan id on ism dev */
57 #define SMC_CLC_DECL_NOACTLINK 0x030a0000 /* no active smc-r link in lgr */
58 #define SMC_CLC_DECL_NOSRVLINK 0x030b0000 /* SMC-R link from srv not found */
59 #define SMC_CLC_DECL_VERSMISMAT 0x030c0000 /* SMC version mismatch */
60 #define SMC_CLC_DECL_MAX_DMB 0x030d0000 /* SMC-D DMB limit exceeded */
61 #define SMC_CLC_DECL_NOROUTE 0x030e0000 /* SMC-Rv2 conn. no route to peer */
62 #define SMC_CLC_DECL_NOINDIRECT 0x030f0000 /* SMC-Rv2 conn. indirect mismatch*/
92 u8 id_for_peer[SMC_SYSTEMID_LEN]; /* unique system id */
125 __be16 smcd_v2_ext_offset; /* SMC-Dv2 Extension Offset */
158 struct smc_clc_msg_smcd { /* SMC-D GID information */
160 __be16 v2_ext_offset; /* SMC Version 2 Extension Offset */
185 #define SMCD_CLC_MAX_V2_GID_ENTRIES 8 /* max # of CHID-GID entries in CLC
186 * proposal SMC-Dv2 extension.
188 * each Emulated-ISM takes two entries
209 __be32 rmbe_alert_token; /* unique connection id */
262 u8 max_conns; /* for SMC-R only */
263 u8 max_links; /* for SMC-R only */
265 u8 reserved3[2]; /* for SMC-D only */
284 struct { /* SMC-R */
291 struct { /* SMC-D */
339 u16 offset = ntohs(pclc->iparea_offset); in smc_clc_proposal_get_prefix()
368 /* get SMC-D info from proposal message */
372 if (smcd_indicated(prop->hdr.typev1) && in smc_get_clc_msg_smcd()
373 ntohs(prop->iparea_offset) != sizeof(struct smc_clc_msg_smcd)) in smc_get_clc_msg_smcd()
385 max_offset = offsetof(struct smc_clc_msg_proposal_area, pclc_v2_ext) - in smc_get_clc_v2_ext()
386 offsetof(struct smc_clc_msg_proposal_area, pclc_smcd) - in smc_get_clc_v2_ext()
389 if (!prop_smcd || !ntohs(prop_smcd->v2_ext_offset) || in smc_get_clc_v2_ext()
390 ntohs(prop_smcd->v2_ext_offset) > max_offset) in smc_get_clc_v2_ext()
396 sizeof(prop_smcd->v2_ext_offset) + in smc_get_clc_v2_ext()
397 ntohs(prop_smcd->v2_ext_offset)); in smc_get_clc_v2_ext()
403 u16 max_offset = offsetof(struct smc_clc_msg_proposal_area, pclc_smcd_v2_ext) - in smc_get_clc_smcd_v2_ext()
404 offsetof(struct smc_clc_msg_proposal_area, pclc_v2_ext) - in smc_get_clc_smcd_v2_ext()
405 offsetof(struct smc_clc_v2_extension, hdr) - in smc_get_clc_smcd_v2_ext()
410 if (!ntohs(prop_v2ext->hdr.smcd_v2_ext_offset) || in smc_get_clc_smcd_v2_ext()
411 ntohs(prop_v2ext->hdr.smcd_v2_ext_offset) > max_offset) in smc_get_clc_smcd_v2_ext()
418 sizeof(prop_v2ext->hdr.smcd_v2_ext_offset) + in smc_get_clc_smcd_v2_ext()
419 ntohs(prop_v2ext->hdr.smcd_v2_ext_offset)); in smc_get_clc_smcd_v2_ext()
428 if (clc->hdr.version == SMC_V1 || in smc_get_clc_first_contact_ext()
429 !(clc->hdr.typev2 & SMC_FIRST_CONTACT_MASK)) in smc_get_clc_first_contact_ext()
447 int smc_clc_wait_msg(struct smc_sock *smc, void *buf, int buflen,
449 int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info, u8 version);
450 int smc_clc_send_proposal(struct smc_sock *smc, struct smc_init_info *ini);
451 int smc_clc_send_confirm(struct smc_sock *smc, bool clnt_first_contact,
453 int smc_clc_send_accept(struct smc_sock *smc, bool srv_first_contact,
455 int smc_clc_srv_v2x_features_validate(struct smc_sock *smc,