From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f228.google.com (mail-qt0-f228.google.com [209.85.216.228]) by dpdk.org (Postfix) with ESMTP id ACFC95F21 for ; Tue, 20 Mar 2018 23:21:28 +0100 (CET) Received: by mail-qt0-f228.google.com with SMTP id l25so3399651qtj.1 for ; Tue, 20 Mar 2018 15:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cYnsm5b5zypcuAUCUKGS2+SDM6NRavI0H1c32OPqcD0=; b=aO/fSeNNEBklXPPvU1ktOqO1f/umadSumUSXQLL3y2pymLWf5539WKCs3I4quoAr9w tQStnRLTOhjj1YnmLXsIXsKVJG6GmR9Iud2pyeNxarjgwxGXg0UlZPQV4rKcvtMhE51i pNvKOVoiUL0naYlZc3f/RTu4t+l7+rlZO2Cok= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cYnsm5b5zypcuAUCUKGS2+SDM6NRavI0H1c32OPqcD0=; b=m0tcfoHAjSPy/8Yz5N/+u4wFof8ujvZgGb3zqZCgjfGJQv7PBM7I0GHsAwdwQkc+bI YIpS14n4aFdmVOYWGsXzy6njm1XuhqXvNbyzPmA650oWEASZlyMgK5/rXoTcCSOd2OIW NjV26C2+CfZB54FJ0qba5Vjym6V//1VAX9yiwdW6m7zKebl9WCntTkz3d5XNMj01oHIk u2HaYbdP7J3BvU2dWyrjRDD9chpRxxber++DOn5lBrCOXEyXUyCvR94iLP0jQj4ni8yl rQwD+3YFQtMSzyl8hNgeKM6QaJiawOaMUBXZYbo3ElGlqUCbNUBnAkBbWjQOgFbh/ljP Pm6Q== X-Gm-Message-State: AElRT7GBYzypKLXdXKMVS7uhn1yTvo7LJXMBGF4WM0QfvcK0Jn1IGYOS K49qPWOzJvVm9Y7nPQUIbw6/R8vIA/eohGGImypkuNZEes8Ino0cLbxujH40Qgzp5+miVYSBryy yWYfvagU85szs34C3km+deKd49NkTj6UeatlfZjKJekx+lW8OQOtf3jVCx3JOgnf07MsTGwGZnA == X-Google-Smtp-Source: AG47ELvjeLEcgebS98upE4KQifDA5WcX+G9fpthJxNvC6Cn51JUWJFJ76kaVgq5U2/7ru4qVW7p8rs8MRLRC X-Received: by 10.237.60.204 with SMTP id e12mr25332062qtf.243.1521584488025; Tue, 20 Mar 2018 15:21:28 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id f142sm649903qka.7.2018.03.20.15.21.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 15:21:28 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from groose.iol.unh.edu (unknown [IPv6:2606:4100:3880:1240:40f9:44b9:fa0e:efd3]) by postal.iol.unh.edu (Postfix) with ESMTP id 52C3E6038482; Tue, 20 Mar 2018 18:21:27 -0400 (EDT) From: Patrick MacArthur To: dts@dpdk.org Cc: dpdklab@iol.unh.edu Date: Tue, 20 Mar 2018 18:20:38 -0400 Message-Id: <20180320222041.17303-3-pmacarth@iol.unh.edu> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180320222041.17303-1-pmacarth@iol.unh.edu> References: <20180320222041.17303-1-pmacarth@iol.unh.edu> Subject: [dts] [PATCH for-next v2 2/5] framework: Do not attempt ping6 on T-Rex ports X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2018 22:21:29 -0000 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 Signed-off-by: Patrick MacArthur --- 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