@@ -676,7 +676,9 @@ static void ixgbevf_pull_tail(struct ixgbevf_ring *rx_ring,
/* we need the header to contain the greater of either ETH_HLEN or
* 60 bytes if the skb->len is less than 60 for skb_pad.
*/
- pull_len = eth_get_headlen(va, IXGBEVF_RX_HDR_SIZE);
+ pull_len = eth_get_headlen(va, skb_frag_size(frag));
+ if (unlikely(pull_len > IXGBEVF_RX_HDR_SIZE))
+ pull_len = IXGBEVF_RX_HDR_SIZE;
/* align pull length to size of long to optimize memcpy performance */
skb_copy_to_linear_data(skb, va, ALIGN(pull_len, sizeof(long)));
The second parameter of eth_get_headlen() is the length of the frame buffer, not the header length of skb. Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> --- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)