]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: sched: rename QDISC_DROP_CAKE_FLOOD to QDISC_DROP_FLOOD_PROTECTION
authorJesper Dangaard Brouer <hawk@kernel.org>
Thu, 26 Feb 2026 13:44:35 +0000 (14:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 28 Feb 2026 23:31:35 +0000 (15:31 -0800)
Rename QDISC_DROP_CAKE_FLOOD to QDISC_DROP_FLOOD_PROTECTION to use a
generic name without embedding the qdisc name. This follows the
principle that drop reasons should describe the drop mechanism rather
than being tied to a specific qdisc implementation.

The flood protection drop reason is used by qdiscs implementing
probabilistic drop algorithms (like BLUE) that detect unresponsive
flows indicating potential DoS or flood attacks. CAKE uses this via
its Cobalt AQM component.

Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://patch.msgid.link/177211347537.3011628.13759059534638729639.stgit@firesoul
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/dropreason-qdisc.h
net/sched/sch_cake.c

index a167302e79e5fb01b0571e88ac83523095ec1d26..84f19a51382c38fb8f97c508606e69fd5ac802ca 100644 (file)
@@ -10,7 +10,7 @@
        FN(OVERLIMIT)                   \
        FN(CONGESTED)                   \
        FN(MAXFLOWS)                    \
-       FN(CAKE_FLOOD)                  \
+       FN(FLOOD_PROTECTION)            \
        FN(BAND_LIMIT)          \
        FN(HORIZON_LIMIT)               \
        FN(FLOW_LIMIT)                  \
@@ -68,11 +68,12 @@ enum qdisc_drop_reason {
         */
        QDISC_DROP_MAXFLOWS,
        /**
-        * @QDISC_DROP_CAKE_FLOOD: CAKE qdisc dropped packet due to flood
-        * protection mechanism (BLUE algorithm). This indicates potential
-        * DoS/flood attack or unresponsive flow behavior.
+        * @QDISC_DROP_FLOOD_PROTECTION: packet dropped by flood protection
+        * mechanism detecting unresponsive flows (potential DoS/flood).
+        * Used by qdiscs implementing probabilistic drop algorithms like
+        * BLUE (e.g., CAKE's Cobalt AQM).
         */
-       QDISC_DROP_CAKE_FLOOD,
+       QDISC_DROP_FLOOD_PROTECTION,
        /**
         * @QDISC_DROP_BAND_LIMIT: packet dropped because the priority band's
         * limit was reached. Used by qdiscs with priority bands that have
index ca00fba7e451a1dc2f76e82974037592a49e5100..a64d27476231c2b2d47785783846e29ccde912d2 100644 (file)
@@ -573,7 +573,7 @@ static enum qdisc_drop_reason cobalt_should_drop(struct cobalt_vars *vars,
        /* Simple BLUE implementation.  Lack of ECN is deliberate. */
        if (vars->p_drop && reason == QDISC_DROP_UNSPEC &&
            get_random_u32() < vars->p_drop)
-               reason = QDISC_DROP_CAKE_FLOOD;
+               reason = QDISC_DROP_FLOOD_PROTECTION;
 
        /* Overload the drop_next field as an activity timeout */
        if (!vars->count)