[dts] [PATCH] framework: enable DUT and Tester run in the same platform

Yong Liu yong.liu at intel.com
Tue Jan 27 03:21:06 CET 2015


Skip to ping self port when DUT and Tester in the same platform.
Not support software performance in the same platform now.

Signed-off-by: Yong Liu <yong.liu at intel.com>
---
This patch based on "[PATCH 0/4] Support additional port configuration file".

 framework/tester.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/framework/tester.py b/framework/tester.py
index 345ab41..9100967 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -73,6 +73,8 @@ class Tester(Crb):
         self.scapyCmds = []
         self.bgCmds = []
         self.bgItf = ''
+        self.packet_gen = None
+        self.ixia_packet_gen = None
 
     def init_ext_gen(self):
         """
@@ -287,6 +289,11 @@ class Tester(Crb):
                 if hits[localPort]:
                     continue
 
+                # skip ping self port
+                if (self.crb['IP'] == self.crb['tester IP']) and \
+                    (self.dut.ports_info[dutPort]['pci'] == self.ports_info[localPort]['pci']):
+                    continue
+
                 ipv6 = self.dut.get_ipv6_address(dutPort)
                 if ipv6 == "Not connected":
                     continue
@@ -440,6 +447,7 @@ class Tester(Crb):
         """
         if not self.has_external_traffic_generator():
             self.alt_session.send_expect('killall scapy 2>/dev/null; echo tester', '# ', 5)
+        if self.packet_gen:
             super(Tester, self).kill_all()
 
     def close(self):
-- 
1.9.3



More information about the dts mailing list