diff options
-rw-r--r-- | scripts/exp/stl_vm_enable1-0-ex.erf | bin | 6160 -> 6160 bytes | |||
-rw-r--r-- | src/gtest/trex_stateless_gtest.cpp | 8 | ||||
-rw-r--r-- | src/stateless/cp/trex_stream.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/scripts/exp/stl_vm_enable1-0-ex.erf b/scripts/exp/stl_vm_enable1-0-ex.erf Binary files differindex d40539e9..3ccf49ac 100644 --- a/scripts/exp/stl_vm_enable1-0-ex.erf +++ b/scripts/exp/stl_vm_enable1-0-ex.erf diff --git a/src/gtest/trex_stateless_gtest.cpp b/src/gtest/trex_stateless_gtest.cpp index 2c55fc39..704a24b7 100644 --- a/src/gtest/trex_stateless_gtest.cpp +++ b/src/gtest/trex_stateless_gtest.cpp @@ -148,11 +148,11 @@ TEST_F(basic_vm, pkt_size) { EXPECT_EQ(calc_writable_mbuf_size(45,65),65); EXPECT_EQ(calc_writable_mbuf_size(66,65),65); EXPECT_EQ(calc_writable_mbuf_size(62,128),128); - EXPECT_EQ(calc_writable_mbuf_size(62,252),61); - EXPECT_EQ(calc_writable_mbuf_size(121,252),120); - EXPECT_EQ(calc_writable_mbuf_size(253,252),252); + EXPECT_EQ(calc_writable_mbuf_size(62,252),63); + EXPECT_EQ(calc_writable_mbuf_size(121,252),122); + EXPECT_EQ(calc_writable_mbuf_size(253,252),254); EXPECT_EQ(calc_writable_mbuf_size(250,252),252); - EXPECT_EQ(calc_writable_mbuf_size(184,252),183); + EXPECT_EQ(calc_writable_mbuf_size(184,252),185); } 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); } |