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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Apr 2020 07:08:40 +0000 (09:08 +0200)
commit4eb33cb9b56666ee59b291caab046588dd6b66eb
treee33020fb6b62b02e79b53735518de3e7ca01b284
parent8792e1ac5f48dc07da98ecaa8ee9e8abedec4549
net/mlx5e: kTLS, Fix TCP seq off-by-1 issue in TX resync flow

[ Upstream commit 56917766def72f5afdf4235adb91b6897ff26d9d ]

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: ffbd9ca94e2e ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c