Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 129854f0 authored by Sukadev Bhattiprolu's avatar Sukadev Bhattiprolu Committed by David S. Miller
Browse files

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: default avatarDany Madden <drt@linux.ibm.com>
Reviewed-by: default avatarRick Lindsley <ricklind@linux.vnet.ibm.com>
Reviewed-by: default avatarDany Madden <drt@linux.ibm.com>
Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d1af4fa
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment