提交 70b5aee4 编写于 作者: J Jiri Pirko 提交者: David S. Miller

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: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7612fb03
...@@ -611,11 +611,7 @@ struct tc_cls_u32_offload { ...@@ -611,11 +611,7 @@ struct tc_cls_u32_offload {
static inline bool tc_can_offload(const struct net_device *dev) static inline bool tc_can_offload(const struct net_device *dev)
{ {
if (!(dev->features & NETIF_F_HW_TC)) return dev->features & NETIF_F_HW_TC;
return false;
if (!dev->netdev_ops->ndo_setup_tc)
return false;
return true;
} }
static inline bool tc_skip_hw(u32 flags) static inline bool tc_skip_hw(u32 flags)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册