diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1377d085ef99..86dbb3e29139 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1483,6 +1483,7 @@ struct net_device_ops { | |||
1483 | * @IFF_NO_RX_HANDLER: device doesn't support the rx_handler hook | 1483 | * @IFF_NO_RX_HANDLER: device doesn't support the rx_handler hook |
1484 | * @IFF_FAILOVER: device is a failover master device | 1484 | * @IFF_FAILOVER: device is a failover master device |
1485 | * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device | 1485 | * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device |
1486 | * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device | ||
1486 | */ | 1487 | */ |
1487 | enum netdev_priv_flags { | 1488 | enum netdev_priv_flags { |
1488 | IFF_802_1Q_VLAN = 1<<0, | 1489 | IFF_802_1Q_VLAN = 1<<0, |
@@ -1514,6 +1515,7 @@ enum netdev_priv_flags { | |||
1514 | IFF_NO_RX_HANDLER = 1<<26, | 1515 | IFF_NO_RX_HANDLER = 1<<26, |
1515 | IFF_FAILOVER = 1<<27, | 1516 | IFF_FAILOVER = 1<<27, |
1516 | IFF_FAILOVER_SLAVE = 1<<28, | 1517 | IFF_FAILOVER_SLAVE = 1<<28, |
1518 | IFF_L3MDEV_RX_HANDLER = 1<<29, | ||
1517 | }; | 1519 | }; |
1518 | 1520 | ||
1519 | #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN | 1521 | #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN |
@@ -1544,6 +1546,7 @@ enum netdev_priv_flags { | |||
1544 | #define IFF_NO_RX_HANDLER IFF_NO_RX_HANDLER | 1546 | #define IFF_NO_RX_HANDLER IFF_NO_RX_HANDLER |
1545 | #define IFF_FAILOVER IFF_FAILOVER | 1547 | #define IFF_FAILOVER IFF_FAILOVER |
1546 | #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE | 1548 | #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE |
1549 | #define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER | ||
1547 | 1550 | ||
1548 | /** | 1551 | /** |
1549 | * struct net_device - The DEVICE structure. | 1552 | * struct net_device - The DEVICE structure. |
@@ -4549,6 +4552,11 @@ static inline bool netif_supports_nofcs(struct net_device *dev) | |||
4549 | return dev->priv_flags & IFF_SUPP_NOFCS; | 4552 | return dev->priv_flags & IFF_SUPP_NOFCS; |
4550 | } | 4553 | } |
4551 | 4554 | ||
4555 | static inline bool netif_has_l3_rx_handler(const struct net_device *dev) | ||
4556 | { | ||
4557 | return dev->priv_flags & IFF_L3MDEV_RX_HANDLER; | ||
4558 | } | ||
4559 | |||
4552 | static inline bool netif_is_l3_master(const struct net_device *dev) | 4560 | static inline bool netif_is_l3_master(const struct net_device *dev) |
4553 | { | 4561 | { |
4554 | return dev->priv_flags & IFF_L3MDEV_MASTER; | 4562 | return dev->priv_flags & IFF_L3MDEV_MASTER; |