linkmode_resolve_pause(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual πŸ’– this page is all about linkmode_resolve_pause, and it's literally the main character of flow control resolution. no cap, it's giving "let's figure out if we should pause" energy ✨

🌸 NAME 🌸

linkmode_resolve_pause β€” resolve the allowable pause modes. periodt πŸ’…

✨ SYNOPSIS ✨

void linkmode_resolve_pause (const unsigned long *local_adv , const
       unsigned long *partner_adv , bool *tx_pause , bool *rx_pause );

πŸŽ€ ARGUMENTS πŸŽ€

  • local_adv β€” your local advertisement, in ethtool format. it's giving "this is what I'm bringing to the link" ✨
  • partner_adv β€” the link partner's advertisement, also in ethtool format. basically their side of the story πŸ’…
  • tx_pause β€” a pointer to a bool that indicates whether transmit pause should be enabled. so like, should we pause on transmit? this bool holds the answer 🫢
  • rx_pause β€” a pointer to a bool that indicates whether receive pause should be enabled. same vibe, but for receive 😭

πŸ’… DESCRIPTION πŸ’…

so the tea is: flow control gets resolved according to our advertisement and the link partner's advertisement, using the following table drawn from the 802.3 specs. this is literally the blueprint, bestie 🧚

Local device   Link partner   Result
Pause AsymDir  Pause AsymDir
0     X        0     X        Disabled
0     1        1     0        Disabled
0     1        1     1        TX
1     0        0     X        Disabled
1     X        1     X        TX+RX
1     1        0     1        RX

like, the way that table just tells you the whole story? iconic. πŸ”₯

πŸ¦‹ SEE ALSO πŸ¦‹

  • kernel file ./drivers/net/phy/linkmode.c β€” go read it, iykyk πŸ‘‘
  • linkmode_set_pause(9) β€” the sibling function, also slay πŸ’œ

source: ./drivers/net/phy, October 2026, page: linkmode_resolve_pause(9) β€” love u, bye bestie πŸ’–βœ¨

πŸ“¦ where this page comes from