diff options
author | Thomas Graf <tgraf@suug.ch> | 2015-07-21 04:44:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-21 13:39:07 -0400 |
commit | be4ace6e6b1bc12e18b25fe764917e09a1f96d7b (patch) | |
tree | 6b4ae588041d0245a5f1b2fe47118db445c3886f /net/openvswitch/datapath.c | |
parent | 34ae932a40369be6bd6ea97d66b6686361b4370d (diff) |
openvswitch: Move dev pointer into vport itself
This is the first step in representing all OVS vports as regular
struct net_devices. Move the net_device pointer into the vport
structure itself to get rid of struct vport_netdev.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 02082107c74c..19df28ee5094 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -188,7 +188,7 @@ static int get_dpifindex(const struct datapath *dp) | |||
188 | 188 | ||
189 | local = ovs_vport_rcu(dp, OVSP_LOCAL); | 189 | local = ovs_vport_rcu(dp, OVSP_LOCAL); |
190 | if (local) | 190 | if (local) |
191 | ifindex = netdev_vport_priv(local)->dev->ifindex; | 191 | ifindex = local->dev->ifindex; |
192 | else | 192 | else |
193 | ifindex = 0; | 193 | ifindex = 0; |
194 | 194 | ||
@@ -2219,13 +2219,10 @@ static void __net_exit list_vports_from_net(struct net *net, struct net *dnet, | |||
2219 | struct vport *vport; | 2219 | struct vport *vport; |
2220 | 2220 | ||
2221 | hlist_for_each_entry(vport, &dp->ports[i], dp_hash_node) { | 2221 | hlist_for_each_entry(vport, &dp->ports[i], dp_hash_node) { |
2222 | struct netdev_vport *netdev_vport; | ||
2223 | |||
2224 | if (vport->ops->type != OVS_VPORT_TYPE_INTERNAL) | 2222 | if (vport->ops->type != OVS_VPORT_TYPE_INTERNAL) |
2225 | continue; | 2223 | continue; |
2226 | 2224 | ||
2227 | netdev_vport = netdev_vport_priv(vport); | 2225 | if (dev_net(vport->dev) == dnet) |
2228 | if (dev_net(netdev_vport->dev) == dnet) | ||
2229 | list_add(&vport->detach_list, head); | 2226 | list_add(&vport->detach_list, head); |
2230 | } | 2227 | } |
2231 | } | 2228 | } |