* [dts] [PATCH] tests: remove the data transmit between pf and vf of veb switch.
@ 2018-02-08 10:04 Peng Yuan
2018-02-11 2:03 ` Liu, Yong
0 siblings, 1 reply; 2+ messages in thread
From: Peng Yuan @ 2018-02-08 10:04 UTC (permalink / raw)
To: dts; +Cc: Peng Yuan
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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] tests: remove the data transmit between pf and vf of veb switch.
2018-02-08 10:04 [dts] [PATCH] tests: remove the data transmit between pf and vf of veb switch Peng Yuan
@ 2018-02-11 2:03 ` Liu, Yong
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2018-02-11 2:03 UTC (permalink / raw)
To: Peng, Yuan, dts; +Cc: Peng, Yuan
Yuan,
I think PF2VF and VF2PF still can work, only the statistic can't be tracked from PF.
Can we still check the path from PF2VF by VF statistic?
Thanks,
Marvin
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Peng Yuan
> Sent: Thursday, February 08, 2018 6:05 PM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>
> Subject: [dts] [PATCH] tests: remove the data transmit between pf and vf
> of veb switch.
>
> 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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-11 2:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 10:04 [dts] [PATCH] tests: remove the data transmit between pf and vf of veb switch Peng Yuan
2018-02-11 2:03 ` Liu, Yong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).