From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Mo, YufengX" <yufengx.mo@intel.com>,
"dts@dpdk.org" <dts@dpdk.org>,
"Wang, Yinan" <yinan.wang@intel.com>,
"Ma, LihongX" <lihongx.ma@intel.com>
Subject: Re: [dts] [PATCH V1 1/1] framework/pktgen_base: fix rfc2544 dichotomy warm up and
Date: Fri, 3 Jan 2020 03:04:27 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBA16A3@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20200102082040.16175-2-yufengx.mo@intel.com>
applied
> -----Original Message-----
> From: Mo, YufengX
> Sent: Thursday, January 2, 2020 4:21 PM
> To: dts@dpdk.org; Wang, Yinan <yinan.wang@intel.com>; Ma, LihongX
> <lihongx.ma@intel.com>; Tu, Lijuan <lijuan.tu@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts][PATCH V1 1/1] framework/pktgen_base: fix rfc2544 dichotomy
> warm up and
>
> return value
>
> fix rfc2544 dichotomy warm up and return value.
>
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
> framework/pktgen_base.py | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/framework/pktgen_base.py b/framework/pktgen_base.py index
> 75c3036..5e51b1a 100644
> --- a/framework/pktgen_base.py
> +++ b/framework/pktgen_base.py
> @@ -167,7 +167,6 @@ class PacketGenerator(object):
> self._start_transmission(stream_ids, options)
> time.sleep(delay)
> self._stop_transmission(stream_ids)
> - self._clear_streams()
>
> def __get_single_throughput_statistic(self, stream_ids):
> bps_rx = []
> @@ -495,7 +494,10 @@ class PacketGenerator(object):
> # start warm up traffic
> delay = options.get('delay')
> _options = {'duration': duration}
> - self.__warm_up_pktgen(stream_ids, _options, delay)
> + if delay:
> + self._prepare_transmission(stream_ids=stream_ids)
> + self.__warm_up_pktgen(stream_ids, _options, delay)
> + self._clear_streams()
> # traffic parameters for dichotomy algorithm
> loss_rate_table = []
> hit_result = None
> @@ -527,16 +529,18 @@ class PacketGenerator(object):
> self._set_stream_rate_percent(rate)
>
> if not hit_result:
> - msg = ('expected permit loss rate <{0}>'
> + msg = ('expected permit loss rate <{0}> '
> 'not between rate {1} and rate {2}').format(
> permit_loss_rate, max_rate, min_rate)
> self.logger.error(msg)
> self.logger.info(pformat(loss_rate_table))
> + ret_value = 0, result[0][1], result[0][2]
> else:
> self.logger.debug(pformat(loss_rate_table))
> + ret_value = rate, hit_result[0][1], hit_result[0][2]
> self.logger.info("zero loss rate is %f" % rate)
>
> - return hit_result
> + return ret_value
>
> def measure(self, stream_ids, traffic_opt):
> '''
> --
> 2.21.0
prev parent reply other threads:[~2020-01-03 3:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-02 8:20 [dts] [PATCH V1 0/1] framework/pktgen_base: fix rfc2544 dichotomy warm up and return value fix rfc2544 dichotomy warm up and return value yufengmx
2020-01-02 8:20 ` [dts] [PATCH V1 1/1] framework/pktgen_base: fix rfc2544 dichotomy warm up and yufengmx
2020-01-03 3:04 ` Tu, Lijuan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8CE3E05A3F976642AAB0F4675D0AD20E0BBA16A3@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=lihongx.ma@intel.com \
--cc=yinan.wang@intel.com \
--cc=yufengx.mo@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).