summaryrefslogtreecommitdiffstats
path: root/src/flow_stat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/flow_stat.h')
-rw-r--r--src/flow_stat.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/flow_stat.h b/src/flow_stat.h
index 8671b228..25d16173 100644
--- a/src/flow_stat.h
+++ b/src/flow_stat.h
@@ -35,7 +35,8 @@
// Do not change this value. In i350 cards, we filter according to first byte of IP ID
// In other places, we identify packets by if (ip_id > IP_ID_RESERVE_BASE)
#define IP_ID_RESERVE_BASE 0xff00
-#define FLOW_STAT_PAYLOAD_MAGIC 0xABCD
+#define FLOW_STAT_PAYLOAD_MAGIC 0xAB
+#define FLOW_STAT_PAYLOAD_INITIAL_FLOW_SEQ 0x01
extern const uint16_t FLOW_STAT_PAYLOAD_IP_ID;
typedef std::map<uint32_t, uint16_t> flow_stat_map_t;
@@ -44,7 +45,8 @@ typedef std::map<uint32_t, uint16_t>::iterator flow_stat_map_it_t;
class CRxCoreStateless;
struct flow_stat_payload_header {
- uint16_t magic;
+ uint8_t magic;
+ uint8_t flow_seq;
uint16_t hw_id;
uint32_t seq;
uint64_t time_stamp;
@@ -450,6 +452,7 @@ class CFlowStatRuleMgr {
friend std::ostream& operator<<(std::ostream& os, const CFlowStatRuleMgr& cf);
void copy_state(TrexStream * from, TrexStream * to);
void init_stream(TrexStream * stream);
+ int verify_stream(TrexStream * stream);
int add_stream(TrexStream * stream);
int del_stream(TrexStream * stream);
int start_stream(TrexStream * stream);
@@ -460,6 +463,7 @@ class CFlowStatRuleMgr {
private:
void create();
int compile_stream(const TrexStream * stream, CFlowStatParser *parser);
+ int add_stream_internal(TrexStream * stream, bool do_action);
int add_hw_rule(uint16_t hw_id, uint8_t proto);
void send_start_stop_msg_to_rx(bool is_start);
@@ -472,7 +476,7 @@ class CFlowStatRuleMgr {
const CRxCoreStateless *m_rx_core;
int m_max_hw_id; // max hw id we ever used
int m_max_hw_id_payload; // max hw id we ever used for payload rules
- uint32_t m_num_started_streams; // How many started (transmitting) streams we have
+ int m_num_started_streams; // How many started (transmitting) streams we have
CNodeRing *m_ring_to_rx; // handle for sending messages to Rx core
CFlowStatParser *m_parser;
uint16_t m_cap; // capabilities of the NIC driver we are using