Re: [Question] Generic way to retrieve IRQ number of Tx/Rx queue
From: Stephen Hemminger
Date: Fri Jan 10 2025 - 12:38:36 EST
On Fri, 10 Jan 2025 10:07:18 +0100
Daniel Sedlak <daniel@xxxxxxxxxx> 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.