37761e2eda
From Jake: 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 ixl_isc_txd_encap with packets which have CSUM_IP_TSO, but do not have CSUM_IP or CSUM_IP_TCP set. Because of this, ixl_tx_setup_offload 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 ixl_tx_setup_offload function to check both CSUM_IP and CSUM_IP_TSO when deciding whether to enable IPv4 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 ixl 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 iavf and ixl interface files. It is uncertain if the hardware needs IFLIB_NEED_ZERO_CSUM for any other case besides TSO, so leave that flag assigned. It may be worth investigating to see if this work around flag could be disabled in a future change. Once both of these changes are made, the ixl driver should correctly offload TSO packets when TSO4 offload is enabled, regardless of whether TXCSUM is enabled or disabled. Submitted by: Jacob Keller <jacob.e.keller@intel.com> Reviewed by: erj@, shurd@ MFC after: 0 days Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D17900 |
||
---|---|---|
.. | ||
i40e_adminq_cmd.h | ||
i40e_adminq.c | ||
i40e_adminq.h | ||
i40e_alloc.h | ||
i40e_common.c | ||
i40e_dcb.c | ||
i40e_dcb.h | ||
i40e_devids.h | ||
i40e_hmc.c | ||
i40e_hmc.h | ||
i40e_lan_hmc.c | ||
i40e_lan_hmc.h | ||
i40e_nvm.c | ||
i40e_osdep.c | ||
i40e_osdep.h | ||
i40e_prototype.h | ||
i40e_register.h | ||
i40e_status.h | ||
i40e_type.h | ||
iavf_vc.c | ||
iavf.h | ||
if_iavf.c | ||
if_ixl.c | ||
ixl_debug.h | ||
ixl_iw_int.h | ||
ixl_iw.c | ||
ixl_iw.h | ||
ixl_pf_i2c.c | ||
ixl_pf_iov.c | ||
ixl_pf_iov.h | ||
ixl_pf_main.c | ||
ixl_pf_qmgr.c | ||
ixl_pf_qmgr.h | ||
ixl_pf.h | ||
ixl_txrx.c | ||
ixl.h | ||
virtchnl.h |