From d3b66fddf9840272b367f42e26ce16198eeadaf6 Mon Sep 17 00:00:00 2001 From: Ido Barnea Date: Mon, 11 Apr 2016 10:34:23 +0300 Subject: payload tx stat work --- src/stateless/cp/trex_exception.h | 3 ++- src/stateless/cp/trex_stream.cpp | 2 +- src/stateless/cp/trex_stream.h | 1 + src/stateless/dp/trex_stateless_dp_core.cpp | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/stateless') 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); } -- cgit 1.2.3-korg