summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/src/hiperf.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/utils/src/hiperf.cc b/utils/src/hiperf.cc
index eabd12c86..fee2b34c9 100644
--- a/utils/src/hiperf.cc
+++ b/utils/src/hiperf.cc
@@ -165,7 +165,7 @@ struct ServerConfiguration {
rtc_(false),
interactive_(false),
production_rate_(std::string("2048kbps")),
- payload_size_(1400)
+ payload_size_(1440)
#ifdef SECURE_HICNTRANSPORT
,
secure_(false)
@@ -896,6 +896,11 @@ class HIperfServer {
}
}
+ producer_socket_->setSocketOption(
+ GeneralTransportOptions::DATA_PACKET_SIZE,
+ (uint32_t)(
+ configuration_.payload_size_ +
+ (configuration_.name.getAddressFamily() == AF_INET ? 40 : 60)));
producer_socket_->registerPrefix(configuration_.name);
producer_socket_->connect();
@@ -920,13 +925,6 @@ class HIperfServer {
}
if (producer_socket_->setSocketOption(
- GeneralTransportOptions::DATA_PACKET_SIZE,
- (uint32_t)(configuration_.payload_size_)) ==
- SOCKET_OPTION_NOT_SET) {
- return ERROR_SETUP;
- }
-
- if (producer_socket_->setSocketOption(
GeneralTransportOptions::OUTPUT_BUFFER_SIZE, 200000U) ==
SOCKET_OPTION_NOT_SET) {
return ERROR_SETUP;