summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-08-09 14:30:35 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-11 13:47:01 -0700
commit7b06e8aed283081010596c98a67f06c595affe51 (patch)
tree3235e5848cd8d033f4e4c3abbd8dbb392c4f9e54 /include/net
parent237f79d24ebe1eb9b5651b7342ba5cc9d9b8f222 (diff)
net: sched: remove cops->tcf_cl_offload
cops->tcf_cl_offload is no longer needed, as the drivers check what they can and cannot offload using the classid identify helpers. So remove this. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/pkt_cls.h14
-rw-r--r--include/net/sch_generic.h1
2 files changed, 3 insertions, 12 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index bd9dd79357fe..e80edd8879ef 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -457,19 +457,12 @@ struct tc_cls_u32_offload {
};
};
-static inline bool tc_can_offload(const struct net_device *dev,
- const struct tcf_proto *tp)
+static inline bool tc_can_offload(const struct net_device *dev)
{
- const struct Qdisc *sch = tp->q;
- const struct Qdisc_class_ops *cops = sch->ops->cl_ops;
-
if (!(dev->features & NETIF_F_HW_TC))
return false;
if (!dev->netdev_ops->ndo_setup_tc)
return false;
- if (cops && cops->tcf_cl_offload)
- return cops->tcf_cl_offload(tp->classid);
-
return true;
}
@@ -478,12 +471,11 @@ static inline bool tc_skip_hw(u32 flags)
return (flags & TCA_CLS_FLAGS_SKIP_HW) ? true : false;
}
-static inline bool tc_should_offload(const struct net_device *dev,
- const struct tcf_proto *tp, u32 flags)
+static inline bool tc_should_offload(const struct net_device *dev, u32 flags)
{
if (tc_skip_hw(flags))
return false;
- return tc_can_offload(dev, tp);
+ return tc_can_offload(dev);
}
static inline bool tc_skip_sw(u32 flags)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index e79f5ad1c5f3..5865db91976b 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -156,7 +156,6 @@ struct Qdisc_class_ops {
/* Filter manipulation */
struct tcf_block * (*tcf_block)(struct Qdisc *, unsigned long);
- bool (*tcf_cl_offload)(u32 classid);
unsigned long (*bind_tcf)(struct Qdisc *, unsigned long,
u32 classid);
void (*unbind_tcf)(struct Qdisc *, unsigned long);