From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id EDBBD58D8 for ; Fri, 14 Oct 2016 15:51:02 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP; 14 Oct 2016 06:51:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,493,1473145200"; d="scan'208";a="19594605" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga005.fm.intel.com with ESMTP; 14 Oct 2016 06:51:01 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u9EDoxoB007254; Fri, 14 Oct 2016 21:50:59 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u9EDouCY019548; Fri, 14 Oct 2016 21:50:58 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u9EDousk019544; Fri, 14 Oct 2016 21:50:56 +0800 From: Yuan Peng To: dts@dpdk.org Cc: pengyuan Date: Fri, 14 Oct 2016 21:50:52 +0800 Message-Id: <1476453052-19505-2-git-send-email-yuan.peng@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1476453052-19505-1-git-send-email-yuan.peng@intel.com> References: <1476453052-19505-1-git-send-email-yuan.peng@intel.com> Subject: [dts] [PATCH 2/2] tests add TestSuite_VEB 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: Fri, 14 Oct 2016 13:51:03 -0000 From: pengyuan Signed-off-by: pengyuan diff --git a/tests/TestSuite_VEB.py b/tests/TestSuite_VEB.py index 6296ff1..9b97a97 100644 --- a/tests/TestSuite_VEB.py +++ b/tests/TestSuite_VEB.py @@ -145,17 +145,8 @@ class TestVEBSwitching(TestCase): "NIC Unsupported: " + str(self.nic)) self.dut_ports = self.dut.get_ports(self.nic) self.verify(len(self.dut_ports) >= 1, "Insufficient ports") - # self.rx_port = self.dut_ports[0] - # self.tx_port = self.dut_ports[0] - - # cores = self.dut.get_core_list("1S/2C/1T") - # self.coremask = dts.create_mask(cores) - - # self.port_mask = dts.create_mask([self.rx_port, self.tx_port]) self.session_secondary = self.dut.new_session() self.session_third = self.dut.new_session() - # self.pmdout = PmdOutput(self.dut) - # self.pmdout_session_secondary = PmdOutput(self.session_secondary) def set_up(self): """ @@ -206,8 +197,11 @@ class TestVEBSwitching(TestCase): def destroy_1pf_ddriver_4vf_env(self): self.session_third.send_expect("quit", "# ") + time.sleep(2) self.session_secondary.send_expect("quit", "# ") + time.sleep(2) self.dut.send_expect("quit", "# ") + time.sleep(2) self.dut.destroy_sriov_vfs_by_port(self.used_dut_port) port = self.dut.ports_info[self.used_dut_port]['port'] port.bind_driver() @@ -252,8 +246,11 @@ class TestVEBSwitching(TestCase): def destroy_1pf_ddriver_2vf_env(self): self.session_third.send_expect("quit", "# ") + time.sleep(2) self.session_secondary.send_expect("quit", "# ") + time.sleep(2) self.dut.send_expect("quit", "# ") + time.sleep(2) self.dut.destroy_sriov_vfs_by_port(self.used_dut_port) port = self.dut.ports_info[self.used_dut_port]['port'] port.bind_driver() @@ -273,7 +270,6 @@ class TestVEBSwitching(TestCase): self.pf_mac_address = self.dut.get_mac_address(0) self.pf_pci = self.dut.ports_info[self.used_dut_port]['pci'] self.dut.send_expect("./tools/dpdk-devbind.py -s", "# ", 3) - # self.dut.send_expect("echo 1 > /sys/bus/pci/devices/%s/max_vfs" % self.pf_pci, "# ", 3) self.dut.generate_sriov_vfs_by_port(self.used_dut_port, 1, driver='igb_uio') self.sriov_vfs_port = self.dut.ports_info[self.used_dut_port]['vfs_port'] self.dut.send_expect("./tools/dpdk-devbind.py -s", "# ", 3) @@ -301,7 +297,9 @@ class TestVEBSwitching(TestCase): def destroy_1pf_ddriver_1vf_env(self): self.session_secondary.send_expect("quit", "# ") + time.sleep(2) self.dut.send_expect("quit", "# ") + time.sleep(2) self.dut.destroy_sriov_vfs_by_port(self.used_dut_port) port = self.dut.ports_info[self.used_dut_port]['port'] port.bind_driver() @@ -323,8 +321,6 @@ class TestVEBSwitching(TestCase): self.pf_interface = self.dut.ports_info[self.used_dut_port]['intf'] self.dut.generate_sriov_vfs_by_port(self.used_dut_port, 2, driver=driver) self.sriov_vfs_port = self.dut.ports_info[self.used_dut_port]['vfs_port'] - #self.vf0_mac = "00:11:22:33:44:11" - #self.vf1_mac = "00:11:22:33:44:12" self.dut.send_expect("ip link set %s vf 0 mac %s" % (self.pf_interface, self.vf0_mac), "# ", 3) self.dut.send_expect("ip link set %s vf 1 mac %s" % (self.pf_interface, self.vf1_mac), "# ", 3) @@ -337,13 +333,7 @@ class TestVEBSwitching(TestCase): time.sleep(1) vf0_prop = {'opt_host': self.sriov_vfs_port[0].pci} vf1_prop = {'opt_host': self.sriov_vfs_port[1].pci} - - # for port_id in self.dut_ports: - # if port_id == self.used_dut_port: - # continue - # port = self.dut.ports_info[port_id]['port'] - # port.bind_driver() - + self.setup_1pf_kdriver_2vf_env_flag = 1 except Exception as e: self.destroy_1pf_kdriver_2vf_env() @@ -352,7 +342,9 @@ class TestVEBSwitching(TestCase): def destroy_1pf_kdriver_2vf_env(self): self.session_secondary.send_expect("quit", "# ") + time.sleep(2) self.dut.send_expect("quit", "# ") + time.sleep(2) self.dut.destroy_sriov_vfs_by_port(self.used_dut_port) port = self.dut.ports_info[self.used_dut_port]['port'] port.bind_driver() @@ -470,7 +462,7 @@ class TestVEBSwitching(TestCase): self.verify(vf0_tx_stats[0] != 0, "no packet was sent by VF0") self.verify((vf0_tx_stats[0] == 1) and (vf1_rx_stats[0] == 1), "VF1 didn't receive packets from VF0, the vlan filter doen't work") - def test_VEB_switching_inter_pf_vf_MAC_switch(self): + def test_VEB_switching_inter_vfs_pf_MAC_switch(self): """ DPDK PF, then create 1VF, PF in the host running dpdk testpmd, send traffic from PF to VF1, ensure PF->VF1(let VF1 in promisc mode); send traffic from VF1 to PF, ensure VF1->PF can work. """ -- 2.5.0