diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-12-31 14:18:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-31 14:18:06 +0100 |
commit | b801815c1403434df52d9835cbfebd497b604e56 (patch) | |
tree | b0458b5ae8a3b8d4013844a603a5ee6ac94212fc | |
parent | 1ebbf25320e821435002fae6981a9041eefd13fe (diff) | |
parent | 4447ae1d002b3369f6e7932f1c4fcfaaf755f6d9 (diff) | |
download | vyatta-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-x | scripts/system/irq-affinity.pl | 11 |
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); |