All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, andrew@lunn.ch, linux@roeck-us.net,
	jiri@resnulli.us, sfeldma@gmail.com,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH RFC 1/5] net: add IFF_L2_ONLY flag
Date: Tue, 25 Aug 2015 15:50:11 -0700	[thread overview]
Message-ID: <1440543015-14693-2-git-send-email-f.fainelli@gmail.com> (raw)
In-Reply-To: <1440543015-14693-1-git-send-email-f.fainelli@gmail.com>

Allow network device drivers to flag specific network devices as being
L2 only, that is, no IPv4/v6 configuration will be allowed on these
interfaces, yet they are still usable as configuration endpoints for
ethtool interfaces.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 include/uapi/linux/if.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h
index 9cf2394f0bcf..2de818930edf 100644
--- a/include/uapi/linux/if.h
+++ b/include/uapi/linux/if.h
@@ -87,6 +87,7 @@ enum net_device_flags {
 	IFF_LOWER_UP			= 1<<16, /* volatile */
 	IFF_DORMANT			= 1<<17, /* volatile */
 	IFF_ECHO			= 1<<18, /* volatile */
+	IFF_L2_ONLY			= 1<<19, /* volatile */
 };
 
 #define IFF_UP				IFF_UP
@@ -108,9 +109,11 @@ enum net_device_flags {
 #define IFF_LOWER_UP			IFF_LOWER_UP
 #define IFF_DORMANT			IFF_DORMANT
 #define IFF_ECHO			IFF_ECHO
+#define IFF_L2_ONLY			IFF_L2_ONLY
 
 #define IFF_VOLATILE	(IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
-		IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
+		IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT|\
+		IFF_L2_ONLY)
 
 #define IF_GET_IFACE	0x0001		/* for querying only */
 #define IF_GET_PROTO	0x0002
-- 
2.1.0

  reply	other threads:[~2015-08-25 22:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 22:50 [PATCH RFC 0/5] net: L2 only interfaces Florian Fainelli
2015-08-25 22:50 ` Florian Fainelli [this message]
2015-08-25 22:50 ` [PATCH RFC 2/5] net: ipv4: Skip in_dev initialization for IFF_L2_ONLY interfaces Florian Fainelli
2015-08-25 22:50 ` [PATCH RFC 3/5] net: ipv6: Skip in6_dev " Florian Fainelli
2015-08-25 22:50 ` [PATCH RFC 4/5] net: dsa: Flag slave network devices with IFF_L2_ONLY Florian Fainelli
2015-08-25 22:50 ` [PATCH RFC 5/5] net: dsa: bcm_sf2: Allow disabling tagging protocol Florian Fainelli
2015-08-26  0:09   ` David Miller
2015-08-25 23:20 ` [PATCH RFC 0/5] net: L2 only interfaces Alexei Starovoitov
2015-08-25 23:24   ` Florian Fainelli
2015-08-25 23:33   ` David Ahern
2015-09-01 17:07   ` Vivien Didelot
2015-08-25 23:24 ` Stephen Hemminger
2015-08-25 23:23   ` Florian Fainelli
2015-08-25 23:44 ` Sowmini Varadhan
2015-08-25 23:52   ` David Ahern
2015-08-26  0:05     ` Sowmini Varadhan
2015-08-26  0:12 ` David Miller
2015-08-26  4:24   ` Marcel Holtmann
2015-08-26 17:37     ` Florian Fainelli
2015-08-26 17:56       ` Marcel Holtmann
2015-08-26 17:32   ` Florian Fainelli

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=1440543015-14693-2-git-send-email-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=jiri@resnulli.us \
    --cc=linux@roeck-us.net \
    --cc=netdev@vger.kernel.org \
    --cc=sfeldma@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.