summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-12-31 14:18:06 +0100
committerGitHub <noreply@github.com>2019-12-31 14:18:06 +0100
commitb801815c1403434df52d9835cbfebd497b604e56 (patch)
treeb0458b5ae8a3b8d4013844a603a5ee6ac94212fc
parent1ebbf25320e821435002fae6981a9041eefd13fe (diff)
parent4447ae1d002b3369f6e7932f1c4fcfaaf755f6d9 (diff)
downloadvyatta-cfg-system-b801815c1403434df52d9835cbfebd497b604e56.tar.gz
vyatta-cfg-system-b801815c1403434df52d9835cbfebd497b604e56.zip
Merge pull request #115 from DmitriyEshenko/crux-xen-smp-affinity
smp-affinity: T1924: Add support for XEN interfaces
-rwxr-xr-xscripts/system/irq-affinity.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/system/irq-affinity.pl b/scripts/system/irq-affinity.pl
index de0c3099..20181578 100755
--- a/scripts/system/irq-affinity.pl
+++ b/scripts/system/irq-affinity.pl
@@ -30,6 +30,17 @@ my ($ifname, $mask, $debug) = @ARGV;
die "Error: Interface $ifname does not exist\n"
unless -d "/sys/class/net/$ifname";
+# Detect xen and use special (vifX-) interface irq
+if ( -d "/proc/xen" ){
+ open( my $f, '<', "/sys/class/net/$ifname/device/nodename" )
+ or die "Can't read /sys/class/net/$ifname/device/nodename ";
+ my $xen_ifname = <$f>;
+ $xen_ifname =~ s/device\/vif\///;
+ $ifname = "vif".$xen_ifname;
+ chomp($ifname);
+ close $f;
+}
+
my $logopt = defined($debug) ? "perror" : "";
openlog("irq-affinity", $logopt, LOG_LOCAL0);