From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4227FA034F; Wed, 24 Feb 2021 08:32:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01EAB1607BC; Wed, 24 Feb 2021 08:32:34 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id CCA544069B for ; Wed, 24 Feb 2021 08:32:31 +0100 (CET) IronPort-SDR: lX/xflZj+E/3yvzqhm+RT6Iw/X374kDvx3E/d33Rd6pLqkqoPTL+yfbO/fJQX6XflhW8dKkAdi fKhQycB9xgMg== X-IronPort-AV: E=McAfee;i="6000,8403,9904"; a="181650701" X-IronPort-AV: E=Sophos;i="5.81,202,1610438400"; d="scan'208";a="181650701" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2021 23:32:30 -0800 IronPort-SDR: Z2OvVcxOCQFb5rGpHGFzfIx8R2KvqWncK9BelkKxomrSE8WOPAnKmR0628DWK5jV7on9E1NT0G f9STYUhD7GRw== X-IronPort-AV: E=Sophos;i="5.81,202,1610438400"; d="scan'208";a="403569987" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2021 23:32:29 -0800 From: Hailin Xu To: dts@dpdk.org Cc: xueqin.lin@intel.com, Hailin Xu Date: Wed, 24 Feb 2021 15:20:54 +0800 Message-Id: <1614151254-6495-1-git-send-email-hailinx.xu@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH v1] test_plans/flexible_rxd:add MPLS test cases X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" add MPLS test cases. Signed-off-by: Hailin Xu --- test_plans/flexible_rxd_test_plan.rst | 363 +++++++++++++++++++++++++- 1 file changed, 360 insertions(+), 3 deletions(-) diff --git a/test_plans/flexible_rxd_test_plan.rst b/test_plans/flexible_rxd_test_plan.rst index 1520d5f6..47b8fbff 100644 --- a/test_plans/flexible_rxd_test_plan.rst +++ b/test_plans/flexible_rxd_test_plan.rst @@ -46,9 +46,9 @@ Prerequisites ============= Copy correct ``ice.pkg`` into ``/usr/lib/firmware/intel/ice/ddp/``, \ -For the test cases, comms package is expected. +For the test cases, os/comms/wireless package is expected, except that "test case 12" only support os package. -Prepare test toplogoy, in the test case, it requires +Prepare test toplogy, in the test case, it requires - 1 Intel E810 interface - 1 network interface for sending test packet, @@ -57,6 +57,22 @@ Prepare test toplogoy, in the test case, it requires Patch testpmd for dumping flexible fields from RXD:: + diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build + index 7e9c7bdd6..b75b90a9c 100644 + --- a/app/test-pmd/meson.build + +++ b/app/test-pmd/meson.build + @@ -49,6 +49,9 @@ endif + if dpdk_conf.has('RTE_NET_I40E') + deps += 'net_i40e' + endif + +if dpdk_conf.has('RTE_NET_ICE') + + deps += ['net_ice', 'net_iavf'] + +endif + if dpdk_conf.has('RTE_NET_IXGBE') + deps += 'net_ixgbe' + endif + + diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index a1164b7..b90344d 100644 --- a/app/test-pmd/util.c @@ -116,7 +132,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:: @@ -345,6 +361,7 @@ Expected output in testpmd:: Test Case 12: Check effect of replacing pkg from RXID #22 to RXID #16 ===================================================================== +the case only support os pkg Put the ice.pkg with RXID #16(ice-1.3.7.0.pkg and more) to /lib/firmware/updates/intel/ice/ddp/ice.pkg, then reload ice driver:: @@ -372,3 +389,343 @@ Replace correct ice.pkg to /lib/firmware/updates/intel/ice/ddp/ice.pkg,then relo rmmod ice modprobe ice.ko + +Test Case 13: Check testpmd use different parameters start +========================================================== +Test steps are same to ``Test Case 01``, use different "proto_xtr" parameters the launch command of testpmd, check RXDID value. + +use error parameter Launch testpmd:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 6-9 -n 4 -w af:01.0,proto_xtr=vxlan -- -i --rxq=4 --txq=4 --portmask=0x1 --nb-cores=2 + +testpmd can't started, check "iavf_lookup_flex_desc_type(): wrong flex_desc type, it should be: vlan|ipv4|ipv6|ipv6_flow|tcp|ovs|ip_offset" in testpmd output. + +don't use parameter launch testpmd:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 6-9 -n 4 -w af:01.0 -- -i --rxq=4 --txq=4 --portmask=0x1 --nb-cores=2 + +testpmd started, check "iavf_configure_queues(): request RXDID[16] in Queue[0]" in testpmd output + +MPLS TEST +=================== + +Test steps are same to ``Test Case 01``, just change the launch command of testpmd, test packet and expected output + +all 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 14: 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 15: 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 16: 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 17: 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 18: 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 19: 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