Re: [PATCH net-next v8 1/3] net: ti: icssm-prueth: Add helper functions to configure and maintain FDB
From: Jakub Kicinski
Date: Mon Dec 01 2025 - 17:19:27 EST
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.