From: Giuseppe CAVALLARO Date: Tue, 18 Oct 2011 01:39:55 +0000 (+0000) Subject: stmmac: limit max_mtu in case of 4KiB and use __netdev_alloc_skb (V2) X-Git-Tag: v3.2-rc1~182^2~52 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45db81e1590c82ddc735ccd33f8adab02528b3e3;p=pandora-kernel.git stmmac: limit max_mtu in case of 4KiB and use __netdev_alloc_skb (V2) Problem using big mtu around 4096 bytes is you end allocating (4096 +NET_SKB_PAD + NET_IP_ALIGN + sizeof(struct skb_shared_info) bytes -> 8192 bytes : order-1 pages It's better to limit the mtu to SKB_MAX_HEAD(NET_SKB_PAD), to have no more than one page per skb. Also the patch changes the netdev_alloc_skb_ip_align() done in init_dma_desc_rings() and uses a variant allowing GFP_KERNEL allocations allowing the driver to load even in case of memory pressure. Reported-by: Eric Dumazet Signed-off-by: Giuseppe Cavallaro Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed