jumbo packet test cases for S1-U interface
authorNicola Baldo <nbaldo@cttc.es>
Tue, 20 Dec 2011 18:49:20 +0100
changeset 8488 a766f5d15795
parent 8487 c2548f9b212c
child 8489 e28b8dc6a107
jumbo packet test cases for S1-U interface
src/lte/helper/epc-helper.cc
src/lte/test/epc-test-s1u-downlink.cc
src/lte/test/epc-test-s1u-uplink.cc
--- a/src/lte/helper/epc-helper.cc	Tue Dec 20 10:57:13 2011 +0100
+++ b/src/lte/helper/epc-helper.cc	Tue Dec 20 18:49:20 2011 +0100
@@ -65,6 +65,8 @@
 
   // create TUN device implementing tunneling of user data over GTP-U/UDP/IP 
   Ptr<VirtualNetDevice> tunDevice = CreateObject<VirtualNetDevice> ();
+  // allow jumbo packets
+  tunDevice->SetAttribute ("Mtu", UintegerValue (30000));
 
   // yes we need this
   tunDevice->SetAddress (Mac48Address::Allocate ()); 
--- a/src/lte/test/epc-test-s1u-downlink.cc	Tue Dec 20 10:57:13 2011 +0100
+++ b/src/lte/test/epc-test-s1u-downlink.cc	Tue Dec 20 18:49:20 2011 +0100
@@ -25,7 +25,7 @@
 #include "ns3/test.h"
 #include "ns3/epc-helper.h"
 #include "ns3/packet-sink-helper.h"
-#include "ns3/udp-client-server-helper.h"
+#include "ns3/udp-echo-helper.h"
 #include "ns3/point-to-point-helper.h"
 #include "ns3/csma-helper.h"
 #include "ns3/internet-stack-helper.h"
@@ -36,6 +36,7 @@
 #include <ns3/ipv4-static-routing.h>
 #include "ns3/boolean.h"
 #include "ns3/uinteger.h"
+#include "ns3/config.h"
 
 
 
@@ -96,6 +97,11 @@
 {
   Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
   Ptr<Node> pgw = epcHelper->GetPgwNode ();
+
+  // allow jumbo packets
+  Config::SetDefault ("ns3::CsmaNetDevice::Mtu", UintegerValue (30000));
+  Config::SetDefault ("ns3::PointToPointNetDevice::Mtu", UintegerValue (30000));
+  epcHelper->SetAttribute ("S1uLinkMtu", UintegerValue (30000));
   
   // Create a single RemoteHost
   NodeContainer remoteHostContainer;
@@ -106,6 +112,7 @@
 
   // Create the internet
   PointToPointHelper p2ph;
+  p2ph.SetDeviceAttribute ("DataRate",  DataRateValue (DataRate ("100Gb/s")));
   NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);  
   Ipv4AddressHelper ipv4h;
   ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
@@ -175,7 +182,7 @@
           enbit->ues[u].serverApp = apps.Get (0)->GetObject<PacketSink> ();
           
           Time interPacketInterval = Seconds (0.01);
-          UdpClientHelper client (ueIpIface.GetAddress (0), port);
+          UdpEchoClientHelper client (ueIpIface.GetAddress (0), port);
           client.SetAttribute ("MaxPackets", UintegerValue (enbit->ues[u].numPkts));
           client.SetAttribute ("Interval", TimeValue (interPacketInterval));
           client.SetAttribute ("PacketSize", UintegerValue (enbit->ues[u].pktSize));
@@ -263,7 +270,33 @@
   v4.push_back (e2);
   AddTestCase (new EpcS1uDlTestCase ("3 eNBs", v4));
 
+  std::vector<EnbDlTestData> v5;  
+  EnbDlTestData e5;
+  UeDlTestData f5 (10, 3000);
+  e5.ues.push_back (f5);
+  v5.push_back (e5);
+  AddTestCase (new EpcS1uDlTestCase ("1 eNB, 10 pkts 3000 bytes each", v5));
+
+  std::vector<EnbDlTestData> v6;  
+  EnbDlTestData e6;
+  UeDlTestData f6 (50, 3000);
+  e6.ues.push_back (f6);
+  v6.push_back (e6);
+  AddTestCase (new EpcS1uDlTestCase ("1 eNB, 50 pkts 3000 bytes each", v6));
   
+  std::vector<EnbDlTestData> v7;  
+  EnbDlTestData e7;
+  UeDlTestData f7 (10, 15000);
+  e7.ues.push_back (f7);
+  v7.push_back (e7);
+  AddTestCase (new EpcS1uDlTestCase ("1 eNB, 10 pkts 15000 bytes each", v7));
+
+  std::vector<EnbDlTestData> v8;  
+  EnbDlTestData e8;
+  UeDlTestData f8 (100, 15000);
+  e8.ues.push_back (f8);
+  v8.push_back (e8);
+  AddTestCase (new EpcS1uDlTestCase ("1 eNB, 100 pkts 15000 bytes each", v8));
 }
 
 
--- a/src/lte/test/epc-test-s1u-uplink.cc	Tue Dec 20 10:57:13 2011 +0100
+++ b/src/lte/test/epc-test-s1u-uplink.cc	Tue Dec 20 18:49:20 2011 +0100
@@ -29,7 +29,6 @@
 #include "ns3/test.h"
 #include "ns3/epc-helper.h"
 #include "ns3/packet-sink-helper.h"
-#include "ns3/udp-client-server-helper.h"
 #include "ns3/point-to-point-helper.h"
 #include "ns3/csma-helper.h"
 #include "ns3/internet-stack-helper.h"
@@ -45,7 +44,7 @@
 #include "ns3/arp-cache.h"
 #include "ns3/boolean.h"
 #include "ns3/uinteger.h"
-
+#include "ns3/config.h"
 
 namespace ns3 {
 
@@ -137,7 +136,7 @@
                    "Size of packets generated. The minimum packet size is 12 bytes which is the size of the header carrying the sequence number and the time stamp.",
                    UintegerValue (1024),
                    MakeUintegerAccessor (&LteRadioBearerTagUdpClient::m_size),
-                   MakeUintegerChecker<uint32_t> (12,1500))
+                   MakeUintegerChecker<uint32_t> ())
   ;
   return tid;
 }
@@ -294,6 +293,11 @@
 {
   Ptr<EpcHelper> epcHelper = CreateObject<EpcHelper> ();
   Ptr<Node> pgw = epcHelper->GetPgwNode ();
+
+  // allow jumbo packets
+  Config::SetDefault ("ns3::CsmaNetDevice::Mtu", UintegerValue (30000));
+  Config::SetDefault ("ns3::PointToPointNetDevice::Mtu", UintegerValue (30000));
+  epcHelper->SetAttribute ("S1uLinkMtu", UintegerValue (30000));
   
   // Create a single RemoteHost
   NodeContainer remoteHostContainer;
@@ -304,6 +308,7 @@
 
   // Create the internet
   PointToPointHelper p2ph;
+  p2ph.SetDeviceAttribute ("DataRate",  DataRateValue (DataRate ("100Gb/s")));
   NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);  
   Ipv4AddressHelper ipv4h;
   ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
@@ -490,6 +495,34 @@
   v4.push_back (e2);
   AddTestCase (new EpcS1uUlTestCase ("3 eNBs", v4));
 
+  std::vector<EnbUlTestData> v5;  
+  EnbUlTestData e5;
+  UeUlTestData f5 (10, 3000, 1, 1);
+  e5.ues.push_back (f5);
+  v5.push_back (e5);
+  AddTestCase (new EpcS1uUlTestCase ("1 eNB, 10 pkts 3000 bytes each", v5));
+
+  std::vector<EnbUlTestData> v6;  
+  EnbUlTestData e6;
+  UeUlTestData f6 (50, 3000, 1, 1);
+  e6.ues.push_back (f6);
+  v6.push_back (e6);
+  AddTestCase (new EpcS1uUlTestCase ("1 eNB, 50 pkts 3000 bytes each", v6));
+
+  std::vector<EnbUlTestData> v7;  
+  EnbUlTestData e7;
+  UeUlTestData f7 (10, 15000, 1, 1);
+  e7.ues.push_back (f7);
+  v7.push_back (e7);
+  AddTestCase (new EpcS1uUlTestCase ("1 eNB, 10 pkts 15000 bytes each", v7));
+
+  std::vector<EnbUlTestData> v8;  
+  EnbUlTestData e8;
+  UeUlTestData f8 (100, 15000, 1, 1);
+  e8.ues.push_back (f8);
+  v8.push_back (e8);
+  AddTestCase (new EpcS1uUlTestCase ("1 eNB, 100 pkts 15000 bytes each", v8));
+  
 }