diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-12 17:38:43 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-12-19 11:23:48 +0200 |
commit | cc4bd93b660505a7c9d8e370a1220377907fa6d2 (patch) | |
tree | b0296f645a76f50d3ca0a957a70f54a7b3afc23b /src/stateless | |
parent | ac3784a3bad416d45b93cb17be551726e08c545d (diff) |
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 <ybrustin@cisco.com>
Diffstat (limited to 'src/stateless')
-rw-r--r-- | src/stateless/cp/trex_stateless_port.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); |