netdev
[Top] [All Lists]

Re: skb_pull, etc. panics.

To: Ben Greear <greearb@xxxxxxxxxxxxxxx>
Subject: Re: skb_pull, etc. panics.
From: Richard Guy Briggs <rgb@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Jun 2001 18:49:52 -0400
Cc: Richard Guy Briggs <rgb@xxxxxxxxxxxxxxxxxxxxx>, Andi Kleen <ak@xxxxxx>, netdev@xxxxxxxxxxx
In-reply-to: <3B27E7F4.1D2BB21F@xxxxxxxxxxxxxxx>; from greearb@xxxxxxxxxxxxxxx on Wed, Jun 13, 2001 at 03:23:48PM -0700
References: <20010606141145.L31244@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20010613032126.B5323@xxxxxxxxxx> <20010613115848.A19894@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <3B2791AC.7EAEC35A@xxxxxxxxxxxxxxx> <20010613182255.D19894@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <3B27E7F4.1D2BB21F@xxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Wed, Jun 13, 2001 at 03:23:48PM -0700, Ben Greear wrote:
> Richard Guy Briggs wrote:
> > 
> > On Wed, Jun 13, 2001 at 09:15:40AM -0700, Ben Greear wrote:
> 
> > > In certain cases you may have to clone and grow the skb.  But, since that
> > > is inneficient, you should only do that in wierd boundary cases at most,
> > > and in general, you should make sure the skb has enough reserved space
> > > from the beginning.  netdevice.h has some macro magic that figures out
> > > the max-header (ie what to reserve).  If you can determine how much you
> > > need, you can change it there...
> > 
> > That doesn't help much if I need to add nested IPSec headers...
> 
> The 802.1Q vlan code I wrote has logic to grow the skb when needed,
> you can look at it if you'd like: http://scry.wanfear.com/~greear/vlan.html
> 
> I'm guessing that if the header was deterministic before you started,
> then you should be able to determine how much needed to be reserved
> for the lower layers.  So, you can just make sure you have that much
> space before sending it to the lower layers.  If you can determine
> a reserve space that works, say, 90% of the time or better, then
> you can change the netdevice.h macro accordingly, and then do copies
> to make the skb bigger the other 10% of the time.  With memory as
> cheap as it is, it may be perfectly reasonable to 'waste' 512 bytes
> or whatever at the front of the skb in order to cut down on your copying
> for the normal case.
> 
> This could be configured at compile time, ie only enable it when ipsec is
> enabled.

It is not static.  It depends on the number of nestings.  It also
depends on combinations of seperate AH, adding IPCOMP, tunnel mode,
etc...

I don't understand dst cache stuff well enough yet, but that may be the
sort of thing that could be stored in a dst cache entry per route.  (I
say this, knowing that our current routing paradigm is going to change
with KLIPS2...)

> Ben
> 
> -- 
> Ben Greear <greearb@xxxxxxxxxxxxxxx>          <Ben_Greear@xxxxxxxxxx>
> President of Candela Technologies Inc      http://www.candelatech.com
> ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

        slainte mhath, RGB
-- 
Richard Guy Briggs -- PGP key available            Auto-Free Ottawa! Canada
<www.conscoop.ottawa.on.ca/rgb/>                       <www.flora.org/afo/>
Prevent Internet Wiretapping!        --        FreeS/WAN:<www.freeswan.org>
Thanks for voting Green! -- <green.ca>      Marillion:<www.marillion.co.uk>

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