From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Machata Subject: Re: [PATCH RFT] net: dsa: Allow configuring CPU port VLANs Date: Mon, 25 Jun 2018 12:13:10 +0300 Message-ID: References: <20180624153339.13572-1-f.fainelli@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Cc: netdev@vger.kernel.org, jiri@mellanox.com, ilias.apalodimas@linaro.org, Andrew Lunn , Vivien Didelot , "David S. Miller" , linux-kernel@vger.kernel.org (open list) To: Florian Fainelli Return-path: In-Reply-To: <20180624153339.13572-1-f.fainelli@gmail.com> (Florian Fainelli's message of "Sun, 24 Jun 2018 08:33:39 -0700") Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Florian Fainelli writes: > if (netif_is_bridge_master(vlan->obj.orig_dev)) > - return -EOPNOTSUPP; > + info.port = dp->cpu_dp->index; The condition above will trigger also when a VLAN is added on a member port, and there's no other port with that VLAN. In that case the VLAN comes without the BRIDGE_VLAN_INFO_BRENTRY flag. In mlxsw we have this to get the bridge VLANs: if (netif_is_bridge_master(orig_dev)) { [...] if ((vlan->flags & BRIDGE_VLAN_INFO_BRENTRY) && [...] This doesn't appear to be done in DSA unless I'm missing something. Thanks, Petr