]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/infiniband/hw/mlx5/main.c
Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox...
[thirdparty/linux.git] / drivers / infiniband / hw / mlx5 / main.c
index fce863621414865b3bb477d22b06d69bcc550d81..3efa7493456bd29aff8cb954e98ab632b518fa35 100644 (file)
@@ -3570,7 +3570,8 @@ static void mlx5_ib_set_rule_source_port(struct mlx5_ib_dev *dev,
                misc = MLX5_ADDR_OF(fte_match_param, spec->match_criteria,
                                    misc_parameters_2);
 
-               MLX5_SET_TO_ONES(fte_match_set_misc2, misc, metadata_reg_c_0);
+               MLX5_SET(fte_match_set_misc2, misc, metadata_reg_c_0,
+                        mlx5_eswitch_get_vport_metadata_mask());
        } else {
                misc = MLX5_ADDR_OF(fte_match_param, spec->match_value,
                                    misc_parameters);
@@ -5722,9 +5723,10 @@ mlx5_ib_counter_alloc_stats(struct rdma_counter *counter)
        const struct mlx5_ib_counters *cnts =
                get_counters(dev, counter->port - 1);
 
-       /* Q counters are in the beginning of all counters */
        return rdma_alloc_hw_stats_struct(cnts->names,
-                                         cnts->num_q_counters,
+                                         cnts->num_q_counters +
+                                         cnts->num_cong_counters +
+                                         cnts->num_ext_ppcnt_counters,
                                          RDMA_HW_STATS_DEFAULT_LIFESPAN);
 }