Skip to content

Commit 119396e

Browse files
author
wweione
committed
[fix] integer overflow -- total_bytes
1 parent 371dda8 commit 119396e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

astra-sim-alibabacloud/astra-sim/network_frontend/ns3/entry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void notify_sender_packet_arrivered_receiver(int sender_node, int receiver_node,
299299
void qp_finish(FILE *fout, Ptr<RdmaQueuePair> q) {
300300
uint32_t sid = ip_to_node_id(q->sip), did = ip_to_node_id(q->dip);
301301
uint64_t base_rtt = pairRtt[sid][did], b = pairBw[sid][did];
302-
uint32_t total_bytes =
302+
uint64_t total_bytes =
303303
q->m_size +
304304
((q->m_size - 1) / packet_payload_size + 1) *
305305
(CustomHeader::GetStaticWholeHeaderSize() -

astra-sim-alibabacloud/astra-sim/network_frontend/phynet/SimAiEntry.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ simai_send_finish(AstraSim::ncclFlowTag flowTag) {
6767
MockNcclLog* NcclLog = MockNcclLog::getInstance();
6868
NcclLog->writeLog(
6969
NcclLogLevel::DEBUG,
70-
" 数据包出网卡队列, src %d did %d total_bytes %lu channel_id %d flow_id %d tag_id %d",
70+
" [Packet dequeued from NIC TX queue], src %d did %d total_bytes %lu channel_id %d flow_id %d tag_id %d",
7171
sid,
7272
did,
7373
flowTag.flow_size,

0 commit comments

Comments
 (0)