Skip to content

Commit

Permalink
Merge most code from HIRT (ICNP'24)
Browse files Browse the repository at this point in the history
Changes improving IPv6 and adding SRv6 encap/decap and some processing
capabilities to showcase the HIRT paper to be presented at ICNP'24.

It also adds the library elements fo network-layer FEC used in the
aforementioned paper. However the FEC elements themselves use RLC code
that is under patent, so if you want them please ask Louis. For the same
reasons, I had to squash all commits as once, sorry about the huge
change.

Improvements:
 - updated gitlab CI with much more tests
 - SRV6 encap and decap elements
 - Fix compatibility problem with aarch64
 - Fix compatibility issues with MacOS

@louisna

 was mostly involved in the code, and then me.

Co-authored-by: default avatarLouis Navarre <[email protected]>
i
  • Loading branch information
tbarbette committed Oct 1, 2024
1 parent 0727933 commit 8020797
Show file tree
Hide file tree
Showing 111 changed files with 3,255 additions and 1,216 deletions.
134 changes: 76 additions & 58 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,87 +1,105 @@
#This file is quite deprecated, but we keep it there in case someone has an internal GitLab CI pipeline and wants to reuse this

default:
image: ubuntu:22.04
image: ubuntu:22.04
tags:
- docker

stages:
- normal
- user
- io

variables:
NETMAP_VERSION: "11.1"
CONFIG: "--enable-all-elements --disable-verbose-batch --enable-simtime"

.common:
stage: user
parallel:
matrix:
- HOST: ["x86_64","aarch64"]

normal:
extends: .common
stage: normal
script:
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" $CONFIG --disable-verbose-batch && make

batch:
extends: .common
script:
- ./configure CXXFLAGS="-std=gnu++11" --enable-batch $CONFIG --disable-verbose-batch && make && make check
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-batch $CONFIG --disable-verbose-batch && make && make check
autobatch:
extends: .common
script:
- ./configure CXXFLAGS="-std=gnu++11" --enable-batch $CONFIG --disable-verbose-batch --enable-auto-batch=port && make && make check
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-batch $CONFIG --disable-verbose-batch --enable-auto-batch=port && make && make check
ip6:
extends: .common
script:
- ./configure CXXFLAGS="-std=gnu++11" --enable-ip6 --enable-json $CONFIG --disable-batch && make && make check
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-ip6 --enable-json $CONFIG --disable-batch && make && make check
mt:
extends: .common
script:
- ./configure CXXFLAGS="-std=gnu++11" --enable-user-multithread $CONFIG --disable-batch && make && make check

- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-user-multithread $CONFIG --disable-batch && make && make check
noclone:
extends: .common
script:
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-user-multithread $CONFIG --disable-clone && make && make check
fbatch:
extends: .common
script:
- ./configure CXXFLAGS="-std=gnu++11" --enable-user-multithread $CONFIG --disable-clone && make && make check
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-user-multithread --enable-flow --enable-batch $CONFIG --disable-verbose-batch && make

dpdk:
parallel:
matrix:
- DPDK_VERSION: ["20.11", "23.03"]
DPDK_CONFIG: ["--enable-dpdk-packet --enable-batch", "--enable-batch", "--disable-batch", "--enable-dpdk-pool"]
before_script:
- echo "Running global pre-install..."
- !reference [before_script]
- echo "Running local pre-install..."
- mkdir /dpdk
- pushd /dpdk
- export RTE_SDK=`pwd`/dpdk-$DPDK_VERSION;
export RTE_TARGET=x86_64-native-linuxapp-gcc;
export PKG_CONFIG_PATH=${RTE_SDK}/install/lib/x86_64-linux-gnu/pkgconfig/;
export LD_LIBRARY_PATH=${RTE_SDK}/install/lib/x86_64-linux-gnu/:${RTE_SDK}/install/lib/:$LD_LIBRARY_PATH;
if [ ! -e "$RTE_SDK/$RTE_TARGET/include/rte_version.h" ]; then
wget http://dpdk.org/browse/dpdk/snapshot/dpdk-$DPDK_VERSION.tar.gz &&
tar -zxf dpdk-$DPDK_VERSION.tar.gz &&
cd dpdk-$DPDK_VERSION ;
pip3 install meson ninja &&
meson -Dprefix=$(pwd)/install/ -Dmachine=default build &&
cd build && ( ninja && ninja install ) ; cd .. ; cd .. ;
fi;
ldconfig
- popd
script:
stage: io
parallel:
matrix:
- DPDK_VERSION: ["20.11", "23.03"]
DPDK_CONFIG: ["--enable-dpdk-packet --enable-batch", "--enable-batch", "--disable-batch", "--enable-dpdk-pool"]
before_script:
- echo "Running global pre-install..."
- !reference [before_script]
- echo "Running local pre-install..."
- mkdir /dpdk
- pushd /dpdk
- export RTE_SDK=`pwd`/dpdk-$DPDK_VERSION;
export RTE_TARGET=x86_64-native-linuxapp-gcc;
export PKG_CONFIG_PATH=${RTE_SDK}/install/lib/x86_64-linux-gnu/pkgconfig/;
export LD_LIBRARY_PATH=${RTE_SDK}/install/lib/x86_64-linux-gnu/:${RTE_SDK}/install/lib/:$LD_LIBRARY_PATH;
if [ ! -e "$RTE_SDK/$RTE_TARGET/include/rte_version.h" ]; then
wget http://dpdk.org/browse/dpdk/snapshot/dpdk-$DPDK_VERSION.tar.gz &&
tar -zxf dpdk-$DPDK_VERSION.tar.gz &&
cd dpdk-$DPDK_VERSION ;
pip3 install meson ninja &&
meson -Dprefix=$(pwd)/install/ -Dmachine=default build &&
cd build && ( ninja && ninja install ) ; cd .. ; cd .. ;
fi;
ldconfig
- popd
script:
- ls $PKG_CONFIG_PATH
- echo $LD_LIBRARY_PATH
- ./configure CXXFLAGS="-std=gnu++11" --enable-user-multithread --without-netmap --enable-dpdk ${DPDK_CONFIG} $CONFIG RTE_SDK=$RTE_SDK RTE_TARGET=$RTE_TARGET && make
- if [[ "$DPDK_CONFIG" != *"--enable-dpdk-pool"* ]] ; then make check ; fi
- ./configure $CONFIG_HOST CXXFLAGS="-std=gnu++11" --enable-user-multithread --without-netmap --enable-dpdk ${DPDK_CONFIG} $CONFIG RTE_SDK=$RTE_SDK RTE_TARGET=$RTE_TARGET && make
- if [[ "$DPDK_CONFIG" != *"--enable-dpdk-pool"* ]] && [[ "$DPDK_CONFIG" != *"--enable-dpdk-packet"* ]] ; then make check ; fi

netmap_single:
script:
- ./configure CXXFLAGS="-std=gnu++11" $CONFIG_NETMAP $CONFIG --disable-verbose-batch && make
netmap:
stage: io
parallel:
matrix:
- NETMAP_VERSION: ["11.1"]
CONFIG_NETMAP_MODE: ["--enable-netmap-pool --enable-zerocopy","--disable-netmap-pool --enable-zerocopy","--disable-netmap-pool --disable-zerocopy","--enable-flow --enable-batch --enable-netmap-pool --enable-zerocopy"]
script:
- ./configure CXXFLAGS="-std=gnu++11" --enable-user-multithread $CONFIG_NETMAP --enable-netmap-pool --enable-zerocopy $CONFIG --disable-verbose-batch && make
netmap_nopool:
script:
- ./configure CXXFLAGS="-std=gnu++11" --enable-user-multithread $CONFIG_NETMAP --disable-netmap-pool --enable-zerocopy $CONFIG --disable-verbose-batch && make && make check
netmap_nopool_nozc:
script:
- ./configure CXXFLAGS="-std=gnu++11" --enable-user-multithread $CONFIG_NETMAP --disable-netmap-pool --disable-zerocopy $CONFIG --disable-verbose-batch && make && make check
fbatch:
script:
- ./configure CXXFLAGS="-std=gnu++11" --enable-user-multithread --enable-flow --enable-batch $CONFIG --disable-verbose-batch && make
fnetmap:
script:
- ./configure CXXFLAGS="-std=gnu++11" --enable-user-multithread $CONFIG_NETMAP --enable-flow --enable-batch --enable-netmap-pool --enable-zerocopy $CONFIG --disable-verbose-batch && make
- if [ ! -e "netmap-$NETMAP_VERSION/sys/net/netmap.h" ] ; then wget https://github.com/luigirizzo/netmap/archive/v$NETMAP_VERSION.tar.gz && tar -xvf v$NETMAP_VERSION.tar.gz && ( cd netmap-$NETMAP_VERSION && cd LINUX && ./configure --no-drivers ; cd .. && cd .. ) ; fi
- ls -al
- if [ `sudo -n whoami` = "root" ] && command -v insmod ; then sudo insmod netmap-$NETMAP_VERSION/LINUX/netmap.ko && sudo chmod 666 /dev/netmap ; fi
- export CONFIG_NETMAP="--with-netmap=`pwd`/netmap-$NETMAP_VERSION/sys/"
- ./configure CXXFLAGS="-std=gnu++11" $CONFIG_NETMAP_MODE $CONFIG_NETMAP $CONFIG --disable-verbose-batch && make

cache:
paths:
- /dpdk
- netmap-$NETMAP_VERSION

before_script:
- sh deps.sh
- DEBIAN_FRONTEND=noninteractive sh deps.sh
- gcc -v
- if [ ! -e "netmap-$NETMAP_VERSION/sys/net/netmap.h" ] ; then wget https://github.com/luigirizzo/netmap/archive/v$NETMAP_VERSION.tar.gz && tar -xvf v$NETMAP_VERSION.tar.gz && ( cd netmap-$NETMAP_VERSION && cd LINUX && ./configure --no-drivers ; cd .. && cd .. ) ; fi
- ls -al
- if [ `sudo -n whoami` = "root" ] ; then sudo insmod netmap-$NETMAP_VERSION/LINUX/netmap.ko && sudo chmod 666 /dev/netmap ; fi
- export CONFIG_NETMAP="--with-netmap=`pwd`/netmap-$NETMAP_VERSION/sys/"
- if [ "$HOST" = "x86_64" ] ; then export CONFIG_HOST="--build x86_64-native-linuxapp-gcc" ; fi
- if [ "$HOST" = "aarch64" ] ; then apt-get -yqq install gcc-aarch64-linux-gnu && export CONFIG_HOST="--build aarch64-linux-gnu" ; fi
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Quick start (using DPDK for I/O)
* Build FastClick, with support for DPDK using the following command:

```
./configure --enable-dpdk --enable-intel-cpu --verbose --enable-select=poll CFLAGS="-O3" CXXFLAGS="-std=c++11 -O3" --disable-dynamic-linking --enable-poll --enable-bound-port-transfer --enable-local --enable-flow --disable-task-stats --disable-cpu-load
./configure CFLAGS="-O3" CXXFLAGS="-std=c++11 -O3" --enable-dpdk --enable-intel-cpu --disable-dynamic-linking --enable-bound-port-transfer --enable-flow --disable-task-stats --disable-cpu-load
make
```

Expand All @@ -32,7 +32,7 @@ FastClick "Light"
-----------------
FastClick, like Click comes with a lot of features that you may not use. The following options will improve performance further :
```
./configure --enable-dpdk --enable-intel-cpu --verbose --enable-select=poll CFLAGS="-O3" CXXFLAGS="-std=c++11 -O3" --disable-dynamic-linking --enable-poll --enable-bound-port-transfer --enable-local --enable-flow --disable-task-stats --disable-cpu-load --enable-dpdk-packet --disable-clone --disable-dpdk-softqueue
./configure CFLAGS="-O3" CXXFLAGS="-std=c++11 -O3" --enable-dpdk --enable-intel-cpu --disable-dynamic-linking --enable-bound-port-transfer --enable-flow --disable-task-stats --disable-cpu-load --enable-dpdk-packet --disable-clone --disable-dpdk-softqueue
make
```
* Disable task stats suppress statistics tracking for advanced task scheduling with e.g. BalancedThreadSched. With DPDK, it's polling anyway... And as far as scheduling is concerned, [RSS++](#rss) has a better solution.
Expand Down
4 changes: 2 additions & 2 deletions aclocal.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
# generated automatically by aclocal 1.17 -*- Autoconf -*-

# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# Copyright (C) 1996-2024 Free Software Foundation, Inc.

# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
Expand Down
11 changes: 10 additions & 1 deletion config-userlevel.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#undef HAVE_CLICK_LOAD

/* Define if Click can use a packet pool */
#undef ALLOW_CLICK_PACKET_POOL
#undef HAVE_ALLOW_CLICK_PACKET_POOL

/* Define if context system is enabled. */
#undef HAVE_CTX
Expand Down Expand Up @@ -116,12 +116,21 @@
/* Define if your C library contains large file support. */
#undef HAVE_LARGE_FILE_SUPPORT

/* Define if you have the <linux/ethtool.h> header file. */
#undef HAVE_LINUX_ETHTOOL_H

/* Define if you have the <linux/sockios.h> header file. */
#undef HAVE_LINUX_SOCKIOS_H

/* Define if you have the <linux/if_tun.h> header file. */
#undef HAVE_LINUX_IF_TUN_H

/* Define if you have the <linux/if_packet.h> header file. */
#undef HAVE_LINUX_IF_PACKET_H

/* Define if you have the <linux/netlink.h> header file. */
#undef HAVE_LINUX_NETLINK_H

/* Define if you have the madvise function. */
#undef HAVE_MADVISE

Expand Down
6 changes: 6 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
/* Define if you have the __has_trivial_copy compiler intrinsic. */
#undef HAVE___HAS_TRIVIAL_COPY

/* Define if you have the __is_trivially_copyable compiler intrinsic. */
#undef HAVE___IS_TRIVIALLY_COPYABLE

/* Define if you have the __sync_synchronize function. */
#undef HAVE___SYNC_SYNCHRONIZE

Expand Down Expand Up @@ -200,6 +203,9 @@
/* The size of a `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P

/* Define if SSE2 instruction is available. */
#undef HAVE_SSE2

/* Define if SSE4.2 instruction is available. */
#undef HAVE_SSE42

Expand Down
Loading

0 comments on commit 8020797

Please sign in to comment.