mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
openvswitch: Abstract vport name through ovs_vport_name()
This allows to get rid of the get_name() vport ops later on. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
be4ace6e6b
commit
c9db965c52
6 changed files with 9 additions and 12 deletions
|
@ -113,7 +113,7 @@ struct vport *ovs_vport_locate(const struct net *net, const char *name)
|
|||
struct vport *vport;
|
||||
|
||||
hlist_for_each_entry_rcu(vport, bucket, hash_node)
|
||||
if (!strcmp(name, vport->ops->get_name(vport)) &&
|
||||
if (!strcmp(name, ovs_vport_name(vport)) &&
|
||||
net_eq(ovs_dp_get_net(vport->dp), net))
|
||||
return vport;
|
||||
|
||||
|
@ -226,7 +226,7 @@ struct vport *ovs_vport_add(const struct vport_parms *parms)
|
|||
}
|
||||
|
||||
bucket = hash_bucket(ovs_dp_get_net(vport->dp),
|
||||
vport->ops->get_name(vport));
|
||||
ovs_vport_name(vport));
|
||||
hlist_add_head_rcu(&vport->hash_node, bucket);
|
||||
return vport;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue