numam-dpdk/drivers
Geoffrey Le Gourriérec eadc35df59 net/mlx5: fix statistics read on Linux
This patch encompasses a few fixes carried by a previous patch
that aimed to support bonding device stats counting.

- If mlx5_os_read_dev_stat fails, it returns 1 instead of a
  negative value, causing mlx5_xstats_get to return an invalid
  number of counters. Since this error is not blocking, do not
  mess ret value with mlx5_os_read_dev_stat returned value.

  This allows avoiding the very annoying log:
  "n_xstats != n_xstats_names => skipping"

- Invert the check for mlx5_os_read_dev_stat(), currently leading
  us to store the result if the function failed, and use a
  backup value if it succeeded, which is the opposite of what we
  actually want. Revert to the original (correct) test.

- Add missing test on _mlx5_os_read_dev_counters() to prevent
  using trash stats values.

Fixes: 7ed15acdcd ("net/mlx5: improve xstats of bonding port")
Cc: stable@dpdk.org

Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
Signed-off-by: Geoffrey Le Gourriérec <geoffrey.le_gourrierec@6wind.com>
Tested-by: Bassam Zaid AlKilani <bzalkilani@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2022-06-02 17:01:11 +02:00
..
baseband baseband/fpga_5gnr_fec: remove filler from HARQ 2022-06-01 16:26:36 +02:00
bus dma/dpaa2: introduce driver skeleton 2022-06-01 08:58:27 +02:00
common common/sfc_efx/base: manage VNIC MAC address by MCDI handle 2022-05-31 18:50:00 +02:00
compress compress/octeontx: support OCTEON TX2 SoC family 2022-04-29 11:36:46 +02:00
crypto cryptodev: move RSA padding into separate struct 2022-06-02 12:04:11 +02:00
dma dma/dpaa2: support statistics 2022-06-01 08:58:27 +02:00
event common/cnxk: support CNF950_A0 2022-06-01 22:30:32 +02:00
gpu gpu/cuda: unmap GPU memory while freeing 2022-05-24 23:09:49 +02:00
mempool common/cnxk: support CNF950_A0 2022-06-01 22:30:32 +02:00
net net/mlx5: fix statistics read on Linux 2022-06-02 17:01:11 +02:00
raw raw/dpaa2_qdma: remove driver 2022-06-01 08:58:27 +02:00
regex remove extra blank line at EOF 2022-02-27 21:26:06 +01:00
vdpa vdpa/ifc/base: access block device registers 2022-06-01 11:50:10 +02:00
meson.build app/testpmd: register driver specific commands 2022-05-31 17:09:12 +02:00