Skip to content

Commit 0419d8c

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
net/mlx5e: kTLS, Add kTLS RX resync support
Implement the RX resync procedure, using the TLS async resync API. The HW offload of TLS decryption in RX side might get out-of-sync due to out-of-order reception of packets. This requires SW intervention to update the HW context and get it back in-sync. Performance: CPU: Intel(R) Xeon(R) CPU E5-2687W v4 @ 3.00GHz, 24 cores, HT off NIC: ConnectX-6 Dx 100GbE dual port Goodput (app-layer throughput) comparison: +---------------+-------+-------+---------+ | # connections | 1 | 4 | 8 | +---------------+-------+-------+---------+ | SW (Gbps) | 7.26 | 24.70 | 50.30 | +---------------+-------+-------+---------+ | HW (Gbps) | 18.50 | 64.30 | 92.90 | +---------------+-------+-------+---------+ | Speedup | 2.55x | 2.56x | 1.85x * | +---------------+-------+-------+---------+ * After linerate is reached, diff is observed in CPU util. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
1 parent ed9b764 commit 0419d8c

File tree

8 files changed

+381
-7
lines changed

8 files changed

+381
-7
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ enum mlx5e_icosq_wqe_type {
1414
#ifdef CONFIG_MLX5_EN_TLS
1515
MLX5E_ICOSQ_WQE_UMR_TLS,
1616
MLX5E_ICOSQ_WQE_SET_PSV_TLS,
17+
MLX5E_ICOSQ_WQE_GET_PSV_TLS,
1718
#endif
1819
};
1920

@@ -122,6 +123,9 @@ struct mlx5e_icosq_wqe_info {
122123
struct {
123124
struct mlx5e_ktls_offload_context_rx *priv_rx;
124125
} tls_set_params;
126+
struct {
127+
struct mlx5e_ktls_rx_resync_buf *buf;
128+
} tls_get_params;
125129
#endif
126130
};
127131
};

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ static int mlx5e_ktls_resync(struct net_device *netdev,
4040
struct sock *sk, u32 seq, u8 *rcd_sn,
4141
enum tls_offload_ctx_dir direction)
4242
{
43-
return -EOPNOTSUPP;
43+
if (unlikely(direction != TLS_OFFLOAD_CTX_DIR_RX))
44+
return -EOPNOTSUPP;
45+
46+
mlx5e_ktls_rx_resync(netdev, sk, seq, rcd_sn);
47+
return 0;
4448
}
4549

4650
static const struct tlsdev_ops mlx5e_ktls_ops = {

0 commit comments

Comments
 (0)