[dpdk-dev] [PATCH] net/mlx5: fix mbufs overflow in vectorized MPRQ

Raslan Darawsheh rasland at nvidia.com
Sun Nov 22 14:01:05 CET 2020


Hi,


> -----Original Message-----
> From: Alexander Kozyrev <akozyrev at nvidia.com>
> Sent: Saturday, November 21, 2020 5:43 AM
> 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>
> ---
>  drivers/net/mlx5/mlx5_rxtx_vec.c | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)
> 
Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the dev mailing list