[PATCH v2 3/4] dma/idxd: fix wrap-around in burst capacity calculation

Kevin Laatz kevin.laatz at intel.com
Tue Jan 11 17:50:20 CET 2022


On 11/01/2022 13:41, Bruce Richardson wrote:
> The burst capacity calculation code assumes that the write and read
> (i.e. ids_returned) values both wrap at the ring-size, but the read
> value instead wraps as UINT16_MAX. Therefore, instead of just adding
> ring-size to the write value in case the read is greater, we need to
> just always mask the result to ensure a correct, in-range, value.
>
> Fixes: 9459de4edc99 ("dma/idxd: add burst capacity")
> Cc: kevin.laatz at intel.com
> Cc: stable at dpdk.org
>
> Reported-by: Sunil Pai G <sunil.pai.g at intel.com>
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> ---
>   drivers/dma/idxd/idxd_common.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>

Acked-by: Kevin Laatz <kevin.laatz at intel.com>



More information about the stable mailing list