DORMANTno replies

[PATCH 13/15] [SK_BUFF]: More skb_reset_transport_header conversions

From: Arnaldo Carvalho de Melo <hidden>
Date: 2007-03-13 21:47:03

These are a bit more subtle, they are of this type:

-       skb->h.raw = payload;
        __skb_pull(skb, payload - skb->data);
+       skb_reset_transport_header(skb);

__skb_pull results in:

skb->data = skb->data + payload - skb->data;
skb->data = payload;

So after __skb_pull we have skb->data pointing to payload and we can
just call skb_reset_transport_header(skb), that will do:

skb->h.raw = payload;

The others are similar, allowing us to get rid of some more cases where a
pointer was being attributed to the layer headers.

Signed-off-by: Arnaldo Carvalho de Melo <redacted>
---
 net/ipv4/ip_sockglue.c |   12 +++++++-----
 net/ipv6/datagram.c    |    4 ++--
 2 files changed, 9 insertions(+), 7 deletions(-)

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help