OpenCloudOS-Kernel/drivers/net
Sukadev Bhattiprolu bbd809305b ibmvnic: Reuse tx pools when possible
Rather than releasing the tx pools on every close and reallocating
them on open, reuse the tx pools unless the pool parameters (number
of pools, size of each pool or size of each buffer in a pool) have
changed.

If the pool parameters changed, then release the old pools (if
any) and allocate new ones.

Specifically release tx pools, if:
	- adapter is removed,
	- pool parameters change during reset,
	- we encounter an error when opening the adapter in response
	  to a user request (in ibmvnic_open()).

and don't release them:
	- in __ibmvnic_close() or
	- on errors in __ibmvnic_open()

in the hope that we can reuse them during this or next reset.

With these changes reset_tx_pools() can be dropped because its
optimization is now included in init_tx_pools() itself.

cleanup_tx_pools() releases all the skbs associated with the pool and
is called from ibmvnic_cleanup(), which is called on every reset. Since
we want to reuse skbs across resets, move cleanup_tx_pools() out of
ibmvnic_cleanup() and call it only when user closes the adapter.

Add two new adapter fields, ->prev_mtu, ->prev_tx_pool_size to track the
previous values and use them to decide whether to reuse or realloc the
pools.

Reviewed-by: Rick Lindsley <ricklind@linux.vnet.ibm.com>
Reviewed-by: Dany Madden <drt@linux.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-09-15 11:12:24 +01:00
..
appletalk
arcnet
bonding bonding: 3ad: pass parameter bond_params by reference 2021-09-07 10:28:50 +01:00
caif
can can: c_can: fix null-ptr-deref on ioctl() 2021-09-07 08:46:58 +02:00
dsa net: dsa: b53: Fix IMP port setup on BCM5301x 2021-09-05 19:02:38 +01:00
ethernet ibmvnic: Reuse tx pools when possible 2021-09-15 11:12:24 +01:00
fddi fddi: switch from 'pci_' to 'dma_' API 2021-08-29 10:50:24 +01:00
fjes
hamradio
hippi
hyperv
ieee802154
ipa
ipvlan
mctp
mdio net: mdio: mscc-miim: Make use of the helper function devm_platform_ioremap_resource() 2021-08-31 12:07:05 +01:00
netdevsim Driver core update for 5.15-rc1 2021-09-01 08:44:42 -07:00
pcs
phy net: phy: at803x: add support for qca 8327 internal phy 2021-09-14 14:29:58 +01:00
plip
ppp
slip
team
usb Networking stragglers and fixes for 5.15-rc1, including changes from netfilter, 2021-09-07 14:02:58 -07:00
vmxnet3
wan
wireguard
wireless Networking stragglers and fixes for 5.15-rc1, including changes from netfilter, 2021-09-07 14:02:58 -07:00
wwan net: wwan: iosm: fix linux-next build error 2021-09-14 14:25:30 +01:00
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c virtio_net: reduce raw_smp_processor_id() calling in virtnet_xdp_get_sq 2021-08-29 10:53:45 +01:00
vrf.c
vsockmon.c
vxlan.c
xen-netfront.c