test suite reviews and discussions
 help / color / 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, back to index

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

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/ public-inbox