From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Robert Hodaszi <robert.hodaszi@digi.com>
Cc: netdev@vger.kernel.org, claudiu.manoil@nxp.com,
alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com,
andrew@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC net 0/2] net: dsa: felix: fix VLAN-unaware reception
Date: Sun, 15 Dec 2024 19:09:21 +0200 [thread overview]
Message-ID: <20241215170921.5qlundy4jzutvze7@skbuf> (raw)
In-Reply-To: <20241215163334.615427-1-robert.hodaszi@digi.com>
On Sun, Dec 15, 2024 at 05:33:32PM +0100, Robert Hodaszi wrote:
> Hello,
>
> This patchset supposed to fix the currently non-working ocelot-8021q
> mode of the Felix driver if bridge is VLAN-unaware.
>
> As can see in the commit messages, the driver enables
> 'untag_vlan_aware_bridge_pvid' to software VLAN untag all packets, but
> tagging is only enabled if VLAN-filtering is enabled
> (push_inner_tag=1).
>
> Untagging packets from VLAN-unaware bridge ports is wrong, and corrupts
> the packets.
>
> It was tempting to simply restore dsa_software_vlan_untag()'s checking
> as it was before:
>
> /* Move VLAN tag from data to hwaccel **
> if (!skb_vlan_tag_present(skb) && skb->protocol == htons(proto)) {
> skb = skb_vlan_untag(skb);
> if (!skb)
> return NULL;
> }
>
> And so untagging only VLAN packets, but that's not really a solution,
> VLAN-tagged packets may arrive on VLAN-unaware ports, and those would
> get untagged incorrectly.
>
> So I added a way to mark ports as untagged when untagging is enabled,
> and return without altering the packet.
Give me an example traffic pattern, Linux configuration and corruption,
please. I spent a lot of time trying to make sure I am not introducing
regressions, and I have no idea what you are seeing that is wrong.
Please don't try to make assumptions, just let me see what you see.
next prev parent reply other threads:[~2024-12-15 17:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-15 16:33 [PATCH RFC net 0/2] net: dsa: felix: fix VLAN-unaware reception Robert Hodaszi
2024-12-15 16:33 ` [PATCH RFC net 1/2] net: dsa: provide a way to exclude switch ports from VLAN untagging Robert Hodaszi
2024-12-15 16:33 ` [PATCH RFC net 2/2] net: dsa: felix: fix reception from VLAN-unaware ports Robert Hodaszi
2024-12-15 17:09 ` Vladimir Oltean [this message]
2024-12-16 10:10 ` [PATCH RFC net 0/2] net: dsa: felix: fix VLAN-unaware reception Robert Hodaszi
2024-12-16 13:51 ` Vladimir Oltean
2024-12-16 14:39 ` Robert Hodaszi
2024-12-16 14:48 ` Vladimir Oltean
2024-12-17 10:15 ` Simon Horman
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=20241215170921.5qlundy4jzutvze7@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robert.hodaszi@digi.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