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
This commit is contained in:
Vincenzo Maffione 2020-01-13 21:26:17 +00:00
parent 4c69f60a8e
commit f55f37d9c5

View File

@ -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)) {