From: Lijuan Tu <lijuanx.a.tu@intel.com>
To: dts@dpdk.org
Cc: Lijuan Tu <lijuanx.a.tu@intel.com>
Subject: [dts] [PATCH V1]vf_vlan: remove crc-strip parameter and adjust to newer kernel driver.
Date: Thu, 11 May 2017 17:00:08 +0800 [thread overview]
Message-ID: <1494493208-42770-1-git-send-email-lijuanx.a.tu@intel.com> (raw)
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 <lijuanx.a.tu@intel.com>
---
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
next reply other threads:[~2017-05-11 8:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 9:00 Lijuan Tu [this message]
2017-05-15 1:13 ` Liu, Yong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1494493208-42770-1-git-send-email-lijuanx.a.tu@intel.com \
--to=lijuanx.a.tu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).