On Tue, Jun 5, 2018 at 9:59 PM, Jakub Kicinski <kubak...@wp.pl> wrote: > On Tue, 5 Jun 2018 11:57:47 -0700, Jakub Kicinski wrote: >> On Tue, 5 Jun 2018 11:04:03 +0300, Paul Blakey wrote: >> > When using a vxlan device as the ingress dev, we count it as a >> > "no offload dev", so when such a rule comes and err stop is true, >> > we fail early and don't try the egdev route which can offload it >> > through the egress device. >> > >> > Fix that by not calling the block offload if one of the devices >> > attached to it is not offload capable, but make sure egress on such case >> > is capable instead. >> > >> > Fixes: caa7260156eb ("net: sched: keep track of offloaded filters [..]") >> > Reviewed-by: Roi Dayan <r...@mellanox.com> >> > Acked-by: Jiri Pirko <j...@mellanox.com> >> > Signed-off-by: Paul Blakey <pa...@mellanox.com> >> >> Very poor commit message. What you're doing is re-enabling skip_sw >> filters on tunnel devices which semantically make no sense and >> shouldn't have been allowed in the first place. >> >> This will breaks block sharing between tunnels and HW netdevs (because >> you skip the tcf_block_cb_call() completely). The entire egdev idea >> remains badly broken accepting filters like this: >> >> # tc filter add dev vxlan0 ingress \ >> matchall action skip_sw \ >> mirred egress redirect dev lo \ >> mirred egress redirect dev sw1np0 > > For above we probably need something like this (untested): > > diff --git a/net/sched/act_api.c b/net/sched/act_api.c > index 3f4cf930f809..71e5eebec31a 100644 > --- a/net/sched/act_api.c > +++ b/net/sched/act_api.c > @@ -1511,7 +1511,7 @@ int tc_setup_cb_egdev_call(const struct net_device *dev, > struct tcf_action_egdev *egdev = tcf_action_egdev_lookup(dev); > > if (!egdev) > - return 0; > + return err_stop ? -EOPNOTSUPP : 0; > return tcf_action_egdev_cb_call(egdev, type, type_data, err_stop); > } > EXPORT_SYMBOL_GPL(tc_setup_cb_egdev_call);
Jakub, We will test it out and let you know > But the correct fix is to remove egdev crutch completely IMO. Not against it, sometimes designs should change and be replaced with better ones, happens