From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f226.google.com (mail-qk0-f226.google.com [209.85.220.226]) by dpdk.org (Postfix) with ESMTP id 425F41B03C for ; Tue, 20 Feb 2018 18:26:18 +0100 (CET) Received: by mail-qk0-f226.google.com with SMTP id d206so2193651qkb.3 for ; Tue, 20 Feb 2018 09:26:18 -0800 (PST) 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=VkCRKQZqu3eTXPFWDlYoBwFjot00vz66gojls8F6eVmLx+pNTJLpQe7BaSzHh5gia9 htADm2dCoQqy8zAjZZRnXJ1sjVJXN6L+XhWEcQgd20N2hL4i00g1MCmcSUgjhWsxF6/s MZEOdiUkxw84WC0mleARjiEVRccGzwAbVlCbE= 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=LRjMC9yrKqgF8znztEdvWSzJxHc2Gop9hTJxPXJXS2pQftH4TjKxUzEhLAf+FnCuyq jPq1k+hz/DRfOFDfe60mL505ENRQs9q9DsXQhtjNcHVRv87JoIrmwywGBasWacdiEhj5 oMHfhcZ4uz4gZXoklhXN7swYWOJJrY9Cph8zMR+fZX9MnhV/oa52Iy0dGiZXjtUtFhrV oN6eEga09p1/Vr2J0xEY9U5CmdFoofrc7PmyylwLWcAofH9RSoUn/dDMLNDzHsCowuUE LfSPsOBY+RLrIHradb8AyntZVI5pCD+b9WROCVTLUK/WGVdLf1irUfa0r/ELCWdiUbQN 7S/A== X-Gm-Message-State: APf1xPBYOYPi1pvcFkgNdb7jxzkAAdBAdw2lZ9pZokCHHuQJ2EMCvM0B LG0kobmKcPcRyAylNyfqwU9XuD/4uEbNtkD2CR2KL1oyeplrogLSHPYAvslkF7PNb05LeJSBeg5 iaVPAw8P0wgjDGLI5Qq+CctdvzKGsC6MdCq0w/cxK5XQH+koJVj0EMGF/vwSkS+P/ev99Ob4N5Q n3xaqaHhkW0nBViA== X-Google-Smtp-Source: AG47ELsVVvS3Bin8ZbCpT4DdJs+xoV4Erl9l9uwO7OzgpFXPddAgGSfZF/EXn9HwTl6L2kSrHRqfM/y0G3mt X-Received: by 10.55.43.70 with SMTP id r67mr543009qkh.17.1519147577694; Tue, 20 Feb 2018 09:26:17 -0800 (PST) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id q82sm3656478qki.12.2018.02.20.09.26.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 09:26:17 -0800 (PST) X-Relaying-Domain: iol.unh.edu Received: from groose.iol.unh.edu (unknown [IPv6:2606:4100:3880:1240:948e:929b:6d8b:f08a]) by postal.iol.unh.edu (Postfix) with ESMTP id 0E70260E805A; Tue, 20 Feb 2018 12:26:17 -0500 (EST) From: Patrick MacArthur To: dts@dpdk.org Cc: pmacarth@iol.unh.edu, dpdklab@iol.unh.edu Date: Tue, 20 Feb 2018 12:26:08 -0500 Message-Id: <20180220172612.11973-3-pmacarth@iol.unh.edu> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180220172612.11973-1-pmacarth@iol.unh.edu> References: <20180220172612.11973-1-pmacarth@iol.unh.edu> Subject: [dts] [PATCH for-next 2/6] 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 Feb 2018 17:26:18 -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