test suite reviews and discussions
 help / color / mirror / Atom feed
From: "zhao,meijuan" <meijuanx.zhao@intel.com>
To: dts@dpdk.org
Cc: "zhao,meijuan" <meijuanx.zhao@intel.com>
Subject: [dts] [PATCH V1] tests/ddp_gtp: fix acquire vf queue fail
Date: Wed, 24 Jan 2018 17:20:16 +0800	[thread overview]
Message-ID: <1516785616-26805-1-git-send-email-meijuanx.zhao@intel.com> (raw)

commit ee653bd8,queue-num-per-vf default value is defined
in drivers/net/i40e/i40e_ethdev.c,name as 
RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF

Signed-off-by: zhao,meijuan <meijuanx.zhao@intel.com>
---
 tests/TestSuite_ddp_gtp.py | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_ddp_gtp.py b/tests/TestSuite_ddp_gtp.py
index 1931b1a..d869580 100644
--- a/tests/TestSuite_ddp_gtp.py
+++ b/tests/TestSuite_ddp_gtp.py
@@ -26,10 +26,12 @@ class TestDdpGtp(TestCase):
         profile_file = 'dep/gtp.pkgo'
         profile_dst = "/tmp/"
         self.dut.session.copy_file_to(profile_file, profile_dst)
-        PF_Q_strip = 'CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF'
-        VF_Q_strip = 'CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF'
-        self.PF_QUEUE = self.search_queue_number(PF_Q_strip)
-        self.VF_QUEUE = self.search_queue_number(VF_Q_strip)
+        self.PF_Q_strip = 'CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF'
+        # commit ee653bd8, queue number of per vf default value is defined
+        # in drivers/net/i40e/i40e_ethdev.c, named as RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF
+        self.VF_Q_strip = 'RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF'
+        self.PF_QUEUE = self.search_queue_number(self.PF_Q_strip)
+        self.VF_QUEUE = self.search_queue_number(self.VF_Q_strip)
 
     def set_up(self):
         self.setup_vm_env()
@@ -39,15 +41,22 @@ class TestDdpGtp(TestCase):
         """
         Search max queue number from configuration.
         """
-        out = self.dut.send_expect("cat config/common_base", "]# ", 10)
-        pattern = "(%s=)(\d*)" % Q_strip
+        if Q_strip is self.PF_Q_strip:
+            out = self.dut.send_expect("cat config/common_base", "]# ", 10)
+            pattern = "(%s=)(\d*)" % Q_strip
+        else :
+            out = self.dut.send_expect("cat drivers/net/i40e/i40e_ethdev.c", "]# ", 10)
+            pattern = "#define %s\s*(\d*)" % Q_strip
         s = re.compile(pattern)
         res = s.search(out)
         if res is None:
             print utils.RED('Search no queue number.')
             return None
         else:
-            queue = res.group(2)
+            if Q_strip is self.VF_Q_strip:
+                queue = res.group(1)
+            else :
+                queue = res.group(2)
             return int(queue)
 
     def bind_nic_driver(self, ports, driver=""):
-- 
1.9.3

             reply	other threads:[~2018-01-24  9:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24  9:20 zhao,meijuan [this message]
2018-01-25  9:39 ` 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=1516785616-26805-1-git-send-email-meijuanx.zhao@intel.com \
    --to=meijuanx.zhao@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).