From: Michal Krawczyk Date: Fri, 30 Oct 2020 11:31:16 +0000 (+0100) Subject: net/ena: fix getting xstats global stats offset X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=493107fd83a2848025dd42db67764bb0dc7943e0;p=dpdk.git net/ena: fix getting xstats global stats offset There was a bug in a code, which was reading stat_offset value from the ena_stats_rx_strings array instead of ena_stats_global_strings. It wasn't causing real problems just because ena_stats_rx_strings was not smaller than ena_stats_global_strings and both arrays hold the same offsets. Fixes: 7830e905b7c9 ("net/ena: expose extended stats") Cc: stable@dpdk.org Signed-off-by: Michal Krawczyk Reviewed-by: Igor Chauskin Reviewed-by: Guy Tzalik --- diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index c513faf202..7ab9b93ba9 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -2724,7 +2724,7 @@ static int ena_xstats_get(struct rte_eth_dev *dev, return 0; for (stat = 0; stat < ENA_STATS_ARRAY_GLOBAL; stat++, count++) { - stat_offset = ena_stats_rx_strings[stat].stat_offset; + stat_offset = ena_stats_global_strings[stat].stat_offset; stats_begin = &adapter->dev_stats; xstats[count].id = count;