From nobody Thu Aug 08 16:00:55 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 4WfsGH6Ppcz5T7Rb; Thu, 08 Aug 2024 16:00:55 +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 4WfsGH5nwtz4Kc9; Thu, 8 Aug 2024 16:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723132855; 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=1Ehhvs4VAoJAYfYxljRLmE3C9cB2f0QUVA4eLFv/QzY=; b=eyXCzopfmb5Z+g6cWOoDxQbIm/EcUmN19EXzFwWD5wEXJ5vij5n9gv4hEqScVmutyRC0F7 +hFX7QDm8BgMrrIF30LC6ARn+lvYkJ8VVLcZPALLP9Ut3iwaWq6Iq7BC5xq2HcaYo7ZgcJ 44h5kWEc9hmgDjxwT5eHH7QsOKyCMFEVuPDDizg9La6bofj7nUP8fh2o0C4cSRVo+1YZFL +As0OKLhtTyUxS77LKGJs5l4jmZfqyGTHNaS9+8nV3D8YnE9pry13TY0rZOrWKEROpW6hx HTrVHMEveql7EY+bfXcN+9dZPcP5yO2ge0uREwqLh7WifeC5U7VaRWdci18eqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723132855; a=rsa-sha256; cv=none; b=TCrPqEP6avEY7exrBjdgAcLwI3z0PthoDGxq4eJHZ+zHBXGAEI6u1l6suvcHIRtBduyB3F WzJeXD0tRROZxCJhgcmfJk+THm34eE1ey1ueZw3ZVJ4JB68l5MIu869SQer8VX3BSPtDZJ Nb+NzQFFUlEqB9ECj1wNOAJ3fLKJvjcbGPAw6yWaupIxwsrjntWdmvPcLNbhnhNcRRzQVE Nvzdk1wgPV+H/2iDRSDd0gCUj9AKJhr9yhQJ/MeS7lpJxGLM9WhU+ANdhkUvSJNM5V2h3O c/zWQtlNJWakjRDVfYlGBcmdv2kEDpnRERW8qnvIdeW6M4WNVFejdhNCs8+eyw== 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=1723132855; 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=1Ehhvs4VAoJAYfYxljRLmE3C9cB2f0QUVA4eLFv/QzY=; b=HhB63i9ASW37LB8ab/riGoU2JTJ3OxCb/oVUWP3imCHrYVQFb55qUHvFMpZJOg9blr7x9F 3NiLyZvdO/eMds2SVI/xUjPKq2+C8FBo1QTsVcalUmzCDDmnHuRHYHFeURT+QwvBzJWx+Q 2YLcBd95Q83p9QQOiU/HbVy8MB/6kmzZmFoJl0aoI7hf/V/PPOLXZisutnnikJEHX47g15 g1wHp1Wf1NV7tcTCAmCpBOTh7oedVy8fJZNPWIXAazbUQrSR92iDearLsgKjtJNPqElKy2 WyuJr3+OwZi5RgXOKs9+ITg0ZwXP22Q9bUaLNnHtZjmVvQVgpXKGnp7pd03S2w== 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 4WfsGH5PH3zflt; Thu, 8 Aug 2024 16:00:55 +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 478G0tHG005284; Thu, 8 Aug 2024 16:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 478G0tBA005281; Thu, 8 Aug 2024 16:00:55 GMT (envelope-from git) Date: Thu, 8 Aug 2024 16:00:55 GMT Message-Id: <202408081600.478G0tBA005281@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: 59a9c20d7736 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 59a9c20d7736d41be22791ec9a797cc535734ace Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=59a9c20d7736d41be22791ec9a797cc535734ace commit 59a9c20d7736d41be22791ec9a797cc535734ace Author: Mark Johnston AuthorDate: 2024-05-21 19:18:32 +0000 Commit: Mark Johnston CommitDate: 2024-08-08 15:58:12 +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 581094735c36..b60c1a88168c 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. */