rx_ctx = tls_offload_ctx_rx(tls_ctx);
resync_req = atomic64_read(&rx_ctx->resync_req);
- req_seq = (resync_req >> 32) - ((u32)TLS_HEADER_SIZE - 1);
+ req_seq = resync_req >> 32;
+ seq += TLS_HEADER_SIZE - 1;
is_req_pending = resync_req;
if (unlikely(is_req_pending) && req_seq == seq &&
- atomic64_try_cmpxchg(&rx_ctx->resync_req, &resync_req, 0)) {
- seq += TLS_HEADER_SIZE - 1;
+ atomic64_try_cmpxchg(&rx_ctx->resync_req, &resync_req, 0))
tls_device_resync_rx(tls_ctx, sk, seq, rcd_sn);
- }
}
static int tls_device_reencrypt(struct sock *sk, struct sk_buff *skb)