Skip to content

Commit

Permalink
doc/vm: add memory configuration for more than 2 nics (#673)
Browse files Browse the repository at this point in the history
Signed-off-by: Ric Li <[email protected]>
  • Loading branch information
ricmli authored Dec 27, 2023
1 parent fa7f9f2 commit dcd1f9d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
12 changes: 12 additions & 0 deletions doc/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ RHEL 9 doesn't provide `json-c-devel libpcap-devel gtest-devel` package as defau
sudo yum install cmake flex bison
```

#### 1.1.4 Arch Linux

```bash
sudo pacman -Syu --needed git gcc meson python python-pyelftools pkg-config json-c libpcap gtest openssl numactl
```

Install below SDL2 packages if you want the display support for RxTxApp.

```bash
sudo pacman -Syu --needed sdl2 sdl2_ttf
```

### 1.2 Build dependency from source code

It's true that not all operating systems, including RHEL 9, come with all the libraries required for every software package. If you're trying to install a software that has dependencies not provided by default on your OS, you might need to install these dependencies manually. Skip these part if your setup has all dependencies resolved.
Expand Down
6 changes: 3 additions & 3 deletions doc/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,6 @@ You need to repeat below steps to create Virtual Functions (VF), bind the VF to
```bash
# replace "0000:a1:00.0" with the port on your setup
sudo ./script/nicctl.sh create_vf 0000:a1:00.0
# add VFIO device permissions for current user
sudo chown -R $USER:$USER /dev/vfio/
# setup hugepages, the number(2048) is dependent on the workloads you wish to execute.
sudo sysctl -w vm.nr_hugepages=2048
```
Expand Down Expand Up @@ -525,7 +523,7 @@ ST: st_init, mbuf_pool create fail
### 8.5 No access to vfio device
If you encounter the following error message, please grant the current user access to the dev:
If you encounter the following error message, please check section 3.1 to create a group vfio and add the current user to the group:
```bash
EAL: Cannot open /dev/vfio/147: Permission denied
Expand Down Expand Up @@ -631,6 +629,8 @@ find / -name librte_dmadev.so.23
```bash
# Note to change the path as the find result
export LD_LIBRARY_PATH=/usr/local/lib64/
# Or use ldconfig to update the cache
sudo ldconfig
```
### 8.15 Fail to init lcore
Expand Down
16 changes: 14 additions & 2 deletions doc/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ sudo yum install virt-manager

### 1.4 Install latest ICE driver with patches

please refer to the driver update section in [Intel® E810 Series Ethernet Adapter driver guide](e810.md)
Please refer to the driver update section in [Intel® E810 Series Ethernet Adapter driver guide](e810.md).

### 1.5 Create VFs

You can also refer to [Run Guide](run.md).

```bash
# root
echo <num> > /sys/class/net/<interface>/device/sriov_numvfs
Expand Down Expand Up @@ -74,7 +76,7 @@ After running `virt-install` command, the viewer will pop up and you can normall
* Configure ptp4l daemon
a. you can use any PF port with PHC support to sync time

b. `ethtool -T ens801f2` check "PTP Hardware Clock: " is not 0
b. `ethtool -T ens801f2` check "PTP Hardware Clock: x" is the phc device in /dev/ptpx

c. (optional) manully run ptp4l

Expand Down Expand Up @@ -116,6 +118,16 @@ edit vm0
</features>
```

* Add memtune hard_limit if you passthrough more than 2 PFs/VFs to the VM, the size should be "2 * memory + 1GB"

```xml
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>8388608</currentMemory>
<memtune>
<hard_limit unit='KiB'>17825792</hard_limit>
</memtune>
```

## 2. VM setup

(Ubuntu 20.04 )
Expand Down

0 comments on commit dcd1f9d

Please sign in to comment.