diff options
-rwxr-xr-x | scripts/system/irq-affinity.pl | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/scripts/system/irq-affinity.pl b/scripts/system/irq-affinity.pl index 23da4635..b15c1168 100755 --- a/scripts/system/irq-affinity.pl +++ b/scripts/system/irq-affinity.pl @@ -267,12 +267,21 @@ sub affinity_mask { return unless is_up($ifname); - my $irq = get_irq($ifname); - die "$ifname: attempt to assign affinity to device without irq\n" - unless (defined($irq)); + my $nirq = grep { /$ifname/ } keys %{irqinfo()}; + if ( $nirq > 1 ) { + syslog( LOG_NOTICE, "%s: device is multiqueue, ignoring affinity mask", + $ifname); + warn "$ifname: interface has multiple irq, ignoring affinity mask\n"; + } else { + my $irq = get_irq($ifname); + die "$ifname: attempt to assign affinity to device without irq\n" + unless (defined($irq)); + + syslog( LOG_INFO, "%s: assign irq %d mask %s", $ifname, $irq, $irqmsk); - set_affinity($ifname, $irq, hex($irqmsk)); - set_rps($ifname, 0, hex($rpsmsk)) if $rpsmsk; + set_affinity($ifname, $irq, hex($irqmsk)); + set_rps($ifname, 0, hex($rpsmsk)) if $rpsmsk; + } } # The auto strategy involves trying to achieve the following goals: |