mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v3] net/mlx5: Simplify cpumask operations in comp_irq_request_sf()
@ 2026-06-05 10:17 Fushuai Wang
  2026-06-07 11:04 ` Tariq Toukan
  2026-06-09  2:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Fushuai Wang @ 2026-06-05 10:17 UTC (permalink / raw)
  To: saeedm, leon, tariqt, mbloch, andrew+netdev, davem, edumazet,
	kuba, pabeni
  Cc: shayd, netdev, linux-rdma, linux-kernel, wangfushuai

From: Fushuai Wang <wangfushuai@baidu.com>

Combine cpumask_copy() and cpumask_andnot() into a single
cpumask_andnot() since the function can take cpu_online_mask
directly as the source.

Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
---
v2->v3: Separate the patchset to two patches, no changes on this patch
v1->v2: No changes on this patch

previous discussion:
https://lore.kernel.org/all/20260603072657.10868-1-fushuai.wang@linux.dev/T/#u
https://lore.kernel.org/all/20260604125705.21241-1-fushuai.wang@linux.dev/T/#u

 drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
index 22a637111aa2..d11ec263d53c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
@@ -886,8 +886,7 @@ static int comp_irq_request_sf(struct mlx5_core_dev *dev, u16 vecidx)
 		return -ENOMEM;
 
 	af_desc->is_managed = false;
-	cpumask_copy(&af_desc->mask, cpu_online_mask);
-	cpumask_andnot(&af_desc->mask, &af_desc->mask, &table->used_cpus);
+	cpumask_andnot(&af_desc->mask, cpu_online_mask, &table->used_cpus);
 	irq = mlx5_irq_affinity_request(dev, pool, af_desc);
 	if (IS_ERR(irq)) {
 		kvfree(af_desc);
-- 
2.36.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v3] net/mlx5: Simplify cpumask operations in comp_irq_request_sf()
  2026-06-05 10:17 [PATCH net-next v3] net/mlx5: Simplify cpumask operations in comp_irq_request_sf() Fushuai Wang
@ 2026-06-07 11:04 ` Tariq Toukan
  2026-06-09  2:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Tariq Toukan @ 2026-06-07 11:04 UTC (permalink / raw)
  To: Fushuai Wang, saeedm, leon, tariqt, mbloch, andrew+netdev, davem,
	edumazet, kuba, pabeni
  Cc: shayd, netdev, linux-rdma, linux-kernel, wangfushuai



On 05/06/2026 13:17, Fushuai Wang wrote:
> From: Fushuai Wang <wangfushuai@baidu.com>
> 
> Combine cpumask_copy() and cpumask_andnot() into a single
> cpumask_andnot() since the function can take cpu_online_mask
> directly as the source.
> 
> Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
> Reviewed-by: Shay Drory <shayd@nvidia.com>
> ---
> v2->v3: Separate the patchset to two patches, no changes on this patch
> v1->v2: No changes on this patch
> 
> previous discussion:
> https://lore.kernel.org/all/20260603072657.10868-1-fushuai.wang@linux.dev/T/#u
> https://lore.kernel.org/all/20260604125705.21241-1-fushuai.wang@linux.dev/T/#u
> 
>   drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
> index 22a637111aa2..d11ec263d53c 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
> @@ -886,8 +886,7 @@ static int comp_irq_request_sf(struct mlx5_core_dev *dev, u16 vecidx)
>   		return -ENOMEM;
>   
>   	af_desc->is_managed = false;
> -	cpumask_copy(&af_desc->mask, cpu_online_mask);
> -	cpumask_andnot(&af_desc->mask, &af_desc->mask, &table->used_cpus);
> +	cpumask_andnot(&af_desc->mask, cpu_online_mask, &table->used_cpus);
>   	irq = mlx5_irq_affinity_request(dev, pool, af_desc);
>   	if (IS_ERR(irq)) {
>   		kvfree(af_desc);

Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

Thanks for your patch.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v3] net/mlx5: Simplify cpumask operations in comp_irq_request_sf()
  2026-06-05 10:17 [PATCH net-next v3] net/mlx5: Simplify cpumask operations in comp_irq_request_sf() Fushuai Wang
  2026-06-07 11:04 ` Tariq Toukan
@ 2026-06-09  2:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-06-09  2:00 UTC (permalink / raw)
  To: Fushuai Wang
  Cc: saeedm, leon, tariqt, mbloch, andrew+netdev, davem, edumazet,
	kuba, pabeni, shayd, netdev, linux-rdma, linux-kernel,
	wangfushuai

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri,  5 Jun 2026 18:17:56 +0800 you wrote:
> From: Fushuai Wang <wangfushuai@baidu.com>
> 
> Combine cpumask_copy() and cpumask_andnot() into a single
> cpumask_andnot() since the function can take cpu_online_mask
> directly as the source.
> 
> Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
> Reviewed-by: Shay Drory <shayd@nvidia.com>
> 
> [...]

Here is the summary with links:
  - [net-next,v3] net/mlx5: Simplify cpumask operations in comp_irq_request_sf()
    https://git.kernel.org/netdev/net-next/c/32fbe56b3f8a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-09  2:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-05 10:17 [PATCH net-next v3] net/mlx5: Simplify cpumask operations in comp_irq_request_sf() Fushuai Wang
2026-06-07 11:04 ` Tariq Toukan
2026-06-09  2:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome