__get_link_speed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, we're in the <pink>(9)</pink> section of the kernel API manual, and today's main character is __get_link_speed β€” the little function that tells you how fast a port is vibing. no cap, it's giving "speed check but make it 802.3ad". πŸ¦‹


✨ NAME ✨

__get_link_speed β€” get a port's speed πŸƒβ€β™€οΈπŸ’¨


πŸŽ€ SYNOPSIS πŸŽ€

u16 __get_link_speed (struct port *port );

🌸 ARGUMENTS 🌸

  • port β€” the port we're looking at πŸ‘€ that's literally it, that's the whole argument, she's lowkey simple and we love her for it

πŸ’– DESCRIPTION πŸ’–

so this function returns the port's speed in <purple>802.3ad enum format</purple>, iykyk. meaning it hands you back one of these bad boys, and yes bestie I'm listing every single one because we don't do "etc." in this house πŸ’…:

0,
AD_LINK_SPEED_10MBPS, AD_LINK_SPEED_100MBPS, AD_LINK_SPEED_1000MBPS,
AD_LINK_SPEED_2500MBPS, AD_LINK_SPEED_5000MBPS, AD_LINK_SPEED_10000MBPS
AD_LINK_SPEED_14000MBPS, AD_LINK_SPEED_20000MBPS AD_LINK_SPEED_25000MBPS
AD_LINK_SPEED_40000MBPS AD_LINK_SPEED_50000MBPS AD_LINK_SPEED_56000MBPS
AD_LINK_SPEED_80000MBPS AD_LINK_SPEED_100000MBPS
AD_LINK_SPEED_200000MBPS AD_LINK_SPEED_400000MBPS
AD_LINK_SPEED_800000MBPS AD_LINK_SPEED_1600000MBPS
fr fr copy those exactly as they're written up there β€” the commas be doing their own thing in places and we're not about to "fix" the source, that's not our job πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

okay this is the part where the girlies gather. the kernel file <cyan>./drivers/net/bonding/bond_3ad.c</cyan> is the mothership, and here's the entire friend group, in order, no one left out 🫢:


that's the whole page bestie, go forth and check those link speeds πŸ’œβœ¨

<xoxo>mwah πŸ’‹ β€” this lil' number lives over in <hotpink>./drivers/net/bonding</hotpink>, dated <purple>October 2026</purple> πŸŽ€</xoxo>

πŸ“¦ where this page comes from