diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-12-06 05:02:15 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-12-06 05:02:15 +0300 |
commit | 1daa6591ab7d6893cbcd8d02c2dbe43af42d36de (patch) | |
tree | 97ebf8984387b1e5cff56dcc78d05aa986c80264 /include/linux/skbuff.h | |
parent | 5765c7f6e3173eb894889a29963a497aeb721c5e (diff) | |
parent | 1e7e1f0e8be147ae98fe88ec82150c97265965a6 (diff) | |
download | linux-1daa6591ab7d6893cbcd8d02c2dbe43af42d36de.tar.xz |
Merge branch 'net_sched-sch_sfq-reject-limit-of-1'
Octavian Purdila says:
====================
net_sched: sch_sfq: reject limit of 1
The implementation does not properly support limits of 1. Add an
in-kernel check, in addition to existing iproute2 check, since other
tools may be used for configuration.
This patch set also adds a selfcheck to test that a limit of 1 is
rejected.
An alternative (or in addition) we could fix the implementation by
setting q->tail to NULL in sfq_drop if this is the last slot we marked
empty, e.g.:
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -317,8 +317,11 @@ static unsigned int sfq_drop(struct Qdisc *sch, struct sk_buff **to_free)
/* It is difficult to believe, but ALL THE SLOTS HAVE LENGTH 1. */
x = q->tail->next;
slot = &q->slots[x];
- q->tail->next = slot->next;
q->ht[slot->hash] = SFQ_EMPTY_SLOT;
+ if (x == slot->next)
+ q->tail = NULL; /* no more active slots */
+ else
+ q->tail->next = slot->next;
goto drop;
}
====================
Link: https://patch.msgid.link/20241204030520.2084663-1-tavip@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/skbuff.h')
0 files changed, 0 insertions, 0 deletions