Free5gc GTP Payload doesn't contain PDU session container in UL and DL

Hi @Simran,

You are not using right one, that latest version is 1.0.2

filename: /home/f5gcvm0/Muthu-f5gcvm0/Projects/git-Public/gtp5g/gtp5g.ko
alias: net-pf-16-proto-16-family-gtp5g
alias: rtnl-link-gtp5g
version: 1.0.2
description: Interface for 5G GTP encapsulated traffic
author: Muthuraman [email protected]
author: Yao-Wen Chang [email protected]
license: GPL
srcversion: 60A58A76F3C008A9E1403CB
depends: udp_tunnel
retpoline: Y
name: gtp5g
vermagic: 5.4.0-54-generic SMP mod_unload

You have to follow the steps like in gtp5g directory,

  1. make uninstall
  2. make clean
  3. make
  4. make install
  5. modinfo gtp5g

Hi @muthuramanecs03g,

I reinstalled free5gc, gtp5g and libgtp5gnl from the latest git commit.
Please find the details here, as well as pdr and far entries. I am still not getting PDU Session extension header in GTP payload.
Note: I have not made any entries QER entries. Do i need to make entries for “upfgtp” like this - 'Invalid extension header length or else' when running end to end test with QER · Issue #27 · PrinzOwO/gtp5g · GitHub

PS: Please update the tags on git repo, it is showing the latest tag for gtp5g v.0.3.2 and for libgtp5gnl v.0.3.1 so earlier i installed both v.0.3.1.

Hi @Simran,

I like to clarify something to you

First, you can get the latest code from the below link

Second, you didn’t confirm with me the version of gtp5g version like 1.0.2

I reinstalled free5gc, gtp5g and libgtp5gnl from the latest git commit.
Please find the details here, as well as pdr and far entries. I am still not getting PDU Session extension header in GTP payload.

Third, you don’t need to create upfgtp because it will be created by upf daemon. If exists then you have to delete it.

Note: I have not made any entries QER entries. Do i need to make entries for “upfgtp” like this - ‘Invalid extension header length or else’ when running end to end test with QER ·
Issue #27 · PrinzOwO/gtp5g · GitHub

Fourth, we like to complete some of the work before tagging.

PS: Please update the tags on git repo, it is showing the latest tag for gtp5g v.0.3.2 and for libgtp5gnl v.0.3.1 so earlier i installed both v.0.3.1.

I suspect you didn’t install properly,

You can open gtp5g/Makefile like below, you have to troubleshoot whether you successfully installed the right version of gtp5g.ko or not.

all:
make -C (INCLUDE_DIR) M=(PWD) modules

clean:
make -C (INCLUDE_DIR) M=(PWD) clean

install:
modprobe udp_tunnel
cp (MODULE_NAME).ko /lib/modules/`uname -r`/kernel/drivers/net depmod -a modprobe (MODULE_NAME)
echo “gtp5g” >> /etc/modules

uninstall:
rmmod (MODULE_NAME) rm -f /lib/modules/`uname -r`/kernel/drivers/net/(MODULE_NAME).ko
depmod -a
sed -zi “s/gtp5g\n//g” /etc/modules

Hi @muthuramanecs03g,

Sorry, I forgot to attach the file of “modinfo gtp5g”, I attached it now.

  1. I cloned the code from this repo only.
  2. I am not creating upfgtp interface, It is automatically created when i am running free5gc. Just wanted to clarify if any rules needs to be added or not.
    I followed the same steps to install gtp5g. Make file looks same.

Hi @Simran,

Please, get the output of ./tools/gtp5g-tunnel list qer

If the command didn’t work then lates gtp5g source code implemented /proc interface

  1. cd /proc/gtp5g
  2. sudo echo upfgtp 1 > ./pdr
  3. sudo cat ./pdr

-where, sudo echo #gtpinterface #pdrId > ./pdr

You will get the output like below
xyz:/proc/gtp5g$ sudo cat pdr
PDR:
ID : 1
Precedence: 255
OHR: 1
Role Addr4: 0x000000
PDI UE Addr4: 0x3c3c0001
PDI TEID: 0x000001
PDU GTPU Addr4: 0x10100364
FAR ID: 1
QER ID: 1
UL Drop Count: 0x0
DL Drop Count: 0x0

If nothing works then add debug code in gtp5g.c to trace encap of GTP-U header.

Hi @muthuramanecs03g,

There is no ouput for “./tools/gtp5g-tunnel list qer” command.
The output of cat ./pdr is as follows-
PDR:
ID : 1
Precedence: 255
OHR: 0
Role Addr4: 0x000000
PDI UE Addr4: 0x3c3c0001
PDI TEID: 0x000001
PDU GTPU Addr4: 0xc0a84a5d
FAR ID: 1
QER ID: 0
UL Drop Count: 0x0
DL Drop Count: 0x0

This has QER ID 0, need to debug this. while PFCP establishment message has QER ID 1.

Thank You for the response.

Hi @Simran,

I suspect the upf daemon didn’t update properly,

In your case, we can see QER in PFCP Session Est. Req but not in gtp5g.ko. It may be related to library third_party/libgtp5gnl.

Could you please do a clean installation like below

  1. Go to free5gc/NFs/upf/updk/src/third_party/libgtp5gnl

  2. make clean

  3. make

  4. Go to free5gc

  5. make clean

  6. make

Hi @muthuramanecs03g, @free5GC

I followed above steps but didn’t work out, so i was going though free5gc rule directory but for qer rules it was kept as todo.
found out that the free5gc/free5gc repo’s UPF function is not updated but free5gc/UPF repo is updated with qer rules.
So my question is - Do i need to clone all NFs separately ? I cloned this repo and followed the installed file to install -

Edit: I replaced the UPF function with the free5gc/upf repo, and it is working fine now. I request you to please sync free5gc/free5gc repo with updated NFs repo.
Thank you for your time.

@Simran

Please read free5gc wiki installation carefully.
(Installation · free5gc/free5gc Wiki · GitHub)
And you will find how to get the latest code:

(Alternatively) to install the latest nightly build:
cd ~/free5gc
git checkout main
git submodule sync
git submodule update --init --jobs `nproc`
git submodule foreach git checkout main
git submodule foreach git pull --jobs `nproc`