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  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:   Tue, 4 Aug 2020 09:38:21 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Hongbo Wang <hongbo.wang@....com>,
        David Miller <davem@...emloft.net>
Cc:     Xiaoliang Yang <xiaoliang.yang_1@....com>,
        "allan.nielsen@...rochip.com" <allan.nielsen@...rochip.com>,
        Po Liu <po.liu@....com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        Alexandru Marginean <alexandru.marginean@....com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Leo Li <leoyang.li@....com>, Mingkai Hu <mingkai.hu@....com>,
        "andrew@...n.ch" <andrew@...n.ch>,
        "vivien.didelot@...il.com" <vivien.didelot@...il.com>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "idosch@...sch.org" <idosch@...sch.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "vinicius.gomes@...el.com" <vinicius.gomes@...el.com>,
        "nikolay@...ulusnetworks.com" <nikolay@...ulusnetworks.com>,
        "roopa@...ulusnetworks.com" <roopa@...ulusnetworks.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "horatiu.vultur@...rochip.com" <horatiu.vultur@...rochip.com>,
        "alexandre.belloni@...tlin.com" <alexandre.belloni@...tlin.com>,
        "UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>,
        "ivecera@...hat.com" <ivecera@...hat.com>
Subject: Re: [EXT] Re: [PATCH v4 2/2] net: dsa: ocelot: Add support for QinQ
 Operation



On 8/3/2020 11:36 PM, Hongbo Wang wrote:
>>> +     if (vlan->proto == ETH_P_8021AD) {
>>> +             ocelot->enable_qinq = true;
>>> +             ocelot_port->qinq_mode = true;
>>> +     }
>>  ...
>>> +     if (vlan->proto == ETH_P_8021AD) {
>>> +             ocelot->enable_qinq = false;
>>> +             ocelot_port->qinq_mode = false;
>>> +     }
>>> +
>>
>> I don't understand how this can work just by using a boolean to track the
>> state.
>>
>> This won't work properly if you are handling multiple QinQ VLAN entries.
>>
>> Also, I need Andrew and Florian to review and ACK the DSA layer changes that
>> add the protocol value to the device notifier block.
> 
> Hi David,
> Thanks for reply.
> 
> When setting bridge's VLAN protocol to 802.1AD by the command "ip link set br0 type bridge vlan_protocol 802.1ad", it will call dsa_slave_vlan_rx_add(dev, proto, vid) for every port in the bridge, the parameter vid is port's pvid 1,
> if pvid's proto is 802.1AD, I will enable switch's enable_qinq, and the related port's qinq_mode,
> 
> When there are multiple QinQ VLAN entries, If one VLAN's proto is 802.1AD, I will enable switch and the related port into QinQ mode.

The enabling appears fine, the problem is the disabling, the first
802.1AD VLAN entry that gets deleted will lead to the port and switch no
longer being in QinQ mode, and this does not look intended.
-- 
Florian

Powered by blists - more mailing lists