Commit 758c4c07 authored by shengjh's avatar shengjh 🇨🇳
Browse files

correct prepareGrant.

parent bedf2482
......@@ -276,8 +276,7 @@ public:
public:
explicit InboundMessage();
explicit InboundMessage(const InboundMessage& other);
explicit InboundMessage(HomaPkt* rxPkt, ReceiveScheduler* rxScheduler,
HomaConfigDepot* homaConfig);
explicit InboundMessage(Packet* rxPkt, ReceiveScheduler* rxScheduler, HomaConfigDepot* homaConfig);
~InboundMessage();
public:
......@@ -327,11 +326,11 @@ public:
HomaConfigDepot *homaConfig;
// Address of the sender of this message.
inet::L3Address srcAddr;
L3Address srcAddr;
// Address of the receiver (ie. this host) of this message. Used to
// specify the sources address when grant packets are being sent.
inet::L3Address destAddr;
L3Address destAddr;
// The id of this message at the sender host. Used in the grant packets
// to help the sender identify which outbound message a received grant
......@@ -429,8 +428,8 @@ public:
PktType pktType);
uint32_t schedBytesInFlight();
uint32_t unschedBytesInFlight();
HomaPkt* prepareGrant(uint16_t grantSize, uint16_t schedPrio);
AppMessage* prepareRxMsgForApp();
Packet* prepareGrant(uint16_t grantSize, uint16_t schedPrio);
Packet* prepareRxMsgForApp();
void updatePerPrioStats();
};
......@@ -475,10 +474,9 @@ public:
const Ipv4Address& getSenderAddr() {
return senderAddr;
}
simtime_t getNextGrantTime(simtime_t currentTime,
uint32_t grantSize);
simtime_t getNextGrantTime(simtime_t currentTime, uint32_t grantSize);
int sendAndScheduleGrant(uint32_t grantPrio);
std::pair<bool, int> handleInboundPkt(HomaPkt* rxPkt);
std::pair<bool, int> handleInboundPkt(Packet* rxPkt);
protected:
HomaConfigDepot* homaConfig;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment