net/mlx5/linux: fix missed Rx packet stats
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Wed, 28 Apr 2021 09:31:45 +0000 (12:31 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Sun, 9 May 2021 09:38:33 +0000 (11:38 +0200)
There was a typo - the device context was wrongly provided
instead of counter's one for the DevX query operation.

Fixes: e6988afdc75a ("net/mlx5: fix imissed statistics")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c

index 5ac7871..6325607 100644 (file)
@@ -2697,8 +2697,8 @@ mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name,
        if (priv->sh) {
                if (priv->q_counters != NULL &&
                    strcmp(ctr_name, "out_of_buffer") == 0)
-                       return mlx5_devx_cmd_queue_counter_query(priv->sh->ctx,
-                                                          0, (uint32_t *)stat);
+                       return mlx5_devx_cmd_queue_counter_query
+                                       (priv->q_counters, 0, (uint32_t *)stat);
                MKSTR(path, "%s/ports/%d/hw_counters/%s",
                      priv->sh->ibdev_path,
                      priv->dev_port,