drivers/infiniband/ulp/ipoib/ipoib.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/ulp/ipoib/ipoib.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/ulp/ipoib/ipoib.h- Extension
.h- Size
- 23541 bytes
- Lines
- 841
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/list.hlinux/skbuff.hlinux/netdevice.hlinux/workqueue.hlinux/kref.hlinux/if_infiniband.hlinux/mutex.hnet/neighbour.hnet/sch_generic.hlinux/atomic.hrdma/ib_verbs.hrdma/ib_pack.hrdma/ib_sa.hlinux/sched.h
Detected Declarations
struct ipoib_headerstruct ipoib_pseudo_headerstruct ipoib_mcaststruct ipoib_rx_bufstruct ipoib_tx_bufstruct ib_cm_idstruct ipoib_cm_datastruct ipoib_cm_rxstruct ipoib_cm_txstruct ipoib_cm_rx_bufstruct ipoib_cm_dev_privstruct ipoib_ethtool_ststruct ipoib_neigh_tablestruct ipoib_neigh_hashstruct ipoib_neigh_tablestruct ipoib_qp_state_validatestruct ipoib_dev_privstruct ipoib_ahstruct ipoib_pathstruct ipoib_neighenum ipoib_flush_levelenum ipoib_cm_statefunction skb_add_pseudo_hdrfunction ipoib_neigh_putfunction ipoib_put_ahfunction ipoib_build_sgefunction ipoib_cm_admin_enabledfunction ipoib_cm_enabledfunction ipoib_cm_upfunction ipoib_cm_setfunction ipoib_cm_has_srqfunction ipoib_cm_max_mtufunction ipoib_cm_admin_enabledfunction ipoib_cm_enabledfunction ipoib_cm_upfunction ipoib_cm_setfunction ipoib_cm_max_mtufunction ipoib_cm_sendfunction ipoib_cm_dev_openfunction ipoib_cm_dev_stopfunction ipoib_cm_dev_initfunction ipoib_cm_dev_cleanupfunction ipoib_cm_destroy_txfunction ipoib_cm_add_mode_attrfunction ipoib_cm_skb_too_longfunction ipoib_cm_handle_rx_wcfunction ipoib_create_debug_files
Annotated Snippet
const struct net_device_ops *rn_ops;
};
struct ipoib_ah {
struct net_device *dev;
struct ib_ah *ah;
struct list_head list;
struct kref ref;
unsigned int last_send;
int valid;
};
struct ipoib_path {
struct net_device *dev;
struct sa_path_rec pathrec;
struct ipoib_ah *ah;
struct sk_buff_head queue;
struct list_head neigh_list;
int query_id;
struct ib_sa_query *query;
struct completion done;
struct rb_node rb_node;
struct list_head list;
};
struct ipoib_neigh {
struct ipoib_ah *ah;
#ifdef CONFIG_INFINIBAND_IPOIB_CM
struct ipoib_cm_tx *cm;
#endif
u8 daddr[INFINIBAND_ALEN];
struct sk_buff_head queue;
struct net_device *dev;
struct list_head list;
struct ipoib_neigh __rcu *hnext;
struct rcu_head rcu;
refcount_t refcnt;
unsigned long alive;
};
#define IPOIB_UD_MTU(ib_mtu) (ib_mtu - IPOIB_ENCAP_LEN)
#define IPOIB_UD_BUF_SIZE(ib_mtu) (ib_mtu + IB_GRH_BYTES)
void ipoib_neigh_dtor(struct ipoib_neigh *neigh);
static inline void ipoib_neigh_put(struct ipoib_neigh *neigh)
{
if (refcount_dec_and_test(&neigh->refcnt))
ipoib_neigh_dtor(neigh);
}
struct ipoib_neigh *ipoib_neigh_get(struct net_device *dev, u8 *daddr);
struct ipoib_neigh *ipoib_neigh_alloc(u8 *daddr,
struct net_device *dev);
void ipoib_neigh_free(struct ipoib_neigh *neigh);
void ipoib_del_neighs_by_gid(struct net_device *dev, u8 *gid);
extern struct workqueue_struct *ipoib_workqueue;
/* functions */
int ipoib_rx_poll(struct napi_struct *napi, int budget);
int ipoib_tx_poll(struct napi_struct *napi, int budget);
void ipoib_ib_rx_completion(struct ib_cq *cq, void *ctx_ptr);
void ipoib_ib_tx_completion(struct ib_cq *cq, void *ctx_ptr);
struct ipoib_ah *ipoib_create_ah(struct net_device *dev,
struct ib_pd *pd, struct rdma_ah_attr *attr);
void ipoib_free_ah(struct kref *kref);
static inline void ipoib_put_ah(struct ipoib_ah *ah)
{
kref_put(&ah->ref, ipoib_free_ah);
}
int ipoib_open(struct net_device *dev);
void ipoib_intf_free(struct net_device *dev);
int ipoib_add_pkey_attr(struct net_device *dev);
int ipoib_add_umcast_attr(struct net_device *dev);
int ipoib_send(struct net_device *dev, struct sk_buff *skb,
struct ib_ah *address, u32 dqpn);
void ipoib_reap_ah(struct work_struct *work);
void ipoib_napi_schedule_work(struct work_struct *work);
struct ipoib_path *__path_find(struct net_device *dev, void *gid);
void ipoib_mark_paths_invalid(struct net_device *dev);
void ipoib_flush_paths(struct net_device *dev);
struct net_device *ipoib_intf_alloc(struct ib_device *hca, u32 port,
Annotation
- Immediate include surface: `linux/list.h`, `linux/skbuff.h`, `linux/netdevice.h`, `linux/workqueue.h`, `linux/kref.h`, `linux/if_infiniband.h`, `linux/mutex.h`, `net/neighbour.h`.
- Detected declarations: `struct ipoib_header`, `struct ipoib_pseudo_header`, `struct ipoib_mcast`, `struct ipoib_rx_buf`, `struct ipoib_tx_buf`, `struct ib_cm_id`, `struct ipoib_cm_data`, `struct ipoib_cm_rx`, `struct ipoib_cm_tx`, `struct ipoib_cm_rx_buf`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.