net/mlx5e: TLS, Do not expose FPGA TLS counter if not supported
authorTariq Toukan <tariqt@mellanox.com>
Sun, 28 Jun 2020 10:06:06 +0000 (13:06 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Sep 2020 16:05:25 +0000 (18:05 +0200)
commit6229623f54cb75a0472fff673649be3bbacf0c03
tree7537310a7cab2f2ebab21136e224c4f8dd35c1ea
parent46ef5581c432a0ba4c69e1ee593174509a9fdec1
net/mlx5e: TLS, Do not expose FPGA TLS counter if not supported

[ Upstream commit 8f0bcd19b1da3f264223abea985b9462e85a3718 ]

The set of TLS TX global SW counters in mlx5e_tls_sw_stats_desc
is updated from all rings by using atomic ops.
This set of stats is used only in the FPGA TLS use case, not in
the Connect-X TLS one, where regular per-ring counters are used.

Do not expose them in the Connect-X use case, as this would cause
counter duplication. For example, tx_tls_drop_no_sync_data would
appear twice in the ethtool stats.

Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_stats.c