|
@@ -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)
|
|
@@ -623,13 +619,6 @@ 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, u32 flags)
|
|
|
-{
|
|
|
- if (tc_skip_hw(flags))
|
|
|
- return false;
|
|
|
- return tc_can_offload(dev);
|
|
|
-}
|
|
|
-
|
|
|
static inline bool tc_skip_sw(u32 flags)
|
|
|
{
|
|
|
return (flags & TCA_CLS_FLAGS_SKIP_SW) ? true : false;
|