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 19644A055D; Wed, 3 Mar 2021 08:03:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0574A40683; Wed, 3 Mar 2021 08:03:01 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id DC35A4067B for ; Wed, 3 Mar 2021 08:02:58 +0100 (CET) IronPort-SDR: /COTZptaPyVK9UhegfbR7Nuei7RnrHP0IN7i8hdRJCQ89RG4NpEJNOU2wEgTSU0nfKCB3nMO2Y QlDTgZcCZB6g== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="184702832" X-IronPort-AV: E=Sophos;i="5.81,219,1610438400"; d="scan'208";a="184702832" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 23:02:57 -0800 IronPort-SDR: c3oYc+5Uy8kQve/QI8+jJHw+lqJC8XI4ehrkErzFT5P00zrbAT16q5++0cvfCBnhGG7eKUXeXf 2VqTw8J6iSCQ== X-IronPort-AV: E=Sophos;i="5.81,219,1610438400"; d="scan'208";a="435931970" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2021 23:02:20 -0800 From: Hailin Xu To: dts@dpdk.org Cc: xueqin.lin@intel.com, Hailin Xu Date: Wed, 3 Mar 2021 14:50:26 +0800 Message-Id: <1614754226-89054-1-git-send-email-hailinx.xu@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH v2] test_plans/flexible_rxd_test_plan:add MPLS 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" v1: add MPLS test cases. v2: modify hierarc. Signed-off-by: Hailin Xu --- 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