[PATCH] net/mlx5: fix linux stats gathering function
Raslan Darawsheh
rasland at nvidia.com
Sun Jun 5 17:05:49 CEST 2022
Hi,
> -----Original Message-----
> From: Geoffrey Le Gourriérec <geoffrey.le_gourrierec at 6wind.com>
> Sent: Thursday, March 17, 2022 3:24 PM
> To: dev at dpdk.org
> Cc: Didier Pallard <didier.pallard at 6wind.com>; Matan Azrad
> <matan at nvidia.com>; Slava Ovsiienko <viacheslavo at nvidia.com>
> Subject: [PATCH] net/mlx5: fix linux stats gathering function
>
> 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: 7ed15acdcd69 ("net/mlx5: improve xstats of bonding port")
> Signed-off-by: Didier Pallard <didier.pallard at 6wind.com>
> Signed-off-by: Geoffrey Le Gourriérec
> <geoffrey.le_gourrierec at 6wind.com>
> ---
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
More information about the dev
mailing list