[dpdk-stable] [PATCH 18.11] net/mlx5: fix secondary process resources release

Kevin Traynor ktraynor at redhat.com
Tue Dec 8 11:50:20 CET 2020


On 07/12/2020 04:29, Suanming Mou wrote:
> From: Suanming Mou <suanmingm at mellanox.com>
> 
> [ upstream commit 2786b7bf9084b32dde9a346d92ab1c27f0ffc476 ]
> 
> When secondary process starts, it will allocate its own process private
> data, and also does remap to UAR register of the Tx queue. Once the
> secondary process exits, these resources should be released accordingly.
> And the shared resources owned by primary should not be touched.
> 
> Currently, once one port in the secondary process spawn failed, all the
> other spawned ports will also be released during process exits. However,
> the mlx5_dev_close() function does not add the cases for secondary
> process, it means call the mlx5_dev_close() function directly in
> secondary process releases the resources it should not touch.
> 
> Add the case for secondary process release to its own resources in
> mlx5_dev_close() function to help it quits gracefully.
> 
> Fixes: 3a8207423a0f ("net/mlx5: close all ports on remove")
> 
> Signed-off-by: Suanming Mou <suanmingm at mellanox.com>
> Acked-by: Matan Azrad <matan at mellanox.com>
> ---
>  drivers/net/mlx5/mlx5.c      | 34 ++++++++++++++++++++++++++++------
>  drivers/net/mlx5/mlx5_rxtx.h |  1 +
>  drivers/net/mlx5/mlx5_txq.c  | 24 ++++++++++++++++++++++++
>  3 files changed, 53 insertions(+), 6 deletions(-)

Applied, thanks.



More information about the stable mailing list