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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Jan 2021 20:10:07 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vladimir Oltean <olteanv@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Richard Cochran <richardcochran@...il.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Alexandru Marginean <alexandru.marginean@....com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Xiaoliang Yang <xiaoliang.yang_1@....com>,
        Hongbo Wang <hongbo.wang@....com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Po Liu <po.liu@....com>, Yangbo Lu <yangbo.lu@....com>,
        Maxim Kochetkov <fido_max@...ox.ru>,
        Eldar Gasanov <eldargasanov2@...il.com>,
        Andrey L <al@...omtech.com>,
        Tobias Waldekranz <tobias@...dekranz.com>,
        UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH v5 net-next 10/10] net: dsa: felix: perform switch setup
 for tag_8021q



On 1/20/2021 6:36 PM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> Unlike sja1105, the only other user of the software-defined tag_8021q.c
> tagger format, the implementation we choose for the Felix DSA switch
> driver preserves full functionality under a vlan_filtering bridge
> (i.e. IP termination works through the DSA user ports under all
> circumstances).
> 
> The tag_8021q protocol just wants:
> - Identifying the ingress switch port based on the RX VLAN ID, as seen
>   by the CPU. We achieve this by using the TCAM engines (which are also
>   used for tc-flower offload) to push the RX VLAN as a second, outer
>   tag, on egress towards the CPU port.
> - Steering traffic injected into the switch from the network stack
>   towards the correct front port based on the TX VLAN, and consuming
>   (popping) that header on the switch's egress.
> 
> A tc-flower pseudocode of the static configuration done by the driver
> would look like this:
> 
> $ tc qdisc add dev <cpu-port> clsact
> $ for eth in swp0 swp1 swp2 swp3; do \
> 	tc filter add dev <cpu-port> egress flower indev ${eth} \
> 		action vlan push id <rxvlan> protocol 802.1ad; \
> 	tc filter add dev <cpu-port> ingress protocol 802.1Q flower
> 		vlan_id <txvlan> action vlan pop \
> 		action mirred egress redirect dev ${eth}; \
> done
> 
> but of course since DSA does not register network interfaces for the CPU
> port, this configuration would be impossible for the user to do. Also,
> due to the same reason, it is impossible for the user to inadvertently
> delete these rules using tc. These rules do not collide in any way with
> tc-flower, they just consume some TCAM space, which is something we can
> live with.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

Reviewed-by: Florian Fainelli <f.fainelli@...il.com>

Quite an interesting read.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ