net/xfrm/trace_iptfs.h
Source file repositories/reference/linux-study-clean/net/xfrm/trace_iptfs.h
File Facts
- System
- Linux kernel
- Corpus path
net/xfrm/trace_iptfs.h- Extension
.h- Size
- 8510 bytes
- Lines
- 219
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/skbuff.hlinux/tracepoint.hnet/ip.htrace/define_trace.h
Detected Declarations
struct xfrm_iptfs_data
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM iptfs
#if !defined(_TRACE_IPTFS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_IPTFS_H
#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/tracepoint.h>
#include <net/ip.h>
struct xfrm_iptfs_data;
TRACE_EVENT(iptfs_egress_recv,
TP_PROTO(struct sk_buff *skb, struct xfrm_iptfs_data *xtfs, u16 blkoff),
TP_ARGS(skb, xtfs, blkoff),
TP_STRUCT__entry(__field(struct sk_buff *, skb)
__field(void *, head)
__field(void *, head_pg_addr)
__field(void *, pg0addr)
__field(u32, skb_len)
__field(u32, data_len)
__field(u32, headroom)
__field(u32, tailroom)
__field(u32, tail)
__field(u32, end)
__field(u32, pg0off)
__field(u8, head_frag)
__field(u8, frag_list)
__field(u8, nr_frags)
__field(u16, blkoff)),
TP_fast_assign(__entry->skb = skb;
__entry->head = skb->head;
__entry->skb_len = skb->len;
__entry->data_len = skb->data_len;
__entry->headroom = skb_headroom(skb);
__entry->tailroom = skb_tailroom(skb);
__entry->tail = (u32)skb->tail;
__entry->end = (u32)skb->end;
__entry->head_frag = skb->head_frag;
__entry->frag_list = (bool)skb_shinfo(skb)->frag_list;
__entry->nr_frags = skb_shinfo(skb)->nr_frags;
__entry->blkoff = blkoff;
__entry->head_pg_addr = page_address(virt_to_head_page(skb->head));
__entry->pg0addr = (__entry->nr_frags
? page_address(netmem_to_page(skb_shinfo(skb)->frags[0].netmem))
: NULL);
__entry->pg0off = (__entry->nr_frags
? skb_shinfo(skb)->frags[0].offset
: 0);
),
TP_printk("EGRESS: skb=%p len=%u data_len=%u headroom=%u head_frag=%u frag_list=%u nr_frags=%u blkoff=%u\n\t\ttailroom=%u tail=%u end=%u head=%p hdpgaddr=%p pg0->addr=%p pg0->data=%p pg0->off=%u",
__entry->skb, __entry->skb_len, __entry->data_len, __entry->headroom,
__entry->head_frag, __entry->frag_list, __entry->nr_frags, __entry->blkoff,
__entry->tailroom, __entry->tail, __entry->end, __entry->head,
__entry->head_pg_addr, __entry->pg0addr, __entry->pg0addr + __entry->pg0off,
__entry->pg0off)
)
DECLARE_EVENT_CLASS(iptfs_ingress_preq_event,
TP_PROTO(struct sk_buff *skb, struct xfrm_iptfs_data *xtfs,
u32 pmtu, u8 was_gso),
TP_ARGS(skb, xtfs, pmtu, was_gso),
TP_STRUCT__entry(__field(struct sk_buff *, skb)
__field(u32, skb_len)
__field(u32, data_len)
__field(u32, pmtu)
__field(u32, queue_size)
__field(u32, proto_seq)
__field(u8, proto)
__field(u8, was_gso)
),
TP_fast_assign(__entry->skb = skb;
__entry->skb_len = skb->len;
__entry->data_len = skb->data_len;
__entry->queue_size =
xtfs->cfg.max_queue_size - xtfs->queue_size;
__entry->proto = __trace_ip_proto(ip_hdr(skb));
__entry->proto_seq = __trace_ip_proto_seq(ip_hdr(skb));
__entry->pmtu = pmtu;
__entry->was_gso = was_gso;
),
TP_printk("INGRPREQ: skb=%p len=%u data_len=%u qsize=%u proto=%u proto_seq=%u pmtu=%u was_gso=%u",
__entry->skb, __entry->skb_len, __entry->data_len,
__entry->queue_size, __entry->proto, __entry->proto_seq,
__entry->pmtu, __entry->was_gso));
DEFINE_EVENT(iptfs_ingress_preq_event, iptfs_enqueue,
TP_PROTO(struct sk_buff *skb, struct xfrm_iptfs_data *xtfs, u32 pmtu, u8 was_gso),
TP_ARGS(skb, xtfs, pmtu, was_gso));
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/skbuff.h`, `linux/tracepoint.h`, `net/ip.h`, `trace/define_trace.h`.
- Detected declarations: `struct xfrm_iptfs_data`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- 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.