This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/4811 WIP: Re-add support for kernel GTP-U acceleration When we branched off osmo-ggsn from the old openggsn code base, the support for kernel-gtp got temporarily removed. This patch re-introduces support for handling the GTP-U plane in the Linux kernel by means of libgtpnl + the kernel GTP-U driver. This only works for IPv4 at the moment, until the kernel GTP-U code gains IPv6 support. Kernel GTP currently also is restricted to a single APN per GSN. Change-Id: Ieb1bc1bd0d51d41947f0abd6ebbc2e5d102592d6 --- M ggsn/ggsn.c M ggsn/gtp-kernel.h 2 files changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/11/4811/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 8b576ab..999bc3a 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -255,12 +255,16 @@ apn->tun.tun->priv = apn; break; case APN_GTPU_MODE_KERNEL_GTP: - LOGPAPN(LOGL_ERROR, apn, "FIXME: Kernel GTP\n"); -#if 0 + if (apn->cfg.apn_type_mask & (APN_TYPE_IPv6|APN_TYPE_IPv4v6)) { + LOGPAPN(LOGL_ERROR, apn, "Kernel GTP currently supports only IPv4\n"); + apn_stop(apn, false); + return -1; + } + LOGPAPN(LOGL_ERROR, apn, "Setting up Kernel GTP\n"); /* use GTP kernel module for data packet encapsulation */ - if (gtp_kernel_init(gsn, &net.v4, prefixlen, net_arg) < 0) - goto err; -#endif + if (gtp_kernel_init(apn->ggsn->gsn, &apn->v4.cfg.ifconfig_prefix, apn->tun.cfg.ipup_script) < 0) { + return -1; + } break; default: LOGPAPN(LOGL_ERROR, apn, "Unknown GTPU Mode %d\n", apn->cfg.gtpu_mode); diff --git a/ggsn/gtp-kernel.h b/ggsn/gtp-kernel.h index 7ab51b1..ce57994 100644 --- a/ggsn/gtp-kernel.h +++ b/ggsn/gtp-kernel.h @@ -16,7 +16,7 @@ int gtp_kernel_enabled(void); #else -static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix, const char *ipup) +static inline int gtp_kernel_init(struct gsn_t *gsn, struct in46_prefix *prefix, const char *ipup) { SYS_ERR(DGGSN, LOGL_ERROR, 0, "ggsn compiled without GTP kernel support!\n"); return -1; -- To view, visit https://gerrit.osmocom.org/4811 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb1bc1bd0d51d41947f0abd6ebbc2e5d102592d6 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org>