drivers/net/ethernet/intel/ice/ice_trace.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/ice/ice_trace.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/ice/ice_trace.h- Extension
.h- Size
- 11196 bytes
- Lines
- 365
- 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.hice_eswitch_br.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 ice
/* See trace-events-sample.h for a detailed description of why this
* guard clause is different from most normal include files.
*/
#if !defined(_ICE_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
#define _ICE_TRACE_H_
#include <linux/tracepoint.h>
#include "ice_eswitch_br.h"
/* ice_trace() macro enables shared code to refer to trace points
* like:
*
* trace_ice_example(args...)
*
* ... as:
*
* ice_trace(example, args...)
*
* ... to resolve to the PF version of the tracepoint without
* ifdefs, and to allow tracepoints to be disabled entirely at build
* time.
*
* Trace point should always be referred to in the driver via this
* macro.
*
* Similarly, ice_trace_enabled(trace_name) wraps references to
* trace_ice_<trace_name>_enabled() functions.
* @trace_name: name of tracepoint
*/
#define _ICE_TRACE_NAME(trace_name) (trace_##ice##_##trace_name)
#define ICE_TRACE_NAME(trace_name) _ICE_TRACE_NAME(trace_name)
#define ice_trace(trace_name, args...) ICE_TRACE_NAME(trace_name)(args)
#define ice_trace_enabled(trace_name) ICE_TRACE_NAME(trace_name##_enabled)()
/* This is for events common to PF. Corresponding versions will be named
* trace_ice_*. The ice_trace() macro above will select the right trace point
* name for the driver.
*/
/* Begin tracepoints */
/* Global tracepoints */
/* Events related to DIM, q_vectors and ring containers */
DECLARE_EVENT_CLASS(ice_rx_dim_template,
TP_PROTO(struct ice_q_vector *q_vector, struct dim *dim),
TP_ARGS(q_vector, dim),
TP_STRUCT__entry(__field(struct ice_q_vector *, q_vector)
__field(struct dim *, dim)
__string(devname, q_vector->rx.rx_ring->netdev->name)),
TP_fast_assign(__entry->q_vector = q_vector;
__entry->dim = dim;
__assign_str(devname);),
TP_printk("netdev: %s Rx-Q: %d dim-state: %d dim-profile: %d dim-tune: %d dim-st-right: %d dim-st-left: %d dim-tired: %d",
__get_str(devname),
__entry->q_vector->rx.rx_ring->q_index,
__entry->dim->state,
__entry->dim->profile_ix,
__entry->dim->tune_state,
__entry->dim->steps_right,
__entry->dim->steps_left,
__entry->dim->tired)
);
DEFINE_EVENT(ice_rx_dim_template, ice_rx_dim_work,
TP_PROTO(struct ice_q_vector *q_vector, struct dim *dim),
TP_ARGS(q_vector, dim)
);
DECLARE_EVENT_CLASS(ice_tx_dim_template,
TP_PROTO(struct ice_q_vector *q_vector, struct dim *dim),
TP_ARGS(q_vector, dim),
TP_STRUCT__entry(__field(struct ice_q_vector *, q_vector)
__field(struct dim *, dim)
__string(devname, q_vector->tx.tx_ring->netdev->name)),
TP_fast_assign(__entry->q_vector = q_vector;
__entry->dim = dim;
__assign_str(devname);),
TP_printk("netdev: %s Tx-Q: %d dim-state: %d dim-profile: %d dim-tune: %d dim-st-right: %d dim-st-left: %d dim-tired: %d",
__get_str(devname),
__entry->q_vector->tx.tx_ring->q_index,
Annotation
- Immediate include surface: `linux/tracepoint.h`, `ice_eswitch_br.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.