* [Intel-wired-lan] [PATCH iwl-net v2] ice: Fix XDP memory leak when NIC is brought up and down
@ 2023-06-06 10:33 Kamil Maziarz
2023-06-06 17:29 ` Maciej Fijalkowski
0 siblings, 1 reply; 2+ messages in thread
From: Kamil Maziarz @ 2023-06-06 10:33 UTC (permalink / raw)
To: intel-wired-lan; +Cc: Kamil Maziarz
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.
Fixes: efc2214b6047 ("ice: Add support for XDP")
Signed-off-by: Kamil Maziarz <kamil.maziarz@intel.com>
---
v2: new Fixes tag
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-net v2] ice: Fix XDP memory leak when NIC is brought up and down
2023-06-06 10:33 [Intel-wired-lan] [PATCH iwl-net v2] ice: Fix XDP memory leak when NIC is brought up and down Kamil Maziarz
@ 2023-06-06 17:29 ` Maciej Fijalkowski
0 siblings, 0 replies; 2+ messages in thread
From: Maciej Fijalkowski @ 2023-06-06 17:29 UTC (permalink / raw)
To: Kamil Maziarz; +Cc: intel-wired-lan
On Tue, Jun 06, 2023 at 12:33:58PM +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.
>
> Fixes: efc2214b6047 ("ice: Add support for XDP")
> Signed-off-by: Kamil Maziarz <kamil.maziarz@intel.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
thanks! this has been hiding there for a while.
> ---
> v2: new Fixes tag
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-06 17:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06 10:33 [Intel-wired-lan] [PATCH iwl-net v2] ice: Fix XDP memory leak when NIC is brought up and down Kamil Maziarz
2023-06-06 17:29 ` Maciej Fijalkowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox