Skip to content

net_sched: sch_sfq: reject limit of 1

Octavian Purdila netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net_sched: sch_sfq: don't allow 1 packet limitnet/sched/sch_sfq.c+4 -01 replyApplied
2/2selftests/tc-testing: sfq: test that kernel rejects limit of 1tools/testing/selftests/tc-testing/scripts/sfq_rejects_limit_1.py tools/testing/selftests/tc-testing/tc-tests/qdiscs/sfq.json+41 -00 repliesApplied

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchEric Dumazet
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/2] 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;
          }

Octavian Purdila (2):
net_sched: sch_sfq: don't allow 1 packet limit selftests/tc-testing: sfq: test that kernel rejects limit of 1

 net/sched/sch_sfq.c                           |  4 ++++
 .../tc-testing/scripts/sfq_rejects_limit_1.py | 21 +++++++++++++++++++
 .../tc-testing/tc-tests/qdiscs/sfq.json       | 20 ++++++++++++++++++
 3 files changed, 45 insertions(+)
 create mode 100755 tools/testing/selftests/tc-testing/scripts/sfq_rejects_limit_1.py
Signature · 1 line
2.47.0.338.g60cca15819-goog