From patchwork Thu Feb 10 07:44:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 107215 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64B55A00C2; Thu, 10 Feb 2022 08:55:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 291454013F; Thu, 10 Feb 2022 08:55:59 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 5AB7540041 for ; Thu, 10 Feb 2022 08:55:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644479757; x=1676015757; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=LnWVM6+pOr7EQpCJ8sKJrVYsvPJqrXZwT1KyFBekOxY=; b=JVxnpQCFNdRpLtaxaS+UV0JKObHQfPdDzh9XnYFFUDbuooWEY7+kFoH3 lDGqS9ZEqDTx+HY/+34/2c4Ou96CRIsHxaIsK6/t72MKho3BMOw1S81Oe J8rNOlUp7n5LWN6IBXjVf7RbSHnlmahfsPwk5BYYZb3PTk7b7so6S21/C s0Ykimz7wnNQ0aPFrb+NYtr8D0byenJacjK/iwzH+RrGxCN9KeYn4Bl4J VvhtPeLrD4K3bN2/LsZwkd3ZraD5BX5pZuCGmoigyKsZzoj6VoMqQhkD0 8nVAhiC24VPS4zc2jA+W1RhvnnVqZJFtZwf3T9GnTGy5c5WFIVQEt4fiu A==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="247018543" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="247018543" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 23:55:56 -0800 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="679061032" Received: from unknown (HELO localhost.localdomain) ([10.239.251.41]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 23:55:54 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan li Subject: [dts][PATCH V1 1/2] tests/TestSuite_ipfrag: remove dpdk code modification. Date: Thu, 10 Feb 2022 15:44:00 +0800 Message-Id: <20220210074401.449687-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 From: Weiyuan li 1.Remove dpdk code modification. 2.Modify port 0 receive packets and transfer to port 1 based the route table,change IPV4 100.10.0.1 to 100.20.0.1 and IPV6 101:101:101:101:101:101:101:101 to 201:101:101:101:101:101:101:101. Signed-off-by: Weiyuan li --- tests/TestSuite_ipfrag.py | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py index 71e3e789..8b58bb77 100644 --- a/tests/TestSuite_ipfrag.py +++ b/tests/TestSuite_ipfrag.py @@ -45,17 +45,6 @@ from framework.pktgen import PacketGeneratorHelper from framework.settings import HEADER_SIZE from framework.test_case import TestCase -lpm_table_ipv4 = [ - "{RTE_IPV4(100,10,0,0), 16, P1}", - "{RTE_IPV4(100,20,0,0), 16, P1}", - "{RTE_IPV4(100,30,0,0), 16, P0}", - "{RTE_IPV4(100,40,0,0), 16, P0}", - "{RTE_IPV4(100,50,0,0), 16, P1}", - "{RTE_IPV4(100,60,0,0), 16, P1}", - "{RTE_IPV4(100,70,0,0), 16, P0}", - "{RTE_IPV4(100,80,0,0), 16, P0}", -] - lpm_table_ipv6 = [ "{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, P1}", "{{2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, P1}", @@ -100,24 +89,6 @@ class TestIpfrag(TestCase): P0 = self.ports[0] P1 = self.ports[1] - pat = re.compile("P([0123])") - - # Prepare long prefix match table, replace P(x) port pattern - lpmStr_ipv4 = "static struct l3fwd_ipv4_route " \ - "l3fwd_ipv4_route_array[] = {\\\n" - rtLpmTbl = list(lpm_table_ipv4) - for idx in range(len(rtLpmTbl)): - rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx]) - lpmStr_ipv4 = lpmStr_ipv4 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n" - lpmStr_ipv4 = lpmStr_ipv4 + "};" - lpmStr_ipv6 = "static struct l3fwd_ipv6_route l3fwd_ipv6_route_array[] = {\\\n" - rtLpmTbl = list(lpm_table_ipv6) - for idx in range(len(rtLpmTbl)): - rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx]) - lpmStr_ipv6 = lpmStr_ipv6 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n" - lpmStr_ipv6 = lpmStr_ipv6 + "};" - self.dut.send_expect(r"sed -i '/l3fwd_ipv4_route_array\[\].*{/,/^\}\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv4, "# ") - self.dut.send_expect(r"sed -i '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ") # make application out = self.dut.build_dpdk_apps("examples/ip_fragmentation") self.verify("Error" not in out, "compilation error 1") @@ -172,7 +143,7 @@ class TestIpfrag(TestCase): pkt_size = pkt_sizes[pkt_sizes.index(size) + times] pkt = Packet(pkt_type='UDP', pkt_len=pkt_size) pkt.config_layer('ether', {'dst': '%s' % self.dmac}) - pkt.config_layer('ipv4', {'dst': '100.10.0.1', 'src': '1.2.3.4', 'flags': val}) + pkt.config_layer('ipv4', {'dst': '100.20.0.1', 'src': '1.2.3.4', 'flags': val}) pkt.send_pkt(self.tester, tx_port=self.txItf) # verify normal packet just by number, verify fragment packet by all elements @@ -221,7 +192,7 @@ class TestIpfrag(TestCase): pkt_size = pkt_sizes[pkt_sizes.index(size) + times] pkt = Packet(pkt_type='IPv6_UDP', pkt_len=pkt_size) pkt.config_layer('ether', {'dst': '%s' % self.dmac}) - pkt.config_layer('ipv6', {'dst': '101:101:101:101:101:101:101:101', 'src': 'ee80:ee80:ee80:ee80:ee80:ee80:ee80:ee80'}) + pkt.config_layer('ipv6', {'dst': '201:101:101:101:101:101:101:101', 'src': 'ee80:ee80:ee80:ee80:ee80:ee80:ee80:ee80'}) pkt.send_pkt(self.tester, tx_port=self.txItf) # verify normal packet just by number, verify fragment packet by all elements From patchwork Thu Feb 10 07:44:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 107216 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 537C6A034D; Thu, 10 Feb 2022 08:56:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 44D9B41169; Thu, 10 Feb 2022 08:56:00 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 2F35F40041 for ; Thu, 10 Feb 2022 08:55:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644479758; x=1676015758; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PBFPbv7UJK0TelgKhbvOchqTPLNThi7g6A/o+oB3s/0=; b=n4n//1Lp0PHp1H+Ae8fa64AkarqDIJ5eZiHp5pFqYdob/87V92PLqr57 /ssVRDxTB6fmdK87ySrYGbnDE4P6xTpCLxfA10CtnXmLf9wXTEM/xyaRh GYi0NQY/+ZaURkGRDFjI9IrCU7/uTCUu2/woW16inHKztqN5QFZSREk19 OngKZSyUVYwwdMw46hod7sBBPKPacDTXTXzsi+EgW0YSRp2egsHcaVkUC Yuqd8jpXcGVpCzhFwo9DwiNcGQfUXs2/nLkT1NYadwwlL6LcGhUOtt5UT BIzHs6AoTWmoPQYEHxyh8ZA1ABRHSXGMl8M3/LB/PnOtcyu86ZT6MA8sW g==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="247018549" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="247018549" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 23:55:57 -0800 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="679061040" Received: from unknown (HELO localhost.localdomain) ([10.239.251.41]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2022 23:55:56 -0800 From: Weiyuan Li To: dts@dpdk.org, lijuan.tu@intel.com Cc: Weiyuan li Subject: [dts][PATCH V1 2/2] test_plans/ipfrag_test_plan: remove dpdk code modification. Date: Thu, 10 Feb 2022 15:44:01 +0800 Message-Id: <20220210074401.449687-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220210074401.449687-1-weiyuanx.li@intel.com> References: <20220210074401.449687-1-weiyuanx.li@intel.com> MIME-Version: 1.0 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 From: Weiyuan li Sync modify the test plan remove dpdk code modification. Signed-off-by: Weiyuan li --- test_plans/ipfrag_test_plan.rst | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/test_plans/ipfrag_test_plan.rst b/test_plans/ipfrag_test_plan.rst index 2178b4db..68cf01ca 100644 --- a/test_plans/ipfrag_test_plan.rst +++ b/test_plans/ipfrag_test_plan.rst @@ -133,31 +133,7 @@ Prerequisites - The set of logical cores to execute the packet forwarding task - Mapping of the NIC RX queues to logical cores handling them. -6. Set lpm table for IPv4 & IPv6 packet:: - - sed -i '/l3fwd_ipv4_route_array\[\].*{/,/^\}\;/c\\static struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {\ - {RTE_IPV4(100,10,0,0), 16, 1},\ - {RTE_IPV4(100,20,0,0), 16, 1},\ - {RTE_IPV4(100,30,0,0), 16, 0},\ - {RTE_IPV4(100,40,0,0), 16, 0},\ - {RTE_IPV4(100,50,0,0), 16, 1},\ - {RTE_IPV4(100,60,0,0), 16, 1},\ - {RTE_IPV4(100,70,0,0), 16, 0},\ - {RTE_IPV4(100,80,0,0), 16, 0},\ - };' examples/ip_fragmentation/main.c - - sed -i '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\static struct l3fwd_ipv6_route l3fwd_ipv6_route_array[] = {\ - {{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 1},\ - {{2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 1},\ - {{3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 0},\ - {{4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 0},\ - {{5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 1},\ - {{6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 1},\ - {{7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 0},\ - {{8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 0},\ - };' examples/ip_fragmentation/main.c - -And re-compile examples/ip_fragmentation:: +6. Compile examples/ip_fragmentation:: meson configure -Dexamples=ip_fragmentation x86_64-native-linuxapp-gcc ninja -C x86_64-native-linuxapp-gcc