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/ipv6_sockglue.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/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index d16e0fd2cd89..da930fa089c9 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -108,7 +108,7 @@ static int ipv6_gso_send_check(struct sk_buff *skb) | |||
108 | rcu_read_lock(); | 108 | rcu_read_lock(); |
109 | ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); | 109 | ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); |
110 | if (likely(ops && ops->gso_send_check)) { | 110 | if (likely(ops && ops->gso_send_check)) { |
111 | skb->h.raw = skb->data; | 111 | skb_reset_transport_header(skb); |
112 | err = ops->gso_send_check(skb); | 112 | err = ops->gso_send_check(skb); |
113 | } | 113 | } |
114 | rcu_read_unlock(); | 114 | rcu_read_unlock(); |
@@ -144,7 +144,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features) | |||
144 | rcu_read_lock(); | 144 | rcu_read_lock(); |
145 | ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); | 145 | ops = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); |
146 | if (likely(ops && ops->gso_segment)) { | 146 | if (likely(ops && ops->gso_segment)) { |
147 | skb->h.raw = skb->data; | 147 | skb_reset_transport_header(skb); |
148 | segs = ops->gso_segment(skb, features); | 148 | segs = ops->gso_segment(skb, features); |
149 | } | 149 | } |
150 | rcu_read_unlock(); | 150 | rcu_read_unlock(); |