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 9CA6AA0524; Tue, 25 Feb 2020 07:50:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 75B7A1BF8D; Tue, 25 Feb 2020 07:50:48 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 353812C02 for ; Tue, 25 Feb 2020 07:50:47 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Feb 2020 22:50:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,483,1574150400"; d="scan'208";a="230927563" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga008.jf.intel.com with ESMTP; 24 Feb 2020 22:50:46 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Feb 2020 22:50:45 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Feb 2020 22:50:45 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.5]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.201]) with mapi id 14.03.0439.000; Tue, 25 Feb 2020 14:50:43 +0800 From: "He, Zhiwei" To: "Min, JiaqiX" , "dts@dpdk.org" CC: "Min, JiaqiX" , "He, Zhiwei" Thread-Topic: [dts] [PATCH V1] tests/vf_daemon: add vf jumbo frame test for ixgbe Thread-Index: AQHV5v2gAX51TDG1T0yeiMPx1tJJ6agrga8w Date: Tue, 25 Feb 2020 06:50:43 +0000 Message-ID: <09777F12A863964D9F4AE780D4FEA3E83E7446DC@SHSMSX104.ccr.corp.intel.com> References: <20200219080318.45130-1-jiaqix.min@intel.com> In-Reply-To: <20200219080318.45130-1-jiaqix.min@intel.com> Accept-Language: zh-CN, 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/vf_daemon: add vf jumbo frame test for ixgbe 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" Acked-by Zhiwei.He > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jiaqi Min > Sent: Wednesday, February 19, 2020 4:03 PM > To: dts@dpdk.org > Cc: Min, JiaqiX > Subject: [dts] [PATCH V1] tests/vf_daemon: add vf jumbo frame test for > ixgbe >=20 > add ixgbe vf jumbo frame test case >=20 > Signed-off-by: Jiaqi Min > --- > conf/vf_daemon.cfg | 44 +++++++++++++++++++++++++++++++ > tests/TestSuite_vf_daemon.py | 51 > ++++++++++++++++++++++++++++++++++++ > 2 files changed, 95 insertions(+) > create mode 100644 conf/vf_daemon.cfg >=20 > diff --git a/conf/vf_daemon.cfg b/conf/vf_daemon.cfg new file mode 100644 > index 0000000..fe762f8 > --- /dev/null > +++ b/conf/vf_daemon.cfg > @@ -0,0 +1,44 @@ > +# Configuration sample: sriov_kvm.cfg > +[vm0] > +cpu =3D > + model=3Dhost,number=3D4,cpupin=3D5 6 7 8; disk =3D > + > +file=3D/storage/vm- > image/vm0.img,opt_format=3Dqcow2,opt_if=3Dvirtio,opt_index > +=3D0,opt_media=3Ddisk; > +mem =3D > + size=3D10250; > +login =3D > + user=3Droot,password=3Dtester; > +# net option is not necessary for libvirt, comment out below 2 lines if > +using libvirt net =3D > + type=3Dnic,opt_vlan=3D0; > + type=3Duser,opt_vlan=3D0; > +qga =3D > + enable=3Dyes; > +# vnc option is not supported by libvirt yet, comment out below 2 lines > +if using libvirt vnc =3D > + displayNum=3D1; > +# daemon option is not supported by libvirt yet, comment out below 2 > +lines if using libvirt daemon =3D > + enable=3Dyes; > + > +[vm1] > +cpu =3D > + model=3Dhost,number=3D4,cpupin=3D14 15 16 17; disk =3D > + > +file=3D/storage/vm- > image/vm0.img_copy.img,opt_format=3Dqcow2,opt_if=3Dvirtio, > +opt_index=3D0,opt_media=3Ddisk; > +mem =3D > + size=3D10250; > +login =3D > + user=3Droot,password=3Dtester; > +# net option is not necessary for libvirt, comment out below 2 lines if > +using libvirt net =3D > + type=3Dnic,opt_vlan=3D0; > + type=3Duser,opt_vlan=3D0; > +qga =3D > + enable=3Dyes; > +# vnc option is not supported by libvirt yet, comment out below 2 lines > +if using libvirt vnc =3D > + displayNum=3D2; > +# daemon option is not supported by libvirt yet, comment out below 2 > +lines if using libvirt daemon =3D > + enable=3Dyes; > diff --git a/tests/TestSuite_vf_daemon.py b/tests/TestSuite_vf_daemon.py > index b91de9e..f01f1db 100644 > --- a/tests/TestSuite_vf_daemon.py > +++ b/tests/TestSuite_vf_daemon.py > @@ -705,6 +705,57 @@ class TestVfDaemon(TestCase): > self.vm0_testpmd.execute_cmd('vlan set strip off 0') > self.vm0_testpmd.execute_cmd('vlan set filter off 0') >=20 > + def test_ixgbe_vf_jumboframe(self): > + """ > + Enable jumbo frame for VF by configuring DPDK PF. > + """ > + self.tester.send_expect("ifconfig %s mtu 9000" % self.tester_int= f, "#") > + self.check_vf_link_status() > + time.sleep(10) > + self.vf0_mac =3D self.vm0_testpmd.get_port_mac(0) > + > + self.vm0_testpmd.execute_cmd('set verbose 1') > + self.vm0_testpmd.execute_cmd('start') > + pktsize =3D random.randint(1500, 9000) > + out =3D self.send_and_pmdout(self.vf0_mac, 0, pktsize) > + self.vm0_testpmd.execute_cmd('stop') > + self.verify("received" not in out, > + "Failed to receive this length packet!!!") > + > + self.vm0_testpmd.execute_cmd('port stop all') > + self.vm0_testpmd.execute_cmd('port config mtu 0 %s' % (pktsize+1= 00)) > + self.vm0_testpmd.execute_cmd('port start all') > + self.vm0_testpmd.execute_cmd('start') > + out =3D self.send_and_pmdout(self.vf0_mac, 0, pktsize) > + self.vm0_testpmd.execute_cmd('stop') > + self.verify("received" in out, > + "Failed to receive this length packet!!!") > + > + self.vm0_testpmd.execute_cmd('start') > + out =3D self.send_and_pmdout(self.vf0_mac, 0, pktsize+200) > + self.vm0_testpmd.execute_cmd('stop') > + self.verify("received" not in out, > + "Failed to receive this length packet!!!") > + > + self.vm0_testpmd.quit() > + self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--port- > topology=3Dchained') > + self.vm0_testpmd.execute_cmd('set verbose 1') > + self.vm0_testpmd.execute_cmd('start') > + out =3D self.send_and_pmdout(self.vf0_mac, 0, pktsize) > + self.vm0_testpmd.execute_cmd('stop') > + self.verify("received" in out, > + "Failed to receive this length packet!!!") > + > + self.vm0_testpmd.execute_cmd('start') > + out =3D self.send_and_pmdout(self.vf0_mac, 0, pktsize+200) > + self.vm0_testpmd.execute_cmd('stop') > + self.verify("received" not in out, > + "Failed to receive this length packet!!!") > + > + self.vm0_testpmd.quit() > + self.dut_testpmd.quit() > + self.tester.send_expect("ifconfig %s mtu 1500" % > + self.tester_intf, "#") > + > def test_stats_show_clear(self): > """ > Show and clear statistics for a VF from PF > -- > 2.17.1