DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shahaf Shuler <shahafs@mellanox.com>
To: yskoh@mellanox.com
Cc: dev@dpdk.org, nelio.laranjeiro@6wind.com
Subject: [dpdk-dev] [PATCH] net/mlx5: fix flow count action for shared counters
Date: Sun, 29 Jul 2018 13:43:32 +0300	[thread overview]
Message-ID: <20180729104332.154177-1-shahafs@mellanox.com> (raw)

According to commit fb8fd96d4251 ("ethdev: add shared counter to flow
API") the counter id should be taken into account only when the shared
flag is set.

Fixes: 60bd8c9747e8 ("net/mlx5: add count flow action")
Cc: nelio.laranjeiro@6wind.com

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b94c442ec4..adda4df656 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -490,7 +490,7 @@ mlx5_flow_counter_new(struct rte_eth_dev *dev, uint32_t shared, uint32_t id)
 	struct mlx5_flow_counter *cnt;
 
 	LIST_FOREACH(cnt, &priv->flow_counters, next) {
-		if (cnt->shared != shared)
+		if (!cnt->shared || cnt->shared != shared)
 			continue;
 		if (cnt->id != id)
 			continue;
-- 
2.12.0

             reply	other threads:[~2018-07-29 10:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-29 10:43 Shahaf Shuler [this message]
2018-07-31  7:55 ` Shahaf Shuler

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=20180729104332.154177-1-shahafs@mellanox.com \
    --to=shahafs@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=yskoh@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).