diff options
author | Jiri Pirko <jiri@mellanox.com> | 2017-10-11 09:41:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-11 20:15:42 -0700 |
commit | 843e79d05addd8eb06992cd6dfafc7b9d53f2bc8 (patch) | |
tree | a8f2d384369cbf8834961bf51a9a67ee5b8947f3 /include/net/act_api.h | |
parent | 7c6a86b4cd1b0134a4768505ce10e4ef3b9b0213 (diff) | |
download | linux-stable-843e79d05addd8eb06992cd6dfafc7b9d53f2bc8.tar.gz linux-stable-843e79d05addd8eb06992cd6dfafc7b9d53f2bc8.tar.bz2 linux-stable-843e79d05addd8eb06992cd6dfafc7b9d53f2bc8.zip |
net: sched: make tc_action_ops->get_dev return dev and avoid passing net
Return dev directly, NULL if not possible. That is enough.
Makes no sense to pass struct net * to get_dev op, as there is only one
net possible, the one the action was created in. So just store it in
mirred priv and use directly.
Rename the mirred op callback function.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r-- | include/net/act_api.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index b944e0eb93be..900168a9901e 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h @@ -93,8 +93,7 @@ struct tc_action_ops { int (*walk)(struct net *, struct sk_buff *, struct netlink_callback *, int, const struct tc_action_ops *); void (*stats_update)(struct tc_action *, u64, u32, u64); - int (*get_dev)(const struct tc_action *a, struct net *net, - struct net_device **mirred_dev); + struct net_device *(*get_dev)(const struct tc_action *a); }; struct tc_action_net { |