[dpdk-dev] [PATCH] net/mlx5: fix counter container resize
Raslan Darawsheh
rasland at mellanox.com
Thu May 14 10:11:24 CEST 2020
Hi,
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Matan Azrad
> Sent: Tuesday, May 12, 2020 3:52 PM
> To: dev at dpdk.org
> Cc: Slava Ovsiienko <viacheslavo at mellanox.com>; stable at dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix counter container resize
>
> The design of counter container resize used double buffer algorithm in
> order to synchronize between the query thread to the control thread.
> When the control thread detected resize need, it created new bigger
> buffer for the counter pools in a new container and change the container
> index atomically.
> In case the query thread had not detect the previous resize before a new
> one need was detected by the control thread, the control thread returned
> EAGAIN to the flow creation API used a COUNT action.
>
> The rte_flow API doesn't allow unblocked commands and doesn't expect to
> get EAGAIN error type.
>
> So, when a lot of flows were created between 2 different periodic
> queries, 2 different resizes might try to be created and caused EAGAIN
> error.
> This behavior may blame flow creations.
>
> Change the synchronization way to use lock instead of double buffer
> algorithm.
>
> The critical section of this lock is very small, so flow insertion
> rate should not be decreased.
>
> Fixes: ebbac312e448 ("net/mlx5: resize a full counter container")
> Cc: stable at dpdk.org
>
> Signed-off-by: Matan Azrad <matan at mellanox.com>
> ---
> drivers/net/mlx5/mlx5.c | 70 +++++++++++------------
> drivers/net/mlx5/mlx5.h | 23 +++++---
> drivers/net/mlx5/mlx5_flow.c | 37 ++++---------
> drivers/net/mlx5/mlx5_flow.h | 6 --
> drivers/net/mlx5/mlx5_flow_dv.c | 110 +++++++++++++++------------------
> ----
> drivers/net/mlx5/mlx5_flow_verbs.c | 6 +-
> 6 files changed, 104 insertions(+), 148 deletions(-)
>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
More information about the dev
mailing list