include/net/fq.h
Source file repositories/reference/linux-study-clean/include/net/fq.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/fq.h- Extension
.h- Size
- 2470 bytes
- Lines
- 102
- 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/skbuff.hlinux/spinlock.hlinux/types.h
Detected Declarations
struct fq_tinstruct fq_flowstruct fq_tinstruct fq
Annotated Snippet
struct fq_flow {
struct fq_tin *tin;
struct list_head flowchain;
struct sk_buff_head queue;
u32 backlog;
int deficit;
};
/**
* struct fq_tin - a logical container of fq_flows
*
* Used to group fq_flows into a logical aggregate. DRR++ scheme is used to
* pull interleaved packets out of the associated flows.
*
* @new_flows: linked list of fq_flow
* @old_flows: linked list of fq_flow
*/
struct fq_tin {
struct list_head new_flows;
struct list_head old_flows;
struct list_head tin_list;
struct fq_flow default_flow;
u32 backlog_bytes;
u32 backlog_packets;
u32 overlimit;
u32 collisions;
u32 flows;
u32 tx_bytes;
u32 tx_packets;
};
/**
* struct fq - main container for fair queuing purposes
*
* @limit: max number of packets that can be queued across all flows
* @backlog: number of packets queued across all flows
*/
struct fq {
struct fq_flow *flows;
unsigned long *flows_bitmap;
struct list_head tin_backlog;
spinlock_t lock;
u32 flows_cnt;
u32 limit;
u32 memory_limit;
u32 memory_usage;
u32 quantum;
u32 backlog;
u32 overlimit;
u32 overmemory;
u32 collisions;
};
typedef struct sk_buff *fq_tin_dequeue_t(struct fq *,
struct fq_tin *,
struct fq_flow *flow);
typedef void fq_skb_free_t(struct fq *,
struct fq_tin *,
struct fq_flow *,
struct sk_buff *);
/* Return %true to filter (drop) the frame. */
typedef bool fq_skb_filter_t(struct fq *,
struct fq_tin *,
struct fq_flow *,
struct sk_buff *,
void *);
#endif
Annotation
- Immediate include surface: `linux/skbuff.h`, `linux/spinlock.h`, `linux/types.h`.
- Detected declarations: `struct fq_tin`, `struct fq_flow`, `struct fq_tin`, `struct fq`.
- 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.