[Click] head- and tailroom

Eddie Kohler kohler at cs.ucla.edu
Thu Apr 19 14:40:15 EDT 2007


Hi David,

The reason you're only seeing 5 messages max is that Click will only 
print 5 messages max.  Printing messages is expensive, and it doesn't 
want to screw you over further via excessive warnings.

Now, are you using FromDevice or PollDevice?  With PollDevice, you might 
actually be able to change a packet's default headroom.  Change 
polldevice.cc:230; the first argument to skbmgr_allocate_skbs, which is 
currently 0, is the additional headroom to apply to the packet.

With FromDevice, the situation is different.  Click takes packets as the 
kernel creates them.  You'd want to modify Linux to create packets with 
additional headroom.  I'm not sure where, but there's probably one place 
in a header file somewhere.

I'd recommend fixing this: expensive pushes and puts can kill performance.

Eddie


David Biot wrote:
> Hello,
> 
> My click-router adds an IP-header in front of every packet and appends 4
> bytes of data to the end of the packet.
> 
> Now I sometimes get a message like
> expensive Packet::push; have 12 wanted 14
> or
> expensive Packet::put; have 0 wanted 4
> 
> Now I understand that this means that there isn't enough head- and tailroom
> to add the required data. All in all it's probably not all too important
> because I don't get a lot of these warnings. I get 5 times the message
> 
> expensive Packet::push; have 12 wanted 14
> 
> in the beginning and just recently saw the line 
> 
> expensive Packet::put; have 0 wanted 4
> 
> on a total of over a million packets. Now of course I would like to make
> sure these warnings disappear. Is it possible to ask fromdevice/polldevice
> to allocate more head-and tailroom? I couldn't find it in the configuration
> options.
> 
> Is also click adapting to the memory-usage? I find it strange that I only
> get these warnings at the beginning.
> 
> David Biot
> 
> PS: Sorry for the previous unfinished mail. I accidently pressed ctrl-enter
> which sends de mail.
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list