From: roopa@cumulusnetworks.com
To: netdev@vger.kernel.org, hemminger@vyatta.com, vyasevic@redhat.com
Cc: sfeldma@gmail.com, wkok@cumulusnetworks.com,
Roopa Prabhu <roopa@cumulusnetworks.com>
Subject: [PATCH net-next v2 1/2] bridge: new attribute and flags to represent vlan info lists and ranges
Date: Wed, 31 Dec 2014 08:48:52 -0800 [thread overview]
Message-ID: <1420044533-16963-2-git-send-email-roopa@cumulusnetworks.com> (raw)
From: Roopa Prabhu <roopa@cumulusnetworks.com>
This patch adds (as suggested by scott feldman),
- new netlink attribute IFLA_BRIDGE_VLAN_INFO_LIST to represent
vlan list
- And bridge_vlan_info flags BRIDGE_VLAN_INFO_RANGE_START and
BRIDGE_VLAN_INFO_RANGE_END to indicate start and end of vlan range
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
include/uapi/linux/if_bridge.h | 4 ++++
net/bridge/br_netlink.c | 1 +
2 files changed, 5 insertions(+)
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h
index b03ee8f..fa468aa 100644
--- a/include/uapi/linux/if_bridge.h
+++ b/include/uapi/linux/if_bridge.h
@@ -112,12 +112,14 @@ struct __fdb_entry {
* [IFLA_BRIDGE_FLAGS]
* [IFLA_BRIDGE_MODE]
* [IFLA_BRIDGE_VLAN_INFO]
+ * [IFLA_BRIDGE_VLAN_INFO_LIST]
* }
*/
enum {
IFLA_BRIDGE_FLAGS,
IFLA_BRIDGE_MODE,
IFLA_BRIDGE_VLAN_INFO,
+ IFLA_BRIDGE_VLAN_INFO_LIST,
__IFLA_BRIDGE_MAX,
};
#define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
@@ -125,6 +127,8 @@ enum {
#define BRIDGE_VLAN_INFO_MASTER (1<<0) /* Operate on Bridge device as well */
#define BRIDGE_VLAN_INFO_PVID (1<<1) /* VLAN is PVID, ingress untagged */
#define BRIDGE_VLAN_INFO_UNTAGGED (1<<2) /* VLAN egresses untagged */
+#define BRIDGE_VLAN_INFO_RANGE_START (1<<3) /* VLAN is start of vlan range */
+#define BRIDGE_VLAN_INFO_RANGE_END (1<<4) /* VLAN is end of vlan range */
struct bridge_vlan_info {
__u16 flags;
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index 9f5eb55..492ef6a 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -223,6 +223,7 @@ static const struct nla_policy ifla_br_policy[IFLA_MAX+1] = {
[IFLA_BRIDGE_MODE] = { .type = NLA_U16 },
[IFLA_BRIDGE_VLAN_INFO] = { .type = NLA_BINARY,
.len = sizeof(struct bridge_vlan_info), },
+ [IFLA_BRIDGE_VLAN_INFO_LIST] = { .type = NLA_NESTED, },
};
static int br_afspec(struct net_bridge *br,
--
1.7.10.4
next reply other threads:[~2014-12-31 16:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-31 16:48 roopa [this message]
2014-12-31 17:45 ` [PATCH net-next v2 1/2] bridge: new attribute and flags to represent vlan info lists and ranges Jeremiah Mahler
2014-12-31 18:15 ` roopa
2014-12-31 18:48 ` Jeremiah Mahler
2014-12-31 21:17 ` roopa
2015-01-01 3:08 ` Jeremiah Mahler
2015-01-01 4:25 ` roopa
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=1420044533-16963-2-git-send-email-roopa@cumulusnetworks.com \
--to=roopa@cumulusnetworks.com \
--cc=hemminger@vyatta.com \
--cc=netdev@vger.kernel.org \
--cc=sfeldma@gmail.com \
--cc=vyasevic@redhat.com \
--cc=wkok@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).