[Intel-wired-lan] [PATCH 3/3 net-next] net_device: Add minimal padding to allow for net_device pointer alignment

Eric Dumazet eric.dumazet at gmail.com
Fri Apr 10 09:03:06 UTC 2015


On Fri, 2015-04-10 at 09:48 +0100, Thomas Graf wrote:

> 
> I assumed kmalloc would guarantee alignment of the return pointer as
> indicated by __alignof__ but I now realize that this can't possibly be the
> case. kmalloc only knows about the size. We'll have to drop patch 3.
> Fortunately it's still below 2K.


If you really care for this, take a look at qdisc_alloc()
and commit d276055c4e90a7278cd5167ba9755c9b214bcff7
("net_sched: reduce fifo qdisc size")

(Note that some setups require ~3 network devices but 3000+ qdisc)

I guess it might be nice to define a common helper and reuse it.





More information about the Intel-wired-lan mailing list