* [dts] [PATCH V1 0/4] add case to test vlan priority value
@ 2023-04-17 17:41 Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 1/4] test_plans/kernelpf_iavf: add testing steps " Jiale Song
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Jiale Song @ 2023-04-17 17:41 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
add case to test vlan priority value.
Jiale Song (4):
test_plans/kernelpf_iavf: add testing steps to test vlan priority value
tests/kernelpf_iavf: add testing steps to test vlan priority value
test_plans/dual_vlan: add a case to test vlan priority value
tests/dual_vlan: add a case to test vlan priority value
test_plans/dual_vlan_test_plan.rst | 37 ++++++++++++++++++++
test_plans/kernelpf_iavf_test_plan.rst | 9 ++---
tests/TestSuite_dual_vlan.py | 47 ++++++++++++++++++++++++++
tests/TestSuite_kernelpf_iavf.py | 24 +++++++------
4 files changed, 103 insertions(+), 14 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 1/4] test_plans/kernelpf_iavf: add testing steps to test vlan priority value
2023-04-17 17:41 [dts] [PATCH V1 0/4] add case to test vlan priority value Jiale Song
@ 2023-04-17 17:41 ` Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 2/4] tests/kernelpf_iavf: " Jiale Song
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Jiale Song @ 2023-04-17 17:41 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
add testing steps to test vlan priority value.
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
test_plans/kernelpf_iavf_test_plan.rst | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/test_plans/kernelpf_iavf_test_plan.rst b/test_plans/kernelpf_iavf_test_plan.rst
index cab1106f..ed6d9488 100644
--- a/test_plans/kernelpf_iavf_test_plan.rst
+++ b/test_plans/kernelpf_iavf_test_plan.rst
@@ -391,7 +391,7 @@ Test case: IAVF DUAL VLAN filtering
3. tester send qinq pkt and single vlan pkt which outer vlan id is 1 to VF::
- sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+ sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=1,type=0x8100,prio=1)/Dot1Q(vlan=2,type=0x0800,prio=2)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
4. check the pkts can't be received in VF, but if the kernel cannot set ``vf-vlan-pruning``, check can receive 2 pkts in VF.
@@ -402,6 +402,7 @@ Test case: IAVF DUAL VLAN filtering
6. repeat step 3, check the pkts can be received by VF and fwd to tester::
+ check the pkts can be received by PF and fwd to tester with inner and outer correct vlan ID and priority value.
testpmd> port 0/queue 0: received 1 packets
src=00:00:00:00:00:00 - dst=00:11:22:33:44:11 - type=0x8100 - length=522 - nb_segs=1 - hw ptype: L2_ETHER - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN - l2_len=18 - inner_l2_len=4 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
@@ -411,15 +412,15 @@ Test case: IAVF DUAL VLAN filtering
tcpdump -i ens786f0 -nn -e -v
- 16:50:38.807158 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype 0x0800,
- 16:50:38.807217 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 1, p 0, ethertype 802.1Q, vlan 2, p 0, ethertype 0x0800,
+ 16:50:38.807158 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 522: vlan 1, p 1, ethertype 802.1Q, vlan 2, p 2, ethertype 0x0800,
+ 16:50:38.807217 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 1, p 1, ethertype 802.1Q, vlan 2, p 2, ethertype 0x0800,
16:51:06.083084 00:00:00:00:00:00 > 00:11:22:33:44:11, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype 0x0800,
16:51:06.083127 00:11:22:33:44:11 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 518: vlan 1, p 0, ethertype 0x0800,
7. tester send qinq pkt and single vlan pkt which outer vlan id is 11 to VF::
- sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=11,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
+ sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=11,type=0x8100,prio=1)/Dot1Q(vlan=2,type=0x0800,prio=2)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
sendp([Ether(dst="00:11:22:33:44:11",type=0x8100)/Dot1Q(vlan=11,type=0x0800)/IP(src="196.222.232.221")/("X"*480)], iface="ens786f0")
8. check the pkts can not be received by VF.
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 2/4] tests/kernelpf_iavf: add testing steps to test vlan priority value
2023-04-17 17:41 [dts] [PATCH V1 0/4] add case to test vlan priority value Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 1/4] test_plans/kernelpf_iavf: add testing steps " Jiale Song
@ 2023-04-17 17:41 ` Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 3/4] test_plans/dual_vlan: add a case " Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 4/4] tests/dual_vlan: " Jiale Song
3 siblings, 0 replies; 7+ messages in thread
From: Jiale Song @ 2023-04-17 17:41 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
1. add testing steps to test vlan priority value.
2. modify test scripts to support i40e nic.
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
tests/TestSuite_kernelpf_iavf.py | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index 6b6c573c..c69b8748 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -128,10 +128,9 @@ class TestKernelpfIavf(TestCase):
self.verify(res, "%s link status is down" % self.host_intf)
out = self.dut.send_expect("ethtool %s" % self.host_intf, "#")
self.speed = int(re.findall("Speed: (\d*)", out)[0]) // 1000
- if self.is_eth_series_nic(800):
- self.dut.send_expect(
- "ip link set %s vf 0 spoofchk off" % (self.host_intf), "# "
- )
+ self.dut.send_expect(
+ "ip link set %s vf 0 spoofchk off" % (self.host_intf), "# "
+ )
if self.running_case == "test_vf_multicast":
self.dut.send_expect(
"ethtool --set-priv-flags %s vf-true-promisc-support on"
@@ -849,14 +848,13 @@ class TestKernelpfIavf(TestCase):
packets = len(re.findall("received 1 packets", out))
self.verify(packets == 10, "Not receive expected packet")
- @check_supported_nic(ice_nic)
def test_iavf_dual_vlan_filter(self):
"""
Test case: IAVF DUAL VLAN filtering
"""
self.skip_case(not self.dcf_mode, "the case not support dcf mode")
pkt_list1 = [
- 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)'
+ 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x8100,prio=1)/Dot1Q(vlan=2,type=0x0800,prio=2)/IP(src="196.222.232.221")/("X"*480)'
% self.vf_mac,
'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)'
% self.vf_mac,
@@ -888,8 +886,16 @@ class TestKernelpfIavf(TestCase):
tcpdump_out = self.get_tcpdump_package()
receive_pkt = re.findall("dst=%s" % self.vf_mac, out)
self.verify(len(receive_pkt) == 2, "Failed error received vlan packet!")
- tester_pkt = re.findall("vlan \d+", tcpdump_out)
- self.verify(len(tester_pkt) == 6, "Failed pass received vlan packet!")
+ tester_pkt = re.findall("vlan\s+\d+, p\s+\d+", tcpdump_out)
+ vlan_prio_1 = re.findall("vlan\s+\d+, p\s+1", tcpdump_out)
+ vlan_prio_2 = re.findall("vlan\s+\d+, p\s+2", tcpdump_out)
+ self.verify(len(tester_pkt) == 6, "Received incorrect vlan packet!")
+ self.verify(
+ len(vlan_prio_1) == 2, "Received incorrect priority 1 vlan packet!!"
+ )
+ self.verify(
+ len(vlan_prio_2) == 2, "Received incorrect priority 2 vlan packet!!!"
+ )
out = self.send_pkts_getouput(self.tester_intf, pkt_list2)
receive_pkt = re.findall("dst=%s" % self.vf_mac, out)
@@ -903,7 +909,6 @@ class TestKernelpfIavf(TestCase):
else:
self.verify(len(receive_pkt) == 2, "Failed error received vlan packet!")
- @check_supported_nic(ice_nic)
def test_iavf_dual_vlan_strip(self):
"""
Test case: IAVF DUAL VLAN header stripping
@@ -1047,7 +1052,6 @@ class TestKernelpfIavf(TestCase):
return []
return value_list
- @check_supported_nic(ice_nic)
def test_iavf_dual_vlan_insert(self):
"""
Test case: IAVF DUAL VLAN header insertion
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 3/4] test_plans/dual_vlan: add a case to test vlan priority value
2023-04-17 17:41 [dts] [PATCH V1 0/4] add case to test vlan priority value Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 1/4] test_plans/kernelpf_iavf: add testing steps " Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 2/4] tests/kernelpf_iavf: " Jiale Song
@ 2023-04-17 17:41 ` Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 4/4] tests/dual_vlan: " Jiale Song
3 siblings, 0 replies; 7+ messages in thread
From: Jiale Song @ 2023-04-17 17:41 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
test_plans/dual_vlan_test_plan.rst | 37 ++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/test_plans/dual_vlan_test_plan.rst b/test_plans/dual_vlan_test_plan.rst
index 11dfa332..e8e54eac 100644
--- a/test_plans/dual_vlan_test_plan.rst
+++ b/test_plans/dual_vlan_test_plan.rst
@@ -445,3 +445,40 @@ Choose the above table's item randomly 30 times and verify that the result is ri
At last, stop packet forwarding and quit the application::
testpmd> stop
testpmd> quit
+
+Test Case: dual vlan priority rx/tx test
+========================================
+
+#. blind port to vfio-pci::
+
+ ./usertools/dpdk-devbind.py -b vfio-pci {pf0_pci} {pf1_pci}
+
+#. launch testpmd with NICs::
+
+ ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -a {pf0_pci} -a {pf1_pci} -n 4 -- -i
+
+#. set testpmd::
+
+ testpmd> set verbose 1
+ testpmd> set fwd mac
+ testpmd> start
+
+#. start tcpdump with tester rx port::
+
+ tcpdump -ei {rx_iface}
+
+#. send dual vlan packet with tester tx port::
+
+ sendp(Ether(dst="FE:EF:65:4C:2C:D0",type=0x8100)/Dot1Q(vlan=1,type=0x8100,prio=1)/Dot1Q(vlan=2,type=0x0800,prio=2)/IP(src="196.222.232.221")/("X"*480),iface="{tx_iface}",count=1,inter=0,verbose=False)
+
+#. check the pkts can be received::
+
+ testpmd> port 0/queue 0: received 1 packets
+ src=00:00:00:00:00:00 - dst=FE:EF:65:4C:2C:D0 - type=0x8100 - length=522 - nb_segs=1 - hw ptype: L2_ETHER - sw ptype: L2_ETHER_VLAN INNER_L2_ETHER_VLAN - l2_len=18 - inner_l2_len=4 - Receive queue=0x0
+ ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+
+#. check the tcpdump packet::
+
+ check the pkts can be received by PF and fwd to tester with inner and outer correct vlan ID and priority value.
+ 16:50:38.807217 FE:EF:65:4C:2C:D0 > 02:00:00:00:00:00, ethertype 802.1Q (0x8100), length 522: vlan 1, p 1, ethertype 802.1Q, vlan 2, p 2, ethertype 0x0800,
+
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 4/4] tests/dual_vlan: add a case to test vlan priority value
2023-04-17 17:41 [dts] [PATCH V1 0/4] add case to test vlan priority value Jiale Song
` (2 preceding siblings ...)
2023-04-17 17:41 ` [dts] [PATCH V1 3/4] test_plans/dual_vlan: add a case " Jiale Song
@ 2023-04-17 17:41 ` Jiale Song
2023-04-27 7:30 ` Peng, Yuan
2023-04-27 7:38 ` lijuan.tu
3 siblings, 2 replies; 7+ messages in thread
From: Jiale Song @ 2023-04-17 17:41 UTC (permalink / raw)
To: dts; +Cc: Jiale Song
add a case to test vlan priority value.
Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
tests/TestSuite_dual_vlan.py | 47 ++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/tests/TestSuite_dual_vlan.py b/tests/TestSuite_dual_vlan.py
index 70395663..59b39eb3 100644
--- a/tests/TestSuite_dual_vlan.py
+++ b/tests/TestSuite_dual_vlan.py
@@ -14,6 +14,7 @@ import re
import time
import framework.utils as utils
+from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
@@ -68,6 +69,7 @@ class TestDualVlan(TestCase):
out = self.dut.send_expect("set fwd mac", "testpmd> ")
self.verify("Set mac packet forwarding mode" in out, "set fwd mac error")
+ self.dut.send_expect("set verbose 1", "testpmd> ")
out = self.dut.send_expect("start", "testpmd> ", 120)
# Vlan id
@@ -387,6 +389,25 @@ class TestDualVlan(TestCase):
for line in resultList:
self.verify(line in out, "receive packet is wrong:%s" % out)
+ def send_pkts_get_testpmd_tcpdump_output(
+ self, dut_rx_port, dut_tx_port, pkts, count=1
+ ):
+ tester_tx_port = self.tester.get_local_port(dut_rx_port)
+ tester_tx_port_iface = self.tester.get_interface(tester_tx_port)
+ tester_rx_port = self.tester.get_local_port(dut_tx_port)
+ tester_rx_port_ifac = self.tester.get_interface(tester_rx_port)
+ self.start_tcpdump(tester_rx_port_ifac)
+ self.pkt = Packet()
+ self.pkt.update_pkt(pkts)
+ self.pkt.send_pkt(crb=self.tester, tx_port=tester_tx_port_iface, count=count)
+ time.sleep(1)
+ out = self.pmdout.get_output()
+ port_stats = self.pmdout.execute_cmd("show port stats all")
+ self.pmdout.execute_cmd("clear port stats all")
+ pmd_out = out + port_stats
+ tcpdump_out = self.get_tcpdump_package()
+ return pmd_out, tcpdump_out
+
def set_up(self):
"""
Run before each test case.
@@ -674,6 +695,32 @@ class TestDualVlan(TestCase):
rand = random.randint(0, 15)
self.multimode_test(rand)
+ def test_dual_vlan_priority_rxtx(self):
+ """
+ Test Case: dual vlan priority rx/tx test
+ """
+ mac = self.dut.get_mac_address(dutRxPortId)
+ pkts = [
+ 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x8100,prio=1)/Dot1Q(vlan=2,type=0x0800,prio=2)/IP(src="196.222.232.221")/("X"*480)'
+ % mac,
+ ]
+ self.mode_config(filter="off", extend="off", strip="off")
+ pmd_output, tcpdump_out = self.send_pkts_get_testpmd_tcpdump_output(
+ dutRxPortId, dutTxPortId, pkts, count=1
+ )
+ receive_pkt = re.findall("(?i)dst=%s" % mac, pmd_output)
+ self.verify(len(receive_pkt) == 1, "Failed error received vlan packet!")
+ tester_pkt = re.findall("vlan\s+\d+, p\s+\d+", tcpdump_out)
+ vlan_prio_1 = re.findall("vlan\s+\d+, p\s+1", tcpdump_out)
+ vlan_prio_2 = re.findall("vlan\s+\d+, p\s+2", tcpdump_out)
+ self.verify(len(tester_pkt) == 2, "Received incorrect vlan packet!")
+ self.verify(
+ len(vlan_prio_1) == 1, "Received incorrect priority 1 vlan packet!!"
+ )
+ self.verify(
+ len(vlan_prio_2) == 1, "Received incorrect priority 2 vlan packet!!!"
+ )
+
def tear_down(self):
"""
Run after each test case.
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [dts] [PATCH V1 4/4] tests/dual_vlan: add a case to test vlan priority value
2023-04-17 17:41 ` [dts] [PATCH V1 4/4] tests/dual_vlan: " Jiale Song
@ 2023-04-27 7:30 ` Peng, Yuan
2023-04-27 7:38 ` lijuan.tu
1 sibling, 0 replies; 7+ messages in thread
From: Peng, Yuan @ 2023-04-27 7:30 UTC (permalink / raw)
To: Jiale, SongX, dts; +Cc: Jiale, SongX
> -----Original Message-----
> From: Jiale Song <songx.jiale@intel.com>
> Sent: Tuesday, April 18, 2023 1:42 AM
> To: dts@dpdk.org
> Cc: Jiale, SongX <songx.jiale@intel.com>
> Subject: [dts] [PATCH V1 4/4] tests/dual_vlan: add a case to test vlan priority
> value
>
> add a case to test vlan priority value.
>
> Signed-off-by: Jiale Song <songx.jiale@intel.com>
> ---
Acked-by: Yuan Peng <yuan.peng@intel.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dts] [PATCH V1 4/4] tests/dual_vlan: add a case to test vlan priority value
2023-04-17 17:41 ` [dts] [PATCH V1 4/4] tests/dual_vlan: " Jiale Song
2023-04-27 7:30 ` Peng, Yuan
@ 2023-04-27 7:38 ` lijuan.tu
1 sibling, 0 replies; 7+ messages in thread
From: lijuan.tu @ 2023-04-27 7:38 UTC (permalink / raw)
To: dts, Jiale Song; +Cc: Jiale Song
On Mon, 17 Apr 2023 17:41:55 +0000, Jiale Song <songx.jiale@intel.com> wrote:
> add a case to test vlan priority value.
>
> Signed-off-by: Jiale Song <songx.jiale@intel.com>
Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Series applied, thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-04-27 7:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17 17:41 [dts] [PATCH V1 0/4] add case to test vlan priority value Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 1/4] test_plans/kernelpf_iavf: add testing steps " Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 2/4] tests/kernelpf_iavf: " Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 3/4] test_plans/dual_vlan: add a case " Jiale Song
2023-04-17 17:41 ` [dts] [PATCH V1 4/4] tests/dual_vlan: " Jiale Song
2023-04-27 7:30 ` Peng, Yuan
2023-04-27 7:38 ` lijuan.tu
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).