linux/drivers/net/ethernet/stmicro/stmmac
Giuseppe CAVALLARO 45db81e159 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 <eric.dumazet@gmail.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-19 19:24:18 -04:00
..
Kconfig stmmac: add CHAINED descriptor mode support (V4) 2011-10-19 19:24:18 -04:00
Makefile stmmac: add CHAINED descriptor mode support (V4) 2011-10-19 19:24:18 -04:00
chain_mode.c stmmac: add CHAINED descriptor mode support (V4) 2011-10-19 19:24:18 -04:00
common.h stmmac: add CHAINED descriptor mode support (V4) 2011-10-19 19:24:18 -04:00
descs.h
descs_com.h stmmac: add CHAINED descriptor mode support (V4) 2011-10-19 19:24:18 -04:00
dwmac100.h
dwmac100_core.c stmmac: rework the code to get the Synopsys ID (v3) 2011-09-15 15:40:01 -04:00
dwmac100_dma.c
dwmac1000.h
dwmac1000_core.c stmmac: rework the code to get the Synopsys ID (v3) 2011-09-15 15:40:01 -04:00
dwmac1000_dma.c stmmac: add HW DMA feature register (v3) 2011-09-15 15:40:01 -04:00
dwmac_dma.h stmmac: add HW DMA feature register (v3) 2011-09-15 15:40:01 -04:00
dwmac_lib.c
enh_desc.c stmmac: add CHAINED descriptor mode support (V4) 2011-10-19 19:24:18 -04:00
mmc.h stmmac: add MMC support exported via ethtool (v3) 2011-09-15 15:40:01 -04:00
mmc_core.c stmmac: add MMC support exported via ethtool (v3) 2011-09-15 15:40:01 -04:00
norm_desc.c stmmac: add CHAINED descriptor mode support (V4) 2011-10-19 19:24:18 -04:00
ring_mode.c stmmac: add CHAINED descriptor mode support (V4) 2011-10-19 19:24:18 -04:00
stmmac.h stmmac: add CHAINED descriptor mode support (V4) 2011-10-19 19:24:18 -04:00
stmmac_ethtool.c stmmac: allow mmc usage only if feature actually available (V4) 2011-10-19 19:24:17 -04:00
stmmac_main.c stmmac: limit max_mtu in case of 4KiB and use __netdev_alloc_skb (V2) 2011-10-19 19:24:18 -04:00
stmmac_mdio.c
stmmac_timer.c
stmmac_timer.h