Commit d6ad4f90 authored by shengjh's avatar shengjh 🇨🇳
Browse files

Correct the xmlfile path in HomaHost.ned.

parent c87dc6f8
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
*_sm.h *_sm.h
*_sm.cc *_sm.cc
dctransport dctransport
.qtenvrc
/.settings /.settings
.vscode .vscode
......
This diff is collapsed.
...@@ -19,6 +19,7 @@ import inet.node.inet.Router; ...@@ -19,6 +19,7 @@ import inet.node.inet.Router;
import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator; import inet.networklayer.configurator.ipv4.Ipv4NetworkConfigurator;
import dctrans.node.HomaHost; import dctrans.node.HomaHost;
import ned.DatarateChannel; import ned.DatarateChannel;
import inet.applications.contract.IApp;
network dcn network dcn
{ {
parameters: parameters:
...@@ -28,13 +29,13 @@ network dcn ...@@ -28,13 +29,13 @@ network dcn
// models the fabrciLinkDealy plus the intrinsic switching delay // models the fabrciLinkDealy plus the intrinsic switching delay
double fabricLinkDelay @unit(us) = default(0.0us); double fabricLinkDelay @unit(us) = default(0.0us);
// Enables the cut-through switching wherever possible // Enables the cut-through switching wherever possible
//bool isFabricCutThrough = default(false); bool isFabricCutThrough = default(false);
// NOTE: always greater and equal to nicLinkSpeed // NOTE: always greater and equal to nicLinkSpeed
int fabricLinkSpeed @unit(Gbps); int fabricLinkSpeed @unit(Gbps);
// models the software trun around time, in the hosts, between the time // models the software trun around time, in the hosts, between the time
// ethFrame is received until the notification is received in software // ethFrame is received until the notification is received in software
// or when the pkt is send in software until it's received at the NIC. // or when the pkt is send in software until it's received at the NIC.
//double hostSwTurnAroundTime @unit(us); double hostSwTurnAroundTime @unit(us);
// when non-zero, it models the intrinsic fixed switching delay // when non-zero, it models the intrinsic fixed switching delay
// on the output ports of the routers // on the output ports of the routers
double switchFixDelay @unit(us); double switchFixDelay @unit(us);
...@@ -48,7 +49,7 @@ network dcn ...@@ -48,7 +49,7 @@ network dcn
int numTors; int numTors;
int numServersPerTor; int numServersPerTor;
int numAggSwitches = (numServersPerTor * nicLinkSpeed) / (overSubFactor * fabricLinkSpeed); int numAggSwitches = int( (numServersPerTor * nicLinkSpeed) / (overSubFactor * fabricLinkSpeed) );
int numHosts = numServersPerTor * numTors; int numHosts = numServersPerTor * numTors;
types: types:
channel FabricChannel extends ned.DatarateChannel channel FabricChannel extends ned.DatarateChannel
...@@ -77,9 +78,11 @@ network dcn ...@@ -77,9 +78,11 @@ network dcn
fabricLinkSpeed = fabricLinkSpeed; fabricLinkSpeed = fabricLinkSpeed;
edgeLinkDelay = edgeLinkDelay; edgeLinkDelay = edgeLinkDelay;
fabricLinkDelay = fabricLinkDelay; fabricLinkDelay = fabricLinkDelay;
//app[*].hostSwTurnAroundTime = hostSwTurnAroundTime; hostSwTurnAroundTime = hostSwTurnAroundTime;
hostNicSxThinkTime = hostNicSxThinkTime; hostNicSxThinkTime = hostNicSxThinkTime;
switchFixDelay = switchFixDelay; switchFixDelay = switchFixDelay;
app[*].isFabricCutThrough = isFabricCutThrough;
app[*].isSingleSpeedFabric = (nicLinkSpeed == fabricLinkSpeed);
} }
configurator: Ipv4NetworkConfigurator { configurator: Ipv4NetworkConfigurator {
parameters: parameters:
......
[General] [General]
simtime-scale = -15 simtime-scale=-15
sim-time-limit = 100000ms sim-time-limit = 100000ms
warmup-period = 0ms warmup-period = 0ms
network=dcn network=dcn
######################## Homa Transport Parameters ###############################
#rttBytes is computed as sending one full packet in one way and a grant in the other way.
**.host[*].**.rttBytes = ${RTT=0x2710} B ##10000B is the min RTT in bytes
**.host[*].transportSchemeType = "${transportSchemeType = HomaTransport}"
**.host[*].transportScheme.isRoundRobinScheduler = ${isRoundRobinScheduler = false}
**.host[*].transportScheme.useUnschRateInScheduler = ${useUnschRateInScheduler = false}
**.host[*].transportScheme.maxOutstandingRecvBytes = ${maxOutstandingRecvBytes = $RTT} B
# Possible string values: STATIC_CBF_UNIFORM, STATIC_CDF_UNIFORM, STATIC_CBF_GRADUATED
# Priority Setting
**.host[*].transportScheme.unschedPrioResolutionMode = "${unschedPrioResolutionMode = STATIC_CBF_GRADUATED}"
**.host[*].transportScheme.prioLevels = 8
**.host[*].transportScheme.adaptiveSchedPrioLevels = 2
**.host[*].transportScheme.numSendersToKeepGranted = 2
**.host[*].transportScheme.prioResolverPrioLevels = 8 - 2
# Possible values 1.0/2.0, 2.0/3.0, 4.0/3.0. Lower number, mean higher priorities carry more traffic
**.host[*].transportScheme.unschedPrioUsageWeight = ${unschedPrioUsageWeight = 1}
**.host[*].transportScheme.defaultReqBytes = ${defaultReqBytes = 1442 }B
**.host[*].transportScheme.defaultUnschedBytes = ${defaultUnschedBytes = 7886 }B
**.host[*].transportScheme.cbfCapMsgSize = "${cbfCapMsgSize = $RTT }"
**.host[*].transportScheme.boostTailBytesPrio = "${boostTailBytesPrio = $RTT }"
**.host[*].transportScheme.senderScheme = "${senderScheme = SRBF}" #Possible values: OBSERVE_PKT_PRIOS, SRBF
**.host[*].transportScheme.accountForGrantTraffic = ${accountForGrantTraffic = true}
**.host[*].transportScheme.linkCheckBytes = ${linkCheckBytes = -1}B
**.host[*].transportScheme.localPort = 2222
**.host[*].transportScheme.destPort = 2222
**.eth[*].**.transportType = "HomaTransport"
[Config TestWorkloadSynthesizer]
dcn.numServersPerTor = 4
dcn.numTors = 1
dcn.fabricLinkSpeed = 40Gbps
dcn.nicLinkSpeed = 10Gbps
dcn.edgeLinkDelay = 0.0us
dcn.fabricLinkDelay = 0.0us
dcn.hostSwTurnAroundTime = 0.5us
dcn.hostNicSxThinkTime = 0.5us
dcn.switchFixDelay = 0.25us
dcn.isFabricCutThrough = false
*.host[*].numTrafficGeneratorApp = 1
**.realLoadFactor = 0.3
**.host[*].**.workloadType = "${workloadType = FACEBOOK_KEY_VALUE}"
**.host[*].app[*].msgSizeRanges = "${msgSizeRanges =1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 22 25 28 31 35 39 44 49 55 61 68 76 85 95 107 119 133 149 167 186 208 233 260 291 325 364 406 454 508 568 635 710 794 887 992 1109 1240 1386 1550 1733 1937 2166 2421 2707 3027 3384 3783 4229 4729 5286 5910 6608 7388 8259 9234 10324 11542 12904 16129 25198 49208 96093 293173 572511 1000000}"
**.host[*].app[*].loadFactor = ${loadFactor = 0.3*.657}
**.host[*].app[*].interArrivalDist = "${interArrivalDist = exponential}"
**.host[*].app[*].startTime = 0s
**.host[*].app[*].stopTime = 6s
[Config TestPriorityTag]
*.host*.eth[0].typename = "LayeredEthernetInterface" *.host*.eth[0].typename = "LayeredEthernetInterface"
*.*.eth[*].macLayer.queue.typename = "EthernetPriorityQueue" *.*.eth[*].macLayer.queue.typename = "EthernetPriorityQueue"
......
...@@ -41,8 +41,6 @@ WorkloadSynthesizer::WorkloadSynthesizer() ...@@ -41,8 +41,6 @@ WorkloadSynthesizer::WorkloadSynthesizer()
nextDestHostId = -1; nextDestHostId = -1;
hostIdAddrMap.clear(); hostIdAddrMap.clear();
//
//
maxDataBytesPerEthFrame = MAX_ETHERNET_PAYLOAD_BYTES - IP_HEADER_SIZE - UDP_HEADER_SIZE; maxDataBytesPerEthFrame = MAX_ETHERNET_PAYLOAD_BYTES - IP_HEADER_SIZE - UDP_HEADER_SIZE;
const auto& payload = makeShared<HomaPkt>(); const auto& payload = makeShared<HomaPkt>();
payload->setPktType(PktType::UNSCHED_DATA); payload->setPktType(PktType::UNSCHED_DATA);
......
...@@ -20,7 +20,7 @@ import dctrans.applications.ITrafficGeneratorApp; ...@@ -20,7 +20,7 @@ import dctrans.applications.ITrafficGeneratorApp;
// or Facebook key-value workload and passes the generated messages to the // or Facebook key-value workload and passes the generated messages to the
// transport layer to the transport protocol. // transport layer to the transport protocol.
// //
simple WorkloadSynthesizer like ITrafficGeneratorApp module WorkloadSynthesizer like ITrafficGeneratorApp
{ {
parameters: parameters:
xml appConfig = default(xml("<isSender/>true<destIds/><destIds></destIds>")); xml appConfig = default(xml("<isSender/>true<destIds/><destIds></destIds>"));
...@@ -48,6 +48,7 @@ simple WorkloadSynthesizer like ITrafficGeneratorApp ...@@ -48,6 +48,7 @@ simple WorkloadSynthesizer like ITrafficGeneratorApp
string destAddresses = default(""); string destAddresses = default("");
double startTime @unit(s) = default(0s); double startTime @unit(s) = default(0s);
double stopTime @unit(s) = default(-1s); double stopTime @unit(s) = default(-1s);
@class(inet::WorkloadSynthesizer);
@display("i=block/app"); @display("i=block/app");
@signal[sentMsg](type=cPacket); @signal[sentMsg](type=cPacket);
......
/* /*
* DCTRANSDefs.h * DCTRANSDefs.h
* *
* Created on: 2021��6��9�� * Created on:
* Author: USER * Author: USER
*/ */
......
...@@ -32,24 +32,24 @@ module HomaHost extends LinkLayerNodeBase ...@@ -32,24 +32,24 @@ module HomaHost extends LinkLayerNodeBase
{ {
parameters: parameters:
@display("i=device/pc2"); @display("i=device/pc2");
xml hostConfig; xml hostConfig;
int nicLinkSpeed @unit(Gbps); int nicLinkSpeed @unit(Gbps);
int fabricLinkSpeed @unit(Gbps); int fabricLinkSpeed @unit(Gbps);
int numTrafficGeneratorApp = default(0); int numTrafficGeneratorApp = default(0);
// num of TCP apps. Specify the app types in INI file with // num of TCP apps. Specify the app types in INI file with
// tcpApp[0..1].typename="TCPEchoApp" syntax // tcpApp[0..1].typename="TCPEchoApp" syntax
//int numTcpApps = default(0); //int numTcpApps = default(0);
// num of UDP apps. Specify the app types in INI file with // num of UDP apps. Specify the app types in INI file with
// udpApp[0..1].typename="UDPVideoStreamCli" syntax // udpApp[0..1].typename="UDPVideoStreamCli" syntax
//int numUdpApps = default(0); //int numUdpApps = default(0);
bool hasTransportScheme = default(numTrafficGeneratorApp>0); bool hasTransportScheme = default(numTrafficGeneratorApp>0);
//bool hasTcp = default(numTcpApps>0); //bool hasTcp = default(numTcpApps>0);
//bool hasUdp = default((numUdpApps>0) || (numTrafficGeneratorApp>0)); //bool hasUdp = default((numUdpApps>0) || (numTrafficGeneratorApp>0));
// tcp implementation (e.g. ~TCP, ~TCP_lwIP, ~TCP_NSC) or ~TCPSpoof // tcp implementation (e.g. ~TCP, ~TCP_lwIP, ~TCP_NSC) or ~TCPSpoof
//string tcpType = default(firstAvailable("TCP", "TCP_lwIP", "TCP_NSC", "TCP_None")); //string tcpType = default(firstAvailable("TCP", "TCP_lwIP", "TCP_NSC", "TCP_None"));
//string udpType = default(firstAvailable("UDP","UDP_None")); //string udpType = default(firstAvailable("UDP","UDP_None"));
...@@ -60,7 +60,7 @@ module HomaHost extends LinkLayerNodeBase ...@@ -60,7 +60,7 @@ module HomaHost extends LinkLayerNodeBase
double hostSwTurnAroundTime @unit(us); double hostSwTurnAroundTime @unit(us);
double hostNicSxThinkTime @unit(us); double hostNicSxThinkTime @unit(us);
double switchFixDelay @unit(us); double switchFixDelay @unit(us);
//copy from LinkLayerNodeBase.ned //copy from LinkLayerNodeBase.ned
bool forwarding = default(true); bool forwarding = default(true);
bool multicastForwarding = default(false); bool multicastForwarding = default(false);
...@@ -73,8 +73,9 @@ module HomaHost extends LinkLayerNodeBase ...@@ -73,8 +73,9 @@ module HomaHost extends LinkLayerNodeBase
submodules: submodules:
app[numTrafficGeneratorApp]: <default("WorkloadSynthesizer")> like ITrafficGeneratorApp { app[numTrafficGeneratorApp]: <default("WorkloadSynthesizer")> like ITrafficGeneratorApp {
parameters: parameters:
@display("p=750,38"); @display("p=353.52798,66.08");
appConfig = xmldoc("config.xml", "/topologyConfig/hostConfig[@id=$PARENTMODULE_INDEX]/appConfig"); //SJH: the param is ugly
appConfig = xmldoc("../../../simulations/config.xml", "/topologyConfig/hostConfig[@id=$PARENTMODULE_INDEX]/appConfig");
nicLinkSpeed = nicLinkSpeed; nicLinkSpeed = nicLinkSpeed;
fabricLinkSpeed = fabricLinkSpeed; fabricLinkSpeed = fabricLinkSpeed;
edgeLinkDelay = edgeLinkDelay; edgeLinkDelay = edgeLinkDelay;
...@@ -87,19 +88,19 @@ module HomaHost extends LinkLayerNodeBase ...@@ -87,19 +88,19 @@ module HomaHost extends LinkLayerNodeBase
transportScheme: <transportSchemeType> like ITransportScheme if hasTransportScheme { transportScheme: <transportSchemeType> like ITransportScheme if hasTransportScheme {
parameters: parameters:
@display("p=749.69995,146.47499"); @display("p=538.552,130.508");
transportConfig = xmldoc("config.xml", "/topologyConfig/hostConfig[@id=$PARENTMODULE_INDEX]/transportConfig"); transportConfig = xmldoc("../../../simulations/config.xml", "/topologyConfig/hostConfig[@id=$PARENTMODULE_INDEX]/transportConfig");
nicLinkSpeed = nicLinkSpeed; nicLinkSpeed = nicLinkSpeed;
} }
udp: <default(firstAvailableOrEmpty("Udp"))> like IUdp if hasUdp { udp: <default(firstAvailableOrEmpty("Udp"))> like IUdp if hasUdp {
parameters: parameters:
@display("p=749.69995,239.4"); @display("p=683.928,209.804");
} }
ipv4: <default("Ipv4NetworkLayer")> like INetworkLayer if hasIpv4 { ipv4: <default("Ipv4NetworkLayer")> like INetworkLayer if hasIpv4 {
parameters: parameters:
@display("p=749.69995,349.65;q=queue"); @display("p=844.172,348.572;q=queue");
} }
nl: MessageDispatcher { nl: MessageDispatcher {
...@@ -122,9 +123,18 @@ module HomaHost extends LinkLayerNodeBase ...@@ -122,9 +123,18 @@ module HomaHost extends LinkLayerNodeBase
ipv4.ifIn <-- nl.out++ if hasIpv4; ipv4.ifIn <-- nl.out++ if hasIpv4;
ipv4.ifOut --> nl.in++ if hasIpv4; ipv4.ifOut --> nl.in++ if hasIpv4;
ethernet.upperLayerOut --> nl.in++ if exists(ethernet);
nl.out++ --> ethernet.upperLayerIn if exists(ethernet);
for i=0..sizeof(ethg)-1 { ieee8021q.upperLayerOut --> nl.in++ if exists(ieee8021q);
eth[i].upperLayerOut --> nl.in++; nl.out++ --> ieee8021q.upperLayerIn if exists(ieee8021q);
eth[i].upperLayerIn <-- nl.out++;
} nl.out++ --> li.in++;
nl.in++ <-- li.out++;
// for i=0..sizeof(ethg)-1 {
// eth[i].upperLayerOut --> nl.in++;
// eth[i].upperLayerIn <-- nl.out++;
// }
} }
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