Re: [PATCH net-next] net: ethernet: ti: am65-cpsw: Add priv-flag for Switch VLAN Aware mode

Sverdlin, Alexander
2024-06-13T13:09:37Z

Hello Siddharth,

On Thu, 2024-02-29 at 16:37 +0530, Siddharth Vadapalli wrote:
> > A bit later the driver does this
> >
> >          /* switch to vlan unaware mode */
> >          cpsw_ale_control_set(common->ale, HOST_PORT_NUM, ALE_VLAN_AWARE, 1);
> >          cpsw_ale_control_set(common->ale, HOST_PORT_NUM,
> >                               ALE_PORT_STATE, ALE_PORT_STATE_FORWARD);
> >
> > The comment says vlan unaware but code is setting ALE_VLAN_AWARE to 1.
> > Is the comment wrong?

I was asking myself the same question looking into the 3 drivers.

> ALE_VLAN_AWARE belongs to the "CPSW_ALE_CONTROL" register and is defined
> as:
> ALE_VLAN_AWARE determines how traffic is forwarded using VLAN rules.
> 0h = Simple switch rules, packets forwarded to all ports for unknown
> destinations.
> 1h = VLAN Aware rules, packets forwarded based on VLAN members.

So is our understanding correct? Shall I send a patch inverting the comment
in question?

--
Alexander Sverdlin
Siemens AG