summaryrefslogtreecommitdiffstats
path: root/src/stateless
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-12-18 20:11:31 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-12-19 11:23:48 +0200
commit5cfeb192a3ff47c5cacc21abe20db2f61a66dd2b (patch)
tree57a455e70d9ac9c453495f4929ac9fac5b9fb011 /src/stateless
parentcc4bd93b660505a7c9d8e370a1220377907fa6d2 (diff)
changes from code review
Change-Id: I628608643d902bd6310b04b8036fc5f1fcc42309 Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'src/stateless')
-rw-r--r--src/stateless/cp/trex_stateless_port.cpp4
-rw-r--r--src/stateless/cp/trex_stateless_port.h1
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;
};