diff options
author | Michael Chan <mchan@broadcom.com> | 2008-10-09 15:24:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-09 15:24:39 -0400 |
commit | a1efb4b686babf38e5e63add8b990f18e38becc4 (patch) | |
tree | c4be4b6af452526fb5eec6ff5987246cce5a6067 /drivers/net/bnx2.c | |
parent | d5321e309c2fd1a1d534fc7bb674a1fff9f25d94 (diff) |
bnx2: Eliminate TSO header modifications.
This is now possible with updated firmware.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 21711c753a09..f147204e1e47 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -6008,7 +6008,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6008 | } | 6008 | } |
6009 | #endif | 6009 | #endif |
6010 | if ((mss = skb_shinfo(skb)->gso_size)) { | 6010 | if ((mss = skb_shinfo(skb)->gso_size)) { |
6011 | u32 tcp_opt_len, ip_tcp_len; | 6011 | u32 tcp_opt_len; |
6012 | struct iphdr *iph; | 6012 | struct iphdr *iph; |
6013 | 6013 | ||
6014 | vlan_tag_flags |= TX_BD_FLAGS_SW_LSO; | 6014 | vlan_tag_flags |= TX_BD_FLAGS_SW_LSO; |
@@ -6032,21 +6032,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
6032 | mss |= (tcp_off & 0xc) << TX_BD_TCP6_OFF2_SHL; | 6032 | mss |= (tcp_off & 0xc) << TX_BD_TCP6_OFF2_SHL; |
6033 | } | 6033 | } |
6034 | } else { | 6034 | } else { |
6035 | if (skb_header_cloned(skb) && | ||
6036 | pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { | ||
6037 | dev_kfree_skb(skb); | ||
6038 | return NETDEV_TX_OK; | ||
6039 | } | ||
6040 | |||
6041 | ip_tcp_len = ip_hdrlen(skb) + sizeof(struct tcphdr); | ||
6042 | |||
6043 | iph = ip_hdr(skb); | 6035 | iph = ip_hdr(skb); |
6044 | iph->check = 0; | ||
6045 | iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len); | ||
6046 | tcp_hdr(skb)->check = ~csum_tcpudp_magic(iph->saddr, | ||
6047 | iph->daddr, 0, | ||
6048 | IPPROTO_TCP, | ||
6049 | 0); | ||
6050 | if (tcp_opt_len || (iph->ihl > 5)) { | 6036 | if (tcp_opt_len || (iph->ihl > 5)) { |
6051 | vlan_tag_flags |= ((iph->ihl - 5) + | 6037 | vlan_tag_flags |= ((iph->ihl - 5) + |
6052 | (tcp_opt_len >> 2)) << 8; | 6038 | (tcp_opt_len >> 2)) << 8; |