* [PATCH net-next] net: openvswitch: use netif_ovs_is_port() instead of opencode
@ 2019-07-05 16:05 Taehee Yoo
2019-07-08 22:53 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Taehee Yoo @ 2019-07-05 16:05 UTC (permalink / raw)
To: davem, pshelar, netdev, dev; +Cc: ap420073
Use netif_ovs_is_port() function instead of open code.
This patch doesn't change logic.
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
net/openvswitch/dp_notify.c | 2 +-
net/openvswitch/vport-netdev.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/openvswitch/dp_notify.c b/net/openvswitch/dp_notify.c
index 53cf07d141b4..7af0cde8b293 100644
--- a/net/openvswitch/dp_notify.c
+++ b/net/openvswitch/dp_notify.c
@@ -48,7 +48,7 @@ void ovs_dp_notify_wq(struct work_struct *work)
if (vport->ops->type == OVS_VPORT_TYPE_INTERNAL)
continue;
- if (!(vport->dev->priv_flags & IFF_OVS_DATAPATH))
+ if (!(netif_is_ovs_port(vport->dev)))
dp_detach_port_notify(vport);
}
}
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)
static void netdev_destroy(struct vport *vport)
{
rtnl_lock();
- if (vport->dev->priv_flags & IFF_OVS_DATAPATH)
+ if (netif_is_ovs_port(vport->dev))
ovs_netdev_detach_dev(vport);
rtnl_unlock();
@@ -166,7 +166,7 @@ static void netdev_destroy(struct vport *vport)
void ovs_netdev_tunnel_destroy(struct vport *vport)
{
rtnl_lock();
- if (vport->dev->priv_flags & IFF_OVS_DATAPATH)
+ if (netif_is_ovs_port(vport->dev))
ovs_netdev_detach_dev(vport);
/* We can be invoked by both explicit vport deletion and
@@ -186,7 +186,7 @@ EXPORT_SYMBOL_GPL(ovs_netdev_tunnel_destroy);
/* Returns null if this device is not attached to a datapath. */
struct vport *ovs_netdev_get_vport(struct net_device *dev)
{
- if (likely(dev->priv_flags & IFF_OVS_DATAPATH))
+ if (likely(netif_is_ovs_port(dev)))
return (struct vport *)
rcu_dereference_rtnl(dev->rx_handler_data);
else
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: openvswitch: use netif_ovs_is_port() instead of opencode
2019-07-05 16:05 [PATCH net-next] net: openvswitch: use netif_ovs_is_port() instead of opencode Taehee Yoo
@ 2019-07-08 22:53 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-07-08 22:53 UTC (permalink / raw)
To: ap420073; +Cc: pshelar, netdev, dev
From: Taehee Yoo <ap420073@gmail.com>
Date: Sat, 6 Jul 2019 01:05:46 +0900
> Use netif_ovs_is_port() function instead of open code.
> This patch doesn't change logic.
>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-08 22:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-05 16:05 [PATCH net-next] net: openvswitch: use netif_ovs_is_port() instead of opencode Taehee Yoo
2019-07-08 22:53 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.