]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: kTLS, Fix TCP seq off-by-1 issue in TX resync flow
authorTariq Toukan <tariqt@mellanox.com>
Thu, 20 Feb 2020 11:40:24 +0000 (13:40 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 5 Mar 2020 23:13:36 +0000 (15:13 -0800)
commit36607e67d4cec1edfc43f4aa47707d02815d48f4
tree28eb3b6d750978474b829f87b8054f9932eb7b0d
parentc70ad8189a5d291b98257f1c589e22e6c2c15750
net/mlx5e: kTLS, Fix TCP seq off-by-1 issue in TX resync flow

We have an off-by-1 issue in the TCP seq comparison.
The last sequence number that belongs to the TCP packet's payload
is not "start_seq + len", but one byte before it.
Fix it so the 'ends_before' is evaluated properly.

This fixes a bug that results in error completions in the
kTLS HW offload flows.

Fixes: f77269e1176f ("net/mlx5e: kTLS, Fix corner-case checks in TX resync flow")
Signed-off-by: Tariq Toukan <tariqt@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