From owner-svn-src-head@freebsd.org Mon Jan 13 21:26:18 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AA461ED606; Mon, 13 Jan 2020 21:26:18 +0000 (UTC) (envelope-from vmaffione@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47xRV16YRdz4CSs; Mon, 13 Jan 2020 21:26:17 +0000 (UTC) (envelope-from vmaffione@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 DC36BAEEA; Mon, 13 Jan 2020 21:26:17 +0000 (UTC) (envelope-from vmaffione@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00DLQHlG024462; Mon, 13 Jan 2020 21:26:17 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00DLQHKa024461; Mon, 13 Jan 2020 21:26:17 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202001132126.00DLQHKa024461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Mon, 13 Jan 2020 21:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r356703 - head/sys/dev/vmware/vmxnet3 X-SVN-Group: head X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: head/sys/dev/vmware/vmxnet3 X-SVN-Commit-Revision: 356703 X-SVN-Commit-Repository: base 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.29 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: Mon, 13 Jan 2020 21:26:18 -0000 Author: vmaffione Date: Mon Jan 13 21:26:17 2020 New Revision: 356703 URL: https://svnweb.freebsd.org/changeset/base/356703 Log: vmx: fix initialization of TSO related descriptor fields Fix a mistake introduced by r343291, which ported the vmx(4) driver to iflib. In case of TSO, the hlen field of the (first) tx descriptor must be initialized to the cumulative length of Ethernet, IP and TCP headers. The length of the TCP header was missing. PR: 236999 Reported by: pkelsey Reviewed by: avg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D22967 Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c Modified: head/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- head/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jan 13 21:12:10 2020 (r356702) +++ head/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jan 13 21:26:17 2020 (r356703) @@ -1320,7 +1320,7 @@ vmxnet3_isc_txd_encap(void *vsc, if_pkt_info_t pi) hdrlen = pi->ipi_ehdrlen + pi->ipi_ip_hlen; if (pi->ipi_csum_flags & CSUM_TSO) { sop->offload_mode = VMXNET3_OM_TSO; - sop->hlen = hdrlen; + sop->hlen = hdrlen + pi->ipi_tcp_hlen; sop->offload_pos = pi->ipi_tso_segsz; } else if (pi->ipi_csum_flags & (VMXNET3_CSUM_OFFLOAD | VMXNET3_CSUM_OFFLOAD_IPV6)) {