diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-13 12:06:52 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:15 -0400 |
commit | badff6d01a8589a1c828b0bf118903ca38627f4e (patch) | |
tree | 89611d7058c612085c58dfb9913ee30ddf04b604 /net/ipv6/ip6_output.c | |
parent | 0660e03f6b18f19b6bbafe7583265a51b90daf36 (diff) |
[SK_BUFF]: Introduce skb_reset_transport_header(skb)
For the common, open coded 'skb->h.raw = skb->data' operation, so that we can
later turn skb->h.raw into a offset, reducing the size of struct sk_buff in
64bit land while possibly keeping it as a pointer on 32bit.
This one touches just the most simple cases:
skb->h.raw = skb->data;
skb->h.raw = {skb_push|[__]skb_pull}()
The next ones will handle the slightly more "complex" cases.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 1900c6226866..0f4434eff66a 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -654,7 +654,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
654 | * before previous one went down. */ | 654 | * before previous one went down. */ |
655 | if (frag) { | 655 | if (frag) { |
656 | frag->ip_summed = CHECKSUM_NONE; | 656 | frag->ip_summed = CHECKSUM_NONE; |
657 | frag->h.raw = frag->data; | 657 | skb_reset_transport_header(frag); |
658 | fh = (struct frag_hdr*)__skb_push(frag, sizeof(struct frag_hdr)); | 658 | fh = (struct frag_hdr*)__skb_push(frag, sizeof(struct frag_hdr)); |
659 | __skb_push(frag, hlen); | 659 | __skb_push(frag, hlen); |
660 | skb_reset_network_header(frag); | 660 | skb_reset_network_header(frag); |
@@ -747,8 +747,8 @@ slow_path: | |||
747 | skb_reserve(frag, LL_RESERVED_SPACE(rt->u.dst.dev)); | 747 | skb_reserve(frag, LL_RESERVED_SPACE(rt->u.dst.dev)); |
748 | skb_put(frag, len + hlen + sizeof(struct frag_hdr)); | 748 | skb_put(frag, len + hlen + sizeof(struct frag_hdr)); |
749 | skb_reset_network_header(frag); | 749 | skb_reset_network_header(frag); |
750 | fh = (struct frag_hdr*)(frag->data + hlen); | 750 | fh = (struct frag_hdr *)(skb_network_header(frag) + hlen); |
751 | frag->h.raw = frag->data + hlen + sizeof(struct frag_hdr); | 751 | frag->h.raw = frag->nh.raw + hlen + sizeof(struct frag_hdr); |
752 | 752 | ||
753 | /* | 753 | /* |
754 | * Charge the memory for the fragment to any owner | 754 | * Charge the memory for the fragment to any owner |
@@ -991,7 +991,7 @@ static inline int ip6_ufo_append_data(struct sock *sk, | |||
991 | skb_reset_network_header(skb); | 991 | skb_reset_network_header(skb); |
992 | 992 | ||
993 | /* initialize protocol header pointer */ | 993 | /* initialize protocol header pointer */ |
994 | skb->h.raw = skb->data + fragheaderlen; | 994 | skb->h.raw = skb->nh.raw + fragheaderlen; |
995 | 995 | ||
996 | skb->ip_summed = CHECKSUM_PARTIAL; | 996 | skb->ip_summed = CHECKSUM_PARTIAL; |
997 | skb->csum = 0; | 997 | skb->csum = 0; |