Re: [PATCH net-next v8 1/3] net: ti: icssm-prueth: Add helper functions to configure and maintain FDB

Parvathi Pudi
2025-12-03T08:40:48Z

Hi,

> On Wed, 26 Nov 2025 21:57:12 +0530 Parvathi Pudi wrote:
>> + u8 hash_val, mac_tbl_idx;
>
> Using narrow types is generally quite counter productive.
> It can easily mask out-of-range accesses and subtle errors,
> given that max is outside of the range of the u8 type:
>
> +#define FDB_INDEX_TBL_MAX_ENTRIES 256
> +#define FDB_MAC_TBL_MAX_ENTRIES 256
>
> You should consider changing all the local variables to unsigned int.

OK, we will update the code to use unsigned int for relevant local
variables to avoid any silent errors.

Thanks and Regards,
Parvathi.