/* SPDX-License-Identifier: GPL-2.0-or-later */12#ifndef _LINUX_DROPREASON_QDISC_H3#define _LINUX_DROPREASON_QDISC_H4#include <net/dropreason.h>56#define DEFINE_QDISC_DROP_REASON(FN, FNe) \7FN(UNSPEC) \8FN(GENERIC) \9FN(OVERLIMIT) \10FN(CONGESTED) \11FN(MAXFLOWS) \12FN(FLOOD_PROTECTION) \13FN(BAND_LIMIT) \14FN(HORIZON_LIMIT) \15FN(FLOW_LIMIT) \16FN(L4S_STEP_NON_ECN) \17FNe(MAX)1819#undef FN20#undef FNe21#define FN(reason) QDISC_DROP_##reason,22#define FNe(reason) QDISC_DROP_##reason2324/**25* enum qdisc_drop_reason - reason why a qdisc dropped a packet26*27* Qdisc-specific drop reasons for packet drops that occur within the28* traffic control (TC) queueing discipline layer. These reasons provide29* detailed diagnostics about why packets were dropped by various qdisc30* algorithms, enabling fine-grained monitoring and troubleshooting of31* queue behavior.32*/33enum qdisc_drop_reason {34/**35* @QDISC_DROP_UNSPEC: unspecified/invalid qdisc drop reason.36* Value 0 serves as analogous to SKB_NOT_DROPPED_YET for enum skb_drop_reason.37* Used for catching zero-initialized drop_reason fields.38*/39QDISC_DROP_UNSPEC = 0,40/**41* @__QDISC_DROP_REASON: subsystem base value for qdisc drop reasons42*/43__QDISC_DROP_REASON = SKB_DROP_REASON_SUBSYS_QDISC <<44SKB_DROP_REASON_SUBSYS_SHIFT,45/**46* @QDISC_DROP_GENERIC: generic/default qdisc drop, used when no47* more specific reason applies48*/49QDISC_DROP_GENERIC,50/**51* @QDISC_DROP_OVERLIMIT: packet dropped because the qdisc queue52* length exceeded its configured limit (sch->limit). This typically53* indicates the queue is full and cannot accept more packets.54*/55QDISC_DROP_OVERLIMIT,56/**57* @QDISC_DROP_CONGESTED: packet dropped due to active congestion58* control algorithms (e.g., CoDel, PIE, RED) detecting network59* congestion. The qdisc proactively dropped the packet to signal60* congestion to the sender and prevent bufferbloat.61*/62QDISC_DROP_CONGESTED,63/**64* @QDISC_DROP_MAXFLOWS: packet dropped because the qdisc's flow65* tracking table is full and no free slots are available to allocate66* for a new flow. This indicates flow table exhaustion in flow-based67* qdiscs that maintain per-flow state (e.g., SFQ).68*/69QDISC_DROP_MAXFLOWS,70/**71* @QDISC_DROP_FLOOD_PROTECTION: packet dropped by flood protection72* mechanism detecting unresponsive flows (potential DoS/flood).73* Used by qdiscs implementing probabilistic drop algorithms like74* BLUE (e.g., CAKE's Cobalt AQM).75*/76QDISC_DROP_FLOOD_PROTECTION,77/**78* @QDISC_DROP_BAND_LIMIT: packet dropped because the priority band's79* limit was reached. Used by qdiscs with priority bands that have80* per-band packet limits (e.g., FQ).81*/82QDISC_DROP_BAND_LIMIT,83/**84* @QDISC_DROP_HORIZON_LIMIT: packet dropped because its timestamp85* is too far in the future (beyond the configured horizon).86* Used by qdiscs with time-based scheduling (e.g., FQ).87*/88QDISC_DROP_HORIZON_LIMIT,89/**90* @QDISC_DROP_FLOW_LIMIT: packet dropped because an individual flow91* exceeded its per-flow packet/depth limit. Used by FQ and SFQ qdiscs92* to enforce per-flow fairness and prevent a single flow from93* monopolizing queue resources.94*/95QDISC_DROP_FLOW_LIMIT,96/**97* @QDISC_DROP_L4S_STEP_NON_ECN: DualPI2 qdisc dropped a non-ECN-capable98* packet because the L4S queue delay exceeded the step threshold.99* Since the packet cannot be ECN-marked, it must be dropped to signal100* congestion. See RFC 9332 for the DualQ Coupled AQM step mechanism.101*/102QDISC_DROP_L4S_STEP_NON_ECN,103/**104* @QDISC_DROP_MAX: the maximum of qdisc drop reasons, which105* shouldn't be used as a real 'reason' - only for tracing code gen106*/107QDISC_DROP_MAX,108};109110#undef FN111#undef FNe112113#endif114115116