STRUCT ETHTOOL_FEC_STATS(9)
β¨ struct ethtool_fec_stats(9) β¨
Okay bestie, welcome to the struct ethtool_fec_stats(9) page from the Kernel API Manual π
β this is the little struct that holds all your IEEE 802.3 FEC statistics, and honestly? It's giving organized. Let's get into it π«Ά
πΈ NAME πΈ
struct ethtool_fec_stats β statistics for IEEE 802.3 FEC β¨
π SYNOPSIS π
struct ethtool_fec_stats {
struct ethtool_fec_stat {
u64 total;
u64 lanes[ETHTOOL_MAX_LANES];
} corrected_blocks, uncorrectable_blocks, corrected_bits;
};
Like, look at that nesting π three fields, each one is an struct ethtool_fec_stat with a total and a lanes[] array. Neat and iconic.
π Members π
corrected_blocksβ the number of received blocks that got corrected by FEC π₯. This one's reported to user space asETHTOOL_A_FEC_STAT_CORRECTED.uncorrectable_blocksβ the number of received blocks that FEC was not able to correct π. Reported to user space asETHTOOL_A_FEC_STAT_UNCORR.corrected_bitsβ the number of bits corrected by FEC β. It's similar tocorrected_blocksbut it counts individual bit changes, not whole FEC data blocks. Heads up: this is a non-standard statistic (iykyk). Reported to user space asETHTOOL_A_FEC_STAT_CORR_BITS.
π¦ Description π¦
So corrected_blocks is equivalent to 30.5.1.1.17 aFECCorrectedBlocks from the standard π
And uncorrectable_blocks is equivalent to 30.5.1.1.18 aFECUncorrectableBlocks from the standard π«
For each of the fields above, the two substructure members are:
lanes: per-lane/PCS-instance counts as defined by the standard πtotal: error counts for the entire port, for drivers that are incapable of reporting per-lane stats π
Drivers should fill in either only total or per-lane statistics β the core will take care of adding lane values up to produce the total. So don't go doing both, bestie, that's not the vibe π
π SEE ALSO π
Kernel file ./include/linux/ethtool.h plus all of these cuties:
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), ethtool_intersect_link_masks(9), struct ethtool_phy_stats(9), struct ethtool_pause_stats(9), struct ethtool_fec_hist_range(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)
That's the whole page, bestie β slay πβ¨ This one lives in ./include/linux, dated October 2026, and it's part of the Kernel API Manual. Go forth and count your corrected blocks ππ¦
π¦ 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