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 C509EA00E6 for ; Wed, 7 Aug 2019 08:56:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BC6224C80; Wed, 7 Aug 2019 08:56:47 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 6931E14E8 for ; Wed, 7 Aug 2019 08:56:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2019 23:56:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,356,1559545200"; d="scan'208";a="373670601" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 06 Aug 2019 23:56:44 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 6 Aug 2019 23:56:44 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.249]) with mapi id 14.03.0439.000; Wed, 7 Aug 2019 14:56:42 +0800 From: "Tu, Lijuan" To: "Zhang, YanX A" , "dts@dpdk.org" CC: "Zhang, YanX A" Thread-Topic: [dts] [PATCH V1] test_plans/vf_to_vf_nic_bridge_test_plan:change the way of packet distribute Thread-Index: AQHVQDlp5Ngje6HRUEuKlvaQnQWV76bvWg5g Date: Wed, 7 Aug 2019 06:56:42 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAFEF01@SHSMSX101.ccr.corp.intel.com> References: <1563764601-16521-1-git-send-email-yanx.a.zhang@intel.com> In-Reply-To: <1563764601-16521-1-git-send-email-yanx.a.zhang@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2YxYTI0MmMtNmU2YS00NDkzLTk3ZjEtMWExZWVmZTc2OGUwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMmNhXC81V0x4Zkh1M1JtcjF2eFdHZk96WWZzVVRhNk4zUFQyZDM0SjJrbERTYXF0QUUyVEFtcHM3V0tEcEpoc04ifQ== 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_plans/vf_to_vf_nic_bridge_test_plan:change the way of packet distribute 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 zhang,yan > Sent: Monday, July 22, 2019 11:03 AM > To: dts@dpdk.org > Cc: Zhang, YanX A > Subject: [dts] [PATCH V1] test_plans/vf_to_vf_nic_bridge_test_plan:change > the way of packet distribute >=20 > change the way of packet distribute >=20 > Signed-off-by: zhang,yan > --- > test_plans/vf_to_vf_nic_bridge_test_plan.rst | 73 ++++++++------------ > 1 file changed, 30 insertions(+), 43 deletions(-) >=20 > diff --git a/test_plans/vf_to_vf_nic_bridge_test_plan.rst > b/test_plans/vf_to_vf_nic_bridge_test_plan.rst > index 576c9d7..1d4a7ca 100644 > --- a/test_plans/vf_to_vf_nic_bridge_test_plan.rst > +++ b/test_plans/vf_to_vf_nic_bridge_test_plan.rst > @@ -44,19 +44,13 @@ Prerequisites: >=20 > On host: >=20 > -* Hugepages: at least 10 G hugepages, 6G(for vm on which run pktgen as > stream > - source end) + 2G(for vm on which run testpmd as receive end) + 2G(for > host > - used) > - > * Guest: two img with os for kvm qemu >=20 > * NIC: one pf port >=20 > -* pktgen-dpdk: copy $DTS/dep/tgen.tgz to guest from which send the > stream > - > On Guest: >=20 > -* Stream Source end: scapy pcpay and essential tarballs for compile pktg= en- > dpdk tools > +* Stream Source end: scapy pcpay >=20 >=20 > Set up basic virtual scenario: > @@ -66,13 +60,10 @@ Step 1: generate two vfs on the target pf port (i.e. > 0000:85:00.0):: >=20 > echo 2 > /sys/bus/pci/devices/0000\:85\:00.0/sriov_numvfs >=20 > -Step 2: bind the two vfs to pci-stub:: > +Step 2: bind the two vfs to vfio-pci:: >=20 > - echo "8086 10ed" > /sys/bus/pci/drivers/pci-stub/new_id > - echo 0000:85:10.0 > /sys/bus/pci/devices/0000:85:10.0/driver/unb= ind > - echo 0000:85:10.0 > /sys/bus/pci/drivers/pci-stub/bind > - echo 0000:85:10.2 > /sys/bus/pci/devices/0000:85:10.2/driver/unb= ind > - echo 0000:85:10.2 > /sys/bus/pci/drivers/pci-stub/bind > + modprobe vfio-pci > + ./dpdk/usertools/dpdk-devbind.py -b vfio-pci 0000:85:02.0 > + 0000:85:02.1 >=20 > Step 3: passthrough vf 0 to vm0 and start vm0:: >=20 > @@ -82,7 +73,7 @@ Step 3: passthrough vf 0 to vm0 and start vm0:: > -daemonize -monitor unix:/tmp/vm0_monitor.sock,server,nowait \ > -net nic,vlan=3D0,macaddr=3D00:00:00:e2:4f:fb,addr=3D1f \ > -net user,vlan=3D0,hostfwd=3Dtcp:10.239.128.125:6064-:22 \ > - -device pci-assign,host=3D85:10.0,id=3Dpt_0 -cpu host -smp 4 -m = 6144 \ > + -device vfio-pci,host=3D85:10.0,id=3Dpt_0 -cpu host -smp 4 -m 61= 44 > + \ > -object memory-backend-file,id=3Dmem,size=3D6144M,mem- > path=3D/mnt/huge,share=3Don \ > -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/img/vm0.img -vnc :4 >=20 > @@ -94,16 +85,16 @@ Step 4: passthrough vf 1 to vm1 and start vm1:: > -daemonize -monitor unix:/tmp/vm1_monitor.sock,server,nowait \ > -net nic,vlan=3D0,macaddr=3D00:00:00:7b:d5:cb,addr=3D1f \ > -net user,vlan=3D0,hostfwd=3Dtcp:10.239.128.125:6126-:22 \ > - -device pci-assign,host=3D85:10.2,id=3Dpt_0 -cpu host -smp 4 -m = 6144 \ > + -device vfio-pci,host=3D85:10.2,id=3Dpt_0 -cpu host -smp 4 -m 61= 44 > + \ > -object memory-backend-file,id=3Dmem,size=3D6144M,mem- > path=3D/mnt/huge,share=3Don \ > -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/img/vm1.img -vnc :5 >=20 >=20 > -Test Case1: test_2vf_d2d_pktgen_stream > -=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 > +Test Case1: test_2vf_d2d_testpmd_stream > +=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 >=20 > both vfs in the two vms using the dpdk driver, send stream from vf1 in v= m1 > by -dpdk pktgen to vf in vm0, and verify the vf on vm0 can receive stream= . > +dpdk testpmd to vf in vm0, and verify the vf on vm0 can receive stream. >=20 > Step 1: run testpmd on vm0:: >=20 > @@ -114,20 +105,18 @@ Step 2: set rxonly and start on vm0:: > set fwd rxonly > start >=20 > -Step 3: copy pktgen-dpdk tarball to vm1:: > - > - scp tgen.tgz to vm1 > - tar xvf tgen.tgz > - > -Step 4: generate pcap file on vm1:: > +Step 3: run testpmd on vm1:: >=20 > - Context: [Ether(dst=3D"52:54:12:45:67:10", > src=3D"52:54:12:45:67:11")/IP()/Raw(load=3D'X'\*46)] > + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x7 -n 1 -- -i >=20 > -Step 5: send stream by pkt-gen on vm1:: > +Step 4: Set forward, specifying that the opposing MAC sends 100 packets = on > vm1:: >=20 > - ./app/app/x86_64-native-linuxapp-gcc/app/pktgen -c 0xf -n 2 --pr= oc- > type auto -- -P -T -m '1.0' -s P:flow.pcap > + set fwd mac > + set eth-peer 0 52:54:12:45:67:10(vm0_mac) > + set burst 50 > + start tx_first 2 >=20 > -Step 6: verify vf 0 receive status on vm0: Rx-packets equal to send pack= ets > count, 100:: > +Step 5: verify vf 0 receive status on vm0: Rx-packets equal to send pack= ets > count, 100:: >=20 > show port stats 0 > ######################## NIC statistics for port 0 > ######################## @@ -137,27 +126,23 @@ Step 6: verify vf 0 > receive status on vm0: Rx-packets equal to send packets coun > TX-packets: 0 TX-errors: 0 TX-bytes: 0 >=20 > ################################################################ > ############ >=20 > -Test Case2: test_2vf_d2k_pktgen_stream > -=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 > +Test Case2: test_2vf_d2k_testpmd_stream > +=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 >=20 > Step 1: bind vf to kernel driver on vm0 >=20 > -Step 2: start up vf interface and using tcpdump to capture received pack= ets > +Step 2: start up vf interface and using tcpdump to capture received pack= ets:: >=20 > -Step 3: copy pktgen-dpdk tarball to vm1:: > + tcpdump -i vm0_vf ether dst vm0_mac -w m.pcap >=20 > - scp tgen.tgz to vm1 > - tar xvf tgen.tgz > +Step 3: Set forward, specifying that the opposing MAC sends 100 packets = on > vm1:: >=20 > -Step 4: generate pcap file on vm1:: > + set fwd mac > + set eth-peer 0 52:54:12:45:67:10(vm0_mac) > + set burst 50 > + start tx_first 2 >=20 > - Context: [Ether(dst=3D"52:54:12:45:67:10", > src=3D"52:54:12:45:67:11")/IP()/Raw(load=3D'X'\*46)] > - > -Step 5: send stream by pkt-gen on vm1:: > - > - ./app/app/x86_64-native-linuxapp-gcc/app/pktgen -c 0xf -n 2 --pr= oc- > type auto -- -P -T -m '1.0' -s P:flow.pcap > - > -Step 6: verify vf 0 receive status on vm0: Rx-packets equal to send pack= ets > count, 100 > +Step 4: verify vf 0 receive status on vm0: packet captured equal to > +send packets count, 100 >=20 > Test Case3: test_2vf_k2d_scapy_stream > =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 > @@ -173,7 +158,9 @@ Step 2: set rxonly and start on vm0:: >=20 > Step 3: bind vf to kernel driver on vm0 >=20 > -Step 4: using scapy to send packets > +Step 4: using scapy to send packets on vm1:: > + > + sendp([Ether(dst=3D"vm0_mac", src=3D"vm1_mac"") / IP() / > + Raw(load=3D"X" * 46)], iface=3D"ens4", count=3D100) >=20 > Step 5:verify vf 0 receive status on vm0: Rx-packets equal to send packe= ts > count, 100:: >=20 > -- > 2.17.2