From: roopa <roopa@cumulusnetworks.com>
To: Scott Feldman <sfeldma@gmail.com>
Cc: Netdev <netdev@vger.kernel.org>,
shemminger@vyatta.com,
"vyasevic@redhat.com" <vyasevic@redhat.com>,
Wilson Kok <wkok@cumulusnetworks.com>
Subject: Re: [PATCH 2/6] bridge: add new attribute IFLA_BRIDGE_VLAN_RANGE_INFO to represent vlan range
Date: Mon, 29 Dec 2014 14:10:58 -0800 [thread overview]
Message-ID: <54A1D172.4070501@cumulusnetworks.com> (raw)
In-Reply-To: <CAE4R7bCYJam86BYf9N8Z63g58njHrjpaH3sdHoSqJBxyFq=Y4g@mail.gmail.com>
On 12/29/14, 1:52 PM, Scott Feldman wrote:
> On Mon, Dec 29, 2014 at 1:05 PM, <roopa@cumulusnetworks.com> wrote:
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> This patch adds new bridge netlink attribute IFLA_BRIDGE_VLAN_RANGE_INFO
>> to represent vlan range.
>>
>> Current IFLA_BRIDGE_VLAN_INFO attribute represents a single vlan and
>> does not scale well when the port has large number of vlans.
>>
>> IFLA_BRIDGE_VLAN_RANGE_INFO is similar to IFLA_BRIDGE_VLAN_INFO but helps
>> with packing consecutive vlans in a single attribute. Thus reducing the
>> size of the netlink msg during adds and also during dumps.
>>
>> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
>> Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
>> ---
>> include/uapi/linux/if_bridge.h | 7 +++++++
>> net/bridge/br_netlink.c | 2 ++
>> 2 files changed, 9 insertions(+)
>>
>> diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h
>> index b03ee8f..d41a346 100644
>> --- a/include/uapi/linux/if_bridge.h
>> +++ b/include/uapi/linux/if_bridge.h
>> @@ -118,6 +118,7 @@ enum {
>> IFLA_BRIDGE_FLAGS,
>> IFLA_BRIDGE_MODE,
>> IFLA_BRIDGE_VLAN_INFO,
>> + IFLA_BRIDGE_VLAN_RANGE_INFO,
>> __IFLA_BRIDGE_MAX,
>> };
>> #define IFLA_BRIDGE_MAX (__IFLA_BRIDGE_MAX - 1)
>> @@ -131,6 +132,12 @@ struct bridge_vlan_info {
>> __u16 vid;
>> };
>>
>> +struct bridge_vlan_range_info {
>> + __u16 flags;
>> + __u16 vid;
> vid_start or vid_begin to be consistent with vid_end?
ack..
>
>> + __u16 vid_end;
>> +};
>> +
>> /* Bridge multicast database attributes
>> * [MDBA_MDB] = {
>> * [MDBA_MDB_ENTRY] = {
>> diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
>> index 75971b1..e7d1fc0 100644
>> --- a/net/bridge/br_netlink.c
>> +++ b/net/bridge/br_netlink.c
>> @@ -223,6 +223,8 @@ 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_RANGE_INFO] = { .type = NLA_BINARY,
>> + .len = sizeof(struct bridge_vlan_range_info), },
> ifla_br_policy isn't used anymore from patch 1/6, so no need to add this.
>
>> };
>>
>> static int br_afspec(struct net_bridge *br,
>> --
>> 1.7.10.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2014-12-29 22:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-29 21:05 [PATCH 2/6] bridge: add new attribute IFLA_BRIDGE_VLAN_RANGE_INFO to represent vlan range roopa
2014-12-29 21:52 ` Scott Feldman
2014-12-29 22:10 ` roopa [this message]
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=54A1D172.4070501@cumulusnetworks.com \
--to=roopa@cumulusnetworks.com \
--cc=netdev@vger.kernel.org \
--cc=sfeldma@gmail.com \
--cc=shemminger@vyatta.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).