netdev
[Top] [All Lists]

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

To: netdev@xxxxxxxxxxx
Subject: Re: [PATCH] Move shaper control information into skb->cb
From: "James R. Leu" <jleu@xxxxxxxxxxxxxx>
Date: Tue, 25 Apr 2000 16:06:24 -0500
In-reply-to: <20000425020135.A1762@fred.muc.de>; from Andi Kleen on Tue, Apr 25, 2000 at 02:01:35AM +0200
Organization: none
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>
Reply-to: jleu@xxxxxxxxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
With all this talk of the CB field.  What is the correct way to use the CB
field when implementing a new protocol?

Thanks,
Jim

On Tue, Apr 25, 2000 at 02:01:35AM +0200, Andi Kleen wrote:
> On Tue, Apr 25, 2000 at 01:53:51AM +0200, David S. Miller wrote:
> >    Date: Tue, 25 Apr 2000 01:50:08 +0200
> >    From: Andi Kleen <ak@xxxxxx>
> > 
> >    > I know intuitively that once, for example, tcp_transmit_skb has
> >    > built the TCP header the control block can be clobbered by any
> >    > further usage.  We should really document this, at least in a
> >    > comment above that function.
> > 
> >    I documented it in skbuff.h (``is owned by whoever has the skb queued'')
> > 
> >    BTW, the hippi private fields should be probably moved there too.
> > 
> > This brings up an important issue.  What if then, we'd like to shape
> > packets over HIPPI?  It sounds really stupid, I know, but the point
> > is that once we start allowing software or hardware devices to use the
> > CB for their private per-packet state, we can run into problems if one
> > is a pseudo device in front of another.
> > 
> > If shaper mucks with it's CB fields, and once it has sent the packet
> > off to the real device it never references that skb header again, then
> > at least in this case there is no problem.  Is that what is happening
> > here?
> > 
> Not a problem. Shaper calls skb_clone before submitting the data.
> 
> 
> -Andi
> 
> -- 
> This is like TV. I don't like TV.

-- 
James R. Leu

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