[SK_BUFF]: Introduce skb_transport_header(skb)
For the places where we need a pointer to the transport header, it is still legal to touch skb->h.raw directly if just adding to, subtracting from or setting it to another layer header. 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
a27ef749e7
commit
9c70220b73
@@ -2219,8 +2219,9 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
|
||||
th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
|
||||
(__force u32)delta));
|
||||
if (skb->ip_summed != CHECKSUM_PARTIAL)
|
||||
th->check = csum_fold(csum_partial(skb->h.raw, thlen,
|
||||
skb->csum));
|
||||
th->check =
|
||||
csum_fold(csum_partial(skb_transport_header(skb),
|
||||
thlen, skb->csum));
|
||||
|
||||
seq += len;
|
||||
skb = skb->next;
|
||||
@@ -2230,12 +2231,13 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
|
||||
th->cwr = 0;
|
||||
} while (skb->next);
|
||||
|
||||
delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len);
|
||||
delta = htonl(oldlen + (skb->tail - skb_transport_header(skb)) +
|
||||
skb->data_len);
|
||||
th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
|
||||
(__force u32)delta));
|
||||
if (skb->ip_summed != CHECKSUM_PARTIAL)
|
||||
th->check = csum_fold(csum_partial(skb->h.raw, thlen,
|
||||
skb->csum));
|
||||
th->check = csum_fold(csum_partial(skb_transport_header(skb),
|
||||
thlen, skb->csum));
|
||||
|
||||
out:
|
||||
return segs;
|
||||
|
Reference in New Issue
Block a user