test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/ddp_gtp: fix acquire vf queue fail
@ 2018-01-24  9:20 zhao,meijuan
  2018-01-25  9:39 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: zhao,meijuan @ 2018-01-24  9:20 UTC (permalink / raw)
  To: dts; +Cc: zhao,meijuan

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH V1] tests/ddp_gtp: fix acquire vf queue fail
  2018-01-24  9:20 [dts] [PATCH V1] tests/ddp_gtp: fix acquire vf queue fail zhao,meijuan
@ 2018-01-25  9:39 ` Liu, Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2018-01-25  9:39 UTC (permalink / raw)
  To: zhao,meijuan, dts

Thanks Meijuan. Applied.

On 01/24/2018 05:20 PM, zhao,meijuan wrote:
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-25  1:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24  9:20 [dts] [PATCH V1] tests/ddp_gtp: fix acquire vf queue fail zhao,meijuan
2018-01-25  9:39 ` Liu, Yong

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).