Re: problem in Network device driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

On 14:54 Fri 17 Apr     , Devesh Sharma wrote:
> thanks for replying michi, BTW how does a layer above network device
> driver manages skb cache? how can we tune this skb cache size? any
> idea?

See http://lxr.linux.no/linux+v2.6.27.7/net/core/skbuff.c#L179

The struct sk_buff and the data area are allocated seperately. The size of the
sk_buff struct is alwaly constant and does not grow with the packet size. The
data area size is variable. 4096 may be a "magic number", because 4096 byte is
the size of a memory page and you need some header+trailer for every packet. If
you allocate more than one page at the same time, the allocation may take very
long in some cases. The "normal" way to avoid this is to do allocate 2 non
continuous pages and do scatter-getter IO. However, this is not done in the
networking subsystem. If this is the source of the problem, the benchmark
should also slow down at 4096 byte packet size, if you use gigabit ethernet
with the some MTU.

	-Michi
-- 
programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux