diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-02-21 18:01:36 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-02-21 18:01:36 +0200 |
commit | 6182075a09042c2d72f16a434b7978615143f589 (patch) | |
tree | a1638ca143c1e4dc029fa865aa42cb48d2c8c1ff /src/stateless | |
parent | 2f75f197b0f948aa53e88e479d85cf83a64057c4 (diff) |
typo in step and min/max_value; support old-type classes in validate_type; assert positive values in python; hlt fix vlan vm + test for it;
Diffstat (limited to 'src/stateless')
-rw-r--r-- | src/stateless/cp/trex_stream_vm.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/stateless/cp/trex_stream_vm.h b/src/stateless/cp/trex_stream_vm.h index 13504703..023286d0 100644 --- a/src/stateless/cp/trex_stream_vm.h +++ b/src/stateless/cp/trex_stream_vm.h @@ -227,7 +227,7 @@ public: inline void run_inc(uint8_t * flow_var) { uint8_t *p = (flow_var + m_flow_offset); - if (*p >= (m_max_val-m_step)) { + if (*p > (m_max_val-m_step)) { *p = m_min_val; } else { *p = *p + m_step; @@ -236,7 +236,7 @@ public: inline void run_dec(uint8_t * flow_var) { uint8_t *p = (flow_var + m_flow_offset); - if (*p <= (m_min_val+m_step)) { + if (*p < (m_min_val+m_step)) { *p = m_max_val; } else { *p = *p - m_step; @@ -257,7 +257,7 @@ public: inline void run_inc(uint8_t * flow_var) { uint16_t *p = (uint16_t *)(flow_var + m_flow_offset); - if (*p >= (m_max_val-m_step)) { + if (*p > (m_max_val-m_step)) { *p = m_min_val; } else { *p = *p + m_step; @@ -266,7 +266,7 @@ public: inline void run_dec(uint8_t * flow_var) { uint16_t *p = (uint16_t *)(flow_var + m_flow_offset); - if (*p <= (m_min_val+m_step)) { + if (*p < (m_min_val+m_step)) { *p = m_max_val; } else { *p = *p - m_step; @@ -286,7 +286,7 @@ public: inline void run_inc(uint8_t * flow_var) { uint32_t *p = (uint32_t *)(flow_var + m_flow_offset); - if (*p >= (m_max_val-m_step)) { + if (*p > (m_max_val-m_step)) { *p = m_min_val; } else { *p = *p + m_step; @@ -295,7 +295,7 @@ public: inline void run_dec(uint8_t * flow_var) { uint32_t *p = (uint32_t *)(flow_var + m_flow_offset); - if (*p <= (m_min_val+m_step)) { + if (*p < (m_min_val+m_step)) { *p = m_max_val; } else { *p = *p - m_step; @@ -315,7 +315,7 @@ public: inline void run_inc(uint8_t * flow_var) { uint64_t *p = (uint64_t *)(flow_var + m_flow_offset); - if (*p >= (m_max_val-m_step) ) { + if (*p > (m_max_val-m_step) ) { *p = m_min_val; } else { *p = *p + m_step; @@ -324,7 +324,7 @@ public: inline void run_dec(uint8_t * flow_var) { uint64_t *p = (uint64_t *)(flow_var + m_flow_offset); - if (*p <= m_min_val+m_step) { + if (*p < m_min_val+m_step) { *p = m_max_val; } else { *p = *p - m_step; |