> -----Original Message-----
> From: Dmitry Kozlyuk <dkozl...@nvidia.com>
> Sent: Monday, August 8, 2022 12:43
> To: dev@dpdk.org
> Cc: Matan Azrad <ma...@nvidia.com>; Slava Ovsiienko
> <viachesl...@nvidia.com>; sta...@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: sta...@dpdk.org
> 
> Signed-off-by: Dmitry Kozlyuk <dkozl...@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viachesl...@nvidia.com>

Reply via email to