Skip to content

Commit e8c8276

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5e: kTLS, Add stats for number of deleted kTLS TX offloaded connections
Expose ethtool SW counter for the number of kTLS device-offloaded TX connections that are finished and deleted. Signed-off-by: Tariq Toukan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 5bd8cee commit e8c8276

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ void mlx5e_ktls_del_tx(struct net_device *netdev, struct tls_context *tls_ctx)
138138
priv = netdev_priv(netdev);
139139
mdev = priv->mdev;
140140

141+
atomic64_inc(&priv_tx->sw_stats->tx_tls_del);
141142
mlx5e_destroy_tis(mdev, priv_tx->tisn);
142143
mlx5_ktls_destroy_key(mdev, priv_tx->key_id);
143144
kfree(priv_tx);

drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
struct mlx5e_tls_sw_stats {
4444
atomic64_t tx_tls_ctx;
45+
atomic64_t tx_tls_del;
4546
atomic64_t tx_tls_drop_metadata;
4647
atomic64_t tx_tls_drop_resync_alloc;
4748
atomic64_t tx_tls_drop_no_sync_data;

drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_stats.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ static const struct counter_desc mlx5e_tls_sw_stats_desc[] = {
4747

4848
static const struct counter_desc mlx5e_ktls_sw_stats_desc[] = {
4949
{ MLX5E_DECLARE_STAT(struct mlx5e_tls_sw_stats, tx_tls_ctx) },
50+
{ MLX5E_DECLARE_STAT(struct mlx5e_tls_sw_stats, tx_tls_del) },
5051
{ MLX5E_DECLARE_STAT(struct mlx5e_tls_sw_stats, rx_tls_ctx) },
5152
{ MLX5E_DECLARE_STAT(struct mlx5e_tls_sw_stats, rx_tls_del) },
5253
};

0 commit comments

Comments
 (0)