X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fhns3%2Fhns3_stats.c;h=0fe853d62626e6638600df5dbabf623afc32ceb1;hb=0663a84524e5c63cb737cd723b4ea33493e8d17a;hp=3afef4a04b8f2acc7f8411302eb9e1bfaf4fd5c7;hpb=53e6f86cf550a75fb1d55a76f411e214e783d14d;p=dpdk.git diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c index 3afef4a04b..0fe853d626 100644 --- a/drivers/net/hns3/hns3_stats.c +++ b/drivers/net/hns3/hns3_stats.c @@ -1325,7 +1325,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids, len = cnt_stats * sizeof(struct rte_eth_xstat); values_copy = rte_zmalloc("hns3_xstats_values", len, 0); if (values_copy == NULL) { - hns3_err(hw, "Failed to allocate %" PRIx64 " bytes needed " + hns3_err(hw, "Failed to allocate 0x%" PRIx64 " bytes needed " "to store statistics values", len); return -ENOMEM; } @@ -1347,7 +1347,7 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids, for (i = 0; i < size; i++) { if (ids[i] >= cnt_stats) { - hns3_err(hw, "ids[%u] (%" PRIx64 ") is invalid, " + hns3_err(hw, "ids[%u] (%" PRIu64 ") is invalid, " "should < %u", i, ids[i], cnt_stats); rte_free(values_copy); return -EINVAL; @@ -1365,12 +1365,12 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids, * * @param dev * Pointer to Ethernet device. + * @param ids + * IDs array given by app to retrieve specific statistics * @param xstats_names * An rte_eth_xstat_name array of at least *size* elements to * be filled. If set to NULL, the function returns the required number * of elements. - * @param ids - * IDs array given by app to retrieve specific statistics * @param size * The size of the xstats_names array (number of elements). * @return @@ -1383,8 +1383,9 @@ hns3_dev_xstats_get_by_id(struct rte_eth_dev *dev, const uint64_t *ids, */ int hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev, + const uint64_t *ids, struct rte_eth_xstat_name *xstats_names, - const uint64_t *ids, uint32_t size) + uint32_t size) { const uint32_t cnt_stats = hns3_xstats_calc_num(dev); struct hns3_adapter *hns = dev->data->dev_private; @@ -1406,7 +1407,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev, len = cnt_stats * sizeof(struct rte_eth_xstat_name); names_copy = rte_zmalloc("hns3_xstats_names", len, 0); if (names_copy == NULL) { - hns3_err(hw, "Failed to allocate %" PRIx64 " bytes needed " + hns3_err(hw, "Failed to allocate 0x%" PRIx64 " bytes needed " "to store statistics names", len); return -ENOMEM; } @@ -1415,7 +1416,7 @@ hns3_dev_xstats_get_names_by_id(struct rte_eth_dev *dev, for (i = 0; i < size; i++) { if (ids[i] >= cnt_stats) { - hns3_err(hw, "ids[%u] (%" PRIx64 ") is invalid, " + hns3_err(hw, "ids[%u] (%" PRIu64 ") is invalid, " "should < %u", i, ids[i], cnt_stats); rte_free(names_copy); return -EINVAL;