Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit e4a6d8c

Browse files
committed
Update documentation for building ivshmem server
1 parent e7aa269 commit e4a6d8c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

doc/src/environment/Environment.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@ sudo apt build-dep qemu
2121
wget https://download.qemu.org/qemu-6.0.0.tar.xz
2222
tar xvJf qemu-6.0.0.tar.xz
2323
cd qemu-6.0.0
24+
```
25+
26+
If you are planning on running the rackscale NrOS build, you'll need to modify
27+
the ivshmem server code. Open ```contrib/ivshmem-server/ivshmem-server.c```.
28+
Go to the function```ivshmem_server_ftruncate```. Replace it with:
29+
```c
30+
static int
31+
ivshmem_server_ftruncate(int fd, unsigned shmsize)
32+
{
33+
struct stat mapstat;
34+
35+
/* align shmsize to next power of 2 */
36+
shmsize = pow2ceil(shmsize);
37+
38+
if (fstat(fd, &mapstat) != -1 && mapstat.st_size == shmsize) {
39+
return 0;
40+
}
41+
42+
return ftruncate(fd, shmsize);
43+
}
44+
```
45+
46+
```bash
2447
./configure --enable-rdma --enable-libpmem
2548
make -j 28
2649
sudo make -j28 install

0 commit comments

Comments
 (0)