include/rdma/ib_sa.h
Source file repositories/reference/linux-study-clean/include/rdma/ib_sa.h
File Facts
- System
- Linux kernel
- Corpus path
include/rdma/ib_sa.h- Extension
.h- Size
- 20968 bytes
- Lines
- 647
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/completion.hlinux/compiler.hlinux/atomic.hlinux/netdevice.hrdma/ib_verbs.hrdma/ib_mad.hrdma/ib_addr.hrdma/opa_addr.h
Detected Declarations
struct sa_path_rec_ibstruct sa_path_rec_rocestruct sa_path_rec_opastruct sa_path_recstruct sa_service_recstruct ib_sa_mcmember_recstruct ib_sa_guidinfo_recstruct ib_sa_clientstruct ib_sa_querystruct ib_sa_multicastenum ib_sa_selectorenum ib_sa_mc_join_statesenum sa_path_rec_typefunction sa_conv_pathrec_to_gid_typefunction sa_conv_gid_to_pathrec_typefunction path_conv_opa_to_ibfunction path_conv_ib_to_opafunction sa_convert_path_opa_to_ibfunction sa_convert_path_ib_to_opafunction sa_path_is_rocefunction sa_path_is_opafunction sa_path_set_slidfunction sa_path_set_dlidfunction sa_path_set_raw_trafficfunction sa_path_get_slidfunction sa_path_get_dlidfunction sa_path_get_raw_trafficfunction sa_path_set_dmacfunction sa_path_set_dmac_zero
Annotated Snippet
struct sa_path_rec_ib {
__be16 dlid;
__be16 slid;
u8 raw_traffic;
};
/**
* struct sa_path_rec_roce - RoCE specific portion of the path record entry
* @route_resolved: When set, it indicates that this route is already
* resolved for this path record entry.
* @dmac: Destination mac address for the given DGID entry
* of the path record entry.
*/
struct sa_path_rec_roce {
bool route_resolved;
u8 dmac[ETH_ALEN];
};
struct sa_path_rec_opa {
__be32 dlid;
__be32 slid;
u8 raw_traffic;
u8 l2_8B;
u8 l2_10B;
u8 l2_9B;
u8 l2_16B;
u8 qos_type;
u8 qos_priority;
};
struct sa_path_rec {
union ib_gid dgid;
union ib_gid sgid;
__be64 service_id;
/* reserved */
__be32 flow_label;
u8 hop_limit;
u8 traffic_class;
u8 reversible;
u8 numb_path;
__be16 pkey;
__be16 qos_class;
u8 sl;
u8 mtu_selector;
u8 mtu;
u8 rate_selector;
u8 rate;
u8 packet_life_time_selector;
u8 packet_life_time;
u8 preference;
union {
struct sa_path_rec_ib ib;
struct sa_path_rec_roce roce;
struct sa_path_rec_opa opa;
};
enum sa_path_rec_type rec_type;
u32 flags;
};
struct sa_service_rec {
__be64 id;
__u8 gid[16];
__be16 pkey;
__u8 reserved[2];
__be32 lease;
__u8 key[16];
__u8 name[64];
__u8 data_8[16];
__be16 data_16[8];
__be32 data_32[4];
__be64 data_64[2];
};
static inline enum ib_gid_type
sa_conv_pathrec_to_gid_type(struct sa_path_rec *rec)
{
switch (rec->rec_type) {
case SA_PATH_REC_TYPE_ROCE_V1:
return IB_GID_TYPE_ROCE;
case SA_PATH_REC_TYPE_ROCE_V2:
return IB_GID_TYPE_ROCE_UDP_ENCAP;
default:
return IB_GID_TYPE_IB;
}
}
static inline enum sa_path_rec_type
sa_conv_gid_to_pathrec_type(enum ib_gid_type type)
{
switch (type) {
Annotation
- Immediate include surface: `linux/completion.h`, `linux/compiler.h`, `linux/atomic.h`, `linux/netdevice.h`, `rdma/ib_verbs.h`, `rdma/ib_mad.h`, `rdma/ib_addr.h`, `rdma/opa_addr.h`.
- Detected declarations: `struct sa_path_rec_ib`, `struct sa_path_rec_roce`, `struct sa_path_rec_opa`, `struct sa_path_rec`, `struct sa_service_rec`, `struct ib_sa_mcmember_rec`, `struct ib_sa_guidinfo_rec`, `struct ib_sa_client`, `struct ib_sa_query`, `struct ib_sa_multicast`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.