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 89CEFA0524; Mon, 24 Feb 2020 05:58:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 475C91BE85; Mon, 24 Feb 2020 05:58:14 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 53D532C39 for ; Mon, 24 Feb 2020 05:58:12 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Feb 2020 20:58:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,478,1574150400"; d="scan'208";a="349842468" Received: from dpdk.sh.intel.com ([10.239.255.129]) by fmsmga001.fm.intel.com with ESMTP; 23 Feb 2020 20:58:10 -0800 From: Jiaqi Min To: dts@dpdk.org Cc: Jiaqi Min Date: Mon, 24 Feb 2020 04:39:04 +0000 Message-Id: <20200224043904.54140-1-jiaqix.min@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/vf_macfilter: update vf macfilter 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" support for add and remove vf mac address in ixgbe Signed-off-by: Jiaqi Min --- tests/TestSuite_vf_macfilter.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_vf_macfilter.py b/tests/TestSuite_vf_macfilter.py index fe64f44..dc30059 100644 --- a/tests/TestSuite_vf_macfilter.py +++ b/tests/TestSuite_vf_macfilter.py @@ -192,7 +192,10 @@ class TestVfMacFilter(TestCase): What's more, send packets with a wrong MAC address to the VF, check the VF will not RX packets. """ - self.verify(self.nic.startswith('fortville') == True, "NIC is [%s], skip this case" %self.nic) + if 'niantic' == self.nic: + self.verify(self.nic.startswith('niantic') == True, "NIC is [%s], skip this case" %self.nic) + else: + self.verify(self.nic.startswith('fortville') == True, "NIC is [%s], skip this case" %self.nic) self.setup_2pf_2vf_1vm_env(False,driver='igb_uio') self.send_packet_and_verify() @@ -245,13 +248,24 @@ 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 != False, "VF0 failed to forward packets to VF1") - print("\nThirdly, negative test, send packets to a wrong MAC, expected result is RX packets=0\n") - dst_mac = self.vf0_wrongmac + print ("\Thirdly, remove the added mac address then send packets to the deleted MAC, expected result is RX packets=0\n") + ret = self.vm0_testpmd.execute_cmd('mac_addr remove 0 %s' %self.vf0_setmac) + # check the operation is supported or not. + print (ret) + + dst_mac = self.vf0_setmac pkt_param=[("ether", {'dst': dst_mac, 'src': src_mac})] result3 = self.tester.check_random_pkts(tgen_ports, pktnum=100, allow_miss=False, params=pkt_param) print("\nshow port stats in testpmd for double check: \n", self.vm0_testpmd.execute_cmd('show port stats all')) self.verify(result3 != True, "VF0 failed to forward packets to VF1") + print ("\nFourthly, negative test, send packets to a wrong MAC, expected result is RX packets=0\n") + dst_mac = self.vf0_wrongmac + pkt_param=[("ether", {'dst': dst_mac, 'src': src_mac})] + result4 = self.tester.check_random_pkts(tgen_ports, pktnum=100, allow_miss=False, params=pkt_param) + print ("\nshow port stats in testpmd for double check: %s\n" % self.vm0_testpmd.execute_cmd('show port stats all')) + self.verify(result4 != True, "VF0 failed to forward packets to VF1") + def tear_down(self): -- 2.17.1