diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-18 20:43:48 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:24 -0400 |
commit | ab6a5bb6b28a970104a34f0f6959b73cf61bdc72 (patch) | |
tree | 54cfa7d4fe00d0c28a60022b075afc0856d6fc2b /drivers/net/ixgb/ixgb_main.c | |
parent | 88c7664f13bd1a36acb8566b93892a4c58759ac6 (diff) |
[TCP]: Introduce tcp_hdrlen() and tcp_optlen()
The ip_hdrlen() buddy, created to reduce the number of skb->h.th-> uses and to
avoid the longer, open coded equivalent.
Ditched a no-op in bnx2 in the process.
I wonder if we should have a BUG_ON(skb->h.th->doff < 5) in tcp_optlen()...
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgb/ixgb_main.c')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index ceea6e45792d..96550d681623 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -1190,7 +1190,7 @@ ixgb_tso(struct ixgb_adapter *adapter, struct sk_buff *skb) | |||
1190 | return err; | 1190 | return err; |
1191 | } | 1191 | } |
1192 | 1192 | ||
1193 | hdr_len = (skb_transport_offset(skb) + (skb->h.th->doff << 2)); | 1193 | hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); |
1194 | mss = skb_shinfo(skb)->gso_size; | 1194 | mss = skb_shinfo(skb)->gso_size; |
1195 | iph = ip_hdr(skb); | 1195 | iph = ip_hdr(skb); |
1196 | iph->tot_len = 0; | 1196 | iph->tot_len = 0; |