[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>
This commit is contained in:
committed by
David S. Miller
parent
88c7664f13
commit
ab6a5bb6b2
@@ -779,7 +779,7 @@ static int netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
||||
if (skb_shinfo(skb)->gso_size > 0) {
|
||||
|
||||
no_of_desc++;
|
||||
if ((ip_hdrlen(skb) + skb->h.th->doff * 4 +
|
||||
if ((ip_hdrlen(skb) + tcp_hdrlen(skb) +
|
||||
sizeof(struct ethhdr)) >
|
||||
(sizeof(struct cmd_desc_type0) - 2)) {
|
||||
no_of_desc++;
|
||||
|
Reference in New Issue
Block a user