include/uapi/linux/pkt_sched.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/pkt_sched.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/pkt_sched.h- Extension
.h- Size
- 32337 bytes
- Lines
- 1294
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/const.hlinux/types.h
Detected Declarations
struct tc_statsstruct tc_estimatorstruct tc_ratespecstruct tc_sizespecstruct tc_fifo_qoptstruct tc_skbprio_qoptstruct tc_prio_qoptstruct tc_multiq_qoptstruct tc_plug_qoptstruct tc_tbf_qoptstruct tc_sfq_qoptstruct tc_sfqred_statsstruct tc_sfq_qopt_v1struct tc_sfq_xstatsstruct tc_red_qoptstruct tc_red_xstatsstruct tc_gred_qoptstruct tc_gred_soptstruct tc_choke_qoptstruct tc_choke_xstatsstruct tc_htb_optstruct tc_htb_globstruct tc_htb_xstatsstruct tc_hfsc_qoptstruct tc_service_curvestruct tc_hfsc_statsstruct tc_netem_qoptstruct tc_netem_corrstruct tc_netem_reorderstruct tc_netem_corruptstruct tc_netem_ratestruct tc_netem_slotstruct tc_netem_gimodelstruct tc_netem_gemodelstruct tc_netem_xstatsstruct tc_drr_statsstruct tc_mqprio_qoptstruct tc_sfb_qoptstruct tc_sfb_xstatsstruct tc_qfq_statsstruct tc_codel_xstatsstruct tc_fq_codel_qd_statsstruct tc_fq_codel_cl_statsstruct tc_fq_codel_xstatsstruct tc_fq_qd_statsstruct tc_hhf_xstatsstruct tc_pie_xstatsstruct tc_fq_pie_xstats
Annotated Snippet
struct tc_stats {
__u64 bytes; /* Number of enqueued bytes */
__u32 packets; /* Number of enqueued packets */
__u32 drops; /* Packets dropped because of lack of resources */
__u32 overlimits; /* Number of throttle events when this
* flow goes out of allocated bandwidth */
__u32 bps; /* Current flow byte rate */
__u32 pps; /* Current flow packet rate */
__u32 qlen;
__u32 backlog;
};
struct tc_estimator {
signed char interval;
unsigned char ewma_log;
};
/* "Handles"
---------
All the traffic control objects have 32bit identifiers, or "handles".
They can be considered as opaque numbers from user API viewpoint,
but actually they always consist of two fields: major and
minor numbers, which are interpreted by kernel specially,
that may be used by applications, though not recommended.
F.e. qdisc handles always have minor number equal to zero,
classes (or flows) have major equal to parent qdisc major, and
minor uniquely identifying class inside qdisc.
Macros to manipulate handles:
*/
#define TC_H_MAJ_MASK (0xFFFF0000U)
#define TC_H_MIN_MASK (0x0000FFFFU)
#define TC_H_MAJ(h) ((h)&TC_H_MAJ_MASK)
#define TC_H_MIN(h) ((h)&TC_H_MIN_MASK)
#define TC_H_MAKE(maj,min) (((maj)&TC_H_MAJ_MASK)|((min)&TC_H_MIN_MASK))
#define TC_H_UNSPEC (0U)
#define TC_H_ROOT (0xFFFFFFFFU)
#define TC_H_INGRESS (0xFFFFFFF1U)
#define TC_H_CLSACT TC_H_INGRESS
#define TC_H_MIN_PRIORITY 0xFFE0U
#define TC_H_MIN_INGRESS 0xFFF2U
#define TC_H_MIN_EGRESS 0xFFF3U
/* Need to corrospond to iproute2 tc/tc_core.h "enum link_layer" */
enum tc_link_layer {
TC_LINKLAYER_UNAWARE, /* Indicate unaware old iproute2 util */
TC_LINKLAYER_ETHERNET,
TC_LINKLAYER_ATM,
};
#define TC_LINKLAYER_MASK 0x0F /* limit use to lower 4 bits */
struct tc_ratespec {
unsigned char cell_log;
__u8 linklayer; /* lower 4 bits */
unsigned short overhead;
short cell_align;
unsigned short mpu;
__u32 rate;
};
#define TC_RTAB_SIZE 1024
struct tc_sizespec {
unsigned char cell_log;
unsigned char size_log;
short cell_align;
int overhead;
unsigned int linklayer;
unsigned int mpu;
unsigned int mtu;
unsigned int tsize;
};
enum {
TCA_STAB_UNSPEC,
TCA_STAB_BASE,
TCA_STAB_DATA,
__TCA_STAB_MAX
};
#define TCA_STAB_MAX (__TCA_STAB_MAX - 1)
/* FIFO section */
Annotation
- Immediate include surface: `linux/const.h`, `linux/types.h`.
- Detected declarations: `struct tc_stats`, `struct tc_estimator`, `struct tc_ratespec`, `struct tc_sizespec`, `struct tc_fifo_qopt`, `struct tc_skbprio_qopt`, `struct tc_prio_qopt`, `struct tc_multiq_qopt`, `struct tc_plug_qopt`, `struct tc_tbf_qopt`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.