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>
This commit is contained in:

committed by
David S. Miller

parent
da68b4ad02
commit
63a1c95f3f
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user