From cc4bd93b660505a7c9d8e370a1220377907fa6d2 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Mon, 12 Dec 2016 17:38:43 +0200 Subject: 1) limit number of streams per port to 20k 2) fix showing error in TUI 3) represensation of STLError: show only errors if error, limit by 10 entries Change-Id: Ib8de9222e7fc09dd67275283857d0d7e9cb5988c Signed-off-by: Yaroslav Brustinov --- src/stateless/cp/trex_stateless_port.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/stateless/cp') diff --git a/src/stateless/cp/trex_stateless_port.cpp b/src/stateless/cp/trex_stateless_port.cpp index 97f60dd6..170098a3 100644 --- a/src/stateless/cp/trex_stateless_port.cpp +++ b/src/stateless/cp/trex_stateless_port.cpp @@ -909,6 +909,9 @@ TrexStatelessPort::add_stream(TrexStream *stream) { verify_state(PORT_STATE_IDLE | PORT_STATE_STREAMS, "add_stream"); + if (m_stream_table.size() >= 20000) { + throw TrexException("Reached limit of 20k streams at the port."); + } get_stateless_obj()->m_rx_flow_stat.add_stream(stream); m_stream_table.add_stream(stream); -- cgit 1.2.3-korg