drivers/infiniband/core/core_priv.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/core/core_priv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/core/core_priv.h- Extension
.h- Size
- 11244 bytes
- Lines
- 378
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/list.hlinux/spinlock.hlinux/cgroup_rdma.hnet/net_namespace.hnet/netns/generic.hrdma/ib_verbs.hrdma/opa_addr.hrdma/ib_mad.hrdma/restrack.hmad_priv.hrestrack.h
Detected Declarations
struct pkey_index_qp_liststruct rdma_dev_netstruct ib_client_nl_infostruct rdma_dev_addrstruct sa_path_recstruct rdma_umap_privenum ib_cache_gid_default_modefunction ib_device_register_rdmacgfunction ib_rdmacg_unchargefunction ib_security_release_port_pkey_listfunction ib_create_qp_securityfunction ib_destroy_qp_security_beginfunction ib_close_shared_qp_securityfunction ib_mad_agent_security_cleanupfunction ib_mad_agent_security_change
Annotated Snippet
struct pkey_index_qp_list {
struct list_head pkey_index_list;
u16 pkey_index;
/* Lock to hold while iterating the qp_list. */
spinlock_t qp_list_lock;
struct list_head qp_list;
};
/**
* struct rdma_dev_net - rdma net namespace metadata for a net
* @nl_sock: Pointer to netlink socket
* @net: Pointer to owner net namespace
* @id: xarray id to identify the net namespace.
*/
struct rdma_dev_net {
struct sock *nl_sock;
possible_net_t net;
u32 id;
};
extern const struct attribute_group ib_dev_attr_group;
extern bool ib_devices_shared_netns;
extern unsigned int rdma_dev_net_id;
static inline struct rdma_dev_net *rdma_net_to_dev_net(struct net *net)
{
return net_generic(net, rdma_dev_net_id);
}
int ib_device_rename(struct ib_device *ibdev, const char *name);
int ib_device_set_dim(struct ib_device *ibdev, u8 use_dim);
typedef void (*roce_netdev_callback)(struct ib_device *device, u32 port,
struct net_device *idev, void *cookie);
typedef bool (*roce_netdev_filter)(struct ib_device *device, u32 port,
struct net_device *idev, void *cookie);
struct net_device *ib_device_get_netdev(struct ib_device *ib_dev,
u32 port);
void ib_enum_roce_netdev(struct ib_device *ib_dev,
roce_netdev_filter filter,
void *filter_cookie,
roce_netdev_callback cb,
void *cookie);
void ib_enum_all_roce_netdevs(roce_netdev_filter filter,
void *filter_cookie,
roce_netdev_callback cb,
void *cookie);
void ib_device_enable_gid_updates(struct ib_device *device);
void ib_device_disable_gid_updates(struct ib_device *device);
typedef int (*nldev_callback)(struct ib_device *device,
struct sk_buff *skb,
struct netlink_callback *cb,
unsigned int idx);
int ib_enum_all_devs(nldev_callback nldev_cb, struct sk_buff *skb,
struct netlink_callback *cb);
struct ib_client_nl_info {
struct sk_buff *nl_msg;
struct device *cdev;
u32 port;
u64 abi;
};
int ib_get_client_nl_info(struct ib_device *ibdev, const char *client_name,
struct ib_client_nl_info *res);
enum ib_cache_gid_default_mode {
IB_CACHE_GID_DEFAULT_MODE_SET,
IB_CACHE_GID_DEFAULT_MODE_DELETE
};
int ib_cache_gid_parse_type_str(const char *buf);
const char *ib_cache_gid_type_str(enum ib_gid_type gid_type);
void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u32 port,
struct net_device *ndev,
unsigned long gid_type_mask,
enum ib_cache_gid_default_mode mode);
int ib_cache_gid_add(struct ib_device *ib_dev, u32 port,
union ib_gid *gid, struct ib_gid_attr *attr);
int ib_cache_gid_del(struct ib_device *ib_dev, u32 port,
union ib_gid *gid, struct ib_gid_attr *attr);
Annotation
- Immediate include surface: `linux/list.h`, `linux/spinlock.h`, `linux/cgroup_rdma.h`, `net/net_namespace.h`, `net/netns/generic.h`, `rdma/ib_verbs.h`, `rdma/opa_addr.h`, `rdma/ib_mad.h`.
- Detected declarations: `struct pkey_index_qp_list`, `struct rdma_dev_net`, `struct ib_client_nl_info`, `struct rdma_dev_addr`, `struct sa_path_rec`, `struct rdma_umap_priv`, `enum ib_cache_gid_default_mode`, `function ib_device_register_rdmacg`, `function ib_rdmacg_uncharge`, `function ib_security_release_port_pkey_list`.
- Atlas domain: Driver Families / drivers/infiniband.
- 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.