Hi Pau and Harald,
So sgsnemu is passing use_kernel=false, which makes the lib skip gtp-kernel functions
That is nice, I can play with that part quite nicely and take a look how the GGSN handles the switch between kernel and non-kernel GTP. Thanks for that! @Harald: In gtpnl.h there is int gtp_dev_create() and int gtp_dev_create_sgsn() So it seems there is a different dev create for the SGSN mode. And in the later one the role is set to "GTP_ROLE_SGSN" int gtp_dev_create(int dest_ns, const char *gtp_ifname, int fd0, int fd1) { return _gtp_dev_create(dest_ns, gtp_ifname, fd0, fd1, GTP_ROLE_GGSN); } EXPORT_SYMBOL(gtp_dev_create); int gtp_dev_create_sgsn(int dest_ns, const char *gtp_ifname, int fd0, int fd1) { return _gtp_dev_create(dest_ns, gtp_ifname, fd0, fd1, GTP_ROLE_SGSN); } EXPORT_SYMBOL(gtp_dev_create_sgsn); I just need to find the relevant part is sgsn-emu to see where these parts are invoked so I can make the modifications. Regards, Csaba <openbsc-request@lists.osmocom.org> ezt írta (időpont: 2022. dec. 24., Szo, 13:00):
Send OpenBSC mailing list submissions to openbsc@lists.osmocom.org
To subscribe or unsubscribe via email, send a message with subject or body 'help' to openbsc-request@lists.osmocom.org
You can reach the person managing the list at openbsc-owner@lists.osmocom.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of OpenBSC digest..."
Today's Topics:
1. Re: SGSNemu performance (Pau Espin Pedrol) 2. Re: SGSNemu performance (Harald Welte)
----------------------------------------------------------------------
Message: 1 Date: Fri, 23 Dec 2022 18:38:55 +0100 From: Pau Espin Pedrol <pespin@sysmocom.de> Subject: Re: SGSNemu performance To: Sipos Csaba <dchardware@gmail.com>, "openbsc-request@lists.osmocom.org" <openbsc@lists.osmocom.org>, laforge@osmocom.org Message-ID: <782d5c68-0393-e63a-ddbd-a78ca04256e0@sysmocom.de> Content-Type: text/plain; charset=UTF-8; format=flowed
Hi Csaba,
On 12/22/22 15:00, Sipos Csaba wrote:
Dear Harald,
Sorry to spam the openbsc list with this, but if you (or someone) can confirm if the Sgsn-emu part of Osmo-GGSN utilizing the kernel GTP module or not, that would be lovely.
sgsnemu is not using the kernel module, only osmo-ggsn has support for it so far.
See osmo-ggsn.git/./sgsnemu/sgsnemu.c line 1905 calling: """ if (tun_new((struct tun_t **)&tun, options.tun_dev_name, false, -1, -1)) """
See tun_new() function used by both osmo-ggsn and sgsnemu: """ int tun_new(struct tun_t **tun, const char *dev_name, bool use_kernel, int fd0, int fd1u) { """
So sgsnemu is passing use_kernel=false, which makes the lib skip gtp-kernel functions like gtp_kernel_create().
FYI, I was not able to pass more than 280Mbit and the sgsn-emu process was maxing out a single core. Based on this I suspect that it does not use the kernel GTP module. I have seen some commits that indicates preparation work for this feature, but it is unclear at least to me, if this was finished or not. In the Osmo-GGSN.cfg example config I can see the config option for kernel GTP, but not in the sgsn-emu.cfg example.
You could try passing use_kernel=true to tun_new(), and see how far you can get. Patches welcome.
Regards, Pau
-- - Pau Espin Pedrol <pespin@sysmocom.de> http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Director: Harald Welte
------------------------------
Message: 2 Date: Fri, 23 Dec 2022 18:47:57 +0100 From: Harald Welte <laforge@gnumonks.org> Subject: Re: SGSNemu performance To: Pau Espin Pedrol <pespin@sysmocom.de> Cc: Sipos Csaba <dchardware@gmail.com>, "openbsc-request@lists.osmocom.org" <openbsc@lists.osmocom.org> Message-ID: <Y6XpzZoYYdVxYKdb@nataraja> Content-Type: text/plain; charset=us-ascii
Hi Csaba and Pau,
On Fri, Dec 23, 2022 at 06:38:55PM +0100, Pau Espin Pedrol wrote:
You could try passing use_kernel=true to tun_new(), and see how far you can get. Patches welcome.
The GTP kernel module needs to be told if it operates in SGSN or GGSN mode.
grep for GTP_ROLE_SGSN in libgtpnl. I don't know all of the related functions off my head, but on the SGSN side you need to make sure to initialize the kernel GTP with GTP_ROLE_SGSN instead of GTP_ROLE_GGSN.
-- - Harald Welte <laforge@gnumonks.org> https://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6)
------------------------------
Subject: Digest Footer
_______________________________________________ OpenBSC mailing list -- openbsc@lists.osmocom.org To unsubscribe send an email to openbsc-leave@lists.osmocom.org
------------------------------
End of OpenBSC Digest, Vol 98, Issue 9 **************************************