summaryrefslogtreecommitdiffstats
path: root/src/stateless
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2016-02-01 10:44:21 +0200
committerHanoh Haim <hhaim@cisco.com>2016-02-01 10:44:21 +0200
commitc224dbe038571c6a581746c26607abcb627c819f (patch)
tree9f5733b0bee2177148adeb0b413fca3f58c94a51 /src/stateless
parent2509553bb66732dc465ec5e2d9b710f5edabd362 (diff)
fix vm bug with packet size bigger than 128 and field<33
Diffstat (limited to 'src/stateless')
-rw-r--r--src/stateless/cp/trex_stream.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stateless/cp/trex_stream.h b/src/stateless/cp/trex_stream.h
index 80d64ec5..e854cdf7 100644
--- a/src/stateless/cp/trex_stream.h
+++ b/src/stateless/cp/trex_stream.h
@@ -77,11 +77,11 @@ static inline uint16_t calc_writable_mbuf_size(uint16_t max_offset_writable,
}
//pkt_size> 128
- uint16_t non_writable = pkt_size - (max_offset_writable -1) ;
+ uint16_t non_writable = pkt_size - (max_offset_writable +1) ;
if ( non_writable<64 ) {
return (pkt_size);
}
- return(max_offset_writable-1);
+ return(max_offset_writable+1);
}