pespin has submitted this change. ( https://gerrit.osmocom.org/c/upf-benchmark/+/39457?usp=email )
Change subject: trex-tunmap: Introduce setup to test osmo-upf with TRex ......................................................................
trex-tunmap: Introduce setup to test osmo-upf with TRex
Change-Id: If27d7f4e7a92d14377192eecbf77ab18d1d1032c --- A doc/manuals/chapters/osmo_upf_setup.adoc A doc/manuals/chapters/trex_setup.adoc M doc/manuals/upfbenchmark-usermanual.adoc A testsuites/gtplab-sysmo2017/trex-tunmap/README.md A testsuites/gtplab-sysmo2017/trex-tunmap/smf/0.gtp_flood.vty A testsuites/gtplab-sysmo2017/trex-tunmap/smf/configure.sh A testsuites/gtplab-sysmo2017/trex-tunmap/smf/osmo-upf-load-gen.cfg A testsuites/gtplab-sysmo2017/trex-tunmap/smf/run.sh A testsuites/gtplab-sysmo2017/trex-tunmap/trex/configure.sh A testsuites/gtplab-sysmo2017/trex-tunmap/trex/gtp_1pkt_simple.py A testsuites/gtplab-sysmo2017/trex-tunmap/trex/run.sh A testsuites/gtplab-sysmo2017/trex-tunmap/trex/trex_cfg.yaml A testsuites/gtplab-sysmo2017/trex-tunmap/upf/configure.sh A testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/eupf.yaml A testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/run.sh A testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/osmo-upf.cfg A testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/run.sh 17 files changed, 556 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/doc/manuals/chapters/osmo_upf_setup.adoc b/doc/manuals/chapters/osmo_upf_setup.adoc new file mode 100644 index 0000000..607cce9 --- /dev/null +++ b/doc/manuals/chapters/osmo_upf_setup.adoc @@ -0,0 +1,32 @@ +[[osmo_upf_setup]] +== osmo-upf setup + +[[osmo_upf_install]] +=== osmo-upf install + +#Install osmo-* dependencies: +---- +sudo apt install \ + build-essential gcc g++ make automake autoconf libtool pkg-config \ + libtalloc-dev libpcsclite-dev libortp-dev libsctp-dev libssl-dev libdbi-dev \ + libdbd-sqlite3 libsqlite3-dev libpcap-dev libc-ares-dev libgnutls28-dev \ + libsctp-dev sqlite3 libusb-1.0-0-dev libmnl-dev libsofia-sip-ua-glib-dev +---- + +Download osmo-dev: +---- +$ cd $HOME +$ git clone https://gitea.osmocom.org/osmocom/osmo-dev.git +---- + +Generate Makefile: +---- +$ cd ~/osmo-dev +$ ./gen_makefile.py -g default.opts iu.opts no_dahdi.opts -I -m make +---- + +Build & install osmo-upf: +---- +$ cd ~/osmo-dev/make/ +$ make osmo-upf +---- \ No newline at end of file diff --git a/doc/manuals/chapters/trex_setup.adoc b/doc/manuals/chapters/trex_setup.adoc new file mode 100644 index 0000000..398f2c3 --- /dev/null +++ b/doc/manuals/chapters/trex_setup.adoc @@ -0,0 +1,150 @@ +[[trex_setup]] +== TRex setup + +[[ofed_install]] +=== OFED install + +Install dependencies for OFED TRex: +---- +$ apt install libibverbs1 +---- + +# https://trex-tgn.cisco.com/trex/doc/trex_manual.html#_mellanox_connectx_4_su... +# https://trex-tgn.cisco.com/trex/doc/trex_appendix_mellanox.html +# https://network.nvidia.com/products/infiniband-drivers/linux/mlnx_ofed/ +# https://sources.debian.org/src/ofed-docs/1.4.2-1/OFED_Installation_Guide.txt... +#Install OFED (needed for Mellanox cards) EDIT: actually not, simply pass "--no-ofed-check" when running TRex... +#---- +#$ wget https://www.mellanox.com/downloads/ofed/MLNX_OFED-24.10-1.1.4.0/MLNX_OFED_SR... -O /tmp/OFED.tgz +# +#---- + +[[trex_install]] +=== TRex install + +# https://trex-tgn.cisco.com/trex/doc/trex_manual.html#_download_and_installat... +# https://github.com/cisco-system-traffic-generator/trex-core/wiki +# https://github.com/s5uishida/install_trex +# https://github.com/s5uishida/simple_measurement_of_upf_performance_6 + +Install dependencies: +---- +# apt install build-essential zlib1g-dev +---- + + +Download TRex: +---- +# cd /opt +# git clone https://github.com/cisco-system-traffic-generator/trex-core +---- + +Install newer scapy GTPU module, required to have GTPPDUSessionContainer available: +---- +# cd /tmp +# wget https://github.com/secdev/scapy/raw/refs/heads/master/scapy/contrib/gtp.py +# cp /tmp/gtp.py /opt/trex-core/scripts/external_libs/scapy-2.4.3/scapy/contrib/gtp.py +---- + + +Build TRex: +---- +# cd /opt/trex-core/linux_dpdk +/* manual step: Remove -Werror line from gcc_flags in trx-core/linux_dpdk/ws_main.py, due to https://github.com/cisco-system-traffic-generator/trex-core/pull/1087 */ +# ./b configure +# ./b build +---- + +Install TRex to /opt/trex: +---- +# cp -prL /opt/trex-core/scripts /opt/trex +---- + +[[trex_config]] +=== TRex configuration + +Show network devices: +---- +# cd /opt/trex/ +# ./dpdk_setup_ports.py -s + +Network devices using DPDK-compatible driver +============================================ +0000:02:00.0 'MT28800 Family [ConnectX-5 Ex]' drv=mlx5_core unused=igb_uio,vfio-pci,uio_pci_generic +0000:02:00.1 'MT28800 Family [ConnectX-5 Ex]' drv=mlx5_core unused=igb_uio,vfio-pci,uio_pci_generic + +Network devices using kernel driver +=================================== +0000:02:00.0 'MT28800 Family [ConnectX-5 Ex]' if=enp2s0f0np0 drv=mlx5_core unused=igb_uio,vfio-pci,uio_pci_generic +0000:02:00.1 'MT28800 Family [ConnectX-5 Ex]' if=enp2s0f1np1 drv=mlx5_core unused=igb_uio,vfio-pci,uio_pci_generic +0000:05:00.0 'I350 Gigabit Network Connection' if=eno1 drv=igb unused=igb_uio,vfio-pci,uio_pci_generic *Active* +0000:05:00.1 'I350 Gigabit Network Connection' if=eno2 drv=igb unused=igb_uio,vfio-pci,uio_pci_generic + +Other network devices +===================== +<none> +---- + +---- +# ./dpdk_setup_ports.py -t ++----+------+---------+-------------------+---------------------------------+-----------+-------------+----------+ +| ID | NUMA | PCI | MAC | Name | Driver | Linux IF | Active | ++====+======+=========+===================+=================================+===========+=============+==========+ +| 0 | -1 | 02:00.0 | ec:0d:9a:8a:27:52 | MT28800 Family [ConnectX-5 Ex] | mlx5_core | enp2s0f0np0 | | ++----+------+---------+-------------------+---------------------------------+-----------+-------------+----------+ +| 1 | -1 | 02:00.1 | ec:0d:9a:8a:27:53 | MT28800 Family [ConnectX-5 Ex] | mlx5_core | enp2s0f1np1 | | ++----+------+---------+-------------------+---------------------------------+-----------+-------------+----------+ +| 2 | -1 | 05:00.0 | ac:1f:6b:45:18:fe | I350 Gigabit Network Connection | igb | eno1 | *Active* | ++----+------+---------+-------------------+---------------------------------+-----------+-------------+----------+ +| 3 | -1 | 05:00.1 | ac:1f:6b:45:18:ff | I350 Gigabit Network Connection | igb | eno2 | | ++----+------+---------+-------------------+---------------------------------+-----------+-------------+----------+ +---- + +Generate config interactively: +---- +root@gtplab0:/etc/opt/trex# ./dpdk_setup_ports.py -i +By default, IP based configuration file will be created. Do you want to use MAC based config? (y/N) ++----+------+---------+-------------------+---------------------------------+-----------+-------------+----------+ +| ID | NUMA | PCI | MAC | Name | Driver | Linux IF | Active | ++====+======+=========+===================+=================================+===========+=============+==========+ +| 0 | -1 | 02:00.0 | ec:0d:9a:8a:27:52 | MT28800 Family [ConnectX-5 Ex] | mlx5_core | enp2s0f0np0 | | ++----+------+---------+-------------------+---------------------------------+-----------+-------------+----------+ +| 1 | -1 | 02:00.1 | ec:0d:9a:8a:27:53 | MT28800 Family [ConnectX-5 Ex] | mlx5_core | enp2s0f1np1 | | ++----+------+---------+-------------------+---------------------------------+-----------+-------------+----------+ +| 2 | -1 | 05:00.0 | ac:1f:6b:45:18:fe | I350 Gigabit Network Connection | igb | eno1 | *Active* | ++----+------+---------+-------------------+---------------------------------+-----------+-------------+----------+ +| 3 | -1 | 05:00.1 | ac:1f:6b:45:18:ff | I350 Gigabit Network Connection | igb | eno2 | | ++----+------+---------+-------------------+---------------------------------+-----------+-------------+----------+ +Please choose an even number of interfaces from the list above, either by ID, PCI or Linux IF +Stateful will use order of interfaces: Client1 Server1 Client2 Server2 etc. for flows. +Stateless can be in any order. +Enter list of interfaces separated by space (for example: 1 3) : 02:00.0 02:00.1 + +For interface 02:00.0, assuming loopback to its dual interface 02:00.1. +Putting IP 1.1.1.1, default gw 2.2.2.2 Change it?(y/N). +For interface 02:00.1, assuming loopback to its dual interface 02:00.0. +Putting IP 2.2.2.2, default gw 1.1.1.1 Change it?(y/N). +Print preview of generated config? (Y/n) +### Config file generated by dpdk_setup_ports.py ### + +- version: 2 + interfaces: ['02:00.0', '02:00.1'] + port_info: + - ip: 1.1.1.1 + default_gw: 2.2.2.2 + - ip: 2.2.2.2 + default_gw: 1.1.1.1 + + platform: + master_thread_id: 0 + latency_thread_id: 1 + dual_if: + - socket: 0 + threads: [2,3,4,5,6,7,8,9,10,11] + + +Save the config to file? (Y/n) +Default filename is /etc/trex_cfg.yaml +Press ENTER to confirm or enter new file: +Saved to /etc/trex_cfg.yaml. +---- diff --git a/doc/manuals/upfbenchmark-usermanual.adoc b/doc/manuals/upfbenchmark-usermanual.adoc index eace4dd..9445fa2 100644 --- a/doc/manuals/upfbenchmark-usermanual.adoc +++ b/doc/manuals/upfbenchmark-usermanual.adoc @@ -9,6 +9,10 @@
include::{srcdir}/chapters/overview.adoc[]
+include::{srcdir}/chapters/trex_setup.adoc[] + +include::{srcdir}/chapters/osmo_upf_setup.adoc[] + include::./common/chapters/vty.adoc[]
include::./common/chapters/logging.adoc[] diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/README.md b/testsuites/gtplab-sysmo2017/trex-tunmap/README.md new file mode 100644 index 0000000..17102e4 --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/README.md @@ -0,0 +1,5 @@ +---- +[ran](172.16.31.1) ----GTPU--> ()[upf] + | +[cn](172.16.31.100) <--GTPU--- ()[upf] +---- \ No newline at end of file diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/smf/0.gtp_flood.vty b/testsuites/gtplab-sysmo2017/trex-tunmap/smf/0.gtp_flood.vty new file mode 100644 index 0000000..79ef9bd --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/smf/0.gtp_flood.vty @@ -0,0 +1,128 @@ +# Establish N PFCP sessions for tunmap, and emit massive GTP traffic to the UPF +# to each established tunnel. +# +# osmo-upf-load-gen UPF "core" +# |GTP-ep -------GTP-----> GTP-ep|GTP-ep ----------IP------> GTP-ep +# |10.0.1.1 10.0.2.1|10.0.3.1 10.0.3.2 +# |10.0.1.2 +# ^ ^ ^ +# ^ | | | +# | | / configure by +# configure by from UPF 'gtp core' +# 'gtp ip' ("F-TEID=choose") + +# Configure one or more local GTP endpoints to emit GTP packets from. +# Established sessions will use these round-robin. +# These need to be local IP addresses for 'gtp flood' to work. +no gtp local bind +gtp local 172.16.32.2 +gtp local 172.16.32.3 +gtp local 172.16.32.4 +gtp local 172.16.32.5 +gtp local 172.16.32.6 +gtp local 172.16.32.7 +gtp local 172.16.32.8 +gtp local 172.16.32.9 +gtp local 172.16.32.10 +gtp local 172.16.32.11 +gtp local 172.16.32.12 +gtp local 172.16.32.13 +gtp local 172.16.32.14 +gtp local 172.16.32.15 +gtp local 172.16.32.16 +gtp local 172.16.32.17 +gtp local 172.16.32.18 +gtp local 172.16.32.19 +gtp local 172.16.32.20 +gtp local 172.16.32.21 +gtp local 172.16.32.22 +gtp local 172.16.32.23 +gtp local 172.16.32.24 +gtp local 172.16.32.25 +gtp local 172.16.32.26 +gtp local 172.16.32.27 +gtp local 172.16.32.28 +gtp local 172.16.32.29 +gtp local 172.16.32.30 +gtp local 172.16.32.31 +gtp local 172.16.32.32 +gtp local 172.16.32.33 +gtp local 172.16.32.34 +gtp local 172.16.32.35 +gtp local 172.16.32.36 +gtp local 172.16.32.37 +gtp local 172.16.32.38 +gtp local 172.16.32.39 +gtp local 172.16.32.40 +gtp local 172.16.32.41 +gtp local 172.16.32.42 +gtp local 172.16.32.43 +gtp local 172.16.32.44 +gtp local 172.16.32.45 +gtp local 172.16.32.46 +gtp local 172.16.32.47 +gtp local 172.16.32.48 +gtp local 172.16.32.49 +gtp local 172.16.32.50 +gtp local 172.16.32.51 +gtp local 172.16.32.60 +gtp local 172.16.32.61 +gtp local 172.16.32.62 +gtp local 172.16.32.63 +gtp local 172.16.32.64 +gtp local 172.16.32.65 +gtp local 172.16.32.66 +gtp local 172.16.32.67 +gtp local 172.16.32.68 +gtp local 172.16.32.69 +gtp local 172.16.32.70 +gtp local 172.16.32.71 +gtp local 172.16.32.72 +gtp local 172.16.32.73 +gtp local 172.16.32.74 +gtp local 172.16.32.75 +gtp local 172.16.32.76 +gtp local 172.16.32.77 +gtp local 172.16.32.78 +gtp local 172.16.32.79 +gtp local 172.16.32.80 +gtp local 172.16.32.81 +gtp local 172.16.32.82 +gtp local 172.16.32.83 +gtp local 172.16.32.84 +gtp local 172.16.32.85 +gtp local 172.16.32.86 +gtp local 172.16.32.87 +gtp local 172.16.32.88 +gtp local 172.16.32.89 +gtp local 172.16.32.90 +gtp local 172.16.32.91 +gtp local 172.16.32.92 +gtp local 172.16.32.93 +gtp local 172.16.32.94 +gtp local 172.16.32.95 +gtp local 172.16.32.96 +gtp local 172.16.32.97 +gtp local 172.16.32.98 +gtp local 172.16.32.99 +gtp local 172.16.32.100 +gtp local 172.16.32.101 + + +gtp core 172.16.31.200 + +ue ip range 192.168.1.2 192.168.254.254 + +# now associate with UPF and start N sessions. +pfcp-peer 172.16.31.2 + tx assoc-setup-req + sleep 1 + date + + n 50000 session create tunmap + wait responses + # All sessions established + date + +# give some time to gather counters before the tunnel is removed +sleep 999999 diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/smf/configure.sh b/testsuites/gtplab-sysmo2017/trex-tunmap/smf/configure.sh new file mode 100755 index 0000000..7f3c8af --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/smf/configure.sh @@ -0,0 +1,10 @@ +#!/bin/bash -xe + +# Interface towards UPF: +IFACE_UPF="enp2s0f0np0" +NUM_ENB=50 + +# Set up IP addresses: +for i in $(seq "0" "$((NUM_ENB - 1))"); do + sudo ip addr add "$(printf "172.16.31.1%02u/24" $i)" dev $IFACE_UPF || true; +done diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/smf/osmo-upf-load-gen.cfg b/testsuites/gtplab-sysmo2017/trex-tunmap/smf/osmo-upf-load-gen.cfg new file mode 100644 index 0000000..332fe26 --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/smf/osmo-upf-load-gen.cfg @@ -0,0 +1,12 @@ +log stderr + logging color 1 + logging print category-hex 0 + logging print category 1 + logging timestamp 0 + logging print file basename last + logging print level 1 + logging level set-all notice + !logging level lpfcp error + +local-addr 0.0.0.0 +listen diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/smf/run.sh b/testsuites/gtplab-sysmo2017/trex-tunmap/smf/run.sh new file mode 100755 index 0000000..fb65c2b --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/smf/run.sh @@ -0,0 +1,5 @@ +#!/bin/bash -xe + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +osmo-upf-load-gen -c "$SCRIPT_DIR/osmo-upf-load-gen.cfg" "$SCRIPT_DIR/0.gtp_flood.vty" diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/trex/configure.sh b/testsuites/gtplab-sysmo2017/trex-tunmap/trex/configure.sh new file mode 100755 index 0000000..e86e6c2 --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/trex/configure.sh @@ -0,0 +1,9 @@ +#!/bin/bash -xe + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +sudo sysctl -w vm.nr_hugepages=4096 + +sudo cp ${SCRIPT_DIR}/gtp_1pkt_simple.py /opt/trex/stl/gtp_1pkt_simple.py +cd /opt/trex +sudo /opt/trex/t-rex-64 -i --no-scapy-server --cfg "${SCRIPT_DIR}/trex_cfg.yaml" --no-ofed-check diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/trex/gtp_1pkt_simple.py b/testsuites/gtplab-sysmo2017/trex-tunmap/trex/gtp_1pkt_simple.py new file mode 100644 index 0000000..17e7ac8 --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/trex/gtp_1pkt_simple.py @@ -0,0 +1,72 @@ +from trex_stl_lib.api import * +from scapy.contrib.gtp import GTP_U_Header, GTPPDUSessionContainer +import argparse + +class STLS1(object): + + def calc_src_addr(self, addr_str, inc): + li = addr_str.split(".") + return li[0] + "." + li[1] + "." + li[2] + "." + str(int(li[3]) + inc) + + # One stream per GTPU eNB/CN IP address. + # Assumption: TEIDs are assigned sequentially (in pairs RAN/CN) over each IP + # address in the list, then continue again at the start of the list. + def create_stream (self, direction, addr_idx = 0): + if direction == 0: # UL + src_gtpu_ip = "172.16.32.2" + dst_gtp_ip = "172.16.31.2" + start_teid = 0x00000002 + else: # DL + src_gtpu_ip = "172.16.31.2" + dst_gtp_ip = "172.16.32.2" + start_teid = 0x00000001 + src_gtpu_ip = self.calc_src_addr(src_gtpu_ip, addr_idx) + start_teid = start_teid + 2*addr_idx + + # vm + vm = STLScVmRaw( [ STLVmFlowVar(name="gtpu_teid", + min_value=start_teid, + max_value=start_teid + 2*(self.num_streams - 1), + size=4, op="inc", step=2*self.num_addrs), + STLVmWrFlowVar(fv_name="gtpu_teid", + pkt_offset="GTP_U_Header.teid"), + STLVmFixChecksumHw(l3_offset="IP",l4_offset="UDP",l4_type=CTRexVmInsFixHwCs.L4_TYPE_UDP) + ] + ) + + return STLStream( + name = "gtpu-ul-%d-%s-%x" % (addr_idx, src_gtpu_ip, start_teid), + packet = + STLPktBuilder( + pkt = Ether()/IP(src=src_gtpu_ip,dst=dst_gtp_ip,version=4)/ + UDP(dport=2152,sport=2152)/ + GTP_U_Header(teid=start_teid)/ + GTPPDUSessionContainer(type=1,QFI=1)/ + IP(src="10.45.0.2",dst="192.168.16.152",version=4)/ + UDP()/ + (1400*'x'), + vm = vm + ), + mode = STLTXCont()) + + def get_streams (self, direction, tunables, **kwargs): + parser = argparse.ArgumentParser(description='Argparser for {}'.format(os.path.basename(__file__)), + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument('--num-streams', + type=int, + default=1, + help="The number of streams.") + parser.add_argument('--num-addrs', + type=int, + default=1, + help="The number of src IP addresses.") + args = parser.parse_args(tunables) + self.num_streams = args.num_streams + self.num_addrs = args.num_addrs + streams = [] + for addr_idx in range(self.num_addrs): + streams.append(self.create_stream(direction = 0, addr_idx = addr_idx)) + return STLProfile(streams).get_streams() + +def register(): + return STLS1() diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/trex/run.sh b/testsuites/gtplab-sysmo2017/trex-tunmap/trex/run.sh new file mode 100755 index 0000000..6573961 --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/trex/run.sh @@ -0,0 +1,23 @@ +#!/bin/bash -xe + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +# Number of GTPU streams to generate +NUM_STREAMS=50000 +# Number of src (RAN) GTPU IP addresses to be used: +NUM_ADDRS=100 + +# TODO: apply this automatically with "expect": +echo "To start the test, run: > reset; start -f ${SCRIPT_DIR}/gtp_1pkt_simple.py -p 0 -m 4000kpps -d 60 -t num-streams=${NUM_STREAMS},num-addrs=${NUM_ADDRS}" +echo "Once the test finishes, run: > stats" + +# Needs to be executed from /opt/trex ... +cd /opt/trex/ +/opt/trex/trex-console + +# Troubleshooting: +# > portattr +# > service +# > ping -p 0 -d 172.16.32.1 -n 3 +# > ping -p 1 -d 172.16.31.2 -n 3 +# > service --off diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/trex/trex_cfg.yaml b/testsuites/gtplab-sysmo2017/trex-tunmap/trex/trex_cfg.yaml new file mode 100644 index 0000000..47e0527 --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/trex/trex_cfg.yaml @@ -0,0 +1,23 @@ +### Config file generated by dpdk_setup_ports.py ### + +- version: 2 + interfaces: ['02:00.0', '02:00.1'] + c: 4 + rx_desc: 4096 + tx_desc: 4096 + port_info: + - ip: 172.16.32.2 + default_gw: 172.16.32.1 + - ip: 172.16.31.200 + default_gw: 172.16.31.2 + + platform: + master_thread_id: 0 + latency_thread_id: 1 + dual_if: + - socket: 0 + threads: [2,3,4,5,6,7,8,9,10,11] + + memory: + mbuf_2048: 128000 + diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/upf/configure.sh b/testsuites/gtplab-sysmo2017/trex-tunmap/upf/configure.sh new file mode 100755 index 0000000..58792fe --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/upf/configure.sh @@ -0,0 +1,32 @@ +#!/bin/bash -xe + +# Interface towards UPF: +IFACE_RAN="enp2s0f0np0" +IFACE_CN="enp2s0f1np1" + +# Disable ethernet flow control: +sudo ethtool -A $IFACE_RAN autoneg off rx off tx off +sudo ethtool -A $IFACE_CN autoneg off rx off tx off +# Increase NIC buffers: +sudo ethtool -G $IFACE_RAN rx 8192 tx 8192 +sudo ethtool -G $IFACE_CN rx 8192 tx 8192 + +# Enable IP forwarding: +sudo sysctl -w net.ipv4.ip_forward=1 + +# Increase UDP buffer memory: +sudo sysctl -w net.ipv4.udp_mem="763563 900000000 1000000000" +sudo sysctl -w net.core.optmem_max=16000000 +sudo sysctl -w net.core.rmem_max=2000000000 +sudo sysctl -w net.core.rmem_default=2000000000 +sudo sysctl -w net.core.wmem_max=2000000000 +sudo sysctl -w net.core.wmem_default=2000000000 +sudo sysctl -w net.core.netdev_max_backlog=2000 +sudo sysctl -w net.core.netdev_budget=600 + +# Set up UPF address: +sudo ip addr add 172.16.31.2/24 dev $IFACE_RAN || true; +sudo ip addr add 172.16.32.1/24 dev $IFACE_CN || true; + +# TRex doesn't answer ARPs, so we need to set up the CN-side peer: +sudo ip neigh add 172.16.31.200 lladdr ec:0d:9a:8a:27:53 nud permanent dev $IFACE_RAN || true; diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/eupf.yaml b/testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/eupf.yaml new file mode 100644 index 0000000..7b77a4a --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/eupf.yaml @@ -0,0 +1,14 @@ +interface_name: [enp2s0f0np0, enp2s0f1np1] +xdp_attach_mode: native +api_address: :8080 +pfcp_address: 172.16.31.2:8805 +pfcp_node_id: 172.16.31.2 +metrics_address: :9090 +n3_address: 172.16.31.2 +n9_address: 172.16.32.1 +qer_map_size: 1000000 +far_map_size: 1000000 +pdr_map_size: 1000000 +feature_ueip: false +feature_ftup: true +teid_pool: 1000000 diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/run.sh b/testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/run.sh new file mode 100755 index 0000000..26a1931 --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/run.sh @@ -0,0 +1,5 @@ +#!/bin/bash -xe + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +sudo GIN_MODE=release eupf --config "$SCRIPT_DIR/eupf.yaml" diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/osmo-upf.cfg b/testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/osmo-upf.cfg new file mode 100644 index 0000000..0a04c33 --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/osmo-upf.cfg @@ -0,0 +1,27 @@ +log stderr + logging filter all 1 + logging color 1 + logging print category-hex 0 + logging print category 1 + logging timestamp 0 + logging print file basename last + logging print level 1 + logging level set-all notice + logging level set-all info + logging level session debug + logging level nft debug + logging level gtp debug + logging level set-all error + +line vty + bind 127.0.0.1 +ctrl + bind 127.0.0.1 + +timer pfcp x24 5000 +timer nft x32 100 +timer nft x33 100 +pfcp + local-addr 172.16.31.2 +tunend + dev create gtp-echo diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/run.sh b/testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/run.sh new file mode 100755 index 0000000..41f4616 --- /dev/null +++ b/testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/run.sh @@ -0,0 +1,5 @@ +#!/bin/bash -xe + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +sudo osmo-upf -c "$SCRIPT_DIR/osmo-upf.cfg"