net/tls: don't clear TX resync flag on error
authorDirk van der Merwe <dirk.vandermerwe@netronome.com>
Tue, 9 Jul 2019 02:53:13 +0000 (19:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Jul 2019 03:21:09 +0000 (20:21 -0700)
commitb5d9a834f4fd1b6abfa527ec351c871084dd23a3
treec000cc90aec8e553040f920c62f64e530cf6de6b
parent427545b3046326cd7b4dbbd7869f08737df2ad2b
net/tls: don't clear TX resync flag on error

Introduce a return code for the tls_dev_resync callback.

When the driver TX resync fails, kernel can retry the resync again
until it succeeds.  This prevents drivers from attempting to offload
TLS packets if the connection is known to be out of sync.

We don't worry about the RX resync since they will be retried naturally
as more encrypted records get received.

Signed-off-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls.c
drivers/net/ethernet/netronome/nfp/crypto/tls.c
include/net/tls.h
net/tls/tls_device.c