From: Nelio Laranjeiro <nelio.laranje...@6wind.com>

Counter_set is a counter used for flows when its support is available.
Renaming it to flow counter.

Signed-off-by: Nelio Laranjeiro <nelio.laranje...@6wind.com>
---
 drivers/net/mlx5/mlx5.c      | 3 +--
 drivers/net/mlx5/mlx5.h      | 2 +-
 drivers/net/mlx5/mlx5_flow.c | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index fdd4710f1..ca44a0a59 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -759,8 +759,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct 
rte_pci_device *pci_dev)
                      (config.hw_csum_l2tun ? "" : "not "));
 
 #ifdef HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT
-               config.counter_set_supported =
-                                       !!(device_attr.max_counter_sets);
+               config.flow_counter_en = !!(device_attr.max_counter_sets);
                ibv_describe_counter_set(ctx, 0, &cs_desc);
                DEBUG("counter type = %d, num of cs = %ld, attributes = %d",
                      cs_desc.counter_type, cs_desc.num_of_cs,
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index 04f0b2557..171b3a933 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -110,7 +110,7 @@ struct mlx5_dev_config {
        unsigned int sriov:1; /* This is a VF or PF with VF devices. */
        unsigned int mps:2; /* Multi-packet send supported mode. */
        unsigned int tunnel_en:1; /* Whether tunnel is supported. */
-       unsigned int counter_set_supported:1; /* Counter set is supported. */
+       unsigned int flow_counter_en:1; /* Whether flow counter is supported. */
        unsigned int cqe_comp:1; /* CQE compression is enabled. */
        unsigned int tso:1; /* Whether TSO is enabled. */
        unsigned int tx_vec_en:1; /* Tx vector is enabled. */
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 8ad07b839..334a4f4ba 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -771,7 +771,7 @@ priv_flow_convert_actions(struct priv *priv,
                } else if (actions->type == RTE_FLOW_ACTION_TYPE_FLAG) {
                        parser->mark = 1;
                } else if (actions->type == RTE_FLOW_ACTION_TYPE_COUNT &&
-                          priv->config.counter_set_supported) {
+                          priv->config.flow_counter_en) {
                        parser->count = 1;
                } else {
                        goto exit_action_not_supported;
-- 
2.12.0

Reply via email to