From: "Qiu, Michael" <michael.qiu@intel.com>
To: "Liu, Yong" <yong.liu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH 3/3] tests: Add RRC support with vlan suite
Date: Wed, 8 Jul 2015 01:54:19 +0000 [thread overview]
Message-ID: <533710CFB86FA344BFBF2D6802E60286046B216F@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E10E5AE52@SHSMSX103.ccr.corp.intel.com>
On 7/8/2015 9:43 AM, Liu, Yong wrote:
> Hi Michael,
> Some comments below.
>
>> -----Original Message-----
>> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Michael Qiu
>> Sent: Tuesday, July 07, 2015 5:38 PM
>> To: dts@dpdk.org
>> Subject: [dts] [PATCH 3/3] tests: Add RRC support with vlan suite
>>
>> Add RRC support with vlan suite
>>
>> Signed-off-by: Michael Qiu <michael.qiu@intel.com>
>> ---
>> tests/TestSuite_vlan.py | 56 ++++++++++++++++++++++++++++++--------------
>> -----
>> 1 file changed, 34 insertions(+), 22 deletions(-)
>>
>> diff --git a/tests/TestSuite_vlan.py b/tests/TestSuite_vlan.py
>> index fba68e3..6f443de 100644
>> --- a/tests/TestSuite_vlan.py
>> +++ b/tests/TestSuite_vlan.py
>> @@ -74,12 +74,13 @@ class TestVlan(TestCase):
>> self.dut.send_expect("set verbose 1", "testpmd> ")
>> out = self.dut.send_expect("set fwd mac", "testpmd> ")
>>
>> - if self.nic in ["fortville_eagle", "fortville_spirit",
>> "fortville_spirit_single"]:
>> + if self.nic in ["fortville_eagle", "fortville_spirit",
>> "fortville_spirit_single", "redrockcanyou"]:
>> self.dut.send_expect("set promisc all off", "testpmd> ")
>> self.dut.send_expect("vlan set filter on %s"%dutRxPortId,
>> "testpmd> ")
>>
>> self.dut.send_expect("vlan set strip off %s" % dutRxPortId,
>> "testpmd> ")
>> self.verify('Set mac packet forwarding mode' in out, "set fwd
>> rxonly error")
>> + self.vlan = 51
>>
> Is there any specified reason to set vlan to 51? We used to use value 1 to check vlan feature.
Because RRC default will be set vlan 1, so if we change to 51 will
verify it correctly.
Thanks,
Michael
>
>> def start_tcpdump(self):
>> port = self.tester.get_local_port(dutTxPortId)
>> @@ -98,16 +99,17 @@ class TestVlan(TestCase):
>> # The package stream : testTxPort->dutRxPort->dutTxport-
>>> testRxPort
>> port = self.tester.get_local_port(dutRxPortId)
>> txItf = self.tester.get_interface(port)
>> + self.smac = self.tester.get_mac(port)
>>
>> port = self.tester.get_local_port(dutTxPortId)
>> rxItf = self.tester.get_interface(port)
>>
>> # the package dect mac must is dut tx port id when the port
>> promisc is off
>> - mac = self.dut.get_mac_address(dutRxPortId)
>> + self.dmac = self.dut.get_mac_address(dutRxPortId)
>>
>> # FIXME send a burst with only num packet
>>
>> -
>> self.tester.scapy_append('sendp([Ether(dst="%s")/Dot1Q(vlan=%s)/IP(len=46)
>> ], iface="%s")' % (mac, vid, txItf))
>> +
>> self.tester.scapy_append('sendp([Ether(src="%s",dst="%s")/Dot1Q(vlan=%s)/I
>> P(len=46)], iface="%s")' % (self.smac, self.dmac, vid, txItf))
>>
>> self.tester.scapy_execute()
>> def set_up(self):
>> @@ -120,16 +122,19 @@ class TestVlan(TestCase):
>> Enable receipt of VLAN packets
>> """
>>
>> - self.dut.send_expect("rx_vlan add 1 %s" % dutRxPortId, "testpmd>
>> ")
>> + if self.nic == "redrockcanyou" :
>> + print "fm10k not support this case\n"
>> + return
>> + self.dut.send_expect("rx_vlan add %d %s" % (self.vlan,
>> dutRxPortId), "testpmd> ")
>> self.dut.send_expect("vlan set strip off %s" % dutRxPortId,
>> "testpmd> ")
>> self.dut.send_expect("start", "testpmd> ", 120)
>> out = self.dut.send_expect("show port info %s" % dutRxPortId,
>> "testpmd> ", 20)
>>
>> self.start_tcpdump()
>> - self.vlan_send_packet(1)
>> + self.vlan_send_packet(self.vlan)
>> #out = self.tester.scapy_get_result()
>> out = self.get_tcpdump_package()
>> - self.verify("vlan 1" in out, "Wrong vlan:" + out)
>> + self.verify("vlan %d" % self.vlan in out, "Wrong vlan:" + out)
>>
>> self.dut.send_expect("stop", "testpmd> ")
>>
>> @@ -140,13 +145,15 @@ class TestVlan(TestCase):
>> """
>>
>>
>> - self.dut.send_expect("rx_vlan rm 1 %s" % dutRxPortId, "testpmd> ")
>> + self.dut.send_expect("rx_vlan rm %d %s" % (self.vlan,
>> dutRxPortId), "testpmd> ")
>> self.dut.send_expect("start", "testpmd> ", 120)
>> self.start_tcpdump()
>> - self.vlan_send_packet(1)
>> + self.vlan_send_packet(self.vlan)
>>
>> out = self.get_tcpdump_package()
>> - self.verify("vlan 1" not in out, "Wrong vlan:" + out)
>> + # fm10k switch will redirect package if not send to nic
>> + if (not((self.nic == "redrockcanyou") and ("%s > %s"%(self.smac,
>> self.dmac) in out))):
>> + self.verify("vlan %d" % self.vlan not in out, "Wrong vlan:" +
>> out)
>>
>> out = self.dut.send_expect("stop", "testpmd> ")
>>
>> @@ -154,45 +161,48 @@ class TestVlan(TestCase):
>> def test_vlan_strip_config_on(self):
>>
>> self.dut.send_expect("vlan set strip on %s" % dutRxPortId,
>> "testpmd> ", 20)
>> - self.dut.send_expect("rx_vlan add 1 %s" % dutRxPortId, "testpmd>
>> ", 20)
>> + self.dut.send_expect("rx_vlan add %d %s" % (self.vlan,
>> dutRxPortId), "testpmd> ", 20)
>> out = self.dut.send_expect("show port info %s" % dutRxPortId,
>> "testpmd> ", 20)
>> self.verify("strip on" in out, "Wrong strip:" + out)
>>
>> self.dut.send_expect("start", "testpmd> ", 120)
>> self.start_tcpdump()
>> - self.vlan_send_packet(1)
>> + self.vlan_send_packet(self.vlan)
>> out = self.get_tcpdump_package()
>> - self.verify("vlan 1" not in out, "Wrong vlan:" + out)
>> + self.verify("vlan %d" % self.vlan not in out, "Wrong vlan:" + out)
>> out = self.dut.send_expect("quit", "#", 120)
>>
>> def test_vlan_strip_config_off(self):
>>
>> + if self.nic == "redrockcanyou" :
>> + print "fm10k not support this case\n"
>> + return
> We should use "print dts.RED()" to emphasize this situation.
>
>> self.dut.send_expect("vlan set strip off %s" % dutRxPortId,
>> "testpmd> ", 20)
>> - self.dut.send_expect("rx_vlan add 1 %s" % dutRxPortId, "testpmd>
>> ", 20)
>> + self.dut.send_expect("rx_vlan add %d %s" % (self.vlan,
>> dutRxPortId), "testpmd> ", 20)
>> out = self.dut.send_expect("show port info %s" % dutRxPortId,
>> "testpmd> ", 20)
>> self.verify("strip off" in out, "Wrong strip:" + out)
>> self.dut.send_expect("set nbport 2", "testpmd> ")
>> self.dut.send_expect("start", "testpmd> ", 120)
>> self.start_tcpdump()
>> - self.vlan_send_packet(1)
>> + self.vlan_send_packet(self.vlan)
>> out = self.get_tcpdump_package()
>> - self.verify("vlan 1" in out, "Wrong strip vlan:" + out)
>> + self.verify("vlan %d" % self.vlan in out, "Wrong strip vlan:" +
>> out)
>> out = self.dut.send_expect("stop", "testpmd> ", 120)
>>
>> - def FAILING_test_vlan_enable_vlan_insertion(self):
>> + def test_vlan_enable_vlan_insertion(self):
>> """
>> Enable VLAN header insertion in transmitted packets
>> """
>>
>> - port = self.tester.get_local_port(valports[0])
>> + port = self.tester.get_local_port(dutTxPortId,)
>> intf = self.tester.get_interface(port)
>>
>> self.dut.send_expect("set nbport 2", "testpmd> ")
>> - self.dut.send_expect("tx_vlan set 1 %s" % valports[0], "testpmd>
>> ")
>> + self.dut.send_expect("tx_vlan set %d %s" % (self.vlan,
>> dutTxPortId), "testpmd> ")
>>
>> - self.dut.send_expect("set promisc all on", "testpmd> ")
>> + #self.dut.send_expect("set promisc all on", "testpmd> ")
> Please remove this line.
>
>> if self.nic == 'hartwell':
>> - self.dut.send_expect("vlan set strip on %s" % valports[0],
>> "testpmd> ")
> 'hartwell' not defined in settings.py, here is topy issue or there's new NIC need support in DTS?
>
>> + self.dut.send_expect("vlan set strip on %s" % dutRxPortId,
>> "testpmd> ")
>>
>> self.tester.scapy_background()
>> self.tester.scapy_append('p = sniff(iface="%s", count=1,
>> timeout=5)' % intf)
>> @@ -205,8 +215,9 @@ class TestVlan(TestCase):
>> time.sleep(2)
>>
>> out = self.tester.scapy_get_result()
>> - self.verify("vlan=1L" in out, "Wrong vlan: " + out)
>> - if self.nic in ["fortville_eagle", "fortville_spirit",
>> "fortville_spirit_single"]:
>> + self.verify("vlan=%dL" % self.vlan in out, "Wrong vlan: " + out)
>> + if self.nic in ["fortville_eagle", "fortville_spirit",
>> "fortville_spirit_single", "redrockcanyou"]:
>> + self.dut.send_expect("tx_vlan reset %s" % dutTxPortId,
>> "testpmd> ", 30)
>> self.dut.send_expect("stop", "testpmd> ", 30)
>> else:
>> self.dut.send_expect("quit", "# ", 30)
>> @@ -217,6 +228,7 @@ class TestVlan(TestCase):
>> """
>> pass
>>
>> +
>> def tear_down_all(self):
>> """
>> Run after each test suite.
>> --
>> 1.9.3
>
next prev parent reply other threads:[~2015-07-08 1:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 9:37 [dts] [PATCH 0/3] Add RRC support in test suites Michael Qiu
2015-07-07 9:37 ` [dts] [PATCH 1/3] tests: Add RRC support with jumbo frame Michael Qiu
2015-07-07 9:37 ` [dts] [PATCH 2/3] tests: Add RRC support in suit scatter Michael Qiu
2015-07-08 0:57 ` Liu, Yong
2015-07-08 1:49 ` Qiu, Michael
2015-07-07 9:38 ` [dts] [PATCH 3/3] tests: Add RRC support with vlan suite Michael Qiu
2015-07-08 1:43 ` Liu, Yong
2015-07-08 1:54 ` Qiu, Michael [this message]
2015-07-08 8:51 ` [dts] [PATCH 0/3 v2] Add RRC support in test suites Michael Qiu
2015-07-08 8:51 ` [dts] [PATCH 1/3 v2] tests: Add RRC support with jumbo frame Michael Qiu
2015-07-08 8:51 ` [dts] [PATCH 2/3 v2] tests: Add RRC support in suite scatter Michael Qiu
2015-07-08 8:51 ` [dts] [PATCH 3/3 v2] tests: Add RRC support with vlan suite Michael Qiu
2015-07-09 2:26 ` [dts] [PATCH 0/3 v2] Add RRC support in test suites 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=533710CFB86FA344BFBF2D6802E60286046B216F@SHSMSX101.ccr.corp.intel.com \
--to=michael.qiu@intel.com \
--cc=dts@dpdk.org \
--cc=yong.liu@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).