From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 0A4001B782 for ; Thu, 8 Feb 2018 11:03:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 02:03:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,477,1511856000"; d="scan'208";a="18239041" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 08 Feb 2018 02:03:38 -0800 From: Peng Yuan To: dts@dpdk.org Cc: Peng Yuan Date: Thu, 8 Feb 2018 18:04:52 +0800 Message-Id: <1518084292-49358-1-git-send-email-yuan.peng@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH] tests: remove the data transmit between pf and vf of veb switch. 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: Thu, 08 Feb 2018 10:03:41 -0000 remove the data transmit between pf and vf of test_VEB_switching_inter_vfs_and_pf which belongs to TestSuite_veb_switch.py. because pf doesn't count the packet from vf which is rooted to itself. Signed-off-by: Peng Yuan diff --git a/tests/TestSuite_veb_switch.py b/tests/TestSuite_veb_switch.py index c1953e2..6e90745 100644 --- a/tests/TestSuite_veb_switch.py +++ b/tests/TestSuite_veb_switch.py @@ -324,62 +324,10 @@ class TestVEBSwitching(TestCase): """ DPDK PF, then create 2VFs, PF in the host running dpdk testpmd, VFs running dpdk testpmd, VF1 send traffic to VF2, check if VF2 can receive - the packets. send tracfic from PF to VF1, ensure PF->VF1; send traffic - from VF1 to PF, ensure VF1->PF can work. + the packets. send tracfic from tester to VF1, ensure outer tester->VF1 + can work. """ - # VF->PF self.setup_env(driver=self.drivername) - self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 --socket-mem 1024,1024 -w %s --file-prefix=test1 -- -i" % (self.target, self.pf_pci), "testpmd>", 120) - self.dut.send_expect("set fwd rxonly", "testpmd>") - self.dut.send_expect("set promisc all off", "testpmd>") - self.dut.send_expect("start", "testpmd>") - time.sleep(2) - self.session_secondary.send_expect("./%s/app/testpmd -c 0xf0 -n 4 --socket-mem 1024,1024 -w %s --file-prefix=test2 -- -i --eth-peer=0,%s" % (self.target, self.sriov_vfs_port[0].pci, self.pf_mac_address), "testpmd>", 120) - self.session_secondary.send_expect("set fwd txonly", "testpmd>") - self.session_secondary.send_expect("set promisc all off", "testpmd>") - self.session_secondary.send_expect("start", "testpmd>") - time.sleep(2) - - self.session_secondary.send_expect("stop", "testpmd>", 2) - self.dut.send_expect("stop", "testpmd>", 2) - - vf0_tx_stats = self.veb_get_pmd_stats("second", 0, "tx") - pf_rx_stats = self.veb_get_pmd_stats("first", 0, "rx") - self.verify(vf0_tx_stats[0] != 0, "no packet was sent by VF0") - self.verify(pf_rx_stats[0] != 0, "no packet was received by PF") - self.verify(vf0_tx_stats[0]*0.5 < pf_rx_stats[0], "PF failed to receive most packets from VF0") - self.session_secondary.send_expect("quit", "# ") - time.sleep(2) - self.dut.send_expect("quit", "# ") - time.sleep(2) - - #PF->VF - self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 --socket-mem 1024,1024 -w %s --file-prefix=test1 -- -i --eth-peer=0,%s" % (self.target, self.pf_pci, self.vf0_mac), "testpmd>", 120) - self.dut.send_expect("set fwd txonly", "testpmd>") - self.dut.send_expect("set promisc all off", "testpmd>") - - self.session_secondary.send_expect("./%s/app/testpmd -c 0xf0 -n 4 --socket-mem 1024,1024 -w %s --file-prefix=test2 -- -i" % (self.target, self.sriov_vfs_port[0].pci), "testpmd>", 120) - self.session_secondary.send_expect("mac_addr add 0 %s" % self.vf0_mac, "testpmd>") - self.session_secondary.send_expect("set fwd rxonly", "testpmd>") - self.session_secondary.send_expect("set promisc all off", "testpmd>") - self.session_secondary.send_expect("start", "testpmd>") - time.sleep(2) - self.dut.send_expect("start", "testpmd>") - time.sleep(2) - - self.dut.send_expect("stop", "testpmd>", 2) - self.session_secondary.send_expect("stop", "testpmd>", 2) - - vf0_rx_stats = self.veb_get_pmd_stats("second", 0, "rx") - pf_tx_stats = self.veb_get_pmd_stats("first", 0, "tx") - self.verify(pf_tx_stats[0] != 0, "no packet was sent by PF") - self.verify(vf0_rx_stats[0] != 0, "no packet was received by VF0") - self.verify(vf0_rx_stats[0] > pf_tx_stats[0]*0.5, "VF0 failed to receive most packets from PF") - self.session_secondary.send_expect("quit", "# ") - time.sleep(2) - self.dut.send_expect("quit", "# ") - time.sleep(2) - # tester->VF self.dut.send_expect("./%s/app/testpmd -c 0xf -n 4 --socket-mem 1024,1024 -w %s --file-prefix=test1 -- -i" % (self.target, self.pf_pci), "testpmd>", 120) self.dut.send_expect("set fwd mac", "testpmd>") -- 2.5.0