From ac9042acae2579b03d39fa6d5b7a8dbef1a8a048 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 12 Nov 2010 10:41:31 -0800 Subject: New IRQ affinity script and RPS support Replace old script with new cleaner script that handles both IRQ affinity and Receive Packet Steering. Instead of two scripts (one for mask and one for auto), do it all with one script. Receive Packet Steering is supported in two ways. If 'auto' is used, then both threads on HT system will be used for receive processing. If explicit mask is given, then two masks can be used to set both IRQ cpus and RPS cpus. --- .../interfaces/ethernet/node.tag/smp_affinity/node.def | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'templates/interfaces') diff --git a/templates/interfaces/ethernet/node.tag/smp_affinity/node.def b/templates/interfaces/ethernet/node.tag/smp_affinity/node.def index 671a28f0..1f8a2610 100644 --- a/templates/interfaces/ethernet/node.tag/smp_affinity/node.def +++ b/templates/interfaces/ethernet/node.tag/smp_affinity/node.def @@ -15,24 +15,14 @@ type: txt help: CPU interrupt affinity mask -val_help: ; Bitmask representing CPUs that this NIC will interrupt val_help: auto; Automatic CPU affinity (default) +val_help: ; Bitmask representing CPUs that this NIC will interrupt +val_help: ,; Bitmasks representing CPUs for interrupt and receive processing default: "auto" -syntax:expression: $VAR(@) == "auto" || pattern $VAR(@) "^[0-9a-f]+$" ; +syntax:expression: $VAR(@) == "auto" || pattern $VAR(@) "^[0-9a-f]+(|,[0-9a-f]+)$" ; "IRQ affinity mask must be hex value or auto" -commit:expression: exec "\ - [ \"$VAR(@)\" == \"auto\" ] || \ - /opt/vyatta/sbin/vyatta-irqaffin check $VAR(../@) $VAR(@)" - -update: if [ "$VAR(@)" = "auto" ]; then - sudo /opt/vyatta/sbin/vyatta-auto-irqaffin.pl --setup $VAR(../@) - else - sudo /opt/vyatta/sbin/vyatta-irqaffin set $VAR(../@) $VAR(@) - fi - -delete: [ -d /sys/class/net/$VAR(../@) ] || exit 0 - sudo /opt/vyatta/sbin/vyatta-irqaffin reset $VAR(../@) +update: sudo /opt/vyatta/sbin/irq-affinity.pl $VAR(../@) $VAR(@) -- cgit v1.2.3