diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-10 23:45:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:24:46 -0400 |
commit | c1d2bbe1cd6c7bbdc6d532cefebb66c7efb789ce (patch) | |
tree | 03a715961ba576a11cbc0e91c5d465e4c4d95d82 /net/ipv6/ip6_output.c | |
parent | 57effc70a5be9f7804e9a99964eb7265367effca (diff) |
[SK_BUFF]: Introduce skb_reset_network_header(skb)
For the common, open coded 'skb->nh.raw = skb->data' operation, so that we can
later turn skb->nh.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 case, next 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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index a5f4562b5d29..4406546d3ce8 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -735,7 +735,7 @@ slow_path: | |||
735 | ip6_copy_metadata(frag, skb); | 735 | ip6_copy_metadata(frag, skb); |
736 | skb_reserve(frag, LL_RESERVED_SPACE(rt->u.dst.dev)); | 736 | skb_reserve(frag, LL_RESERVED_SPACE(rt->u.dst.dev)); |
737 | skb_put(frag, len + hlen + sizeof(struct frag_hdr)); | 737 | skb_put(frag, len + hlen + sizeof(struct frag_hdr)); |
738 | frag->nh.raw = frag->data; | 738 | skb_reset_network_header(frag); |
739 | fh = (struct frag_hdr*)(frag->data + hlen); | 739 | fh = (struct frag_hdr*)(frag->data + hlen); |
740 | frag->h.raw = frag->data + hlen + sizeof(struct frag_hdr); | 740 | frag->h.raw = frag->data + hlen + sizeof(struct frag_hdr); |
741 | 741 | ||
@@ -976,7 +976,7 @@ static inline int ip6_ufo_append_data(struct sock *sk, | |||
976 | skb_put(skb,fragheaderlen + transhdrlen); | 976 | skb_put(skb,fragheaderlen + transhdrlen); |
977 | 977 | ||
978 | /* initialize network header pointer */ | 978 | /* initialize network header pointer */ |
979 | skb->nh.raw = skb->data; | 979 | skb_reset_network_header(skb); |
980 | 980 | ||
981 | /* initialize protocol header pointer */ | 981 | /* initialize protocol header pointer */ |
982 | skb->h.raw = skb->data + fragheaderlen; | 982 | skb->h.raw = skb->data + fragheaderlen; |