Allocation of small packets on Rx
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2011-12-19 23:30:29
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2011-12-19 23:30:29
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.