]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: reject binding to shared blocks
authorJohn Hurley <john.hurley@netronome.com>
Tue, 26 Jun 2018 03:36:28 +0000 (20:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Jun 2018 01:46:43 +0000 (10:46 +0900)
commitcf17f58e538c28940d697bb3f7f4932011d6cb43
tree7acb459c25bd26c96252d94755e7d38aed788113
parentd06c5ff913815da850c4491df2ae55e32354bcec
nfp: reject binding to shared blocks

TC shared blocks allow multiple qdiscs to be grouped together and filters
shared between them. Currently the chains of filters attached to a block
are only flushed when the block is removed. If a qdisc is removed from a
block but the block still exists, flow del messages are not passed to the
callback registered for that qdisc. For the NFP, this presents the
possibility of rules still existing in hw when they should be removed.

Prevent binding to shared blocks until the kernel can send per qdisc del
messages when block unbinds occur.

tcf_block_shared() was not used outside of the core until now, so also
add an empty implementation for builds with CONFIG_NET_CLS=n.

Fixes: 5c6eb94246c6 ("net: sched: introduce shared filter blocks infrastructure")
Signed-off-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/bpf/main.c
drivers/net/ethernet/netronome/nfp/flower/offload.c
include/net/pkt_cls.h