26
|
1 |
diff --git a/example/dce-cradle-simple.cc b/example/dce-cradle-simple.cc
|
|
2 |
--- a/example/dce-cradle-simple.cc
|
|
3 |
+++ b/example/dce-cradle-simple.cc
|
|
4 |
@@ -63,8 +63,8 @@
|
|
5 |
nodes.Create (2);
|
|
6 |
|
|
7 |
PointToPointHelper pointToPoint;
|
|
8 |
- pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("100Mbps"));
|
|
9 |
- pointToPoint.SetChannelAttribute ("Delay", StringValue ("100ms"));
|
|
10 |
+ pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("1Gbps"));
|
|
11 |
+ pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ns"));
|
|
12 |
|
|
13 |
NetDeviceContainer devices;
|
|
14 |
devices = pointToPoint.Install (nodes);
|
|
15 |
diff --git a/example/dce-iperf.cc b/example/dce-iperf.cc
|
|
16 |
--- a/example/dce-iperf.cc
|
|
17 |
+++ b/example/dce-iperf.cc
|
|
18 |
@@ -31,6 +31,11 @@
|
|
19 |
// in source named Thread.c at line 412 in method named thread_rest
|
|
20 |
// you must add a sleep (1); to break the infinite loop....
|
|
21 |
// ===========================================================================
|
|
22 |
+void
|
|
23 |
+PrintTcpFlags (std::string key, std::string value)
|
|
24 |
+{
|
|
25 |
+ std::cout << key << "=" << value << std::endl;
|
|
26 |
+}
|
|
27 |
int main (int argc, char *argv[])
|
|
28 |
{
|
|
29 |
bool useKernel = 0;
|
|
30 |
@@ -46,8 +51,8 @@
|
|
31 |
nodes.Create (2);
|
|
32 |
|
|
33 |
PointToPointHelper pointToPoint;
|
|
34 |
- pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));
|
|
35 |
- pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ms"));
|
|
36 |
+ pointToPoint.SetDeviceAttribute ("DataRate", StringValue ("1Gbps"));
|
|
37 |
+ pointToPoint.SetChannelAttribute ("Delay", StringValue ("1ns"));
|
|
38 |
|
|
39 |
NetDeviceContainer devices;
|
|
40 |
devices = pointToPoint.Install (nodes);
|
|
41 |
@@ -66,6 +71,7 @@
|
|
42 |
dceManager.SetNetworkStack ("ns3::LinuxSocketFdFactory", "Library", StringValue ("liblinux.so"));
|
|
43 |
LinuxStackHelper stack;
|
|
44 |
stack.Install (nodes);
|
|
45 |
+
|
|
46 |
#else
|
|
47 |
NS_LOG_ERROR ("Linux kernel stack for DCE is not available. build with dce-linux module.");
|
|
48 |
// silently exit
|
|
49 |
@@ -88,6 +94,32 @@
|
|
50 |
|
|
51 |
dceManager.Install (nodes);
|
|
52 |
|
|
53 |
+ LinuxStackHelper stack;
|
|
54 |
+#if 0
|
|
55 |
+ stack.SysctlSet (nodes, ".net.core.rmem_max",
|
|
56 |
+ "26214400");
|
|
57 |
+ stack.SysctlSet (nodes, ".net.core.wmem_max",
|
|
58 |
+ "26214400");
|
|
59 |
+ stack.SysctlSet (nodes, ".net.ipv4.udp_rmem_min",
|
|
60 |
+ "4194304");
|
|
61 |
+ stack.SysctlSet (nodes, ".net.ipv4.udp_wmem_min",
|
|
62 |
+ "4194304");
|
|
63 |
+ LinuxStackHelper::SysctlGet (nodes.Get (0), Seconds (1),
|
|
64 |
+ ".net.ipv4.udp_rmem_min", &PrintTcpFlags);
|
|
65 |
+ LinuxStackHelper::SysctlGet (nodes.Get (0), Seconds (1),
|
|
66 |
+ ".net.ipv4.udp_wmem_min", &PrintTcpFlags);
|
|
67 |
+ LinuxStackHelper::SysctlGet (nodes.Get (0), Seconds (1),
|
|
68 |
+ ".net.core.rmem_max", &PrintTcpFlags);
|
|
69 |
+ LinuxStackHelper::SysctlGet (nodes.Get (0), Seconds (1),
|
|
70 |
+ ".net.core.wmem_max", &PrintTcpFlags);
|
|
71 |
+#endif
|
|
72 |
+// sysctl -w net.ipv4.tcp_dctcp_enable=1
|
|
73 |
+// sysctl -w net.ipv4.net.ipv4.tcp_ecn=1
|
|
74 |
+#if 0
|
|
75 |
+ stack.SysctlSet (nodes, ".net.ipv4.tcp_dctcp_enable", "1");
|
|
76 |
+ stack.SysctlSet (nodes, ".net.ipv4.net.ipv4.tcp_ecn", "1");
|
|
77 |
+#endif
|
|
78 |
+
|
|
79 |
DceApplicationHelper dce;
|
|
80 |
ApplicationContainer apps;
|
|
81 |
|
|
82 |
@@ -101,6 +133,10 @@
|
|
83 |
dce.AddArgument ("10.1.1.2");
|
|
84 |
dce.AddArgument ("-i");
|
|
85 |
dce.AddArgument ("1");
|
|
86 |
+ // dce.AddArgument ("-l");
|
|
87 |
+ // dce.AddArgument ("64");
|
|
88 |
+ dce.AddArgument ("-w");
|
|
89 |
+ dce.AddArgument ("100000");
|
|
90 |
dce.AddArgument ("--time");
|
|
91 |
dce.AddArgument ("10");
|
|
92 |
if (useUdp)
|
|
93 |
@@ -119,6 +155,10 @@
|
|
94 |
dce.ResetArguments ();
|
|
95 |
dce.ResetEnvironment ();
|
|
96 |
dce.AddArgument ("-s");
|
|
97 |
+ dce.AddArgument ("-w");
|
|
98 |
+ dce.AddArgument ("1000000");
|
|
99 |
+ // dce.AddArgument ("-l");
|
|
100 |
+ // dce.AddArgument ("64");
|
|
101 |
dce.AddArgument ("-P");
|
|
102 |
dce.AddArgument ("1");
|
|
103 |
if (useUdp)
|