drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/lag/mpesw.h- Extension
.h- Size
- 1781 bytes
- Lines
- 59
- 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
lag.hmlx5_core.h
Detected Declarations
struct lag_mpeswstruct mlx5_mpesw_work_stenum mpesw_opfunction mlx5_lag_disable_mpeswfunction mlx5_mpesw_speed_update_work
Annotated Snippet
struct lag_mpesw {
struct work_struct mpesw_work;
u32 pf_metadata[MLX5_MAX_PORTS];
};
enum mpesw_op {
MLX5_MPESW_OP_ENABLE,
MLX5_MPESW_OP_DISABLE,
};
struct mlx5_mpesw_work_st {
struct work_struct work;
struct mlx5_lag *lag;
enum mpesw_op op;
struct completion comp;
int result;
};
int mlx5_lag_mpesw_do_mirred(struct mlx5_core_dev *mdev,
struct net_device *out_dev,
struct netlink_ext_ack *extack);
bool mlx5_lag_is_mpesw(struct mlx5_core_dev *dev);
void mlx5_lag_mpesw_disable(struct mlx5_core_dev *dev);
int mlx5_lag_mpesw_enable(struct mlx5_core_dev *dev);
#ifdef CONFIG_MLX5_ESWITCH
void mlx5_lag_disable_mpesw(struct mlx5_lag *ldev);
void mlx5_mpesw_sd_devcoms_lock(struct mlx5_lag *ldev);
void mlx5_mpesw_sd_devcoms_unlock(struct mlx5_lag *ldev);
#else
static inline void mlx5_lag_disable_mpesw(struct mlx5_lag *ldev) {}
static inline void mlx5_mpesw_sd_devcoms_lock(struct mlx5_lag *ldev) {}
static inline void mlx5_mpesw_sd_devcoms_unlock(struct mlx5_lag *ldev) {}
#endif /* CONFIG_MLX5_ESWITCH */
#ifdef CONFIG_MLX5_ESWITCH
void mlx5_mpesw_speed_update_work(struct work_struct *work);
int mlx5_lag_mpesw_port_change_event(struct notifier_block *nb,
unsigned long event, void *data);
#else
static inline void mlx5_mpesw_speed_update_work(struct work_struct *work) {}
static inline int mlx5_lag_mpesw_port_change_event(struct notifier_block *nb,
unsigned long event,
void *data)
{
return NOTIFY_DONE;
}
#endif /* CONFIG_MLX5_ESWITCH */
#endif /* __MLX5_LAG_MPESW_H__ */
Annotation
- Immediate include surface: `lag.h`, `mlx5_core.h`.
- Detected declarations: `struct lag_mpesw`, `struct mlx5_mpesw_work_st`, `enum mpesw_op`, `function mlx5_lag_disable_mpesw`, `function mlx5_mpesw_speed_update_work`.
- 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.