From nobody Thu Aug 08 15:58:03 2024 X-Original-To: dev-commits-src-all@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 4WfsC01WMNz5T75G; Thu, 08 Aug 2024 15:58: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfsC00qDQz4KBY; Thu, 8 Aug 2024 15:58:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723132684; 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=s7QbtDBeHxivsb78PfKwxeOoXOYC7Xc7WSf0gj7oqw4=; b=OGZ5LtxFFZsNea5TgWR48VpnOe9M3oQvE3DfA+rme12XpAAZXsR1TkhlgdabI0bsR/WHTC HwhGbCrzi19tnregj/GIZpBnxnvu5w7N/saBAWKxyayv2kADLfIgkKEO4HeAbOC7C77S2n 8sNnCMZWC9eNM8G6zEXTfO1gfetnHOll1bWc78ZFic20HlYEXcIzYNTAC944mTb68vt041 7YVIFcREYZw3GHmygClMo+4zv6MCUHmsfYJ1AKkAm6uuL5ljDtFXiDeKtO3u8EeiqjYsfo u3S+a2HQpmVVTXOkX49rzyeOsnRIV/Nk5/lUtUiUGyVZX+xjWl5nqVgqej3UrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723132684; a=rsa-sha256; cv=none; b=RXEjpxjkCSEkbMr6OsixwhO+qdKeWPkPpUK8qIjcwG95zgoad/AmEux4SEAhB7VPdVbA3l V1XxOWY34+sV+kKZ3nbtNwiXqS+vzq5eVs0qXUTK2Z75aZEukxIb8QYSsuqAzL6R/83yUY mwTqtby8EpzgLarJfiXvZ75jLhhRAdEIvLA+WEZyL6V6gUfNri+7TA60AjX0H0iWjyOedb X7YCIZupYu6S9hHzDk/Er2K97qBF4e/uaXomMD9QBnlbmq06JIHb2OkUanfPJG7qH9gLrr TKiFCRx1ZQ7vH0QHS6v4qqaTkDeZ8qjstNFJPHBgDZpItyGYHfcuWBtZxylIrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723132684; 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=s7QbtDBeHxivsb78PfKwxeOoXOYC7Xc7WSf0gj7oqw4=; b=vXXH0pfmiV69ZwbbyKl6or2B/CRVRm3/Epa31+zsLoIV/UjEAEEtp/9oXpiC9ylxaxMK4+ B+scLBWwGIAHY4HWOqGhHjReF7WrF2iaPjckPHBZyMzqeD2qEhbzGbWOVIs/L4S3NuOVWM yjr9ctWeNr4bEgJuKNB9S4cJ2nCrJ59QqS32dzLHqKfvCIcdlxyJlBeXaMr2SZcutfBbQf qvMw7yWVOUcUznpHLmo7re7QFnWGx4AhwuosBQkyVgvWk4Mse0Vr0PqQ8tRFYad2MvaWfz o5GXV8L8UgG3j4XPF8azxHw/FFrNibEDeauTPEk7OaCwQ8fqHAjIqjWK5X56Tw== 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 4WfsC00Qn6zfY6; Thu, 8 Aug 2024 15:58:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 478Fw3LE092517; Thu, 8 Aug 2024 15:58:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 478Fw3wM092514; Thu, 8 Aug 2024 15:58:03 GMT (envelope-from git) Date: Thu, 8 Aug 2024 15:58:03 GMT Message-Id: <202408081558.478Fw3wM092514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: aa937aa8c526 - stable/14 - cxgbe: Flush transmitted packets more regularly in netmap mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aa937aa8c52646c37a2e1c98303fb581d858af03 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aa937aa8c52646c37a2e1c98303fb581d858af03 commit aa937aa8c52646c37a2e1c98303fb581d858af03 Author: Mark Johnston AuthorDate: 2024-05-21 19:18:32 +0000 Commit: Mark Johnston CommitDate: 2024-08-08 15:55:48 +0000 cxgbe: Flush transmitted packets more regularly in netmap mode Previously, when transmitting short runs of packets via cxgbe_nm_tx(), we would wait until a large number of packets were buffered before scheduling a task to clean transmit buffers. Obtained from: np (cherry picked from commit 6af3d59962449c66688361598163dd174cc5fb2a) --- sys/dev/cxgbe/t4_netmap.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c index 0377f65acc3e..e53fb5054316 100644 --- a/sys/dev/cxgbe/t4_netmap.c +++ b/sys/dev/cxgbe/t4_netmap.c @@ -1025,29 +1025,28 @@ cxgbe_nm_tx(struct adapter *sc, struct sge_nm_txq *nm_txq, nm_txq->pidx = 0; } - if (npkt == 0 && npkt_remaining == 0) { + if (npkt + npkt_remaining == 0) { /* All done. */ - if (lazy_tx_credit_flush == 0) { + if (lazy_tx_credit_flush == 0 || + NMIDXDIFF(nm_txq, equiqidx) >= nm_txq->sidx / 2) { wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ | F_FW_WR_EQUIQ); nm_txq->equeqidx = nm_txq->pidx; nm_txq->equiqidx = nm_txq->pidx; + } else if (NMIDXDIFF(nm_txq, equeqidx) >= 64) { + wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); + nm_txq->equeqidx = nm_txq->pidx; } ring_nm_txq_db(sc, nm_txq); return; } - - if (NMIDXDIFF(nm_txq, equiqidx) >= nm_txq->sidx / 2) { - wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ | - F_FW_WR_EQUIQ); - nm_txq->equeqidx = nm_txq->pidx; - nm_txq->equiqidx = nm_txq->pidx; - } else if (NMIDXDIFF(nm_txq, equeqidx) >= 64) { - wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); - nm_txq->equeqidx = nm_txq->pidx; - } - if (NMIDXDIFF(nm_txq, dbidx) >= 2 * SGE_MAX_WR_NDESC) + if (NMIDXDIFF(nm_txq, dbidx) >= 2 * SGE_MAX_WR_NDESC) { + if (NMIDXDIFF(nm_txq, equeqidx) >= 64) { + wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); + nm_txq->equeqidx = nm_txq->pidx; + } ring_nm_txq_db(sc, nm_txq); + } } /* Will get called again. */