linux_dsm_epyc7002/drivers/net/ethernet/stmicro
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
..
stmmac stmmac: limit max_mtu in case of 4KiB and use __netdev_alloc_skb (V2) 2011-10-19 19:24:18 -04:00
Kconfig drivers/net/ethernet/*: Enabled vendor Kconfig options 2011-08-27 00:58:56 -07:00
Makefile stmmac: Move the STMicroelectronics driver 2011-08-11 16:29:01 -07:00