fbnic_netdev_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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_device on success πŸ‘‘
  • NULL on 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