fbnic_netdev_alloc(9)
π fbnic_netdev_alloc(9) β like, the kernel API manual, bestie β¨
Okay so real talk, this page lives in the fbnic corner of the kernel API manual (9 = kernel developer section, iykyk), and it's about one little function that's honestly kind of the main character of driver bring-up π
πΈ NAME πΈ
fbnic_netdev_alloc β allocate a netdev and associate it with fbnic π
Like, you're making a net_device and then literally introducing it to its fbnic bestie. So iconic of them.
β¨ SYNOPSIS β¨
struct net_device * fbnic_netdev_alloc (struct fbnic_dev *fbd );
That's the whole vibe β one argument, one pointer back. Lowkey elegant π¦
π«Ά ARGUMENTS π«Ά
fbdβ the driver-specific structure that you're associating the netdev with. It's the fbnic-side thing that the new netdev gets matched up with, no cap π₯
π DESCRIPTION π
So what's actually happening here? This function allocates and initializes the netdev and the netdev private structure β both, together, one stop shop ποΈ
Then it binds together the hardware, netdev, and pci data structures. Like, it's giving matchmaker. It's giving "you three are a friend group now." The way that it just glues all of those together? Obsessed ππ
β RETURN β
- Pointer to a
net_deviceon success π NULLon failure π
Bestie please check for that NULL, fr fr. Success does not come free and the kernel will humble you π
π¦ SEE ALSO π¦
- Kernel file
./drivers/net/ethernet/meta/fbnic/fbnic_netdev.cβ go read the source, it's right there π fbnic_netdev_free(9)β the cleanup era π§Ήfbnic_netdev_register(9)β the "okay now you're official" era π
That's the whole page, bestie! π Source and version live in ./drivers/net/ethernet/meta/fbnic, and this slice of documentation is dated October 2026 β so yeah, future-core of the kernel manual, slay πΈπβ¨
π¦ 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