test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jiaqi Min <jiaqix.min@intel.com>
To: dts@dpdk.org
Cc: Jiaqi Min <jiaqix.min@intel.com>
Subject: [dts] [PATCH V1] tests/vf_daemon: add vf jumbo frame test for ixgbe
Date: Wed, 19 Feb 2020 08:03:18 +0000	[thread overview]
Message-ID: <20200219080318.45130-1-jiaqix.min@intel.com> (raw)

add ixgbe vf jumbo frame test case

Signed-off-by: Jiaqi Min <jiaqix.min@intel.com>
---
 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


             reply	other threads:[~2020-02-19  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19  8:03 Jiaqi Min [this message]
2020-02-25  6:50 ` He, Zhiwei
2020-02-25  8:58   ` Tu, Lijuan
2020-02-28  1:09 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200219080318.45130-1-jiaqix.min@intel.com \
    --to=jiaqix.min@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).