fbarray: fix overlap check
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 14 Jan 2021 15:02:45 +0000 (15:02 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 19 Jan 2021 12:12:59 +0000 (13:12 +0100)
commit27ff8384deaca2f7727d0cedf2053aa13fbae1e2
tree3acc4394e87a8179dea9f0c2aefae430a3b4a4cc
parentc69150679891f065c93c4e0503e0dca5830ceeb7
fbarray: fix overlap check

When we're attaching fbarrays in secondary processes, we check for
whether the intended memory address for the fbarray is already in use by
some other, local fbarray. However, the check for end-overlap (i.e. to
see if our memory area's end overlaps with some other fbarray) is
incorrectly counting end offset as part of the overlap. Fix the check.

Fixes: 5b61c62cfd76 ("fbarray: add internal tailq for mapped areas")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Tested-by: Zhihong Peng <zhihongx.peng@intel.com>
lib/librte_eal/common/eal_common_fbarray.c