android_kernel_motorola_sm6375/drivers/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michael Chan 16f3aae1aa bnxt_en: Avoid order-5 memory allocation for TPA data
[ Upstream commit accd7e23693aaaa9aa0d3e9eca0ae77d1be80ab3 ]

The driver needs to keep track of all the possible concurrent TPA (GRO/LRO)
completions on the aggregation ring.  On P5 chips, the maximum number
of concurrent TPA is 256 and the amount of memory we allocate is order-5
on systems using 4K pages.  Memory allocation failure has been reported:

NetworkManager: page allocation failure: order:5, mode:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0-1
CPU: 15 PID: 2995 Comm: NetworkManager Kdump: loaded Not tainted 5.10.156 #1
Hardware name: Dell Inc. PowerEdge R660/0M1CC5, BIOS 0.2.25 08/12/2022
Call Trace:
 dump_stack+0x57/0x6e
 warn_alloc.cold.120+0x7b/0xdd
 ? _cond_resched+0x15/0x30
 ? __alloc_pages_direct_compact+0x15f/0x170
 __alloc_pages_slowpath.constprop.108+0xc58/0xc70
 __alloc_pages_nodemask+0x2d0/0x300
 kmalloc_order+0x24/0xe0
 kmalloc_order_trace+0x19/0x80
 bnxt_alloc_mem+0x1150/0x15c0 [bnxt_en]
 ? bnxt_get_func_stat_ctxs+0x13/0x60 [bnxt_en]
 __bnxt_open_nic+0x12e/0x780 [bnxt_en]
 bnxt_open+0x10b/0x240 [bnxt_en]
 __dev_open+0xe9/0x180
 __dev_change_flags+0x1af/0x220
 dev_change_flags+0x21/0x60
 do_setlink+0x35c/0x1100

Instead of allocating this big chunk of memory and dividing it up for the
concurrent TPA instances, allocate each small chunk separately for each
TPA instance.  This will reduce it to order-0 allocations.

Fixes: 79632e9ba3 ("bnxt_en: Expand bnxt_tpa_info struct to support 57500 chips.")
Reviewed-by: Somnath Kotur <[email protected]>
Reviewed-by: Damodharam Ammepalli <[email protected]>
Reviewed-by: Pavan Chebbi <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2023-03-17 08:32:51 +01:00
..
appletalk
arcnet
bonding bonding: fix error checking in bond_debug_reregister() 2023-02-22 12:50:31 +01:00
caif caif_virtio: fix race between virtio_device_ready() and ndo_open() 2022-07-07 17:36:49 +02:00
can can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error 2023-03-11 16:43:43 +01:00
dsa net: dsa: microchip: ksz9477: port map correction in ALU table entry register 2023-02-06 07:52:40 +01:00
ethernet bnxt_en: Avoid order-5 memory allocation for TPA data 2023-03-17 08:32:51 +01:00
fddi net: defxx: Fix missing err handling in dfx_init() 2023-01-18 11:41:13 +01:00
fjes
hamradio hamradio: baycom_epp: Fix return type of baycom_send_packet() 2023-01-18 11:41:35 +01:00
hippi
hyperv hv_netvsc: Fix race between VF offering and VF association message from host 2022-10-29 10:20:36 +02:00
ieee802154 ca8210: Fix crash by zero initializing data 2022-12-14 11:30:44 +01:00
ipvlan ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header 2022-09-28 11:04:05 +02:00
netdevsim netdevsim: Avoid allocation warnings triggered from user space 2022-08-25 11:17:49 +02:00
phy net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the MAC driver 2023-03-17 08:32:51 +01:00
plip net: plip: don't call kfree_skb/dev_kfree_skb() under spin_lock_irq() 2022-12-14 11:30:48 +01:00
ppp ppp: associate skb with a device at tx 2023-01-18 11:41:37 +01:00
slip
team net: team: Unsync device addresses on ndo_stop 2022-09-28 11:04:05 +02:00
usb net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the MAC driver 2023-03-17 08:32:51 +01:00
vmxnet3
wan treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() 2023-03-11 16:43:42 +01:00
wimax
wireless wifi: ath9k: use proper statements in conditionals 2023-03-11 16:44:07 +01:00
xen-netback xen-netback: move removal of "hotplug-status" to the right place 2023-01-18 11:40:48 +01:00
dummy.c
eql.c
geneve.c geneve: do not use RT_TOS for IPv6 flowlabel 2022-08-25 11:18:24 +02:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: loopback: use NET_NAME_PREDICTABLE for name_assign_type 2023-01-18 11:40:49 +01:00
macsec.c
macvlan.c macvlan: enforce a consistent minimal mtu 2022-11-25 17:42:21 +01:00
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c ntb_netdev: Use dev_kfree_skb_any() in interrupt context 2023-01-18 11:41:16 +01:00
rionet.c
sb1000.c
Space.c
sungem_phy.c net: sungem_phy: Add of_node_put() for reference returned by of_get_parent() 2022-08-03 11:59:39 +02:00
tap.c tap: tap_open(): correctly initialize socket uid 2023-03-11 16:43:41 +01:00
thunderbolt.c net: thunderbolt: Fix error handling in tbnet_init() 2022-11-25 17:42:16 +01:00
tun.c tun: tun_chr_open(): correctly initialize socket uid 2023-03-11 16:43:41 +01:00
veth.c
virtio_net.c virtio-net: Keep stop() to follow mirror sequence of open() 2023-02-22 12:50:25 +01:00
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c xen-netfront: Fix NULL sring after live migration 2022-12-14 11:30:45 +01:00