linux/drivers/net/ethernet/intel
Firo Yang e7ba676c61 ixgbe: sync the first fragment unconditionally
In Xen environment, if Xen-swiotlb is enabled, ixgbe driver
could possibly allocate a page, DMA memory buffer, for the first
fragment which is not suitable for Xen-swiotlb to do DMA operations.
Xen-swiotlb have to internally allocate another page for doing DMA
operations. This mechanism requires syncing the data from the internal
page to the page which ixgbe sends to upper network stack. However,
since commit f3213d9321 ("ixgbe: Update driver to make use of DMA
attributes in Rx path"), the unmap operation is performed with
DMA_ATTR_SKIP_CPU_SYNC. As a result, the sync is not performed.
Since the sync isn't performed, the upper network stack could receive
a incomplete network packet. By incomplete, it means the linear data
on the first fragment(between skb->head and skb->end) is invalid. So
we have to copy the data from the internal xen-swiotlb page to the page
which ixgbe sends to upper network stack through the sync operation.

More details from Alexander Duyck:
Specifically since we are mapping the frame with
DMA_ATTR_SKIP_CPU_SYNC we have to unmap with that as well. As a result
a sync is not performed on an unmap and must be done manually as we
skipped it for the first frag. As such we need to always sync before
possibly performing a page unmap operation.

Fixes: f3213d9321 ("ixgbe: Update driver to make use of DMA attributes in Rx path")
Signed-off-by: Firo Yang <firo.yang@suse.com>
Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2019-09-09 11:37:02 -07:00
..
e1000 ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-08-22 16:22:04 -07:00
e1000e e1000e: Make speed detection on hotplugging cable more reliable 2019-09-09 10:08:38 -07:00
fm10k fm10k: use a local variable for the frag pointer 2019-09-09 10:08:38 -07:00
i40e i40e: Remove EMPR traces from debugfs facility 2019-09-09 11:36:43 -07:00
iavf iavf: allow permanent MAC address to change 2019-09-09 10:08:38 -07:00
ice ice: Rework around device/function capabilities 2019-09-05 08:13:41 -07:00
igb ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-08-22 16:22:04 -07:00
igbvf net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
igc igc: Remove unneeded PCI bus defines 2019-09-09 10:08:38 -07:00
ixgb net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
ixgbe ixgbe: sync the first fragment unconditionally 2019-09-09 11:37:02 -07:00
ixgbevf ixgbevf: Link lost in VM on ixgbevf when restoring from freeze or suspend 2019-09-09 10:08:38 -07:00
e100.c intel: correct return from set features callback 2019-03-19 14:18:49 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support 2018-10-17 12:14:54 -07:00