Skip to content

Commit 20e0150

Browse files
[Release] ONVM v21.10
Release of ONVM v21.10
2 parents 75bd512 + 152271d commit 20e0150

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2475
-135
lines changed

.github/workflows/Linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
chmod +x style/run-lint.sh
2525
style/run-lint.sh c
2626
Cppcheck:
27-
runs-on: ubuntu-latest
27+
runs-on: ubuntu-20.04
2828
steps:
2929
- name: Checkout
3030
uses: actions/checkout@v2
3131
- name: Install Requirements
3232
run: |
33-
sudo apt-get install cppcheck=1.82-1
33+
sudo apt-get install cppcheck=1.90-4build1
3434
- name: User's Lint
3535
run: |
3636
chmod +x style/run-lint.sh

docs/Docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ sudo ./docker.sh -h HUGEPAGES -o ONVM -n NAME [-D DEVICES] [-d DIRECTORY] [-c CO
3434
- 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.
3535

3636
```bash
37-
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"
37+
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"
3838
```
3939

4040
- 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.
@@ -162,7 +162,7 @@ Older Dockerfiles
162162
163163
If you want to use an older ONVM version on Ubuntu 14, take a look at the [Available Tags][onvm-docker-tags].
164164
The 18.03 tag runs ONVM when it had been set up for an older version of Ubuntu.
165-
The `latest` dockerfile runs on Ubuntu 18.04 and is called `latest`.
165+
The `latest` dockerfile runs on Ubuntu 20.04 and is called `latest`.
166166
167167
[docker]: ../scripts/docker.sh
168168
[onvm-docker]: https://hub.docker.com/r/sdnfv/opennetvm/

docs/Install.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Check System
2121

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

108-
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.
108+
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`)
109109
```sh
110110
export ONVM_NIC_PCI=" 07:00.0 07:00.1 "
111111
```
@@ -117,7 +117,7 @@ Set up Environment
117117
7. Disable ASLR since it makes sharing memory with NFs harder:
118118
```sh
119119
sudo sh -c "echo 0 > /proc/sys/kernel/randomize_va_space"
120-
```
120+
```
121121

122122
Configure and compile DPDK
123123
--
@@ -130,6 +130,8 @@ Configure and compile DPDK
130130

131131
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.
132132

133+
If `which python` shows **not found** in your environment, please link `python` to Python3, e.g., via `link -s` or `alias python=$(which python3)`.
134+
133135
Run DPDK HelloWorld Application
134136
--
135137

docs/Releases.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,52 @@ use a date based versioning system. Now, a release version can look
1313
like `17.11` where the "major" number is the year and the "minor" number
1414
is the month.
1515

16+
## v21.10 (10/2020): Bug Fixes, Test cases, Dev Environment Improvements
17+
This release focused on general bug fixing and improving our test/development environments.
18+
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)
19+
20+
**New Features and NFs**
21+
22+
- [[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.
23+
- [[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.
24+
- [[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.
25+
26+
27+
**Testing and Development Improvements**
28+
29+
- [[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)].
30+
- [[297](https://github.com/sdnfv/openNetVM/pull/297)] Adds VS Code profile to simplify debugging of NFs.
31+
- [[302](https://github.com/sdnfv/openNetVM/pull/302)] Adds NF chain performance test to measure and plot inter-NF throughput and latency.
32+
- [[308](https://github.com/sdnfv/openNetVM/pull/308)] Adds socket ID information to NF and manager logging print statements.
33+
34+
**Miscellaneous Bug and Documentation Fixes**
35+
36+
- [[304](https://github.com/sdnfv/openNetVM/pull/304)] Fixes the NF_TAG of `aes_decrypt` in `openNetVM/examples/aes_decrypt/aesdecrypt.c`.
37+
- [[300](https://github.com/sdnfv/openNetVM/pull/300)] Updates MoonGen installation document to work with the new DPDK version.
38+
- [[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 `..`.
39+
- [[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.
40+
- [[265](https://github.com/sdnfv/openNetVM/pull/265)] Updates Install README to provide further clarification as well as to include a missing package.
41+
- [[267](https://github.com/sdnfv/openNetVM/pull/267)] Fixes typos in `onvm_pkt_helper.h`.
42+
- [[317](https://github.com/sdnfv/openNetVM/pull/317)] Fixes the ARP NF endianness for source IP addresses.
43+
- [[306](https://github.com/sdnfv/openNetVM/pull/306)] Updates linter installation script to use newer versions of cppcheck and Ubuntu.
44+
- [[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.
45+
46+
Contributors:
47+
48+
- Dennis Afanasev ([dennisafa](https://github.com/dennisafa))
49+
- Noah Chinitz ([NoahChinitzGWU](https://github.com/NoahChinitzGWU))
50+
- Benjamin De Vierno ([bdevierno1](https://github.com/bdevierno1))
51+
- Kevin Deems ([kevindweb](https://github.com/kevindweb))
52+
- Lauren Hahn ([lhahn01](https://github.com/Lhahn01))
53+
- Elliott (Elie) Henne ([elliotthenne](https://github.com/elliotthenne))
54+
- Vivek Jain ([vivek-anand-jain](https://github.com/Vivek-anand-jain))
55+
- Jack Kuo [JackKuo-tw](https://github.com/JackKuo-tw)
56+
- Catherine Meadows ([catherinemeadows](https://github.com/catherinemeadows))
57+
- Rohit M P ([rohit-mp](https://github.com/rohit-mp))
58+
- Leslie Monis [lesliemonis](https://github.com/lesliemonis)
59+
- Peng Wu ([PengWu-wp](https://github.com/PengWu-wp))
60+
61+
1662
## v20.10 (10/2020): OS/Dependency Updates, Bug Fixes, New NFs
1763
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)
1864

docs/moongen.md

Lines changed: 82 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
1-
MoonGen Installation (DPDK-2.0 Version)
1+
MoonGen Installation (DPDK-19.5 Version)
22
===================
33

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

7-
1. Preparation steps
7+
## 1. Preparation steps
88
===================
9-
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.
109

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

13-
`$grep -i huge /proc/meminfo`
12+
### 1.1 Check for available hugepages
1413

15-
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.
14+
`$ grep -i huge /proc/meminfo`
1615

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

19-
`$cd dirctory_of_your_installed_dpdk`
24+
### 1.2 Check NIC ports are bound to DPDK
2025

21-
`$./tools/dpdk_nic_bind.py --status`
26+
`$ cd dirctory_of_your_installed_dpdk`
2227

23-
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.
28+
`$ ./usertools/dpdk-devbind.py --status`
29+
30+
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.
2431

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

37-
1.3 bind the 10G ports to DPDK
44+
### 1.3 Bind the 10G ports to DPDK
3845

39-
1.3.1 load in your uio linux kernel module
46+
An example of incorrect bindings is as follows:
4047

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

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

47-
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`.
63+
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:
4864

49-
1.3.3 bind the 10G ports to DPDK
65+
`$ sudo ifconfig eth2 down`
5066

51-
`$sudo ./tools/dpdk_nic_bind.py -b igb_uio 07:00.0`
67+
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:
5268

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

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

57-
`$g++ --version`
73+
```
74+
Network devices using DPDK-compatible driver
75+
============================================
76+
0000:07:00.0 '82599EB 10-Gigabit SFI/SFP+ Network Connection' drv=igb_uio unused=ixgbe
5877
59-
`$gcc --version`
78+
Network devices using kernel driver
79+
===================================
80+
0000:05:00.0 '82576 Gigabit Network Connection' if=eth0 drv=igb unused=igb_uio *Active*
81+
0000:05:00.1 '82576 Gigabit Network Connection' if=eth1 drv=igb unused=igb_uio
82+
0000:07:00.1 '82599EB 10-Gigabit SFI/SFP+ Network Connection' if=eth3 drv=ixgbe unused=igb_uio
83+
```
84+
85+
1.4 check if g++ and gcc are updated with version higher than 4.8
86+
87+
`$ g++ --version`
88+
89+
`$ gcc --version`
6090

6191
if not, please add the repository using:
6292

63-
`$sudo add-apt-repository ppa:ubuntu-toolchain-r/test`
93+
`$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test`
94+
95+
Then, to install it use:
96+
97+
`$ sudo apt-get update`
6498

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

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

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

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

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

75-
`$sudo update-alternatives --config gcc`
109+
```
110+
$ sudo apt-get install -y build-essential cmake linux-headers-`uname -r` pciutils libnuma-dev
111+
$ sudo apt install cmake
112+
$ sudo apt install libtbb2
113+
```
76114

77115

78-
2. MoonGen Installation
116+
## 2. MoonGen Installation
79117
===================
80118

81-
2.1 get the resource from github, and checkout the dpdk2.0 branch
119+
### 2.1 Get the resource from github, and checkout the dpdk19.5 branch
82120

83-
`$git clone https://github.com/emmericp/MoonGen`
121+
`$ git clone https://github.com/emmericp/MoonGen`
84122

85-
`$cd MoonGen`
123+
`$ cd MoonGen`
86124

87-
`$git checkout dpdk2.0`
125+
`$ git checkout dpdk-19.05`
88126

89-
`$sudo git submodule update --init`
127+
`$ sudo git submodule update --init`
90128

91-
2.2 build the resource
129+
### 2.2 Build the resource
92130

93-
`$sudo ./build.sh`
131+
`$ sudo ./build.sh`
94132

95-
2.3 set up hugetable
133+
### 2.3 Set up hugetable
96134

97-
`$sudo ./setup-hugetlbfs.sh`
135+
`$ sudo ./setup-hugetlbfs.sh`
98136

99-
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:
137+
### 2.4 Execute the test
138+
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:
100139

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

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

105144
```
106145
wenhui@nimbnode16:~/MoonGen$ sudo ./build/MoonGen ./examples/quality-of-service-test.lua 0 0

examples/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $(error "Please define RTE_SDK environment variable")
4040
endif
4141

4242
# To add new examples, append the directory name to this variable
43-
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
43+
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
4444

4545
ifeq ($(NDPI_HOME),)
4646
$(warning "Skipping ndpi_stats NF as NDPI_HOME is not set")

examples/aes_decrypt/aesdecrypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
#include "onvm_nflib.h"
6161
#include "onvm_pkt_helper.h"
6262

63-
#define NF_TAG "aes_encrypt"
63+
#define NF_TAG "aes_decrypt"
6464

6565
/* number of package between each print */
6666
static uint32_t print_delay = 1000000;

examples/example_config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
"memory_channels": 3,
55
"portmask": 2
66
},
7-
87
"onvm": {
98
"output": "stdout",
109
"serviceid": 1,
1110
"instanceid": 3
1211
}
13-
}
12+
}

examples/fair_queue/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
fair_queue/

0 commit comments

Comments
 (0)