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 65102A00C5; Thu, 11 Jun 2020 09:09:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D0F82F42; Thu, 11 Jun 2020 09:09:23 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 6C0772E81 for ; Thu, 11 Jun 2020 09:09:21 +0200 (CEST) IronPort-SDR: xxvFoisScWe5JVny+s00XJzfzC5Gy/K7GjlHr5bl337SUgqWY9nVsyPbi6jLDGf4DLA65Yobi6 UCe58h/4poaw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2020 00:09:09 -0700 IronPort-SDR: zL5dObhxJVL4Ec/K1ZDRCxeWfImjB9PMYk23WOjH9Lua5YQZGTI9HIlvcjGxvULgJ9gPCOp625 gxaN5xFKkCSQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,499,1583222400"; d="scan'208";a="380307738" Received: from unknown (HELO dpdk-zhaohy-t.localdomain) ([10.240.183.68]) by fmsmga001.fm.intel.com with ESMTP; 11 Jun 2020 00:09:08 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: Haiyang Zhao Date: Thu, 11 Jun 2020 14:59:39 +0800 Message-Id: <1591858780-153380-5-git-send-email-haiyangx.zhao@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1591858780-153380-1-git-send-email-haiyangx.zhao@intel.com> References: <1591858780-153380-1-git-send-email-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V1 4/5] tests/vf_vlan: update scripts to meet CVL 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" *.update scripts to meet CVL. Signed-off-by: Haiyang Zhao --- tests/TestSuite_vf_vlan.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py index 7f46aa6..7aec89c 100644 --- a/tests/TestSuite_vf_vlan.py +++ b/tests/TestSuite_vf_vlan.py @@ -36,7 +36,6 @@ class TestVfVlan(TestCase): self.vf_assign_method = 'vfio-pci' self.dut.send_expect('modprobe vfio-pci', '#') - def set_up(self): self.setup_vm_env() @@ -84,6 +83,8 @@ class TestVfVlan(TestCase): self.used_dut_port_0, 1, driver=driver) self.sriov_vfs_port_0 = self.dut.ports_info[ self.used_dut_port_0]['vfs_port'] + if self.kdriver == 'ice': + self.dut.send_expect("ip link set %s vf 0 spoofchk off" %(self.host_intf0), "# ") self.vf0_mac = "00:10:00:00:00:00" self.dut.send_expect("ip link set %s vf 0 mac %s" % (self.host_intf0, self.vf0_mac), "# ") @@ -231,12 +232,19 @@ class TestVfVlan(TestCase): "received" not in out, "Received pacekt with wrong vlan!!!") # remove vlan - self.dut.send_expect( - "ip link set %s vf 0 vlan 0" % self.host_intf0, "# ") + self.vm0_testpmd.execute_cmd("stop") + self.vm0_testpmd.execute_cmd("port stop all") + self.dut.send_expect("ip link set %s vf 0 vlan 0" % self.host_intf0, "# ") + out = self.dut.send_expect("ip link show %s" % self.host_intf0, "# ") + self.verify("vlan %d" % random_vlan not in out, "Failed to remove pvid on VF0") # send packet with vlan + self.vm0_testpmd.execute_cmd("port reset 0") + self.vm0_testpmd.execute_cmd("port start all") + self.vm0_testpmd.execute_cmd("start") + out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") - if self.kdriver == "i40e": + if self.kdriver == "i40e" or self.kdriver == 'ice': self.verify("received" in out, "Failed to received vlan packet!!!") else: self.verify( @@ -288,7 +296,7 @@ class TestVfVlan(TestCase): # for fortville , # if you want insert tx_vlan, # please enable rx_vlan at the same time - if self.kdriver == "i40e": + if self.kdriver == "i40e" or self.kdriver == 'ice': self.vm0_testpmd.execute_cmd('vlan set filter on 0') self.vm0_testpmd.execute_cmd('rx_vlan add %d 0' % tx_vlan) self.vm0_testpmd.execute_cmd('stop') @@ -358,7 +366,7 @@ class TestVfVlan(TestCase): # send packet with vlan out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") - if self.kdriver == "i40e": + if self.kdriver == "i40e" or self.kdriver == 'ice': self.verify( "received 1 packets" in out, "Received mismatched vlan packet while vlan filter on") else: -- 1.8.3.1