]> git.baikalelectronics.ru Git - kernel.git/commit
net/sched: sch_ets: properly init all active DRR list handles
authorDavide Caratti <dcaratti@redhat.com>
Thu, 7 Oct 2021 13:05:02 +0000 (15:05 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Oct 2021 14:20:05 +0000 (15:20 +0100)
commit0a1135301f92baea9d1244282a0185119145f788
treeb0ec4b187a3f0f4098b65915d413d0620378f277
parent8d32d003a2f93247d26d0a81d30f695e0c50be40
net/sched: sch_ets: properly init all active DRR list handles

leaf classes of ETS qdiscs are served in strict priority or deficit round
robin (DRR), depending on the value of 'nstrict'. Since this value can be
changed while traffic is running, we need to be sure that the active list
of DRR classes can be updated at any time, so:

1) call INIT_LIST_HEAD(&alist) on all leaf classes in .init(), before the
   first packet hits any of them.
2) ensure that 'alist' is not overwritten with zeros when a leaf class is
   no more strict priority nor DRR (i.e. array elements beyond 'nbands').

Link: https://lore.kernel.org/netdev/YS%2FoZ+f0Nr8eQkzH@dcaratti.users.ipa.redhat.com
Suggested-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_ets.c