From: Shahaf Shuler <shahafs@mellanox.com>
To: Mordechay Haimovsky <motih@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Mordechay Haimovsky <motih@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH v1 1/3] net/mlx5: modify shared counter allocation logic
Date: Thu, 27 Dec 2018 08:12:53 +0000 [thread overview]
Message-ID: <DB7PR05MB44266E4C66D710C12DC88AD0C3B60@DB7PR05MB4426.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1545748697-3385-2-git-send-email-motih@mellanox.com>
Tuesday, December 25, 2018 4:39 PM, Mordechay Haimovsky:
> Subject: [dpdk-dev] [PATCH v1 1/3] net/mlx5: modify shared counter allocation
> logic
>
> This commit modifies the logic for searching an allocating a shared counter in
> mlx5_flow_verbs.
Need to explain - why you change it?
I assume it is because only shared counters need to be search on the PMD database, correct?
>
> modifies commit 84c406e74524 ("net/mlx5: add flow translate function")
If above correct, better to introduce it as fix commit w/ Cc: stable@dpdk.org
>
> Signed-off-by: Moti Haimovsky <motih@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow_verbs.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c
> b/drivers/net/mlx5/mlx5_flow_verbs.c
> index 81ec59d..409e1cd 100644
> --- a/drivers/net/mlx5/mlx5_flow_verbs.c
> +++ b/drivers/net/mlx5/mlx5_flow_verbs.c
> @@ -121,13 +121,13 @@
> struct mlx5_flow_counter *cnt;
> int ret;
>
> - LIST_FOREACH(cnt, &priv->flow_counters, next) {
> - if (!cnt->shared || cnt->shared != shared)
> - continue;
> - if (cnt->id != id)
> - continue;
> - cnt->ref_cnt++;
> - return cnt;
> + if (shared) {
> + LIST_FOREACH(cnt, &priv->flow_counters, next) {
> + if (cnt->shared && cnt->id == id) {
> + cnt->ref_cnt++;
> + return cnt;
> + }
> + }
> }
> cnt = rte_calloc(__func__, 1, sizeof(*cnt), 0);
> if (!cnt) {
> --
> 1.8.3.1
next prev parent reply other threads:[~2018-12-27 8:12 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-25 14:38 [dpdk-dev] [PATCH v1 0/3] support flow counters using devx Mordechay Haimovsky
2018-12-25 14:38 ` [dpdk-dev] [PATCH v1 2/3] net/mlx5: add devx functions to glue Mordechay Haimovsky
2018-12-27 8:12 ` Shahaf Shuler
2018-12-25 14:38 ` [dpdk-dev] [PATCH v1 1/3] net/mlx5: modify shared counter allocation logic Mordechay Haimovsky
2018-12-27 8:12 ` Shahaf Shuler [this message]
2018-12-25 14:38 ` [dpdk-dev] [PATCH v1 3/3] net/mlx5: support flow counters using devx Mordechay Haimovsky
2018-12-27 8:15 ` Shahaf Shuler
2018-12-27 22:20 ` [dpdk-dev] [PATCH v2 0/3] " Mordechay Haimovsky
2018-12-27 22:20 ` [dpdk-dev] [PATCH v2 1/3] net/mlx5: fix shared counter allocation logic Mordechay Haimovsky
2018-12-29 20:12 ` Slava Ovsiienko
2018-12-31 7:23 ` Shahaf Shuler
2019-01-02 6:58 ` Mordechay Haimovsky
2018-12-27 22:20 ` [dpdk-dev] [PATCH v2 2/3] net/mlx5: add devx functions to glue Mordechay Haimovsky
2018-12-27 22:20 ` [dpdk-dev] [PATCH v2 3/3] net/mlx5: support flow counters using devx Mordechay Haimovsky
2019-01-02 9:43 ` [dpdk-dev] [PATCH v3 0/3] " Mordechay Haimovsky
2019-01-02 9:43 ` [dpdk-dev] [PATCH v3 2/3] net/mlx5: add devx functions to glue Mordechay Haimovsky
2019-01-02 9:43 ` [dpdk-dev] [PATCH v3 1/3] net/mlx5: fix shared counter allocation logic Mordechay Haimovsky
2019-01-02 9:43 ` [dpdk-dev] [PATCH v3 3/3] net/mlx5: support flow counters using devx Mordechay Haimovsky
2019-01-03 8:29 ` Shahaf Shuler
2019-01-03 15:06 ` [dpdk-dev] [PATCH v4 0/3] " Mordechay Haimovsky
2019-01-06 7:43 ` Shahaf Shuler
2019-01-03 15:06 ` [dpdk-dev] [PATCH v4 2/3] net/mlx5: add devx functions to glue Mordechay Haimovsky
2019-01-03 15:06 ` [dpdk-dev] [PATCH v4 1/3] net/mlx5: fix shared counter allocation logic Mordechay Haimovsky
2019-01-03 15:06 ` [dpdk-dev] [PATCH v4 3/3] net/mlx5: support flow counters using devx Mordechay Haimovsky
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=DB7PR05MB44266E4C66D710C12DC88AD0C3B60@DB7PR05MB4426.eurprd05.prod.outlook.com \
--to=shahafs@mellanox.com \
--cc=dev@dpdk.org \
--cc=motih@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).