linux-brain/drivers/net/ethernet/intel/i40e
Alexander Duyck cd80cb0be1 i40e/i40evf: Account for frags split over multiple descriptors in check linearize
[ Upstream commit 248de22e63 ]

The original code for __i40e_chk_linearize didn't take into account the
fact that if a fragment is 16K in size or larger it has to be split over 2
descriptors and the smaller of those 2 descriptors will be on the trailing
edge of the transmit. As a result we can get into situations where we didn't
catch requests that could result in a Tx hang.

This patch takes care of that by subtracting the length of all but the
trailing edge of the stale fragment before we test for sum. By doing this
we can guarantee that we have all cases covered, including the case of a
fragment that spans multiple descriptors. We don't need to worry about
checking the inner portions of this since 12K is the maximum aligned DMA
size and that is larger than any MSS will ever be since the MTU limit for
jumbos is something on the order of 9K.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-03 10:23:26 +01:00
..
Makefile i40e: Add support for client interface for IWARP driver 2016-02-29 17:10:52 -05:00
i40e.h i40e: Fix configure TCs after initial DCB disable 2016-10-27 14:08:56 -07:00
i40e_adminq.c i40e: Remove HMC AQ API implementation 2016-05-01 17:03:55 -07:00
i40e_adminq.h i40e: Move NVM variable out of AQ struct 2016-04-06 18:45:11 -07:00
i40e_adminq_cmd.h i40e: Add support for HMC resource and profile for X722 2016-08-19 21:26:58 -07:00
i40e_alloc.h
i40e_client.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-08-30 00:54:02 -04:00
i40e_client.h i40e: Remove XSTRINGIFY macro definitions and uses 2016-08-19 21:39:03 -07:00
i40e_common.c i40e: Remove device ID 0x37D4 2016-07-22 00:07:04 -07:00
i40e_dcb.c i40e: refactor DCB function 2016-02-16 19:04:08 -08:00
i40e_dcb.h i40e: Add parsing for CEE DCBX TLVs 2015-10-08 15:11:38 -07:00
i40e_dcb_nl.c i40e: Change some messages from info to debug only 2015-10-15 01:58:41 -07:00
i40e_debugfs.c i40e: Strip out debugfs hook for Flow Director filter programming 2016-09-24 22:41:47 -07:00
i40e_devids.h i40e: Remove device ID 0x37D4 2016-07-22 00:07:04 -07:00
i40e_diag.c
i40e_diag.h
i40e_ethtool.c i40evf: support queue-specific settings for interrupt moderation 2016-09-24 22:50:23 -07:00
i40e_fcoe.c i40e/i40evf: Faster RX via avoiding FCoE 2016-04-06 18:26:23 -07:00
i40e_fcoe.h
i40e_hmc.c i40e: fix an uninitialized variable bug 2016-05-14 00:21:51 -07:00
i40e_hmc.h
i40e_lan_hmc.c i40e: use explicit cast from u16 to u8 2015-12-12 21:08:26 -08:00
i40e_lan_hmc.h
i40e_main.c i40e: Do not enable NAPI on q_vectors that have no rings 2017-12-25 14:23:41 +01:00
i40e_nvm.c i40e: Specify AQ event opcode to wait for 2016-04-26 09:15:39 -07:00
i40e_osdep.h move io-64-nonatomic*.h out of asm-generic 2015-10-15 00:21:07 +02:00
i40e_prototype.h i40e: add functions to control default VSI 2016-06-27 15:08:28 -07:00
i40e_ptp.c ptp_clock: future-proofing drivers against PTP subsystem becoming optional 2016-09-22 02:18:33 -04:00
i40e_register.h i40e: Expose some registers to program parser, FD and RSS logic 2016-02-18 23:49:31 -08:00
i40e_status.h
i40e_txrx.c i40e/i40evf: Account for frags split over multiple descriptors in check linearize 2018-03-03 10:23:26 +01:00
i40e_txrx.h i40e/i40evf: Add txring_txq function to match fm10k and ixgbe 2016-09-24 22:22:17 -07:00
i40e_type.h i40e/i40evf: fix I40E_MASK signed shift overflow warnings 2016-05-01 17:05:08 -07:00
i40e_virtchnl.h i40e: add encap csum VF offload flag 2016-09-24 19:30:23 -07:00
i40e_virtchnl_pf.c Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue 2016-09-24 08:14:57 -04:00
i40e_virtchnl_pf.h net: Update API for VF vlan protocol 802.1ad support 2016-09-24 08:01:26 -04:00