All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Andrew Lunn" <andrew@lunn.ch>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Jakub Kicinski" <kuba@kernel.org>,
	netdev@vger.kernel.org, "Mauri Sandberg" <sandberg@mailfence.com>,
	"Alvin Šipraga" <alsi@bang-olufsen.dk>,
	"DENG Qingfang" <dqfext@gmail.com>
Subject: Re: [PATCH net-next 4/8] net: dsa: rtl8366rb: Always treat VLAN 0 as untagged
Date: Mon, 13 Sep 2021 18:45:36 +0300	[thread overview]
Message-ID: <20210913154536.v7rc7ln7ctcuqxl7@skbuf> (raw)
In-Reply-To: <20210913144300.1265143-5-linus.walleij@linaro.org>

On Mon, Sep 13, 2021 at 04:42:56PM +0200, Linus Walleij wrote:
> VLAN 0 shall always be treated as untagged, as per example
> from other drivers (I guess from the spec).
> 
> Cc: Vladimir Oltean <olteanv@gmail.com>
> Cc: Mauri Sandberg <sandberg@mailfence.com>
> Cc: Alvin Šipraga <alsi@bang-olufsen.dk>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: DENG Qingfang <dqfext@gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v4:
> - New patch after noting that other drivers always sets VLAN 0
>   as untagged.
> ---

"Other drivers" are not always a good example.

Technically speaking, IEEE 802.1Q-2018 wants switches to _preserve_ the
VID 0 found inside packets when forwarding them, but treat them the same
as untagged packets otherwise (aka classify them to the port's PVID, and
forward them according to the forwarding domain of the $(PVID) VLAN in
that bridge).

"Preserve" the VID 0 tag means "mark it as egress-tagged", so the
opposite of the change you are making.

Now, I know all too well it is not always possible to satisfy that
expectation, and we have had some back-and-forth on other drivers about
this, and ended up accepting the fact that the processing of VID 0 is
more or less broken. User space deals with that the best it can
(read as: sometimes it can't):
https://sourceforge.net/p/linuxptp/mailman/message/37318312/

But the justification given here to make VID 0 egress-untagged is pretty
weak as it is.

  reply	other threads:[~2021-09-13 15:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 14:42 [PATCH net-next 0/8] RTL8366(RB) cleanups part 1 Linus Walleij
2021-09-13 14:42 ` [PATCH net-next 1/8] net: dsa: rtl8366rb: Support bridge offloading Linus Walleij
2021-09-13 14:42 ` [PATCH net-next 2/8] net: dsa: rtl8366: Drop custom VLAN set-up Linus Walleij
2021-09-13 14:42 ` [PATCH net-next 3/8] net: dsa: rtl8366rb: Rewrite weird VLAN filering enablement Linus Walleij
2021-09-13 17:29   ` Florian Fainelli
2021-09-13 14:42 ` [PATCH net-next 4/8] net: dsa: rtl8366rb: Always treat VLAN 0 as untagged Linus Walleij
2021-09-13 15:45   ` Vladimir Oltean [this message]
2021-09-13 14:42 ` [PATCH net-next 5/8] net: dsa: rtl8366: Disable "4K" VLANs Linus Walleij
2021-09-13 15:34   ` Vladimir Oltean
2021-09-13 23:20     ` Linus Walleij
2021-09-14  6:29       ` DENG Qingfang
2021-09-14 13:12         ` Linus Walleij
2021-09-13 14:42 ` [PATCH net-next 6/8] net: dsa: rtl8366rb: Fix off-by-one bug Linus Walleij
2021-09-13 17:22   ` Vladimir Oltean
2021-09-13 14:42 ` [PATCH net-next 7/8] net: dsa: rtl8366: Fix a bug in deleting VLANs Linus Walleij
2021-09-13 17:34   ` Florian Fainelli
2021-09-13 14:43 ` [PATCH net-next 8/8] net: dsa: rtl8366: Drop and depromote pointless prints Linus Walleij
2021-09-13 17:35   ` Florian Fainelli
2021-09-13 17:38     ` Vladimir Oltean
2021-09-13 18:13       ` 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=20210913154536.v7rc7ln7ctcuqxl7@skbuf \
    --to=olteanv@gmail.com \
    --cc=alsi@bang-olufsen.dk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=sandberg@mailfence.com \
    --cc=vivien.didelot@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.