tools/testing/selftests/bpf/progs/mptcp_bpf.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/bpf/progs/mptcp_bpf.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/bpf/progs/mptcp_bpf.h- Extension
.h- Size
- 1244 bytes
- Lines
- 43
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
bpf_experimental.h
Detected Declarations
function list_is_headfunction mptcp_subflow_tcp_sock
Annotated Snippet
#ifndef __MPTCP_BPF_H__
#define __MPTCP_BPF_H__
#include "bpf_experimental.h"
/* list helpers from include/linux/list.h */
static inline int list_is_head(const struct list_head *list,
const struct list_head *head)
{
return list == head;
}
#define list_entry(ptr, type, member) \
container_of(ptr, type, member)
#define list_first_entry(ptr, type, member) \
list_entry((ptr)->next, type, member)
#define list_next_entry(pos, member) \
list_entry((pos)->member.next, typeof(*(pos)), member)
#define list_entry_is_head(pos, head, member) \
list_is_head(&pos->member, (head))
/* small difference: 'can_loop' has been added in the conditions */
#define list_for_each_entry(pos, head, member) \
for (pos = list_first_entry(head, typeof(*pos), member); \
!list_entry_is_head(pos, head, member) && can_loop; \
pos = list_next_entry(pos, member))
/* mptcp helpers from protocol.h */
#define mptcp_for_each_subflow(__msk, __subflow) \
list_for_each_entry(__subflow, &((__msk)->conn_list), node)
static __always_inline struct sock *
mptcp_subflow_tcp_sock(const struct mptcp_subflow_context *subflow)
{
return subflow->tcp_sock;
}
#endif
Annotation
- Immediate include surface: `bpf_experimental.h`.
- Detected declarations: `function list_is_head`, `function mptcp_subflow_tcp_sock`.
- Atlas domain: Support Tooling And Documentation / tools.
- 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.