From nobody Fri Jan 27 13:59:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P3K1h5WJvz3c20l; Fri, 27 Jan 2023 13:59:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P3K1h2ttxz4QKY; Fri, 27 Jan 2023 13:59:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674827944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZqgovIH6t4BJ+lvpLrPbueAIaulfOnqYFFCOQomC90E=; b=l9GSuApNmhE+XQNCm4xXBD1aVBFtCPiC/4/efz9VWX3pdMl4c+rWPia1kbopSnhzoE98Gj E/ZdZnDRrTGwiBqT69GczuzT+iG2MDtGWlsCg7FQwh6zfq+kBfOuBV5dy8zGAppuYtD6iU 2S4P2kv/GdCsfJKPzODz75QJlju2zMectoIpUjJCUJNbczpVb+P2xj87JS2E3iwBuUINxu MMPKZht/QLXhuAGAQJhcmRCRpYypc5oU4tZsKUyr0JP9ULGPtMEyI+dKXWIHlyBJ/ewWqH c/0Z6lBQ7RRJfYzgFGeALKtVxuvQ0TLHcZ8sqzE09XjMrRDyO5SyqyxkuiYqAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674827944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZqgovIH6t4BJ+lvpLrPbueAIaulfOnqYFFCOQomC90E=; b=hF+bOsoGumT60dYO1DT2NlFcaQ6V+etEiAVITVEOEOu6arl+wZridOz8rW0ie8AC/SaSM6 +ChekFLeQrznZgNcfFqkAEDv25IHG/fTNNjq1Rc8uGd//Or2jjyJC1AWgpXhQ+cA/lzH4Y k27MoV+lidduS4WuEyrCpjyykbpiETBt9WZH7U/CjzXyexGXTmpVkoqa3w78BomgzrAK29 E1I5BqOKurTLHLNz2AMftdzZ2l9nBbBaJXHzqNzdug0u6fzTv4cNUeD3+BSD9HjMtu3ljN izvtT6GUKyaaxMCnRGJx4joo+OJ8InS2R+wnZ8lX+qz22m5bbPbovil2r9fbTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674827944; a=rsa-sha256; cv=none; b=cu9h0NTmX1ElIHOtnalMqBW76BQR+sDSzF6EXz2rTWw1r9K8sy2OHUbojSQpQMw0QGInrl vgjE+N/E/5nPkAemlHzP3Hwf7uXIiZFoapT+L06Vl4tcYP52mD3WHZh5wpCcJ0w4eKOIqJ GxXjmXVmkzF6FE0iHTSjRWX6SUUsAAiJhUB7LfUxfrcLHEQLDzrzwYc9axXHpPHwBc3/ZR O5t6m2LmPROt/SFXkdH43YbQTXve3KYElA6F7A3Cbj7TLAci5lFItawkUgydx1gXwH6ort l/HYhD+5VnrMI0dYq80GFRu8jA6AxcrZkIoZWuCXXLofWFixA92XNtA7iHZNww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P3K1h1ZQBz1BJJ; Fri, 27 Jan 2023 13:59:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30RDx42R057835; Fri, 27 Jan 2023 13:59:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30RDx4hd057834; Fri, 27 Jan 2023 13:59:04 GMT (envelope-from git) Date: Fri, 27 Jan 2023 13:59:04 GMT Message-Id: <202301271359.30RDx4hd057834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marcin Wojtas Subject: git: 35797fe2aeb6 - stable/13 - ena: Re-Enable per-packet missing tx completion print List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35797fe2aeb638e684e8e354dba36683157f8058 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=35797fe2aeb638e684e8e354dba36683157f8058 commit 35797fe2aeb638e684e8e354dba36683157f8058 Author: Arthur Kiyanovski AuthorDate: 2022-12-19 13:56:44 +0000 Commit: Marcin Wojtas CommitDate: 2023-01-27 12:08:48 +0000 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) --- sys/dev/ena/ena.c | 6 +++--- 1 file 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++; } }