From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 16C35A0352; Wed, 25 Dec 2019 03:35:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C75811C01; Wed, 25 Dec 2019 03:35:55 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 7AC161F5 for ; Wed, 25 Dec 2019 03:35:54 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Dec 2019 18:35:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,353,1571727600"; d="scan'208";a="249986162" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.203]) by fmsmga002.fm.intel.com with ESMTP; 24 Dec 2019 18:35:52 -0800 From: lihong To: dts@dpdk.org Cc: lihong Date: Wed, 25 Dec 2019 03:08:53 +0800 Message-Id: <1577214533-21374-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] framework/pktgen_trex: reset traffic ports list when set new stream X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" 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 --- 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