aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ipvlan/ipvlan.h
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2018-03-06 10:56:31 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-07 12:38:24 -0500
commit1ec54cb44e6731c3cb251bcf9251d65a4b4f6306 (patch)
tree6ba70c6dc5096396e17e71e6a620eeccfb108277 /drivers/net/ipvlan/ipvlan.h
parentMerge branch 'net-phy-remove-phy_error-from-phy_disable_interrupts' (diff)
downloadlinux-dev-1ec54cb44e6731c3cb251bcf9251d65a4b4f6306.tar.xz
linux-dev-1ec54cb44e6731c3cb251bcf9251d65a4b4f6306.zip
net: unpollute priv_flags space
the ipvlan device driver defines and uses 2 bits inside the priv_flags net_device field. Such bits and the related helper are used only inside the ipvlan device driver, and the core networking does not need to be aware of them. This change moves netif_is_ipvlan* helper in the ipvlan driver and re-implement them looking for ipvlan specific symbols instead of using priv_flags. Overall this frees two bits inside priv_flags - and move the following ones to avoid gaps - without any intended functional change. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipvlan/ipvlan.h')
-rw-r--r--drivers/net/ipvlan/ipvlan.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ipvlan/ipvlan.h b/drivers/net/ipvlan/ipvlan.h
index a115f12bf130..c818b9bdab6e 100644
--- a/drivers/net/ipvlan/ipvlan.h
+++ b/drivers/net/ipvlan/ipvlan.h
@@ -177,4 +177,10 @@ int ipvlan_link_new(struct net *src_net, struct net_device *dev,
void ipvlan_link_delete(struct net_device *dev, struct list_head *head);
void ipvlan_link_setup(struct net_device *dev);
int ipvlan_link_register(struct rtnl_link_ops *ops);
+
+static inline bool netif_is_ipvlan_port(const struct net_device *dev)
+{
+ return dev->rx_handler == ipvlan_handle_frame;
+}
+
#endif /* __IPVLAN_H */