ethtool_inte...t_link_masks(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so this one lives in the Kernel API Manual, bestie, and it's honestly such a clean little function. no drama, no side quests, just two link masks meeting and finding their common ground 🫢


πŸ’– NAME

ethtool_intersect_link_masks β€” give it two link masks and it ANDs them together. that's it. that's the whole vibe. periodt πŸ’…


🌸 SYNOPSIS

void ethtool_intersect_link_masks(struct ethtool_link_ksettings *dst,
                                  struct ethtool_link_ksettings *src);

πŸŽ€ ARGUMENTS

  • dst β€” the first mask, and also literally where the result gets stored. it's giving main character energy because it goes in AND comes out changed πŸ‘‘
  • src β€” the second mask, the one we're intersecting with. support role but essential, ngl πŸ’œ

πŸ¦‹ DESCRIPTION

so picture this: you've got two link mode masks, right? this function ANDs them together and saves the result in dst. no cap, that's the entire plot 😭 it's a bitwise intersection and honestly it ate.


🌈 SEE ALSO

like, the whole extended friend group πŸ’– all of these are chillin' in the kernel file ./include/linux/ethtool.h:


bestie this is a void function so there's no return value to obsess over β€” nothing comes back, the result just lives in dst ✨

and that's the whole page, mwah πŸ’‹ shipped straight out of ./include/linux, dated October 2026 β€” go forth and intersect those masks, ily πŸ§šπŸ’œ

πŸ“¦ where this page comes from