FreeBSD's LinuxKPI xa_alloc() starts at index zero for each allocation.
The per-file uverbs XArray holds protection domains, completion queues,
queue pairs, and memory regions. As the number of live objects grows,
each new handle probes all occupied lower IDs, making large connection
setups increasingly expensive.
Keep the optimization in the OFED uverbs caller: track the next candidate
ID in ib_uverbs_file, reserve under the XArray lock, and advance the
cursor on success. On a collision, search forward and wrap through the
32-bit handle space. Existing lookup, commit, erase, and destruction
paths are unchanged. Freed lower IDs are reused after wraparound.
Signed-off-by: Lewandowski, Rafal <rafal.lewandowski@intel.com>
Sponsored by: Intel Corporation