Skip to content

Commit 578bc07

Browse files
committed
net: Introduce IFF_LWT_NETDEV flag
Add new flag to denote lightweight netdevices. Add helper to identify such devices. Signed-off-by: David Ahern <dsahern@gmail.com>
1 parent f14511f commit 578bc07

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

include/linux/netdevice.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,7 @@ enum netdev_priv_flags {
14011401
IFF_RXFH_CONFIGURED = 1<<25,
14021402
IFF_PHONY_HEADROOM = 1<<26,
14031403
IFF_MACSEC = 1<<27,
1404+
IFF_LWT_NETDEV = 1<<28,
14041405
};
14051406

14061407
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
@@ -1430,6 +1431,7 @@ enum netdev_priv_flags {
14301431
#define IFF_TEAM IFF_TEAM
14311432
#define IFF_RXFH_CONFIGURED IFF_RXFH_CONFIGURED
14321433
#define IFF_MACSEC IFF_MACSEC
1434+
#define IFF_LWT_NETDEV IFF_LWT_NETDEV
14331435

14341436
/**
14351437
* struct net_device - The DEVICE structure.
@@ -4137,6 +4139,11 @@ static inline void skb_gso_error_unwind(struct sk_buff *skb, __be16 protocol,
41374139
skb->mac_len = mac_len;
41384140
}
41394141

4142+
static inline bool netif_is_lwd(struct net_device *dev)
4143+
{
4144+
return !!(dev->priv_flags & IFF_LWT_NETDEV);
4145+
}
4146+
41404147
static inline bool netif_is_macsec(const struct net_device *dev)
41414148
{
41424149
return dev->priv_flags & IFF_MACSEC;

0 commit comments

Comments
 (0)