get_link_speed(9)
β¨ get_link_speed(9) β¨
okay so bestie, this is a page from the Kernel API Manual, and it's all about get_link_speed β the little function that helps determine whether the active link speed is 12.5G or 25G. iconic behavior, honestly. π
πΈ NAME πΈ
get_link_speed β determine whether it's 12.5G or 25G speed π
β¨ SYNOPSIS β¨
u16 get_link_speed (u16 link_speed );
π ARGUMENTS π
link_speedβ the speed of the active link. that's the whole vibe check right there π¦
π¦ RETURN π¦
- Returns
2if the link speed is identified as12.5G. - Returns
1if the link speed is25G.
no cap, those are the two return values π
π DESCRIPTION π
So the function indirectly calculates the required link speed value for the convert_xmit_counter function. it's giving helper-function main character energy β¨
If the link speed is 25G, the function returns 1, because that's what the xmit counter conversion formula needs :-( β and the formula is 25G / link_speed. This conversion will provide value 1 if the current link speed is 25G or 2 if it's 12.5G. This is done to avoid a 12.5 float number conversion, which is honestly so valid of it π«Ά
π₯ SEE ALSO π₯
- Kernel file
./drivers/infiniband/hw/hfi1/mad.h convert_xmit_counter(9)
okurrr, that's the whole page π this one lives in the ./drivers/infiniband/hw/hfi1 source/version corner of the kernel, and it's dated October 2026 β periodt πππ¦
π¦ 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