cxgb4_port_idx(9)
π 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 isunsigned int, so it's coming back as an unsigned int β not a signed one, not avoid, none of that π
π SEE ALSO π
- the kernel file
./drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.cβ that's where she lives, go say hi π§ cxgb4_change_mac(9)cxgb4_write_rss(9)setup_rss(9)setup_sge_queues(9)cxgb4_set_rspq_intr_params(9)cxgb4_create_server(9)cxgb4_best_mtu(9)cxgb4_best_aligned_mtu(9)cxgb4_port_chan(9)cxgb4_port_e2cchan(9)cxgb4_port_viid(9)cxgb_up(9)
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
- 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