Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/mvpp2: fix xstats get return if xstats is null
[ upstream commit d853d24 ] Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0) to retrieve the required number of elements, but currently mvpp2 PMD returns zero when xstats is null. Remove the logic of "return zero when xstats is NULL", and add the logic of "return the required number of entries when n is lower than the required number of entries". Fixes: a77b537 ("net/mrvl: add extended statistics") Signed-off-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
- Loading branch information