aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/sched/sch_fq_codel.c
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@redhat.com>2024-12-14 17:50:59 +0100
committerPaolo Abeni <pabeni@redhat.com>2024-12-17 13:27:29 +0100
commitff9f17ce2e53887e74fc0e72711ece42526836ed (patch)
tree848ac88ec7184107990e655ede7cbed68856cf6f /net/sched/sch_fq_codel.c
parentMerge branch 'af_unix-prepare-for-skb-drop-reason' (diff)
downloadwireguard-linux-ff9f17ce2e53887e74fc0e72711ece42526836ed.tar.xz
wireguard-linux-ff9f17ce2e53887e74fc0e72711ece42526836ed.zip
net/sched: Add drop reasons for AQM-based qdiscs
Now that we have generic QDISC_CONGESTED and QDISC_OVERLIMIT drop reasons, let's have all the qdiscs that contain an AQM apply them consistently when dropping packets. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://patch.msgid.link/20241214-fq-codel-drop-reasons-v1-1-2a814e884c37@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/sched/sch_fq_codel.c')
-rw-r--r--net/sched/sch_fq_codel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 4f908c11ba95..799f5397ad4c 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -168,6 +168,7 @@ static unsigned int fq_codel_drop(struct Qdisc *sch, unsigned int max_packets,
skb = dequeue_head(flow);
len += qdisc_pkt_len(skb);
mem += get_codel_cb(skb)->mem_usage;
+ tcf_set_drop_reason(skb, SKB_DROP_REASON_QDISC_OVERLIMIT);
__qdisc_drop(skb, to_free);
} while (++i < max_packets && len < threshold);
@@ -274,7 +275,7 @@ static void drop_func(struct sk_buff *skb, void *ctx)
{
struct Qdisc *sch = ctx;
- kfree_skb(skb);
+ kfree_skb_reason(skb, SKB_DROP_REASON_QDISC_CONGESTED);
qdisc_qstats_drop(sch);
}