aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2014-03-29 23:14:27 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-04-11 08:58:06 -0400
commit2049e1f6f5e6720b182c42695dbdef071804226e (patch)
tree8498c463cd2b3e1f17fc8646e812f4acbac001aa
parent58cf663f0e962a51f051a84e38be281335bdf1fd (diff)
ixgbe: remove open-coded skb_cow_head
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 00c9308455b8..c4c526b7f99f 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -6510,6 +6510,7 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,
6510 struct sk_buff *skb = first->skb; 6510 struct sk_buff *skb = first->skb;
6511 u32 vlan_macip_lens, type_tucmd; 6511 u32 vlan_macip_lens, type_tucmd;
6512 u32 mss_l4len_idx, l4len; 6512 u32 mss_l4len_idx, l4len;
6513 int err;
6513 6514
6514 if (skb->ip_summed != CHECKSUM_PARTIAL) 6515 if (skb->ip_summed != CHECKSUM_PARTIAL)
6515 return 0; 6516 return 0;
@@ -6517,11 +6518,9 @@ static int ixgbe_tso(struct ixgbe_ring *tx_ring,
6517 if (!skb_is_gso(skb)) 6518 if (!skb_is_gso(skb))
6518 return 0; 6519 return 0;
6519 6520
6520 if (skb_header_cloned(skb)) { 6521 err = skb_cow_head(skb, 0);
6521 int err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); 6522 if (err < 0)
6522 if (err) 6523 return err;
6523 return err;
6524 }
6525 6524
6526 /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */ 6525 /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */
6527 type_tucmd = IXGBE_ADVTXD_TUCMD_L4T_TCP; 6526 type_tucmd = IXGBE_ADVTXD_TUCMD_L4T_TCP;
@@ -7078,8 +7077,8 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,
7078 IXGBE_TX_FLAGS_VLAN_PRIO_SHIFT; 7077 IXGBE_TX_FLAGS_VLAN_PRIO_SHIFT;
7079 if (tx_flags & IXGBE_TX_FLAGS_SW_VLAN) { 7078 if (tx_flags & IXGBE_TX_FLAGS_SW_VLAN) {
7080 struct vlan_ethhdr *vhdr; 7079 struct vlan_ethhdr *vhdr;
7081 if (skb_header_cloned(skb) && 7080
7082 pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) 7081 if (skb_cow_head(skb, 0))
7083 goto out_drop; 7082 goto out_drop;
7084 vhdr = (struct vlan_ethhdr *)skb->data; 7083 vhdr = (struct vlan_ethhdr *)skb->data;
7085 vhdr->h_vlan_TCI = htons(tx_flags >> 7084 vhdr->h_vlan_TCI = htons(tx_flags >>