net/mlx5e: Unify checks of TLS offloads
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Fri, 3 Jan 2020 14:17:30 +0000 (16:17 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Sat, 9 May 2020 08:05:39 +0000 (01:05 -0700)
commit7f8546f3f041d6b1cce270581517217867764077
tree94ee52dd511bc82ae4ffcdd8397e4edf97c53b90
parentf02bac9ad6415e40bf32bf84ce5832698ebe5d15
net/mlx5e: Unify checks of TLS offloads

Both INNOVA and ConnectX TLS offloads perform the same checks in the
beginning. Unify them to reduce repeating code. Do WARN_ON_ONCE on
netdev mismatch and finish with an error in both offloads, not only in
the ConnectX one.

Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.h
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c