From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 383811B3BB for ; Wed, 28 Nov 2018 10:03:12 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2018 01:03:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,290,1539673200"; d="scan'208";a="103178222" Received: from juan.sh.intel.com ([10.67.118.154]) by FMSMGA003.fm.intel.com with ESMTP; 28 Nov 2018 01:03:10 -0800 From: Lijuan Tu To: dts@dpdk.org Cc: Lijuan Tu Date: Thu, 29 Nov 2018 01:31:00 +0800 Message-Id: <1543426260-70337-1-git-send-email-lijuan.tu@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH] tests/vf_macfilter: move function description into the right place 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: , X-List-Received-Date: Wed, 28 Nov 2018 09:03:13 -0000 align with pep8, function description should be put under the function name and before the implementing codes. Signed-off-by: Lijuan Tu --- tests/TestSuite_vf_macfilter.py | 61 +++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/tests/TestSuite_vf_macfilter.py b/tests/TestSuite_vf_macfilter.py index 5998d38..9e6db42 100644 --- a/tests/TestSuite_vf_macfilter.py +++ b/tests/TestSuite_vf_macfilter.py @@ -118,13 +118,16 @@ class TestVfMacFilter(TestCase): port.bind_driver() self.setup_2pf_2vf_1vm_env_flag = 0 - -######1. test case for kernel pf and dpdk vf 2pf_2vf_1vm MAC filter scenario -###### kernel pf will first run 'ip link set pf_interface vf 0 mac xx:xx:xx:xx:xx:xx, then -###### in the vm, send packets with this MAC to VF, check if the MAC filter works. Also -###### send the packets with wrong MAC address to VF, check if the VF will not RX the packets. def test_kernel_2pf_2vf_1vm_iplink_macfilter(self): + """ + test case for kernel pf and dpdk vf 2pf_2vf_1vm MAC filter + scenario + kernel pf will first run 'ip link set pf_interface vf 0 mac + xx:xx:xx:xx:xx:xx', then send packets with this MAC to VF, check + if the MAC filter works. Also send the packets with wrong MAC + address to VF, check if the VF will not RX the packets. + """ self.setup_2pf_2vf_1vm_env(driver='',True) self.result_verify_iplink(True) @@ -162,34 +165,44 @@ class TestVfMacFilter(TestCase): print "\nshow port stats in testpmd for double check: \n", self.vm0_testpmd.execute_cmd('show port stats all') self.verify(result2 != True, "VF0 failed to forward packets to VF1") - -#######2. test case for kernel pf and dpdk vf 2pf_2vf_1vm MAC filter scenario. -####### kernel pf will not set MAC address and the VF will get a random generated MAC -####### in the testpmd in VM, and then add VF mac address in the testpmd,for example, VF_MAC1 -####### then send packets to the VF with the random generated MAC and the new added VF_MAC1 -####### and the expected result is that all packets can be RXed and TXed. What's more, send -####### packets with a wrong MAC address to the VF will not received by the VF. - def test_kernel_2pf_2vf_1vm_mac_add_filter(self): - + """ + test case for kernel pf and dpdk vf 2pf_2vf_1vm MAC filter + scenario. + kernel pf will not set MAC address and the VF will get a random + generated MAC in the testpmd in VM, and then add VF mac address + in the testpmd,for example, VF_MAC1 then send packets to the VF + with the random generated MAC and the new added VF_MAC1 and the + expected result is that all packets can be RXed and TXed. + What's more, send packets with a wrong MAC address to the VF will + not received by the VF. + """ self.setup_2pf_2vf_1vm_env(driver='',False) self.send_packet_and_verify() -#######3. test case for dpdk pf and dpdk vf 2pf_2vf_1vm MAC filter scenario. -####### kernel pf will not set MAC address and the VF will get a random generated MAC -####### in the testpmd in VM, and then add VF mac address in the testpmd,for example, VF_MAC1 -####### then send packets to the VF with the random generated MAC and the new added VF_MAC1 -####### and the expected result is that all packets can be RXed and TXed. What's more, send -####### packets with a wrong MAC address to the VF will not received by the VF. def test_dpdk_2pf_2vf_1vm_mac_add_filter(self): + """ + test case for dpdk pf and dpdk vf 2pf_2vf_1vm MAC filter scenario + dpdk pf will not set MAC address and the VF will get a random + generated MAC in the testpmd in VM, and then add VF mac address + in the testpmd,for example, VF_MAC1 then send packets to the VF + with the random generated MAC and the new added VF_MAC1 and the + expected result is that all packets can be RXed and TXed. + What's more, send packets with a wrong MAC address to the VF will + not received by the VF. + """ self.setup_2pf_2vf_1vm_env(driver='igb_uio',False) self.send_packet_and_verify() -######4. test case for dpdk pf and dpdk vf 2pf_2vf_1vm MAC filter scenario -###### dpdk pf will first run 'set vf mac addr 0 0 xx:xx:xx:xx:xx:xx, then -###### in the vm, send packets with this MAC to VF, check if the MAC filter works. Also -###### send the packets with wrong MAC address to VF, check if the VF will not RX the packets. def test_dpdk_2pf_2vf_1vm_iplink_macfilter(self): + """ + test case for dpdk pf and dpdk vf 2pf_2vf_1vm MAC filter scenario + dpdk pf will first run 'set vf mac addr 0 0 xx:xx:xx:xx:xx:xx, + then send packets with this MAC to VF, check if the MAC filter + send the packets with wrong MAC address to VF, check if the VF will + not RX the packets works. Also send the packets with wrong MAC + address to VF, check if the VF will not RX the packets. + """ self.setup_2pf_2vf_1vm_env(driver='igb_uio',False) self.result_verify_iplink(False) -- 1.8.3.1