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 503C4A0524; Tue, 25 Feb 2020 07:47:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0FA2A1BF8D; Tue, 25 Feb 2020 07:47:31 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id CDD412C02 for ; Tue, 25 Feb 2020 07:47:29 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Feb 2020 22:47:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,483,1574150400"; d="scan'208";a="230926836" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 24 Feb 2020 22:47:28 -0800 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Feb 2020 22:47:28 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Feb 2020 22:47:27 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.5]) by shsmsx102.ccr.corp.intel.com ([169.254.2.126]) with mapi id 14.03.0439.000; Tue, 25 Feb 2020 14:47:25 +0800 From: "He, Zhiwei" To: "Min, JiaqiX" , "dts@dpdk.org" CC: "Min, JiaqiX" , "He, Zhiwei" Thread-Topic: [dts] [PATCH V1] tests/vf_macfilter: update vf macfilter Thread-Index: AQHV6s8IGoAYKVONaUOzbbMDB/YKEKgreRWw Date: Tue, 25 Feb 2020 06:47:24 +0000 Message-ID: <09777F12A863964D9F4AE780D4FEA3E83E7446C1@SHSMSX104.ccr.corp.intel.com> References: <20200224043904.54140-1-jiaqix.min@intel.com> In-Reply-To: <20200224043904.54140-1-jiaqix.min@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" Acked-by zhiwei .he > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jiaqi Min > Sent: Monday, February 24, 2020 12:39 PM > To: dts@dpdk.org > Cc: Min, JiaqiX > Subject: [dts] [PATCH V1] tests/vf_macfilter: update vf macfilter >=20 > support for add and remove vf mac address in ixgbe >=20 > Signed-off-by: Jiaqi Min > --- > tests/TestSuite_vf_macfilter.py | 20 +++++++++++++++++--- > 1 file changed, 17 insertions(+), 3 deletions(-) >=20 > diff --git a/tests/TestSuite_vf_macfilter.py b/tests/TestSuite_vf_macfilt= er.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, ch= eck > the VF will not RX packets. > """ > - self.verify(self.nic.startswith('fortville') =3D=3D True, "NIC i= s [%s], skip this > case" %self.nic) > + if 'niantic' =3D=3D self.nic: > + self.verify(self.nic.startswith('niantic') =3D=3D True, "NIC= is [%s], skip this > case" %self.nic) > + else: > + self.verify(self.nic.startswith('fortville') =3D=3D True, "N= IC > + is [%s], skip this case" %self.nic) > self.setup_2pf_2vf_1vm_env(False,driver=3D'igb_uio') > self.send_packet_and_verify() >=20 > @@ -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 !=3D False, "VF0 failed to forward packets t= o VF1") >=20 > - print("\nThirdly, negative test, send packets to a wrong MAC, ex= pected > result is RX packets=3D0\n") > - dst_mac =3D self.vf0_wrongmac > + print ("\Thirdly, remove the added mac address then send packets= to > the deleted MAC, expected result is RX packets=3D0\n") > + ret =3D self.vm0_testpmd.execute_cmd('mac_addr remove > 0 %s' %self.vf0_setmac) > + # check the operation is supported or not. > + print (ret) > + > + dst_mac =3D self.vf0_setmac > pkt_param=3D[("ether", {'dst': dst_mac, 'src': src_mac})] > result3 =3D self.tester.check_random_pkts(tgen_ports, pktnum=3D1= 00, > allow_miss=3DFalse, params=3Dpkt_param) > print("\nshow port stats in testpmd for double check: \n", > self.vm0_testpmd.execute_cmd('show port stats all')) > self.verify(result3 !=3D True, "VF0 failed to forward packets to= VF1") >=20 > + print ("\nFourthly, negative test, send packets to a wrong MAC, > expected result is RX packets=3D0\n") > + dst_mac =3D self.vf0_wrongmac > + pkt_param=3D[("ether", {'dst': dst_mac, 'src': src_mac})] > + result4 =3D self.tester.check_random_pkts(tgen_ports, pktnum=3D1= 00, > allow_miss=3DFalse, params=3Dpkt_param) > + print ("\nshow port stats in testpmd for double check: %s\n" % > self.vm0_testpmd.execute_cmd('show port stats all')) > + self.verify(result4 !=3D True, "VF0 failed to forward packets to > + VF1") > + >=20 > def tear_down(self): >=20 > -- > 2.17.1