Skip to contentSkip to conversation

ixgbe: Fix build issues seen w/ XDP

PATCH New Alexander Duyck 2 participants 2 messages Apr 21, 2017

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

PATCH 1/1 ixgbe: Fix build issues seen w/ XDP

From: Alexander Duyck <[email protected]>

This patch is meant to fix the build issues seen w/ XDP when page sizes are larger than 4K.

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +4 -2
index c2c4de2aea43..503dd28261eb 100644
@@ -2125,7 +2125,8 @@ static struct sk_buff *ixgbe_construct_skb(struct ixgbe_ring *rx_ring,
 #if (PAGE_SIZE < 8192)
 	unsigned int truesize = ixgbe_rx_pg_size(rx_ring) / 2;
 #else
-	unsigned int truesize = SKB_DATA_ALIGN(size);
+	unsigned int truesize = SKB_DATA_ALIGN(xdp->data_end -
+					       xdp->data_hard_start);
 #endif
 	struct sk_buff *skb;
 
@@ -2170,7 +2171,8 @@ static struct sk_buff *ixgbe_build_skb(struct ixgbe_ring *rx_ring,
 	unsigned int truesize = ixgbe_rx_pg_size(rx_ring) / 2;
 #else
 	unsigned int truesize = SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) +
-				SKB_DATA_ALIGN(IXGBE_SKB_PAD + size);
+				SKB_DATA_ALIGN(xdp->data_end -
+					       xdp->data_hard_start);
 #endif
 	struct sk_buff *skb;
 
#1 lore raw

PATCH 1/1 ixgbe: Fix build issues seen w/ XDP

Quoted 10 lines · Alexander Duyck

From: Alexander Duyck <[email protected]>

This patch is meant to fix the build issues seen w/ XDP when page sizes are larger than 4K.

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Thanks! I just noticed this and you already have the patch.