aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Kiyanovski <akiyano@amazon.com>2022-12-19 13:56:44 +0000
committerMarcin Wojtas <mw@FreeBSD.org>2023-01-27 12:08:48 +0000
commit35797fe2aeb638e684e8e354dba36683157f8058 (patch)
treec23223c7cb74e08026edf4eb0403c89f3b4b639d
parent761d30c8d07edcbe1567f4246d92597f3b5fdbf9 (diff)
downloadsrc-35797fe2aeb638e684e8e354dba36683157f8058.tar.gz
src-35797fe2aeb638e684e8e354dba36683157f8058.zip
ena: Re-Enable per-packet missing tx completion print
Commit [1] first added the ena_tx_buffer.print_once member, so that a message about a missing tx completion is printed only once per packet (and not every second when the watchdog runs). In this commit print_once is initialized to true, and is set back to false after detecting a missing tx completion and printing a warning about it to dmesg. Commit [2] incorrectly reverses the values assigned to print_once. The variable is initialized to be true but is checked to be false when a missing tx completion is detected. This is never true, and therefore the warning print for each missing tx completion is never printed since this commit. Commit [3] added time passed since last TX cleanup to the missing tx completions per-packet print. However, due to the issue in commit [2], this time is never printed. This commit reverses back the values assigned to ena_tx_buffer.print_once erroneously by commit [2], bringing back to life the missing tx completion per-packet print. Also add a space after "." in the missing tx completion print. [1] - 9b8d05b8ac78 ("Add support for Amazon Elastic Network Adapter (ENA) NIC") [2] - 74dba3ad7851 ("Split function checking for missing TX completion in ENA driver") [3] - d8aba82b5ca7 ("ena: Store ticks of last Tx cleanup") Fixes: 74dba3ad7851 ("Split function checking for missing TX completion in ENA driver") Fixes: d8aba82b5ca7 ("ena: Store ticks of last Tx cleanup") MFC after: 2 weeks Sponsored by: Amazon, Inc. (cherry picked from commit f01b2cd98e93ef5ac3698b97bbaa45ac9c50fe5d)
-rw-r--r--sys/dev/ena/ena.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c
index c091091fed20..1def02978627 100644
--- a/sys/dev/ena/ena.c
+++ b/sys/dev/ena/ena.c
@@ -3019,19 +3019,19 @@ check_missing_comp_in_tx_queue(struct ena_adapter *adapter,
/* Check again if packet is still waiting */
if (unlikely(time_offset > adapter->missing_tx_timeout)) {
- if (!tx_buf->print_once) {
+ if (tx_buf->print_once) {
time_since_last_cleanup = TICKS_2_USEC(ticks -
tx_ring->tx_last_cleanup_ticks);
missing_tx_comp_to = sbttoms(
adapter->missing_tx_timeout);
ena_log(pdev, WARN,
- "Found a Tx that wasn't completed on time, qid %d, index %d."
+ "Found a Tx that wasn't completed on time, qid %d, index %d. "
"%d usecs have passed since last cleanup. Missing Tx timeout value %d msecs.\n",
tx_ring->qid, i, time_since_last_cleanup,
missing_tx_comp_to);
}
- tx_buf->print_once = true;
+ tx_buf->print_once = false;
missed_tx++;
}
}