aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport-netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/vport-netdev.c')
-rw-r--r--net/openvswitch/vport-netdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c
index 52a1ed9633ec..57d6436e6f6a 100644
--- a/net/openvswitch/vport-netdev.c
+++ b/net/openvswitch/vport-netdev.c
@@ -156,7 +156,7 @@ void ovs_netdev_detach_dev(struct vport *vport)
156static void netdev_destroy(struct vport *vport) 156static void netdev_destroy(struct vport *vport)
157{ 157{
158 rtnl_lock(); 158 rtnl_lock();
159 if (vport->dev->priv_flags & IFF_OVS_DATAPATH) 159 if (netif_is_ovs_port(vport->dev))
160 ovs_netdev_detach_dev(vport); 160 ovs_netdev_detach_dev(vport);
161 rtnl_unlock(); 161 rtnl_unlock();
162 162
@@ -166,7 +166,7 @@ static void netdev_destroy(struct vport *vport)
166void ovs_netdev_tunnel_destroy(struct vport *vport) 166void ovs_netdev_tunnel_destroy(struct vport *vport)
167{ 167{
168 rtnl_lock(); 168 rtnl_lock();
169 if (vport->dev->priv_flags & IFF_OVS_DATAPATH) 169 if (netif_is_ovs_port(vport->dev))
170 ovs_netdev_detach_dev(vport); 170 ovs_netdev_detach_dev(vport);
171 171
172 /* We can be invoked by both explicit vport deletion and 172 /* We can be invoked by both explicit vport deletion and
@@ -186,7 +186,7 @@ EXPORT_SYMBOL_GPL(ovs_netdev_tunnel_destroy);
186/* Returns null if this device is not attached to a datapath. */ 186/* Returns null if this device is not attached to a datapath. */
187struct vport *ovs_netdev_get_vport(struct net_device *dev) 187struct vport *ovs_netdev_get_vport(struct net_device *dev)
188{ 188{
189 if (likely(dev->priv_flags & IFF_OVS_DATAPATH)) 189 if (likely(netif_is_ovs_port(dev)))
190 return (struct vport *) 190 return (struct vport *)
191 rcu_dereference_rtnl(dev->rx_handler_data); 191 rcu_dereference_rtnl(dev->rx_handler_data);
192 else 192 else