net/mlx5: Simplify cpumask operations in comp_irq_request_sf()
Subsystems (4)
PATCH v3 1/1 net/mlx5: Simplify cpumask operations in comp_irq_request_sf()
From: Fushuai Wang <[email protected]>
Combine cpumask_copy() and cpumask_andnot() into a single cpumask_andnot() since the function can take cpu_online_mask directly as the source.
---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/[email protected]/T/#u
https://lore.kernel.org/all/[email protected]/T/#u
drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/eq.c +1 -2
@@ -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);
Signature · 1 line
2.36.1
Quoted 24 lines · Fushuai Wang
From: Fushuai Wang <[email protected]>
Combine
cpumask_copy()andcpumask_andnot()into a singlecpumask_andnot()since the function can takecpu_online_maskdirectly as the source.Signed-off-by Fushuai Wang <[email protected]>Reviewed-by Shay Drory <[email protected]>---
v2->v3: Separate the patchset to two patches, no changes on this patchv1->v2: No changes on this patchprevious discussion:
https://lore.kernel.org/all/[email protected]/T/#u
https://lore.kernel.org/all/[email protected]/T/#udrivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/eq.c +0
-0
drivers/net/ethernet/mellanox/mlx5/core/eq.c static int comp_irq_request_sf(struct mlx5_core_dev *dev, u16 vecidx) · line 892
Quoted 9 lines
drivers/net/ethernet/mellanox/mlx5/core/eq.c +1
-2@@ -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);
Thanks for your patch.
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Fri, 5 Jun 2026 18:17:56 +0800 you wrote:
From: Fushuai Wang <[email protected]>
Combine
cpumask_copy()andcpumask_andnot()into a singlecpumask_andnot()since the function can takecpu_online_maskdirectly as the source.Signed-off-by Fushuai Wang <[email protected]>Reviewed-by Shay Drory <[email protected]>[...]
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html