aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/pkt_cls.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-20 11:25:44 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-20 11:25:44 -0400
commitaf52739b922f656eb1f39016fabaabe4baeda2e2 (patch)
tree79a7aa810d0493cd0cf4adebac26d37f12e8b545 /include/net/pkt_cls.h
parent25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff)
parent33688abb2802ff3a230bd2441f765477b94cc89e (diff)
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in drivers/iio/industrialio-trigger.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/pkt_cls.h')
-rw-r--r--include/net/pkt_cls.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
index 0f7efa88f210..3722dda0199d 100644
--- a/include/net/pkt_cls.h
+++ b/include/net/pkt_cls.h
@@ -392,16 +392,20 @@ struct tc_cls_u32_offload {
392 }; 392 };
393}; 393};
394 394
395static inline bool tc_should_offload(struct net_device *dev, u32 flags) 395static inline bool tc_should_offload(const struct net_device *dev,
396 const struct tcf_proto *tp, u32 flags)
396{ 397{
398 const struct Qdisc *sch = tp->q;
399 const struct Qdisc_class_ops *cops = sch->ops->cl_ops;
400
397 if (!(dev->features & NETIF_F_HW_TC)) 401 if (!(dev->features & NETIF_F_HW_TC))
398 return false; 402 return false;
399
400 if (flags & TCA_CLS_FLAGS_SKIP_HW) 403 if (flags & TCA_CLS_FLAGS_SKIP_HW)
401 return false; 404 return false;
402
403 if (!dev->netdev_ops->ndo_setup_tc) 405 if (!dev->netdev_ops->ndo_setup_tc)
404 return false; 406 return false;
407 if (cops && cops->tcf_cl_offload)
408 return cops->tcf_cl_offload(tp->classid);
405 409
406 return true; 410 return true;
407} 411}