Skip to content

net_sched: sch_sfq: reject a derived limit of 1

Octavian Purdila netdev 3 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesApplied 3/3
  2. v23 patches 3 repliesSuperseded
  3. v13 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- remove a couple of unnecessary comments
- rearrange local variables to use reverse Christmas tree style declaration order

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net_sched: sch_sfq: use a temporary work area for validating configurationnet/sched/sch_sfq.c+44 -120 repliesApplied
2/3net_sched: sch_sfq: move the limit validationnet/sched/sch_sfq.c+6 -40 repliesApplied
3/3selftests/tc-testing: sfq: check that a derived limit of 1 is rejectedtools/testing/selftests/tc-testing/tc-tests/qdiscs/sfq.json+36 -00 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchCong Wang
1/3A-b
2/3A-b
3/3A-b

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

Read the v3 thread

Cover letter [PATCH net v3 0/3] net_sched: sch_sfq: reject a derived limit of 1

Because sfq parameters can influence each other there can be situations where although the user sets a limit of 2 it can be lowered to 1:

$ tc qdisc add dev dummy0 handle 1: root sfq limit 2 flows 1 depth 1
$ tc qdisc show dev dummy0
qdisc sfq 1: dev dummy0 root refcnt 2 limit 1p quantum 1514b depth 1 divisor 1024
$ tc qdisc add dev dummy0 handle 1: root sfq limit 2 flows 10 depth 1 divisor 1
$ tc qdisc show dev dummy0
qdisc sfq 2: root refcnt 2 limit 1p quantum 1514b depth 1 divisor 1

As a limit of 1 is invalid, this patch series moves the limit validation to after all configuration changes have been done. To do so, the configuration is done in a temporary work area then applied to the internal state.

The patch series also adds new test cases.

v3:
- remove a couple of unnecessary comments
- rearrange local variables to use reverse Christmas tree style declaration order

v2: https://lore.kernel.org/all/[email protected]/
- remove tmp struct and directly use local variables

v1: https://lore.kernel.org/all/[email protected]/

Octavian Purdila (3):
net_sched: sch_sfq: use a temporary work area for validating
configuration
net_sched: sch_sfq: move the limit validation selftests/tc-testing: sfq: check that a derived limit of 1 is rejected

 net/sched/sch_sfq.c                           | 66 ++++++++++++++-----
 .../tc-testing/tc-tests/qdiscs/sfq.json       | 36 ++++++++++
 2 files changed, 86 insertions(+), 16 deletions(-)
Signature · 1 line
2.49.0.504.g3bcea36a83-goog