From: Weiyuan Li <weiyuanx.li@intel.com>
To: dts@dpdk.org
Cc: Weiyuan Li <weiyuanx.li@intel.com>
Subject: [dts][PATCH V1 1/2] test_plans/mac_filter: add the vlan filter check after setting multicast filter
Date: Thu, 12 Jan 2023 17:15:18 +0800 [thread overview]
Message-ID: <20230112091519.29607-1-weiyuanx.li@intel.com> (raw)
Add the vlan filter check after setting multicast filter.
1. Enable vlan filter and add vlan id. Send a packet with multicast dst
mac and vlan tag can receive packet.
2. Disable vlan filter and remove vlan id. Send a packet with multicast
dst mac can receive packet.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
test_plans/mac_filter_test_plan.rst | 31 +++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/test_plans/mac_filter_test_plan.rst b/test_plans/mac_filter_test_plan.rst
index 09335930..58acda39 100644
--- a/test_plans/mac_filter_test_plan.rst
+++ b/test_plans/mac_filter_test_plan.rst
@@ -162,6 +162,37 @@ Send a packet with multicast destination MAC address to port 0::
src=52:00:00:00:00:00 - dst=01:00:5E:00:00:00 - type=0x0800 - length=60 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
+Enable vlan filter and add vlan id::
+
+ testpmd> vlan set filter on 0
+ testpmd> rx_vlan add 4012 0
+
+Send a packet with multicast destination MAC address and vlan tag to port 0::
+
+ sendp([Ether(dst='01:00:5E:00:00:00', src='00:00:20:00:00:00')/Dot1Q(vlan=2960, prio=0)/IP()/UDP()/Raw(load=b'XXXXXXXXXXXXXX')],iface="ens256f0",count=1,inter=0,verbose=False)
+
+Check can receive the packet::
+
+ port 0/queue 0: received 1 packets
+ src=00:00:20:00:00:00 - dst=01:00:5E:00:00:00 - pool=mb_pool_0 - type=0x8100 - length=60 - nb_segs=1 - VLAN tci=0x0 - hw ptype: L2_ETHER L3_IPV4 L4_UDP - sw ptype: L2_ETHER_VLAN L3_IPV4 L4_UDP - l2_len=18 - l3_len=20 - l4_len=8 - Receive queue=0x0
+ ol_flags: RTE_MBUF_F_RX_VLAN RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN
+
+Send a packet with multicast destination MAC address and wrong vlan tag to port 0::
+
+ sendp([Ether(dst='01:00:5E:00:00:00', src='00:00:20:00:00:00')/Dot1Q(vlan=2959, prio=0)/IP()/UDP()/Raw(load=b'XXXXXXXXXXXXXX')],iface="ens256f0",count=4,inter=0,verbose=False)
+
+Check can't receive the packet.
+
+Disable vlan filter and remove vlan id::
+
+ testpmd> rx_vlan remove 4012 0
+ testpmd> vlan set filter off 0
+
+Send a packet with multicast destination MAC address to port 0::
+
+ port 0/queue 0: received 1 packets
+ src=52:00:00:00:00:00 - dst=01:00:5E:00:00:00 - type=0x0800 - length=60 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_UDP - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - Receive queue=0x0
+ ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
Remove the multicast MAC address from the multicast filter::
--
2.27.0
next reply other threads:[~2023-01-12 9:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 9:15 Weiyuan Li [this message]
2023-01-12 9:15 ` [dts][PATCH V1 2/2] tests/mac_filter: " Weiyuan Li
2023-01-13 2:46 ` lijuan.tu
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=20230112091519.29607-1-weiyuanx.li@intel.com \
--to=weiyuanx.li@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).