numam-dpdk/drivers/net/mvpp2
Chengwen Feng d853d24b27 net/mvpp2: 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 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: a77b5378cd ("net/mrvl: add extended statistics")
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:46 +02:00
..
meson.build drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
mrvl_ethdev.c net/mvpp2: fix xstats get return if xstats is null 2022-05-20 16:45:46 +02:00
mrvl_ethdev.h net: add macro for VLAN header length 2021-11-17 20:17:04 +01:00
mrvl_flow.c net: add macro for MAC address print 2021-09-07 19:07:46 +02:00
mrvl_flow.h net/mvpp2: add init and deinit to flow 2018-09-28 01:41:03 +02:00
mrvl_mtr.c net/mvpp2: check meter packet mode 2021-04-13 18:40:58 +02:00
mrvl_mtr.h net/mvpp2: support metering 2018-09-28 01:41:03 +02:00
mrvl_qos.c remove unnecessary null checks 2022-02-12 12:07:48 +01:00
mrvl_qos.h net/mvpp2: add fill buffs to configuration file 2021-01-29 18:16:11 +01:00
mrvl_tm.c net/mvpp2: fix configured state dependency 2021-07-12 10:31:21 +02:00
mrvl_tm.h net/mvpp2: support traffic manager 2018-09-28 01:41:03 +02:00
version.map version: 21.11-rc0 2021-08-17 08:37:52 +02:00