From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net-next v2 5/8] igc: Avoid TX Hangs because long cycles
Date: Mon, 18 Jan 2021 16:40:25 -0800 [thread overview]
Message-ID: <20210119004028.2809425-6-vinicius.gomes@intel.com> (raw)
In-Reply-To: <20210119004028.2809425-1-vinicius.gomes@intel.com>
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@intel.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 afd6a62da29d..f1b31fa04734 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -4693,12 +4693,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.30.0
next prev parent reply other threads:[~2021-01-19 0:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-19 0:40 [Intel-wired-lan] [PATCH net-next v2 0/8] ethtool: Add support for frame preemption Vinicius Costa Gomes
2021-01-19 0:40 ` [Intel-wired-lan] [PATCH net-next v2 1/8] ethtool: Add support for configuring " Vinicius Costa Gomes
2021-01-19 0:52 ` Vladimir Oltean
2021-01-19 23:03 ` Vinicius Costa Gomes
2021-01-20 2:17 ` Jakub Kicinski
2021-01-21 23:18 ` Vinicius Costa Gomes
2021-01-19 0:40 ` [Intel-wired-lan] [PATCH net-next v2 2/8] taprio: Add support for frame preemption offload Vinicius Costa Gomes
2021-01-20 2:21 ` Jakub Kicinski
2021-01-21 23:17 ` Vinicius Costa Gomes
2021-01-19 0:40 ` [Intel-wired-lan] [PATCH net-next v2 3/8] igc: Set the RX packet buffer size for TSN mode Vinicius Costa Gomes
2021-01-19 0:40 ` [Intel-wired-lan] [PATCH net-next v2 4/8] igc: Only dump registers if configured to dump HW information Vinicius Costa Gomes
2021-01-19 0:40 ` Vinicius Costa Gomes [this message]
2021-01-19 0:40 ` [Intel-wired-lan] [PATCH net-next v2 6/8] igc: Add support for tuning frame preemption via ethtool Vinicius Costa Gomes
2021-01-20 2:23 ` Jakub Kicinski
2021-01-21 23:18 ` Vinicius Costa Gomes
2021-01-19 0:40 ` [Intel-wired-lan] [PATCH net-next v2 7/8] igc: Add support for Frame Preemption offload Vinicius Costa Gomes
2021-01-19 0:40 ` [Intel-wired-lan] [PATCH net-next v2 8/8] igc: Separate TSN configurations that can be updated Vinicius Costa Gomes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210119004028.2809425-6-vinicius.gomes@intel.com \
--to=vinicius.gomes@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox