Re: [PATCH mlx5-next 4/5] net/mlx5: Remove tls vs. ktls separation as it is the same

From: Saeed Mahameed
Date: Mon Apr 04 2022 - 21:24:51 EST


On 04 Apr 15:08, Leon Romanovsky wrote:
From: Leon Romanovsky <leonro@xxxxxxxxxx>

After removal FPGA TLS, we can remove tls->ktls indirection too,
as it is the same thing.

Reviewed-by: Tariq Toukan <tariqt@xxxxxxxxxx>
Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>
---
.../net/ethernet/mellanox/mlx5/core/Makefile | 2 +-
.../ethernet/mellanox/mlx5/core/en/params.c | 2 +-
.../mellanox/mlx5/core/en_accel/en_accel.h | 11 +--
.../mellanox/mlx5/core/en_accel/ktls.c | 22 ++++-
.../mellanox/mlx5/core/en_accel/ktls.h | 32 +++++++
.../mellanox/mlx5/core/en_accel/ktls_rx.c | 2 +-
.../en_accel/{tls_stats.c => ktls_stats.c} | 38 ++++-----
.../mellanox/mlx5/core/en_accel/ktls_tx.c | 18 +++-
.../mellanox/mlx5/core/en_accel/ktls_txrx.h | 28 +++++-
.../mellanox/mlx5/core/en_accel/tls.c | 70 ---------------
.../mellanox/mlx5/core/en_accel/tls.h | 85 -------------------
.../mellanox/mlx5/core/en_accel/tls_rxtx.c | 70 ---------------
.../mellanox/mlx5/core/en_accel/tls_rxtx.h | 85 -------------------
.../net/ethernet/mellanox/mlx5/core/en_main.c | 8 +-
.../net/ethernet/mellanox/mlx5/core/en_rx.c | 5 +-
.../ethernet/mellanox/mlx5/core/en_stats.c | 8 +-
16 files changed, 130 insertions(+), 356 deletions(-)
rename drivers/net/ethernet/mellanox/mlx5/core/en_accel/{tls_stats.c => ktls_stats.c} (76%)

Why not ktls_*.c => tls_*.c ?
Since we now have one TLS implementation, it would've been easier to maybe
repurpose TLS to be KTLS only and avoid renaming every TLS to KTLS in all
functions and files.

So just keep tls.c and all mlx5_tls_xyz functions and implement ktls
directly in them, the renaming will be done only on the ktls implementation
part of the code rather than in every caller.

delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.h
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c
delete mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.h