/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _UAPI__LINUX_PKT_SCHED_H #define _UAPI__LINUX_PKT_SCHED_H
#include <linux/const.h> #include <linux/types.h>
/* Logical priority bands not depending on specific packet scheduler. Everyschedulerwillmapthemtorealtrafficclasses,ifithas nomoreprecisemechanismtoclassifypackets.
/* Generic queue statistics, available for all the elements. Particularschedulersmayhavealsotheirprivaterecords.
*/
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_plug_qopt { /* TCQ_PLUG_BUFFER: Inset a plug into the queue and *bufferanyincomingpackets *TCQ_PLUG_RELEASE_ONE:Dequeuepacketsfromqueuehead *tobeginningofthenextplug. *TCQ_PLUG_RELEASE_INDEFINITE:Dequeueallpacketsfromqueue. *StopbufferingpacketsuntilthenextTCQ_PLUG_BUFFER *commandisreceived(justactasapass-thruqueue). *TCQ_PLUG_LIMIT:Increase/decreasequeuesize
*/ int action;
__u32 limit;
};
struct tc_red_qopt {
__u32 limit; /* HARD maximal queue length (bytes) */
__u32 qth_min; /* Min average length threshold (bytes) */
__u32 qth_max; /* Max average length threshold (bytes) */ unsignedchar Wlog; /* log(W) */ unsignedchar Plog; /* log(P_max/(qth_max-qth_min)) */ unsignedchar Scell_log; /* cell size for idle damping */
/* This field can be used for flags that a RED-like qdisc has *historicallysupported.E.g.whenconfiguringRED,itcanbeusedfor *ECN,HARDDROPandADAPTATIVE.ForSFQitcanbeusedforECN, *HARDDROP.Etc.Becausethisfieldhasnotbeenvalidated,andis *copiedbackondump,anybitsbesidesthosetowhichagivenqdisc *hasassignedahistoricalmeaningneedtobeconsideredforfreeuse *byuserspacetools. * *Anyfurtherflagsneedtobepasseddifferently,e.g.throughan *attribute(suchasTCA_RED_FLAGSabove).Suchattributeshouldallow *passingbothrecentandhistoricflagsinonevalue.
*/ unsignedchar flags; #define TC_RED_ECN 1 #define TC_RED_HARDDROP 2 #define TC_RED_ADAPTATIVE 4 #define TC_RED_NODROP 8
};
struct tc_htb_xstats {
__u32 lends;
__u32 borrows;
__u32 giants; /* unused since 'Make HTB scheduler work with TSO.' */
__s32 tokens;
__s32 ctokens;
};
/* HFSC section */
struct tc_hfsc_qopt {
__u16 defcls; /* default class */
};
struct tc_service_curve {
__u32 m1; /* slope of the first segment in bps */
__u32 d; /* x-projection of the first segment in us */
__u32 m2; /* slope of the second segment in bps */
};
struct tc_hfsc_stats {
__u64 work; /* total work done */
__u64 rtwork; /* work done by real-time criteria */
__u32 period; /* current period */
__u32 level; /* class level in hierarchy */
};
/* *Note:increment,decrementareQ0.16fixed-pointvalues.
*/ struct tc_sfb_qopt {
__u32 rehash_interval; /* delay between hash move, in ms */
__u32 warmup_time; /* double buffering warmup time in ms (warmup_time < rehash_interval) */
__u32 max; /* max len of qlen_min */
__u32 bin_size; /* maximum queue length per bin */
__u32 increment; /* probability increment, (d1 in Blue) */
__u32 decrement; /* probability decrement, (d2 in Blue) */
__u32 limit; /* max SFB queue length */
__u32 penalty_rate; /* inelastic flows are rate limited to 'rate' pps */
__u32 penalty_burst;
};
struct tc_codel_xstats {
__u32 maxpacket; /* largest packet we've seen so far */
__u32 count; /* how many drops we've done since the last time we *entereddroppingstate
*/
__u32 lastcount; /* count at entry to dropping state */
__u32 ldelay; /* in-queue delay seen by most recently dequeued packet */
__s32 drop_next; /* time to drop next packet */
__u32 drop_overlimit; /* number of time max qdisc packet limit was hit */
__u32 ecn_mark; /* number of packets we ECN marked instead of dropped */
__u32 dropping; /* are we in dropping state ? */
__u32 ce_mark; /* number of CE marked packets because of ce_threshold */
};
struct tc_fq_codel_qd_stats {
__u32 maxpacket; /* largest packet we've seen so far */
__u32 drop_overlimit; /* number of time max qdisc *packetlimitwashit
*/
__u32 ecn_mark; /* number of packets we ECN marked *insteadofbeingdropped
*/
__u32 new_flow_count; /* number of time packets *createda'newflow'
*/
__u32 new_flows_len; /* count of flows in new list */
__u32 old_flows_len; /* count of flows in old list */
__u32 ce_mark; /* packets above ce_threshold */
__u32 memory_usage; /* in bytes */
__u32 drop_overmemory;
};
struct tc_fq_codel_cl_stats {
__s32 deficit;
__u32 ldelay; /* in-queue delay seen by most recently *dequeuedpacket
*/
__u32 count;
__u32 lastcount;
__u32 dropping;
__s32 drop_next;
};
struct tc_hhf_xstats {
__u32 drop_overlimit; /* number of times max qdisc packet limit *washit
*/
__u32 hh_overlimit; /* number of times max heavy-hitters was hit */
__u32 hh_tot_count; /* number of captured heavy-hitters so far */
__u32 hh_cur_count; /* number of current heavy-hitters */
};
struct tc_pie_xstats {
__u64 prob; /* current probability */
__u32 delay; /* current delay in ms */
__u32 avg_dq_rate; /* current average dq_rate in *bits/pie_time
*/
__u32 dq_rate_estimating; /* is avg_dq_rate being calculated? */
__u32 packets_in; /* total number of packets enqueued */
__u32 dropped; /* packets dropped due to pie_action */
__u32 overlimit; /* dropped due to lack of space *inqueue
*/
__u32 maxq; /* maximum queue size */
__u32 ecn_mark; /* packets marked with ecn*/
};
struct tc_fq_pie_xstats {
__u32 packets_in; /* total number of packets enqueued */
__u32 dropped; /* packets dropped due to fq_pie_action */
__u32 overlimit; /* dropped due to lack of space in queue */
__u32 overmemory; /* dropped due to lack of memory in queue */
__u32 ecn_mark; /* packets marked with ecn */
__u32 new_flow_count; /* count of new flows created by packets */
__u32 new_flows_len; /* count of flows in new list */
__u32 old_flows_len; /* count of flows in old list */
__u32 memory_usage; /* total memory across all queues */
};
/* The format for schedule entry list is: *[TCA_TAPRIO_SCHED_ENTRY_LIST] *[TCA_TAPRIO_SCHED_ENTRY] *[TCA_TAPRIO_SCHED_ENTRY_CMD] *[TCA_TAPRIO_SCHED_ENTRY_GATES] *[TCA_TAPRIO_SCHED_ENTRY_INTERVAL]
*/ enum {
TCA_TAPRIO_SCHED_UNSPEC,
TCA_TAPRIO_SCHED_ENTRY,
__TCA_TAPRIO_SCHED_MAX,
};
/* The format for the admin sched (dump only): *[TCA_TAPRIO_SCHED_ADMIN_SCHED] *[TCA_TAPRIO_ATTR_SCHED_BASE_TIME] *[TCA_TAPRIO_ATTR_SCHED_ENTRY_LIST] *[TCA_TAPRIO_ATTR_SCHED_ENTRY] *[TCA_TAPRIO_ATTR_SCHED_ENTRY_CMD] *[TCA_TAPRIO_ATTR_SCHED_ENTRY_GATES] *[TCA_TAPRIO_ATTR_SCHED_ENTRY_INTERVAL]
*/
enum {
TCA_DUALPI2_UNSPEC,
TCA_DUALPI2_LIMIT, /* Packets */
TCA_DUALPI2_MEMORY_LIMIT, /* Bytes */
TCA_DUALPI2_TARGET, /* us */
TCA_DUALPI2_TUPDATE, /* us */
TCA_DUALPI2_ALPHA, /* Hz scaled up by 256 */
TCA_DUALPI2_BETA, /* Hz scaled up by 256 */
TCA_DUALPI2_STEP_THRESH_PKTS, /* Step threshold in packets */
TCA_DUALPI2_STEP_THRESH_US, /* Step threshold in microseconds */
TCA_DUALPI2_MIN_QLEN_STEP, /* Minimum qlen to apply STEP_THRESH */
TCA_DUALPI2_COUPLING, /* Coupling factor between queues */
TCA_DUALPI2_DROP_OVERLOAD, /* Whether to drop on overload */
TCA_DUALPI2_DROP_EARLY, /* Whether to drop on enqueue */
TCA_DUALPI2_C_PROTECTION, /* Percentage */
TCA_DUALPI2_ECN_MASK, /* L4S queue classification mask */
TCA_DUALPI2_SPLIT_GSO, /* Split GSO packets at enqueue */
TCA_DUALPI2_PAD,
__TCA_DUALPI2_MAX
};
#define TCA_DUALPI2_MAX (__TCA_DUALPI2_MAX - 1)
struct tc_dualpi2_xstats {
__u32 prob; /* current probability */
__u32 delay_c; /* current delay in C queue */
__u32 delay_l; /* current delay in L queue */
__u32 packets_in_c; /* number of packets enqueued in C queue */
__u32 packets_in_l; /* number of packets enqueued in L queue */
__u32 maxq; /* maximum queue size */
__u32 ecn_mark; /* packets marked with ecn*/
__u32 step_marks; /* ECN marks due to the step AQM */
__s32 credit; /* current c_protection credit */
__u32 memory_used; /* Memory used by both queues */
__u32 max_memory_used; /* Maximum used memory */
__u32 memory_limit; /* Memory limit of both queues */
};
#endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.25 Sekunden
(vorverarbeitet am 2026-10-01)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.