]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: Avoid implicit chain 0 creation
authorJiri Pirko <jiri@mellanox.com>
Mon, 23 Jul 2018 07:23:05 +0000 (09:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Jul 2018 03:44:12 +0000 (20:44 -0700)
commit4d581538c312f7e913e1fafa3021fbd64be78d52
tree850a18e148bfd97fc67450e3568406ca3e1e784b
parent9e4a65b6661ca108208dd6ad3f259e8beacffedc
net: sched: Avoid implicit chain 0 creation

Currently, chain 0 is implicitly created during block creation. However
that does not align with chain object exposure, creation and destruction
api introduced later on. So make the chain 0 behave the same way as any
other chain and only create it when it is needed. Since chain 0 is
somehow special as the qdiscs need to hold pointer to the first chain
tp, this requires to move the chain head change callback infra to the
block structure.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h
net/sched/cls_api.c