From e3f943f6b1fc48d0fc7a8b71636b2441e62abdc7 Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Wed, 22 Dec 2010 01:20:52 -0800 Subject: Affinity script was failing to configure some queues of multi-queue NICs. The problem was due to incorrect initialization of the $q and $cpu variables. Their initializations were reversed. --- scripts/system/irq-affinity.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/system/irq-affinity.pl') diff --git a/scripts/system/irq-affinity.pl b/scripts/system/irq-affinity.pl index 27eae4a8..ed8063ff 100755 --- a/scripts/system/irq-affinity.pl +++ b/scripts/system/irq-affinity.pl @@ -164,9 +164,9 @@ sub first_cpu { # Assign each queue to successive cores sub assign_multiqueue { my ( $ifname, $numq, $irqmap, $irqfmt ) = @_; - my $cpu = 0; + my $cpu = first_cpu($ifname, $numq); - for ( my $q = first_cpu($ifname, $numq) ; $q < $numq ; $q++ ) { + for ( my $q = 0 ; $q < $numq ; $q++ ) { # handles multiple irq's per interface (tx/rx) foreach my $fmt (@$irqfmt) { my $name = sprintf( $fmt, $ifname, $q ); -- cgit v1.2.3