ib_device_get_by_netdev(9)
β¨ ib_device_get_by_netdev(9) β¨
okay so bestie, welcome to the kernel API manual π«Ά this one's from the ib_device_get_by_netdev(9) page and it's literally all about hunting down an IB device that's linked to a netdev. lowkey important stuff, let's get into it π
πΈ NAME πΈ
ib_device_get_by_netdev β find an IB device associated with a netdev π
β¨ SYNOPSIS β¨
struct ib_device * ib_device_get_by_netdev (struct net_device *ndev ,
enum rdma_driver_id driver_id );
bestie look at that signature, it's giving "give me a device and I'll give you the goods" π
π¦ ARGUMENTS π¦
ndevβ the netdev you're trying to locate, like the main character you're searching for πdriver_idβ the driver ID that must match. and the iconic part?RDMA_DRIVER_UNKNOWNmatches all of them, no cap π
π DESCRIPTION π
So here's the vibe: this function finds and holds an ib_device that's associated with a netdev via ib_device_set_netdev. like it's making the connection official π«Ά
β οΈ okay but listen β the caller must call ib_device_put on the returned pointer. not optional, not "maybe later", fr fr. you hold it, you put it back π
π SEE ALSO π
Kernel file ./drivers/infiniband/core/device.c, plus the whole squad of related friends:
rdma_dev_access_netns(9), rdma_dev_has_raw_cap(9), ib_device_put(9), _ib_alloc_device(9), ib_dealloc_device(9), ib_port_immutable_read(9), ib_register_device(9), ib_unregister_device(9), ib_unregister_device_and_put(9), ib_unregister_driver(9), ib_unregister_device_queued(9), ib_register_client(9), ib_unregister_client(9), ib_get_client_nl_info(9), ib_set_client_data(9), ib_register_event_handler(9), ib_unregister_event_handler(9), ib_query_port(9), ib_device_set_netdev(9), ib_query_netdev_port(9), ib_enum_roce_netdev(9), ib_enum_all_roce_netdevs(9), ib_device_enable_gid_updates(9), ib_device_disable_gid_updates(9), ib_query_pkey(9), ib_modify_device(9), ib_modify_port(9), ib_find_gid(9), ib_find_pkey(9), ib_get_net_dev_by_params(9)
like literally an entire friend group, obsessed π§β¨
and that's the page bestie! this one lives in ./drivers/infiniband/core, dated October 2026 β signed off with love, ib_device_get_by_netdev(9) π see you in the next manpage, mwah! ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms