Re: [PATCH net-next v8 1/3] net: ti: icssm-prueth: Add helper functions to configure and maintain FDB
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-12-01 22:19:00
Also in:
linux-arm-kernel, lkml
From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-12-01 22:19:00
Also in:
linux-arm-kernel, lkml
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.