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 B0CCBA0487 for ; Tue, 2 Jul 2019 09:52:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 69DD11B945; Tue, 2 Jul 2019 09:52:03 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 14F385B3A for ; Tue, 2 Jul 2019 09:52:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 00:51:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,442,1557212400"; d="scan'208";a="362112685" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 02 Jul 2019 00:52:00 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 2 Jul 2019 00:52:00 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.110]) with mapi id 14.03.0439.000; Tue, 2 Jul 2019 15:51:57 +0800 From: "Zhu, ShuaiX" To: "Zhang, YanX A" , "dts@dpdk.org" CC: "Zhang, YanX A" , "Zhu, ShuaiX" Thread-Topic: [dts] [PATCH V1] tests/TestSuite_sriov_kvm:disable promisc mode to forbid misc packets Thread-Index: AQHVMKnO4xXGl6MrVEik77/Ooc+r9qa29JaA Date: Tue, 2 Jul 2019 07:51:57 +0000 Message-ID: <4DC48DF9BDA3E54A836D2D3C057DEC6F0B1BBA08@SHSMSX101.ccr.corp.intel.com> References: <1562052995-126338-1-git-send-email-yanx.a.zhang@intel.com> In-Reply-To: <1562052995-126338-1-git-send-email-yanx.a.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action 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/TestSuite_sriov_kvm:disable promisc mode to forbid misc packets 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" Tested-by: Zhu, ShuaiX > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhang,yan > Sent: Tuesday, July 2, 2019 3:37 PM > To: dts@dpdk.org > Cc: Zhang, YanX A > Subject: [dts] [PATCH V1] tests/TestSuite_sriov_kvm:disable promisc mode = to > forbid misc packets >=20 > 1. disable promisc mode to forbid misc packets. > 2. Add judge NIC type, make test_two_vms_add_multi_exact_mac_on_vf > applies to fortpark, sagevill, and sagepond NIC. >=20 > Signed-off-by: zhang,yan > --- > tests/TestSuite_sriov_kvm.py | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) >=20 > diff --git a/tests/TestSuite_sriov_kvm.py b/tests/TestSuite_sriov_kvm.py = index > eadeb05..3518f8f 100644 > --- a/tests/TestSuite_sriov_kvm.py > +++ b/tests/TestSuite_sriov_kvm.py > @@ -627,12 +627,14 @@ class TestSriovKvm(TestCase): > self.vm0_testpmd =3D PmdOutput(self.vm_dut_0) > self.vm0_testpmd.start_testpmd(VM_CORES_MASK) > self.vm0_testpmd.execute_cmd('set fwd rxonly') > + self.vm0_testpmd.execute_cmd('set promisc all off') > self.vm0_testpmd.execute_cmd('start') >=20 > self.vm1_dut_ports =3D self.vm_dut_1.get_ports('any') > self.vm1_testpmd =3D PmdOutput(self.vm_dut_1) > self.vm1_testpmd.start_testpmd(VM_CORES_MASK) > self.vm1_testpmd.execute_cmd('set fwd mac') > + self.vm1_testpmd.execute_cmd('set promisc all off') > self.vm1_testpmd.execute_cmd('start') >=20 > self.setup_2vm_prerequisite_flag =3D 1 @@ -676,6 +678,7 @@ class > TestSriovKvm(TestCase): > self.vm1_testpmd.start_testpmd(VM_CORES_MASK) > vf1_mac =3D self.vm1_testpmd.get_port_mac(port_id_0) > self.vm1_testpmd.execute_cmd('set fwd mac') > + self.vm1_testpmd.execute_cmd("set promisc all off") > self.vm1_testpmd.execute_cmd('start') >=20 > self.vm0_testpmd =3D PmdOutput(self.vm_dut_0) @@ -683,6 +686,7 > @@ class TestSriovKvm(TestCase): > VM_CORES_MASK, "--eth-peer=3D0,%s" % vf1_mac) > vf0_mac =3D self.vm0_testpmd.get_port_mac(port_id_0) > self.vm0_testpmd.execute_cmd('set fwd mac') > + self.vm0_testpmd.execute_cmd("set promisc all off") > self.vm0_testpmd.execute_cmd('start') >=20 > self.setup_2vm_prerequisite_flag =3D 1 @@ -982,9 +986,9 @@ class > TestSriovKvm(TestCase): > packet_num =3D 10 >=20 > for vf_mac in ["00:11:22:33:44:55", "00:55:44:33:22:11"]: > - if self.nic.startswith('niantic'): > + if self.nic.startswith('niantic') or self.nic.startswith('sa= ge'): > set_mac_cmd =3D "mac_addr add port %d vf %d %s" > - elif self.nic.startswith('fortville'): > + elif self.nic.startswith('fortville') or > self.nic.startswith('fortpark'): > set_mac_cmd =3D "set port %d vf %d %s exact-mac-vlan on" > self.host_testpmd.execute_cmd(set_mac_cmd % (port_id_0, > vf_num, vf_mac)) >=20 > -- > 2.17.2