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.

Dependency Surface

Detected Declarations

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

Implementation Notes