lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 11 May 2020 20:34:04 -0700 From: Florian Fainelli <f.fainelli@...il.com> To: Vladimir Oltean <olteanv@...il.com>, andrew@...n.ch, vivien.didelot@...il.com Cc: davem@...emloft.net, kuba@...nel.org, jiri@...lanox.com, idosch@...sch.org, rmk+kernel@...linux.org.uk, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v2 net-next 08/15] net: dsa: sja1105: prepare tagger for handling DSA tags and VLAN simultaneously On 5/11/2020 6:53 AM, Vladimir Oltean wrote: > From: Vladimir Oltean <vladimir.oltean@....com> > > In VLAN-unaware mode, sja1105 uses VLAN tags with a custom TPID of > 0xdadb. While in the yet-to-be introduced best_effort_vlan_filtering > mode, it needs to work with normal VLAN TPID values. > > A complication arises when we must transmit a VLAN-tagged packet to the > switch when it's in VLAN-aware mode. We need to construct a packet with > 2 VLAN tags, and the switch will use the outer header for routing and > pop it on egress. But sadly, here the 2 hardware generations don't > behave the same: > > - E/T switches won't pop an ETH_P_8021AD tag on egress, it seems > (packets will remain double-tagged). > - P/Q/R/S switches will drop a packet with 2 ETH_P_8021Q tags (it looks > like it tries to prevent VLAN hopping). > > But looks like the reverse is also true: > > - E/T switches have no problem popping the outer tag from packets with > 2 ETH_P_8021Q tags. > - P/Q/R/S will have no problem popping a single tag even if that is > ETH_P_8021AD. > > So it is clear that if we want the hardware to work with dsa_8021q > tagging in VLAN-aware mode, we need to send different TPIDs depending on > revision. Keep that information in priv->info->qinq_tpid. > > The per-port tagger structure will hold an xmit_tpid value that depends > not only upon the qinq_tpid, but also upon the VLAN awareness state > itself (in case we must transmit using 0xdadb). > > Signed-off-by: Vladimir Oltean <vladimir.oltean@....com> Reviewed-by: Florian Fainelli <f.fainelli@...il.com> -- Florian
Powered by blists - more mailing lists