[dpdk-dev] [PATCH] net/mlx5: fix mbufs overflow in vectorized MPRQ
Slava Ovsiienko
viacheslavo at nvidia.com
Sun Nov 22 09:44:01 CET 2020
> -----Original Message-----
> From: Alexander Kozyrev <akozyrev at nvidia.com>
> Sent: Saturday, November 21, 2020 5:43
> To: dev at dpdk.org
> Cc: Raslan Darawsheh <rasland at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>; Matan Azrad <matan at nvidia.com>
> Subject: [PATCH] net/mlx5: fix mbufs overflow in vectorized MPRQ
>
> Changing the allocation scheme to improve mbufs locality caused mbufs
> overrun in some cases. Revert the previous replenish logic back.
> Calculate a number of unused mbufs and replenish max this number of mbufs.
>
> Mark the last 4 mbufs as fake mbufs to prevent overflowing into consumed
> mbufs in the future. Keep the consumed index and the produced index 4
> mbufs apart for this purpose.
>
> Replenish some mbufs only in case the consumed index is within the replenish
> threshold of the produced index in order to retain the cache locality for the
> vectorized MPRQ routine.
>
> Fixes: 5c68764377 ("net/mlx5: improve vectorized MPRQ descriptors locality")
>
> Signed-off-by: Alexander Kozyrev <akozyrev at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
More information about the dev
mailing list