mempool/octeontx2: fix shift calculation
authorPavan Nikhilesh <pbhagavatula@marvell.com>
Mon, 14 Jun 2021 19:24:24 +0000 (00:54 +0530)
committerJerin Jacob <jerinj@marvell.com>
Wed, 30 Jun 2021 16:42:54 +0000 (18:42 +0200)
commit43d89404950bb4d8e0efbcaebf734a0a722c2dbb
treeeedf44e74d91683411dbef53bed45632b0c48c31
parentc93f222d45a3b8c11bbd4fa3dbc3a4adcf105049
mempool/octeontx2: fix shift calculation

Shift is used to generate an 8-bit saturate value from the current
aura used count. The shift value should be derived from the log2 of
block count if it is greater than 256 else the shift should be 0.

Fixes: 7bcc47cbe2fa ("mempool/octeontx2: add mempool alloc op")
Cc: stable@dpdk.org
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
drivers/mempool/octeontx2/otx2_mempool_ops.c