return rtnl_dereference(d->rx_handler_data);
}
-static inline bool ipvlan_dev_master(struct net_device *d)
-{
- return d->priv_flags & IFF_IPVLAN_MASTER;
-}
-
-static inline bool ipvlan_dev_slave(struct net_device *d)
-{
- return d->priv_flags & IFF_IPVLAN_SLAVE;
-}
-
void ipvlan_adjust_mtu(struct ipvl_dev *ipvlan, struct net_device *dev);
void ipvlan_set_port_mode(struct ipvl_port *port, u32 nval);
void ipvlan_init_secret(void);
if (!phy_dev)
return -ENODEV;
- if (ipvlan_dev_slave(phy_dev)) {
+ if (netif_is_ipvlan(phy_dev)) {
struct ipvl_dev *tmp = netdev_priv(phy_dev);
phy_dev = tmp->phy_dev;
- } else if (!ipvlan_dev_master(phy_dev)) {
+ } else if (!netif_is_ipvlan_port(phy_dev)) {
err = ipvlan_port_create(phy_dev);
if (err < 0)
return err;
struct ipvl_port *port;
LIST_HEAD(lst_kill);
- if (!ipvlan_dev_master(dev))
+ if (!netif_is_ipvlan_port(dev))
return NOTIFY_DONE;
port = ipvlan_port_get_rtnl(dev);
struct net_device *dev = (struct net_device *)if6->idev->dev;
struct ipvl_dev *ipvlan = netdev_priv(dev);
- if (!ipvlan_dev_slave(dev))
+ if (!netif_is_ipvlan(dev))
return NOTIFY_DONE;
if (!ipvlan || !ipvlan->port)
struct ipvl_dev *ipvlan = netdev_priv(dev);
struct in_addr ip4_addr;
- if (!ipvlan_dev_slave(dev))
+ if (!netif_is_ipvlan(dev))
return NOTIFY_DONE;
if (!ipvlan || !ipvlan->port)
return dev->priv_flags & IFF_MACVLAN_PORT;
}
+static inline bool netif_is_ipvlan(struct net_device *dev)
+{
+ return dev->priv_flags & IFF_IPVLAN_SLAVE;
+}
+
+static inline bool netif_is_ipvlan_port(struct net_device *dev)
+{
+ return dev->priv_flags & IFF_IPVLAN_MASTER;
+}
+
static inline bool netif_is_bond_master(struct net_device *dev)
{
return dev->flags & IFF_MASTER && dev->priv_flags & IFF_BONDING;