mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
net: tls: Change async resync helpers argument
[ Upstream commit 34892cfec0 ]
Update tls_offload_rx_resync_async_request_start() and
tls_offload_rx_resync_async_request_end() to get a struct
tls_offload_resync_async parameter directly, rather than
extracting it from struct sock.
This change aligns the function signatures with the upcoming
tls_offload_rx_resync_async_request_cancel() helper, which
will be introduced in a subsequent patch.
Signed-off-by: Shahar Shitrit <shshitrit@nvidia.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1761508983-937977-2-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
baeb52ced7
commit
732a71a923
@@ -425,12 +425,14 @@ void mlx5e_ktls_handle_get_psv_completion(struct mlx5e_icosq_wqe_info *wi,
|
||||
{
|
||||
struct mlx5e_ktls_rx_resync_buf *buf = wi->tls_get_params.buf;
|
||||
struct mlx5e_ktls_offload_context_rx *priv_rx;
|
||||
struct tls_offload_context_rx *rx_ctx;
|
||||
u8 tracker_state, auth_state, *ctx;
|
||||
struct device *dev;
|
||||
u32 hw_seq;
|
||||
|
||||
priv_rx = buf->priv_rx;
|
||||
dev = mlx5_core_dma_dev(sq->channel->mdev);
|
||||
rx_ctx = tls_offload_ctx_rx(tls_get_ctx(priv_rx->sk));
|
||||
if (unlikely(test_bit(MLX5E_PRIV_RX_FLAG_DELETING, priv_rx->flags)))
|
||||
goto out;
|
||||
|
||||
@@ -447,7 +449,8 @@ void mlx5e_ktls_handle_get_psv_completion(struct mlx5e_icosq_wqe_info *wi,
|
||||
}
|
||||
|
||||
hw_seq = MLX5_GET(tls_progress_params, ctx, hw_resync_tcp_sn);
|
||||
tls_offload_rx_resync_async_request_end(priv_rx->sk, cpu_to_be32(hw_seq));
|
||||
tls_offload_rx_resync_async_request_end(rx_ctx->resync_async,
|
||||
cpu_to_be32(hw_seq));
|
||||
priv_rx->rq_stats->tls_resync_req_end++;
|
||||
out:
|
||||
mlx5e_ktls_priv_rx_put(priv_rx);
|
||||
@@ -482,6 +485,7 @@ static bool resync_queue_get_psv(struct sock *sk)
|
||||
static void resync_update_sn(struct mlx5e_rq *rq, struct sk_buff *skb)
|
||||
{
|
||||
struct ethhdr *eth = (struct ethhdr *)(skb->data);
|
||||
struct tls_offload_resync_async *resync_async;
|
||||
struct net_device *netdev = rq->netdev;
|
||||
struct net *net = dev_net(netdev);
|
||||
struct sock *sk = NULL;
|
||||
@@ -528,7 +532,8 @@ static void resync_update_sn(struct mlx5e_rq *rq, struct sk_buff *skb)
|
||||
|
||||
seq = th->seq;
|
||||
datalen = skb->len - depth;
|
||||
tls_offload_rx_resync_async_request_start(sk, seq, datalen);
|
||||
resync_async = tls_offload_ctx_rx(tls_get_ctx(sk))->resync_async;
|
||||
tls_offload_rx_resync_async_request_start(resync_async, seq, datalen);
|
||||
rq->stats->tls_resync_req_start++;
|
||||
|
||||
unref:
|
||||
|
||||
@@ -451,25 +451,20 @@ static inline void tls_offload_rx_resync_request(struct sock *sk, __be32 seq)
|
||||
|
||||
/* Log all TLS record header TCP sequences in [seq, seq+len] */
|
||||
static inline void
|
||||
tls_offload_rx_resync_async_request_start(struct sock *sk, __be32 seq, u16 len)
|
||||
tls_offload_rx_resync_async_request_start(struct tls_offload_resync_async *resync_async,
|
||||
__be32 seq, u16 len)
|
||||
{
|
||||
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_async->req, ((u64)ntohl(seq) << 32) |
|
||||
atomic64_set(&resync_async->req, ((u64)ntohl(seq) << 32) |
|
||||
((u64)len << 16) | RESYNC_REQ | RESYNC_REQ_ASYNC);
|
||||
rx_ctx->resync_async->loglen = 0;
|
||||
rx_ctx->resync_async->rcd_delta = 0;
|
||||
resync_async->loglen = 0;
|
||||
resync_async->rcd_delta = 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
tls_offload_rx_resync_async_request_end(struct sock *sk, __be32 seq)
|
||||
tls_offload_rx_resync_async_request_end(struct tls_offload_resync_async *resync_async,
|
||||
__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_async->req,
|
||||
((u64)ntohl(seq) << 32) | RESYNC_REQ);
|
||||
atomic64_set(&resync_async->req, ((u64)ntohl(seq) << 32) | RESYNC_REQ);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
Reference in New Issue
Block a user