Re: [PATCH net-next v5 3/3] net: ti: icssg-prueth: Add support for ICSSG switch firmware

From: MD Danish Anwar
Date: Tue May 28 2024 - 01:29:38 EST




On 28/05/24 3:44 am, Andrew Lunn wrote:
> On Mon, May 27, 2024 at 10:57:38AM +0530, MD Danish Anwar wrote:
>> Add support for ICSSG switch firmware using existing Dual EMAC driver
>> with switchdev.
>>
>> Limitations:
>> VLAN offloading is limited to 0-256 IDs.
>> MDB/FDB static entries are limited to 511 entries and different FDBs can
>> hash to same bucket and thus may not completely offloaded
>>
>> Example assuming ETH1 and ETH2 as ICSSG2 interfaces:
>>
>> Switch to ICSSG Switch mode:
>> ip link add name br0 type bridge
>> ip link set dev eth1 master br0
>> ip link set dev eth2 master br0
>> ip link set dev br0 up
>> bridge vlan add dev br0 vid 1 pvid untagged self
>>
>> Going back to Dual EMAC mode:
>>
>> ip link set dev br0 down
>> ip link set dev eth1 nomaster
>> ip link set dev eth2 nomaster
>> ip link del name br0 type bridge
>>
>> By default, Dual EMAC firmware is loaded, and can be changed to switch
>> mode by above steps
>>
>> Signed-off-by: MD Danish Anwar <danishanwar@xxxxxx>
>> static int prueth_emac_buffer_setup(struct prueth_emac *emac)
>> {
>> struct icssg_buffer_pool_cfg __iomem *bpool_cfg;
>> @@ -321,25 +401,63 @@ static void icssg_init_emac_mode(struct prueth *prueth)
>> /* When the device is configured as a bridge and it is being brought
>> * back to the emac mode, the host mac address has to be set as 0.
>> */
>> + u32 addr = prueth->shram.pa + EMAC_ICSSG_SWITCH_DEFAULT_VLAN_TABLE_OFFSET;
>> + int i;
>> u8 mac[ETH_ALEN] = { 0 };
>
> nitpick: Reverse Christmas tree
>
> Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

Thanks for the review. I will change this to "Reverse Christmas tree"
and send next revision.

>
> Andrew

--
Thanks and Regards,
Danish