]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: kTLS, Use CHECKSUM_UNNECESSARY for device-offloaded packets
authorTariq Toukan <tariqt@nvidia.com>
Mon, 31 Jan 2022 08:26:19 +0000 (10:26 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 24 Feb 2022 00:08:16 +0000 (16:08 -0800)
commitf361621f01c86dc470ae220e69254ad04d375592
tree30608d80d284d3cf196b6e6b4c4bcc5a32f383e6
parent8aaf8c262696f08762bcfe02a43b79fe8dc20a40
net/mlx5e: kTLS, Use CHECKSUM_UNNECESSARY for device-offloaded packets

For RX TLS device-offloaded packets, the HW spec guarantees checksum
validation for the offloaded packets, but does not define whether the
CQE.checksum field matches the original packet (ciphertext) or
the decrypted one (plaintext). This latitude allows architetctural
improvements between generations of chips, resulting in different decisions
regarding the value type of CQE.checksum.

Hence, for these packets, the device driver should not make use of this CQE
field. Here we block CHECKSUM_COMPLETE usage for RX TLS device-offloaded
packets, and use CHECKSUM_UNNECESSARY instead.

Value of the packet's tcp_hdr.csum is not modified by the HW, and it always
matches the original ciphertext.

Fixes: c6ad9e0b50d4 ("net/mlx5e: kTLS, Add kTLS RX HW offload support")
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c