From: Guenter Roeck <linux@roeck-us.net>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: netdev <netdev@vger.kernel.org>, David <davem@davemloft.net>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Scott Feldman" <sfeldma@gmail.com>,
"Jiri Pirko" <jiri@resnulli.us>,
"Jérome Oufella" <jerome.oufella@savoirfairelinux.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
kernel <kernel@savoirfairelinux.com>,
"Chris Healy" <cphealy@gmail.com>
Subject: Re: [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops
Date: Wed, 03 Jun 2015 08:39:54 -0700 [thread overview]
Message-ID: <556F1FCA.70005@roeck-us.net> (raw)
In-Reply-To: <1116609866.252533.1433343378543.JavaMail.zimbra@savoirfairelinux.com>
On 06/03/2015 07:56 AM, Vivien Didelot wrote:
> Hi Guenter,
>
> On Jun 2, 2015, at 10:17 PM, Guenter Roeck linux@roeck-us.net wrote:
>> On Tue, Jun 02, 2015 at 09:39:50PM -0400, Vivien Didelot wrote:
>>> Guenter,
>>>
>>> On Jun 2, 2015, at 2:50 AM, Guenter Roeck linux@roeck-us.net wrote:
>>>> On 06/01/2015 06:27 PM, Vivien Didelot wrote:
>>>>> + /* Bringing an interface up adds it to the VLAN 0. Ignore this. */
>>>>> + if (!vid)
>>>>> + return 0;
>>>>> +
>>>>
>>>> Me puzzled ;-). I brought this and the fid question up before.
>>>> No idea if my e-mail got lost or what happened.
>>>>
>>>> Can you explain why we don't need a configuration for vlan 0 ?
>>>
>>> Sorry for late reply. Initially, when issuing "ip link set up dev swp0",
>>> ndo_vlan_rx_add_vid was called to add the interface in the VLAN 0.
>>>
>> Loading the 802.1q module has the same effect.
>>
>> I think this may be on purpose; it is telling the switch to accept
>> packets with vid==0 (and untagged packets).
>>
>>> 2 things happen here:
>>>
>>> * this is inconsistent with the "bridge vlan" output which doesn't seem to
>>> know about a VID 0;
>>> * VID 0 seems special for this switch: if an ingressing frame has VID 0, the
>>> tagged port will override the VID bits with the port default VID at egress.
>>>
>> As far as I can see, the switch treats packets with vid==0 and untaged packets
>> as unknown if VLAN support is enabled.
>
> I am not sure about the untagged frames. But for tagged frames, the
> documentation says that frames with vid 0 will be overridden with the port's
> default VID.
>
The documentation says that untagged frames get the port's default VID assigned.
>> Anyway, sounds odd. Sure this isn't a configuration problem somethere ?
>
> If I'm not mistaken, other drivers do that. e.g. Rocker deals with VID >= 1:
>
> for (vid = 1; vid < VLAN_N_VID; vid++)
>
Yes, but that won't help us. Again, the problem is that the switch drops untagged
packets if VLAN mode is set to secure and there is no VID table entry for VID 0
(or, rather, the port's default VID, which happens to be 0 in our case).
We'll have to solve that problem somehow. Using fallback mode isn't really a good
solution since it still treats untagged packets (and priority tagged packets
with vid==0) as membership violations.
It might make sense to set all ports to secure mode, but then we would always have
to create a VID table entry for vid=0 (or vid=default vid). Maybe we should just
do that, and/or keep 802.1q support on a port disabled unless it is explicitly
enabled by some means (such as adding an entry to the port's VLAN filter table).
Since we actually set the default VLAN to 0 in mv88e6xxx_setup_port_common(),
I wonder if you actually _see_ a problem with replaced VIDs, or if you just
assume that there would be one. Can you clarify ?
Thanks,
Guenter
next prev parent reply other threads:[~2015-06-03 15:39 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 1:27 [RFC 0/9] net: dsa: mv88e6352: add 802.1q VLAN support Vivien Didelot
2015-06-02 1:27 ` [RFC 1/9] net: dsa: add basic support for switchdev obj Vivien Didelot
2015-06-02 1:27 ` [RFC 2/9] net: dsa: add basic support for VLAN operations Vivien Didelot
2015-06-02 6:52 ` Guenter Roeck
2015-06-02 14:42 ` Guenter Roeck
2015-06-03 0:45 ` Vivien Didelot
2015-06-02 1:27 ` [RFC 3/9] net: dsa: mv88e6xxx: add support for VTU ops Vivien Didelot
2015-06-02 6:50 ` Guenter Roeck
2015-06-02 7:44 ` Scott Feldman
2015-06-02 13:41 ` Guenter Roeck
2015-06-02 13:42 ` Andrew Lunn
2015-06-02 14:47 ` Guenter Roeck
2015-06-02 22:31 ` nolan
2015-06-03 6:53 ` Scott Feldman
2015-06-03 14:44 ` Guenter Roeck
2015-06-03 18:42 ` Florian Fainelli
2015-06-04 18:22 ` nolan
2015-06-03 1:39 ` Vivien Didelot
2015-06-03 2:17 ` Guenter Roeck
2015-06-03 14:56 ` Vivien Didelot
2015-06-03 15:39 ` Guenter Roeck [this message]
2015-06-02 13:05 ` Andrew Lunn
2015-06-02 1:27 ` [RFC 4/9] net: dsa: mv88e6352: add support for VLAN Vivien Didelot
2015-06-02 1:27 ` [RFC 5/9] net: dsa: mv88e6352: disable mirroring Vivien Didelot
2015-06-02 14:16 ` Guenter Roeck
2015-06-02 14:53 ` Andrew Lunn
2015-06-03 1:12 ` Vivien Didelot
2015-06-03 2:27 ` Guenter Roeck
2015-06-02 1:27 ` [RFC 6/9] net: dsa: mv88e6352: allow egress of unknown multicast Vivien Didelot
2015-06-02 14:20 ` Guenter Roeck
2015-06-03 1:52 ` Vivien Didelot
2015-06-09 22:42 ` Vivien Didelot
2015-06-02 1:27 ` [RFC 7/9] net: dsa: mv88e6352: lock CPU port from learning addresses Vivien Didelot
2015-06-02 14:24 ` Guenter Roeck
2015-06-03 1:06 ` Vivien Didelot
2015-06-03 2:24 ` Guenter Roeck
[not found] ` <CAFXsbZo7DAhbUErMfKas_KUtXMHTURgOxwz-GSr=fuAHLWToEQ@mail.gmail.com>
2015-06-03 4:17 ` Guenter Roeck
2015-06-03 20:51 ` Andrew Lunn
2015-06-02 1:27 ` [RFC 8/9] net: dsa: mv88e6352: set port 802.1Q mode to Secure Vivien Didelot
2015-06-02 14:31 ` Guenter Roeck
2015-06-02 23:45 ` Vivien Didelot
2015-06-02 23:28 ` Guenter Roeck
2015-06-02 1:27 ` [RFC 9/9] net: dsa: fix EDSA frame from hwaccel frame Vivien Didelot
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=556F1FCA.70005@roeck-us.net \
--to=linux@roeck-us.net \
--cc=andrew@lunn.ch \
--cc=cphealy@gmail.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=jerome.oufella@savoirfairelinux.com \
--cc=jiri@resnulli.us \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sfeldma@gmail.com \
--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).