summaryrefslogtreecommitdiffstats
path: root/drivers/net/ntb_netdev.c
diff options
context:
space:
mode:
authorSukadev Bhattiprolu <sukadev@linux.ibm.com>2021-09-14 20:52:56 -0700
committerDavid S. Miller <davem@davemloft.net>2021-09-15 11:12:24 +0100
commit129854f061d8925a259f29b16d82bc19a23cf377 (patch)
tree7d09e5aaa735030314751f5260068ca9eac7622c /drivers/net/ntb_netdev.c
parent0d1af4fa71241104b8959f83974875dc52bc129f (diff)
downloadlinux-129854f061d8925a259f29b16d82bc19a23cf377.tar.bz2
ibmvnic: Use bitmap for LTB map_ids
In a follow-on patch, we will reuse long term buffers when possible. When doing so we have to be careful to properly assign map ids. We can no longer assign them sequentially because a lower map id may be available and we could wrap at 255 and collide with an in-use map id. Instead, use a bitmap to track active map ids and to find a free map id. Don't need to take locks here since the map_id only changes during reset and at that time only the reset worker thread should be using the adapter. Noticed this when analyzing an error Dany Madden ran into with the patch set. Reported-by: Dany Madden <drt@linux.ibm.com> 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>
Diffstat (limited to 'drivers/net/ntb_netdev.c')
0 files changed, 0 insertions, 0 deletions