netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net PATCH v2] octeontx2-pf: Fix memory leak during interface down
@ 2023-11-17 10:40 Suman Ghosh
  2023-11-19 16:11 ` Simon Horman
  2023-11-19 20:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Suman Ghosh @ 2023-11-17 10:40 UTC (permalink / raw)
  To: sgoutham, gakula, sbhatta, hkelam, lcherian, jerinj, davem,
	edumazet, kuba, pabeni, netdev, linux-kernel, horms
  Cc: Suman Ghosh

During 'ifconfig <netdev> down' one RSS memory was not getting freed.
This patch fixes the same.

Fixes: 81a4362016e7 ("octeontx2-pf: Add RSS multi group support")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
---
v2 changes:
- Updated fixes tag

 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index 91b99fd70361..ba95ac913274 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -1934,6 +1934,8 @@ int otx2_stop(struct net_device *netdev)
 	/* Clear RSS enable flag */
 	rss = &pf->hw.rss_info;
 	rss->enable = false;
+	if (!netif_is_rxfh_configured(netdev))
+		kfree(rss->rss_ctx[DEFAULT_RSS_CONTEXT_GROUP]);
 
 	/* Cleanup Queue IRQ */
 	vec = pci_irq_vector(pf->pdev,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [net PATCH v2] octeontx2-pf: Fix memory leak during interface down
  2023-11-17 10:40 [net PATCH v2] octeontx2-pf: Fix memory leak during interface down Suman Ghosh
@ 2023-11-19 16:11 ` Simon Horman
  2023-11-19 20:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-11-19 16:11 UTC (permalink / raw)
  To: Suman Ghosh
  Cc: sgoutham, gakula, sbhatta, hkelam, lcherian, jerinj, davem,
	edumazet, kuba, pabeni, netdev, linux-kernel

On Fri, Nov 17, 2023 at 04:10:18PM +0530, Suman Ghosh wrote:
> During 'ifconfig <netdev> down' one RSS memory was not getting freed.
> This patch fixes the same.
> 
> Fixes: 81a4362016e7 ("octeontx2-pf: Add RSS multi group support")
> Signed-off-by: Suman Ghosh <sumang@marvell.com>
> ---
> v2 changes:
> - Updated fixes tag

Thanks for the update, this now looks good to me.

Reviewed-by: Simon Horman <horms@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [net PATCH v2] octeontx2-pf: Fix memory leak during interface down
  2023-11-17 10:40 [net PATCH v2] octeontx2-pf: Fix memory leak during interface down Suman Ghosh
  2023-11-19 16:11 ` Simon Horman
@ 2023-11-19 20:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-11-19 20:10 UTC (permalink / raw)
  To: Suman Ghosh
  Cc: sgoutham, gakula, sbhatta, hkelam, lcherian, jerinj, davem,
	edumazet, kuba, pabeni, netdev, linux-kernel, horms

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 17 Nov 2023 16:10:18 +0530 you wrote:
> During 'ifconfig <netdev> down' one RSS memory was not getting freed.
> This patch fixes the same.
> 
> Fixes: 81a4362016e7 ("octeontx2-pf: Add RSS multi group support")
> Signed-off-by: Suman Ghosh <sumang@marvell.com>
> ---
> v2 changes:
> - Updated fixes tag
> 
> [...]

Here is the summary with links:
  - [net,v2] octeontx2-pf: Fix memory leak during interface down
    https://git.kernel.org/netdev/net/c/5f228d7c8a53

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] 3+ messages in thread

end of thread, other threads:[~2023-11-19 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-17 10:40 [net PATCH v2] octeontx2-pf: Fix memory leak during interface down Suman Ghosh
2023-11-19 16:11 ` Simon Horman
2023-11-19 20: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;
as well as URLs for NNTP newsgroup(s).