aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_macvlan.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/if_macvlan.h')
-rw-r--r--include/linux/if_macvlan.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h
index ddd33fd5904d..84ba5ac39e03 100644
--- a/include/linux/if_macvlan.h
+++ b/include/linux/if_macvlan.h
@@ -61,6 +61,7 @@ struct macvlan_dev {
61 struct hlist_node hlist; 61 struct hlist_node hlist;
62 struct macvlan_port *port; 62 struct macvlan_port *port;
63 struct net_device *lowerdev; 63 struct net_device *lowerdev;
64 void *fwd_priv;
64 struct macvlan_pcpu_stats __percpu *pcpu_stats; 65 struct macvlan_pcpu_stats __percpu *pcpu_stats;
65 66
66 DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ); 67 DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ);
@@ -118,4 +119,21 @@ extern int macvlan_link_register(struct rtnl_link_ops *ops);
118extern netdev_tx_t macvlan_start_xmit(struct sk_buff *skb, 119extern netdev_tx_t macvlan_start_xmit(struct sk_buff *skb,
119 struct net_device *dev); 120 struct net_device *dev);
120 121
122#if IS_ENABLED(CONFIG_MACVLAN)
123static inline struct net_device *
124macvlan_dev_real_dev(const struct net_device *dev)
125{
126 struct macvlan_dev *macvlan = netdev_priv(dev);
127
128 return macvlan->lowerdev;
129}
130#else
131static inline struct net_device *
132macvlan_dev_real_dev(const struct net_device *dev)
133{
134 BUG();
135 return NULL;
136}
137#endif
138
121#endif /* _LINUX_IF_MACVLAN_H */ 139#endif /* _LINUX_IF_MACVLAN_H */