linkmode_set_pause(9)
π linkmode_set_pause(9)
Okay bestie, welcome to the Kernel API Manual page for linkmode_set_pause(9) β no cap, this one is a tiny function with huge βwait, what?β energy in the pause-advertisement department. β¨
πΈ NAME πΈ
linkmode_set_pause β set the pause mode advertisement π
β¨ SYNOPSIS β¨
void linkmode_set_pause (unsigned long *advertisement , bool tx , bool rx );
π ARGUMENTS π
advertisementβ the advertisement in ethtool format. πtxβ a boolean from thetx_pausemember ofstruct ethtool_pauseparam. π¦rxβ a boolean from therx_pausemember ofstruct ethtool_pauseparam. π¦
π₯ DESCRIPTION π₯
Okay so this function configures the advertised Pause and Asym_Pause bits according to the capabilities provided in tx and rx. Literally thatβs the job.
We convert as follows:
tx rx Pause AsymDir
0 0 0 0
0 1 1 1
1 0 0 1
1 1 1 0
π NOTE π
Okay, real talk: this translation from ethtool tx/rx notation to the advertisement is actually very problematical. Not me saying that β the page says it. Here are some examples, bestie:
For tx=0 rx=1, meaning transmit is unsupported, receive is supported:
Local device Link partner
Pause AsymDir Pause AsymDir Result
1 1 1 0 TX + RX - but we have no TX support.
1 1 0 1 Only this gives RX only
For tx=1 rx=1, meaning we have the capability to transmit and receive pause frames:
Local device Link partner
Pause AsymDir Pause AsymDir Result
1 0 0 1 Disabled - but since we do support tx and rx, this should resolve to RX only.
Hence, asking for:
rx=1 tx=0gives Pause+AsymDir advertisement, but we may end up resolving to tx+rx pause or only rx pause depending on the partners advertisement.rx=0 tx=1gives AsymDir only, which will only give tx pause if the partners advertisement allows it.rx=1 tx=1gives Pause only, which will only allow tx+rx pause if the other end also advertises Pause.
π«Ά SEE ALSO π«Ά
- Kernel file
./drivers/net/phy/linkmode.cπ linkmode_resolve_pause(9)β go read her next, bestie. π
Source/version footer check, bestie: ./drivers/net/phy, October 2026, linkmode_set_pause(9) β mwah πβ¨
π¦ 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