Reduce max packet size to 1492

This commit is contained in:
Atlante45 2016-04-20 15:58:01 -07:00
parent 8631fa6cd3
commit 492bc75d68
2 changed files with 3 additions and 3 deletions

View file

@ -18,7 +18,7 @@
namespace udt {
static const int UDP_IPV4_HEADER_SIZE = 28;
static const int MAX_PACKET_SIZE_WITH_UDP_HEADER = 1500;
static const int MAX_PACKET_SIZE_WITH_UDP_HEADER = 1492;
static const int MAX_PACKET_SIZE = MAX_PACKET_SIZE_WITH_UDP_HEADER - UDP_IPV4_HEADER_SIZE;
static const int MAX_PACKETS_IN_FLIGHT = 25600;
static const int CONNECTION_RECEIVE_BUFFER_SIZE_PACKETS = 8192;

View file

@ -25,7 +25,7 @@ const QCommandLineOption TARGET_OPTION {
"IP:PORT or HOSTNAME:PORT"
};
const QCommandLineOption PACKET_SIZE {
"packet-size", "size for sent packets in bytes (defaults to 1500)", "bytes",
"packet-size", "size for sent packets in bytes (defaults to 1492)", "bytes",
QString(udt::MAX_PACKET_SIZE_WITH_UDP_HEADER)
};
const QCommandLineOption MIN_PACKET_SIZE {
@ -366,7 +366,7 @@ void UDTTest::sampleStats() {
static const double USECS_PER_MSEC = 1000.0;
static const double MEGABITS_PER_BYTE = 8.0 / 1000000.0;
static const double MS_PER_SECOND = 1000.0;
static const double PPS_TO_MBPS = 1500.0 * MEGABITS_PER_BYTE;
static const double PPS_TO_MBPS = udt::MAX_PACKET_SIZE_WITH_UDP_HEADER * MEGABITS_PER_BYTE;
if (!_target.isNull()) {