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 726E6A0487 for ; Tue, 2 Jul 2019 09:42:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 50D975B3A; Tue, 2 Jul 2019 09:42:58 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CC1B95B34 for ; Tue, 2 Jul 2019 09:42:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2019 00:31:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,442,1557212400"; d="scan'208";a="184441170" Received: from unknown (HELO localhost.localdomain.sh.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 02 Jul 2019 00:31:53 -0700 From: "zhang,yan" To: dts@dpdk.org Cc: "zhang,yan" Date: Tue, 2 Jul 2019 15:36:35 +0800 Message-Id: <1562052995-126338-1-git-send-email-yanx.a.zhang@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [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" 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. Signed-off-by: zhang,yan --- tests/TestSuite_sriov_kvm.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 = 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') self.vm1_dut_ports = self.vm_dut_1.get_ports('any') self.vm1_testpmd = 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') self.setup_2vm_prerequisite_flag = 1 @@ -676,6 +678,7 @@ class TestSriovKvm(TestCase): self.vm1_testpmd.start_testpmd(VM_CORES_MASK) vf1_mac = 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') self.vm0_testpmd = PmdOutput(self.vm_dut_0) @@ -683,6 +686,7 @@ class TestSriovKvm(TestCase): VM_CORES_MASK, "--eth-peer=0,%s" % vf1_mac) vf0_mac = 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') self.setup_2vm_prerequisite_flag = 1 @@ -982,9 +986,9 @@ class TestSriovKvm(TestCase): packet_num = 10 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('sage'): set_mac_cmd = "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 = "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)) -- 2.17.2