Re: [PATCH net RESEND] net: ethernet: ti: am65-cpsw: Add IFF_UNICAST_FLT flag to port device

From: Ravi Gunasekaran
Date: Fri Mar 01 2024 - 06:11:49 EST




On 2/29/24 9:35 AM, Jakub Kicinski wrote:
> On Wed, 28 Feb 2024 11:13:23 +0000 Sanjuán García, Jorge wrote:
>> Since commit 8940e6b669ca ("net: dsa: avoid call to __dev_set_promiscuity()
>> while rtnl_mutex isn't held") when conecting one of this switch's port
>> to a DSA switch as the conduit interface, the network interface is set to
>> promiscuous mode by default and cannot be set to not promiscuous mode again
>> from userspace. The reason for this is that the cpsw ports net devices
>> do not have the flag IFF_UNICAST_FLT set in their private flags.
>>
>> The cpsw switch should be able to set not promiscuous mode as otherwise
>> a '1' is written to bit ALE_PORT_MACONLY_CAF which makes ethernet frames
>> get an additional VLAN tag when entering the port connected to the DSA
>> switch. Setting the IFF_UNICAST_FLT flag to all ports allows us to have
>> the conduit interface on the DSA subsystem set as not promiscuous.
>
> It doesn't look like am65-cpsw-nuss supports unicast filtering,
> tho, does it? So we're lying about support to work around some
> CPSW weirdness (additional VLAN tag thing)?

CPSW driver does not support unicast filtering.

--
Regards,
Ravi