On Tue, Oct 02, 2018 at 11:03:32AM +0200, Jan Tluka wrote:
This is a fix for an issue we hit on specific NIC tracked in
In this case the mlx4_core driver lists all available MSI interrupts
under /sys/class/$dev/device/msi_irqs, this covers interrupts for both
mlx4_en (network part) and mlx4_ib (storage part) even if any of these is
not loaded yet. The IRQs are propagated to /proc/irq/ directory once
To fix this the availability of the interrupt id is first checked in
/proc/irq/ directory and modified only if present.
Signed-off-by: Jan Tluka <jtluka(a)redhat.com>
lnst/RecipeCommon/IRQ.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lnst/RecipeCommon/IRQ.py b/lnst/RecipeCommon/IRQ.py
index 88d673b..6b3a2e0 100644
@@ -38,4 +38,13 @@ def pin_dev_irqs(machine, device, cpu):
- machine.config("/proc/irq/%s/smp_affinity_list" % intr.strip(), cpu)
+ # some drivers list all _available_ MSI interrupts under msi_irqs
+ # even for driver parts that are not loaded (in case of converged
+ # network adapters) and these interrupts are not visible under
+ # /proc/irq and make LNST report failure so we need to check if the
+ # interrupt is available first
+ list_intr = machine.run("ls -d /proc/irq/%s 2>/dev/null || true" %
AH! I do have a suggestion for this...
Can the "ls -d ..." command be moved outside of the loop so it isn't
executed for each IRQ?