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 666A7A00E6 for ; Wed, 7 Aug 2019 05:02:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D3D44CA9; Wed, 7 Aug 2019 05:02:58 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id DE8B14C9F for ; Wed, 7 Aug 2019 05:02:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2019 20:02:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,356,1559545200"; d="scan'208";a="179346427" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga006.jf.intel.com with ESMTP; 06 Aug 2019 20:02:55 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 6 Aug 2019 20:02:55 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 6 Aug 2019 20:02:54 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.204]) with mapi id 14.03.0439.000; Wed, 7 Aug 2019 11:02:52 +0800 From: "Tu, Lijuan" 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: AQHVOJ1ed+tq1WrPfEG0HOj9w3/RUKbvJ/FQ Date: Wed, 7 Aug 2019 03:02:52 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAFEB75@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: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2Q3YWIwMDUtOTkyZi00NDU0LTgyMGQtM2QxNWEzNzMyZWVhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTlhqcnFOcldzbUlYKzA5ZmRLR1ZQSEllUVwvN1RMSys4WSsrNnJwR2hcL1UxNWkyT0ZGU3djVW5QeUwzRTYybWsxIn0= 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" Applied, thanks > -----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 t= o > test dpdk19.08_rc1 >=20 > dpdk 19.08_rc1 add new parameter --mtu to ipsec-secgw, update this case t= o > adapt it. >=20 > Signed-off-by: xiao,qimai > --- > tests/TestSuite_inline_ipsec.py | 24 ++++++++++++++---------- > 1 file changed, 14 insertions(+), 10 deletions(-) >=20 > diff --git a/tests/TestSuite_inline_ipsec.py b/tests/TestSuite_inline_ips= ec.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 > test_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 > '/process_pkts(qconf, pkts, nb_rx, > portid);/i\\t\t\t\tprintf("[debug]receive %hhu packet 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 > '/process_pkts(qconf, pkts, nb_rx, > portid);/i\\t\t\t\tprintf("[debug]receive %llu packet in > rxqueueid=3D%llu\\n",(unsigned long long)nb_rx, (unsigned long > long)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= =3D32, > jumboframe=3D1518, do_encrypt=3DFalse, > + def Ipsec_Encryption(self, config, file_name, txItf, rxItf, > + 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 > + 'crypto_null' --log-level 8 --socket-mem 1024,1024 -- -p 0xf -P -u 0x2 > + -j 9200 --mtu %s --config=3D'%s' -f %s" % ( > self.portpci_0, self.portpci_1, jumboframe, config, file_nam= e) > + else: > + cmd =3D self.path + " -l 20,21 -w %s -w %s --vdev 'crypto_nu= ll' --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 > + self.tester.create_session(name=3D'receive_encryption_package') > sa_gcm =3D r"sa_gcm=3DSecurityAssociation(ESP,spi=3D%s,crypt_alg= o=3D'AES- > GCM',crypt_key=3D'\x2b\x7e\x15\x16\x28\xae\xd2\xa6\xab\xf7\x15\x88\x09\x > cf\x4f\x3d\xde\xad\xbe\xef',auth_algo=3D'NULL',auth_key=3DNone,tunnel_hea= de > r=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_MTU) > + paysize =3D random.randint(ETHER_STANDARD_MTU+300, > + ETHER_JUMBO_FRAME_MTU) > self.Ipsec_Encryption(config, '/root/dpdk/enc.cfg', > self.txItf, self.rxItf, paysize, ETHER_JUM= BO_FRAME_MTU) > self.dut.send_expect("^C", "#", 5) @@ -303,7 +307,7 @@ class > TestInlineIpsec(TestCase): > test IPSec Decryption Jumboframe > """ > config =3D '(0,0,21),(1,0,21)' > - paysize =3D random.randint(ETHER_STANDARD_MTU, > ETHER_JUMBO_FRAME_MTU) > + paysize =3D random.randint(ETHER_STANDARD_MTU+300, > + 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 > TestInlineIpsec(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)', > + '/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