drivers/net/ethernet/mellanox/mlx5/core/lib/hv_vhca.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/lib/hv_vhca.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/lib/hv_vhca.h- Extension
.h- Size
- 2498 bytes
- Lines
- 98
- 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
en.hlib/hv.h
Detected Declarations
struct mlx5_hv_vhca_agentstruct mlx5_hv_vhcastruct mlx5_hv_vhca_control_blockstruct mlx5_hv_vhca_control_blockenum mlx5_hv_vhca_agent_typefunction mlx5_hv_vhca_createfunction mlx5_hv_vhca_destroyfunction mlx5_hv_vhca_cleanupfunction mlx5_hv_vhca_agent_destroy
Annotated Snippet
struct mlx5_hv_vhca_control_block {
u32 capabilities;
u32 control;
u16 command;
u16 command_ack;
u16 version;
u16 rings;
u32 reserved1[28];
};
struct mlx5_hv_vhca *mlx5_hv_vhca_create(struct mlx5_core_dev *dev);
void mlx5_hv_vhca_destroy(struct mlx5_hv_vhca *hv_vhca);
int mlx5_hv_vhca_init(struct mlx5_hv_vhca *hv_vhca);
void mlx5_hv_vhca_cleanup(struct mlx5_hv_vhca *hv_vhca);
void mlx5_hv_vhca_invalidate(void *context, u64 block_mask);
struct mlx5_hv_vhca_agent *
mlx5_hv_vhca_agent_create(struct mlx5_hv_vhca *hv_vhca,
enum mlx5_hv_vhca_agent_type type,
void (*control)(struct mlx5_hv_vhca_agent*,
struct mlx5_hv_vhca_control_block *block),
void (*invalidate)(struct mlx5_hv_vhca_agent*,
u64 block_mask),
void (*cleanup)(struct mlx5_hv_vhca_agent *agent),
void *context);
void mlx5_hv_vhca_agent_destroy(struct mlx5_hv_vhca_agent *agent);
int mlx5_hv_vhca_agent_write(struct mlx5_hv_vhca_agent *agent,
void *buf, int len);
void *mlx5_hv_vhca_agent_priv(struct mlx5_hv_vhca_agent *agent);
#else
static inline struct mlx5_hv_vhca *
mlx5_hv_vhca_create(struct mlx5_core_dev *dev)
{
return NULL;
}
static inline void mlx5_hv_vhca_destroy(struct mlx5_hv_vhca *hv_vhca)
{
}
static inline int mlx5_hv_vhca_init(struct mlx5_hv_vhca *hv_vhca)
{
return 0;
}
static inline void mlx5_hv_vhca_cleanup(struct mlx5_hv_vhca *hv_vhca)
{
}
static inline void mlx5_hv_vhca_invalidate(void *context,
u64 block_mask)
{
}
static inline struct mlx5_hv_vhca_agent *
mlx5_hv_vhca_agent_create(struct mlx5_hv_vhca *hv_vhca,
enum mlx5_hv_vhca_agent_type type,
void (*control)(struct mlx5_hv_vhca_agent*,
struct mlx5_hv_vhca_control_block *block),
void (*invalidate)(struct mlx5_hv_vhca_agent*,
u64 block_mask),
void (*cleanup)(struct mlx5_hv_vhca_agent *agent),
void *context)
{
return NULL;
}
static inline void mlx5_hv_vhca_agent_destroy(struct mlx5_hv_vhca_agent *agent)
{
}
#endif
#endif /* __LIB_HV_VHCA_H__ */
Annotation
- Immediate include surface: `en.h`, `lib/hv.h`.
- Detected declarations: `struct mlx5_hv_vhca_agent`, `struct mlx5_hv_vhca`, `struct mlx5_hv_vhca_control_block`, `struct mlx5_hv_vhca_control_block`, `enum mlx5_hv_vhca_agent_type`, `function mlx5_hv_vhca_create`, `function mlx5_hv_vhca_destroy`, `function mlx5_hv_vhca_cleanup`, `function mlx5_hv_vhca_agent_destroy`.
- 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.