[dts] [PATCH] framework: enable DUT and Tester run in the same platform

Qiu, Michael michael.qiu at intel.com
Wed Feb 4 04:18:20 CET 2015


Hi, Marvin

Please send out with the pattern [PATCH v2] next time for new version patch.

Acked-by: Michael Qiu <michael.qiu at intel.com>
On 1/27/2015 10:21 AM, Yong Liu wrote:
> Skip to ping self port when DUT and Tester in the same platform.
> Not support software performance in the same platform now.
>
> Signed-off-by: Yong Liu <yong.liu at intel.com>
> ---
> This patch based on "[PATCH 0/4] Support additional port configuration file".
>
>  framework/tester.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/framework/tester.py b/framework/tester.py
> index 345ab41..9100967 100644
> --- a/framework/tester.py
> +++ b/framework/tester.py
> @@ -73,6 +73,8 @@ class Tester(Crb):
>          self.scapyCmds = []
>          self.bgCmds = []
>          self.bgItf = ''
> +        self.packet_gen = None
> +        self.ixia_packet_gen = None
>  
>      def init_ext_gen(self):
>          """
> @@ -287,6 +289,11 @@ class Tester(Crb):
>                  if hits[localPort]:
>                      continue
>  
> +                # skip ping self port
> +                if (self.crb['IP'] == self.crb['tester IP']) and \
> +                    (self.dut.ports_info[dutPort]['pci'] == self.ports_info[localPort]['pci']):
> +                    continue
> +
>                  ipv6 = self.dut.get_ipv6_address(dutPort)
>                  if ipv6 == "Not connected":
>                      continue
> @@ -440,6 +447,7 @@ class Tester(Crb):
>          """
>          if not self.has_external_traffic_generator():
>              self.alt_session.send_expect('killall scapy 2>/dev/null; echo tester', '# ', 5)
> +        if self.packet_gen:
>              super(Tester, self).kill_all()
>  
>      def close(self):



More information about the dts mailing list