[dts] [PATCH V1] framework/pktgen_trex: fix issue about other type of core_mask

Zhu, WenhuiX wenhuix.zhu at intel.com
Tue Jan 7 03:00:25 CET 2020


Tested-by: Zhu, WenhuiX <wenhuix.zhu at intel.com>

-----Original Message-----
From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of lihong
Sent: Tuesday, January 7, 2020 2:30 AM
To: dts at dpdk.org
Cc: Ma, LihongX <lihongx.ma at intel.com>
Subject: [dts] [PATCH V1] framework/pktgen_trex: fix issue about other type of core_mask

Signed-off-by: lihong <lihongx.ma at intel.com>
---
 framework/pktgen_trex.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/framework/pktgen_trex.py b/framework/pktgen_trex.py index 705d8f5..61c8c0c 100644
--- a/framework/pktgen_trex.py
+++ b/framework/pktgen_trex.py
@@ -794,7 +794,9 @@ class TrexPacketGenerator(PacketGenerator):
             # clear the stats before injecting
             self._conn.clear_stats()
             # 'core_mask' list must be the same length as 'ports' list
-            core_mask = self.core_mask[:len(self._traffic_ports)]
+            core_mask = self.core_mask
+            if type(self.core_mask) == list:
+                core_mask = self.core_mask[:len(self._traffic_ports)]
             # Start traffic on port(s)
             run_opt = {
                 'ports':    self._traffic_ports,
--
2.7.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestPVPVirtIOBonding.log
Type: application/octet-stream
Size: 154257 bytes
Desc: TestPVPVirtIOBonding.log
URL: <http://mails.dpdk.org/archives/dts/attachments/20200107/3b6ae49c/attachment.obj>


More information about the dts mailing list