views:

75

answers:

1

Hi,

I need to steal some SKBs in my NetFilter hook, and retain them for some time.

Is there a limit in the kernel about how many SKBs can I use at a time? What are the consequences of having some 100,000 or even more SKBs held in my kernel module? I could avoid copying my packets two time if I can have many-many SKBs.

Regards, Denes

+1  A: 

If you have the memory no problem. The limit is the kernel data space on 32 bit x86 machines is normally limited to 1G (see http://kerneltrap.org/node/2450 ). Realize that each skb consumes the skb data structure as well as the memory it references. You could also use ipqueue to do the processing in user space (with more memory available).