aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDirk van der Merwe <dirk.vandermerwe@netronome.com>2019-07-08 19:53:13 -0700
committerDavid S. Miller <davem@davemloft.net>2019-07-08 20:21:09 -0700
commitb5d9a834f4fd1b6abfa527ec351c871084dd23a3 (patch)
treec000cc90aec8e553040f920c62f64e530cf6de6b /include
parentnfp: tls: count TSO segments separately for the TLS offload (diff)
downloadlinux-dev-b5d9a834f4fd1b6abfa527ec351c871084dd23a3.tar.xz
linux-dev-b5d9a834f4fd1b6abfa527ec351c871084dd23a3.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/net/tls.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/tls.h b/include/net/tls.h
index 176d0b039f32..584609174fe0 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -304,9 +304,9 @@ struct tlsdev_ops {
void (*tls_dev_del)(struct net_device *netdev,
struct tls_context *ctx,
enum tls_offload_ctx_dir direction);
- void (*tls_dev_resync)(struct net_device *netdev,
- struct sock *sk, u32 seq, u8 *rcd_sn,
- enum tls_offload_ctx_dir direction);
+ int (*tls_dev_resync)(struct net_device *netdev,
+ struct sock *sk, u32 seq, u8 *rcd_sn,
+ enum tls_offload_ctx_dir direction);
};
enum tls_offload_sync_type {