numam-dpdk/drivers/net/mlx5/linux
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
..
meson.build remove extra blank line at EOF 2022-02-27 21:26:06 +01:00
mlx5_ethdev_os.c net/mlx5: fix statistics read on Linux 2022-06-02 17:01:11 +02:00
mlx5_flow_os.c net/mlx5: fix errno update in shared context creation 2022-02-21 11:36:40 +01:00
mlx5_flow_os.h net/mlx5: introduce hardware steering operation 2022-02-24 22:10:15 +01:00
mlx5_mp_os.c ethdev: introduce generic dummy packet burst function 2022-02-11 21:17:34 +01:00
mlx5_os.c net/mlx5: fix probing with secondary bonding member 2022-04-21 12:47:39 +02:00
mlx5_os.h net/mlx5: fix tunneling support query 2021-10-12 15:29:34 +02:00
mlx5_socket.c net/mlx5: do not close stdin on error 2021-11-01 08:51:48 +01:00
mlx5_verbs.c net/mlx5: fix Tx recovery 2022-06-01 09:49:42 +02:00
mlx5_verbs.h common/mlx5: add global MR cache create function 2021-10-21 15:57:24 +02:00
mlx5_vlan_os.c common/mlx5: add Netlink event helpers 2022-03-01 16:54:03 +01:00