From owner-svn-src-all@freebsd.org Thu Nov 1 21:49:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 914E010D9F63; Thu, 1 Nov 2018 21:49:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3FC018DD8A; Thu, 1 Nov 2018 21:49:50 +0000 (UTC) (envelope-from jhb@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1343B217D3; Thu, 1 Nov 2018 21:49:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wA1Lnnsp018221; Thu, 1 Nov 2018 21:49:49 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wA1LnnuB018220; Thu, 1 Nov 2018 21:49:49 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201811012149.wA1LnnuB018220@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 1 Nov 2018 21:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340023 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 340023 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2018 21:49:50 -0000 Author: jhb Date: Thu Nov 1 21:49:49 2018 New Revision: 340023 URL: https://svnweb.freebsd.org/changeset/base/340023 Log: Check cannot_use_txpkts() rather than needs_tso() in add_to_txpkts(). Currently this is a no-op, but will matter in the future when cannot_use_txpkts() starts checking other conditions than just needs_tso(). 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 Thu Nov 1 21:46:37 2018 (r340022) +++ head/sys/dev/cxgbe/t4_sge.c Thu Nov 1 21:49:49 2018 (r340023) @@ -4725,8 +4725,11 @@ add_to_txpkts(struct mbuf *m, struct txpkts *txp, u_in MPASS(txp->wr_type == 0 || txp->wr_type == 1); + if (cannot_use_txpkts(m)) + return (1); + nsegs = mbuf_nsegs(m); - if (needs_tso(m) || (txp->wr_type == 1 && nsegs != 1)) + if (txp->wr_type == 1 && nsegs != 1) return (1); plen = txp->plen + m->m_pkthdr.len;