* [Intel-wired-lan] [PATCH] ixgbe: Fix build issues seen w/ XDP
@ 2017-04-21 22:22 Alexander Duyck
2017-04-21 22:25 ` John Fastabend
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Duyck @ 2017-04-21 22:22 UTC (permalink / raw)
To: intel-wired-lan
From: Alexander Duyck <alexander.h.duyck@intel.com>
This patch is meant to fix the build issues seen w/ XDP when page sizes are
larger than 4K.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index c2c4de2aea43..503dd28261eb 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-21 22:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-21 22:22 [Intel-wired-lan] [PATCH] ixgbe: Fix build issues seen w/ XDP Alexander Duyck
2017-04-21 22:25 ` John Fastabend
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.