diff options
| author | Toke Høiland-Jørgensen <[email protected]> | 2024-12-14 16:50:59 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2024-12-17 12:27:29 +0000 |
| commit | ff9f17ce2e53887e74fc0e72711ece42526836ed (patch) | |
| tree | 848ac88ec7184107990e655ede7cbed68856cf6f /net/sched/sch_codel.c | |
| parent | Merge branch 'af_unix-prepare-for-skb-drop-reason' (diff) | |
| download | kernel-ff9f17ce2e53887e74fc0e72711ece42526836ed.tar.gz kernel-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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/sched/sch_codel.c')
| -rw-r--r-- | net/sched/sch_codel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c index 3e8d4fe4d91e..81189d02fee7 100644 --- a/net/sched/sch_codel.c +++ b/net/sched/sch_codel.c @@ -52,7 +52,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); } @@ -89,7 +89,8 @@ static int codel_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, } q = qdisc_priv(sch); q->drop_overlimit++; - return qdisc_drop(skb, sch, to_free); + return qdisc_drop_reason(skb, sch, to_free, + SKB_DROP_REASON_QDISC_OVERLIMIT); } static const struct nla_policy codel_policy[TCA_CODEL_MAX + 1] = { |
