From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Cc: anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH] i40e: add an error handling path in i40e_xsk_pool_enable()
Date: Mon, 26 Jan 2026 17:51:35 +0100 [thread overview]
Message-ID: <4eae4d1a-8043-4186-bd38-87f47dd35eda@molgen.mpg.de> (raw)
In-Reply-To: <20260125140423.2077845-1-lihaoxiang@isrc.iscas.ac.cn>
Dear Haoxiang,
Thank you for your patch.
Am 25.01.26 um 15:04 schrieb Haoxiang Li:
> In i40e_xsk_pool_enable(), the memory allocated by
> xsk_pool_dma_map() should be released if some error occurs. Add an
> error handling path to do so.
(Please be aware to use the fully allowed text width of 75 characters
per line. (It wouldn’t save a line here though.))
Please add a Fixes: tag.
> Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn> --- drivers/
> net/ethernet/intel/i40e/i40e_xsk.c | 12 ++++++++---- 1 file changed,
> 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/
> net/ethernet/intel/i40e/i40e_xsk.c index 9f47388eaba5..92b853a75b28
> 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c +++ b/
> drivers/net/ethernet/intel/i40e/i40e_xsk.c @@ -108,23 +108,27 @@
> static int i40e_xsk_pool_enable(struct i40e_vsi *vsi, if
> (if_running) { err = i40e_queue_pair_disable(vsi, qid); if (err) -
> return err; + goto unmap;
>
> err = i40e_realloc_rx_xdp_bi(vsi->rx_rings[qid], true); if (err) -
> return err; + goto unmap;
>
> err = i40e_queue_pair_enable(vsi, qid); if (err) - return err; +
> goto unmap;
>
> /* Kick start the NAPI context so that receiving will start */ err =
> i40e_xsk_wakeup(vsi->netdev, qid, XDP_WAKEUP_RX); if (err) -
> return err; + goto unmap; }
>
> return 0; + +unmap: + xsk_pool_dma_unmap(pool, I40E_RX_DMA_ATTR); +
> return err; }
>
> /**
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Kind regards,
Paul
next prev parent reply other threads:[~2026-01-26 16:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 14:04 [PATCH] i40e: add an error handling path in i40e_xsk_pool_enable() Haoxiang Li
2026-01-26 16:51 ` Paul Menzel [this message]
2026-01-26 20:37 ` Maciej Fijalkowski
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=4eae4d1a-8043-4186-bd38-87f47dd35eda@molgen.mpg.de \
--to=pmenzel@molgen.mpg.de \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=lihaoxiang@isrc.iscas.ac.cn \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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