[PATCH 2/2] common/mlx5: fix multi-process mempool registration

Slava Ovsiienko viacheslavo at nvidia.com
Sun Aug 28 20:34:47 CEST 2022


> -----Original Message-----
> From: Dmitry Kozlyuk <dkozlyuk at nvidia.com>
> Sent: Monday, August 8, 2022 12:43
> To: dev at dpdk.org
> Cc: Matan Azrad <matan at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>; stable at dpdk.org
> Subject: [PATCH 2/2] common/mlx5: fix multi-process mempool registration
> 
> The `mp_cb_registered` flag shared between all processes was used to ensure
> that for any IB device (MLX5 common device) mempool event callback was
> registered only once and mempools that had been existing before the device
> start were traversed only once to register them.
> Since mempool callback registrations have become process-private, callback
> registration must be done by every process.
> The flag can no longer reflect the state for any single process.
> Replace it with a registration counter to track when no more callbacks are
> registered for the device in any process.
> It is sufficient to only register pre-existing mempools in the primary
> process because it is the one that starts the device.
> 
> Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dmitry Kozlyuk <dkozlyuk at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>


More information about the stable mailing list