Harald,
As requested I've copied this to the osmocom-net-gprs(a)lists.osmocom.org
list.
I'm not sure if any of you are interested in this (or even if it's
useful as the "gtp5g" module is still 'work in progress'), however
if you are interested any comments ??.
I've attached a tarball (gtp-patches.tar.xz) with all the
patches and here are some notes:
1) This has been built and tested on Fedora 34 using
linux-5.14-rc4 kernel.
2) The first two kernel patches reinstall the current gtp
driver into manageable modules. You can build the kernel with just
these patches and should still be able to use libgtpnl, osmo-ggsn
etc. as no code changes.
3) The remaining three kernel patches install the services
from https://github.com/free5gc/gtp5g to DRV_VERSION "1.0.3a",
also update core services (where possible) to use common functions
e.g. gtp_dev_xmit().
It is possible to implement more common functions, but that
can be done if the patch series is of any use !!!
4) There are three possible Kconfig configuration options:
GTP_PDP only - GTP_PDR only - GTP_PDP and GTP_PDR
5) If GTP_PDP and GTP_PDR build selected, the basic tests
using osmo-ggsn or openggsn work using tests in [1] and the tests
from libgtp5gnl [2] (./run.sh SimpleUPTest & ULCLTest1) will also
run - provided the following tarball patch has been applied to
update [2]:
0001-libgtp5gnl-Update-to-match-new-linux-gtp.h-entries.patch
6) Be aware that apps/libs should now define their role
specifically (i.e. GTP_ROLE_SGSN, GTP_ROLE_RAN) and not default
thinking that '0' will always be GTP_ROLE_GGSN or GTP_ROLE_UPF.
Both libgtp*nl versions do this.
7) I've only limited test options so cannot guarantee all
will work !!
8) The kernel and tests have been built using Fedora 34.
When building the kernel with Fedora the gtp5g side will hang
when testing. This happens whether I build/load as described in the
https://github.com/free5gc/gtp5g README i.e. untouched by me, or with
my patches. To solve this issue I've commented out some code in
pdr.c pdr_context_free() with a comment:
/* FIXME - Stop crash when kernel built on Fedora 34 */
I'll try and fix this at some stage.
9) The original gtp5g driver 'struct net_device_ops' used:
.ndo_get_stats64 = ip_tunnel_get_stats64,
However this is deprecated so set to:
.ndo_get_stats64 = dev_get_tstats64,
10) Running checkpatch on the kernel patches will show plenty
of warning and check messages, however all 'errors' are fixed.
11) I've patches that add the LSM/SELinux services, however have
not included these as I guess still nfi.
[1] https://osmocom.org/projects/linux-kernel-gtp-u/wiki/Basic_Testing
[2] https://github.com/free5gc/libgtp5gnl
Richard Haines (5):
gtp: Delete current gtp driver
gtp: Split gtp driver into modules
gtp: Add support for PDR services - Part 1
gtp: Add support for PDR services - Part 2
gtp: Add support for PDR services - Part 3
drivers/net/Kconfig | 17 +-
drivers/net/Makefile | 2 +-
drivers/net/gtp.c | 1462 ----------------------------
drivers/net/gtp/Kconfig | 45 +
drivers/net/gtp/Makefile | 8 +
drivers/net/gtp/dev_core.c | 103 ++
drivers/net/gtp/encap.c | 406 ++++++++
drivers/net/gtp/far.c | 596 ++++++++++++
drivers/net/gtp/gtp_core.c | 243 +++++
drivers/net/gtp/include/dev_core.h | 59 ++
drivers/net/gtp/include/encap.h | 27 +
drivers/net/gtp/include/far.h | 64 ++
drivers/net/gtp/include/gtp_core.h | 105 ++
drivers/net/gtp/include/nl_core.h | 18 +
drivers/net/gtp/include/pdp.h | 53 +
drivers/net/gtp/include/pdp_ipv4.h | 31 +
drivers/net/gtp/include/pdr.h | 96 ++
drivers/net/gtp/include/pdr_ipv4.h | 49 +
drivers/net/gtp/include/proc_dbg.h | 85 ++
drivers/net/gtp/include/qer.h | 49 +
drivers/net/gtp/nl_core.c | 444 +++++++++
drivers/net/gtp/pdp.c | 578 +++++++++++
drivers/net/gtp/pdp_ipv4.c | 166 ++++
drivers/net/gtp/pdr.c | 1272 ++++++++++++++++++++++++
drivers/net/gtp/pdr_ipv4.c | 330 +++++++
drivers/net/gtp/proc_dbg.c | 384 ++++++++
drivers/net/gtp/qer.c | 463 +++++++++
include/net/gtp.h | 105 +-
include/uapi/linux/gtp.h | 200 +++-
include/uapi/linux/if_link.h | 5 +
30 files changed, 5981 insertions(+), 1484 deletions(-)
delete mode 100644 drivers/net/gtp.c
create mode 100644 drivers/net/gtp/Kconfig
create mode 100644 drivers/net/gtp/Makefile
create mode 100644 drivers/net/gtp/dev_core.c
create mode 100644 drivers/net/gtp/encap.c
create mode 100644 drivers/net/gtp/far.c
create mode 100644 drivers/net/gtp/gtp_core.c
create mode 100644 drivers/net/gtp/include/dev_core.h
create mode 100644 drivers/net/gtp/include/encap.h
create mode 100644 drivers/net/gtp/include/far.h
create mode 100644 drivers/net/gtp/include/gtp_core.h
create mode 100644 drivers/net/gtp/include/nl_core.h
create mode 100644 drivers/net/gtp/include/pdp.h
create mode 100644 drivers/net/gtp/include/pdp_ipv4.h
create mode 100644 drivers/net/gtp/include/pdr.h
create mode 100644 drivers/net/gtp/include/pdr_ipv4.h
create mode 100644 drivers/net/gtp/include/proc_dbg.h
create mode 100644 drivers/net/gtp/include/qer.h
create mode 100644 drivers/net/gtp/nl_core.c
create mode 100644 drivers/net/gtp/pdp.c
create mode 100644 drivers/net/gtp/pdp_ipv4.c
create mode 100644 drivers/net/gtp/pdr.c
create mode 100644 drivers/net/gtp/pdr_ipv4.c
create mode 100644 drivers/net/gtp/proc_dbg.c
create mode 100644 drivers/net/gtp/qer.c
--
2.31.1
Good afternoon,
I am investigating linux kernel GTP-U to build a 5G Core with this kernel but I understand that it does not support 5G and only works with 4G. Could you solve this doubt?
Thanks in advance,
Regards
This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavors to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
Este mensaje y los ficheros adjuntos pueden contener información confidencial destinada solamente a la(s) persona(s) mencionadas anteriormente y pueden estar protegidos por secreto profesional.
Si usted recibe este correo electrónico por error, gracias por informar inmediatamente al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos no se hace responsable por su contenido. Su contenido no constituye ningún compromiso para el grupo Atos, salvo ratificación escrita por ambas partes.
Aunque se esfuerza al máximo por mantener su red libre de virus, el emisor no puede garantizar nada al respecto y no será responsable de cualesquiera daños que puedan resultar de una transmisión de virus.
I've had an interesting situation with osmo-ggsn and kernel GTP module that I
wonder if someone could shed some light on.
I've set up osmo-ggsn (v1.7.1) on Debian 10. There are two ethernet interfaces
on the system, ens224 (for the Gn Interface) and ens256 (for the Gi
Interface).
Using the following ggsn configuration seems to work fine:
ggsn ggsn0
description Keith's Test APN
gtp state-dir /tmp
gtp bind-ip <ens224 IP>
gtp control-ip <ens224 IP>
apn keithtest
gtpu-mode tun
tun-device apn0
type-support v4
ip prefix dynamic 192.168.42.0/24
ip dns 0 <redacted>
ip dns 1 <redacted>
ip ifconfig 192.168.42.0/24
no shutdown
default-apn keithtest
no shutdown ggsn
I get the following tun device:
5: apn0: <POINTOPOINT,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN
group default qlen 500
link/none
inet 192.168.42.0/24 scope global apn0
valid_lft forever preferred_lft forever
inet6 fe80::fada:2e69:ad71:a61b/64 scope link stable-privacy
valid_lft forever preferred_lft forever
Traffic routes, all is good with the world.
However, if I change to using Kernel GTP, by changing the gtpu-mode to
"kernel-gtp", traffic will not route (and, yes, I have done modprobe gtp). After
some exploration, it appears the tun device is being created with an MTU of
zero which then, cannot pass traffic:
10: apn0: <POINTOPOINT,UP,LOWER_UP> mtu 0 qdisc noqueue state UNKNOWN group
default qlen 1000
link/none
inet 192.168.42.0/24 scope global apn0
valid_lft forever preferred_lft forever
Here are the logs:
Tue Apr 13 11:02:06 2021 DGGSN NOTICE <0002> ggsn.c:830 GGSN(ggsn0):
Successfully started
Tue Apr 13 11:02:06 2021 DGGSN INFO <0002> ggsn.c:186 APN(keithtest): Starting
Tue Apr 13 11:02:06 2021 DGGSN INFO <0002> ggsn.c:204 APN(keithtest): Opening
Kernel GTP device apn0
Tue Apr 13 11:02:06 2021 DGGSN NOTICE <0002> gtp-kernel.c:79 Initialized GTP
kernel mode (genl ID is 24)
Tue Apr 13 11:02:06 2021 DTUN NOTICE <0001> tun.c:217 GTP kernel configured
Tue Apr 13 11:02:06 2021 DGGSN INFO <0002> ggsn.c:236 APN(keithtest): Setting
tun IP address 192.168.42.0/24
Tue Apr 13 11:02:06 2021 DGGSN INFO <0002> ggsn.c:294 APN(keithtest): Creating
IPv4 pool 192.168.42.0/24
Tue Apr 13 11:02:06 2021 DGGSN INFO <0002> ggsn.c:168 APN(keithtest):
Blacklist tun IP 192.168.42.0/24
Tue Apr 13 11:02:06 2021 DGGSN NOTICE <0002> ggsn.c:325 APN(keithtest):
Successfully started
Note that if I manually alter the MTU, everything starts working again:
ip link set dev apn0 mtu 1500
So I can put this into a script and run it via ipup-script, and this works
fine. I just get the impression I shouldn't have to do this, and the system
should be setting the MTU, just as it does when I use tun mode.
Any thoughts on what I'm doing wrong here?
Cheers,
Keith
Hi, osmocom team members.
In order to have an internet connection in UE, we have run OsmoGGSN project
to set up GGSN. Also, SGSN is developed in our system.
At this step, UE connects to our network core and we can query to an
arbitrary site in the UE browser and we see the answer of the query without
any problem and everything is OK. But after about 30 or 40 seconds, UE
sends "Deactivate PDP Context Request" with SM Cause "SM Cause: Protocol
error, unspecified (111)" and the connection is reset and a new "Activate
PDP Context Request" is required. What is the reason and how can we solve
it?
--
*When there is much light, The shadow is deep...*
Hi all,
in recent months - after many years of no patches at all - the kernel
GTP driver has received significant interest in terms of contributions.
Given the presumed few users of the GTP tunnel driver, as well as the
tendency to use super ancient versions of software in the telecom world,
I think that the usual "let's have the users test -rcX kernels" approach
is unlikely going to work.
Within Osmocom (a group of FOSS projects implementing various cellular
standards, protocol stacks and network elements) we are used to rather
comprehensive functional test suites that we execute automatically
at least once per 24 hours. That is for the 99% of our software that is
userspace code.
For the kernel GTP code, it's of course not that simple, and we never
had any related testing so far.
In 2021, 5 years after the GTP kernel driver was merged mainline, we now
finally have set up some test jobs for kernel GTP.
Those jobs execute the same GGSN test suite that we run against the userspace
dataplane (handling GTP-U and GTP-C in a userspace program "osmo-ggsn"). The
only difference is that they configure osmo-ggsn to use the kernel GTP driver
for GTP-U.
Those tests are executed by jenkins, in the following jobs:
* ttcn3-ggsn-test-kernel-latest-torvalds
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-ggsn-test-kernel-l…
runs GGSN test suite against latest released osmo-ggsn version with
kernel-gtp of torvalds/linux.git test results at
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-ggsn-test-kernel-l…
(make sure to click "Expand All")
* ttcn3-ggsn-test-kernel-latest-torvalds
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-ggsn-test-kernel-l…
runs GGSN test suite against latest released osmo-ggsn version with
kernel-gtp of net-next.git
test results at https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-ggsn-test-kernel-l… (make sure to click "Expand All")
* ttcn3-ggsn-test-kernel-latest
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-ggsn-test-kernel-l…
runs GGSN test suite against latest released osmo-ggsn version with
kernel-gtp of Debian 10 kernel package
test results at https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-ggsn-test-kernel-l… (make sure to click "Expand All")
* ttcn3-ggsn-test-latest
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-ggsn-test-latest/
runs GGSN test suite against latest released osmo-ggsn version with
userspace GTP-U, not using any kernel GTP driver
test results at https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-ggsn-test-latest/t…
this serves as a base line that shows the test suite can fully pass,
and any failures in the aove are either bugs or lack of features (like
IPv6)
Contrary to the above jenkins jobs which all run automatically once
every 24 hours, there is also one jenkins job for manual execution:
* ttcn3-ggsn-test-kernel-git
https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-ggsn-test-kernel-g…
this is the same test suite and osmo-ggsn as above, but a developer
can manually trigger the job and specify
* URL of the kernel git repo to build
* branch of the kernel git repo to build
* whether to use osmo-ggsn latest tag or master
If any one is working on the kernel GTP driver and wants to get access
to triggering that jenkins job in order to test your patches/branches
before submission, please register an account at
https://jenkins.osmocom.org/ and contact me privately.
We are always happy about any contributions in terms of extending test
coverage. This could be done by e.g. adding jobs using other P-GW/GGSN
software than osmo-ggsn, or by extending the coverage of the test cases
of the test suite.
For anyone interested in more details, please see our redmine issue
https://osmocom.org/issues/3208 tracks the development of the tests.
The test suite source code (in TTCN-3) is at
https://git.osmocom.org/osmo-ttcn3-hacks/tree/ggsn_tests
with containerization + configs at
https://git.osmocom.org/docker-playground/tree/ttcn3-ggsn-test
I'd like to thank Oliver Smith <osmith(a)sysmocom.de> for creating the
above automatic test CI integration. Development of this was funded
by sysmocom (https://sysmocom.de/)
If you have any questions, please feel free to reach out to Oliver
and/or me.
Regards,
Harald
--
- Harald Welte <laforge(a)gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
Dear Osmocom community,
This topic has been past due for way too many years by now:
A re-organization of our major mailing lists.
I would like to propose the following changes. Pleas let me know if you
have any comments or feedback. I'm aware that renaming will mean people
have to update their mail filter rules, but I think we're long past the
point where the names of some of our lists started to confuse users.
== openbsc(a)lists.osmocom.org ==
* openbsc doesn't exist anymore since OsmoNITB, which is also obsolete
* does already cover anything "Osmocom CNI" related
* Proposed new name: osmocom-cni(a)lists.osmocom.org
== osmocom-net-gprs(a)lists.osmocom.org ==
This date back to when GPRS was a highly experimental add-on to our GSM
code base. This list should simply be merged with openbsc@ as osmocom-cni(a)lists.osmocom.org
== simtrace(a)lists.osmocom.org ==
Historically was created to cover only the simtrace project.
We should rename this to osmocom-simcard(a)lists.osmocom.org or something
along those lines.
I would like to suggest it covers
* SIMtrace / SIMtrace2 hardware + firmware
* pySim and related tools for working with SIM/USIM/UICC cards
* any other information / discussion related to SIM/USIM/UICC cards,
like OTA, ARA-M, ...
== osmodevcon(a)lists.osmocom.org ==
This has been a private list for people attending OsmoDevCon
I would like to open up list membership to the general public, and ensure
it also covers the new OsmoDevCall. We could then have discussions regarding
feedback, topics, scheduling, etc. on that list.
Maybe rename it to osmocom-events(a)lists.osmocom.org instead?
To differentiate: osmocom-event-orga(a)lists.osmocom.org should remain a
private list related to organizational / administrative topics of those
involved with organizing future events.
== nextepc(a)lists.osmocom.org ==
Should have been renamed to open5gs(a)lists.osmocom.org quite some time
ago, I simply forgot about it. My apologies.
--
- Harald Welte <laforge(a)osmocom.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)