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: <Zvwgyt_IJB-EZquT@LQ3V64L9R2>
Date: Tue, 1 Oct 2024 09:18:18 -0700
From: Joe Damato <jdamato@...tly.com>
To: "Arinzon, David" <darinzon@...zon.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"Agroskin, Shay" <shayagr@...zon.com>,
	"Kiyanovski, Arthur" <akiyano@...zon.com>,
	"Dagan, Noam" <ndagan@...zon.com>,
	"Bshara, Saeed" <saeedb@...zon.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Kamal Heib <kheib@...hat.com>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [net-next 1/2] ena: Link IRQs to NAPI instances

On Tue, Oct 01, 2024 at 08:57:47AM +0000, Arinzon, David wrote:
> > Link IRQs to NAPI instances with netif_napi_set_irq. This information can be
> > queried with the netdev-genl API. Note that the ENA device appears to
> > allocate an IRQ for management purposes which does not have a NAPI
> > associated with it; this commit takes this into consideration to accurately
> > construct a map between IRQs and NAPI instances.
> > 
> > Compare the output of /proc/interrupts for my ena device with the output
> > of netdev-genl after applying this patch:
> > 
> > $ cat /proc/interrupts | grep enp55s0 | cut -f1 --delimiter=':'
> >  94
> >  95
> >  96
> >  97
> >  98
> >  99
> > 100
> > 101
> > 
> > $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
> >                          --dump napi-get --json='{"ifindex": 2}'
> > 
> > [{'id': 8208, 'ifindex': 2, 'irq': 101},
> >  {'id': 8207, 'ifindex': 2, 'irq': 100},
> >  {'id': 8206, 'ifindex': 2, 'irq': 99},
> >  {'id': 8205, 'ifindex': 2, 'irq': 98},
> >  {'id': 8204, 'ifindex': 2, 'irq': 97},
> >  {'id': 8203, 'ifindex': 2, 'irq': 96},
> >  {'id': 8202, 'ifindex': 2, 'irq': 95},
> >  {'id': 8201, 'ifindex': 2, 'irq': 94}]
> > 
> > Signed-off-by: Joe Damato <jdamato@...tly.com>
> > ---
> >  drivers/net/ethernet/amazon/ena/ena_netdev.c | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> > b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> > index c5b50cfa935a..e88de5e426ef 100644
> > --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
> > +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
> > @@ -1679,7 +1679,7 @@ static int ena_request_io_irq(struct ena_adapter
> > *adapter)
> >         u32 io_queue_count = adapter->num_io_queues + adapter-
> > >xdp_num_queues;
> >         unsigned long flags = 0;
> >         struct ena_irq *irq;
> > -       int rc = 0, i, k;
> > +       int rc = 0, i, k, irq_idx;
> 
> nit: This breaks RCT guidelines, can you please move it to be below io_queue_count?

You are right; sorry I missed that. Will fix in the next revision.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ