Patch "i40e: sync next_to_clean and next_to_process for programming status desc" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    i40e: sync next_to_clean and next_to_process for programming status desc

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     i40e-sync-next_to_clean-and-next_to_process-for-programming-status-desc.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 068d8b75c1aee153193522211ace6c13c21cd16b Mon Sep 17 00:00:00 2001
From: Tirthendu Sarkar <tirthendu.sarkar@xxxxxxxxx>
Date: Thu, 19 Oct 2023 13:38:52 -0700
Subject: i40e: sync next_to_clean and next_to_process for programming status desc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Tirthendu Sarkar <tirthendu.sarkar@xxxxxxxxx>

commit 068d8b75c1aee153193522211ace6c13c21cd16b upstream.

When a programming status desc is encountered on the rx_ring,
next_to_process is bumped along with cleaned_count but next_to_clean is
not. This causes I40E_DESC_UNUSED() macro to misbehave resulting in
overwriting whole ring with new buffers.

Update next_to_clean to point to next_to_process on seeing a programming
status desc if not in the middle of handling a multi-frag packet. Also,
bump cleaned_count only for such case as otherwise next_to_clean buffer
may be returned to hardware on reaching clean_threshold.

Fixes: e9031f2da1ae ("i40e: introduce next_to_process to i40e_ring")
Suggested-by: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>
Reported-by: hq.dev+kernel@xxxxxxxxx
Reported by: Solomon Peachy <pizza@xxxxxxxxxxxx>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217678
Tested-by: hq.dev+kernel@xxxxxxxxx
Tested by: Indrek Järve <incx@xxxxxxxxxxxx>
Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@xxxxxxxxx>
Tested-by: Arpana Arland <arpanax.arland@xxxxxxxxx> (A Contingent worker at Intel)
Signed-off-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>
Link: https://lore.kernel.org/r/20231019203852.3663665-1-jacob.e.keller@xxxxxxxxx
Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 0b3a27f118fb..50c70a8e470a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2544,7 +2544,14 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget,
 			rx_buffer = i40e_rx_bi(rx_ring, ntp);
 			i40e_inc_ntp(rx_ring);
 			i40e_reuse_rx_page(rx_ring, rx_buffer);
-			cleaned_count++;
+			/* Update ntc and bump cleaned count if not in the
+			 * middle of mb packet.
+			 */
+			if (rx_ring->next_to_clean == ntp) {
+				rx_ring->next_to_clean =
+					rx_ring->next_to_process;
+				cleaned_count++;
+			}
 			continue;
 		}
 
-- 
2.42.0



Patches currently in stable-queue which might be from tirthendu.sarkar@xxxxxxxxx are

queue-6.5/i40e-sync-next_to_clean-and-next_to_process-for-programming-status-desc.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux