From: Jiri Pirko <jiri@resnulli.us>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: Elad Raz <eladr@mellanox.com>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
Scott Feldman <sfeldma@gmail.com>,
netdev <netdev@vger.kernel.org>,
"stephen@networkplumber.org" <stephen@networkplumber.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>, Ido Schimmel <idosch@mellanox.com>,
Or Gerlitz <ogerlitz@mellanox.com>
Subject: Re: switchdev and VLAN ranges
Date: Sun, 11 Oct 2015 09:12:09 +0200 [thread overview]
Message-ID: <20151011071208.GA2188@nanopsycho.orion> (raw)
In-Reply-To: <5618EA2A.3020900@cumulusnetworks.com>
Sat, Oct 10, 2015 at 12:36:26PM CEST, nikolay@cumulusnetworks.com wrote:
>On 10/10/2015 09:49 AM, Elad Raz wrote:
>>
>>> On Oct 10, 2015, at 2:30 AM, Vivien Didelot <vivien.didelot@savoirfairelinux.com> wrote:
>>>
>>> I have two concerns in mind:
>>>
>>> a) if we imagine that drivers like Rocker allocate memory in the prepare
>>> phase for each VID, preparing a range like 100-4000 would definitely not
>>> be recommended.
>>>
>>> b) imagine that you have two Linux bridges on a switch, one using the
>>> hardware VLAN 100. If you request the VLAN range 99-101 for the other
>>> bridge members, it is not possible for the driver to say "I can
>>> accelerate VLAN 99 and 101, but not 100". It must return OPNOTSUPP for
>>> the whole range.
>>
>> Another concern I have with vid_being..vid_end range is the “flags”. Where flags can be BRIDGE_VLAN_INFO_PVID.
>> There is no sense having more than one VLAN as a PVID.
>> This leave the HW vendor the choice which VLAN id they will use as the PVID.
>>
>
>iproute2 doesn't allow to do it but I can see that someone can actually make it
>so the flags for the range have it and it doesn't look correct. Perhaps we need
>something like the patch below to enforce this from kernel-side.
>
>
>diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
>index d78b4429505a..02b17b53e9a6 100644
>--- a/net/bridge/br_netlink.c
>+++ b/net/bridge/br_netlink.c
>@@ -524,6 +524,9 @@ static int br_afspec(struct net_bridge *br,
> if (vinfo_start)
> return -EINVAL;
> vinfo_start = vinfo;
>+ /* don't allow range of pvids */
>+ if (vinfo_start->flags & BRIDGE_VLAN_INFO_PVID)
>+ return -EINVAL;
> continue;
> }
>
Looks correct to me. Could you please submit this properly? Thanks!
next prev parent reply other threads:[~2015-10-11 7:12 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 23:30 switchdev and VLAN ranges Vivien Didelot
2015-10-10 4:22 ` Scott Feldman
2015-10-10 16:33 ` Vivien Didelot
2015-10-10 18:10 ` Florian Fainelli
2015-10-10 19:47 ` Vivien Didelot
2015-10-10 7:49 ` Elad Raz
2015-10-10 10:36 ` Nikolay Aleksandrov
2015-10-11 7:12 ` Jiri Pirko [this message]
2015-10-11 10:49 ` [PATCH net-next] bridge: vlan: enforce no pvid flag in vlan ranges Nikolay Aleksandrov
2015-10-11 14:13 ` Jiri Pirko
2015-10-13 2:59 ` David Miller
2015-10-11 22:41 ` switchdev and VLAN ranges Vivien Didelot
2015-10-12 0:13 ` Nikolay Aleksandrov
2015-10-12 5:14 ` Scott Feldman
2015-10-12 10:15 ` Nikolay Aleksandrov
2015-10-12 12:01 ` [PATCH net-next] switchdev: enforce no pvid flag in vlan ranges Nikolay Aleksandrov
2015-10-12 12:11 ` Elad Raz
2015-10-12 12:17 ` Jiri Pirko
2015-10-12 17:36 ` Vivien Didelot
2015-10-13 6:13 ` Scott Feldman
2015-10-13 8:31 ` Ido Schimmel
2015-10-13 14:32 ` Vivien Didelot
2015-10-14 6:14 ` Ido Schimmel
2015-10-14 15:25 ` Vivien Didelot
2015-10-14 17:14 ` Scott Feldman
2015-10-14 17:42 ` Ido Schimmel
2015-10-14 18:51 ` Vivien Didelot
2015-10-14 22:08 ` Florian Fainelli
2015-10-15 0:07 ` Vivien Didelot
2015-10-15 2:58 ` Scott Feldman
2015-10-15 7:28 ` Ido Schimmel
2015-10-13 11:42 ` David Miller
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=20151011071208.GA2188@nanopsycho.orion \
--to=jiri@resnulli.us \
--cc=andrew@lunn.ch \
--cc=eladr@mellanox.com \
--cc=f.fainelli@gmail.com \
--cc=idosch@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=ogerlitz@mellanox.com \
--cc=sfeldma@gmail.com \
--cc=stephen@networkplumber.org \
--cc=vivien.didelot@savoirfairelinux.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).