Commit 38589ec0 authored by shengjh's avatar shengjh 🇨🇳
Browse files

move Homa tag from chunk to packet so that can use findtagforupdate.

parent 8f8b937f
......@@ -34,7 +34,17 @@ network=dcn
**.host[*].transportScheme.localPort = 2222
**.host[*].transportScheme.destPort = 2222
#**.eth[*].**.transportType = "HomaTransport"
*.*.eth[*].typename = "LayeredEthernetInterface"
*.*.eth[*].macLayer.queue.typename = "EthernetPriorityQueue"
*.*.eth[*].macLayer.queue.buffer.typename = ""
*.*.eth[*].macLayer.queue.numQueues = 8
*.*.eth[*].macLayer.queue.queue[*].typename = "DropTailQueue"
*.*.eth[*].protocol = "ieee8021qctag"
*.host[*].eth[*].bitrate = 10Gbps
*.tor[*].eth[*].bitrate = 10Gbps
*.*.ethernet.typename = "EthernetLayer"
*.*.ieee8021q.typename = "Ieee8021qLayer"
[Config TestWorkloadSynthesizer]
#dcn.numServersPerTor = 4
#dcn.numTors = 1
......@@ -56,6 +66,8 @@ dcn.isFabricCutThrough = false
**.host[*].app[*].interArrivalDist = "exponential"
**.host[*].app[*].startTime = 0s
**.host[*].app[*].stopTime = 6s
[Config TestPriorityTag]
*.host*.eth[0].typename = "LayeredEthernetInterface"
......
......@@ -17,7 +17,7 @@
#include "dctrans/transportlayer/homa/HomaPkt_m.h"
#include "dctrans/transportlayer/homa/HomaPktHelper.h"
#include "dctrans/transportlayer/homa/HomaTransport.h"
#include "dctrans/transportlayer/homa/HomaTransport_m.h"
#include "dctrans/transportlayer/homa/HomaTransportTag_m.h"
Register_ResultFilter("homaMsgSize", HomaMsgSizeFilter);
......@@ -42,7 +42,7 @@ HomaMsgSizeFilter::receiveSignal(cResultFilter *prev, simtime_t_cref t,
case PktType::GRANT: {
HomaTransport::InboundMessage* inbndMsg;
const HomaTransport::OutboundMessage* outMsg;
auto transport = homaChunk->getTag<Homa>()->getHomaTransport();
auto transport = homaPkt->getTag<Homa>()->getHomaTransport();
if ((inbndMsg = transport->rxScheduler.lookupInboundMesg(homaChunk))) {
msgSize = inbndMsg->getMsgSize();
} else {
......
......@@ -23,7 +23,7 @@
#include "inet/networklayer/common/FragmentationTag_m.h"
#include "inet/linklayer/common/UserPriorityTag_m.h"
#include "HomaTransport_m.h"
#include "HomaTransportTag_m.h"
// Required by OMNeT++ for all simple modules.
Define_Module(HomaTransport);
......@@ -1009,9 +1009,10 @@ HomaTransport::OutboundMessage::prepareRequestAndUnsched()
}
unschedDataPart->setUnschedFields(unschedFields);
unschedDataPart->setChunkLength(b(B(HomaPktHelper::getHeaderSize(unschedDataPart) + HomaPktHelper::getDataBytes(unschedDataPart) )));
unschedDataPart->addTagIfAbsent<Homa>()->setHomaTransport(sxController->transport);//SJH: is it right to add tag to chunk?
//unschedDataPart->addTagIfAbsent<Homa>()->setHomaTransport(sxController->transport);//SJH: is it right to add tag to chunk?
packet->insertAtBack(unschedDataPart);
packet->addTagIfAbsent<UserPriorityReq>()->setUserPriority(unschedPrioVec[i]);
packet->addTagIfAbsent<Homa>()->setHomaTransport(sxController->transport);
txPkts.push(packet);
/**
EV << "Unsched pkt with msgId " << this->msgId << " ready for"
......@@ -1124,7 +1125,7 @@ HomaTransport::OutboundMessage::OutbndPktSorter::operator()(const Packet* pkt1,
{
auto chunk1 = pkt1->peekAtFront<HomaPkt>();
auto chunk2 = pkt2->peekAtFront<HomaPkt>();
HomaConfigDepot::SenderScheme txScheme = chunk1->getTag<Homa>()->getHomaTransport()->homaConfig->getSenderScheme();
HomaConfigDepot::SenderScheme txScheme = pkt1->getTag<Homa>()->getHomaTransport()->homaConfig->getSenderScheme();
switch (txScheme) {
case HomaConfigDepot::SenderScheme::OBSERVE_PKT_PRIOS:
case HomaConfigDepot::SenderScheme::SRBF:
......@@ -2745,7 +2746,7 @@ HomaTransport::InboundMessage::prepareGrant(uint16_t grantSize, uint16_t schedPr
// prepare a grant
//HomaPkt* grantPkt = new HomaPkt(rxScheduler->transport);
grantPkt->addTag<Homa>()->setHomaTransport(rxScheduler->transport);
//grantPkt->addTag<Homa>()->setHomaTransport(rxScheduler->transport);
grantPkt->setPktType(PktType::GRANT);
GrantFields grantFields;
grantFields.offset = offset;
......@@ -2759,6 +2760,7 @@ HomaTransport::InboundMessage::prepareGrant(uint16_t grantSize, uint16_t schedPr
grantPkt->setPriority(0);
packet->insertAtBack(grantPkt);
packet->addTagIfAbsent<UserPriorityReq>()->setUserPriority(0);
packet->addTagIfAbsent<Homa>()->setHomaTransport(rxScheduler->transport);
int grantedBytesOnWire = HomaPktHelper::getBytesOnWire(grantSize, PktType::SCHED_DATA);
rxScheduler->transport->outstandingGrantBytes += grantedBytesOnWire;
......
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