]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: sched: remove ndo_setup_tc check from tc_can_offload
authorJiri Pirko <jiri@mellanox.com>
Wed, 1 Nov 2017 10:47:41 +0000 (11:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Nov 2017 07:10:39 +0000 (16:10 +0900)
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>
include/net/pkt_cls.h

index 108dcdd96421e45a788ad6c88edffa2046e884ca..d15c40c7bde733c3b6d357f4015b1e9c57c4f75a 100644 (file)
@@ -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)