test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] framework/pktgen_ixia: enable mac continue from last value
@ 2020-02-14 18:16 Lijuan Tu
  2020-02-15 10:22 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Lijuan Tu @ 2020-02-14 18:16 UTC (permalink / raw)
  To: dts; +Cc: Lijuan Tu

* enable dst/src mac continue from last value
  because mac will always be start_mac if disable this option.
* fix the last stream judging condition.

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
 framework/pktgen_ixia.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/framework/pktgen_ixia.py b/framework/pktgen_ixia.py
index 937e219..80c5cb5 100644
--- a/framework/pktgen_ixia.py
+++ b/framework/pktgen_ixia.py
@@ -209,6 +209,11 @@ class Ixia(SSHConnection):
                                                             prefix, mac_start))
             if step:
                 cmds.append('stream config -{0}Step {1}'.format(prefix, step))
+                # if not enable ContinueFromLastValue, the mac will always be start_mac
+                if prefix == 'sa':
+                    cmds.append('stream config -enableSaContinueFromLastValue true')
+                elif prefix == 'da':
+                    cmds.append('stream config -enableDaContinueFromLastValue true')
             if action:
                 cmds.append('stream config -{0}RepeatCounter {1}'.format(
                                                 prefix, addr_mode.get(action)))
@@ -513,7 +518,7 @@ class Ixia(SSHConnection):
             break
 
         # set commands at last stream
-        if stream_id > 1:
+        if stream_id >= self.stream_total[port_index]:
             self.add_tcl_cmd("stream config -dma gotoFirst")
             self.add_tcl_cmd("stream set %s %d" % (ixia_port, stream_id))
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dts] [PATCH] framework/pktgen_ixia: enable mac continue from last value
  2020-02-14 18:16 [dts] [PATCH] framework/pktgen_ixia: enable mac continue from last value Lijuan Tu
@ 2020-02-15 10:22 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-02-15 10:22 UTC (permalink / raw)
  To: dts

Applied, thanks

> -----Original Message-----
> From: Tu, Lijuan
> Sent: Saturday, February 15, 2020 2:17 AM
> To: dts@dpdk.org
> Cc: Tu, Lijuan <lijuan.tu@intel.com>
> Subject: [dts] [PATCH] framework/pktgen_ixia: enable mac continue from
> last value
> 
> * enable dst/src mac continue from last value
>   because mac will always be start_mac if disable this option.
> * fix the last stream judging condition.
> 
> Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
> ---
>  framework/pktgen_ixia.py | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/framework/pktgen_ixia.py b/framework/pktgen_ixia.py index
> 937e219..80c5cb5 100644
> --- a/framework/pktgen_ixia.py
> +++ b/framework/pktgen_ixia.py
> @@ -209,6 +209,11 @@ class Ixia(SSHConnection):
>                                                              prefix, mac_start))
>              if step:
>                  cmds.append('stream config -{0}Step {1}'.format(prefix, step))
> +                # if not enable ContinueFromLastValue, the mac will always be
> start_mac
> +                if prefix == 'sa':
> +                    cmds.append('stream config -enableSaContinueFromLastValue
> true')
> +                elif prefix == 'da':
> +                    cmds.append('stream config
> + -enableDaContinueFromLastValue true')
>              if action:
>                  cmds.append('stream config -{0}RepeatCounter {1}'.format(
>                                                  prefix, addr_mode.get(action))) @@ -513,7
> +518,7 @@ class Ixia(SSHConnection):
>              break
> 
>          # set commands at last stream
> -        if stream_id > 1:
> +        if stream_id >= self.stream_total[port_index]:
>              self.add_tcl_cmd("stream config -dma gotoFirst")
>              self.add_tcl_cmd("stream set %s %d" % (ixia_port, stream_id))
> 
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-15 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 18:16 [dts] [PATCH] framework/pktgen_ixia: enable mac continue from last value Lijuan Tu
2020-02-15 10:22 ` Tu, Lijuan

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).