[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241215163334.615427-1-robert.hodaszi@digi.com>
Date: Sun, 15 Dec 2024 17:33:32 +0100
From: Robert Hodaszi <robert.hodaszi@...i.com>
To: netdev@...r.kernel.org,
vladimir.oltean@....com,
claudiu.manoil@....com,
alexandre.belloni@...tlin.com,
UNGLinuxDriver@...rochip.com,
andrew@...n.ch,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
horms@...nel.org,
linux-kernel@...r.kernel.org
Cc: Robert Hodaszi <robert.hodaszi@...i.com>
Subject: [PATCH RFC net 0/2] net: dsa: felix: fix VLAN-unaware reception
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.
Robert Hodaszi (2):
net: dsa: provide a way to exclude switch ports from VLAN untagging
net: dsa: felix: fix reception from VLAN-unaware ports
drivers/net/dsa/ocelot/felix.c | 9 ++++++++-
include/net/dsa.h | 7 +++++++
net/dsa/tag.h | 4 ++++
3 files changed, 19 insertions(+), 1 deletion(-)
--
2.43.0
Powered by blists - more mailing lists