From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0B5E5A051A; Wed, 10 Jun 2020 02:57:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AFAF925D9; Wed, 10 Jun 2020 02:57:01 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9B41F1B53 for ; Wed, 10 Jun 2020 02:57:00 +0200 (CEST) IronPort-SDR: a52atNvDMaZq2fnn6rTBOW+jLQneTTDljatFNZZBmr62A2aPwnbOIFfcP5BTkx+vl3KFFd+561 Bi2tUAO6exzA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2020 17:56:58 -0700 IronPort-SDR: GYAVr0zK1r4zfxEN52MzJGrvMEH1fCElFMD2pi1qGTtMPkebTZkkQUMgZOXhIKPpZ/4iifO3dK hHotj68qIoLg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,494,1583222400"; d="scan'208";a="418573769" Received: from npg_dpdk_nic_yuanpeng_tester62.sh.intel.com ([10.67.119.61]) by orsmga004.jf.intel.com with ESMTP; 09 Jun 2020 17:56:57 -0700 From: Peng Yuan To: dts@dpdk.org Cc: Peng Yuan Date: Wed, 10 Jun 2020 08:04:05 +0000 Message-Id: <1591776245-165515-1-git-send-email-yuan.peng@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH] add test code for 4*25G NIC X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 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 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