test suite reviews and discussions
 help / color / mirror / Atom feed
From: Patrick MacArthur <pmacarth@iol.unh.edu>
To: dts@dpdk.org
Cc: pmacarth@iol.unh.edu, dpdklab@iol.unh.edu
Subject: [dts] [PATCH for-next 2/6] framework: Do not attempt ping6 on T-Rex ports
Date: Tue, 20 Feb 2018 12:26:08 -0500	[thread overview]
Message-ID: <20180220172612.11973-3-pmacarth@iol.unh.edu> (raw)
In-Reply-To: <20180220172612.11973-1-pmacarth@iol.unh.edu>

DTS uses ping6 to determine whether the DUT and tester node ports are
connected.  Currently the IXIA ports are excluded from this test because
they are matched explicitly with DUT ports in the ports.cfg file and the
traffic generator will not respond to pings in the usual fashion.

For the same reason, exclude T-Rex ports from ping6 matching and
connectivity testing. This avoids a traceback due to the T-Rex ports not
having enough available information to complete the ping6 check.

Tested-by: Ali Alnubani <alialnu@mellanox.com>
Signed-off-by: Patrick MacArthur <pmacarth@iol.unh.edu>
---
 framework/dut.py      |  4 ++--
 framework/tester.py   | 10 ++++++----
 framework/virt_dut.py |  2 +-
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/framework/dut.py b/framework/dut.py
index 31b3daaaebcb..5b72c7a523e3 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -980,13 +980,13 @@ class Dut(Crb):
 
     def disable_tester_ipv6(self):
         for tester_port in self.ports_map:
-            if self.tester.ports_info[tester_port]['type'] != 'ixia':
+            if self.tester.ports_info[tester_port]['type'].lower() not in ('ixia', 'trex'):
                 port = self.tester.ports_info[tester_port]['port']
                 port.disable_ipv6()
 
     def enable_tester_ipv6(self):
         for tester_port in range(len(self.tester.ports_info)):
-            if self.tester.ports_info[tester_port]['type'] != 'ixia':
+            if self.tester.ports_info[tester_port]['type'].lower() not in ('ixia', 'trex'):
                 port = self.tester.ports_info[tester_port]['port']
                 port.enable_ipv6()
 
diff --git a/framework/tester.py b/framework/tester.py
index 151200872338..be5b0e13897c 100755
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -200,7 +200,7 @@ class Tester(Crb):
         if localPort == -1:
             raise ParameterInvalidException("local port should not be -1")
 
-        if self.ports_info[localPort]['type'] == 'ixia':
+        if self.ports_info[localPort]['type'] in ('ixia', 'trex'):
             return "00:00:00:00:00:01"
         else:
             return self.ports_info[localPort]['mac']
@@ -305,7 +305,7 @@ class Tester(Crb):
             return
 
         for port_info in self.ports_info:
-            if port_info['type'] == 'ixia':
+            if port_info['type'].lower() in ('ixia', 'trex'):
                 continue
 
             addr_array = port_info['pci'].split(':')
@@ -394,7 +394,7 @@ class Tester(Crb):
         """
         Send ping6 packet from local port with destination ipv4 address.
         """
-        if self.ports_info[localPort]['type'] == 'ixia':
+        if self.ports_info[localPort]['type'].lower() in ('ixia', 'trex'):
             return "Not implemented yet"
         else:
             return self.send_expect("ping -w 5 -c 5 -A -I %s %s" % (self.ports_info[localPort]['intf'], ipv4), "# ", 10)
@@ -403,8 +403,10 @@ class Tester(Crb):
         """
         Send ping6 packet from local port with destination ipv6 address.
         """
-        if self.ports_info[localPort]['type'] == 'ixia':
+        if self.ports_info[localPort]['type'].lower() == 'ixia':
             return self.ixia_packet_gen.send_ping6(self.ports_info[localPort]['pci'], mac, ipv6)
+        elif self.ports_info[localPort]['type'].lower() == 'trex':
+            return "Not implemented yet"
         else:
             return self.send_expect("ping6 -w 5 -c 5 -A %s%%%s" % (ipv6, self.ports_info[localPort]['intf']), "# ", 10)
 
diff --git a/framework/virt_dut.py b/framework/virt_dut.py
index 62688dc83b9e..d4cd805d2a03 100644
--- a/framework/virt_dut.py
+++ b/framework/virt_dut.py
@@ -385,7 +385,7 @@ class VirtDut(DPDKdut):
                 remotepci = self.tester.ports_info[remotePort]['pci']
                 port_type = self.tester.ports_info[remotePort]['type']
                 # IXIA port should not check whether has vfs
-                if port_type != 'ixia':
+                if port_type.lower() not in ('ixia', 'trex'):
                     remoteport = self.tester.ports_info[remotePort]['port']
                     vfs = []
                     # vm_dut and tester in same dut
-- 
2.14.1

  parent reply	other threads:[~2018-02-20 17:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 17:26 [dts] [PATCH for-next 0/6] Fixes and modifications for T-Rex integration and nic_single_core_perf Patrick MacArthur
2018-02-20 17:26 ` [dts] [PATCH for-next 1/6] framework/texttable: Update to latest upstream version Patrick MacArthur
2018-02-20 17:26 ` Patrick MacArthur [this message]
2018-02-20 17:26 ` [dts] [PATCH for-next 3/6] tests/TestSuite_nic_single_core_perf: Fix config parsing Patrick MacArthur
2018-02-20 17:26 ` [dts] [PATCH for-next 4/6] tests/TestSuite_nic_single_core_perf: Use user-specified output dir Patrick MacArthur
2018-02-20 17:26 ` [dts] [PATCH for-next 5/6] framework/pktgen: Start T-Rex during prepare_generator() Patrick MacArthur
2018-03-02  1:51   ` Liu, Yong
2018-02-20 17:26 ` [dts] [PATCH for-next 6/6] tests/TestSuite_nic_single_core_perf: Fix test case name Patrick MacArthur
     [not found]   ` <188971FCDA171749BED5DA74ABF3E6F03C123A39@SHSMSX104.ccr.corp.intel.com>
2018-03-05  9:25     ` Wang, FeiX Y
     [not found] ` <188971FCDA171749BED5DA74ABF3E6F03C1239F0@SHSMSX104.ccr.corp.intel.com>
2018-03-05  9:16   ` [dts] [PATCH for-next 0/6] Fixes and modifications for T-Rex integration and nic_single_core_perf Wang, FeiX Y
2018-03-20 22:25     ` Patrick MacArthur
2018-03-21  7:28       ` Wang, FeiX Y
2018-03-23  9:03       ` Wang, FeiX Y

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180220172612.11973-3-pmacarth@iol.unh.edu \
    --to=pmacarth@iol.unh.edu \
    --cc=dpdklab@iol.unh.edu \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).