summaryrefslogtreecommitdiffstats
path: root/src/stateless
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-04-11 10:34:23 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-05-18 19:20:21 +0300
commitd3b66fddf9840272b367f42e26ce16198eeadaf6 (patch)
tree9c132a4133adf1a674a565676a13a58ed3f28560 /src/stateless
parent8b1d07ff4019df739a233cdcb812048ee44ae554 (diff)
payload tx stat work
Diffstat (limited to 'src/stateless')
-rw-r--r--src/stateless/cp/trex_exception.h3
-rw-r--r--src/stateless/cp/trex_stream.cpp2
-rw-r--r--src/stateless/cp/trex_stream.h1
-rw-r--r--src/stateless/dp/trex_stateless_dp_core.cpp2
4 files changed, 5 insertions, 3 deletions
diff --git a/src/stateless/cp/trex_exception.h b/src/stateless/cp/trex_exception.h
index e184fa30..ff3179f9 100644
--- a/src/stateless/cp/trex_exception.h
+++ b/src/stateless/cp/trex_exception.h
@@ -34,7 +34,8 @@ class TrexException : public std::runtime_error
public:
enum TrexExceptionTypes_t {
T_FLOW_STAT_PG_ID_DIFF_L4,
- T_FLOW_STAT_ADD_FAIL,
+ T_FLOW_STAT_DUP_PG_ID,
+ T_FLOW_STAT_ALLOC_FAIL,
T_FLOW_STAT_DEL_NON_EXIST,
T_FLOW_STAT_ASSOC_NON_EXIST_ID,
T_FLOW_STAT_ASSOC_OCC_ID,
diff --git a/src/stateless/cp/trex_stream.cpp b/src/stateless/cp/trex_stream.cpp
index 5a24e2b3..9021ebf4 100644
--- a/src/stateless/cp/trex_stream.cpp
+++ b/src/stateless/cp/trex_stream.cpp
@@ -144,7 +144,7 @@ TrexStream::TrexStream(uint8_t type,
m_expected_pkt_len = 0;
m_rx_check.m_enabled = false;
-
+ m_rx_check.m_rule_type = TrexPlatformApi::IF_STAT_PAYLOAD; // default for now. Should come from user???
m_burst_total_pkts=0;
m_num_bursts=1;
diff --git a/src/stateless/cp/trex_stream.h b/src/stateless/cp/trex_stream.h
index ba5fa214..a0daac9e 100644
--- a/src/stateless/cp/trex_stream.h
+++ b/src/stateless/cp/trex_stream.h
@@ -551,6 +551,7 @@ public:
bool m_enabled;
bool m_seq_enabled;
bool m_latency;
+ uint8_t m_rule_type;
uint32_t m_pg_id;
uint16_t m_hw_id;
} m_rx_check;
diff --git a/src/stateless/dp/trex_stateless_dp_core.cpp b/src/stateless/dp/trex_stateless_dp_core.cpp
index 3d99e0fd..833fb6e1 100644
--- a/src/stateless/dp/trex_stateless_dp_core.cpp
+++ b/src/stateless/dp/trex_stateless_dp_core.cpp
@@ -804,7 +804,7 @@ TrexStatelessDpCore::add_stream(TrexStatelessDpPerPort * lp_port,
if (stream->m_rx_check.m_enabled) {
node->set_stat_needed();
uint8_t hw_id = stream->m_rx_check.m_hw_id;
- assert (hw_id < MAX_FLOW_STATS);
+ assert (hw_id < MAX_FLOW_STATS + MAX_FLOW_STATS_PAYLOAD);
node->set_stat_hw_id(hw_id);
}