summaryrefslogtreecommitdiffstats
path: root/src/stateless/cp/trex_stream_vm.h
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-23 15:32:19 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-23 15:32:19 +0200
commit36cc1ecef32dcee3640e6ddf96422c07d89777b3 (patch)
tree6a9eadb662ad0f98395886077fe32943512fd040 /src/stateless/cp/trex_stream_vm.h
parent68ebd739646a27f1bb92ce8eacb5bb76f6399580 (diff)
parent81059eb5df274efe48ad3914039ddb657c3285ab (diff)
Merge ipv4 checksum issue
Diffstat (limited to 'src/stateless/cp/trex_stream_vm.h')
-rw-r--r--src/stateless/cp/trex_stream_vm.h16
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 c16545d9..0bd00711 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;