summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-06-06 13:55:47 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-06 13:55:47 -0400
commit9a99dc1c41772e0b24348f089a7a7edb91fc7723 (patch)
tree4b4753227e2799780ae5ee10166c3eab87a04792 /net
parent5040cc990cbac98733df4d58fdeac5bbdab15b49 (diff)
downloadlinux-stable-9a99dc1c41772e0b24348f089a7a7edb91fc7723.tar.gz
linux-stable-9a99dc1c41772e0b24348f089a7a7edb91fc7723.tar.bz2
linux-stable-9a99dc1c41772e0b24348f089a7a7edb91fc7723.zip
Revert "net: sched: cls: Fix offloading when ingress dev is vxlan"
This reverts commit d96a43c66464cdf0b249fdf47b6dcd65b83af8c0. This potentially breaks things, so reverting as per request by Jakub Kicinski. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/cls_api.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 29fb4d68a144..cdc3c87c53e6 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -807,6 +807,10 @@ static int tcf_block_cb_call(struct tcf_block *block, enum tc_setup_type type,
int ok_count = 0;
int err;
+ /* Make sure all netdevs sharing this block are offload-capable. */
+ if (block->nooffloaddevcnt && err_stop)
+ return -EOPNOTSUPP;
+
list_for_each_entry(block_cb, &block->cb_list, list) {
err = block_cb->cb(type, type_data, block_cb->cb_priv);
if (err) {
@@ -1725,31 +1729,21 @@ static int tc_exts_setup_cb_egdev_call(struct tcf_exts *exts,
int tc_setup_cb_call(struct tcf_block *block, struct tcf_exts *exts,
enum tc_setup_type type, void *type_data, bool err_stop)
{
- int ok_count = 0;
+ int ok_count;
int ret;
- if (!block->nooffloaddevcnt) {
- ret = tcf_block_cb_call(block, type, type_data, err_stop);
- if (ret < 0)
- return ret;
- ok_count = ret;
- }
+ ret = tcf_block_cb_call(block, type, type_data, err_stop);
+ if (ret < 0)
+ return ret;
+ ok_count = ret;
if (!exts || ok_count)
- goto skip_egress;
-
+ return ok_count;
ret = tc_exts_setup_cb_egdev_call(exts, type, type_data, err_stop);
if (ret < 0)
return ret;
ok_count += ret;
-skip_egress:
- /* if one of the netdevs sharing this block are not offload-capable
- * make sure we succeeded in egress instead.
- */
- if (block->nooffloaddevcnt && !ok_count && err_stop)
- return -EOPNOTSUPP;
-
return ok_count;
}
EXPORT_SYMBOL(tc_setup_cb_call);