From: Hailin Xu <hailinx.xu@intel.com>
To: dts@dpdk.org
Cc: xueqin.lin@intel.com, Hailin Xu <hailinx.xu@intel.com>
Subject: [dts] [PATCH v2] test_plans/flexible_rxd_test_plan:add MPLS cases
Date: Wed, 3 Mar 2021 14:50:26 +0800 [thread overview]
Message-ID: <1614754226-89054-1-git-send-email-hailinx.xu@intel.com> (raw)
v1: add MPLS test cases.
v2: modify hierarc.
Signed-off-by: Hailin Xu <hailinx.xu@intel.com>
---
test_plans/flexible_rxd_test_plan.rst | 330 +++++++++++++++++++++++++-
1 file changed, 326 insertions(+), 4 deletions(-)
diff --git a/test_plans/flexible_rxd_test_plan.rst b/test_plans/flexible_rxd_test_plan.rst
index 1520d5f6..c3a0e1c6 100644
--- a/test_plans/flexible_rxd_test_plan.rst
+++ b/test_plans/flexible_rxd_test_plan.rst
@@ -45,7 +45,7 @@ network interface card.
Prerequisites
=============
-Copy correct ``ice.pkg`` into ``/usr/lib/firmware/intel/ice/ddp/``, \
+Copy correct ``ice.pkg`` into ``/lib/firmware/updates/intel/ice/ddp/``, \
For the test cases, comms package is expected.
Prepare test toplogoy, in the test case, it requires
@@ -89,8 +89,6 @@ Bind Intel E810 interface to igb_uio driver, (e.g. 0000:18:00.0) ::
./usertools/dpdk-devbind.py -b igb_uio 18:00.0
-
-
Test Case 01: Check single VLAN fields in RXD (802.1Q)
======================================================
@@ -116,7 +114,7 @@ Send a packet with VLAN tag from test network interface::
Please notice
- Change ethernet source address with your test network interface's address
-- Make sure the ethernet destination addres is NOT your real E810 interface's address
+- Make sure the ethernet destination address is NOT your real E810 interface's address
Check the output in testpmd, **ctag=1:0:23** is expected, which is consistent with VLAN tag set in test packet::
@@ -372,3 +370,327 @@ Replace correct ice.pkg to /lib/firmware/updates/intel/ice/ddp/ice.pkg,then relo
rmmod ice
modprobe ice.ko
+
+MPLS cases
+==========
+
+Test steps are same to ``Test Case 01``, just change the launch command of testpmd, test packet and expected output
+
+MPLS cases use same parameter Launch testpmd::
+
+ ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 6-9 -n 4 -w af:01.0,proto_xtr=ip_offset -- -i --portmask=0x1 --nb-cores=2
+
+check RXDID value correct::
+
+ expected: RXDID[25]
+
+scapy prepare::
+
+ about scapy:
+ from scapy.contrib.mpls import MPLS
+
+Test Case: Check ip offset of ip
+--------------------------------
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=18
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=18
+
+Test Case: check ip offset with vlan
+------------------------------------
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=22
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=22
+
+Test Case: check offset with 2 vlan tag
+---------------------------------------
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=26
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=26
+
+Test Case: check ip offset with multi MPLS
+------------------------------------------
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=18
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=22
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=26
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=30
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=34
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=18
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=22
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=26
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=30
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=34
+
+Test Case: check ip offset with multi MPLS with vlan tag
+--------------------------------------------------------
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=22
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=26
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=30
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=34
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=38
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=22
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=26
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=30
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=34
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=38
+
+Test Case: check ip offset with multi MPLS with 2 vlan tag
+----------------------------------------------------------
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=26
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=30
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=34
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=38
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IP()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=42
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=26
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=30
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=34
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=38
+
+Test packet::
+
+ p = Ether(dst="00:11:22:33:44:55",type=0x88A8)/Dot1Q(type=0x8100)/Dot1Q(type=0x8847)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=0)/MPLS(s=1)/IPv6()
+
+Expected output in testpmd::
+
+ Protocol Offset:ip_offset=42
--
2.17.1
next reply other threads:[~2021-03-03 7:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 6:50 Hailin Xu [this message]
2021-03-04 5:13 ` Lin, Xueqin
2021-03-04 8:36 ` Tu, Lijuan
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=1614754226-89054-1-git-send-email-hailinx.xu@intel.com \
--to=hailinx.xu@intel.com \
--cc=dts@dpdk.org \
--cc=xueqin.lin@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).