#include <rte_metrics.h>
#include <rte_bitrate.h>
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
/*
* Persistent bit-rate data.
* @internal
if (bitrate_data == NULL)
return -EINVAL;
- return_value = rte_metrics_reg_names(&names[0], ARRAY_SIZE(names));
+ return_value = rte_metrics_reg_names(&names[0], RTE_DIM(names));
if (return_value >= 0)
bitrate_data->id_stats_set = return_value;
return return_value;
values[4] = port_data->peak_ibits;
values[5] = port_data->peak_obits;
ret = rte_metrics_update_values(port_id, bitrate_data->id_stats_set,
- values, ARRAY_SIZE(values));
+ values, RTE_DIM(values));
if (ret < 0)
return ret;