Skip to content

Commit 13171bc

Browse files
committed
bnxt_en: use irq_update_affinity_hint()
JIRA: https://issues.redhat.com/browse/RHEL-54644 commit fcf4240 Author: Mohammad Heib <mheib@redhat.com> Date: Wed Nov 6 20:08:11 2024 +0200 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> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
1 parent e5c4777 commit 13171bc

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
@@ -10885,7 +10885,7 @@ static void bnxt_free_irq(struct bnxt *bp)
1088510885
irq = &bp->irq_tbl[map_idx];
1088610886
if (irq->requested) {
1088710887
if (irq->have_cpumask) {
10888-
irq_set_affinity_hint(irq->vector, NULL);
10888+
irq_update_affinity_hint(irq->vector, NULL);
1088910889
free_cpumask_var(irq->cpu_mask);
1089010890
irq->have_cpumask = 0;
1089110891
}
@@ -10940,10 +10940,10 @@ static int bnxt_request_irq(struct bnxt *bp)
1094010940
irq->have_cpumask = 1;
1094110941
cpumask_set_cpu(cpumask_local_spread(i, numa_node),
1094210942
irq->cpu_mask);
10943-
rc = irq_set_affinity_hint(irq->vector, irq->cpu_mask);
10943+
rc = irq_update_affinity_hint(irq->vector, irq->cpu_mask);
1094410944
if (rc) {
1094510945
netdev_warn(bp->dev,
10946-
"Set affinity failed, IRQ = %d\n",
10946+
"Update affinity hint failed, IRQ = %d\n",
1094710947
irq->vector);
1094810948
break;
1094910949
}

0 commit comments

Comments
 (0)