lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOBf=mvnzjpxm3S_x1-cnuAW1FA+7eNeL6xPHd8-iAh35SZiRg@mail.gmail.com>
Date: Thu, 7 Nov 2024 09:12:41 +0530
From: Somnath Kotur <somnath.kotur@...adcom.com>
To: Andy Gospodarek <andrew.gospodarek@...adcom.com>
Cc: Mohammad Heib <mheib@...hat.com>, netdev@...r.kernel.org, michael.chan@...adcom.com, 
	skotur@...adcom.com
Subject: Re: [PATCH net] bnxt_en: use irq_update_affinity_hint()

On Thu, Nov 7, 2024 at 4:54 AM Andy Gospodarek
<andrew.gospodarek@...adcom.com> wrote:
>
> On Wed, Nov 06, 2024 at 08:08:11PM +0200, Mohammad Heib wrote:
> > 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.
> >
>
> Thanks for the patch.  This seems inline with what have been done in other
> drivers.
>
> > Signed-off-by: Mohammad Heib <mheib@...hat.com>
> Reviewed-by: Andy Gospodarek <gospo@...adcom.com>
>
> > ---
> >  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > index 99d025b69079..cd82f93b20a1 100644
> > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > @@ -10885,7 +10885,7 @@ static void bnxt_free_irq(struct bnxt *bp)
> >               irq = &bp->irq_tbl[map_idx];
> >               if (irq->requested) {
> >                       if (irq->have_cpumask) {
> > -                             irq_set_affinity_hint(irq->vector, NULL);
> > +                             irq_update_affinity_hint(irq->vector, NULL);
> >                               free_cpumask_var(irq->cpu_mask);
> >                               irq->have_cpumask = 0;
> >                       }
> > @@ -10940,10 +10940,10 @@ static int bnxt_request_irq(struct bnxt *bp)
> >                       irq->have_cpumask = 1;
> >                       cpumask_set_cpu(cpumask_local_spread(i, numa_node),
> >                                       irq->cpu_mask);
> > -                     rc = irq_set_affinity_hint(irq->vector, irq->cpu_mask);
> > +                     rc = irq_update_affinity_hint(irq->vector, irq->cpu_mask);
> >                       if (rc) {
> >                               netdev_warn(bp->dev,
> > -                                         "Set affinity failed, IRQ = %d\n",
> > +                                         "Update affinity hint failed, IRQ = %d\n",
> >                                           irq->vector);
> >                               break;
> >                       }
> > --
> > 2.34.3
> >
>
Reviewed-by: Somnath Kotur <somnath.kotur@...adcom.com>

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4212 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ