[PATCH 22.11] net/mlx5: fix flow counter cache starvation

Luca Boccassi bluca at debian.org
Thu Mar 14 15:12:11 CET 2024


On Thu, 14 Mar 2024 at 13:30, Dariusz Sosnowski <dsosnowski at nvidia.com> wrote:
>
> [ upstream commit d755221b77c29549be4025e547cf907ad3a0abcf ]
>
> mlx5 PMD maintains a global counter pool and per-queue counter cache,
> which are used to allocate COUNT flow action objects.
> Whenever an empty cache is accessed, it is replenished
> with a pre-defined number of counters.
>
> If number of configured counters was sufficiently small, then
> it might have happened that caches associated with some queues
> could get starved because all counters were fetched on other queues.
>
> This patch fixes that by disabling cache at runtime
> if number of configured counters is not sufficient to avoid
> such starvation.
>
> Fixes: 4d368e1da3a4 ("net/mlx5: support flow counter action for HWS")
> Cc: stable at dpdk.org
>
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Acked-by: Ori Kam <orika at nvidia.com>
> Acked-by: Bing Zhao <bingz at nvidia.com>
> ---
>  drivers/net/mlx5/mlx5_flow_hw.c | 10 +++--
>  drivers/net/mlx5/mlx5_hws_cnt.c | 72 ++++++++++++++++++++++++---------
>  drivers/net/mlx5/mlx5_hws_cnt.h | 26 ++++++++++++
>  3 files changed, 86 insertions(+), 22 deletions(-)

Thanks, applied


More information about the stable mailing list