diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-04-25 21:32:04 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-04-27 22:52:21 +0200 |
commit | 63a1c95f3fe48b4e9fe0c261b376e5e527b71b25 (patch) | |
tree | ab34b48256309a918c45e6dfa87112a2926e0cd1 /net/tls | |
parent | net/tls: move definition of tls ops into net/tls.h (diff) | |
download | linux-63a1c95f3fe48b4e9fe0c261b376e5e527b71b25.tar.xz 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 'net/tls')
-rw-r--r-- | net/tls/tls_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index 79475b102cca..26f26e71ef3f 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -567,7 +567,7 @@ void handle_device_resync(struct sock *sk, u32 seq, u64 rcd_sn) rx_ctx = tls_offload_ctx_rx(tls_ctx); resync_req = atomic64_read(&rx_ctx->resync_req); - req_seq = ntohl(resync_req >> 32) - ((u32)TLS_HEADER_SIZE - 1); + req_seq = (resync_req >> 32) - ((u32)TLS_HEADER_SIZE - 1); is_req_pending = resync_req; if (unlikely(is_req_pending) && req_seq == seq && |