[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201202045325.3254757-6-vinicius.gomes@intel.com>
Date: Tue, 1 Dec 2020 20:53:21 -0800
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: netdev@...r.kernel.org
Cc: Vinicius Costa Gomes <vinicius.gomes@...el.com>, jhs@...atatu.com,
xiyou.wangcong@...il.com, jiri@...nulli.us, kuba@...nel.org,
m-karicheri2@...com, vladimir.oltean@....com,
Jose.Abreu@...opsys.com, po.liu@....com,
intel-wired-lan@...ts.osuosl.org, anthony.l.nguyen@...el.com
Subject: [PATCH net-next v1 5/9] igc: Avoid TX Hangs because long cycles
Avoid possible TX Hangs caused by using long Qbv cycles. In some
cases, using long cycles (more than 1 second) can cause transmissions
to be blocked for that time. As the TX Hang timeout is close to 1
second, we may need to reduce the cycle time to something more
reasonable: the value chosen is 1ms.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@...el.com>
---
drivers/net/ethernet/intel/igc/igc_main.c | 4 ++--
drivers/net/ethernet/intel/igc/igc_tsn.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index b673ac1199bb..3af54fd9cc0d 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -4692,12 +4692,12 @@ static int igc_save_launchtime_params(struct igc_adapter *adapter, int queue,
if (adapter->base_time)
return 0;
- adapter->cycle_time = NSEC_PER_SEC;
+ adapter->cycle_time = NSEC_PER_MSEC;
for (i = 0; i < adapter->num_tx_queues; i++) {
ring = adapter->tx_ring[i];
ring->start_time = 0;
- ring->end_time = NSEC_PER_SEC;
+ ring->end_time = NSEC_PER_MSEC;
}
return 0;
diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
index 38451cf05ac6..f5a5527adb21 100644
--- a/drivers/net/ethernet/intel/igc/igc_tsn.c
+++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
@@ -54,11 +54,11 @@ static int igc_tsn_disable_offload(struct igc_adapter *adapter)
wr32(IGC_TXQCTL(i), 0);
wr32(IGC_STQT(i), 0);
- wr32(IGC_ENDQT(i), NSEC_PER_SEC);
+ wr32(IGC_ENDQT(i), NSEC_PER_MSEC);
}
- wr32(IGC_QBVCYCLET_S, NSEC_PER_SEC);
- wr32(IGC_QBVCYCLET, NSEC_PER_SEC);
+ wr32(IGC_QBVCYCLET_S, NSEC_PER_MSEC);
+ wr32(IGC_QBVCYCLET, NSEC_PER_MSEC);
adapter->flags &= ~IGC_FLAG_TSN_QBV_ENABLED;
--
2.29.2
Powered by blists - more mailing lists