From owner-svn-src-head@freebsd.org Fri Jun 2 17:57:28 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC1B4AF83E0; Fri, 2 Jun 2017 17:57:28 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AE376FAD5; Fri, 2 Jun 2017 17:57:28 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v52HvRfp053606; Fri, 2 Jun 2017 17:57:27 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v52HvRW1053605; Fri, 2 Jun 2017 17:57:27 GMT (envelope-from np@FreeBSD.org) Message-Id: <201706021757.v52HvRW1053605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 2 Jun 2017 17:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319506 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 17:57:28 -0000 Author: np Date: Fri Jun 2 17:57:27 2017 New Revision: 319506 URL: https://svnweb.freebsd.org/changeset/base/319506 Log: cxgbe(4): Update the statistics for compound tx work requests once per work request, not once per frame. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Jun 2 17:49:21 2017 (r319505) +++ head/sys/dev/cxgbe/t4_sge.c Fri Jun 2 17:57:27 2017 (r319506) @@ -4581,12 +4581,8 @@ write_txpkts_wr(struct sge_txq *txq, struct fw_eth_tx_ if (checkwrap && (uintptr_t)cpl == (uintptr_t)&eq->desc[eq->sidx]) cpl = (void *)&eq->desc[0]; - txq->txpkts0_pkts += txp->npkt; - txq->txpkts0_wrs++; } else { cpl = flitp; - txq->txpkts1_pkts += txp->npkt; - txq->txpkts1_wrs++; } /* Checksum offload */ @@ -4619,6 +4615,14 @@ write_txpkts_wr(struct sge_txq *txq, struct fw_eth_tx_ write_gl_to_txd(txq, m, (caddr_t *)(&flitp), checkwrap); + } + + if (txp->wr_type == 0) { + txq->txpkts0_pkts += txp->npkt; + txq->txpkts0_wrs++; + } else { + txq->txpkts1_pkts += txp->npkt; + txq->txpkts1_wrs++; } txsd = &txq->sdesc[eq->pidx];