test suite reviews and discussions
 help / color / mirror / Atom feed
* Re: [dts] [PATCH V1] tests/TestSuite_dcf_lifecycle:change the way to get cores
  2020-12-25  1:48 [dts] [PATCH V1] tests/TestSuite_dcf_lifecycle:change the way to get cores Xie wei
@ 2020-12-25  1:47 ` Xie, WeiX
  2020-12-28  7:30 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Xie, WeiX @ 2020-12-25  1:47 UTC (permalink / raw)
  To: dts

[-- Attachment #1: Type: text/plain, Size: 334 bytes --]

Tested-by:  Xie,WeiX < weix.xie@intel.com>

Regards,
Xie Wei


> -----Original Message-----
> From: Xie wei [mailto:weix.xie@intel.com]
> Sent: Friday, December 25, 2020 9:49 AM
> To: dts@dpdk.org
> Cc: Xie, WeiX <weix.xie@intel.com>
> Subject: [dts][PATCH V1] tests/TestSuite_dcf_lifecycle:change the way to
> get cores

[-- Attachment #2: TestDcfLifeCycle.log --]
[-- Type: application/octet-stream, Size: 178684 bytes --]

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

* [dts] [PATCH V1] tests/TestSuite_dcf_lifecycle:change the way to get cores
@ 2020-12-25  1:48 Xie wei
  2020-12-25  1:47 ` Xie, WeiX
  2020-12-28  7:30 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Xie wei @ 2020-12-25  1:48 UTC (permalink / raw)
  To: dts; +Cc: Xie wei

1.change the way to get cores, some env cores are less than 14, it makes testpmd launch failed. And when several testpmd are started at the same time, different cores should be used.
2.the ACL rule id need to match, not hard code. 

Signed-off-by: Xie wei <weix.xie@intel.com>
---
 tests/TestSuite_dcf_lifecycle.py | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/TestSuite_dcf_lifecycle.py b/tests/TestSuite_dcf_lifecycle.py
index f3189316..b5e60183 100644
--- a/tests/TestSuite_dcf_lifecycle.py
+++ b/tests/TestSuite_dcf_lifecycle.py
@@ -307,8 +307,7 @@ class TestDcfLifeCycle(TestCase):
 
     def start_vf_dcf_testpmd(self, pmd_opiton):
         whitelist_name, prefix = pmd_opiton
-        cores = self.corelist[:5]
-        core_mask = utils.create_mask(cores)
+        core_mask = utils.create_mask(self.core_pf)
         whitelist = self.vf_whitelist().get(whitelist_name)
         cmd = (
             "{bin} "
@@ -367,8 +366,7 @@ class TestDcfLifeCycle(TestCase):
 
     def start_vf_testpmd2(self, pmd_opiton):
         whitelist_name, prefix = pmd_opiton
-        cores = self.corelist[5:]
-        core_mask = utils.create_mask(cores)
+        core_mask = utils.create_mask(self.core_vf)
         whitelist = self.vf_whitelist().get(whitelist_name)
         cmd = (
             "{bin} "
@@ -997,8 +995,9 @@ class TestDcfLifeCycle(TestCase):
     def preset_pmd_res(self):
         self.dcf_dev_id = '8086:1889'
         self.socket = self.dut.get_numa_id(self.dut_ports[0])
-        self.corelist = self.dut.get_core_list(
-            "1S/14C/1T", socket=self.socket)[4:]
+        self.dut.init_reserved_core()
+        self.core_pf = self.dut.get_reserved_core('2C', 0)
+        self.core_vf = self.dut.get_reserved_core('2C', 0)
 
     def clear_flags(self):
         self.is_vf_dcf_pmd_on = self.is_vf_pmd2_on = False
@@ -1268,12 +1267,14 @@ class TestDcfLifeCycle(TestCase):
             self.verify('rmgr: Cannot insert RX class rule: No such file or directory' in out,
                         'success to add ACL filter')
         else:
-            self.verify('Added rule with ID 15871' in out, 'add rule failed')
+            pattern = re.compile('.*Added\s+rule\s+with\s+ID\s+(\d+)')
+            res = re.search(pattern, out)
+            self.verify(res, 'NO ACL rule id matched')
+            self.rule_id = res.group(1)
 
     def launch_dcf_testpmd(self):
         # launch testpmd on VF0 requesting for DCF funtionality
-        cores = self.corelist[:5]
-        core_mask = utils.create_mask(cores)
+        core_mask = utils.create_mask(self.core_pf)
         whitelist = self.vf_whitelist().get('pf1_vf0_dcf')
         cmd_dcf = (
             "{bin} "
@@ -1296,7 +1297,7 @@ class TestDcfLifeCycle(TestCase):
     def delete_acl_rule_by_kernel_cmd(self, port_id=0):
         # delete the kernel ACL rule
         intf = self.dut.ports_info[port_id]['port'].intf_name
-        self.d_a_con('ethtool -N %s delete 15871' % intf)
+        self.d_a_con('ethtool -N %s delete %s' % (intf, self.rule_id))
 
     def test_handle_acl_filter_01(self):
         '''
@@ -1356,8 +1357,7 @@ class TestDcfLifeCycle(TestCase):
         self.send_pkt_to_vf1_again()
 
         # re-launch AVF on VF0
-        cores = self.corelist[:5]
-        core_mask = utils.create_mask(cores)
+        core_mask = utils.create_mask(self.core_pf)
         whitelist = self.vf_whitelist().get('pf1_vf0')
         cmd = (
             "{bin} "
-- 
2.17.1


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

* Re: [dts] [PATCH V1] tests/TestSuite_dcf_lifecycle:change the way to get cores
  2020-12-25  1:48 [dts] [PATCH V1] tests/TestSuite_dcf_lifecycle:change the way to get cores Xie wei
  2020-12-25  1:47 ` Xie, WeiX
@ 2020-12-28  7:30 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-12-28  7:30 UTC (permalink / raw)
  To: Xie, WeiX, dts; +Cc: Xie, WeiX

> 1.change the way to get cores, some env cores are less than 14, it makes
> testpmd launch failed. And when several testpmd are started at the same
> time, different cores should be used.
> 2.the ACL rule id need to match, not hard code.
> 
> Signed-off-by: Xie wei <weix.xie@intel.com>

Applied with commit message changed

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

end of thread, other threads:[~2020-12-28  7:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-25  1:48 [dts] [PATCH V1] tests/TestSuite_dcf_lifecycle:change the way to get cores Xie wei
2020-12-25  1:47 ` Xie, WeiX
2020-12-28  7:30 ` Tu, Lijuan

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git