From nobody Mon Jul 15 15:29:19 2024 X-Original-To: dev-commits-src-main@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 4WN5hv6mqDz5R7sm; Mon, 15 Jul 2024 15:29:19 +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 4WN5hv6DG4z43f4; Mon, 15 Jul 2024 15:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721057359; 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=iHFHzFVZQdO+KzWoQy25K9t2b0h49Pcp8XeimrR2HVI=; b=nWg5h9bIzui1wwPr8LZt6kexKXF1TXb5oPr1RLSJ0u9c8D9PpNwGFnIdGvFVcBcAiX9TIg mehTO4tCdOWe2wOqf517yCwffK1c0NUCKXkQEiit87cGWSHEVhVqfD2PZ1ejsAl5eKeAmM U1EUNVcOjk2HgtDn+AQSy2Jedx34G6k+X3ab+o0eDXfIpJlK3tI1dkWsdMJ0bMdVY/5Kvt eQXJpwKmF4ptDr/crtovb6H9Ta7GrJD8mFT4cnHG95UqBuLQsRYzbBt7qMJudtR8574gVo jX6GqiRweDzg+4UJATRR2OtKW7/15LyRTpKD4mUmIShe9GbOMw+DbbYO6jymXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721057359; a=rsa-sha256; cv=none; b=ORXtAFzXmnaantrzUh79GEEUe6yIJGseAMqAbHIiIkK1TnvMM04oSIh2Rav24C7fg2nuz7 xWiu4jyF8d7pP6eSzOHZikhzlIyrNwL3PrYRTg0TmjTVNblJf+W8vBQuIbCsxj2Pg1Ch6V Xg7iQ+u6bK7xOPThuPijOtrRa4MyxpWbj0gdK4yhgBxAI8G6Xvvl6TYTMjKnXnTYyyZIFw UnHFuJ8Y13ZS/AQlylKOVF1ePTnORuZ8UR2IMLrhXmN0+2l9uaF0QaOpVWVsNAhfb3mAPC OQhhkBxpWBgJecmq3agDI3pHrGwUZYzof9o7LvlD8nr2t9WsWHhr761mlIU0Nw== 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=1721057359; 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=iHFHzFVZQdO+KzWoQy25K9t2b0h49Pcp8XeimrR2HVI=; b=FL7GUzkhGMhTBZoZmOw7eDA7LyZNpIkj3mQYtTDoj8fuKMLD8cAgbQHARZyIcPRKu4Pv1e VDUgwvRmbw7fqTIS7BFpJ9Mr756gJQnZYv1Ef9RwfCJj/crTWlddUDcmpv3VGW4hrsyxRJ MRKIT6Jc+YMjP6pC3CgXdeRrhVr+SOAMvH8ZIgWbxmVOErJ4Rd9JyxkJz6kmL/YedARba1 8VuBJNvfZZ6DRE1Px59cwxVLYboUc5LNE6bvfUGV5NxC+pjuCEM99xn/WwyWvxlgdLXlt2 mtXmy0DQhvD3fGUDeqvWh5PwF9sYbDIKBuVzlY+9o0nJv51zw83ym3Qleoue8A== 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 4WN5hv5qSSzyB5; Mon, 15 Jul 2024 15:29:19 +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 46FFTJrx049846; Mon, 15 Jul 2024 15:29:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FFTJuT049843; Mon, 15 Jul 2024 15:29:19 GMT (envelope-from git) Date: Mon, 15 Jul 2024 15:29:19 GMT Message-Id: <202407151529.46FFTJuT049843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6af3d5996244 - main - cxgbe: Flush transmitted packets more regularly in netmap mode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 6af3d59962449c66688361598163dd174cc5fb2a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6af3d59962449c66688361598163dd174cc5fb2a commit 6af3d59962449c66688361598163dd174cc5fb2a Author: Mark Johnston AuthorDate: 2024-05-21 19:18:32 +0000 Commit: Mark Johnston CommitDate: 2024-07-15 15:26:59 +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 --- 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. */