test suite reviews and discussions
 help / color / mirror / Atom feed
From: Jianwei Mei <jianweix.mei@intel.com>
To: dts@dpdk.org
Cc: Jianwei Mei <jianweix.mei@intel.com>
Subject: [dts] [PATCH V1] tests/cvl_switch_filter: hard code will have problems on 4 ports.
Date: Tue,  1 Sep 2020 10:33:49 +0000	[thread overview]
Message-ID: <20200901103349.1438-1-jianweix.mei@intel.com> (raw)

Hard code has porblems on NIC 4 ports.

Signed-off-by: Jianwei Mei <jianweix.mei@intel.com>
---
 tests/TestSuite_cvl_switch_filter.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_cvl_switch_filter.py b/tests/TestSuite_cvl_switch_filter.py
index 339dae6..a4509b3 100644
--- a/tests/TestSuite_cvl_switch_filter.py
+++ b/tests/TestSuite_cvl_switch_filter.py
@@ -4546,18 +4546,18 @@ class CVLSwitchFilterTest(TestCase):
         """
         generate file with fdir rules to make fdir table full, then test switch filter
         """
-        fdir_rule_number = 14336 + int(2048/(len(self.dut_ports)))
+        self.fdir_rule_number = 14336 + int(2048/(len(self.dut_ports)))
         src_file = 'dep/testpmd_cmds_rte_flow_fdir_rules'
         flows = open(src_file, mode='w')
         rule_count = 1
         for i in range(0,255):
             for j in range(0,255):
-                if not rule_count > fdir_rule_number:
+                if not rule_count > self.fdir_rule_number:
                     flows.write('flow create 0 ingress pattern eth / ipv4 src is 192.168.%d.%d dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end \n' % (i, j))
                     rule_count += 1
                 else:
                     break
-            if rule_count > fdir_rule_number:
+            if rule_count > self.fdir_rule_number:
                 break
         flows.close()
         self.dut_file_dir = '/tmp'
@@ -4749,7 +4749,7 @@ class CVLSwitchFilterTest(TestCase):
             result = [i.group(1) for i in res]
             if is_non_pipeline:
                 #remove 15360 fdir rules id
-                del result[:15360]
+                del result[:self.fdir_rule_number]
             if is_need_rss_rule:
                 #remove rss rule id
                 del result[0]
-- 
2.17.1


             reply	other threads:[~2020-09-01  2:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 10:33 Jianwei Mei [this message]
2020-09-01  7:45 ` Lu, Nannan
2020-09-02  4:41 ` 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=20200901103349.1438-1-jianweix.mei@intel.com \
    --to=jianweix.mei@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).