drivers/net/ethernet/mellanox/mlx5/core/en/health.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/en/health.c- Extension
.c- Size
- 6184 bytes
- Lines
- 239
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
health.hlib/eq.hlib/mlx5.h
Detected Declarations
function mlx5e_health_fmsg_named_obj_nest_startfunction mlx5e_health_fmsg_named_obj_nest_endfunction mlx5e_health_cq_diag_fmsgfunction mlx5e_health_cq_common_diag_fmsgfunction mlx5e_health_eq_diag_fmsgfunction mlx5e_health_create_reportersfunction mlx5e_health_destroy_reportersfunction mlx5e_health_channels_updatefunction mlx5e_health_sq_to_readyfunction mlx5e_health_recover_channelsfunction mlx5e_health_channel_eq_recoverfunction mlx5e_health_reportfunction mlx5e_health_rsc_fmsg_binaryfunction mlx5e_health_rsc_fmsg_dumpfunction mlx5e_health_queue_dump
Annotated Snippet
if (cmd_err < 0) {
err = cmd_err;
goto destroy_cmd;
}
mlx5e_health_rsc_fmsg_binary(fmsg, page_address(page), size);
} while (cmd_err > 0);
destroy_cmd:
mlx5_rsc_dump_cmd_destroy(cmd);
devlink_fmsg_binary_pair_nest_end(fmsg);
free_page:
__free_page(page);
return err;
}
void mlx5e_health_queue_dump(struct mlx5e_priv *priv, struct devlink_fmsg *fmsg,
int queue_idx, char *lbl)
{
struct mlx5_rsc_key key = {};
key.rsc = MLX5_SGMT_TYPE_FULL_QPC;
key.index1 = queue_idx;
key.size = PAGE_SIZE;
key.num_of_obj1 = 1;
devlink_fmsg_obj_nest_start(fmsg);
mlx5e_health_fmsg_named_obj_nest_start(fmsg, lbl);
devlink_fmsg_u32_pair_put(fmsg, "index", queue_idx);
mlx5e_health_rsc_fmsg_dump(priv, &key, fmsg);
mlx5e_health_fmsg_named_obj_nest_end(fmsg);
devlink_fmsg_obj_nest_end(fmsg);
}
Annotation
- Immediate include surface: `health.h`, `lib/eq.h`, `lib/mlx5.h`.
- Detected declarations: `function mlx5e_health_fmsg_named_obj_nest_start`, `function mlx5e_health_fmsg_named_obj_nest_end`, `function mlx5e_health_cq_diag_fmsg`, `function mlx5e_health_cq_common_diag_fmsg`, `function mlx5e_health_eq_diag_fmsg`, `function mlx5e_health_create_reporters`, `function mlx5e_health_destroy_reporters`, `function mlx5e_health_channels_update`, `function mlx5e_health_sq_to_ready`, `function mlx5e_health_recover_channels`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.