diff options
Diffstat (limited to 'host/tests/streamer_benchmark.cpp')
| -rw-r--r-- | host/tests/streamer_benchmark.cpp | 25 | 
1 files changed, 23 insertions, 2 deletions
| diff --git a/host/tests/streamer_benchmark.cpp b/host/tests/streamer_benchmark.cpp index a11db3e68..b180e7393 100644 --- a/host/tests/streamer_benchmark.cpp +++ b/host/tests/streamer_benchmark.cpp @@ -76,11 +76,21 @@ public:          _buff = std::move(buff);      } -    size_t get_max_payload_size() const +    size_t get_mtu() const      {          return _buff_size;      } +    size_t get_chdr_hdr_len() const +    { +        return sizeof(packet_info_t); +    } + +    size_t get_max_payload_size() const +    { +        return get_mtu() - sizeof(packet_info_t); +    } +  private:      size_t _buff_size;      buff_t::uptr _buff; @@ -137,11 +147,22 @@ public:          _buff = std::move(buff);      } +    size_t get_mtu() const +    { +        return _buff_size; +    } + +    size_t get_chdr_hdr_len() const +    { +        return sizeof(packet_info_t); +    } +      size_t get_max_payload_size() const      { -        return _buff_size - sizeof(packet_info_t); +        return get_mtu() - sizeof(packet_info_t);      } +  private:      size_t _buff_size;      buff_t::uptr _buff; | 
