aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@redhat.com>2014-12-03 11:17:39 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-08 20:47:42 -0500
commita94d9e224e3c48f57559183582c6410e7acf1d8b (patch)
treedce3ceb3bf34837c6cab7a13b3c0043fbe8eb720 /drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
parent9c0c112422a2a6b06fcddcaf21957676490cebba (diff)
ethernet/intel: Use eth_skb_pad and skb_put_padto helpers
Update the Intel Ethernet drivers to use eth_skb_pad() and skb_put_padto instead of doing their own implementations of the function. Also this cleans up two other spots where skb_pad was called but the length and tail pointers were being manipulated directly instead of just having the padding length added via __skb_put. Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 3b0ddf757fb6..62a0d8e0f17d 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -616,14 +616,9 @@ static bool ixgbevf_cleanup_headers(struct ixgbevf_ring *rx_ring,
616 if (skb_is_nonlinear(skb)) 616 if (skb_is_nonlinear(skb))
617 ixgbevf_pull_tail(rx_ring, skb); 617 ixgbevf_pull_tail(rx_ring, skb);
618 618
619 /* if skb_pad returns an error the skb was freed */ 619 /* if eth_skb_pad returns an error the skb was freed */
620 if (unlikely(skb->len < 60)) { 620 if (eth_skb_pad(skb))
621 int pad_len = 60 - skb->len; 621 return true;
622
623 if (skb_pad(skb, pad_len))
624 return true;
625 __skb_put(skb, pad_len);
626 }
627 622
628 return false; 623 return false;
629} 624}