summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohn Hurley <john.hurley@netronome.com>2018-06-26 05:36:28 +0200
committerDavid S. Miller <davem@davemloft.net>2018-06-27 03:46:43 +0200
commit951a8ee6def39e25d0e60b9394e5a249ba8b2390 (patch)
tree7acb459c25bd26c96252d94755e7d38aed788113 /include
parentnfp: flower: fix mpls ether type detection (diff)
downloadlinux-951a8ee6def39e25d0e60b9394e5a249ba8b2390.tar.xz
linux-951a8ee6def39e25d0e60b9394e5a249ba8b2390.zip
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: 4861738775d7 ("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>
Diffstat (limited to 'include')
-rw-r--r--include/net/pkt_cls.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index a3c1a2c47cd4..20b059574e60 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -111,6 +111,11 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q,
{
}
+static inline bool tcf_block_shared(struct tcf_block *block)
+{
+ return false;
+}
+
static inline struct Qdisc *tcf_block_q(struct tcf_block *block)
{
return NULL;