linkmode_set_pause(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the tx_pause member of struct ethtool_pauseparam. πŸ¦‹
  • rx β€” a boolean from the rx_pause member of struct 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=0 gives 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=1 gives AsymDir only, which will only give tx pause if the partners advertisement allows it.
  • rx=1 tx=1 gives Pause only, which will only allow tx+rx pause if the other end also advertises Pause.

🫢 SEE ALSO 🫢


Source/version footer check, bestie: ./drivers/net/phy, October 2026, linkmode_set_pause(9) β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from