[V1,01/27] framework/pktgen: return trex tx stats

Message ID 20210125084414.8503-2-yufengx.mo@intel.com (mailing list archive)
State Accepted
Delegated to: LIjuan Tu
Headers
Series dts: enable IxNetwork and enhance perf testing |

Commit Message

Yufen.Mo Jan. 25, 2021, 8:43 a.m. UTC
  support return tx_pps and tx_bps from pktgen.measure_throughput for trex.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 framework/pktgen_trex.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/framework/pktgen_trex.py b/framework/pktgen_trex.py
index 8da0c849..c0b13428 100644
--- a/framework/pktgen_trex.py
+++ b/framework/pktgen_trex.py
@@ -1,6 +1,6 @@ 
 # BSD LICENSE
 #
-# Copyright(c) 2010-2019 Intel Corporation. All rights reserved.
+# Copyright(c) 2010-2021 Intel Corporation. All rights reserved.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -696,7 +696,7 @@  class TrexPacketGenerator(PacketGenerator):
         self.logger.debug(pformat(port_stats))
         self.logger.debug(os.linesep.join(msg))
 
-        return rx_bps, rx_pps
+        return (tx_bps, rx_bps), (tx_pps, rx_pps)
 
     def _loss_rate_stats(self, stream, stats):
         # tx packet