Skip to content

Commit fcf4240

Browse files
mohammadheibkuba-moo
authored andcommitted
bnxt_en: use irq_update_affinity_hint()
irq_set_affinity_hint() is deprecated, Use irq_update_affinity_hint() instead. This removes the side-effect of actually applying the affinity. The driver does not really need to worry about spreading its IRQs across CPUs. The core code already takes care of that. when the driver applies the affinities by itself, it breaks the users' expectations: 1. The user configures irqbalance with IRQBALANCE_BANNED_CPULIST in order to prevent IRQs from being moved to certain CPUs that run a real-time workload. 2. bnxt_en device reopening will resets the affinity in bnxt_open(). 3. bnxt_en has no idea about irqbalance's config, so it may move an IRQ to a banned CPU. The real-time workload suffers unacceptable latency. Signed-off-by: Mohammad Heib <mheib@redhat.com> Reviewed-by: Andy Gospodarek <gospo@broadcom.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Link: https://patch.msgid.link/20241106180811.385175-1-mheib@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 8b9a7bd commit fcf4240

File tree

1 file changed

+3
-3
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+3
-3
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10882,7 +10882,7 @@ static void bnxt_free_irq(struct bnxt *bp)
1088210882
irq = &bp->irq_tbl[map_idx];
1088310883
if (irq->requested) {
1088410884
if (irq->have_cpumask) {
10885-
irq_set_affinity_hint(irq->vector, NULL);
10885+
irq_update_affinity_hint(irq->vector, NULL);
1088610886
free_cpumask_var(irq->cpu_mask);
1088710887
irq->have_cpumask = 0;
1088810888
}
@@ -10937,10 +10937,10 @@ static int bnxt_request_irq(struct bnxt *bp)
1093710937
irq->have_cpumask = 1;
1093810938
cpumask_set_cpu(cpumask_local_spread(i, numa_node),
1093910939
irq->cpu_mask);
10940-
rc = irq_set_affinity_hint(irq->vector, irq->cpu_mask);
10940+
rc = irq_update_affinity_hint(irq->vector, irq->cpu_mask);
1094110941
if (rc) {
1094210942
netdev_warn(bp->dev,
10943-
"Set affinity failed, IRQ = %d\n",
10943+
"Update affinity hint failed, IRQ = %d\n",
1094410944
irq->vector);
1094510945
break;
1094610946
}

0 commit comments

Comments
 (0)