From: Stephen Hemminger <stephen@networkplumber.org>
To: Daniel Sedlak <daniel@sedlak.dev>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [Question] Generic way to retrieve IRQ number of Tx/Rx queue
Date: Fri, 10 Jan 2025 09:38:21 -0800 [thread overview]
Message-ID: <20250110093821.4eddeff3@hermes.local> (raw)
In-Reply-To: <ca5056ef-0a1a-477c-ac99-d266dea2ff5b@sedlak.dev>
On Fri, 10 Jan 2025 10:07:18 +0100
Daniel Sedlak <daniel@sedlak.dev> wrote:
> Hello,
> I am writing an affinity scheduler in the userspace for network cards's
> Tx/Rx queues. Is there a generic way to retrieve all IRQ numbers for
> those queues for each interface?
>
> My goal is to get all Tx/Rx queues for a given interface, get the IRQ
> number of the individual queues, and set an affinity hint for each
> queue. I have tried to loop over /proc/interrupts to retrieve all queues
> for an interface in a hope that the last column would contain the
> interface name however this does not work since the naming is not
> unified across drivers. My second attempt was to retrieve all registered
> interrupts by network interface from
> /sys/class/net/{interface_name}/device/msi_irqs/, but this attempt was
> also without luck because some drivers request more IRQs than the number
> of queues (for example i40e driver).
>
> Thank you for any help or advice
>
> Daniel
>
Good luck reinventing irqbalance.
There can be multiple interrupts per queue, or one interrupt can serve multiple queues.
next prev parent reply other threads:[~2025-01-10 17:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 9:07 [Question] Generic way to retrieve IRQ number of Tx/Rx queue Daniel Sedlak
2025-01-10 17:38 ` Stephen Hemminger [this message]
2025-01-13 21:15 ` Jakub Kicinski
2025-01-14 8:32 ` Daniel Sedlak
2025-01-14 23:26 ` 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=20250110093821.4eddeff3@hermes.local \
--to=stephen@networkplumber.org \
--cc=daniel@sedlak.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).