Lines Matching defs:counters
9 #include "counters.h"
162 static int mlx5_ib_read_counters(struct ib_counters *counters,
166 struct mlx5_ib_mcounters *mcounters = to_mcounters(counters);
186 ret = mcounters->read_counters(counters->device, &mread_attr);
190 /* do the pass over the counters data array to assign according to the
204 static int mlx5_ib_destroy_counters(struct ib_counters *counters)
206 struct mlx5_ib_mcounters *mcounters = to_mcounters(counters);
208 mlx5_ib_counters_clear_description(counters);
210 mlx5_fc_destroy(to_mdev(counters->device)->mdev,
215 static int mlx5_ib_create_counters(struct ib_counters *counters,
218 struct mlx5_ib_mcounters *mcounters = to_mcounters(counters);
242 * mlx5_ib_get_counters_id - Returns counters id to use for device+port
246 * mlx5_ib_get_counters_id() Returns counters set id to use for given
412 /* We don't expose device counters over Vports */
428 * which doesn't have any counters yet, so it would be
1027 /* flow counters currently expose two counters packets and bytes */
1030 struct ib_counters *counters, enum mlx5_ib_counters_type counters_type,
1033 struct mlx5_ib_mcounters *mcounters = to_mcounters(counters);
1102 /* counters already bound to at least one flow */
1116 /* counters not bound yet, must have udata passed */
1134 void mlx5_ib_counters_clear_description(struct ib_counters *counters)
1138 if (!counters || atomic_read(&counters->usecnt) != 1)
1141 mcounters = to_mcounters(counters);