From: Jiri Pirko <j...@mellanox.com> Currently there is a Qdisc_class_ops->tcf_cl_offload callback that is called to find out if cls would offload rule or not. This is only supported by sch_ingress and sch_clsact. So the Qdisc are to decide. However, the driver knows what is he able to offload, so move the decision making to drivers completely. Just pass classid there and provide set of helpers to allow identification of qdisc.
As a side effect, this actually allows clsact egress rules offload in mlxsw. Jiri Pirko (5): net: sched: Add helpers to identify classids net: sched: propagate classid down to offload drivers net: sched: use newly added classid identity helpers net: sched: remove handle propagation down to the drivers net: sched: remove cops->tcf_cl_offload drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 18 ++++++++++++++++-- drivers/net/ethernet/netronome/nfp/bpf/main.c | 2 +- drivers/net/ethernet/netronome/nfp/flower/offload.c | 2 +- include/net/pkt_cls.h | 18 +++++------------- include/net/pkt_sched.h | 14 ++++++++++++++ include/net/sch_generic.h | 1 - net/dsa/slave.c | 9 ++++++++- net/sched/cls_bpf.c | 4 ++-- net/sched/cls_flower.c | 8 ++++---- net/sched/cls_matchall.c | 4 ++-- net/sched/cls_u32.c | 8 ++++---- net/sched/sch_ingress.c | 12 ------------ 16 files changed, 61 insertions(+), 47 deletions(-) -- 2.9.3