[dts] [PATCH] framework/pktgen_ixia: enable mac continue from last value

Tu, Lijuan lijuan.tu at intel.com
Sat Feb 15 11:22:06 CET 2020


Applied, thanks

> -----Original Message-----
> From: Tu, Lijuan
> Sent: Saturday, February 15, 2020 2:17 AM
> To: dts at dpdk.org
> Cc: Tu, Lijuan <lijuan.tu at 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 at 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



More information about the dts mailing list