nfp: bring back support for offloading shared blocks
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sat, 21 Jul 2018 04:14:38 +0000 (21:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Jul 2018 17:58:52 +0000 (10:58 -0700)
Now that we have offload replay infrastructure added by
commit 326367427cc0 ("net: sched: call reoffload op on block callback reg")
and flows are guaranteed to be removed correctly, we can revert
commit 951a8ee6def3 ("nfp: reject binding to shared blocks").

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: John Hurley <john.hurley@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

index 458f49235d06cf21533f4ca7a080a9c7a2bc3d00..994d2b756fe16881380f78f67628d546b14967ee 100644 (file)
@@ -195,9 +195,6 @@ static int nfp_bpf_setup_tc_block(struct net_device *netdev,
        if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
                return -EOPNOTSUPP;
 
-       if (tcf_block_shared(f->block))
-               return -EOPNOTSUPP;
-
        switch (f->command) {
        case TC_BLOCK_BIND:
                return tcf_block_cb_register(f->block,
index 43b9bf12b17426b64279721f12313f5c34fbb3e7..6bc8a97f7e03a60edb3fd4d5c68906b074e7d090 100644 (file)
@@ -631,9 +631,6 @@ static int nfp_flower_setup_tc_block(struct net_device *netdev,
        if (f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
                return -EOPNOTSUPP;
 
-       if (tcf_block_shared(f->block))
-               return -EOPNOTSUPP;
-
        switch (f->command) {
        case TC_BLOCK_BIND:
                return tcf_block_cb_register(f->block,
index e4252a176eecaeb112612623b2b968e34e1996f6..4f405ca8346fd4f96f7aec161657fc8c63ea082b 100644 (file)
@@ -114,11 +114,6 @@ 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;