Message ID | 20210720232619.3088791-1-anthony.l.nguyen@intel.com |
---|---|
State | New |
Headers | show |
Series | [net,1/1] ixgbe: Fix packet corruption due to missing DMA sync | expand |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 20 Jul 2021 16:26:19 -0700 you wrote: > From: Markus Boehme <markubo@amazon.com> > > When receiving a packet with multiple fragments, hardware may still > touch the first fragment until the entire packet has been received. The > driver therefore keeps the first fragment mapped for DMA until end of > packet has been asserted, and delays its dma_sync call until then. > > [...] Here is the summary with links: - [net,1/1] ixgbe: Fix packet corruption due to missing DMA sync https://git.kernel.org/netdev/net/c/09cfae9f13d5 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 913253f8ecb4..14aea40da50f 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -1825,7 +1825,8 @@ static void ixgbe_dma_sync_frag(struct ixgbe_ring *rx_ring, struct sk_buff *skb) { if (ring_uses_build_skb(rx_ring)) { - unsigned long offset = (unsigned long)(skb->data) & ~PAGE_MASK; + unsigned long mask = (unsigned long)ixgbe_rx_pg_size(rx_ring) - 1; + unsigned long offset = (unsigned long)(skb->data) & mask; dma_sync_single_range_for_cpu(rx_ring->dev, IXGBE_CB(skb)->dma,