Skip to content

Commit a9654c5

Browse files
committed
Merge branch 'main' of https://github.com/SlugLab/CXLMemSim
2 parents c39f3b0 + c7cd7aa commit a9654c5

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

.github/workflows/cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v3
2323

2424
- name: Install dependencies
25-
run: sudo apt install llvm-dev clang libbpf-dev libclang-dev python3-pip gcc-13 g++-13 libcxxopts-dev libboost-dev nvidia-cuda-dev libfmt-dev libspdlog-dev && git submodule update --init --recursive
25+
run: sudo apt update && sudo apt install llvm-dev clang libbpf-dev libclang-dev python3-pip gcc-13 g++-13 libcxxopts-dev libboost-dev nvidia-cuda-dev libfmt-dev libspdlog-dev librdmacm-dev && git submodule update --init --recursive
2626

2727
- name: Configure CMake
2828
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,44 @@ exit
7373
../qemu_integration/launch_qemu_cxl1.sh &
7474
```
7575
76+
for multiple hosts, you'll need vxlan
77+
78+
```bash
79+
#!/bin/bash
80+
set -eux
81+
82+
DEV=enp23s0f0np0
83+
BR=br0
84+
VNI=100
85+
MCAST=239.1.1.1
86+
BR_IP_SUFFIX=$(hostname | grep -oE '[0-9]+$' || echo 1) # optional auto-index
87+
# Or set manually:
88+
# BR_IP_SUFFIX=<1..4>
89+
90+
# Clean up
91+
ip link del $BR 2>/dev/null || true
92+
ip link del vxlan$VNI 2>/dev/null || true
93+
94+
# Create bridge
95+
ip link add $BR type bridge
96+
ip link set $BR up
97+
98+
# Create multicast VXLAN (no remote attribute!)
99+
ip link add vxlan$VNI type vxlan id $VNI group $MCAST dev $DEV dstport 4789 ttl 10
100+
ip link set vxlan$VNI up
101+
ip link set vxlan$VNI master $BR
102+
103+
# Assign overlay IP
104+
ip addr add 192.168.100.$BR_IP_SUFFIX/24 dev $BR
105+
106+
# Optional: add local TAPs for QEMU
107+
for i in 0 1; do
108+
ip tuntap add tap$i mode tap
109+
ip link set tap$i up
110+
ip link set tap$i master $BR
111+
done
112+
113+
echo "Bridge $BR ready on host $(hostname)"
114+
```
115+
for every host and edit the qemu's ip with `/usr/local/bin/setup*` and `/etc/hostname`.
116+

0 commit comments

Comments
 (0)