[<prev] [next>] [day] [month] [year] [list]
Message-ID: <39e6f6c70703131447m383203bajb3957bfcda78cb5c@mail.gmail.com>
Date: Tue, 13 Mar 2007 18:47:01 -0300
From: "Arnaldo Carvalho de Melo" <acme@...stprotocols.net>
To: "David Miller" <davem@...emloft.net>
Cc: "Netdev List" <netdev@...r.kernel.org>
Subject: [PATCH 13/15] [SK_BUFF]: More skb_reset_transport_header conversions
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 <acme@...hat.com>
---
net/ipv4/ip_sockglue.c | 12 +++++++-----
net/ipv6/datagram.c | 4 ++--
2 files changed, 9 insertions(+), 7 deletions(-)
View attachment "0013-SK_BUFF-More-skb_reset_transport_header-conversio.patch" of type "text/x-patch" (2790 bytes)
Powered by blists - more mailing lists