For some NICs, e.g. Mellanox ones, the /proc/interrupts file does not contain device name that we use to identify NIC IRQs. Based on Mellanox script get_irq_list I added parsing of msi_irqs under /sys/class/net directory if the former method returned empty list.
Signed-off-by: Jan Tluka jtluka@redhat.com --- lnst/RecipeCommon/IRQ.py | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/lnst/RecipeCommon/IRQ.py b/lnst/RecipeCommon/IRQ.py index 825a2b3..88d673b 100644 --- a/lnst/RecipeCommon/IRQ.py +++ b/lnst/RecipeCommon/IRQ.py @@ -24,6 +24,15 @@ def pin_dev_irqs(machine, device, cpu): % device.get_devname()) res = pi.get_result() intrs = res["res_data"]["stdout"] + split = intrs.split('\n') + if len(split) == 1 and split[0] == '': + # try to get interrupts from msi_irqs directory + pi = machine.run("dev_irqs=/sys/class/net/%s/device/msi_irqs; " + "[ -d $dev_irqs ] && ls -1 $dev_irqs" + % device.get_devname()) + res = pi.get_result() + intrs = res["res_data"]["stdout"] + for intr in intrs.split('\n'): try: int(intr)
On Fri, Aug 25, 2017 at 04:08:23PM +0200, Jan Tluka wrote:
For some NICs, e.g. Mellanox ones, the /proc/interrupts file does not contain device name that we use to identify NIC IRQs. Based on Mellanox script get_irq_list I added parsing of msi_irqs under /sys/class/net directory if the former method returned empty list.
Signed-off-by: Jan Tluka jtluka@redhat.com
lnst/RecipeCommon/IRQ.py | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/lnst/RecipeCommon/IRQ.py b/lnst/RecipeCommon/IRQ.py index 825a2b3..88d673b 100644 --- a/lnst/RecipeCommon/IRQ.py +++ b/lnst/RecipeCommon/IRQ.py @@ -24,6 +24,15 @@ def pin_dev_irqs(machine, device, cpu): % device.get_devname()) res = pi.get_result() intrs = res["res_data"]["stdout"]
- split = intrs.split('\n')
- if len(split) == 1 and split[0] == '':
# try to get interrupts from msi_irqs directory
pi = machine.run("dev_irqs=/sys/class/net/%s/device/msi_irqs; "
"[ -d $dev_irqs ] && ls -1 $dev_irqs"
% device.get_devname())
res = pi.get_result()
intrs = res["res_data"]["stdout"]
- for intr in intrs.split('\n'): try: int(intr)
-- 2.9.5 _______________________________________________ LNST-developers mailing list -- lnst-developers@lists.fedorahosted.org To unsubscribe send an email to lnst-developers-leave@lists.fedorahosted.org
pushed, thanks -Ondrej
lnst-developers@lists.fedorahosted.org