net/mlx5: fix mbuf freeing in vectorized MPRQ
authorAlexander Kozyrev <akozyrev@nvidia.com>
Thu, 10 Dec 2020 15:14:23 +0000 (15:14 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 15:03:05 +0000 (16:03 +0100)
commitac340e1fe5fdaa6cd3ed90feaf5443a3c906e2ff
tree5bbdd0791eb0163e01eee585803e134a9199bd6d
parent3ab5a3a7acafdf35ad4b8b1e7805ce7663c786c6
net/mlx5: fix mbuf freeing in vectorized MPRQ

Wrong index is used to find mbufs belonging to an application in
the rxq_free_elts_sprq() function in the case of vectorized MPRQ.
elts_ci points to the last allocated mbuf in this case, not rq_ci.
Use this field to avoid double free of mbuf and segmentation fault.

Fixes: 0f20acbf5eda ("net/mlx5: implement vectorized MPRQ burst")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_rxq.c