mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
net/mlx5e: Let kTLS RX get async ICOSQ param in napi poll
Do not pass channel just to extract the async ICOSQ. It's already extracted, pass it. Re-order the checks in mlx5e_ktls_rx_pending_resync_list to optimize the common flow. Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Link: https://patch.msgid.link/20260514111038.338251-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
cc199cd1b9
commit
425d0e2df5
|
|
@ -744,17 +744,14 @@ void mlx5e_ktls_del_rx(struct net_device *netdev, struct tls_context *tls_ctx)
|
|||
mlx5e_ktls_priv_rx_put(priv_rx);
|
||||
}
|
||||
|
||||
bool mlx5e_ktls_rx_handle_resync_list(struct mlx5e_channel *c, int budget)
|
||||
bool mlx5e_ktls_rx_handle_resync_list(struct mlx5e_icosq *sq, int budget)
|
||||
{
|
||||
struct mlx5e_ktls_offload_context_rx *priv_rx, *tmp;
|
||||
struct mlx5e_ktls_resync_resp *ktls_resync;
|
||||
struct mlx5_wqe_ctrl_seg *db_cseg;
|
||||
struct mlx5e_icosq *sq;
|
||||
LIST_HEAD(local_list);
|
||||
int i, j;
|
||||
|
||||
sq = c->async_icosq;
|
||||
|
||||
if (unlikely(!test_bit(MLX5E_SQ_STATE_ENABLED, &sq->state)))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,13 +45,13 @@ mlx5e_ktls_tx_try_handle_resync_dump_comp(struct mlx5e_txqsq *sq,
|
|||
return false;
|
||||
}
|
||||
|
||||
bool mlx5e_ktls_rx_handle_resync_list(struct mlx5e_channel *c, int budget);
|
||||
bool mlx5e_ktls_rx_handle_resync_list(struct mlx5e_icosq *sq, int budget);
|
||||
|
||||
static inline bool
|
||||
mlx5e_ktls_rx_pending_resync_list(struct mlx5e_channel *c, int budget)
|
||||
mlx5e_ktls_rx_pending_resync_list(struct mlx5e_icosq *sq, int budget)
|
||||
{
|
||||
return budget && test_bit(MLX5E_SQ_STATE_PENDING_TLS_RX_RESYNC,
|
||||
&c->async_icosq->state);
|
||||
return test_bit(MLX5E_SQ_STATE_PENDING_TLS_RX_RESYNC, &sq->state) &&
|
||||
budget;
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -70,13 +70,13 @@ mlx5e_ktls_tx_try_handle_resync_dump_comp(struct mlx5e_txqsq *sq,
|
|||
}
|
||||
|
||||
static inline bool
|
||||
mlx5e_ktls_rx_handle_resync_list(struct mlx5e_channel *c, int budget)
|
||||
mlx5e_ktls_rx_handle_resync_list(struct mlx5e_icosq *sq, int budget)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
mlx5e_ktls_rx_pending_resync_list(struct mlx5e_channel *c, int budget)
|
||||
mlx5e_ktls_rx_pending_resync_list(struct mlx5e_icosq *sq, int budget)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,8 +189,9 @@ int mlx5e_napi_poll(struct napi_struct *napi, int budget)
|
|||
&aicosq->state);
|
||||
|
||||
/* Keep after async ICOSQ CQ poll */
|
||||
if (unlikely(mlx5e_ktls_rx_pending_resync_list(c, budget)))
|
||||
busy |= mlx5e_ktls_rx_handle_resync_list(c, budget);
|
||||
if (unlikely(mlx5e_ktls_rx_pending_resync_list(aicosq, budget)))
|
||||
busy |= mlx5e_ktls_rx_handle_resync_list(aicosq,
|
||||
budget);
|
||||
|
||||
if (xsk_open) {
|
||||
busy |= mlx5e_poll_xdpsq_cq(&xsksq->cq);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user