From: Simon Horman <horms@kernel.org>
To: Suman Ghosh <sumang@marvell.com>
Cc: sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
hkelam@marvell.com, lcherian@marvell.com, jerinj@marvell.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [net PATCH] octeontx2-pf: Fix memory leak during interface down
Date: Thu, 16 Nov 2023 20:50:33 +0000 [thread overview]
Message-ID: <20231116205033.GI109951@vergenet.net> (raw)
In-Reply-To: <20231116155334.3277905-1-sumang@marvell.com>
On Thu, Nov 16, 2023 at 09:23:34PM +0530, Suman Ghosh wrote:
> During 'ifconfig <netdev> down' one RSS memory was not getting freed.
> This patch fixes the same.
>
> Fixes: f12098ce9b43 ("octeontx2-pf: Clear RSS enable flag on interace down")
> Signed-off-by: Suman Ghosh <sumang@marvell.com>
Hi Suman,
I'm wondering if the fixes tag should refer to the commit
that introduced the allocation that your patch is freeing.
Fixes: 81a4362016e7 ("octeontx2-pf: Add RSS multi group support")
> ---
> 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
>
next prev parent reply other threads:[~2023-11-16 20:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 15:53 [net PATCH] octeontx2-pf: Fix memory leak during interface down Suman Ghosh
2023-11-16 20:50 ` Simon Horman [this message]
2023-11-17 10:25 ` [EXT] " Suman Ghosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231116205033.GI109951@vergenet.net \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=jerinj@marvell.com \
--cc=kuba@kernel.org \
--cc=lcherian@marvell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=sumang@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).