From: "Li, WeiyuanX" <weiyuanx.li@intel.com>
To: dts@dpdk.org, yuan.peng@intel.com
Cc: Weiyuan Li <weiyuanx.li@intel.com>
Subject: [dts][PATCH V1 2/2] tests/vf_vlan: modify script VLAN filter enable requires a port VLAN is assigned
Date: Wed, 1 Jun 2022 18:03:31 +0800 [thread overview]
Message-ID: <20220601100331.66-2-weiyuanx.li@intel.com> (raw)
In-Reply-To: <20220601100331.66-1-weiyuanx.li@intel.com>
From: Weiyuan Li <weiyuanx.li@intel.com>
Modify script VLAN filter enable requires a port VLAN is assigned.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
v2:
-Add comment restart testpmd after remove VLAN from PF devcie according to test plan modification.
-Modify error command 'vx_vlan' to 'rx_vlan'.
tests/TestSuite_vf_vlan.py | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
index e73ad479..2a4fbeae 100644
--- a/tests/TestSuite_vf_vlan.py
+++ b/tests/TestSuite_vf_vlan.py
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2020 Intel Corporation
+# Copyright(c) 2022 Intel Corporation
#
import random
@@ -222,14 +222,20 @@ class TestVfVlan(TestCase):
# remove vlan
self.vm0_testpmd.execute_cmd("stop")
- self.vm0_testpmd.execute_cmd("port stop all")
+ # self.vm0_testpmd.execute_cmd("port stop all")
+ self.vm0_testpmd.quit()
+
self.dut.send_expect("ip link set %s vf 0 vlan 0" % self.host_intf0, "# ")
out = self.dut.send_expect("ip link show %s" % self.host_intf0, "# ")
self.verify("vlan %d" % random_vlan not in out, "Failed to remove pvid on VF0")
# send packet with vlan
- self.vm0_testpmd.execute_cmd("port reset 0", "testpmd> ", 120)
- self.vm0_testpmd.execute_cmd("port start all")
+ self.vm0_testpmd.start_testpmd("all")
+ self.vm0_testpmd.execute_cmd("set fwd mac")
+ self.vm0_testpmd.execute_cmd("set verbose 1")
+ self.vm0_testpmd.execute_cmd("vlan set filter on 0")
+ self.vm0_testpmd.execute_cmd("vlan set strip on 0")
+ self.vm0_testpmd.execute_cmd("rx_vlan add 10 0")
self.vm0_testpmd.execute_cmd("start")
out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP")
@@ -305,6 +311,7 @@ class TestVfVlan(TestCase):
self.vm0_testpmd.execute_cmd("vlan set strip on 0")
self.vm0_testpmd.execute_cmd("vlan set filter on 0")
self.vm0_testpmd.execute_cmd("set promisc all off")
+ self.vm0_testpmd.execute_cmd("rx_vlan add 10 0")
self.vm0_testpmd.execute_cmd("start")
# send packet without vlan
@@ -340,7 +347,7 @@ class TestVfVlan(TestCase):
for rx_vlan in rx_vlans:
self.vm0_testpmd.execute_cmd("rx_vlan rm %d 0" % rx_vlan)
-
+ self.vm0_testpmd.execute_cmd("rx_vlan add 10 0")
# send packet with vlan 0
out = self.send_and_getout(vlan=0, pkt_type="VLAN_UDP")
self.verify("VLAN tci=0x0" in out, "Not received vlan 0 packet as default!!!")
--
2.17.1
next prev parent reply other threads:[~2022-06-01 10:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 10:03 [dts][PATCH V1 1/2] tests/kernelpf_iavf: " Li, WeiyuanX
2022-06-01 10:03 ` Li, WeiyuanX [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-06-01 6:22 Li, WeiyuanX
2022-06-01 6:22 ` [dts][PATCH V1 2/2] tests/vf_vlan: " Li, WeiyuanX
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=20220601100331.66-2-weiyuanx.li@intel.com \
--to=weiyuanx.li@intel.com \
--cc=dts@dpdk.org \
--cc=yuan.peng@intel.com \
/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).