octeontx2-af: Fix issue with loading coalesced KPU profiles
PATCH 1/1 octeontx2-af: Fix issue with loading coalesced KPU profiles
The current implementation for loading coalesced KPU profiles has a limitation. The "offset" field, which is used to locate profiles within the profile is restricted to a u16.
This restricts the number of profiles that can be loaded. This patch addresses this limitation by increasing the size of the "offset" field.
--- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +1 -1
@@ -1657,7 +1657,7 @@ static int npc_fwdb_detect_load_prfl_img(struct rvu *rvu, uint64_t prfl_sz,struct npc_coalesced_kpu_prfl *img_data =NULL ;int i =0 , rc = -EINVAL ;void __iomem *kpu_prfl_addr; -u16 offset; +u32 offset; img_data = (struct npc_coalesced_kpu_prfl __force *)rvu->kpu_prfl_addr; if (le64_to_cpu(img_data->signature) == KPU_SIGN &&
Signature · 1 line
2.17.1
Quoted 10 lines · Hariprasad Kelam
The current implementation for loading coalesced KPU profiles has a limitation. The "offset" field, which is used to locate profiles within the profile is restricted to a u16.
This restricts the number of profiles that can be loaded. This patch addresses this limitation by increasing the size of the "offset" field.
Fixes 11c730bfbf5b ("octeontx2-af: support for coalescing KPU profiles")Signed-off-by Hariprasad Kelam <[email protected]>
LGTM
Quoted 21 lines
--- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +1
-2@@ -1657,7 +1657,7 @@ static int npc_fwdb_detect_load_prfl_img(struct rvu *rvu, uint64_t prfl_sz,struct npc_coalesced_kpu_prfl *img_data =NULL ;int i =0 , rc = -EINVAL ;void __iomem *kpu_prfl_addr; -u16 offset; +u32 offset; img_data = (struct npc_coalesced_kpu_prfl __force *)rvu->kpu_prfl_addr; if (le64_to_cpu(img_data->signature) == KPU_SIGN && --2.17.1
Signature · 2 lines
Regards, Kalesh A P
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 8 lines · On Tue, 26 Mar 2024 17:51:49 +0530 you wrote:
The current implementation for loading coalesced KPU profiles has a limitation. The "offset" field, which is used to locate profiles within the profile is restricted to a u16.
This restricts the number of profiles that can be loaded. This patch addresses this limitation by increasing the size of the "offset" field.
[...]
Here is the summary with links:
- [net] octeontx2-af: Fix issue with loading coalesced KPU profiles
https://git.kernel.org/netdev/net/c/0ba80d965856
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html