netdev
[Top] [All Lists]

Re: [PATCH] Move shaper control information into skb->cb

To: "James R. Leu" <jleu@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] Move shaper control information into skb->cb
From: Andi Kleen <ak@xxxxxx>
Date: Tue, 25 Apr 2000 22:23:01 +0200
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20000425160624.B571@doit.wisc.edu>; from James R. Leu on Tue, Apr 25, 2000 at 10:05:59PM +0200
References: <20000424234623.A1446@fred.muc.de> <200004242306.QAA02602@pizda.ninka.net> <20000425015008.A1689@fred.muc.de> <200004242347.QAA02669@pizda.ninka.net> <20000425020135.A1762@fred.muc.de> <20000425160624.B571@doit.wisc.edu>
Sender: owner-netdev@xxxxxxxxxxx
On Tue, Apr 25, 2000 at 10:05:59PM +0200, James R. Leu wrote:
> With all this talk of the CB field.  What is the correct way to use the CB
> field when implementing a new protocol?

Like the new comment says:

    /* 
         * This is the control buffer. It is free to use for every
         * layer. Please put your private variables there. If you
         * want to keep them across layers you have to do a skb_clone()
         * first. This is owned by whoever has the skb queued ATM.
         */ 
        
As long as you have it queued skb->cb is yours. If you want to queue
packets over dev_queue_xmit you have to do a skb_clone() anyways
[playing games with skb->users is not recommended anymore], which
does a new scratch copy of skb->cb

-Andi


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