From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: Kamil Maziarz <kamil.maziarz@intel.com>
Cc: intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-net v1] ice: Fix XDP memory leak when NIC is brought up and down
Date: Tue, 30 May 2023 17:58:57 +0200 [thread overview]
Message-ID: <ZHYdQUT7oCDR11U8@boxer> (raw)
In-Reply-To: <20230525105155.105870-1-kamil.maziarz@intel.com>
On Thu, May 25, 2023 at 12:51:55PM +0200, Kamil Maziarz wrote:
> Fix the buffer leak that occurs while switching
> the port up and down with traffic and XDP by
> checking for an active XDP program and freeing all empty TX buffers.
How did you spot this? Was this by code walkthrough, or?
Tx buffers are not particularly empty, they are mapped/allocated.
>
> Fixes: cdedef59deb0 ("ice: Configure VSIs for Tx/Rx")
i think it deserves a fixes tag which points to XDP support being added.
The code you are referring to was just fine before XDP support.
> Signed-off-by: Kamil Maziarz <kamil.maziarz@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index a1f7c8edc22f..03513d4871ab 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -7056,6 +7056,10 @@ int ice_down(struct ice_vsi *vsi)
> ice_for_each_txq(vsi, i)
> ice_clean_tx_ring(vsi->tx_rings[i]);
>
> + if (ice_is_xdp_ena_vsi(vsi))
> + ice_for_each_xdp_txq(vsi, i)
> + ice_clean_tx_ring(vsi->xdp_rings[i]);
> +
> ice_for_each_rxq(vsi, i)
> ice_clean_rx_ring(vsi->rx_rings[i]);
>
> --
> 2.31.1
>
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@osuosl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-05-30 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 10:51 [Intel-wired-lan] [PATCH iwl-net v1] ice: Fix XDP memory leak when NIC is brought up and down Kamil Maziarz
2023-05-29 16:37 ` Rout, ChandanX
2023-05-30 15:58 ` Maciej Fijalkowski [this message]
2023-06-06 10:32 ` Maziarz, Kamil
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=ZHYdQUT7oCDR11U8@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kamil.maziarz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.