test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Peng, Yuan" <yuan.peng@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Peng, Yuan" <yuan.peng@intel.com>
Subject: Re: [dts] [PATCH] add test code for 4*25G NIC
Date: Thu, 11 Jun 2020 13:25:12 +0000	[thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC5BE64@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1591776245-165515-1-git-send-email-yuan.peng@intel.com>

Applied, thanks

-----Original Message-----
From: dts <dts-bounces@dpdk.org> On Behalf Of Peng Yuan
Sent: 2020年6月10日 16:04
To: dts@dpdk.org
Cc: Peng, Yuan <yuan.peng@intel.com>
Subject: [dts] [PATCH] add test code for 4*25G NIC

add discription for 4*25 NIC in test plan.
add test code for 4*25 NIC in max rules test case

Signed-off-by: Peng Yuan <yuan.peng@intel.com>

diff --git a/test_plans/iavf_fdir_test_plan.rst b/test_plans/iavf_fdir_test_plan.rst
index 4a07c47..a201b9d 100644
--- a/test_plans/iavf_fdir_test_plan.rst
+++ b/test_plans/iavf_fdir_test_plan.rst
@@ -2687,6 +2687,9 @@ Subcase 3: different patterns, different actions
 
 Test case: Max number
 =====================
+All the max number cases are designed based on 2*100G NIC.
+If the hardware is 4*25G NIC, the guaranteed rule number of PF is 512.
+So in subcase 3, there can be created at most 14848 rules on 1pf and 2vfs.
 
 Subcase 1: 14336 rules on 1 vf
 ------------------------------
diff --git a/tests/TestSuite_iavf_fdir.py b/tests/TestSuite_iavf_fdir.py index 8d11487..7463250 100644
--- a/tests/TestSuite_iavf_fdir.py
+++ b/tests/TestSuite_iavf_fdir.py
@@ -471,12 +471,6 @@ tv_pfcp_drop = {
         {"port_id": 0, "passthru": 1}]
 }
 
-tv_add_2048_rules_on_4_VFs_at_meantime = {
-    "name": "test_add_2048_rules_on_4_VFs_at_meantime",
-    "scapy_str": CREATE_2048_RULES_4_VFS,
-    "check_param": {"port_id": 0, "queue": 1}
-}
-
 tv_mac_ipv4_pay_queue_index = {
     "name": "test_mac_ipv4_pay_queue_index",
     "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / end", @@ -2149,6 +2143,8 @@ class TestIAVFFdir(TestCase):
     def test_maxnum_15360rules_1pf_2vf(self):
         """
         2*100G NIC, each pf can create 1024 rules at least, vfs share 14336 rules table
+        4*25G NIC, each pf can create 512 rules at least, vfs share 14336 rules table
+        so if 2*25G NIC, max number is 14848 on 1pf and 2vfs.
         """
         self.dut.kill_all()
         self.session_secondary = self.dut.new_session() @@ -2157,16 +2153,25 @@ class TestIAVFFdir(TestCase):
         src_file = 'iavf_fdir_15360_kernel_rules'
         flows=open(self.src_file_dir + src_file,mode='w')
         count=0
-        for i in range(4):
-            for j in range(256):
-                flows.write('ethtool -N enp134s0f1 flow-type tcp4 src-ip 192.168.%d.%d dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n'%(i,j))
-                count=count+1
-        flows.write('ethtool -N enp134s0f1 flow-type tcp4 src-ip 192.168.100.0 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n')
-        count=count+1
-        flows.close()
-        self.verify(count == 1025, "failed to create 1025 fdir rules on pf.")
+        if self.nic in ["columbiaville_100g"]:
+            for i in range(4):
+                for j in range(256):
+                    flows.write('ethtool -N enp134s0f1 flow-type tcp4 src-ip 192.168.%d.%d dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n'%(i,j))
+                    count=count+1
+            flows.write('ethtool -N enp134s0f1 flow-type tcp4 src-ip 192.168.100.0 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n')
+            count=count+1
+            flows.close()
+            self.verify(count == 1025, "failed to create 1025 fdir rules on pf.")
+        elif self.nic in ["columbiaville_25g"]:
+            for i in range(2):
+                for j in range(256):
+                    flows.write('ethtool -N enp134s0f1 flow-type tcp4 src-ip 192.168.%d.%d dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n'%(i,j))
+                    count=count+1
+            flows.write('ethtool -N enp134s0f1 flow-type tcp4 src-ip 192.168.100.0 dst-ip 192.168.100.2 src-port 32 dst-port 33 action 8 \n')
+            count=count+1
+            flows.close()
+            self.verify(count == 513, "failed to create 1025 fdir rules 
+ on pf.")
         self.dut.session.copy_file_to(self.src_file_dir + src_file, self.dut_file_dir)
-
         # create 1025 rules on pf0
         fkr = open(self.dut_file_dir + "iavf_fdir_15360_kernel_rules", "r+")
         kernel_rules = fkr.read()
--
2.14.3


      reply	other threads:[~2020-06-11 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10  8:04 Peng Yuan
2020-06-11 13:25 ` Tu, Lijuan [this message]

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=8CE3E05A3F976642AAB0F4675D0AD20E0BC5BE64@SHSMSX101.ccr.corp.intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=yuan.peng@intel.com \
    /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).