On Wed, Jun 13, 2001 at 09:15:40AM -0700, Ben Greear wrote:
> Richard Guy Briggs wrote:
> > On Wed, Jun 13, 2001 at 03:21:26AM +0200, Andi Kleen wrote:
> > > On Wed, Jun 06, 2001 at 08:11:45PM +0200, Richard Guy Briggs wrote:
> > > > Hi again,
> > > >
> > > > If this is an FAQ, can someone point me to the reasons that skb_push()
> > > > and skb_put() panic rather than dropping the skb and complaining in the
> > > > log?
> > > >
> > > > If not, why does it do that?
> > >
> > > Because an overflow or underflow is always a bug in the code. If you're
> > > not sure if the skb has enough room you have to use *_expand_headroom and
> > > friends.
> > ...so checking for it is considered debugging code and thus, overhead
> > that need not be in a production system?
> 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...
> 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
Prevent Internet Wiretapping! -- FreeS/WAN:<www.freeswan.org>
Thanks for voting Green! -- <green.ca> Marillion:<www.marillion.co.uk>