aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-10 23:45:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:24:46 -0400
commitc1d2bbe1cd6c7bbdc6d532cefebb66c7efb789ce (patch)
tree03a715961ba576a11cbc0e91c5d465e4c4d95d82 /net/ipv4/ip_output.c
parent57effc70a5be9f7804e9a99964eb7265367effca (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/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index ddba857bd243..32f1a23a80f9 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -593,7 +593,7 @@ slow_path:
593 ip_copy_metadata(skb2, skb); 593 ip_copy_metadata(skb2, skb);
594 skb_reserve(skb2, ll_rs); 594 skb_reserve(skb2, ll_rs);
595 skb_put(skb2, len + hlen); 595 skb_put(skb2, len + hlen);
596 skb2->nh.raw = skb2->data; 596 skb_reset_network_header(skb2);
597 skb2->h.raw = skb2->data + hlen; 597 skb2->h.raw = skb2->data + hlen;
598 598
599 /* 599 /*
@@ -722,7 +722,7 @@ static inline int ip_ufo_append_data(struct sock *sk,
722 skb_put(skb,fragheaderlen + transhdrlen); 722 skb_put(skb,fragheaderlen + transhdrlen);
723 723
724 /* initialize network header pointer */ 724 /* initialize network header pointer */
725 skb->nh.raw = skb->data; 725 skb_reset_network_header(skb);
726 726
727 /* initialize protocol header pointer */ 727 /* initialize protocol header pointer */
728 skb->h.raw = skb->data + fragheaderlen; 728 skb->h.raw = skb->data + fragheaderlen;