[dpdk-stable] [PATCH 19.11 v2] net/mlx5: fix last completed built descriptor

Luca Boccassi bluca at debian.org
Thu Feb 27 14:13:54 CET 2020


On Thu, 2020-02-27 at 12:40 +0000, Viacheslav Ovsiienko wrote:
> The routine sending packets with Multi-Packet Write method assigns
> the wqe_last variable with transmit descriptor (WQE - work queue
> entry)
> being built. If send queue is close to full state, the WQE has no
> data
> yet (trying to put the first packet) and there is no enough space
> in descriptor for the next packet the WQE is discarded and the stored
> wqe_last value becomes invalid - points to the discarded WQE.
> 
> The mlx5_tx_burst_request_completion() routine might set the
> completion
> request flags in the WQE pointed by wqe_last, it is safe, but the
> next
> mlx5_tx_burst call uses the WQE as the first free one and request
> completion flags might be overwritten and completion request will be
> lost causing the transmit  datapath malfunction.
> 
> Fixes: aa7c60a80997 ("net/mlx5: move Tx complete request routine")
> Cc: 
> stable at dpdk.org
> 
> 
> Signed-off-by: Viacheslav Ovsiienko <
> viacheslavo at mellanox.com
> >
> Acked-by: Matan Azrad <
> matan at mellanox.com
> >
> ---
>  drivers/net/mlx5/mlx5_rxtx.c | 51 +++++++++++++++++++++++++++-------
> ----------
>  1 file changed, 31 insertions(+), 20 deletions(-)

Thanks, applied.

-- 
Kind regards,
Luca Boccassi


More information about the stable mailing list