diff options
author | 2016-12-18 20:11:31 +0200 | |
---|---|---|
committer | 2016-12-19 11:23:48 +0200 | |
commit | 5cfeb192a3ff47c5cacc21abe20db2f61a66dd2b (patch) | |
tree | 57a455e70d9ac9c453495f4929ac9fac5b9fb011 /src/stateless/cp | |
parent | cc4bd93b660505a7c9d8e370a1220377907fa6d2 (diff) |
changes from code review
Change-Id: I628608643d902bd6310b04b8036fc5f1fcc42309
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'src/stateless/cp')
-rw-r--r-- | src/stateless/cp/trex_stateless_port.cpp | 4 | ||||
-rw-r--r-- | src/stateless/cp/trex_stateless_port.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/stateless/cp/trex_stateless_port.cpp b/src/stateless/cp/trex_stateless_port.cpp index 170098a3..e9b3c6d4 100644 --- a/src/stateless/cp/trex_stateless_port.cpp +++ b/src/stateless/cp/trex_stateless_port.cpp @@ -909,8 +909,8 @@ 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."); + if (m_stream_table.size() >= MAX_STREAMS) { + throw TrexException("Reached limit of " + std::to_string(MAX_STREAMS) + " streams at the port."); } get_stateless_obj()->m_rx_flow_stat.add_stream(stream); diff --git a/src/stateless/cp/trex_stateless_port.h b/src/stateless/cp/trex_stateless_port.h index 404e1355..d4ac4018 100644 --- a/src/stateless/cp/trex_stateless_port.h +++ b/src/stateless/cp/trex_stateless_port.h @@ -514,6 +514,7 @@ private: TrexPortOwner m_owner; int m_pending_async_stop_event; + static const uint32_t MAX_STREAMS = 20000; }; |