Message ID | 20220510154750.212913-16-yury.norov@gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | None | expand |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c b/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c index 380a208ab137..d57f804ee934 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c @@ -58,7 +58,7 @@ irq_pool_request_irq(struct mlx5_irq_pool *pool, const struct cpumask *req_mask) if (err) return ERR_PTR(err); if (pool->irqs_per_cpu) { - if (cpumask_weight(req_mask) > 1) + if (cpumask_weight_gt(req_mask, 1)) /* if req_mask contain more then one CPU, set the least loadad CPU * of req_mask */
cpumask_weight_gt() is more efficient because it may stop traversing cpumask depending on condition. CC: David S. Miller <davem@davemloft.net> CC: Eric Dumazet <edumazet@google.com> CC: Jakub Kicinski <kuba@kernel.org> CC: Leon Romanovsky <leon@kernel.org> CC: Paolo Abeni <pabeni@redhat.com> CC: Saeed Mahameed <saeedm@nvidia.com> CC: netdev@vger.kernel.org CC: linux-rdma@vger.kernel.org CC: linux-kernel@vger.kernel.org Signed-off-by: Yury Norov <yury.norov@gmail.com> --- drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)