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 | |
parent | 7c6a86b4cd1b0134a4768505ce10e4ef3b9b0213 (diff) | |
download | linux-rt-843e79d05addd8eb06992cd6dfafc7b9d53f2bc8.tar.gz |
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')
-rw-r--r-- | include/net/act_api.h | 3 | ||||
-rw-r--r-- | include/net/tc_act/tc_mirred.h | 1 |
2 files changed, 2 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 { diff --git a/include/net/tc_act/tc_mirred.h b/include/net/tc_act/tc_mirred.h index 604bc31e23ab..21a656569840 100644 --- a/include/net/tc_act/tc_mirred.h +++ b/include/net/tc_act/tc_mirred.h @@ -10,6 +10,7 @@ struct tcf_mirred { int tcfm_ifindex; bool tcfm_mac_header_xmit; struct net_device __rcu *tcfm_dev; + struct net *net; struct list_head tcfm_list; }; #define to_mirred(a) ((struct tcf_mirred *)a) |