The ethdev API has processed the failure to obtain
xstats statistics. Therefore, driver should return
an error code instead of 0 in 'hns3_dev_xstats_get'
API.
Fixes:
8839c5e202f3 ("net/hns3: support device stats")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
if (!hns->is_vf) {
/* Update Mac stats */
ret = hns3_query_update_mac_stats(dev);
- if (ret) {
+ if (ret < 0) {
hns3_err(hw, "Update Mac stats fail : %d", ret);
- return 0;
+ return ret;
}
/* Get MAC stats from hw->hw_xstats.mac_stats struct */