]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: don't set q pointer for shared blocks
authorJiri Pirko <jiri@mellanox.com>
Tue, 13 Feb 2018 11:00:16 +0000 (12:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Feb 2018 17:29:02 +0000 (12:29 -0500)
commit41d9bef9dd307c0d25177f0a4fb0288db3a1fad5
tree86b8b82bf447248596e0a46be3d9e6213a628d97
parent529f042fcd98a2c8b4e30515ec6d584182ec9b4e
net: sched: don't set q pointer for shared blocks

It is pointless to set block->q for block which are shared among
multiple qdiscs. So remove the assignment in that case. Do a bit of code
reshuffle to make block->index initialized at that point so we can use
tcf_block_shared() helper.

Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
Fixes: 5c6eb94246c6 ("net: sched: introduce shared filter blocks infrastructure")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c