net/mlx5e: Use ethtool_sprintf/puts() to fill stats strings
authorGal Pressman <gal@nvidia.com>
Tue, 2 Apr 2024 13:30:35 +0000 (16:30 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 4 Apr 2024 02:47:58 +0000 (19:47 -0700)
commit89b34322d29381c916933f4728be7cfd08271442
treefebe06f78d497a52ab40e9e7d62bdb543729d6b7
parent9ac9299d41f6b67c9b99f1522824572e50a292f8
net/mlx5e: Use ethtool_sprintf/puts() to fill stats strings

Use ethtool_sprintf/puts() helper functions which handle the common
pattern of printing a string into the ethtool strings interface and
incrementing the string pointer by ETH_GSTRING_LEN.

Change the fill_strings callback to accept a **data pointer, and remove
the index and return value.

Signed-off-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240402133043.56322-4-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.h
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h