test suite reviews and discussions
 help / color / mirror / Atom feed
From: Peng Yuan <yuan.peng@intel.com>
To: dts@dpdk.org
Cc: Peng Yuan <yuan.peng@intel.com>
Subject: [dts] [PATCH] tests: TestSuite_runtime_queue_number.py
Date: Wed, 11 Jul 2018 13:45:38 +0800	[thread overview]
Message-ID: <1531287938-78348-1-git-send-email-yuan.peng@intel.com> (raw)

there are different vf number in different fortville type.

Signed-off-by: Peng Yuan <yuan.peng@intel.com>

diff --git a/tests/TestSuite_runtime_queue_number.py b/tests/TestSuite_runtime_queue_number.py
index b767e06..2daac45 100644
--- a/tests/TestSuite_runtime_queue_number.py
+++ b/tests/TestSuite_runtime_queue_number.py
@@ -125,7 +125,7 @@ class TestRuntime_Queue_Number(TestCase):
         """
         self.tester.scapy_foreground()
         time.sleep(2)
-        for i in range(32):
+        for i in range(100):
             packet = r'sendp([Ether(dst="%s", src=get_if_hwaddr("%s"))/IP(src="192.168.0.%d", dst="192.168.0.%d")], iface="%s")' % (
                 self.vf_mac, itf, i + 1, i + 2, itf)
             self.tester.scapy_append(packet)
@@ -160,7 +160,7 @@ class TestRuntime_Queue_Number(TestCase):
                 m = scanner.search(line)
                 packet_rec = m.group(1)
             
-        self.verify(packet_sumnum == int(packet_rec) == 32, "There are some packets lost.")
+        self.verify(packet_sumnum == int(packet_rec) == 100, "There are some packets lost.")
 
     def test_set_valid_vf_max_qn(self):
         """
@@ -238,18 +238,24 @@ class TestRuntime_Queue_Number(TestCase):
         """
         set max queue number when setting 32 VFs on 1 PF port.
         """
-        self.setup_env(32)
-        # failed to set VF max queue num to 16.
-        out = self.pmdout.start_testpmd("%s" % self.cores, eal_param="-w %s,queue-num-per-vf=16 --file-prefix=test1 --socket-mem 1024,1024" % self.pf_pci)
-        self.verify("exceeds the hardware maximum 384" in out, "the queue num exceeds the hardware maximum 384")
+        if (self.nic in ["fortville_eagle", "fortpark_TLV"]):
+            self.setup_env(32)
+            # failed to set VF max queue num to 16.
+            out = self.pmdout.start_testpmd("%s" % self.cores, eal_param="-w %s,queue-num-per-vf=16 --file-prefix=test1 --socket-mem 1024,1024" % self.pf_pci)
+            self.verify("exceeds the hardware maximum 384" in out, "the queue num exceeds the hardware maximum 384")
+        elif (self.nic in ["fortville_spirit", "fortville_spirit_single"]):
+            self.setup_env(64)
+            # failed to set VF max queue num to 16.
+            out = self.pmdout.start_testpmd("%s" % self.cores, eal_param="-w %s,queue-num-per-vf=16 --file-prefix=test1 --socket-mem 1024,1024" % self.pf_pci)
+            self.verify("exceeds the hardware maximum 768" in out, "the queue num exceeds the hardware maximum 768")
         self.dut.send_expect("quit", "# ")
         time.sleep(5)
         # succeed in setting VF max queue num to 8
         self.pmdout.start_testpmd("%s" % self.cores, eal_param="-w %s,queue-num-per-vf=8 --file-prefix=test1 --socket-mem 1024,1024" % self.pf_pci)
         # start testpmd on vf0
-        self.session_secondary.send_expect("./%s/app/testpmd -c 0xf0 -n 4 -w %s --file-prefix=test2 --socket-mem 1024,1024 -- -i --rxq=%d --txq=%d" % (self.target, self.sriov_vfs_port[0].pci, 8, 8), "testpmd>", 120)
+        self.session_secondary.send_expect("./%s/app/testpmd -c 0x1e0 -n 4 -w %s --file-prefix=test2 --socket-mem 1024,1024 -- -i --rxq=%d --txq=%d" % (self.target, self.sriov_vfs_port[0].pci, 8, 8), "testpmd>", 120)
         # start testpmd on vf31 with different rxq/txq number
-        self.session_third.send_expect("./%s/app/testpmd -c 0xf00 -n 4 -w %s --file-prefix=test3 --socket-mem 1024,1024 -- -i" % (self.target, self.sriov_vfs_port[31].pci), "testpmd>", 120)
+        self.session_third.send_expect("./%s/app/testpmd -c 0x1e00 -n 4 -w %s --file-prefix=test3 --socket-mem 1024,1024 -- -i" % (self.target, self.sriov_vfs_port[31].pci), "testpmd>", 120)
         # check the max queue number and current queue number
         outstring = self.session_secondary.send_expect("show port info all", "testpmd> ", 120)
         self.verify_result(outstring, max_rxqn=8, max_txqn=8, cur_rxqn=8, cur_txqn=8)
-- 
2.7.4

             reply	other threads:[~2018-07-11  5:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11  5:45 Peng Yuan [this message]
2018-07-12  3:14 ` Liu, Yong

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=1531287938-78348-1-git-send-email-yuan.peng@intel.com \
    --to=yuan.peng@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).