Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
snowzjx committed Jan 4, 2017
1 parent c192e8e commit 96f8765
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/load-balance/conga-simulation-large.cc
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ int main (int argc, char *argv[])
NS_LOG_INFO ("Config parameters");
Config::SetDefault ("ns3::TcpSocket::SegmentSize", UintegerValue(PACKET_SIZE));
Config::SetDefault ("ns3::TcpSocket::DelAckCount", UintegerValue (0));
Config::SetDefault ("ns3::TcpSocket::ConnTimeout", TimeValue (MilliSeconds (5)));
//Config::SetDefault ("ns3::TcpSocket::ConnTimeout", TimeValue (MilliSeconds (5)));
Config::SetDefault ("ns3::TcpSocket::ConnTimeout", TimeValue (MicroSeconds (40)));
Config::SetDefault ("ns3::TcpSocket::InitialCwnd", UintegerValue (10));
Config::SetDefault ("ns3::TcpSocketBase::MinRto", TimeValue (MilliSeconds (5)));
Config::SetDefault ("ns3::TcpSocketBase::ClockGranularity", TimeValue (MicroSeconds (100)));
Expand All @@ -563,7 +564,6 @@ int main (int argc, char *argv[])
if (enableLargeSynRetries)
{
Config::SetDefault ("ns3::TcpSocket::ConnCount", UintegerValue (10000));
Config::SetDefault ("ns3::TcpSocket::ConnTimeout", TimeValue (MicroSeconds (10)));
}

NodeContainer spines;
Expand Down
14 changes: 14 additions & 0 deletions src/internet/model/tcp-socket-base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2573,6 +2573,20 @@ TcpSocketBase::SendEmptyPacket (uint8_t flags)
tcpTLBTag.SetTime (m_onewayRtt);
p->AddPacketTag (tcpTLBTag);
}

if (isAck)
{
uint32_t flowId = TcpSocketBase::CalFlowId (m_endPoint->GetLocalAddress (),
m_endPoint->GetPeerAddress (), header.GetSourcePort (), header.GetDestinationPort ());

Ptr<Ipv4TLB> ipv4TLB = m_node->GetObject<Ipv4TLB> ();
uint32_t path = ipv4TLB->GetAckPath (flowId, m_endPoint->GetLocalAddress (), m_endPoint->GetPeerAddress ());

// XPath Support
Ipv4XPathTag ipv4XPathTag;
ipv4XPathTag.SetPathId (path);
p->AddPacketTag (ipv4XPathTag);
}
}

// XXX Clove Support
Expand Down

0 comments on commit 96f8765

Please sign in to comment.