numam-dpdk/drivers/net/axgbe
Chengwen Feng 93041fd514 net/axgbe: fix xstats get return if xstats is null
Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0)
to retrieve the required number of elements, but currently axgbe 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: 9d1ef6b2e7 ("net/axgbe: add xstats")
Cc: stable@dpdk.org

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-05-20 16:45:48 +02:00
..
axgbe_common.h net/axgbe: support Yellow Carp device 2022-02-03 12:54:50 +01:00
axgbe_dev.c fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
axgbe_ethdev.c net/axgbe: fix xstats get return if xstats is null 2022-05-20 16:45:48 +02:00
axgbe_ethdev.h fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
axgbe_i2c.c net/axgbe: fix unreleased lock in I2C transfer 2021-09-08 15:27:02 +02:00
axgbe_logs.h net/axgbe: add minimal init and uninit support 2018-04-14 00:41:44 +02:00
axgbe_mdio.c net/axgbe: attempt always link training in KR mode 2022-01-27 15:29:23 +01:00
axgbe_phy_impl.c net/axgbe: alter port speed bit range 2022-01-27 15:29:24 +01:00
axgbe_phy.h net/axgbe: add phy register map and helper macros 2018-04-14 00:41:44 +02:00
axgbe_regs.h net/axgbe: support registers dump 2020-03-18 10:21:41 +01:00
axgbe_rxtx_vec_sse.c fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
axgbe_rxtx.c remove unnecessary null checks 2022-02-12 12:07:48 +01:00
axgbe_rxtx.h ethdev: change queue release callback 2021-10-06 19:16:03 +02:00
meson.build drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
version.map version: 21.11-rc0 2021-08-17 08:37:52 +02:00