netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, andrew+netdev@lunn.ch, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, michael.chan@broadcom.com,
	pavan.chebbi@broadcom.com, vsrama-krishna.nemani@broadcom.com,
	vikas.gupta@broadcom.com,
	Rajashekar Hudumula <rajashekar.hudumula@broadcom.com>
Subject: Re: [v7, net-next 01/10] bng_en: make bnge_alloc_ring() self-unwind on failure
Date: Thu, 18 Sep 2025 20:06:06 +0100	[thread overview]
Message-ID: <20250918190606.GA589538@horms.kernel.org> (raw)
In-Reply-To: <CANXQDtbXG2XjBa2ja1LY7gdALg-PnEyvQBWPAiXQqD0hvtwp=g@mail.gmail.com>

On Thu, Sep 18, 2025 at 03:20:09PM +0530, Bhargava Chenna Marreddy wrote:
> On Tue, Sep 16, 2025 at 8:43 PM Simon Horman <horms@kernel.org> wrote:
> >
> > On Fri, Sep 12, 2025 at 01:04:56AM +0530, Bhargava Marreddy wrote:
> > > Ensure bnge_alloc_ring() frees any intermediate allocations
> > > when it fails. This enables later patches to rely on this
> > > self-unwinding behavior.
> > >
> > > Signed-off-by: Bhargava Marreddy <bhargava.marreddy@broadcom.com>
> > > Reviewed-by: Vikas Gupta <vikas.gupta@broadcom.com>
> > > Reviewed-by: Rajashekar Hudumula <rajashekar.hudumula@broadcom.com>
> >
> > Without this patch(set), does the code correctly release resources on error?
> >
> > If not, I think this should be considered a fix for net with appropriate
> > Fixes tag(s).
> 
> Thanks for your feedback, Simon. This patch doesn't introduce a fix;
> the code already frees resources correctly.
> Instead, it modifies error handling by changing from caller-unwind to
> self-unwind within this function

Thanks for the clarification.
In that case, this looks good to me.

  reply	other threads:[~2025-09-18 19:06 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11 19:34 [v7, net-next 00/10] Add more functionality to BNGE Bhargava Marreddy
2025-09-11 19:34 ` [v7, net-next 01/10] bng_en: make bnge_alloc_ring() self-unwind on failure Bhargava Marreddy
2025-09-16 15:12   ` Simon Horman
2025-09-18  9:50     ` Bhargava Chenna Marreddy
2025-09-18 19:06       ` Simon Horman [this message]
2025-09-11 19:34 ` [v7, net-next 02/10] bng_en: Add initial support for RX and TX rings Bhargava Marreddy
2025-09-11 19:34 ` [v7, net-next 03/10] bng_en: Add initial support for CP and NQ rings Bhargava Marreddy
2025-09-16 14:54   ` Simon Horman
2025-09-18  9:40     ` Bhargava Chenna Marreddy
2025-09-11 19:34 ` [v7, net-next 04/10] bng_en: Introduce VNIC Bhargava Marreddy
2025-09-11 19:35 ` [v7, net-next 05/10] bng_en: Initialise core resources Bhargava Marreddy
2025-09-16 15:45   ` Simon Horman
2025-09-18 10:49     ` Bhargava Chenna Marreddy
2025-09-11 19:35 ` [v7, net-next 06/10] bng_en: Allocate packet buffers Bhargava Marreddy
2025-09-14 20:31   ` Jakub Kicinski
2025-09-15 17:56     ` Bhargava Chenna Marreddy
2025-09-15 21:52       ` Jakub Kicinski
2025-09-11 19:35 ` [v7, net-next 07/10] bng_en: Allocate stat contexts Bhargava Marreddy
2025-09-11 19:35 ` [v7, net-next 08/10] bng_en: Register rings with the firmware Bhargava Marreddy
2025-09-16 15:51   ` Simon Horman
2025-09-18 10:41     ` Bhargava Chenna Marreddy
2025-09-18 19:06       ` Simon Horman
2025-09-17 20:14   ` [External] : " ALOK TIWARI
2025-09-11 19:35 ` [v7, net-next 09/10] bng_en: Register default VNIC Bhargava Marreddy
2025-09-17 20:18   ` ALOK TIWARI
2025-09-19  6:28     ` Bhargava Chenna Marreddy
2025-09-11 19:35 ` [v7, net-next 10/10] bng_en: Configure " Bhargava Marreddy

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=20250918190606.GA589538@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bhargava.marreddy@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=rajashekar.hudumula@broadcom.com \
    --cc=vikas.gupta@broadcom.com \
    --cc=vsrama-krishna.nemani@broadcom.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).