[dts] [PATCH V1] framework/pktgen_trex: reset traffic ports list when set new stream
Tu, Lijuan
lijuan.tu at intel.com
Fri Dec 27 07:33:27 CET 2019
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of lihong
> Sent: Wednesday, December 25, 2019 3:09 AM
> To: dts at dpdk.org
> Cc: Ma, LihongX <lihongx.ma at intel.com>
> Subject: [dts] [PATCH V1] framework/pktgen_trex: reset traffic ports list
> when set new stream
>
> if use one port to transfer pkts after use multiple ports, the value
> self._traffic_ports also have multiple port info in it, so reset the value when
> add new stream to port.
>
> Signed-off-by: lihong <lihongx.ma at intel.com>
> ---
> framework/pktgen_trex.py | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/framework/pktgen_trex.py b/framework/pktgen_trex.py index
> 690d070..9e054f3 100644
> --- a/framework/pktgen_trex.py
> +++ b/framework/pktgen_trex.py
> @@ -723,6 +723,7 @@ class TrexPacketGenerator(PacketGenerator):
> def _prepare_transmission(self, stream_ids=[], latency=False):
> ''' add one/multiple streams in one/multiple ports '''
> port_config = {}
> + self._traffic_ports = []
> for stream_id in stream_ids:
> stream = self._get_stream(stream_id)
> tx_port = stream['tx_port']
> --
> 2.7.4
More information about the dts
mailing list