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/myri10ge/myri10ge.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/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index e04228c7b14f..e4b69a0485ba 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -2054,8 +2054,7 @@ again: | |||
2054 | * send loop that we are still in the | 2054 | * send loop that we are still in the |
2055 | * header portion of the TSO packet. | 2055 | * header portion of the TSO packet. |
2056 | * TSO header must be at most 134 bytes long */ | 2056 | * TSO header must be at most 134 bytes long */ |
2057 | cum_len = -(skb_transport_offset(skb) + | 2057 | cum_len = -(skb_transport_offset(skb) + tcp_hdrlen(skb)); |
2058 | (skb->h.th->doff << 2)); | ||
2059 | 2058 | ||
2060 | /* for TSO, pseudo_hdr_offset holds mss. | 2059 | /* for TSO, pseudo_hdr_offset holds mss. |
2061 | * The firmware figures out where to put | 2060 | * The firmware figures out where to put |