public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Damato <jdamato@fastly.com>
To: "Arinzon, David" <darinzon@amazon.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"Agroskin, Shay" <shayagr@amazon.com>,
	"Kiyanovski, Arthur" <akiyano@amazon.com>,
	"Dagan, Noam" <ndagan@amazon.com>,
	"Bshara, Saeed" <saeedb@amazon.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Kamal Heib <kheib@redhat.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [net-next 1/2] ena: Link IRQs to NAPI instances
Date: Tue, 1 Oct 2024 09:18:18 -0700	[thread overview]
Message-ID: <Zvwgyt_IJB-EZquT@LQ3V64L9R2> (raw)
In-Reply-To: <a6a2c78faa8740fab0ca53295bbc57d2@amazon.com>

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@fastly.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.

  reply	other threads:[~2024-10-01 16:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 19:56 [net-next 0/2] ena: Link IRQs, queues, and NAPI instances Joe Damato
2024-09-30 19:56 ` [net-next 1/2] ena: Link IRQs to " Joe Damato
2024-10-01  8:57   ` Arinzon, David
2024-10-01 16:18     ` Joe Damato [this message]
2024-09-30 19:56 ` [net-next 2/2] ena: Link queues to NAPIs Joe Damato
2024-10-01  9:06   ` Arinzon, David
2024-10-01 14:28     ` Joe Damato
2024-10-01 15:50       ` Arinzon, David
2024-10-01 16:21         ` Joe Damato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zvwgyt_IJB-EZquT@LQ3V64L9R2 \
    --to=jdamato@fastly.com \
    --cc=akiyano@amazon.com \
    --cc=darinzon@amazon.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kheib@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ndagan@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedb@amazon.com \
    --cc=shayagr@amazon.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox