summaryrefslogtreecommitdiff
path: root/scripts/system
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2011-02-28 17:55:59 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2011-03-01 10:56:16 -0800
commit6938b8bce001cca2d98d6b277d134c9e8e405271 (patch)
tree6bf7f5b0787dfbb32f241e0a55579e1582f7b64d /scripts/system
parent5cc31469a5b4d3117c6e6e07363b51358f88bc67 (diff)
downloadvyatta-cfg-system-6938b8bce001cca2d98d6b277d134c9e8e405271.tar.gz
vyatta-cfg-system-6938b8bce001cca2d98d6b277d134c9e8e405271.zip
Warn if attempting to force mask on multiqueue NIC
Bug 6845 Warn (and ignore) attempt to assign IRQ directly on multiqueuej NIC.
Diffstat (limited to 'scripts/system')
-rwxr-xr-xscripts/system/irq-affinity.pl19
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: