drivers/infiniband/ulp/ipoib/ipoib_netlink.c
Source file repositories/reference/linux-study-clean/drivers/infiniband/ulp/ipoib/ipoib_netlink.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/ulp/ipoib/ipoib_netlink.c- Extension
.c- Size
- 5494 bytes
- Lines
- 203
- 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/netdevice.hlinux/if_arp.hnet/rtnetlink.hipoib.h
Detected Declarations
function ipoib_get_max_num_queuesfunction ipoib_fill_infofunction ipoib_changelinkfunction ipoib_new_child_linkfunction ipoib_del_child_linkfunction ipoib_get_sizefunction ipoib_netlink_initfunction ipoib_netlink_fini
Annotated Snippet
if (err) {
unregister_netdevice(dev);
return err;
}
}
return 0;
}
static void ipoib_del_child_link(struct net_device *dev, struct list_head *head)
{
struct ipoib_dev_priv *priv = ipoib_priv(dev);
if (!priv->parent)
return;
unregister_netdevice_queue(dev, head);
}
static size_t ipoib_get_size(const struct net_device *dev)
{
return nla_total_size(2) + /* IFLA_IPOIB_PKEY */
nla_total_size(2) + /* IFLA_IPOIB_MODE */
nla_total_size(2); /* IFLA_IPOIB_UMCAST */
}
static struct rtnl_link_ops ipoib_link_ops __read_mostly = {
.kind = "ipoib",
.netns_refund = true,
.maxtype = IFLA_IPOIB_MAX,
.policy = ipoib_policy,
.priv_size = sizeof(struct ipoib_dev_priv),
.setup = ipoib_setup_common,
.newlink = ipoib_new_child_link,
.dellink = ipoib_del_child_link,
.changelink = ipoib_changelink,
.get_size = ipoib_get_size,
.fill_info = ipoib_fill_info,
.get_num_rx_queues = ipoib_get_max_num_queues,
.get_num_tx_queues = ipoib_get_max_num_queues,
};
struct rtnl_link_ops *ipoib_get_link_ops(void)
{
return &ipoib_link_ops;
}
int __init ipoib_netlink_init(void)
{
return rtnl_link_register(&ipoib_link_ops);
}
void __exit ipoib_netlink_fini(void)
{
rtnl_link_unregister(&ipoib_link_ops);
}
MODULE_ALIAS_RTNL_LINK("ipoib");
Annotation
- Immediate include surface: `linux/netdevice.h`, `linux/if_arp.h`, `net/rtnetlink.h`, `ipoib.h`.
- Detected declarations: `function ipoib_get_max_num_queues`, `function ipoib_fill_info`, `function ipoib_changelink`, `function ipoib_new_child_link`, `function ipoib_del_child_link`, `function ipoib_get_size`, `function ipoib_netlink_init`, `function ipoib_netlink_fini`.
- 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.