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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ac20223a-d08f-b9ac-5648-6f15c844dbdd@gmail.com>
Date:   Wed, 20 Jan 2021 19:41:30 -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 05/10] net: mscc: ocelot: don't use NPI tag
 prefix for the CPU port module



On 1/20/2021 6:36 PM, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@....com>
> 
> Context: Ocelot switches put the injection/extraction frame header in
> front of the Ethernet header. When used in NPI mode, a DSA master would
> see junk instead of the destination MAC address, and it would most
> likely drop the packets. So the Ocelot frame header can have an optional
> prefix, which is just "ff:ff:ff:ff:ff:fe > ff:ff:ff:ff:ff:ff" padding
> put before the actual tag (still before the real Ethernet header) such
> that the DSA master thinks it's looking at a broadcast frame with a
> strange EtherType.
> 
> Unfortunately, a lesson learned in commit 69df578c5f4b ("net: mscc:
> ocelot: eliminate confusion between CPU and NPI port") seems to have
> been forgotten in the meanwhile.
> 
> The CPU port module and the NPI port have independent settings for the
> length of the tag prefix. However, the driver is using the same variable
> to program both of them.
> 
> There is no reason really to use any tag prefix with the CPU port
> module, since that is not connected to any Ethernet port. So this patch
> makes the inj_prefix and xtr_prefix variables apply only to the NPI
> port (which the switchdev ocelot_vsc7514 driver does not use).
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ