netdev
[Top] [All Lists]

[1/2] [NET] Add skb_header_release and use it in net/ipv4/tcp

To: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
Subject: [1/2] [NET] Add skb_header_release and use it in net/ipv4/tcp
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 29 Jan 2005 14:17:40 +1100
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <20050128202542.GA23670@xxxxxxxxxxxxxxx>
References: <20050121204024.6f94fc26.davem@xxxxxxxxxxxxx> <20050122054346.GA1635@xxxxxxxxxxxxxxxxxxx> <20050122170533.GB11499@xxxxxxxxxxxxxxx> <20050123071027.GA20296@xxxxxxxxxxxxxxxxxxx> <20050126110043.GA29950@xxxxxxxxxxxxxxx> <20050126222522.GA21670@xxxxxxxxxxxxxxxxxxx> <20050127110946.GA20494@xxxxxxxxxxxxxxxxxxx> <20050127111201.GB20494@xxxxxxxxxxxxxxxxxxx> <20050128202542.GA23670@xxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040722i
On Fri, Jan 28, 2005 at 11:25:42PM +0300, Alexey Kuznetsov wrote:
> 
> Actually, I would prefer to unbind this from tcp, it can be used
> for something else, sctp or anything else who sends clones of skbs
> and wants to protect only data part.

Good point.  Let's generalise it into a counter as well.

This patch adds skb_header_release which can be called when the owner
of an skb no longer needs to access the header at all.  What constitutes
the header is left up to the users of the skb to define.

For instance, for outbound TCP packets we define the header to be
anything in front of the TCP payload.  Therefore we add skb_header_release
calls to all the paths where outound TCP packets are produced.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Attachment: tso-mangle-1
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>