diff -r f55df977de28 src/point-to-point/helper/point-to-point-helper.cc --- a/src/point-to-point/helper/point-to-point-helper.cc Tue Nov 22 10:55:49 2016 +0100 +++ b/src/point-to-point/helper/point-to-point-helper.cc Thu Nov 24 12:20:33 2016 -0800 @@ -28,6 +28,7 @@ #include "ns3/config.h" #include "ns3/packet.h" #include "ns3/names.h" +#include "ns3/uinteger.h" #include "ns3/mpi-interface.h" #include "ns3/mpi-receiver.h" @@ -38,12 +39,19 @@ NS_LOG_COMPONENT_DEFINE ("PointToPointHelper"); +// Device queue set to small default value such as in Linux +static const uint16_t DEFAULT_MAX_PACKETS = 3; + PointToPointHelper::PointToPointHelper () { m_queueFactory.SetTypeId ("ns3::DropTailQueue"); m_deviceFactory.SetTypeId ("ns3::PointToPointNetDevice"); m_channelFactory.SetTypeId ("ns3::PointToPointChannel"); m_remoteChannelFactory.SetTypeId ("ns3::PointToPointRemoteChannel"); + // XXX this step can be replaced by Config::GetDefault (); see bug 1604 + Ptr device = m_deviceFactory.Create (); + m_queueFactory.Set ("MaxPackets", UintegerValue (DEFAULT_MAX_PACKETS)); + m_queueFactory.Set ("MaxBytes", UintegerValue (DEFAULT_MAX_PACKETS * device->GetMtu ())); } void