From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3800F2E83 for ; Thu, 11 May 2017 10:58:45 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2017 01:58:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,323,1491289200"; d="scan'208";a="1128926701" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by orsmga001.jf.intel.com with ESMTP; 11 May 2017 01:58:44 -0700 From: Lijuan Tu To: dts@dpdk.org Cc: Lijuan Tu Date: Thu, 11 May 2017 17:00:08 +0800 Message-Id: <1494493208-42770-1-git-send-email-lijuanx.a.tu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH V1]vf_vlan: remove crc-strip parameter and adjust to newer kernel driver. 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: , X-List-Received-Date: Thu, 11 May 2017 08:58:46 -0000 1, i40e VF HW crc-strip default enabled after commit 60da774e. 2, ixgbe's behavior of vlan changed after 1.5, 3, i40e's behavior of vlan changed after 1.6 Signed-off-by: Lijuan Tu --- tests/TestSuite_vf_vlan.py | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py index 1edf23d..90b1d13 100644 --- a/tests/TestSuite_vf_vlan.py +++ b/tests/TestSuite_vf_vlan.py @@ -153,10 +153,7 @@ class TestVfVlan(TestCase): self.vm0_dut_ports = self.vm_dut_0.get_ports('any') self.vm0_testpmd = PmdOutput(self.vm_dut_0) - if self.kdriver == "i40e": - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') - else: - self.vm0_testpmd.start_testpmd(VM_CORES_MASK) + self.vm0_testpmd.start_testpmd(VM_CORES_MASK) self.vm0_testpmd.execute_cmd('set fwd mac') self.vm0_testpmd.execute_cmd('start') @@ -201,10 +198,7 @@ class TestVfVlan(TestCase): self.vm0_dut_ports = self.vm_dut_0.get_ports('any') self.vm0_testpmd = PmdOutput(self.vm_dut_0) - if self.kdriver == "i40e": - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') - else: - self.vm0_testpmd.start_testpmd(VM_CORES_MASK) + self.vm0_testpmd.start_testpmd(VM_CORES_MASK) self.vm0_testpmd.execute_cmd('set fwd rxonly') self.vm0_testpmd.execute_cmd('set verbose 1') self.vm0_testpmd.execute_cmd('start') @@ -228,8 +222,11 @@ class TestVfVlan(TestCase): # send packet with vlan out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") - self.verify( - "received" not in out, "Received vlan packet without pvid!!!") + if self.kdriver == "i40e": + self.verify("received" in out, "Failed to received vlan packet!!!") + else: + self.verify( + "received" not in out, "Received vlan packet without pvid!!!") # send packe with vlan 0 out = self.send_and_getout(vlan=0, pkt_type="VLAN_UDP") @@ -263,16 +260,14 @@ class TestVfVlan(TestCase): tx_vlan in vlans, "Tx packet with vlan not received!!!") def test_vf_vlan_tx(self): + self.verify(self.kdriver not in ["ixgbe"], "NIC Unsupported: " + str(self.nic)) random_vlan = random.randint(1, MAX_VLAN) tx_vlans = [1, random_vlan, MAX_VLAN] # start testpmd in VM self.vm0_dut_ports = self.vm_dut_0.get_ports('any') self.vm0_testpmd = PmdOutput(self.vm_dut_0) - if self.kdriver == "i40e": - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') - else: - self.vm0_testpmd.start_testpmd(VM_CORES_MASK) + self.vm0_testpmd.start_testpmd(VM_CORES_MASK) self.vm0_testpmd.execute_cmd('set verbose 1') for tx_vlan in tx_vlans: @@ -293,10 +288,7 @@ class TestVfVlan(TestCase): self.vm0_dut_ports = self.vm_dut_0.get_ports('any') self.vm0_testpmd = PmdOutput(self.vm_dut_0) - if self.kdriver == "i40e": - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') - else: - self.vm0_testpmd.start_testpmd(VM_CORES_MASK) + self.vm0_testpmd.start_testpmd(VM_CORES_MASK) self.vm0_testpmd.execute_cmd('set fwd rxonly') self.vm0_testpmd.execute_cmd('set verbose 1') self.vm0_testpmd.execute_cmd('vlan set strip on 0') @@ -348,8 +340,12 @@ class TestVfVlan(TestCase): # send packet with vlan out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP") - self.verify( - "received 1 packets" not in out, "Received mismatched vlan packet while vlan filter on") + if self.kdriver == "i40e": + self.verify( + "received 1 packets" in out, "Received mismatched vlan packet while vlan filter on") + else: + self.verify( + "received 1 packets" not in out, "Received mismatched vlan packet while vlan filter on") self.vm0_testpmd.quit() @@ -361,7 +357,7 @@ class TestVfVlan(TestCase): self.vm0_testpmd = PmdOutput(self.vm_dut_0) if self.kdriver == "i40e": - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip') + self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '') else: self.vm0_testpmd.start_testpmd(VM_CORES_MASK) self.vm0_testpmd.execute_cmd('set fwd rxonly') -- 1.9.3