drivers/net/thunderbolt/trace.h
Source file repositories/reference/linux-study-clean/drivers/net/thunderbolt/trace.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/thunderbolt/trace.h- Extension
.h- Size
- 3773 bytes
- Lines
- 142
- 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
linux/dma-direction.hlinux/skbuff.hlinux/tracepoint.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 thunderbolt_net
#if !defined(__TRACE_THUNDERBOLT_NET_H) || defined(TRACE_HEADER_MULTI_READ)
#define __TRACE_THUNDERBOLT_NET_H
#include <linux/dma-direction.h>
#include <linux/skbuff.h>
#include <linux/tracepoint.h>
#define DMA_DATA_DIRECTION_NAMES \
{ DMA_BIDIRECTIONAL, "DMA_BIDIRECTIONAL" }, \
{ DMA_TO_DEVICE, "DMA_TO_DEVICE" }, \
{ DMA_FROM_DEVICE, "DMA_FROM_DEVICE" }, \
{ DMA_NONE, "DMA_NONE" }
DECLARE_EVENT_CLASS(tbnet_frame,
TP_PROTO(unsigned int index, const void *page, dma_addr_t phys,
enum dma_data_direction dir),
TP_ARGS(index, page, phys, dir),
TP_STRUCT__entry(
__field(unsigned int, index)
__field(const void *, page)
__field(dma_addr_t, phys)
__field(enum dma_data_direction, dir)
),
TP_fast_assign(
__entry->index = index;
__entry->page = page;
__entry->phys = phys;
__entry->dir = dir;
),
TP_printk("index=%u page=%p phys=%pad dir=%s",
__entry->index, __entry->page, &__entry->phys,
__print_symbolic(__entry->dir, DMA_DATA_DIRECTION_NAMES))
);
DEFINE_EVENT(tbnet_frame, tbnet_alloc_rx_frame,
TP_PROTO(unsigned int index, const void *page, dma_addr_t phys,
enum dma_data_direction dir),
TP_ARGS(index, page, phys, dir)
);
DEFINE_EVENT(tbnet_frame, tbnet_alloc_tx_frame,
TP_PROTO(unsigned int index, const void *page, dma_addr_t phys,
enum dma_data_direction dir),
TP_ARGS(index, page, phys, dir)
);
DEFINE_EVENT(tbnet_frame, tbnet_free_frame,
TP_PROTO(unsigned int index, const void *page, dma_addr_t phys,
enum dma_data_direction dir),
TP_ARGS(index, page, phys, dir)
);
DECLARE_EVENT_CLASS(tbnet_ip_frame,
TP_PROTO(__le32 size, __le16 id, __le16 index, __le32 count),
TP_ARGS(size, id, index, count),
TP_STRUCT__entry(
__field(u32, size)
__field(u16, id)
__field(u16, index)
__field(u32, count)
),
TP_fast_assign(
__entry->size = le32_to_cpu(size);
__entry->id = le16_to_cpu(id);
__entry->index = le16_to_cpu(index);
__entry->count = le32_to_cpu(count);
),
TP_printk("id=%u size=%u index=%u count=%u",
__entry->id, __entry->size, __entry->index, __entry->count)
);
DEFINE_EVENT(tbnet_ip_frame, tbnet_rx_ip_frame,
TP_PROTO(__le32 size, __le16 id, __le16 index, __le32 count),
TP_ARGS(size, id, index, count)
);
DEFINE_EVENT(tbnet_ip_frame, tbnet_invalid_rx_ip_frame,
TP_PROTO(__le32 size, __le16 id, __le16 index, __le32 count),
TP_ARGS(size, id, index, count)
);
DEFINE_EVENT(tbnet_ip_frame, tbnet_tx_ip_frame,
TP_PROTO(__le32 size, __le16 id, __le16 index, __le32 count),
TP_ARGS(size, id, index, count)
);
DECLARE_EVENT_CLASS(tbnet_skb,
Annotation
- Immediate include surface: `linux/dma-direction.h`, `linux/skbuff.h`, `linux/tracepoint.h`, `trace/define_trace.h`.
- 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.