drivers/net/ethernet/mellanox/mlx5/core/en/channels.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/en/channels.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/en/channels.c- Extension
.c- Size
- 3237 bytes
- Lines
- 141
- 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
channels.hen.hen/dim.hen/ptp.h
Detected Declarations
function mlx5e_channels_get_numfunction mlx5e_channels_is_xskfunction mlx5e_channels_get_regular_rqnfunction mlx5e_channels_get_xsk_rqnfunction mlx5e_channels_get_ptp_rqnfunction mlx5e_channels_rx_change_dimfunction mlx5e_channels_tx_change_dimfunction mlx5e_channels_rx_toggle_dimfunction mlx5e_channels_tx_toggle_dim
Annotated Snippet
if (chs->c[i]->rq.dim) {
int err;
mlx5e_dim_rx_change(&chs->c[i]->rq, false);
err = mlx5e_dim_rx_change(&chs->c[i]->rq, true);
if (err)
return err;
}
}
return 0;
}
int mlx5e_channels_tx_toggle_dim(struct mlx5e_channels *chs)
{
int i, tc;
for (i = 0; i < chs->num; i++) {
for (tc = 0; tc < mlx5e_get_dcb_num_tc(&chs->params); tc++) {
int err;
/* If dim is enabled for the channel, reset the dim
* state so the collected statistics will be reset. This
* is useful for supporting legacy interfaces that allow
* things like changing the CQ period mode for all
* channels without disturbing individual channel
* configurations.
*/
if (!chs->c[i]->sq[tc].dim)
continue;
mlx5e_dim_tx_change(&chs->c[i]->sq[tc], false);
err = mlx5e_dim_tx_change(&chs->c[i]->sq[tc], true);
if (err)
return err;
}
}
return 0;
}
Annotation
- Immediate include surface: `channels.h`, `en.h`, `en/dim.h`, `en/ptp.h`.
- Detected declarations: `function mlx5e_channels_get_num`, `function mlx5e_channels_is_xsk`, `function mlx5e_channels_get_regular_rqn`, `function mlx5e_channels_get_xsk_rqn`, `function mlx5e_channels_get_ptp_rqn`, `function mlx5e_channels_rx_change_dim`, `function mlx5e_channels_tx_change_dim`, `function mlx5e_channels_rx_toggle_dim`, `function mlx5e_channels_tx_toggle_dim`.
- 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.