From: "Liu, Yong" <yong.liu@intel.com>
To: "Tu, LijuanX A" <lijuanx.a.tu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Tu, LijuanX A" <lijuanx.a.tu@intel.com>
Subject: Re: [dts] [PATCH v2]vf_vlan: fix crc-strip, renam dot1q , modify vlan rx tests
Date: Thu, 7 Jul 2016 05:35:15 +0000 [thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E222501D3@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1467341616-31579-1-git-send-email-lijuanx.a.tu@intel.com>
Applied, thanks.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Lijuan Tu
> Sent: Friday, July 01, 2016 10:54 AM
> To: dts@dpdk.org
> Cc: Tu, LijuanX A
> Subject: [dts] [PATCH v2]vf_vlan: fix crc-strip, renam dot1q , modify vlan
> rx tests
>
> 1, For fortville, dpdk16.07 will quit testpmd if VF can't disable HW CRC
> Strip
> 2, rename dot1q to vlan
> 3, modify vlan rx tests
> Enable vlan filter on port A
> "vlan set filter vlan 0"
> Add vlan x on port A
> "rx_vlan add 1 0"
> Send packets with vlan x ,and check packet can received
> Remove vlan x on port A
> "rx_vlan rm 1 0"
> Send packets with vlan x ,and check packet can't received
> more detail infomation see test plan.
>
> Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
> ---
> tests/TestSuite_vf_vlan.py | 32 ++++++++++++++++++++++++--------
> 1 file changed, 24 insertions(+), 8 deletions(-)
>
> diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
> index e32e5bd..fc1527c 100644
> --- a/tests/TestSuite_vf_vlan.py
> +++ b/tests/TestSuite_vf_vlan.py
> @@ -152,7 +152,10 @@ class TestVfVlan(TestCase):
> self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>
> self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> + 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.execute_cmd('set fwd mac')
> self.vm0_testpmd.execute_cmd('start')
>
> @@ -176,7 +179,7 @@ class TestVfVlan(TestCase):
> pkt.config_layer('ether', {'dst': self.vf0_mac})
> elif pkt_type == "VLAN_UDP":
> pkt = Packet(pkt_type='VLAN_UDP')
> - pkt.config_layer('dot1q', {'vlan': vlan})
> + pkt.config_layer('vlan', {'vlan': vlan})
> pkt.config_layer('ether', {'dst': self.vf0_mac})
>
> pkt.send_pkt(tx_port=self.tester_intf0)
> @@ -197,7 +200,10 @@ class TestVfVlan(TestCase):
> self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>
> self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> + 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.execute_cmd('set fwd rxonly')
> self.vm0_testpmd.execute_cmd('set verbose 1')
> self.vm0_testpmd.execute_cmd('start')
> @@ -249,7 +255,7 @@ class TestVfVlan(TestCase):
> pkts = load_sniff_packets(inst)
> vlans = []
> for pkt in pkts:
> - vlan = pkt.strip_element_dot1q("vlan")
> + vlan = pkt.strip_element_vlan("vlan")
> vlans.append(vlan)
>
> self.verify(
> @@ -262,7 +268,10 @@ class TestVfVlan(TestCase):
> self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>
> self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> + 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.execute_cmd('set verbose 1')
>
> for tx_vlan in tx_vlans:
> @@ -283,10 +292,14 @@ class TestVfVlan(TestCase):
> self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>
> self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> + 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.execute_cmd('set fwd rxonly')
> self.vm0_testpmd.execute_cmd('set verbose 1')
> self.vm0_testpmd.execute_cmd('vlan set strip on 0')
> + self.vm0_testpmd.execute_cmd('vlan set filter on 0')
> self.vm0_testpmd.execute_cmd('start')
>
> # send packet without vlan
> @@ -334,7 +347,7 @@ class TestVfVlan(TestCase):
> # send packet with vlan
> out = self.send_and_getout(vlan=random_vlan, pkt_type="VLAN_UDP")
> self.verify(
> - "received 1 packets" in out, "Not received vlan packet
> without vlan filter!!!")
> + "received 1 packets" not in out, "Received mismatched vlan
> packet while vlan filter on")
>
> self.vm0_testpmd.quit()
>
> @@ -345,7 +358,10 @@ class TestVfVlan(TestCase):
> self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>
> self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> + 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.execute_cmd('set fwd rxonly')
> self.vm0_testpmd.execute_cmd('set verbose 1')
> self.vm0_testpmd.execute_cmd('start')
> --
> 1.9.3
prev parent reply other threads:[~2016-07-07 5:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 2:53 Lijuan Tu
2016-07-07 5:35 ` Liu, Yong [this message]
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=86228AFD5BCD8E4EBFD2B90117B5E81E222501D3@SHSMSX103.ccr.corp.intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
--cc=lijuanx.a.tu@intel.com \
/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).