drivers/net/ethernet/mellanox/mlx5/core/esw/diag/bridge_tracepoint.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/esw/diag/bridge_tracepoint.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/esw/diag/bridge_tracepoint.h- Extension
.h- Size
- 4850 bytes
- Lines
- 156
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/tracepoint.h../bridge_priv.htrace/define_trace.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM mlx5
#if !defined(_MLX5_ESW_BRIDGE_TRACEPOINT_) || defined(TRACE_HEADER_MULTI_READ)
#define _MLX5_ESW_BRIDGE_TRACEPOINT_
#include <linux/tracepoint.h>
#include "../bridge_priv.h"
DECLARE_EVENT_CLASS(mlx5_esw_bridge_fdb_template,
TP_PROTO(const struct mlx5_esw_bridge_fdb_entry *fdb),
TP_ARGS(fdb),
TP_STRUCT__entry(
__array(char, dev_name, IFNAMSIZ)
__array(unsigned char, addr, ETH_ALEN)
__field(u16, vid)
__field(u16, flags)
__field(unsigned int, used)
),
TP_fast_assign(
strscpy(__entry->dev_name,
netdev_name(fdb->dev),
IFNAMSIZ);
memcpy(__entry->addr, fdb->key.addr, ETH_ALEN);
__entry->vid = fdb->key.vid;
__entry->flags = fdb->flags;
__entry->used = jiffies_to_msecs(jiffies - fdb->lastuse)
),
TP_printk("net_device=%s addr=%pM vid=%hu flags=%hx used=%u",
__entry->dev_name,
__entry->addr,
__entry->vid,
__entry->flags,
__entry->used / 1000)
);
DEFINE_EVENT(mlx5_esw_bridge_fdb_template,
mlx5_esw_bridge_fdb_entry_init,
TP_PROTO(const struct mlx5_esw_bridge_fdb_entry *fdb),
TP_ARGS(fdb)
);
DEFINE_EVENT(mlx5_esw_bridge_fdb_template,
mlx5_esw_bridge_fdb_entry_refresh,
TP_PROTO(const struct mlx5_esw_bridge_fdb_entry *fdb),
TP_ARGS(fdb)
);
DEFINE_EVENT(mlx5_esw_bridge_fdb_template,
mlx5_esw_bridge_fdb_entry_cleanup,
TP_PROTO(const struct mlx5_esw_bridge_fdb_entry *fdb),
TP_ARGS(fdb)
);
DECLARE_EVENT_CLASS(mlx5_esw_bridge_vlan_template,
TP_PROTO(const struct mlx5_esw_bridge_vlan *vlan),
TP_ARGS(vlan),
TP_STRUCT__entry(
__field(u16, vid)
__field(u16, flags)
),
TP_fast_assign(
__entry->vid = vlan->vid;
__entry->flags = vlan->flags;
),
TP_printk("vid=%hu flags=%hx",
__entry->vid,
__entry->flags)
);
DEFINE_EVENT(mlx5_esw_bridge_vlan_template,
mlx5_esw_bridge_vlan_create,
TP_PROTO(const struct mlx5_esw_bridge_vlan *vlan),
TP_ARGS(vlan)
);
DEFINE_EVENT(mlx5_esw_bridge_vlan_template,
mlx5_esw_bridge_vlan_cleanup,
TP_PROTO(const struct mlx5_esw_bridge_vlan *vlan),
TP_ARGS(vlan)
);
DECLARE_EVENT_CLASS(mlx5_esw_bridge_port_template,
TP_PROTO(const struct mlx5_esw_bridge_port *port),
TP_ARGS(port),
TP_STRUCT__entry(
__field(u16, vport_num)
__field(u16, esw_owner_vhca_id)
__field(u16, flags)
),
TP_fast_assign(
__entry->vport_num = port->vport_num;
__entry->esw_owner_vhca_id = port->esw_owner_vhca_id;
Annotation
- Immediate include surface: `linux/tracepoint.h`, `../bridge_priv.h`, `trace/define_trace.h`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.