Re: [PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Vladimir Oltean
On Mon, Mar 08, 2021 at 11:32:57PM +0100, Tobias Waldekranz wrote: > I get the sense that one reason that the mentioned cases are not caught > by the existing validation logic, is that checks are scattered in > multiple places (primarily dsa_slave_check_8021q_upper and > dsa_port_can_apply_vlan_fil

Re: [PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Tobias Waldekranz
On Mon, Mar 08, 2021 at 22:50, Vladimir Oltean wrote: > On Mon, Mar 08, 2021 at 09:00:49PM +0100, Tobias Waldekranz wrote: >> Alright, we do not want to lie to the stack, got it... > > [...] > >> ...hang on, are we OK with lying or not? Yes, I guess? > > I'm not too happy about it. The problem in

Re: [PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Vladimir Oltean
On Mon, Mar 08, 2021 at 09:00:49PM +0100, Tobias Waldekranz wrote: > Alright, we do not want to lie to the stack, got it... [...] > ...hang on, are we OK with lying or not? Yes, I guess? I'm not too happy about it. The problem in my mind, really, is that if we disable 'rx-vlan-filter' and we gai

Re: [PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Tobias Waldekranz
On Mon, Mar 08, 2021 at 19:00, Vladimir Oltean wrote: > On Mon, Mar 08, 2021 at 05:44:46PM +0200, Vladimir Oltean wrote: >> On Mon, Mar 08, 2021 at 04:04:04PM +0100, Tobias Waldekranz wrote: >> > The dsa_slave_vlan_rx_{add,kill}_vid ndos are required for hardware >> > that can not control VLAN fil

Re: [PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Florian Fainelli
On 3/8/21 9:00 AM, Vladimir Oltean wrote: > On Mon, Mar 08, 2021 at 05:44:46PM +0200, Vladimir Oltean wrote: >> On Mon, Mar 08, 2021 at 04:04:04PM +0100, Tobias Waldekranz wrote: >>> The dsa_slave_vlan_rx_{add,kill}_vid ndos are required for hardware >>> that can not control VLAN filtering per port

Re: [PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Vladimir Oltean
On Mon, Mar 08, 2021 at 05:44:46PM +0200, Vladimir Oltean wrote: > On Mon, Mar 08, 2021 at 04:04:04PM +0100, Tobias Waldekranz wrote: > > The dsa_slave_vlan_rx_{add,kill}_vid ndos are required for hardware > > that can not control VLAN filtering per port, rather it is a device > > global setting, i

Re: [PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Vladimir Oltean
On Mon, Mar 08, 2021 at 04:04:04PM +0100, Tobias Waldekranz wrote: > The dsa_slave_vlan_rx_{add,kill}_vid ndos are required for hardware > that can not control VLAN filtering per port, rather it is a device > global setting, in order to support VLAN uppers on non-bridged ports. > > For hardware th

[PATCH net 1/2] net: dsa: Accept software VLANs for stacked interfaces

2021-03-08 Thread Tobias Waldekranz
The dsa_slave_vlan_rx_{add,kill}_vid ndos are required for hardware that can not control VLAN filtering per port, rather it is a device global setting, in order to support VLAN uppers on non-bridged ports. For hardware that can control VLAN filtering per port, it is perfectly fine to fallback to s