diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2011-03-30 15:08:32 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@vyatta.com> | 2011-03-30 15:08:32 -0700 |
commit | 15a3642473fb0edd1a8981dd6508f16ef8dd1b96 (patch) | |
tree | 68467f3449cd7c718462cca025c9dbf295b5172e | |
parent | d379e2b373a70dbdd5dcb9bb9163dff9d8bb62a8 (diff) | |
parent | 48709740cd726149372b0bfd40322b0eefb2f438 (diff) | |
download | vyatta-cfg-quagga-15a3642473fb0edd1a8981dd6508f16ef8dd1b96.tar.gz vyatta-cfg-quagga-15a3642473fb0edd1a8981dd6508f16ef8dd1b96.zip |
Merge branch 'napa' of 192.168.230.2:vyatta/napa/vyatta-cfg-system into napa
-rwxr-xr-x | scripts/vyatta-bonding.pl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/vyatta-bonding.pl b/scripts/vyatta-bonding.pl index fe07b1a2..6215049f 100755 --- a/scripts/vyatta-bonding.pl +++ b/scripts/vyatta-bonding.pl @@ -129,6 +129,19 @@ sub primary_slave { return $match; } +sub smp_affinity { + my $intf = shift; + my $cfg = new Vyatta::Config; + + my $slaveif = new Vyatta::Interface($intf); + unless ($slaveif) { + warn "$intf: unknown interface type"; + return; + } + $cfg->setLevel($slaveif->path()); + return $cfg->returnValue('smp_affinity'); +} + sub if_down { my $intf = shift; system "ip link set dev $intf down" @@ -139,6 +152,12 @@ sub if_up { my $intf = shift; system "ip link set dev $intf up" and die "Could not set $intf up ($!)\n"; + + my $smp_affinity = get_irq_affinity($intf); + if ($smp_affinity) { + system "irq-affinity.pl $intf $smp_affinity" + and warn "Could not set $intf smp_affinity $smp_affinity\n"; + } } # Can't change mode when bond device is up and slaves are attached |