[PATCH net-next v8 1/3] net: ti: icssm-prueth: Add helper functions to configure and maintain FDB
Jakub Kicinski
kuba at kernel.org
Mon Dec 1 14:18:58 PST 2025
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.
More information about the linux-arm-kernel
mailing list