diff options
author | 2017-01-10 16:39:52 +0000 | |
---|---|---|
committer | 2017-01-10 16:39:52 +0000 | |
commit | 9c1852b459f04f6309e40d1d167512b0a5598529 (patch) | |
tree | a74526f1fe3f9826b81327f0b9ba9b98a543f87c /net/sched/cls_api.c | |
parent | ASoC: samsung: i2s: Provide I2S device for registered clocks (diff) | |
parent | Linux 4.10-rc1 (diff) | |
download | wireguard-linux-9c1852b459f04f6309e40d1d167512b0a5598529.tar.xz wireguard-linux-9c1852b459f04f6309e40d1d167512b0a5598529.zip |
Merge tag 'v4.10-rc1' into asoc-samsung
Linux 4.10-rc1
Diffstat (limited to '')
-rw-r--r-- | net/sched/cls_api.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index b05d4a2155b0..3fbba79a4ef0 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -682,6 +682,30 @@ int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts) } EXPORT_SYMBOL(tcf_exts_dump_stats); +int tcf_exts_get_dev(struct net_device *dev, struct tcf_exts *exts, + struct net_device **hw_dev) +{ +#ifdef CONFIG_NET_CLS_ACT + const struct tc_action *a; + LIST_HEAD(actions); + + if (tc_no_actions(exts)) + return -EINVAL; + + tcf_exts_to_list(exts, &actions); + list_for_each_entry(a, &actions, list) { + if (a->ops->get_dev) { + a->ops->get_dev(a, dev_net(dev), hw_dev); + break; + } + } + if (*hw_dev) + return 0; +#endif + return -EOPNOTSUPP; +} +EXPORT_SYMBOL(tcf_exts_get_dev); + static int __init tc_filter_init(void) { rtnl_register(PF_UNSPEC, RTM_NEWTFILTER, tc_ctl_tfilter, NULL, NULL); |