Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/ipn3ke: fix xstats get return if xstats is null
[ upstream commit e17cb41 ] Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0) to retrieve the required number of elements, but currently ipn3ke PMD returns zero when xstats is null. Dedicated check for xstats vs null is not required, since ethdev layer guarantees that it may be null only if number of entries n is 0 (which is definitely smaller than total xstats count). Fixes: 5a6d883 ("net/ipn3ke: implement 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