From: Peng Yuan <yuan.peng@intel.com>
To: dts@dpdk.org
Cc: Peng Yuan <yuan.peng@intel.com>
Subject: [dts] [PATCH] tests: veb_switch remove transit between vf and pf
Date: Tue, 6 Feb 2018 15:45:40 +0800 [thread overview]
Message-ID: <1517903140-42927-1-git-send-email-yuan.peng@intel.com> (raw)
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
next reply other threads:[~2018-02-06 7:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 7:45 Peng Yuan [this message]
2018-02-08 6:16 ` Liu, Yong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1517903140-42927-1-git-send-email-yuan.peng@intel.com \
--to=yuan.peng@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).