diff options
Diffstat (limited to 'target/linux/cns3xxx/base-files/etc/init.d')
4 files changed, 109 insertions, 0 deletions
diff --git a/target/linux/cns3xxx/base-files/etc/init.d/.svn/entries b/target/linux/cns3xxx/base-files/etc/init.d/.svn/entries new file mode 100644 index 0000000..c530324 --- /dev/null +++ b/target/linux/cns3xxx/base-files/etc/init.d/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/target/linux/cns3xxx/base-files/etc/init.d +svn://svn.openwrt.org/openwrt + + + +2013-03-10T01:01:51.045091Z +35915 +nbd + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +netdev-cpu +file + + + + +2013-03-17T12:13:04.000000Z +efe6b0b935a6e7dc0f87acfe5ab6cb9b +2013-03-10T01:01:51.045091Z +35915 +nbd +has-props + + + + + + + + + + + + + + + + + + + + +364 + diff --git a/target/linux/cns3xxx/base-files/etc/init.d/.svn/prop-base/netdev-cpu.svn-base b/target/linux/cns3xxx/base-files/etc/init.d/.svn/prop-base/netdev-cpu.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/target/linux/cns3xxx/base-files/etc/init.d/.svn/prop-base/netdev-cpu.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/target/linux/cns3xxx/base-files/etc/init.d/.svn/text-base/netdev-cpu.svn-base b/target/linux/cns3xxx/base-files/etc/init.d/.svn/text-base/netdev-cpu.svn-base new file mode 100644 index 0000000..3a2a57b --- /dev/null +++ b/target/linux/cns3xxx/base-files/etc/init.d/.svn/text-base/netdev-cpu.svn-base @@ -0,0 +1,21 @@ +#!/bin/sh /etc/rc.common + +START=99 + +get_irq() { + local name="$1" + grep -m 1 "$name" /proc/interrupts | cut -d: -f1 | sed 's, *,,' +} + +set_irq_affinity() { + local name="$1" + local val="$2" + local irq="$(get_irq "$name")" + [ -n "$irq" ] || return + echo "$val" > "/proc/irq/$irq/smp_affinity" +} + +start() { + set_irq_affinity gig_switch 2 + set_irq_affinity gig_stat 2 +} diff --git a/target/linux/cns3xxx/base-files/etc/init.d/netdev-cpu b/target/linux/cns3xxx/base-files/etc/init.d/netdev-cpu new file mode 100755 index 0000000..3a2a57b --- /dev/null +++ b/target/linux/cns3xxx/base-files/etc/init.d/netdev-cpu @@ -0,0 +1,21 @@ +#!/bin/sh /etc/rc.common + +START=99 + +get_irq() { + local name="$1" + grep -m 1 "$name" /proc/interrupts | cut -d: -f1 | sed 's, *,,' +} + +set_irq_affinity() { + local name="$1" + local val="$2" + local irq="$(get_irq "$name")" + [ -n "$irq" ] || return + echo "$val" > "/proc/irq/$irq/smp_affinity" +} + +start() { + set_irq_affinity gig_switch 2 + set_irq_affinity gig_stat 2 +} |