test suite reviews and discussions
 help / color / mirror / Atom feed
From: sunqin <qinx.sun@intel.com>
To: dts@dpdk.org
Cc: sunqin <qinx.sun@intel.com>
Subject: [dts] [PATCH V1 2/3] tests/cvl_switch_filter change method to get maximum number of rules
Date: Fri,  8 Jan 2021 14:19:52 +0000	[thread overview]
Message-ID: <20210108141953.8575-3-qinx.sun@intel.com> (raw)
In-Reply-To: <20210108141953.8575-1-qinx.sun@intel.com>

Use 'get_max_rule_number' method to get maximum number of rules

Signed-off-by: sunqin <qinx.sun@intel.com>
---
 tests/TestSuite_cvl_switch_filter.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_cvl_switch_filter.py b/tests/TestSuite_cvl_switch_filter.py
index 02c9002f..1005f3a2 100644
--- a/tests/TestSuite_cvl_switch_filter.py
+++ b/tests/TestSuite_cvl_switch_filter.py
@@ -4525,6 +4525,7 @@ class CVLSwitchFilterTest(TestCase):
         #bind pf to vfio-pci
         self.dut.send_expect('modprobe vfio-pci', '#')
         self.bind_nics_driver(self.dut_ports, driver="vfio-pci")
+        self.pmd = PmdOutput(self.dut)
 
         self.generate_file_with_fdir_rules()
         self.path = self.dut.apps_name['test-pmd']
@@ -4547,7 +4548,10 @@ class CVLSwitchFilterTest(TestCase):
         """
         generate file with fdir rules to make fdir table full, then test switch filter
         """
-        self.fdir_rule_number = 14336 + int(2048/(len(self.dut_ports)))
+        pf_pci = self.dut.ports_info[0]['pci']
+        out = self.pmd.start_testpmd('default', eal_param='-a %s --log-level=ice,7'%pf_pci)
+        self.dut.send_expect("quit", "# ")
+        self.fdir_rule_number = self.pmd.get_max_rule_number(self,out)
         src_file = 'dep/testpmd_cmds_rte_flow_fdir_rules'
         flows = open(src_file, mode='w')
         rule_count = 1
-- 
2.17.1


  parent reply	other threads:[~2021-01-08  5:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 14:19 [dts] [PATCH V1 0/3] " sunqin
2021-01-08  6:43 ` Zhao, HaiyangX
2021-01-08  7:11 ` Sun, QinX
2021-01-08 14:19 ` [dts] [PATCH V1 1/3] framework/pmd_output add " sunqin
2021-01-08 14:19 ` sunqin [this message]
2021-01-08 14:19 ` [dts] [PATCH V1 3/3] tests/cvl_fdir change method to get maximum threshold " sunqin
2021-01-13  7:10 ` [dts] [PATCH V1 0/3] change method to get maximum number " 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=20210108141953.8575-3-qinx.sun@intel.com \
    --to=qinx.sun@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).