summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-15 13:36:08 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-15 13:55:03 -0800
commitc43e40ca09a20c1af5706fbe629442138a6dbede (patch)
treebcd7a7dcafd486afd360a381151f32848819a279 /templates
parentba6dc2331c53310ba4e0e8f9cb54717aa7103eb9 (diff)
downloadvyatta-cfg-system-c43e40ca09a20c1af5706fbe629442138a6dbede.tar.gz
vyatta-cfg-system-c43e40ca09a20c1af5706fbe629442138a6dbede.zip
Restore IRQ affinity when device is renabled
Bug 5698 When interface transistions back to online, the driver may have reacquired IRQ's and the irq affinity script will need to be rerun.
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/ethernet/node.tag/disable/node.def10
1 files changed, 7 insertions, 3 deletions
diff --git a/templates/interfaces/ethernet/node.tag/disable/node.def b/templates/interfaces/ethernet/node.tag/disable/node.def
index 92f150dd..c3f9a9a0 100644
--- a/templates/interfaces/ethernet/node.tag/disable/node.def
+++ b/templates/interfaces/ethernet/node.tag/disable/node.def
@@ -1,12 +1,16 @@
help: Disable interface
+
create: /etc/netplug/linkdown.d/dhclient $VAR(../@)
if ! ip link set $VAR(../@) down 2>/dev/null; then
- echo "Error disabling dev $VAR(../@)"
- /etc/netplug/linkup.d/dhclient $VAR(../@)
- exit 1
+ echo "Error disabling dev $VAR(../@)"
+ /etc/netplug/linkup.d/dhclient $VAR(../@)
+ exit 1
fi
+
delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0
if ! ip link set $VAR(../@) up; then
echo "Error enabling dev $VAR(../@)"
exit 1
fi
+ affinity=$VAR(../smp_affinity/@)
+ sudo /opt/vyatta/sbin/irq-affinity.pl $VAR(../@) ${affinity:-auto}