From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 46C04A0471 for ; Mon, 15 Jul 2019 07:52:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B9CA325F; Mon, 15 Jul 2019 07:52:52 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 5D992322C for ; Mon, 15 Jul 2019 07:52:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jul 2019 22:52:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,493,1557212400"; d="scan'208";a="160989234" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga008.jf.intel.com with ESMTP; 14 Jul 2019 22:52:48 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 14 Jul 2019 22:52:48 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 14 Jul 2019 22:52:47 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.22]) with mapi id 14.03.0439.000; Mon, 15 Jul 2019 13:52:46 +0800 From: "Wu, ChangqingX" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1] tests/TestSuite_inline_ipsec:update this case to test dpdk19.08_rc1 Thread-Index: AQHVOJ1etnSXTP45R0uUsYiaoErno6bLMb3A Date: Mon, 15 Jul 2019 05:52:45 +0000 Message-ID: <7F81DD3887C58F49A6B2EFEC3C28E22E0B72A81F@SHSMSX101.ccr.corp.intel.com> References: <1562927926-60852-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1562927926-60852-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/TestSuite_inline_ipsec:update this case to test dpdk19.08_rc1 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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" Tested-by: Wu, ChangqingX -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xiao,qimai Sent: Friday, July 12, 2019 6:39 PM To: dts@dpdk.org Cc: Xiao, QimaiX Subject: [dts] [PATCH V1] tests/TestSuite_inline_ipsec:update this case to = test dpdk19.08_rc1 dpdk 19.08_rc1 add new parameter --mtu to ipsec-secgw, update this case to = adapt it. Signed-off-by: xiao,qimai --- tests/TestSuite_inline_ipsec.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_inline_ipsec.py b/tests/TestSuite_inline_ipsec= .py index 57552c2..4f078c9 100644 --- a/tests/TestSuite_inline_ipsec.py +++ b/tests/TestSuite_inline_ipsec.py @@ -43,7 +43,7 @@ import random from scapy.all import ESP, IP, Ether, sendp, SecurityAssociation from tes= t_case import TestCase =20 -ETHER_STANDARD_MTU =3D 1518 +ETHER_STANDARD_MTU =3D 1300 ETHER_JUMBO_FRAME_MTU =3D 9000 =20 =20 @@ -86,7 +86,7 @@ class TestInlineIpsec(TestCase): =20 self.path =3D "./examples/ipsec-secgw/build/ipsec-secgw" # add print code in IPSEC app - sedcmd =3D r"""sed -i -e 's/if (nb_rx > 0)/if (nb_rx > 0) {/g' -e = '/\/\* dequeue and process completed crypto-ops \*\//i\\t\t\t}' -e '/proces= s_pkts(qconf, pkts, nb_rx, portid);/i\\t\t\t\tprintf("[debug]receive %hhu p= acket in rxqueueid=3D%hhu\\n",nb_rx, queueid);' examples/ipsec-secgw/ipsec-= secgw.c""" + sedcmd =3D r"""sed -i -e 's/if (nb_rx > 0)/if (nb_rx > 0) {/g' -e = '/\/\* dequeue and process completed crypto-ops \*\//i\\t\t\t}' -e '/proces= s_pkts(qconf, pkts, nb_rx, portid);/i\\t\t\t\tprintf("[debug]receive %llu p= acket in rxqueueid=3D%llu\\n",(unsigned long long)nb_rx, (unsigned long lon= g)queueid);' examples/ipsec-secgw/ipsec-secgw.c""" self.dut.send_expect(sedcmd, "#", 60) =20 # build sample app @@ -201,18 +201,22 @@ class TestInlineIpsec(TestCase): self.tester.destroy_session(session_send) return payload, p.src, p.dst =20 - def Ipsec_Encryption(self, config, file_name, txItf, rxItf, paysize=3D= 32, jumboframe=3D1518, do_encrypt=3DFalse, + def Ipsec_Encryption(self, config, file_name, txItf, rxItf,=20 + paysize=3D32, jumboframe=3DNone, do_encrypt=3DFalse, verify=3DTrue, send_spi=3D5, receive_spi=3D1005, = count=3D1, inner_dst=3D'192.168.105.10', sa_src=3D'172.16.1.5', sa_dst=3D'172.16.2.5'): """ verify Ipsec receive package """ - cmd =3D self.path + " -l 20,21 -w %s -w %s --vdev 'crypto_null' --= log-level 8 --socket-mem 1024,1024 -- -p 0xf -P -u 0x2 -j %s --config=3D'%s= ' -f %s" % ( + if jumboframe is not None: + cmd =3D self.path + " -l 20,21 -w %s -w %s --vdev=20 + 'crypto_null' --log-level 8 --socket-mem 1024,1024 -- -p 0xf -P -u 0x2=20 + -j 9200 --mtu %s --config=3D'%s' -f %s" % ( self.portpci_0, self.portpci_1, jumboframe, config, file_name) + else: + cmd =3D self.path + " -l 20,21 -w %s -w %s --vdev 'crypto_null= ' --log-level 8 --socket-mem 1024,1024 -- -p 0xf -P -u 0x2 --config=3D'%s' = -f %s" % ( + self.portpci_0, self.portpci_1, config, file_name) + self.dut.send_expect(cmd, "IPSEC", 60) =20 - session_receive =3D self.tester.create_session( - name=3D'receive_encryption_package') + session_receive =3D=20 + self.tester.create_session(name=3D'receive_encryption_package') sa_gcm =3D r"sa_gcm=3DSecurityAssociation(ESP,spi=3D%s,crypt_algo= =3D'AES-GCM',crypt_key=3D'\x2b\x7e\x15\x16\x28\xae\xd2\xa6\xab\xf7\x15\x88\= x09\xcf\x4f\x3d\xde\xad\xbe\xef',auth_algo=3D'NULL',auth_key=3DNone,tunnel_= header=3DIP(src=3D'172.16.1.5',dst=3D'172.16.2.5'))" % receive_spi =20 session_receive.send_expect("scapy", ">>>", 10) @@ -271,7 +275,7 @= @ class TestInlineIpsec(TestCase): test Ipsec Encryption Jumboframe """ config =3D '(0,0,21),(1,0,21)' - paysize =3D random.randint(ETHER_STANDARD_MTU, ETHER_JUMBO_FRAME_M= TU) + paysize =3D random.randint(ETHER_STANDARD_MTU+300,=20 + ETHER_JUMBO_FRAME_MTU) self.Ipsec_Encryption(config, '/root/dpdk/enc.cfg', self.txItf, self.rxItf, paysize, ETHER_JUMBO= _FRAME_MTU) self.dut.send_expect("^C", "#", 5) @@ -303,7 +307,7 @@ class TestI= nlineIpsec(TestCase): test IPSec Decryption Jumboframe """ config =3D '(0,0,21),(1,0,21)' - paysize =3D random.randint(ETHER_STANDARD_MTU, ETHER_JUMBO_FRAME_M= TU) + paysize =3D random.randint(ETHER_STANDARD_MTU+300,=20 + ETHER_JUMBO_FRAME_MTU) self.Ipsec_Encryption(config, '/root/dpdk/dec.cfg', self.rxItf, self.txItf, paysize, ETHER_JUMBO_FRAME_MTU, = do_encrypt=3DTrue, count=3D2) self.dut.send_expect("^C", "#", 5) @@ -338,8 +342,8 @@ class TestI= nlineIpsec(TestCase): """ test Ipsec Encryption Decryption """ - cmd =3D self.path + " -l 20,21 -w %s -w %s --vdev 'crypto_null' --= log-level 8 --socket-mem 1024,1 -- -p 0xf -P -u 0x2 -j %s --config=3D'%s' -= f %s" % ( - self.portpci_0, self.portpci_1, '1518', '(0,0,21),(1,0,21)', '= /root/dpdk/enc_dec.cfg') + cmd =3D self.path + " -l 20,21 -w %s -w %s --vdev 'crypto_null' --= log-level 8 --socket-mem 1024,1 -- -p 0xf -P -u 0x2 --config=3D'%s' -f %s" = % ( + self.portpci_0, self.portpci_1, '(0,0,21),(1,0,21)',=20 + '/root/dpdk/enc_dec.cfg') self.dut.send_expect(cmd, "IPSEC", 60) session_receive =3D self.tester.create_session( name=3D'receive_encryption_package') -- 2.17.1