net/atlantic: fix xstats return

Max number of xstats items was returned instead of actual number
of filled in records.

Fixes: fbe059e87209 ("net/atlantic: implement device statistics")
Cc: stable@dpdk.org

Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
This commit is contained in:
Igor Russkikh 2019-03-12 15:25:10 +00:00 committed by Ferruh Yigit
parent ebf751d6a7
commit 5ab51dbfd4

View File

@ -758,7 +758,7 @@ atl_dev_xstats_get_names(struct rte_eth_dev *dev __rte_unused,
snprintf(xstats_names[i].name, RTE_ETH_XSTATS_NAME_SIZE, "%s",
atl_xstats_tbl[i].name);
return size;
return i;
}
static int
@ -778,7 +778,7 @@ atl_dev_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
atl_xstats_tbl[i].offset);
}
return n;
return i;
}
static int