ibmvnic: Allow multiple ltbs in txpool ltb_set
authorSukadev Bhattiprolu <sukadev@linux.ibm.com>
Wed, 13 Apr 2022 17:10:26 +0000 (13:10 -0400)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Apr 2022 21:02:06 +0000 (14:02 -0700)
commit93b1ebb348a94a04ae4bfbd028f89005090cf8c7
tree05d01c69167837b133d302c539d284fc27d437bd
parenta75de820575d54185a7569494e89f83dca49368e
ibmvnic: Allow multiple ltbs in txpool ltb_set

Allow multiple LTBs in the txpool's ltb_set. i.e rather than using
a single large LTB, use several smaller LTBs.

The first n-1 LTBs will all be of the same size. The size of the last
LTB in the set depends on the number of buffers and buffer (mtu) size.
This strategy hopefully allows more reuse of the initial LTBs and also
reduces the chances of an allocation failure (of the large LTB) when
system is low in memory.

Suggested-by: Brian King <brking@linux.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Signed-off-by: Dany Madden <drt@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/ibm/ibmvnic.h