fixed a few bugs with wholistic analysis
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
build/
|
||||
prompt.txt
|
||||
docs/clang-doc/
|
||||
**/tmp*
|
||||
**/tmp/
|
||||
|
||||
@@ -26,8 +26,7 @@ void Publisher::set_status(NodeStatus s, Time new_latency) noexcept {
|
||||
|
||||
// Forward to Node base if available (Host derives from Node).
|
||||
// If Node::set_status is public, this works; otherwise adjust when you expose it.
|
||||
// (We keep this call for correctness; remove if not yet available.)
|
||||
// Node::set_status(s);
|
||||
Node::set_status(s);
|
||||
|
||||
if (s == NodeStatus::DOWN) {
|
||||
if (_staging_evt != NULL_EVENT) {
|
||||
|
||||
@@ -23,7 +23,8 @@ Subscriber::Subscriber(Simulator* sim,
|
||||
}
|
||||
|
||||
void Subscriber::set_status(NodeStatus s) noexcept {
|
||||
// Node::set_status(s);
|
||||
Node::set_status(s);
|
||||
|
||||
if (s == NodeStatus::DOWN) {
|
||||
if (_hb_evt != NULL_EVENT) {
|
||||
_sim->cancel(_hb_evt);
|
||||
|
||||
@@ -179,6 +179,13 @@ void NetworkNic::recv_pkt(Packet &pkt_in, PortId ingress) {
|
||||
Time rtt;
|
||||
|
||||
if (lookup_rtt_and_erase(pkt, now, rtt)) {
|
||||
auto &out = _tx_outstanding[pkt.flow_id()];
|
||||
|
||||
if (out >= DEFAULT_MSS_BYTES)
|
||||
out -= DEFAULT_MSS_BYTES;
|
||||
else
|
||||
out = Bytes(0);
|
||||
|
||||
if (_cc) {
|
||||
_cc->update(pkt, rtt);
|
||||
_telemetry.cc_updates++;
|
||||
@@ -388,6 +395,7 @@ void NetworkNic::schedule_ack(const Packet& rx_data, PortId ingress) noexcept {
|
||||
[this, ack, egress]() mutable {
|
||||
enqueue_packet(egress, QClass::CONTROL, ack);
|
||||
});
|
||||
|
||||
_telemetry.tx_acks++;
|
||||
}
|
||||
|
||||
@@ -602,6 +610,7 @@ bool NetworkNic::try_send_one(PortId port, QClass cls) noexcept {
|
||||
if (pkt.protocol() == PacketProtocol::DATA) {
|
||||
record_tx_timestamp(pkt);
|
||||
}
|
||||
if (!_buf) return;
|
||||
(void)_buf->enqueue_packet(pkt, port, pkt.priority());
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user