[PATCH v1 1/1] fbarray: fix find_next_n for unaligned length
David Marchand
david.marchand at redhat.com
Fri Jul 12 10:53:09 CEST 2024
Hello,
On Wed, Jul 10, 2024 at 1:49 PM Anatoly Burakov
<anatoly.burakov at intel.com> wrote:
>
> When array length is not aligned on a power of 2, we need to mask out the
> unaligned bits from the mask whenever we reach the last mask. However, when both
> ignore mask (e.g. due to starting at unaligned bit) and last index ignore mask
> are specified, we combine them with an OR, which is incorrect. Fix it to combine
> them with AND instead, and add a unit test covering this case.
>
> The reverse function does not suffer from this issue because it does not have to
> deal with array end, and array beginning is always aligned.
>
> Fixes: c44d09811b40 ("eal: add shared indexed file-backed array")
> Cc: stable at dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Please don't forget to run checkpatch before submitting.
I reformatted the commitlog and applied, thanks Anatoly.
--
David Marchand
More information about the dev
mailing list