]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: kTLS, Do not send decrypted-marked SKBs via non-accel path
authorTariq Toukan <tariqt@mellanox.com>
Mon, 20 Jan 2020 11:42:00 +0000 (13:42 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 24 Jan 2020 20:04:40 +0000 (12:04 -0800)
commit9e9164f3641144965b6048ad8897dca57d87ae5e
tree6b4cb55cb0af4235c069588e10a324870bd41889
parent01d80b2acbee52abdcf712ff539c8ea5723e6d23
net/mlx5e: kTLS, Do not send decrypted-marked SKBs via non-accel path

When TCP out-of-order is identified (unexpected tcp seq mismatch), driver
analyzes the packet and decides what handling should it get:
1. go to accelerated path (to be encrypted in HW),
2. go to regular xmit path (send w/o encryption),
3. drop.

Packets marked with skb->decrypted by the TLS stack in the TX flow skips
SW encryption, and rely on the HW offload.
Verify that such packets are never sent un-encrypted on the wire.
Add a WARN to catch such bugs, and prefer dropping the packet in these cases.

Fixes: 9da8839f578f ("net/mlx5e: kTLS, Enhance TX resync flow")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Reviewed-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c