Skip to contentSkip to conversation

fm10k: Align Rx buffers to 512B blocks

PATCH New Alexander Duyck 2 participants 2 messages Apr 15, 2016 – Jun 14, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fm10k: Align Rx buffers to 512B blocks

While reviewing the i40e driver changes to support page based receive I realized that I had overlooked the fact that the fm10k hardware required a 512 byte alignment for Rx buffers. This patch is meant to address that by changing the alignment for Rx buffers to 512 bytes instead of allowing it to be L1 cache aligned.

---
 drivers/net/ethernet/intel/fm10k/fm10k_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/fm10k/fm10k_main.c +1 -1
index 0e166e9c90c8..53d02416476c 100644
@@ -272,7 +272,7 @@ static bool fm10k_add_rx_frag(struct fm10k_rx_buffer *rx_buffer,
 #if (PAGE_SIZE < 8192)
 	unsigned int truesize = FM10K_RX_BUFSZ;
 #else
-	unsigned int truesize = SKB_DATA_ALIGN(size);
+	unsigned int truesize = ALIGN(size, 512);
 #endif
 	unsigned int pull_len;
 
#1 lore raw

PATCH 1/1 fm10k: Align Rx buffers to 512B blocks

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Alexander Duyck
Sent: Friday, April 15, 2016 10:01 AM
To: [email protected]; Kirsher, Jeffrey T <[email protected]>; alexander.duyck at gmail.com
Subject: [Intel-wired-lan] [next-queue PATCH] fm10k: Align Rx buffers to 512B blocks

While reviewing the i40e driver changes to support page based receive I realized that I had overlooked the fact that the fm10k hardware required a 512 byte alignment for Rx buffers. This patch is meant to address that by changing the alignment for Rx buffers to 512 bytes instead of allowing it to be L1 cache aligned.

---