From ed24dba287bccbf6c050ec97b86040707a3515e3 Mon Sep 17 00:00:00 2001 From: Shital Savekar Date: Wed, 9 Aug 2017 16:59:15 +0530 Subject: [PATCH] Updated SRIOV test to use default NIC. This change was needed due to new kernel feature: Transparent SRIOV. --- remote-scripts/ICA-PERF-NTTTCP-TEST.ps1 | 28 ++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/remote-scripts/ICA-PERF-NTTTCP-TEST.ps1 b/remote-scripts/ICA-PERF-NTTTCP-TEST.ps1 index f61d15e..5c8adad 100644 --- a/remote-scripts/ICA-PERF-NTTTCP-TEST.ps1 +++ b/remote-scripts/ICA-PERF-NTTTCP-TEST.ps1 @@ -52,13 +52,35 @@ if ($isDeployed) { $DataPath = "SRIOV" LogMsg "Getting SRIOV NIC Name." - $nicName = RunLinuxCmd -ip $clientVMData.PublicIP -port $clientVMData.SSHPort -username "root" -password $password -command "dmesg | grep 'VF registering' | tail -1 | awk '{ print `$NF }'" - LogMsg "SRIOV NIC: $nicName" + $clientNicName = (RunLinuxCmd -ip $clientVMData.PublicIP -port $clientVMData.SSHPort -username "root" -password $password -command "route | grep '^default' | grep -o '[^ ]*$'").Trim() + LogMsg "CLIENT SRIOV NIC: $clientNicName" + $serverNicName = (RunLinuxCmd -ip $clientVMData.PublicIP -port $serverVMData.SSHPort -username "root" -password $password -command "route | grep '^default' | grep -o '[^ ]*$'").Trim() + LogMsg "SERVER SRIOV NIC: $serverNicName" + if ( $serverNicName -eq $clientNicName) + { + $nicName = $clientNicName + } + else + { + Throw "Server and client SRIOV NICs are not same." + } } else { $DataPath = "Synthetic" - $nicName = "eth0" + LogMsg "Getting Active NIC Name." + $clientNicName = (RunLinuxCmd -ip $clientVMData.PublicIP -port $clientVMData.SSHPort -username "root" -password $password -command "route | grep '^default' | grep -o '[^ ]*$'").Trim() + LogMsg "CLIENT NIC: $clientNicName" + $serverNicName = (RunLinuxCmd -ip $clientVMData.PublicIP -port $serverVMData.SSHPort -username "root" -password $password -command "route | grep '^default' | grep -o '[^ ]*$'").Trim() + LogMsg "SERVER NIC: $serverNicName" + if ( $serverNicName -eq $clientNicName) + { + $nicName = $clientNicName + } + else + { + Throw "Server and client NICs are not same." + } } LogMsg "Generating constansts.sh ..."