drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_stats.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_stats.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_stats.c- Extension
.c- Size
- 1975 bytes
- Lines
- 71
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ethtool.hnet/sock.hen.hen_accel/macsec.h
Detected Declarations
function MLX5E_DECLARE_STATS_GRP_OP_NUM_STATSfunction MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATSfunction MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS
Annotated Snippet
static MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS(macsec_hw) {}
static MLX5E_DECLARE_STATS_GRP_OP_FILL_STRS(macsec_hw)
{
unsigned int i;
if (!priv->macsec)
return;
if (!mlx5e_is_macsec_device(priv->mdev))
return;
for (i = 0; i < NUM_MACSEC_HW_COUNTERS; i++)
ethtool_puts(data, mlx5e_macsec_hw_stats_desc[i].format);
}
static MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS(macsec_hw)
{
struct mlx5_macsec_fs *macsec_fs;
int i;
if (!priv->macsec)
return;
if (!mlx5e_is_macsec_device(priv->mdev))
return;
macsec_fs = priv->mdev->macsec_fs;
mlx5_macsec_fs_get_stats_fill(macsec_fs, mlx5_macsec_fs_get_stats(macsec_fs));
for (i = 0; i < NUM_MACSEC_HW_COUNTERS; i++)
mlx5e_ethtool_put_stat(
data, MLX5E_READ_CTR64_CPU(
mlx5_macsec_fs_get_stats(macsec_fs),
mlx5e_macsec_hw_stats_desc, i));
}
MLX5E_DEFINE_STATS_GRP(macsec_hw, 0);
Annotation
- Immediate include surface: `linux/ethtool.h`, `net/sock.h`, `en.h`, `en_accel/macsec.h`.
- Detected declarations: `function MLX5E_DECLARE_STATS_GRP_OP_NUM_STATS`, `function MLX5E_DECLARE_STATS_GRP_OP_UPDATE_STATS`, `function MLX5E_DECLARE_STATS_GRP_OP_FILL_STATS`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.