From: Raslan Darawsheh <rasland@mellanox.com>
To: Matan Azrad <matan@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Slava Ovsiienko <viacheslavo@mellanox.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/mlx5: fix counter container resize
Date: Thu, 14 May 2020 08:11:24 +0000 [thread overview]
Message-ID: <AM0PR05MB6707537136DEE7DA5EC35B2AC2BC0@AM0PR05MB6707.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1589287933-91969-1-git-send-email-matan@mellanox.com>
Hi,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Matan Azrad
> Sent: Tuesday, May 12, 2020 3:52 PM
> To: dev@dpdk.org
> Cc: Slava Ovsiienko <viacheslavo@mellanox.com>; stable@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@dpdk.org
>
> Signed-off-by: Matan Azrad <matan@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
prev parent reply other threads:[~2020-05-14 8:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 12:52 [dpdk-stable] " Matan Azrad
2020-05-13 15:27 ` Slava Ovsiienko
2020-05-14 8:11 ` Raslan Darawsheh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM0PR05MB6707537136DEE7DA5EC35B2AC2BC0@AM0PR05MB6707.eurprd05.prod.outlook.com \
--to=rasland@mellanox.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=stable@dpdk.org \
--cc=viacheslavo@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).