Skip to content

Commit

Permalink
[Release] ONVM v21.10
Browse files Browse the repository at this point in the history
Release of ONVM v21.10
  • Loading branch information
catherinemeadows authored Feb 1, 2022
2 parents 75bd512 + 152271d commit 20e0150
Show file tree
Hide file tree
Showing 44 changed files with 2,475 additions and 135 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ jobs:
chmod +x style/run-lint.sh
style/run-lint.sh c
Cppcheck:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Requirements
run: |
sudo apt-get install cppcheck=1.82-1
sudo apt-get install cppcheck=1.90-4build1
- name: User's Lint
run: |
chmod +x style/run-lint.sh
Expand Down
4 changes: 2 additions & 2 deletions docs/Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sudo ./docker.sh -h HUGEPAGES -o ONVM -n NAME [-D DEVICES] [-d DIRECTORY] [-c CO
- This will start a container with two NIC devices mapped in, /dev/uio0 and /dev/uio1, the hugepage directory at `/mnt/huge` mapped in, and the openNetVM source directory at `/root/openNetVM` mapped into the container with the name of Basic_Monitor_NF.

```bash
sudo ./docker.sh -h /mnt/huge -o /root/openNetVM -n Speed_Tester_NF -D /dev/uio0 -c "./examples/speed_tester/go.sh 1 -d 1"
sudo ./docker.sh -h /mnt/huge -o /root/openNetVM -n Speed_Tester_NF -D /dev/uio0 -c "./examples/start_nf.sh speed_tester 1 -d 1"
```

- This will start a container with one NIC device mapped in, /dev/uio0 , the hugepage directory at `/mnt/huge` mapped in, and the openNetVM source directory at `/root/openNetVM` mapped into the container with the name of Speed_Tester_NF. Also, the container will be started in detached mode (no connection to it) and it will run the go script of the simple forward NF.
Expand Down Expand Up @@ -162,7 +162,7 @@ Older Dockerfiles
If you want to use an older ONVM version on Ubuntu 14, take a look at the [Available Tags][onvm-docker-tags].
The 18.03 tag runs ONVM when it had been set up for an older version of Ubuntu.
The `latest` dockerfile runs on Ubuntu 18.04 and is called `latest`.
The `latest` dockerfile runs on Ubuntu 20.04 and is called `latest`.
[docker]: ../scripts/docker.sh
[onvm-docker]: https://hub.docker.com/r/sdnfv/opennetvm/
Expand Down
10 changes: 6 additions & 4 deletions docs/Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Check System

Install the Linux Kernel headers package for your kernel version.
```sh
sudo apt-get install build-essential linux-headers-$(uname -r) git bc
sudo apt-get install build-essential linux-headers-$(uname -r) git bc gcc make pkg-config
```
If your distribution didn't come with Python or came with an earlier version, you will need to install Python 3 v3.4+.
Expand Down Expand Up @@ -50,7 +50,7 @@ Check System
```sh
sudo apt-get install libnuma-dev
```
If installing libnuma-dev fails, your system may not be up to date. To fix this, run:
If installing libnuma-dev fails, your package information may not be up to date. To fix this, run:
```sh
sudo apt-get update
```
Expand Down Expand Up @@ -105,7 +105,7 @@ Set up Environment
echo export ONVM_NUM_HUGEPAGES=1024 >> ~/.bashrc
```

ONVM_NIC_PCI is a variable that specifies NIC ports to be bound to DPDK. If ONVM_NIC_PCI is not specified, the default action is to bind all non-active 10G NIC ports to DPDK. Note, NIC PCI device IDs may not be the same across all hosts. In that case, please retrieve this information for your host before setting the variable.
ONVM_NIC_PCI is a variable that specifies NIC ports to be bound to DPDK. If ONVM_NIC_PCI is not specified, the default action is to bind all non-active 10G NIC ports to DPDK. Note, NIC PCI device IDs may not be the same across all hosts. In that case, please retrieve this information for your host before setting the variable. (e.g., via `lspci`)
```sh
export ONVM_NIC_PCI=" 07:00.0 07:00.1 "
```
Expand All @@ -117,7 +117,7 @@ Set up Environment
7. Disable ASLR since it makes sharing memory with NFs harder:
```sh
sudo sh -c "echo 0 > /proc/sys/kernel/randomize_va_space"
```
```

Configure and compile DPDK
--
Expand All @@ -130,6 +130,8 @@ Configure and compile DPDK

The [install script](../scripts/install.sh) will automatically run the [environment setup script](../scripts/setup_environment.sh), which configures your local environment. This should be run once for every reboot, as it loads the appropraite kernel modules and can bind your NIC ports to the DPDK driver.

If `which python` shows **not found** in your environment, please link `python` to Python3, e.g., via `link -s` or `alias python=$(which python3)`.

Run DPDK HelloWorld Application
--

Expand Down
46 changes: 46 additions & 0 deletions docs/Releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,52 @@ use a date based versioning system. Now, a release version can look
like `17.11` where the "major" number is the year and the "minor" number
is the month.

## v21.10 (10/2020): Bug Fixes, Test cases, Dev Environment Improvements
This release focused on general bug fixing and improving our test/development environments.
A CloudLab template will be available with the latest release here: [https://www.cloudlab.us/p/GWCloudLab/onvm](https://www.cloudlab.us/p/GWCloudLab/onvm)

**New Features and NFs**

- [[243](https://github.com/sdnfv/openNetVM/pull/243)] Adds L3 Switch example based on DPDK `l3fwd` sample code. This NF can forward packets either using longest prefix match or a hash table lookup.
- [[254](https://github.com/sdnfv/openNetVM/pull/254)] Adds Fair Queue NF that demonstrates how to use advanced rings mode to directly access packets and distribute them to a set of child NFs. Packets are "classified" using a CRC32 hash and assigned to a queue. Queues are then read from in Round Robin order to process packets of different types in a fair way. Contributed by ([Rohit M P](https://github.com/rohit-mp)) from NITK.
- [[277](https://github.com/sdnfv/openNetVM/pull/277)] Adds support for Jumbo frame packets. Enable by adding a `-j` flag to the manager's go.sh script.


**Testing and Development Improvements**

- [[296](https://github.com/sdnfv/openNetVM/pull/296)] Adds unit test for NF messaging infrastructure and fixes memory leak related to overflow of message pools [[Issue 293](https://github.com/sdnfv/openNetVM/pull/293)].
- [[297](https://github.com/sdnfv/openNetVM/pull/297)] Adds VS Code profile to simplify debugging of NFs.
- [[302](https://github.com/sdnfv/openNetVM/pull/302)] Adds NF chain performance test to measure and plot inter-NF throughput and latency.
- [[308](https://github.com/sdnfv/openNetVM/pull/308)] Adds socket ID information to NF and manager logging print statements.

**Miscellaneous Bug and Documentation Fixes**

- [[304](https://github.com/sdnfv/openNetVM/pull/304)] Fixes the NF_TAG of `aes_decrypt` in `openNetVM/examples/aes_decrypt/aesdecrypt.c`.
- [[300](https://github.com/sdnfv/openNetVM/pull/300)] Updates MoonGen installation document to work with the new DPDK version.
- [[270](https://github.com/sdnfv/openNetVM/pull/270)] Fixes issues with relative path in the onvm go script to find the web directory. Now using `$ONVM_HOME` instead of `..`.
- [[272](https://github.com/sdnfv/openNetVM/pull/272)] Fixes two bugs (including Issue #233) where the NF rings would not be cleared after deallocation and an underflow bug in stats.
- [[265](https://github.com/sdnfv/openNetVM/pull/265)] Updates Install README to provide further clarification as well as to include a missing package.
- [[267](https://github.com/sdnfv/openNetVM/pull/267)] Fixes typos in `onvm_pkt_helper.h`.
- [[317](https://github.com/sdnfv/openNetVM/pull/317)] Fixes the ARP NF endianness for source IP addresses.
- [[306](https://github.com/sdnfv/openNetVM/pull/306)] Updates linter installation script to use newer versions of cppcheck and Ubuntu.
- [[316](https://github.com/sdnfv/openNetVM/pull/316)] Fixes Speed Tester NF so that it does not crash while loading a PCAP trace with jumbo frames without the correct flags.

Contributors:

- Dennis Afanasev ([dennisafa](https://github.com/dennisafa))
- Noah Chinitz ([NoahChinitzGWU](https://github.com/NoahChinitzGWU))
- Benjamin De Vierno ([bdevierno1](https://github.com/bdevierno1))
- Kevin Deems ([kevindweb](https://github.com/kevindweb))
- Lauren Hahn ([lhahn01](https://github.com/Lhahn01))
- Elliott (Elie) Henne ([elliotthenne](https://github.com/elliotthenne))
- Vivek Jain ([vivek-anand-jain](https://github.com/Vivek-anand-jain))
- Jack Kuo [JackKuo-tw](https://github.com/JackKuo-tw)
- Catherine Meadows ([catherinemeadows](https://github.com/catherinemeadows))
- Rohit M P ([rohit-mp](https://github.com/rohit-mp))
- Leslie Monis [lesliemonis](https://github.com/lesliemonis)
- Peng Wu ([PengWu-wp](https://github.com/PengWu-wp))


## v20.10 (10/2020): OS/Dependency Updates, Bug Fixes, New NFs
A CloudLab template will be available with the latest release here: [https://www.cloudlab.us/p/GWCloudLab/onvm](https://www.cloudlab.us/p/GWCloudLab/onvm)

Expand Down
125 changes: 82 additions & 43 deletions docs/moongen.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
MoonGen Installation (DPDK-2.0 Version)
MoonGen Installation (DPDK-19.5 Version)
===================

#### Welcome to installation memo for [MoonGen](http://scholzd.github.io/MoonGen/install.html), MoonGen is a "Scriptable High-Speed Packet Generator".
#### Welcome to installation memo for [MoonGen](http://scholzd.github.io/MoonGen/install.html). MoonGen is a "Scriptable High-Speed Packet Generator".
----------

1. Preparation steps
## 1. Preparation steps
===================
Installation steps are assuming that you have already got OpenNetVM installed. If you have already got OpenNetVM installed, please following the steps below for a double check of your system.

1.1 check if you have available hugepages
Installation steps are assuming that you already have [openNetVM installed](./Install.md). Follow the steps below to double check your system configuration.

`$grep -i huge /proc/meminfo`
### 1.1 Check for available hugepages

If ***HugePages_Free*** 's value equals to 0, which means there is no free hugepages available, you probably have to reboot your machine, by `$sudo reboot` to get some released hugepages.
`$ grep -i huge /proc/meminfo`

1.2 check if you have available ports binded to DPDK
If the ***HugePages_Free*** 's value equals 0, which means there are no free hugepages available, there may be a few reasons why:
- The manager crashed, but an NF(s) is still running.
- In this case, either kill them manually by hitting Ctrl+C or run `$ sudo pkill NF_NAME` for every NF that you have ran.
- The manager and NFs are not running, but something crashed without freeing hugepages.
- To fix this, please run `$ sudo rm -rf /mnt/huge/*` to remove all files that contain hugepage data.
- The above two cases are not met, something weird is happening:
- A reboot might fix this problem and free memory: `$ sudo reboot`

`$cd dirctory_of_your_installed_dpdk`
### 1.2 Check NIC ports are bound to DPDK

`$./tools/dpdk_nic_bind.py --status`
`$ cd dirctory_of_your_installed_dpdk`

if you got the follwing binding information indicating that you have the two 10-Gigabit NIC ports binded with DPDK driver, then you are fine, please jump to step 1.4, otherwise, please jump to step 1.3.
`$ ./usertools/dpdk-devbind.py --status`

If you got the follwing similar binding information indicating that you have the two 10-Gigabit NIC ports bound with the DPDK driver, jump to step 1.4. Otherwise, please jump to step 1.3.

```
Network devices using DPDK-compatible driver
Expand All @@ -34,73 +41,105 @@ Network devices using kernel driver
0000:05:00.1 '82576 Gigabit Network Connection' if=eth0 drv=igb unused=igb_uio *Active*
```

1.3 bind the 10G ports to DPDK
### 1.3 Bind the 10G ports to DPDK

1.3.1 load in your uio linux kernel module
An example of incorrect bindings is as follows:

`$sudo modprobe uio`
```
Network devices using DPDK-compatible driver
============================================
<none>
1.3.2 load in your igb_uio, which is in DPDK kernel module, e.g x86_64-native-linuxapp-gcc
Network devices using kernel driver
===================================
0000:05:00.0 '82576 Gigabit Network Connection' if=eth0 drv=igb unused=igb_uio *Active*
0000:05:00.1 '82576 Gigabit Network Connection' if=eth1 drv=igb unused=igb_uio
0000:07:00.0 '82599EB 10-Gigabit SFI/SFP+ Network Connection' if=eth2 drv=ixgbe unused=igb_uio *Active*
0000:07:00.1 '82599EB 10-Gigabit SFI/SFP+ Network Connection' if=eth3 drv=ixgbe unused=igb_uio
```

`$sudo insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko`
In our example above, we see two 10G capable NIC ports that we could use with description '82599EB 10-Gigabit SFI/SFP+ Network Connection'.

if it showed up as alredy bind, use `$sudo rmmod igb_uio`, and then perform `$sudo insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko`.
One of the two NIC ports, 07:00.0, is active shown by the *Active* at the end of the line. Since the Linux Kernel is currently using that port, network interface eth2, we will not be able to use it with openNetVM. We must first disable the network interface in the Kernel, and then proceed to bind the NIC port to the DPDK Kernel module, igb_uio:

1.3.3 bind the 10G ports to DPDK
`$ sudo ifconfig eth2 down`

`$sudo ./tools/dpdk_nic_bind.py -b igb_uio 07:00.0`
Rerun the status command, ./usertools/dpdk-devbind.py --status, to see that it is not active anymore. Once that is done, proceed to bind the NIC port to the DPDK Kenrel module:

`$sudo ./tools/dpdk_nic_bind.py -b igb_uio 07:00.1`
`$ sudo ./usertools/dpdk-devbind.py -b igb_uio 07:00.0`

1.4 check if g++ and gcc are updated with version higher than 4.7
Check the status again, `$ ./usertools/dpdk-devbind.py --status`, and assure the output is similar to our example below:

`$g++ --version`
```
Network devices using DPDK-compatible driver
============================================
0000:07:00.0 '82599EB 10-Gigabit SFI/SFP+ Network Connection' drv=igb_uio unused=ixgbe
`$gcc --version`
Network devices using kernel driver
===================================
0000:05:00.0 '82576 Gigabit Network Connection' if=eth0 drv=igb unused=igb_uio *Active*
0000:05:00.1 '82576 Gigabit Network Connection' if=eth1 drv=igb unused=igb_uio
0000:07:00.1 '82599EB 10-Gigabit SFI/SFP+ Network Connection' if=eth3 drv=ixgbe unused=igb_uio
```

1.4 check if g++ and gcc are updated with version higher than 4.8

`$ g++ --version`

`$ gcc --version`

if not, please add the repository using:

`$sudo add-apt-repository ppa:ubuntu-toolchain-r/test`
`$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test`

Then, to install it use:

`$ sudo apt-get update`

then, to install it use:
`$ sudo apt-get install g++-4.8`

`$sudo apt-get update`
and then change the default compiler to use update-alternatives:

`$sudo apt-get install g++-4.7`
`$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8`

and then change the default compiler use update-alternatives:
`$ sudo update-alternatives --config gcc`

`$sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7`
Install other dependencies with:

`$sudo update-alternatives --config gcc`
```
$ sudo apt-get install -y build-essential cmake linux-headers-`uname -r` pciutils libnuma-dev
$ sudo apt install cmake
$ sudo apt install libtbb2
```


2. MoonGen Installation
## 2. MoonGen Installation
===================

2.1 get the resource from github, and checkout the dpdk2.0 branch
### 2.1 Get the resource from github, and checkout the dpdk19.5 branch

`$git clone https://github.com/emmericp/MoonGen`
`$ git clone https://github.com/emmericp/MoonGen`

`$cd MoonGen`
`$ cd MoonGen`

`$git checkout dpdk2.0`
`$ git checkout dpdk-19.05`

`$sudo git submodule update --init`
`$ sudo git submodule update --init`

2.2 build the resource
### 2.2 Build the resource

`$sudo ./build.sh`
`$ sudo ./build.sh`

2.3 set up hugetable
### 2.3 Set up hugetable

`$sudo ./setup-hugetlbfs.sh`
`$ sudo ./setup-hugetlbfs.sh`

2.4 execute the test, configure the ***quality-of-service-test.lua*** with your destination ip address (ip address for the server you want to sent packets to) in line 60 and line 177, and your source ip address (ip address for the machine you are executing MoonGen on) in line 68 and line 165, and run with command:
### 2.4 Execute the test
Configure the ***quality-of-service-test.lua*** with your destination ip address (ip address for the server you want to sent packets to) and your source ip address (ip address for the machine you are executing MoonGen on), and run with command:

`$sudo ./build/MoonGen ./examples/quality-of-service-test.lua 0 1`
`$ sudo ./build/MoonGen ./examples/quality-of-service-test.lua 0 1`

and if sample log showed up as following, you are fine, please use ***Ctrl+C*** to stop generating packets:
and if the sample log outputs the following, your configutation is correct. Use ***Ctrl+C*** to stop generating packets:

```
wenhui@nimbnode16:~/MoonGen$ sudo ./build/MoonGen ./examples/quality-of-service-test.lua 0 0
Expand Down
2 changes: 1 addition & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $(error "Please define RTE_SDK environment variable")
endif

# To add new examples, append the directory name to this variable
examples = bridge basic_monitor simple_forward speed_tester flow_table test_flow_dir aes_encrypt aes_decrypt flow_tracker load_balancer arp_response nf_router scaling_example load_generator payload_scan firewall simple_fwd_tb l2fwd
examples = bridge basic_monitor simple_forward speed_tester flow_table test_flow_dir aes_encrypt aes_decrypt flow_tracker load_balancer arp_response nf_router scaling_example load_generator payload_scan firewall simple_fwd_tb l2fwd test_messaging l3fwd fair_queue

ifeq ($(NDPI_HOME),)
$(warning "Skipping ndpi_stats NF as NDPI_HOME is not set")
Expand Down
2 changes: 1 addition & 1 deletion examples/aes_decrypt/aesdecrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#include "onvm_nflib.h"
#include "onvm_pkt_helper.h"

#define NF_TAG "aes_encrypt"
#define NF_TAG "aes_decrypt"

/* number of package between each print */
static uint32_t print_delay = 1000000;
Expand Down
3 changes: 1 addition & 2 deletions examples/example_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
"memory_channels": 3,
"portmask": 2
},

"onvm": {
"output": "stdout",
"serviceid": 1,
"instanceid": 3
}
}
}
2 changes: 2 additions & 0 deletions examples/fair_queue/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
fair_queue/
Loading

0 comments on commit 20e0150

Please sign in to comment.