swift use "real" num_acked

This commit is contained in:
cyp0633 2024-04-06 10:23:02 +08:00
parent e57da6d05f
commit 69b7b5c4c2
Signed by: cyp0633
GPG Key ID: CF90D09FB1FDCE45
3 changed files with 4 additions and 8 deletions

View File

@ -2031,9 +2031,6 @@ RdmaHw::HandleAckSwift(Ptr<RdmaQueuePair> qp, Ptr<Packet> p, CustomHeader& ch)
auto rtt = Simulator::Now().GetNanoSeconds() - ih.ts;
auto fabric_delay = rtt - ih.remote_delay;
// update ack num
// qp->swift.num_acked += ack_seq / 1000;
// on receiving ack
qp->swift.m_retransmit_cnt = 0;
auto target_fab_delay = TargetFabDelaySwift(qp, p, ch);
@ -2088,12 +2085,13 @@ RdmaHw::GetCwndSwift(Ptr<RdmaQueuePair> qp,
{
if (cwnd >= 1)
{
// ch.ack.seq is also num_acked (in seq number)
cwnd = cwnd + (double)swift_ai / cwnd * ch.ack.seq;
// num_acked is actually the number of packets IN EVERY ACK
// so that we can assure incrementing approx. swift_ai per RTT
cwnd = cwnd + (double)swift_ai * (1000.0 / cwnd);
}
else
{
cwnd = cwnd + swift_ai * ch.ack.seq;
cwnd = cwnd + swift_ai * 1000;
}
}
else if (canDecrease)

View File

@ -85,7 +85,6 @@ RdmaQueuePair::RdmaQueuePair(uint16_t pg,
swift.m_curRate = 0;
swift.m_retransmit_cnt = 0;
swift.m_pacing_delay = 0;
// swift.num_acked = 0;
}
void

View File

@ -142,7 +142,6 @@ class RdmaQueuePair : public Object
// pacing delay, i.e. sending interval
uint64_t m_pacing_delay;
// num of acked packets
// uint64_t num_acked;
} swift;
/***********