[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240405151359.3kuawi4ylug6ryfc@skbuf>
Date: Fri, 5 Apr 2024 18:13:59 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Pawel Dembicki <paweldembicki@...il.com>
Cc: netdev@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org>,
Simon Horman <horms@...nel.org>, Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
UNGLinuxDriver@...rochip.com, Russell King <linux@...linux.org.uk>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v8 13/16] net: dsa: vsc73xx: Implement the
tag_8021q VLAN operations
On Wed, Apr 03, 2024 at 12:37:29PM +0200, Pawel Dembicki wrote:
> @@ -756,6 +756,12 @@ static int vsc73xx_setup(struct dsa_switch *ds)
>
> mdelay(50);
>
> + rtnl_lock();
> + ret = dsa_tag_8021q_register(ds, htons(ETH_P_8021Q));
> + rtnl_unlock();
> + if (ret)
> + return ret;
> +
No dsa_tag_8021q_unregister() in vsc73xx_teardown()?
Also, a bit odd placement, while the resets haven't all finished (this
falls in between the IP multicast flood mask and the PHY resets. It
makes future refactoring of the other code harder.
Additionally (and much worse), even later in vsc73xx_setup(), you clear
the VLAN table with portmaps of 0. Doesn't this wipe out the
configuration made by
dsa_tag_8021q_register()
-> dsa_tag_8021q_setup()
-> dsa_tag_8021q_port_setup()
-> dsa_port_tag_8021q_vlan_add()
-> dsa_switch_tag_8021q_vlan_add()
-> dsa_port_do_tag_8021q_vlan_add()
-> vsc73xx_tag_8021q_vlan_add()
-> vsc73xx_tag_8021q_vlan_add()
?
Powered by blists - more mailing lists