summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_flow.c
diff options
context:
space:
mode:
authorShahaf Shuler <shahafs@mellanox.com>2018-07-29 13:43:32 +0300
committerShahaf Shuler <shahafs@mellanox.com>2018-08-02 12:34:17 +0200
commited4c7fd92a91ff7e960ca2618bf34f84faaf643e (patch)
tree40014bb746e82dd1975b5a38ea45287a37a5ff28 /drivers/net/mlx5/mlx5_flow.c
parent2b4e423fd4c9ed5b0a4d1a0962f4af653b7324c5 (diff)
downloaddpdk-next-eventdev-ed4c7fd92a91ff7e960ca2618bf34f84faaf643e.zip
dpdk-next-eventdev-ed4c7fd92a91ff7e960ca2618bf34f84faaf643e.tar.gz
dpdk-next-eventdev-ed4c7fd92a91ff7e960ca2618bf34f84faaf643e.tar.xz
net/mlx5: fix flow count action for shared counter
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") Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_flow.c')
-rw-r--r--drivers/net/mlx5/mlx5_flow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b94c442..adda4df 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;