opnsense-src/sys
Eric Joyner 7aad1f4edc ix(4),ixv(4): Fix TSO offloads when TXCSUM is disabled
This patch and commit message are based on r340256 created by Jacob Keller:

The iflib stack does not disable TSO automatically when TXCSUM is
disabled, instead assuming that the driver will correctly handle TSOs
even when CSUM_IP is not set.

This results in iflib calling ixgbe_isc_txd_encap with packets which have
CSUM_IP_TSO, but do not have CSUM_IP or CSUM_IP_TCP set. Because of
this, ixgbe_tx_ctx_setup will not setup the IPv4 checksum offloading.

This results in bad TSO packets being sent if a user disables TXCSUM
without disabling TSO.

Fix this by updating the ixgbe_tx_ctx_setup function to check both
CSUM_IP and CSUM_IP_TSO when deciding whether to enable checksums.

Once this is corrected, another issue for TSO packets is revealed. The
driver sets IFLIB_NEED_ZERO_CSUM in order to enable a work around that
causes the ip->sum field to be zero'd. This is necessary for ix
hardware to correctly perform TSOs.

However, if TXCSUM is disabled, then the work around is not enabled, as
CSUM_IP will not be set when the iflib stack checks to see if it should
clear the sum field.

Fix this by adding IFLIB_TSO_INIT_IP to the iflib flags for the ix and
ixv interface files.

Once both of these changes are made, the ix and ixv drivers should
correctly offload TSO packets when TSO offload is enabled, regardless
of whether TXCSUM is enabled or disabled.

Submitted by:	Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reviewed by:	IntelNetworking
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D18470
2019-01-31 21:53:03 +00:00
..
amd64 Make iflib a loadable module. 2019-01-31 19:05:56 +00:00
arm awg: fix soft reset failure with no link 2019-01-21 14:35:36 +00:00
arm64 Make iflib a loadable module. 2019-01-31 19:05:56 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Remove stale now comment, forgotten in r343582. 2019-01-30 18:56:45 +00:00
cddl Remove BIO_ORDERED flag from BIO_FLUSH sent by ZFS. 2019-01-30 17:39:44 +00:00
compat Fix compilation with 'option NDISAPI + device ndis' and 2019-01-30 11:40:12 +00:00
conf Make iflib a loadable module. 2019-01-31 19:05:56 +00:00
contrib Document the instance context pointer. 2019-01-31 04:16:52 +00:00
crypto Generalize AES iov optimization 2018-12-13 04:40:53 +00:00
ddb ddb: Enable 'thread <address>' 2018-10-20 20:45:49 +00:00
dev ix(4),ixv(4): Fix TSO offloads when TXCSUM is disabled 2019-01-31 21:53:03 +00:00
dts [rpi] Reorganize spigen(4) overlays for Raspberry Pi 2019-01-16 01:08:34 +00:00
fs ext2fs: Add some extra consistency checks for the superblock. 2019-01-25 22:22:29 +00:00
gdb
geom geom_uzip(4): set 'gp != NULL' assertion on top of the function 2019-01-26 17:17:25 +00:00
gnu Import DTS from Linux 4.20 2019-01-11 09:40:34 +00:00
i386 Make iflib a loadable module. 2019-01-31 19:05:56 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Only sort requests of types that have concept of offset. 2019-01-30 17:24:50 +00:00
kgssapi OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
libkern mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
mips Make iflib a loadable module. 2019-01-31 19:05:56 +00:00
modules Make iflib a loadable module: add seemingly missed header. 2019-01-31 20:04:18 +00:00
net Don't set IFCAP_TXRTLMT during lagg_clone_create(). 2019-01-31 21:35:37 +00:00
net80211 Remove 2GHz channel list copies from wireless drivers. 2019-01-26 17:00:55 +00:00
netgraph Allow ng_nat to be attached to a ethernet interface directly via ng_ether(4) 2018-12-17 16:00:35 +00:00
netinet Add a simple port filter to SIFTR. 2019-01-30 17:44:30 +00:00
netinet6 Fix refcounting leaks in IPv6 MLD code leading to loss of IPv6 2019-01-24 08:34:13 +00:00
netipsec Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netpfil Revert r316461: Remove "IPFW static rules" rmlock, and use pfil's global lock. 2019-01-31 21:04:50 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9). 2018-06-16 08:26:23 +00:00
nfsclient
nfsserver
nlm
ofed Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
opencrypto Plug memory leak for AES_*_NIST_GMAC algorithms. 2018-12-13 08:59:51 +00:00
powerpc Make iflib a loadable module. 2019-01-31 19:05:56 +00:00
riscv Follow arm[32] and sparc64 KAPI and provide the FreeBSD standard spelling 2019-01-29 20:10:27 +00:00
rpc Add kern.rpc.gss.client_max, to make it possible to bump it easily. 2018-12-15 11:32:11 +00:00
security Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
sparc64 Make iflib a loadable module. 2019-01-31 19:05:56 +00:00
sys Reserve a bit in the FreeBSD feature control note for marking the 2019-01-31 15:44:49 +00:00
teken Implement ECMA-48 "REP", some Linuxen have started emitting them recently. 2018-10-21 08:29:36 +00:00
tests epoch_test: fix compile 2018-07-15 00:31:17 +00:00
tools make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
ufs This bug was introduced with the change to use softdep_bp_to_mp() in 2019-01-28 21:36:45 +00:00
vm In zone_alloc_bucket() max argument was calculated based on uz_count. 2019-01-31 17:52:48 +00:00
x86 xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile