summaryrefslogtreecommitdiffstats
path: root/include/net/tls.h
diff options
context:
space:
mode:
authorJakub Kicinski2019-04-25 21:32:04 +0200
committerDavid S. Miller2019-04-27 22:52:21 +0200
commit63a1c95f3fe48b4e9fe0c261b376e5e527b71b25 (patch)
treeab34b48256309a918c45e6dfa87112a2926e0cd1 /include/net/tls.h
parentnet/tls: move definition of tls ops into net/tls.h (diff)
downloadkernel-qcow2-linux-63a1c95f3fe48b4e9fe0c261b376e5e527b71b25.tar.gz
kernel-qcow2-linux-63a1c95f3fe48b4e9fe0c261b376e5e527b71b25.tar.xz
kernel-qcow2-linux-63a1c95f3fe48b4e9fe0c261b376e5e527b71b25.zip
net/tls: byte swap device req TCP seq no upon setting
To avoid a sparse warning byteswap the be32 sequence number before it's stored in the atomic value. While at it drop unnecessary brackets and use kernel's u64 type. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tls.h')
-rw-r--r--include/net/tls.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/tls.h b/include/net/tls.h
index 41a2ee643fc5..39ea62f0c1f6 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -562,7 +562,7 @@ static inline void tls_offload_rx_resync_request(struct sock *sk, __be32 seq)
struct tls_context *tls_ctx = tls_get_ctx(sk);
struct tls_offload_context_rx *rx_ctx = tls_offload_ctx_rx(tls_ctx);
- atomic64_set(&rx_ctx->resync_req, ((((uint64_t)seq) << 32) | 1));
+ atomic64_set(&rx_ctx->resync_req, ((u64)ntohl(seq) << 32) | 1);
}