Reputation: 27621
I need to retrieve an interrupt number of interface by its' name as appears in ifconfig.
Is there some standard API to do it?
Upvotes: 4
Views: 3933
Reputation: 21
/sys/class/net/[ethname]/device/irq
should legacy irq number, device may not be using legacy irq, it may be using msix.
check
$ ls /sys/class/net/eth0/device/msi_irqs/
or
$ grep eth0 /proc/interrupts
Upvotes: 2
Reputation: 6334
The interrupt number lives in sysfs. Look for the file /sys/class/net/[ethname]/device/irq
. For example:
more /sys/class/net/*/device/irq
::::::::::::::
/sys/class/net/eth0/device/irq
::::::::::::::
30
::::::::::::::
/sys/class/net/eth1/device/irq
::::::::::::::
29
Upvotes: 3