* [dts] [PATCH] add test code for 4*25G NIC
@ 2020-06-10 8:04 Peng Yuan
2020-06-11 13:25 ` Tu, Lijuan
0 siblings, 1 reply; 2+ messages in thread
From: Peng Yuan @ 2020-06-10 8:04 UTC (permalink / raw)
To: dts; +Cc: Peng Yuan
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] add test code for 4*25G NIC
2020-06-10 8:04 [dts] [PATCH] add test code for 4*25G NIC Peng Yuan
@ 2020-06-11 13:25 ` Tu, Lijuan
0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-06-11 13:25 UTC (permalink / raw)
To: Peng, Yuan, dts; +Cc: Peng, Yuan
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-11 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 8:04 [dts] [PATCH] add test code for 4*25G NIC Peng Yuan
2020-06-11 13:25 ` Tu, Lijuan
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).