net/smc/smc_clc.h
Source file repositories/reference/linux-study-clean/net/smc/smc_clc.h
File Facts
- System
- Linux kernel
- Corpus path
net/smc/smc_clc.h- Extension
.h- Size
- 16436 bytes
- Lines
- 478
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
rdma/ib_verbs.hlinux/smc.hsmc.hsmc_netlink.h
Detected Declarations
struct smc_clc_msg_hdrstruct smc_clc_msg_trailstruct smc_clc_msg_localstruct smc_clc_ipv6_prefixstruct smc_clc_v2_flagstruct smc_clc_v2_flagstruct smc_clnt_opts_area_hdrstruct smc_clc_smcd_gid_chidstruct smc_clc_v2_extensionstruct smc_clc_msg_proposal_prefixstruct smc_clc_msg_smcdstruct smc_clc_smcd_v2_extensionstruct smc_clc_msg_proposalstruct smc_clc_msg_proposal_areastruct smcr_clc_msg_accept_confirmstruct smcd_clc_msg_accept_confirm_commonstruct smc_clc_first_contact_extstruct smc_clc_first_contact_ext_v2xstruct smc_clc_fce_gid_extstruct smc_clc_msg_accept_confirmstruct smc_clc_msg_declinestruct smc_clc_msg_decline_v2struct smcd_devstruct smc_init_infofunction smc_clc_proposal_get_prefixfunction smcr_indicatedfunction smcd_indicatedfunction smc_indicated_typefunction smc_get_clc_msg_smcdfunction smc_get_clc_v2_extfunction smc_get_clc_smcd_v2_extfunction smc_get_clc_first_contact_ext
Annotated Snippet
struct smc_clc_msg_hdr { /* header1 of clc messages */
u8 eyecatcher[4]; /* eye catcher */
u8 type; /* proposal / accept / confirm / decline */
__be16 length;
#if defined(__BIG_ENDIAN_BITFIELD)
u8 version : 4,
typev2 : 2,
typev1 : 2;
#elif defined(__LITTLE_ENDIAN_BITFIELD)
u8 typev1 : 2,
typev2 : 2,
version : 4;
#endif
} __packed; /* format defined in RFC7609 */
struct smc_clc_msg_trail { /* trailer of clc messages */
u8 eyecatcher[4];
};
struct smc_clc_msg_local { /* header2 of clc messages */
u8 id_for_peer[SMC_SYSTEMID_LEN]; /* unique system id */
u8 gid[16]; /* gid of ib_device port */
u8 mac[6]; /* mac of ib_device port */
};
/* Struct would be 4 byte aligned, but it is used in an array that is sent
* to peers and must conform to RFC7609, hence we need to use packed here.
*/
struct smc_clc_ipv6_prefix {
struct in6_addr prefix;
u8 prefix_len;
} __packed; /* format defined in RFC7609 */
#if defined(__BIG_ENDIAN_BITFIELD)
struct smc_clc_v2_flag {
u8 release : 4,
rsvd : 3,
seid : 1;
};
#elif defined(__LITTLE_ENDIAN_BITFIELD)
struct smc_clc_v2_flag {
u8 seid : 1,
rsvd : 3,
release : 4;
};
#endif
struct smc_clnt_opts_area_hdr {
u8 eid_cnt; /* number of user defined EIDs */
u8 ism_gid_cnt; /* number of ISMv2 GIDs */
u8 reserved1;
struct smc_clc_v2_flag flag;
u8 reserved2[2];
__be16 smcd_v2_ext_offset; /* SMC-Dv2 Extension Offset */
};
struct smc_clc_smcd_gid_chid {
__be64 gid; /* ISM GID */
__be16 chid; /* ISMv2 CHID */
} __packed; /* format defined in
* IBM Shared Memory Communications Version 2
* (https://www.ibm.com/support/pages/node/6326337)
*/
struct smc_clc_v2_extension {
/* New members must be added within the struct_group() macro below. */
struct_group_tagged(smc_clc_v2_extension_fixed, fixed,
struct smc_clnt_opts_area_hdr hdr;
u8 roce[16]; /* RoCEv2 GID */
u8 max_conns;
u8 max_links;
__be16 feature_mask;
u8 reserved[12];
);
u8 user_eids[][SMC_MAX_EID_LEN];
};
static_assert(offsetof(struct smc_clc_v2_extension, user_eids) == sizeof(struct smc_clc_v2_extension_fixed),
"struct member likely outside of struct_group_tagged()");
struct smc_clc_msg_proposal_prefix { /* prefix part of clc proposal message*/
__be32 outgoing_subnet; /* subnet mask */
u8 prefix_len; /* number of significant bits in mask */
u8 reserved[2];
u8 ipv6_prefixes_cnt; /* number of IPv6 prefixes in prefix array */
} __aligned(4);
struct smc_clc_msg_smcd { /* SMC-D GID information */
struct smc_clc_smcd_gid_chid ism; /* ISM native GID+CHID of requester */
__be16 v2_ext_offset; /* SMC Version 2 Extension Offset */
u8 vendor_oui[3]; /* vendor organizationally unique identifier */
Annotation
- Immediate include surface: `rdma/ib_verbs.h`, `linux/smc.h`, `smc.h`, `smc_netlink.h`.
- Detected declarations: `struct smc_clc_msg_hdr`, `struct smc_clc_msg_trail`, `struct smc_clc_msg_local`, `struct smc_clc_ipv6_prefix`, `struct smc_clc_v2_flag`, `struct smc_clc_v2_flag`, `struct smc_clnt_opts_area_hdr`, `struct smc_clc_smcd_gid_chid`, `struct smc_clc_v2_extension`, `struct smc_clc_msg_proposal_prefix`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.