[dts] [PATCH] tests: remove the data transmit between pf and vf of veb switch.
Peng Yuan
yuan.peng at intel.com
Thu Feb 8 11:04:52 CET 2018
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 <yuan.peng at intel.com>
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
More information about the dts
mailing list