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 D7824A0555; Wed, 19 Feb 2020 09:21:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C9B0A1B951; Wed, 19 Feb 2020 09:21:33 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1F7A03B5 for ; Wed, 19 Feb 2020 09:21:31 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2020 00:21:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,459,1574150400"; d="scan'208";a="348888548" Received: from intel.sh.intel.com ([10.239.255.136]) by fmsmga001.fm.intel.com with ESMTP; 19 Feb 2020 00:21:28 -0800 From: Jiaqi Min To: dts@dpdk.org Cc: Jiaqi Min Date: Wed, 19 Feb 2020 08:03:18 +0000 Message-Id: <20200219080318.45130-1-jiaqix.min@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [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" add ixgbe vf jumbo frame test case 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 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 = + model=host,number=4,cpupin=5 6 7 8; +disk = + file=/storage/vm-image/vm0.img,opt_format=qcow2,opt_if=virtio,opt_index=0,opt_media=disk; +mem = + size=10250; +login = + user=root,password=tester; +# net option is not necessary for libvirt, comment out below 2 lines if using libvirt +net = + type=nic,opt_vlan=0; + type=user,opt_vlan=0; +qga = + enable=yes; +# vnc option is not supported by libvirt yet, comment out below 2 lines if using libvirt +vnc = + displayNum=1; +# daemon option is not supported by libvirt yet, comment out below 2 lines if using libvirt +daemon = + enable=yes; + +[vm1] +cpu = + model=host,number=4,cpupin=14 15 16 17; +disk = + file=/storage/vm-image/vm0.img_copy.img,opt_format=qcow2,opt_if=virtio,opt_index=0,opt_media=disk; +mem = + size=10250; +login = + user=root,password=tester; +# net option is not necessary for libvirt, comment out below 2 lines if using libvirt +net = + type=nic,opt_vlan=0; + type=user,opt_vlan=0; +qga = + enable=yes; +# vnc option is not supported by libvirt yet, comment out below 2 lines if using libvirt +vnc = + displayNum=2; +# daemon option is not supported by libvirt yet, comment out below 2 lines if using libvirt +daemon = + enable=yes; 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') + 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_intf, "#") + self.check_vf_link_status() + time.sleep(10) + self.vf0_mac = self.vm0_testpmd.get_port_mac(0) + + self.vm0_testpmd.execute_cmd('set verbose 1') + self.vm0_testpmd.execute_cmd('start') + pktsize = random.randint(1500, 9000) + out = 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+100)) + self.vm0_testpmd.execute_cmd('port start all') + self.vm0_testpmd.execute_cmd('start') + out = 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 = 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=chained') + self.vm0_testpmd.execute_cmd('set verbose 1') + self.vm0_testpmd.execute_cmd('start') + out = 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 = 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