* [PATCH net] nfp: flower: remove merge entry when conntrack offload fails
@ 2026-10-02 19:47 Sang-Hoon Choi
2026-10-06 0:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Sang-Hoon Choi @ 2026-10-02 19:47 UTC (permalink / raw)
To: oss-drivers, Simon Horman
Cc: netdev, Jakub Kicinski, Wentao Jia, Changyul Lee
nfp_ct_do_nft_merge() inserts nft_m_entry into nft_merge_tb and
increments nft_merge_count before calling nfp_fl_ct_add_offload(). If
that call fails, the error path removes the entry from its lists and
frees it, but leaves the hash entry and count behind.
Remove the hash entry and undo the count increment before freeing
nft_m_entry.
Fixes: a87ceb3d42af ("nfp: flower: offload tc flows of multiple conntrack zones")
Reported-by: Changyul Lee <lcy8047@gmail.com>
Assisted-by: LLM
Signed-off-by: Sang-Hoon Choi <csh0052@gmail.com>
---
Compile-tested the affected object with x86_64 allmodconfig
and W=1 (GCC 13.3.0). Base: mainline 3b7cab693ba2bab63774bf5b988e8a61b2ef0f32.
No hardware testing or runtime failure reproduction was performed.
drivers/net/ethernet/netronome/nfp/flower/conntrack.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c
index c983e8b1799d..522ad555e8ec 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/conntrack.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/conntrack.c
@@ -1260,6 +1260,10 @@ static int nfp_ct_do_nft_merge(struct nfp_fl_ct_zone_entry *zt,
err_nft_ct_offload:
nfp_fl_ct_del_offload(zt->priv->app, nft_m_entry->tc_flower_cookie,
nft_m_entry->netdev);
+ WARN_ON_ONCE(rhashtable_remove_fast(&zt->nft_merge_tb,
+ &nft_m_entry->hash_node,
+ nfp_nft_ct_merge_params));
+ zt->nft_merge_count--;
err_nft_ct_merge_insert:
list_del(&nft_m_entry->tc_merge_list);
list_del(&nft_m_entry->nft_flow_list);
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net] nfp: flower: remove merge entry when conntrack offload fails
2026-10-02 19:47 [PATCH net] nfp: flower: remove merge entry when conntrack offload fails Sang-Hoon Choi
@ 2026-10-06 0:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-10-06 0:10 UTC (permalink / raw)
To: Sang-Hoon Choi; +Cc: oss-drivers, horms, netdev, kuba, wentao.jia, lcy8047
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 02 Oct 2026 19:47:40 +0000 you wrote:
> nfp_ct_do_nft_merge() inserts nft_m_entry into nft_merge_tb and
> increments nft_merge_count before calling nfp_fl_ct_add_offload(). If
> that call fails, the error path removes the entry from its lists and
> frees it, but leaves the hash entry and count behind.
>
> Remove the hash entry and undo the count increment before freeing
> nft_m_entry.
>
> [...]
Here is the summary with links:
- [net] nfp: flower: remove merge entry when conntrack offload fails
https://git.kernel.org/netdev/net-next/c/a032c035272a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-06 0:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02 19:47 [PATCH net] nfp: flower: remove merge entry when conntrack offload fails Sang-Hoon Choi
2026-10-06 0:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox