netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Allocation of small packets on Rx
@ 2011-12-19 23:30 Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 2011-12-19 23:30 UTC (permalink / raw)
  To: netdev

Hi folks !

For a driver that gets small packets "inline" in the rx descriptors, I
allocate the skb in the rx poll and copy the data to it.

Should I allocate an skb of the just the right size for the packet (+
eventual alignment) or is there any benefit to allocating all skb's the
same size ?

The max size of those "inline" packets is 256 bytes and the driver today
always allocate that. Does that "help" the allocator some way or should
I just allocate what is needed for each packet ?

Cheers,
Ben.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-19 23:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-19 23:30 Allocation of small packets on Rx Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).