From: Alexander Duyck Date: Tue, 7 Feb 2017 02:26:26 +0000 (-0800) Subject: igb: Only sync size of expected frame in ethtool testing X-Git-Tag: v4.12-rc1~64^3~416^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb0ef1d1dc8739e307f70493b7eb1184685dbbde;p=platform%2Fkernel%2Flinux-exynos.git igb: Only sync size of expected frame in ethtool testing We only need to sync the size of the frame that is read to test. We don't need to sync the entire Rx buffer. This way the testing is more consistent with how we handle things in the receive path. Signed-off-by: Alexander Duyck Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index 612cf13..d5966fe 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c @@ -1818,7 +1818,7 @@ static int igb_clean_test_rings(struct igb_ring *rx_ring, /* sync Rx buffer for CPU read */ dma_sync_single_for_cpu(rx_ring->dev, rx_buffer_info->dma, - IGB_RX_BUFSZ, + size, DMA_FROM_DEVICE); /* verify contents of skb */ @@ -1828,7 +1828,7 @@ static int igb_clean_test_rings(struct igb_ring *rx_ring, /* sync Rx buffer for device write */ dma_sync_single_for_device(rx_ring->dev, rx_buffer_info->dma, - IGB_RX_BUFSZ, + size, DMA_FROM_DEVICE); /* unmap buffer on Tx side */