summaryrefslogtreecommitdiff
path: root/include/net/pkt_cls.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-11-01 11:47:41 +0100
committerDavid S. Miller <davem@davemloft.net>2017-11-02 16:10:39 +0900
commit70b5aee46782208c14d93b715e9f62f7fec844f1 (patch)
tree515a1b62dc8bf2d12c327a33491d8f8bd0d3e2da /include/net/pkt_cls.h
parent7612fb0387d6ffcfc3173527466fe3f596657c58 (diff)
net: sched: remove ndo_setup_tc check from tc_can_offload
Since tc_can_offload is always called from block callback or egdev callback, no need to check if ndo_setup_tc exists. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/pkt_cls.h')
-rw-r--r--include/net/pkt_cls.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 108dcdd96421..d15c40c7bde7 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -611,11 +611,7 @@ struct tc_cls_u32_offload {
static inline bool tc_can_offload(const struct net_device *dev)
{
- if (!(dev->features & NETIF_F_HW_TC))
- return false;
- if (!dev->netdev_ops->ndo_setup_tc)
- return false;
- return true;
+ return dev->features & NETIF_F_HW_TC;
}
static inline bool tc_skip_hw(u32 flags)