How bobzhuyb/ns3-rdma works
Project type and purpose
• Type: A modular network-simulator framework (not a client-server web app).
• Purpose: Simulate RDMA over Converged Ethernet (RoCEv2) including custom congestion-control (DCQCN, TIMELY), PFC/ECN, and switch buffering logic.
High-level components
a. Build & Deployment
– Visual Studio solution (windows/ns-3-dev/ns-3-dev.sln)
– waf/Makemake build scripts (Makefile, waf, src/*/wscript)
b. Entry point
– main/third.cc → main.exe
– Configuration loader (mix/config.txt)
c. Simulation Core
– src/core (scheduler, events, object-factory, config parser)
– src/mpi (distributed simulation)
– src/emulation hooks, Python bindings
d. Network Stack Modules
– src/internet (IPv4/IPv6, sockets, routing)
– src/point-to-point, src/csma, src/wifi, src/virtual-net-device, etc.
– Helpers & containers (helper/*.cc/.h) for easy topology setup
e. RDMA Extensions & Switch
– src/point-to-point/model/qbb-net-device* (DCQCN, PFC)
– src/network/model/broadcom-node* & utils/broadcom-egress-queue*
– src/applications/model/udp-echo-client.cc (rate throttle)
– src/internet/model/seq-ts-header* (infiniBand sequence & timestamp)
f. Examples & Tests
– examples/* for end-to-end scenarios
– src/*/test and src/test for unit/regression tests
g. Output & Tracing
– Trace generation scattered among network, flow-monitor, stats modules
– Trace file (mix/mix.tr)
Component interactions
• User starts main.exe with config.txt
• main calls “Helper” objects to build NodeContainers & NetDeviceContainers
• Helpers instantiate “Model” objects (e.g., QbbNetDeviceModel, BroadcomNodeModel)
• Model objects register with the Core Scheduler and Event system
• During simulation:
– Packet events flow through DeviceModel → ChannelModel → ProtocolModel
– DCQCN/TIMELY modules react on ECN/PFC marks
– Broadcom-model monitors buffer occupancy and triggers PFC/ECN
• Traces are emitted to output modules
Architectural patterns & design principles
• Modular plugin-style architecture—each protocol/device is a self-contained module under src/<module>/{model,helper,test,doc}
• Factory and helper patterns for object creation and topology setup
• Event-driven discrete-event simulation core
• Separation of concerns:
– core scheduler & objects
– network layers (L1-L4 implementations)
– application layer (UDP-based RDMA client)
– switch/buffer models
Technologies & frameworks
• C++17 on NS-3 v3.17 core
• waf + Makefile for Linux builds
• Visual Studio 2015 solution for Windows
• Python bindings for scripting & tests