[dts] [PATCH 2/3] tests: Add RRC support in suit scatter

Liu, Yong yong.liu at intel.com
Wed Jul 8 02:57:07 CEST 2015


Michael,
Look like scatter feature only validated on Niantic, Fortville, RRC these three types of card.
We can check NIC type in set_up_all function and not need these duplicated checking code. 

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Michael Qiu
> Sent: Tuesday, July 07, 2015 5:38 PM
> To: dts at dpdk.org
> Subject: [dts] [PATCH 2/3] tests: Add RRC support in suit scatter
> 
> Add RRC support in suit scatter
> 
> Signed-off-by: Michael Qiu <michael.qiu>
> ---
>  tests/TestSuite_scatter.py | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/TestSuite_scatter.py b/tests/TestSuite_scatter.py
> index 643fe4a..130898f 100644
> --- a/tests/TestSuite_scatter.py
> +++ b/tests/TestSuite_scatter.py
> @@ -62,10 +62,11 @@ class TestScatter(TestCase):
>          """
>          sport = self.tester.get_local_port(sPortid)
>          sintf = self.tester.get_interface(sport)
> -        smac = self.dut.get_mac_address(sPortid)
> +        smac = self.tester.get_mac(sport)
> +        dmac = self.dut.get_mac_address(sPortid)
>          rport = self.tester.get_local_port(rPortid)
>          rintf = self.tester.get_interface(rport)
> -        if self.nic in ["niantic", "fortville_eagle", "fortville_spirit",
> "fortville_spirit_single"]:
> +        if self.nic in ["niantic", "fortville_eagle", "fortville_spirit",
> "fortville_spirit_single", "redrockcanyou"]:
>              self.tester.send_expect("ifconfig %s mtu 9000" % sintf, "#")
>              self.tester.send_expect("ifconfig %s mtu 9000" % rintf, "#")
> 
> @@ -79,10 +80,10 @@ class TestScatter(TestCase):
> 
>          self.tester.scapy_foreground()
>          self.tester.scapy_append(
> -            'sendp([Ether(dst="%s")/IP(len=%s)/Raw(load="\x50"*%s)],
> iface="%s")' % (smac, pktlen, padding, sintf))
> +
> 'sendp([Ether(src="%s",dst="%s")/IP(len=%s)/Raw(load="\x50"*%s)],
> iface="%s")' % (smac, dmac,pktlen, padding, sintf))
>          self.tester.scapy_execute()
>          res = self.tester.scapy_get_result()
> -        if self.nic in ["niantic", "fortville_eagle", "fortville_spirit",
> "fortville_spirit_single"]:
> +        if self.nic in ["niantic", "fortville_eagle", "fortville_spirit",
> "fortville_spirit_single", "redrockcanyou"]:
>              self.tester.send_expect("ifconfig %s mtu 1500" % sintf, "#")
>              self.tester.send_expect("ifconfig %s mtu 1500" % sintf, "#")
>          return res
> @@ -103,7 +104,7 @@ class TestScatter(TestCase):
>          portMask = dts.create_mask(dutPorts[:2])
> 
>          # set the mbuf size to 1024
> -        if self.nic in ["niantic", "fortville_eagle", "fortville_spirit",
> "fortville_spirit_single"]:
> +        if self.nic in ["niantic", "fortville_eagle", "fortville_spirit",
> "fortville_spirit_single", "redrockcanyou"]:
>              out = self.pmdout.start_testpmd(
>                  "1S/2C/2T", "--mbcache=200 --mbuf-size=2048 --portmask=%s
> --max-pkt-len=9000" % portMask)
>          else:
> @@ -111,12 +112,12 @@ class TestScatter(TestCase):
>                  "1S/2C/2T", "--mbcache=200 --mbuf-size=1024 --
> portmask=%s" % portMask)
>          self.verify("Error" not in out, "launch error 1")
> 
> -        if self.nic in ["niantic", "fortville_eagle", "fortville_spirit",
> "fortville_spirit_single"]:
> +        if self.nic in ["niantic", "fortville_eagle", "fortville_spirit",
> "fortville_spirit_single", "redrockcanyou"]:
>              self.dut.send_expect("set fwd mac", "testpmd> ", 120)
>          self.dut.send_expect("start", "testpmd> ")
> 
>          for offset in [-1, 0, 1, 4, 5]:
> -            if self.nic in ["niantic", "fortville_eagle",
> "fortville_spirit", "fortville_spirit_single"]:
> +            if self.nic in ["niantic", "fortville_eagle",
> "fortville_spirit", "fortville_spirit_single", "redrockcanyou"]:
>                  ret = self.scatter_pktgen_send_packet(
>                      dutPorts[0], dutPorts[1], 2048 + offset)
>              else:
> --
> 1.9.3



More information about the dts mailing list