cxgb4_port_idx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cxgb4_port_idx β€” from the Kernel API Manual, section 9 (9)

okay so bestie, we're in the kernel API manual β€” section 9 β€” and today's main character is cxgb4_port_idx. Yes it's a tiny one. No, that does not make it less iconic. Let's get into it πŸ’–


✨ NAME ✨

cxgb4_port_idx β€” get the index of a port πŸŽ€

literally that's the whole job. she shows up, she hands you an index, she leaves. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned int cxgb4_port_idx (const struct net_device *dev );

the way this signature is so clean?? returns unsigned int, takes a const struct net_device *, and the whole thing lives on one line. we love a low-drama function fr fr ✨


🌸 ARGUMENTS 🌸

  • dev β€” the net device for the port 🫢 that's it. that's the one (1) argument. she's the device whose port we're talking about, iykyk.

πŸ’œ DESCRIPTION πŸ’œ

Return the index of the given port.

that's the whole description babe, and honestly? obsessed. hand her a dev for a port, she gives you back that port's index. no side quests, no surprises, no "it depends" energy. just a return value and a vibe check passed βœ…

reminder bestie: the return type is unsigned int, so it's coming back as an unsigned int β€” not a signed one, not a void, none of that πŸ’…

🌈 SEE ALSO 🌈

the whole friend group showed up 🫢 read them too, they're all in their cxgb4 era.


and that's the page!! πŸŽ€ this fine piece of documentation is living in the source tree at ./drivers/net/ethernet/chelsio... and it's dated October 2026 β€” so go forth, look up your port indices, and slay πŸ’–βœ¨πŸ‘‘

πŸ“¦ where this page comes from