From: David Ahern <dsahern@gmail.com>
To: netdev@vger.kernel.org
Cc: roopa@cumulusnetworks.com, f.fainelli@gmail.com,
nicolas.dichtel@6wind.com, David Ahern <dsahern@gmail.com>
Subject: [PATCH RFC net-next 3/6] net: Introduce IFF_LWT_NETDEV flag
Date: Sat, 6 May 2017 10:07:31 -0600 [thread overview]
Message-ID: <20170506160734.47084-4-dsahern@gmail.com> (raw)
In-Reply-To: <20170506160734.47084-1-dsahern@gmail.com>
Add new flag to denote lightweight netdevices. Add helper to identify
such devices.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
include/linux/netdevice.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f47c8712398a..08151fd34973 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1401,6 +1401,7 @@ enum netdev_priv_flags {
IFF_RXFH_CONFIGURED = 1<<25,
IFF_PHONY_HEADROOM = 1<<26,
IFF_MACSEC = 1<<27,
+ IFF_LWT_NETDEV = 1<<28,
};
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
@@ -1430,6 +1431,7 @@ enum netdev_priv_flags {
#define IFF_TEAM IFF_TEAM
#define IFF_RXFH_CONFIGURED IFF_RXFH_CONFIGURED
#define IFF_MACSEC IFF_MACSEC
+#define IFF_LWT_NETDEV IFF_LWT_NETDEV
/**
* struct net_device - The DEVICE structure.
@@ -4137,6 +4139,11 @@ static inline void skb_gso_error_unwind(struct sk_buff *skb, __be16 protocol,
skb->mac_len = mac_len;
}
+static inline bool netif_is_lwd(struct net_device *dev)
+{
+ return !!(dev->priv_flags & IFF_LWT_NETDEV);
+}
+
static inline bool netif_is_macsec(const struct net_device *dev)
{
return dev->priv_flags & IFF_MACSEC;
--
2.11.0 (Apple Git-81)
next prev parent reply other threads:[~2017-05-06 16:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-06 16:07 [PATCH RFC net-next 0/6] net: reducing memory footprint of network devices David Ahern
2017-05-06 16:07 ` [PATCH RFC net-next 1/6] net: Add accessor for kboject in a net_device David Ahern
2017-05-06 16:07 ` [PATCH RFC net-next 2/6] net: Add flags argument to alloc_netdev_mqs David Ahern
2017-05-06 16:07 ` David Ahern [this message]
2017-05-08 8:55 ` [PATCH RFC net-next 3/6] net: Introduce IFF_LWT_NETDEV flag Johannes Berg
2017-05-08 20:11 ` David Miller
2017-05-08 21:37 ` Roopa Prabhu
2017-05-09 0:57 ` David Ahern
2017-05-09 5:04 ` Roopa Prabhu
2017-05-06 16:07 ` [PATCH RFC net-next 4/6] net: Do not intialize kobject for lightweight netdevs David Ahern
2017-05-08 17:26 ` Florian Fainelli
2017-05-06 16:07 ` [PATCH RFC net-next 5/6] net: Delay initializations for lightweight devices David Ahern
2017-05-08 17:31 ` Florian Fainelli
2017-05-06 16:07 ` [PATCH RFC net-next 6/6] net: add uapi for creating " David Ahern
2017-05-08 17:35 ` [PATCH RFC net-next 0/6] net: reducing memory footprint of network devices Florian Fainelli
2017-05-09 9:50 ` Nicolas Dichtel
2017-05-09 15:42 ` David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170506160734.47084-4-dsahern@gmail.com \
--to=dsahern@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=roopa@cumulusnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).