[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251114185344.6d355ea6@kernel.org>
Date: Fri, 14 Nov 2025 18:53:44 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Tariq Toukan <tariqt@...dia.com>
Cc: Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky
<leon@...nel.org>, Mark Bloch <mbloch@...dia.com>, "Alexei Starovoitov"
<ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, "Jesper Dangaard
Brouer" <hawk@...nel.org>, John Fastabend <john.fastabend@...il.com>,
<netdev@...r.kernel.org>, <linux-rdma@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <bpf@...r.kernel.org>, Gal Pressman
<gal@...dia.com>, Leon Romanovsky <leonro@...dia.com>, Moshe Shemesh
<moshe@...dia.com>, William Tu <witu@...dia.com>, Dragos Tatulea
<dtatulea@...dia.com>, Nimrod Oren <noren@...dia.com>, Alex Lazar
<alazar@...dia.com>
Subject: Re: [PATCH net-next 2/6] net/mlx5e: Use regular ICOSQ for
triggering NAPI
On Wed, 12 Nov 2025 11:29:05 +0200 Tariq Toukan wrote:
> +static inline enum mlx5e_lock_type
> +mlx5e_icosq_sync_lock(struct mlx5e_icosq *sq)
> +{
> + if (!test_bit(MLX5E_SQ_STATE_LOCK_NEEDED, &sq->state))
> + return MLX5E_LOCK_TYPE_NONE;
> +
> + if (in_softirq()) {
> + spin_lock(&sq->lock);
> + return MLX5E_LOCK_TYPE_SOFTIRQ;
> + }
> +
> + spin_lock_bh(&sq->lock);
> + return MLX5E_LOCK_TYPE_BH;
> +}
Conditional locking complicates code a lot. Very odd to see it in
a series which is about improving performance of the control path.
Could you please provide some data to justify this construct?
The in_softirq() optimization is a hard no, pretty sure core
maintainers complained about drivers containing context-conditional
code in the past.
The rest LGTM, FWIW I think the XDP redir behavior changes is fine.
--
pw-bot: cr
Powered by blists - more mailing lists