Patch "igc: recalculate Qbv end_time by considering cycle time" has been added to the 5.10-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

    igc: recalculate Qbv end_time by considering cycle time

to the 5.10-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:
     igc-recalculate-qbv-end_time-by-considering-cycle-ti.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 746ce4135fa17f950ab61b23639d78b537aaf044
Author: Tan Tee Min <tee.min.tan@xxxxxxxxxxxxxxx>
Date:   Fri Dec 9 12:15:21 2022 +0800

    igc: recalculate Qbv end_time by considering cycle time
    
    [ Upstream commit 6d05251d537a4d3835959a8cdd8cbbbdcdc0c904 ]
    
    Qbv users can specify a cycle time that is not equal to the total GCL
    intervals. Hence, recalculation is necessary here to exclude the time
    interval that exceeds the cycle time. As those GCL which exceeds the
    cycle time will be truncated.
    
    According to IEEE Std. 802.1Q-2018 section 8.6.9.2, once the end of
    the list is reached, it will switch to the END_OF_CYCLE state and
    leave the gates in the same state until the next cycle is started.
    
    Fixes: ec50a9d437f0 ("igc: Add support for taprio offloading")
    Signed-off-by: Tan Tee Min <tee.min.tan@xxxxxxxxxxxxxxx>
    Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@xxxxxxxxx>
    Tested-by: Naama Meir <naamax.meir@xxxxxxxxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index 45069dc0ccc6..94a608585f71 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -4933,6 +4933,21 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
 
 		end_time += e->interval;
 
+		/* If any of the conditions below are true, we need to manually
+		 * control the end time of the cycle.
+		 * 1. Qbv users can specify a cycle time that is not equal
+		 * to the total GCL intervals. Hence, recalculation is
+		 * necessary here to exclude the time interval that
+		 * exceeds the cycle time.
+		 * 2. According to IEEE Std. 802.1Q-2018 section 8.6.9.2,
+		 * once the end of the list is reached, it will switch
+		 * to the END_OF_CYCLE state and leave the gates in the
+		 * same state until the next cycle is started.
+		 */
+		if (end_time > adapter->cycle_time ||
+		    n + 1 == qopt->num_entries)
+			end_time = adapter->cycle_time;
+
 		for (i = 0; i < adapter->num_tx_queues; i++) {
 			struct igc_ring *ring = adapter->tx_ring[i];
 



[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