Commit 29d2614
committed
Merge branch 'sch_sfq-derived-limit'
Octavian Purdila says:
====================
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]/
===================
Signed-off-by: David S. Miller <[email protected]>2 files changed
+86
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
634 | 643 | | |
635 | 644 | | |
636 | 645 | | |
| |||
652 | 661 | | |
653 | 662 | | |
654 | 663 | | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
| 664 | + | |
659 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
660 | 677 | | |
661 | | - | |
662 | | - | |
| 678 | + | |
| 679 | + | |
663 | 680 | | |
664 | | - | |
| 681 | + | |
665 | 682 | | |
666 | | - | |
667 | | - | |
| 683 | + | |
| 684 | + | |
668 | 685 | | |
669 | 686 | | |
670 | 687 | | |
671 | | - | |
| 688 | + | |
672 | 689 | | |
673 | | - | |
674 | | - | |
| 690 | + | |
675 | 691 | | |
676 | 692 | | |
677 | 693 | | |
678 | 694 | | |
679 | 695 | | |
680 | 696 | | |
681 | | - | |
682 | | - | |
| 697 | + | |
| 698 | + | |
683 | 699 | | |
684 | 700 | | |
685 | | - | |
686 | | - | |
| 701 | + | |
| 702 | + | |
687 | 703 | | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
688 | 722 | | |
689 | 723 | | |
690 | 724 | | |
| |||
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
231 | 267 | | |
232 | 268 | | |
0 commit comments