From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 9F936A00E6 for ; Mon, 15 Apr 2019 23:28:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8BD531B40F; Mon, 15 Apr 2019 23:28:37 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DF3921B3FC for ; Mon, 15 Apr 2019 23:28:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 14:28:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,355,1549958400"; d="scan'208";a="337763328" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga006.fm.intel.com with ESMTP; 15 Apr 2019 14:28:34 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 14:28:34 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 14:28:34 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.164]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.149]) with mapi id 14.03.0415.000; Tue, 16 Apr 2019 05:28:32 +0800 From: "Tu, Lijuan" To: "Zhao, XinfengX" , "dts@dpdk.org" CC: "Zhao, XinfengX" Thread-Topic: [dts] [PATCH V1] test_plan: add test plan for cryptodev virtio ipsec test Thread-Index: AQHU5fp3ZnpNBW2Gvk+zQJP8GUjzF6Y92F/Q Date: Mon, 15 Apr 2019 21:28:32 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA625EF@SHSMSX101.ccr.corp.intel.com> References: <1553806776-285587-1-git-send-email-xinfengx.zhao@intel.com> In-Reply-To: <1553806776-285587-1-git-send-email-xinfengx.zhao@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.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjE2ODc5MzYtMTM3OC00MGRiLWJlM2YtZDBlYWZlNThkYWUyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiU3NweDZDMml6cE42WDZZUlEyNVJFZWc3VUd4ZFVsbUFxTE5iWDB6bk5aM0ZmcDlIMVdka0gwYTc4QWlGdnRXYiJ9 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] test_plan: add test plan for cryptodev virtio ipsec test 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 Xinfeng Zhao > Sent: Thursday, March 28, 2019 2:00 PM > To: dts@dpdk.org > Cc: Zhao, XinfengX > Subject: [dts] [PATCH V1] test_plan: add test plan for cryptodev virtio i= psec > test >=20 > Signed-off-by: Xinfeng Zhao > --- > .../virtio_ipsec_cryptodev_func_test_plan.rst | 178 > +++++++++++++++++++++ > 1 file changed, 178 insertions(+) > create mode 100644 test_plans/virtio_ipsec_cryptodev_func_test_plan.rst >=20 > diff --git a/test_plans/virtio_ipsec_cryptodev_func_test_plan.rst > b/test_plans/virtio_ipsec_cryptodev_func_test_plan.rst > new file mode 100644 > index 0000000..74842ac > --- /dev/null > +++ b/test_plans/virtio_ipsec_cryptodev_func_test_plan.rst > @@ -0,0 +1,178 @@ > +.. Copyright (c) <2018-2019> Intel Corporation > + All rights reserved. > + > + Redistribution and use in source and binary forms, with or without > + modification, are permitted provided that the following conditions > + are met: > + > + - Redistributions of source code must retain the above copyright > + notice, this list of conditions and the following disclaimer. > + > + - Redistributions in binary form must reproduce the above copyright > + notice, this list of conditions and the following disclaimer in > + the documentation and/or other materials provided with the > + distribution. > + > + - Neither the name of Intel Corporation nor the names of its > + contributors may be used to endorse or promote products derived > + from this software without specific prior written permission. > + > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, > INDIRECT, > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > OR > + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > CONTRACT, > + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > ADVISED > + OF THE POSSIBILITY OF SUCH DAMAGE. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Cryptodev virtio ipsec Application Tests > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > + > +Description > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +This document provides the test plan for testing Cryptodev virtio ipsec > +by crypto ipsec-secgw application. The crypto virtio ipsec application > +is a DPDK app under DPDK app folder. > + > +Cryptodev virtio ipsec supports AESNI MB PMD, VIRTIO PMD > + > +AESNI MB PMD algorithm table > +The table below contains AESNI MB algorithms which supported in crypto > virtio ipsec. > +Part of the algorithms are not supported currently. > + > ++-----------+-------------------+---------------------------------------= -------------------------------- > ----+ > +| Algorithm | Mode | Detail > | > ++-----------+-------------------+---------------------------------------= -------------------------------- > ----+ > +| aes | cbc | Encrypt/Decrypt;Key size: 128, 192, 25= 6 bits > | > ++-----------+-------------------+---------------------------------------= -------------------------------- > ----+ > +| sha | | sha1, sha2-224, sha2-384, sha2-256, sh= a2-512 > | > ++-----------+-------------------+---------------------------------------= -------------------------------- > ----+ > +| hmac | | Support sha implementations sha1, sha2= -224, > sha2-256, | > +| | | = | > +| | | sha2-384, sha2-512 = | > ++-----------+-------------------+---------------------------------------= -------------------------------- > ----+ > + > +VIRTIO PMD algorithm table > +The table below contains virtio algorithms which supported in crypto vir= tio > ipsec. > +Part of the algorithms are not supported currently. > + > ++-----------+-------------------+---------------------------------------= -------------------------------- > ----+ > +| Algorithm | Mode | Detail > | > ++-----------+-------------------+---------------------------------------= -------------------------------- > ----+ > +| aes | cbc | Encrypt/Decrypt;Key size: 128, 192, 25= 6 bits > | > ++-----------+-------------------+---------------------------------------= -------------------------------- > ----+ > +| sha | | sha1, sha2-224, sha2-384, sha2-256, sh= a2-512 > | > ++-----------+-------------------+---------------------------------------= -------------------------------- > ----+ > +| hmac | | Support sha implementations sha1, sha2= -224, > sha2-256, | > +| | | = | > +| | | sha2-384, sha2-512 = | > ++-----------+-------------------+---------------------------------------= -------------------------------- > ----+ > + > +Prerequisites > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +qemu version >=3D 2.12 > +in qemu enable vhost-user-crypto: > + ./configure --target-list=3Dx86_64-softmmu --enable-vhost-crypto > +--prefix=3D/root/qemu-2.12 && make && make install the bin is in > +/root/qemu-2.12 folder, which is your specified > + > +The options of ipsec-secgw is below: > + > + ./build/ipsec-secgw [EAL options] -- > + -p PORTMASK -P -u PORTMASK -j FRAMESIZE > + -l -w REPLAY_WINOW_SIZE -e -a > + --config (port,queue,lcore)[,(port,queue,lcore] > + --single-sa SAIDX > + --rxoffload MASK > + --txoffload MASK > + -f CONFIG_FILE_PATH > + > +* The "-f /path/to/config_file" option enables the application read an= d > + parse the configuration file specified, and configures the applicati= on > + with a given set of SP, SA and Routing entries accordingly. > + > +Test case setup: > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +For function test, the DUT forward UDP packets generated by scapy. > +After sending single packet from Scapy, crytpoDev function > +encrypt/decrypt the payload in packet by using algorithm setting in VM. = the > packet back to tester. > + > +Use TCPDump to capture the received packet on tester. Then tester > +parses the payload and compare the payload with correct answer pre- > stored in scripts: > + > + +----------+ +----------------------------------+ > + | | | +--------+ +--------+ | > + | | -------------|-->| VM0 | -----> | | | > + | Tester | | +--------+ | VM1 | | > + | | <------------|-------------------> | | | > + | | | +--------+ | > + +----------+ +----------------------------------+ > + > +In Host: > +# Build DPDK and vhost_crypto app > + enable CONFIG_RTE_LIBRTE_VHOST in config/common_base > + make install -j T=3Dx86_64-native-linuxapp-gcc > + make -C examples/vhost_crypto > + > +# Compile the latest qemu > +# Run the dpdk vhost sample > + ./examples/vhost_crypto/build/vhost-crypto --socket-mem 2048,0 > +--legacy-mem -w 1a:01.0 -w 1c:01.0 -w 1e:01.0 --vdev > +crypto_scheduler_pmd_1,slave=3D0000:1a:01.0_qat_sym,slave=3D0000:1c:01.0= _q > a > +t_sym,slave=3D0000:1e:01.0_qat_sym,mode=3Dround-robin,ordering=3Denable = -l > +8,9,10,11,12 -n 6 -- --config "(9,0,0),(10,0,0),(11,0,0),(12,0,0)" > +--socket-file 9,/tmp/vm0_crypto0.sock > +--socket-file=3D10,/tmp/vm0_crypto1.sock > +--socket-file=3D11,/tmp/vm1_crypto0.sock > +--socket-file=3D12,/tmp/vm1_crypto1.sock > + > +# bind vfio-pci > + usertools/dpdk-devbind.py --bind=3Dvfio-pci 0000:60:00.0 0000:60:00.= 1 > +0000:3b:00.0 0000:3b:00.1 > + > +# Start VM0 by the qemu > + taskset -c 11,12,13,14 /root/qemu-2/bin/qemu-system-x86_64 -name > vm0 -enable-kvm -pidfile /tmp/.vm0.pid > + -daemonize -monitor unix:/tmp/vm0_monitor.sock,server,nowait > + -net nic,vlan=3D0,macaddr=3D00:00:00:42:65:aa,model=3De1000,addr= =3D1f -net > user,vlan=3D0,hostfwd=3Dtcp:10.67.111.126:6000-:22 > + -cpu host -smp 4 -m 5120 -object memory-backend- > file,id=3Dmem,size=3D5120M,mem-path=3D/mnt/huge,share=3Don -numa > node,memdev=3Dmem -mem-prealloc > + -chardev socket,path=3D/tmp/vm0_qga0.sock,server,nowait,id=3Dvm0= _qga0 > -device virtio-serial -device > virtserialport,chardev=3Dvm0_qga0,name=3Dorg.qemu.guest_agent.0 > + -vnc :1 > + -chardev socket,path=3D/tmp/vm0_crypto0.sock,id=3Dvm0_crypto0 -o= bject > cryptodev-vhost-user,id=3Dcryptodev0,chardev=3Dvm0_crypto0 -device virtio= - > crypto-pci,id=3Dcrypto0,cryptodev=3Dcryptodev0 > + -chardev socket,path=3D/tmp/vm0_crypto1.sock,id=3Dvm0_crypto1 -o= bject > cryptodev-vhost-user,id=3Dcryptodev1,chardev=3Dvm0_crypto1 -device virtio= - > crypto-pci,id=3Dcrypto1,cryptodev=3Dcryptodev1 > + -drive file=3D/root/VMs/virtio_crypto_test_710_1.img > + -device vfio-pci,host=3D0000:3b:00.0,id=3Dpt_0 > + -device vfio-pci,host=3D0000:3b:00.1,id=3Dpt_1 > + > +# Start VM1 by the qemu > + taskset -c 15,16,17,18 /root/qemu-2/bin/qemu-system-x86_64 -name > vm1 -enable-kvm -pidfile /tmp/.vm1.pid > + -daemonize -monitor unix:/tmp/vm1_monitor.sock,server,nowait > + -net nic,vlan=3D0,macaddr=3D00:00:00:db:2e:f9,model=3De1000,addr= =3D1f -net > user,vlan=3D0,hostfwd=3Dtcp:10.67.111.126:6001-:22 > + -cpu host -smp 4 -m 5120 -object memory-backend- > file,id=3Dmem,size=3D5120M,mem-path=3D/mnt/huge,share=3Don -numa > node,memdev=3Dmem -mem-prealloc > + -chardev socket,path=3D/tmp/vm1_qga0.sock,server,nowait,id=3Dvm1= _qga0 > -device virtio-serial -device > virtserialport,chardev=3Dvm1_qga0,name=3Dorg.qemu.guest_agent.0 > + -vnc :2 > + -chardev socket,path=3D/tmp/vm1_crypto0.sock,id=3Dvm1_crypto0 -o= bject > cryptodev-vhost-user,id=3Dcryptodev0,chardev=3Dvm1_crypto0 -device virtio= - > crypto-pci,id=3Dcrypto0,cryptodev=3Dcryptodev0 > + -chardev socket,path=3D/tmp/vm1_crypto1.sock,id=3Dvm1_crypto1 -o= bject > cryptodev-vhost-user,id=3Dcryptodev1,chardev=3Dvm1_crypto1 -device virtio= - > crypto-pci,id=3Dcrypto1,cryptodev=3Dcryptodev1 > + -drive file=3D/root/VMs/virtio_crypto_test_710_2.img > + -device vfio-pci,host=3D0000:60:00.0,id=3Dpt_0 > + -device vfio-pci,host=3D0000:60:00.1,id=3Dpt_1 > + > +In VM > +# set virtio device > + modprobe uio_pci_generic > + echo -n 0000:00:04.0 > /sys/bus/pci/drivers/virtio-pci/unbind > + echo -n 0000:00:05.0 > /sys/bus/pci/drivers/virtio-pci/unbind > + echo "1af4 1054" > /sys/bus/pci/drivers/uio_pci_generic/new_id > + > +# Run the ipsec test cases cmd > + > + 1. AESNI_MB case Command line Eg: > + In vm0: > + ./examples/ipsec-secgw/build/ipsec-secgw --socket-mem 1024,0 -w > 0000:00:06.0 -w 0000:00:07.0 --vdev crypto_aesni_mb_pmd_1 --vdev > crypto_aesni_mb_pmd_2 -l 1,2,3 -n 4 -- -P --config "(0,0,2),(1,0,3)" -u= 0x1 -p > 0x3 -f /root/ipsec_test0.cfg > + In vm1: > + ./examples/ipsec-secgw/build/ipsec-secgw --socket-mem 1024,0 -w > + 0000:00:06.0 -w 0000:00:07.0 --vdev crypto_aesni_mb_pmd_1 --vdev > + crypto_aesni_mb_pmd_2 -l 1,2,3 -n 4 -- -P --config "(0,0,2),(1,0,3)" > + -u 0x1 -p 0x3 -f /root/ipsec_test1.cfg > + > + 2. VIRTIO case Command line Eg: > + In vm0: > + ./examples/ipsec-secgw/build/ipsec-secgw --socket-mem 1024,0 -w > 0000:00:06.0 -w 0000:00:07.0 -w 00:04.0 -w 00:05.0 -l 1,2,3 -n 4 -- -P = --config > "(0,0,2),(1,0,3)" -u 0x1 -p 0x3 -f /root/ipsec_test0.cfg > + In vm1: > + ./examples/ipsec-secgw/build/ipsec-secgw --socket-mem 1024,0 -w > + 0000:00:06.0 -w 0000:00:07.0 -w 00:04.0 -w 00:05.0 -l 1,2,3 -n 4 -- > + -P --config "(0,0,2),(1,0,3)" -u 0x1 -p 0x3 -f /root/ipsec_test1.cfg > -- > 2.7.4