summaryrefslogtreecommitdiffstats
path: root/src/stateless/cp/trex_stream.h
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2015-11-18 16:23:55 +0200
committerHanoh Haim <hhaim@cisco.com>2015-11-18 16:23:55 +0200
commit0e8c9ae666d61897cb405c469a71be09d54a649b (patch)
treea35686155fa9f5834acd85ae6f1f4beeeab59b12 /src/stateless/cp/trex_stream.h
parentaa9bf54e6f892168482ed647a0e67ab10b1cf34a (diff)
add support for a program of streams. refactor the dp code
Diffstat (limited to 'src/stateless/cp/trex_stream.h')
-rw-r--r--src/stateless/cp/trex_stream.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/stateless/cp/trex_stream.h b/src/stateless/cp/trex_stream.h
index c2628cc3..0634829e 100644
--- a/src/stateless/cp/trex_stream.h
+++ b/src/stateless/cp/trex_stream.h
@@ -1,5 +1,6 @@
/*
Itay Marom
+ Hanoch Haim
Cisco Systems, Inc.
*/
@@ -65,6 +66,9 @@ public:
stMULTI_BURST = 6
};
+ typedef uint8_t stream_type_t ;
+
+ static std::string get_stream_type_str(stream_type_t stream_type);
public:
TrexStream(uint8_t type,uint8_t port_id, uint32_t stream_id);
@@ -80,6 +84,12 @@ public:
/* access the stream json */
const Json::Value & get_stream_json();
+ /* compress the stream id to be zero based */
+ void fix_dp_stream_id(uint32_t my_stream_id,int next_stream_id){
+ m_stream_id = my_stream_id;
+ m_next_stream_id = next_stream_id;
+ }
+
double get_pps() {
return m_pps;
}
@@ -96,6 +106,14 @@ public:
return ( m_type );
}
+ bool is_dp_next_stream(){
+ if (m_next_stream_id<0) {
+ return (false);
+ }else{
+ return (true);
+ }
+ }
+
void set_multi_burst(uint32_t burst_total_pkts,
@@ -132,11 +150,12 @@ public:
return (dp);
}
+ void Dump(FILE *fd);
public:
/* basic */
uint8_t m_type;
uint8_t m_port_id;
- uint32_t m_stream_id;
+ uint32_t m_stream_id; /* id from RPC can be anything */
/* config fields */