ethtool_inte...t_link_masks(9)
β¨ ethtool_intersect_link_masks β the Kernel API Manual moment β¨
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:
enum ethtool_phys_id_state(9)struct kernel_ethtool_ringparam(9)enum ethtool_supported_ring_param(9)ethtool_rxfh_indir_default(9)struct ethtool_rxfh_context(9)ethtool_link_ksettings_zero_link_mode(9)ethtool_link_ksettings_add_link_mode(9)ethtool_link_ksettings_del_link_mode(9)ethtool_link_ksettings_test_link_mode(9)struct ethtool_phy_stats(9)struct ethtool_pause_stats(9)struct ethtool_fec_hist_range(9)struct ethtool_fec_stats(9)struct ethtool_rmon_hist_range(9)struct ethtool_rmon_stats(9)struct ethtool_ts_stats(9)struct ethtool_module_eeprom(9)struct ethtool_module_power_mode_params(9)struct ethtool_mm_state(9)struct ethtool_mm_cfg(9)struct ethtool_mm_stats(9)struct ethtool_mmsv_ops(9)struct ethtool_mmsv(9)struct ethtool_rxfh_param(9)struct ethtool_rxfh_fields(9)struct kernel_ethtool_ts_info(9)struct ethtool_ops(9)struct ethtool_netdev_state(9)struct ethtool_phy_ops(9)ethtool_set_ethtool_phy_ops(9)ethtool_params_from_link_mode(9)ethtool_get_phc_vclocks(9)ethtool_mm_frag_size_add_to_min(9)ethtool_mm_frag_size_min_to_add(9)ethtool_get_ts_info_by_layer(9)ethtool_sprintf(9)ethtool_puts(9)ethtool_cpy(9)
bestie this is avoidfunction so there's no return value to obsess over β nothing comes back, the result just lives indstβ¨
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
- 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