aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2014-03-29 23:14:53 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-04-11 09:16:12 -0400
commitfe6d4aa437baf185bc98b83eaff229a3ac5d738c (patch)
tree27f0c45549aab0ca6eb841d93f32d4cd9d53daf7
parenta173f045a870cacd3037cb97681dc3ee8ef9f49e (diff)
i40evf: remove open-coded skb_cow_head
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_txrx.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 53be5f44d015..b9f50f40abe1 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1114,20 +1114,18 @@ static int i40e_tso(struct i40e_ring *tx_ring, struct sk_buff *skb,
1114 u64 *cd_type_cmd_tso_mss, u32 *cd_tunneling) 1114 u64 *cd_type_cmd_tso_mss, u32 *cd_tunneling)
1115{ 1115{
1116 u32 cd_cmd, cd_tso_len, cd_mss; 1116 u32 cd_cmd, cd_tso_len, cd_mss;
1117 struct ipv6hdr *ipv6h;
1117 struct tcphdr *tcph; 1118 struct tcphdr *tcph;
1118 struct iphdr *iph; 1119 struct iphdr *iph;
1119 u32 l4len; 1120 u32 l4len;
1120 int err; 1121 int err;
1121 struct ipv6hdr *ipv6h;
1122 1122
1123 if (!skb_is_gso(skb)) 1123 if (!skb_is_gso(skb))
1124 return 0; 1124 return 0;
1125 1125
1126 if (skb_header_cloned(skb)) { 1126 err = skb_cow_head(skb, 0);
1127 err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); 1127 if (err < 0)
1128 if (err) 1128 return err;
1129 return err;
1130 }
1131 1129
1132 if (protocol == htons(ETH_P_IP)) { 1130 if (protocol == htons(ETH_P_IP)) {
1133 iph = skb->encapsulation ? inner_ip_hdr(skb) : ip_hdr(skb); 1131 iph = skb->encapsulation ? inner_ip_hdr(skb) : ip_hdr(skb);