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>
This commit is contained in:
committed by
David S. Miller
parent
7c6a86b4cd
commit
843e79d05a
@ -1016,10 +1016,8 @@ int tcf_exts_get_dev(struct net_device *dev, struct tcf_exts *exts,
|
||||
|
||||
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 (a->ops->get_dev)
|
||||
*hw_dev = a->ops->get_dev(a);
|
||||
}
|
||||
if (*hw_dev)
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user