]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/netdevice.h
net: Add netif_is_l3_slave
[mirror_ubuntu-artful-kernel.git] / include / linux / netdevice.h
index b9450784ae0651a0f61986ac41a66416499074db..b3374402c1ea1d2c0df80d3b5c6a38a1cf1b4156 100644 (file)
@@ -1261,6 +1261,7 @@ struct net_device_ops {
  * @IFF_L3MDEV_MASTER: device is an L3 master device
  * @IFF_NO_QUEUE: device can run without qdisc attached
  * @IFF_OPENVSWITCH: device is a Open vSwitch master
+ * @IFF_L3MDEV_SLAVE: device is enslaved to an L3 master device
  */
 enum netdev_priv_flags {
        IFF_802_1Q_VLAN                 = 1<<0,
@@ -1286,6 +1287,7 @@ enum netdev_priv_flags {
        IFF_L3MDEV_MASTER               = 1<<20,
        IFF_NO_QUEUE                    = 1<<21,
        IFF_OPENVSWITCH                 = 1<<22,
+       IFF_L3MDEV_SLAVE                = 1<<23,
 };
 
 #define IFF_802_1Q_VLAN                        IFF_802_1Q_VLAN
@@ -3830,6 +3832,11 @@ static inline bool netif_is_l3_master(const struct net_device *dev)
        return dev->priv_flags & IFF_L3MDEV_MASTER;
 }
 
+static inline bool netif_is_l3_slave(const struct net_device *dev)
+{
+       return dev->priv_flags & IFF_L3MDEV_SLAVE;
+}
+
 static inline bool netif_is_bridge_master(const struct net_device *dev)
 {
        return dev->priv_flags & IFF_EBRIDGE;