[dts] [PATCH V1] framework/pktgen_trex: reset traffic ports list when set new stream

lihong lihongx.ma at intel.com
Tue Dec 24 20:08:53 CET 2019


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