Skip to content

Commit 72abeed

Browse files
Tan Tee Minanguy11
authored andcommitted
igc: Set Qbv start_time and end_time to end_time if not being configured in GCL
The default setting of end_time minus start_time is whole 1 second. Thus, if it's not being configured in any GCL entry then it will be staying at original 1 second. This patch is changing the start_time and end_time to be end_time as if setting zero will be having weird HW behavior where the gate will not be fully closed. Fixes: ec50a9d ("igc: Add support for taprio offloading") Signed-off-by: Tan Tee Min <[email protected]> Signed-off-by: Muhammad Husaini Zulkifli <[email protected]> Tested-by: Naama Meir <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 6d05251 commit 72abeed

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

drivers/net/ethernet/intel/igc/igc_main.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6043,6 +6043,7 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
60436043
bool queue_configured[IGC_MAX_TX_QUEUES] = { };
60446044
u32 start_time = 0, end_time = 0;
60456045
size_t n;
6046+
int i;
60466047

60476048
adapter->qbv_enable = qopt->enable;
60486049

@@ -6063,7 +6064,6 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
60636064

60646065
for (n = 0; n < qopt->num_entries; n++) {
60656066
struct tc_taprio_sched_entry *e = &qopt->entries[n];
6066-
int i;
60676067

60686068
end_time += e->interval;
60696069

@@ -6102,6 +6102,18 @@ static int igc_save_qbv_schedule(struct igc_adapter *adapter,
61026102
start_time += e->interval;
61036103
}
61046104

6105+
/* Check whether a queue gets configured.
6106+
* If not, set the start and end time to be end time.
6107+
*/
6108+
for (i = 0; i < adapter->num_tx_queues; i++) {
6109+
if (!queue_configured[i]) {
6110+
struct igc_ring *ring = adapter->tx_ring[i];
6111+
6112+
ring->start_time = end_time;
6113+
ring->end_time = end_time;
6114+
}
6115+
}
6116+
61056117
return 0;
61066118
}
61076119

0 commit comments

Comments
 (0)