lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2023

  • 1 participants
  • 2205 discussions
Change in osmo-bsc[master]: bts: ipa/osmo-bts/sysmobts: MO: add support for the second NSVC
by lynxis lazus 03 Jan '23

03 Jan '23
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30701 ) Change subject: bts: ipa/osmo-bts/sysmobts: MO: add support for the second NSVC ...................................................................... bts: ipa/osmo-bts/sysmobts: MO: add support for the second NSVC The second NSVC MO has been explicit skipped and never been interacted with. osmo-bts is already supporting it for a long time as well the PCU is supporting it at least since the NS2 code migration. Fixes the ttcn3 test case BTS_Tests.TC_pcu_socket_two_nsvc. Closes: OS#5835 Change-Id: I3486a7cc9a424602b73f8adc2fefce169213e46b --- M include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h M src/osmo-bsc/bts_ipaccess_nanobts.c M src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c M src/osmo-bsc/nm_bts_fsm.c M src/osmo-bsc/nm_gprs_nsvc_fsm.c M tests/nanobts_omlattr/nanobts_omlattr_test.c 6 files changed, 33 insertions(+), 19 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h b/include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h index d6933fc..dd97a0a 100644 --- a/include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h +++ b/include/osmocom/bsc/bts_ipaccess_nanobts_omlattr.h @@ -27,10 +27,11 @@ struct gsm_bts_sm; struct gsm_bts; struct gsm_bts_trx; +struct gsm_gprs_nsvc; struct msgb *nanobts_gen_set_bts_attr(struct gsm_bts *bts); struct msgb *nanobts_gen_set_nse_attr(struct gsm_bts_sm *bts_sm); struct msgb *nanobts_gen_set_cell_attr(struct gsm_bts *bts); -struct msgb *nanobts_gen_set_nsvc_attr(struct gsm_bts *bts); +struct msgb *nanobts_gen_set_nsvc_attr(struct gsm_gprs_nsvc *nsvc); struct msgb *nanobts_gen_set_radio_attr(struct gsm_bts *bts, struct gsm_bts_trx *trx); diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c index 338c83f..9f17359 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts.c @@ -184,9 +184,6 @@ break; case NM_OC_GPRS_NSVC: nsvc = obj; - /* We skip NSVC1 since we only use NSVC0 */ - if (nsvc->id == 1) - break; osmo_fsm_inst_dispatch(nsvc->mo.fi, NM_EV_STATE_CHG_REP, nsd); break; default: diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c index 0c08616..4fa69fb 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c @@ -206,21 +206,20 @@ return msgb; } -struct msgb *nanobts_gen_set_nsvc_attr(struct gsm_bts *bts) +struct msgb *nanobts_gen_set_nsvc_attr(struct gsm_gprs_nsvc *nsvc) { struct msgb *msgb; uint8_t buf[256]; - struct gsm_bts_sm *bts_sm = bts->site_mgr; msgb = msgb_alloc(1024, "nanobts_attr_bts"); if (!msgb) return NULL; /* 925 */ - buf[0] = bts_sm->gprs.nsvc[0].nsvci >> 8; - buf[1] = bts_sm->gprs.nsvc[0].nsvci & 0xff; + buf[0] = nsvc->nsvci >> 8; + buf[1] = nsvc->nsvci & 0xff; msgb_tl16v_put(msgb, NM_ATT_IPACC_NSVCI, 2, buf); - switch (bts_sm->gprs.nsvc->remote.u.sa.sa_family) { + switch (nsvc->remote.u.sa.sa_family) { case AF_INET6: /* all fields are encoded in network byte order */ /* protocol family */ @@ -228,20 +227,20 @@ /* padding */ buf[1] = 0x00; /* local udp port */ - osmo_store16be(bts_sm->gprs.nsvc[0].local_port, &buf[2]); + osmo_store16be(nsvc->local_port, &buf[2]); /* remote udp port */ - memcpy(&buf[4], &bts_sm->gprs.nsvc[0].remote.u.sin6.sin6_port, sizeof(uint16_t)); + memcpy(&buf[4], &nsvc->remote.u.sin6.sin6_port, sizeof(uint16_t)); /* remote ip address */ - memcpy(&buf[6], &bts_sm->gprs.nsvc[0].remote.u.sin6.sin6_addr, sizeof(struct in6_addr)); + memcpy(&buf[6], &nsvc->remote.u.sin6.sin6_addr, sizeof(struct in6_addr)); msgb_tl16v_put(msgb, NM_ATT_OSMO_NS_LINK_CFG, 6 + sizeof(struct in6_addr), buf); break; case AF_INET: /* remote udp port */ - memcpy(&buf[0], &bts_sm->gprs.nsvc[0].remote.u.sin.sin_port, sizeof(uint16_t)); + memcpy(&buf[0], &nsvc->remote.u.sin.sin_port, sizeof(uint16_t)); /* remote ip address */ - memcpy(&buf[2], &bts_sm->gprs.nsvc[0].remote.u.sin.sin_addr, sizeof(struct in_addr)); + memcpy(&buf[2], &nsvc->remote.u.sin.sin_addr, sizeof(struct in_addr)); /* local udp port */ - osmo_store16be(bts_sm->gprs.nsvc[0].local_port, &buf[6]); + osmo_store16be(nsvc->local_port, &buf[6]); msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_LINK_CFG, 8, buf); break; default: diff --git a/src/osmo-bsc/nm_bts_fsm.c b/src/osmo-bsc/nm_bts_fsm.c index 3d95b93..92728dc 100644 --- a/src/osmo-bsc/nm_bts_fsm.c +++ b/src/osmo-bsc/nm_bts_fsm.c @@ -143,8 +143,11 @@ bts->mo.get_attr_sent = false; /* Announce bts_features are available to related NSVC MOs */ - nsvc = gsm_bts_sm_nsvc_num(bts->site_mgr, 0); /* we only support NSVC0 so far */ - osmo_fsm_inst_dispatch(nsvc->mo.fi, NM_EV_FEATURE_NEGOTIATED, NULL); + for (int i = 0; i < ARRAY_SIZE(bts->site_mgr->gprs.nsvc); i++) { + nsvc = gsm_bts_sm_nsvc_num(bts->site_mgr, i); + if (nsvc) + osmo_fsm_inst_dispatch(nsvc->mo.fi, NM_EV_FEATURE_NEGOTIATED, NULL); + } /* Move FSM forward */ configure_loop(bts, &bts->mo.nm_state, allow_opstart); diff --git a/src/osmo-bsc/nm_gprs_nsvc_fsm.c b/src/osmo-bsc/nm_gprs_nsvc_fsm.c index e4a6338..5186082 100644 --- a/src/osmo-bsc/nm_gprs_nsvc_fsm.c +++ b/src/osmo-bsc/nm_gprs_nsvc_fsm.c @@ -90,6 +90,17 @@ } } +static bool has_valid_nsvc(struct gsm_gprs_nsvc *nsvc) +{ + switch (nsvc->remote.u.sa.sa_family) { + case AF_INET: + case AF_INET6: + return (nsvc->local_port > 0 && !osmo_sockaddr_is_any(&nsvc->remote)); + default: + return false; + } +} + static void configure_loop(struct gsm_gprs_nsvc *nsvc, const struct gsm_nm_state *state, bool allow_opstart) { struct msgb *msgb; @@ -110,8 +121,11 @@ nsvc->bts->nr); return; } + if (!has_valid_nsvc(nsvc)) + return; + nsvc->mo.set_attr_sent = true; - msgb = nanobts_gen_set_nsvc_attr(nsvc->bts); + msgb = nanobts_gen_set_nsvc_attr(nsvc); OSMO_ASSERT(msgb); abis_nm_ipaccess_set_attr(nsvc->bts, NM_OC_GPRS_NSVC, nsvc->bts->bts_nr, nsvc->id, 0xff, msgb->data, msgb->len); diff --git a/tests/nanobts_omlattr/nanobts_omlattr_test.c b/tests/nanobts_omlattr/nanobts_omlattr_test.c index bccd99e..3569327 100644 --- a/tests/nanobts_omlattr/nanobts_omlattr_test.c +++ b/tests/nanobts_omlattr/nanobts_omlattr_test.c @@ -88,7 +88,7 @@ printf("Testing nanobts_gen_set_nsvc_attr()...\n"); - msgb = nanobts_gen_set_nsvc_attr(bts); + msgb = nanobts_gen_set_nsvc_attr(&bts->site_mgr->gprs.nsvc[0]); printf("result= %s\n", osmo_hexdump_nospc(msgb->data, msgb->len)); printf("expected=%s\n", osmo_hexdump_nospc(expected, msgb->len)); OSMO_ASSERT(msgb_eq_data_print(msgb, expected, msgb->len)); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30701 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3486a7cc9a424602b73f8adc2fefce169213e46b Gerrit-Change-Number: 30701 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-upf[master]: tunend: choose local GTP addr by Network Instance IEs
by neels 03 Jan '23

03 Jan '23
neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-upf/+/30831 ) Change subject: tunend: choose local GTP addr by Network Instance IEs ...................................................................... tunend: choose local GTP addr by Network Instance IEs Implement handling of the Network Instance IEs from PFCP for tunend, like already done for tunmap. In 'tunend' cfg, allow indicating a local GTP address for both 'dev create' and 'dev use'. Select a GTP device by the local address the Network Instance IE in PFCP PDR indicates. Related: SYS#6192 Change-Id: I376c09bfc1844df1e61d2efac17561fac614858b --- M include/osmocom/upf/upf_gtp.h M src/osmo-upf/up_gtp_action.c M src/osmo-upf/upf_gtp.c M src/osmo-upf/upf_vty.c M tests/upf.vty 5 files changed, 64 insertions(+), 27 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/31/30831/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30831 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I376c09bfc1844df1e61d2efac17561fac614858b Gerrit-Change-Number: 30831 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-upf[master]: manual: explain new netinst cfg
by neels 03 Jan '23

03 Jan '23
neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-upf/+/30833 ) Change subject: manual: explain new netinst cfg ...................................................................... manual: explain new netinst cfg Related: SYS#6192 Change-Id: I1d636b8a6ae7628b4369734a45e60f2eaf437dce --- A doc/manuals/chapters/netinst.adoc M doc/manuals/osmoupf-usermanual.adoc 2 files changed, 58 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/33/30833/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I1d636b8a6ae7628b4369734a45e60f2eaf437dce Gerrit-Change-Number: 30833 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-upf[master]: manual: tweak 'running' for new netinst feature
by neels 03 Jan '23

03 Jan '23
neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-upf/+/30834 ) Change subject: manual: tweak 'running' for new netinst feature ...................................................................... manual: tweak 'running' for new netinst feature Related: SYS#6192 Change-Id: Iaa7af53aae72099283bb29ef0fc0eba03ae2f27d --- M doc/manuals/chapters/running.adoc 1 file changed, 15 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/34/30834/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30834 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Iaa7af53aae72099283bb29ef0fc0eba03ae2f27d Gerrit-Change-Number: 30834 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-upf[master]: manual: use 'tunend' and 'tunmap'
by neels 03 Jan '23

03 Jan '23
neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-upf/+/30832 ) Change subject: manual: use 'tunend' and 'tunmap' ...................................................................... manual: use 'tunend' and 'tunmap' Change-Id: I09a2fa28465945c98b58b4093c7d5de65e184645 --- M doc/manuals/chapters/overview.adoc M doc/manuals/chapters/running.adoc 2 files changed, 13 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/32/30832/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30832 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I09a2fa28465945c98b58b4093c7d5de65e184645 Gerrit-Change-Number: 30832 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-upf[master]: manual: some tweaks in overview
by neels 03 Jan '23

03 Jan '23
neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-upf/+/30836 ) Change subject: manual: some tweaks in overview ...................................................................... manual: some tweaks in overview Related: SYS#6192 Change-Id: I5a672d24eb12bd29d8684117b2658ad4cd89d682 --- M doc/manuals/chapters/overview.adoc 1 file changed, 13 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/36/30836/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30836 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I5a672d24eb12bd29d8684117b2658ad4cd89d682 Gerrit-Change-Number: 30836 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-upf[master]: manual: add charts explaining tunend and tunmap
by neels 03 Jan '23

03 Jan '23
neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-upf/+/30835 ) Change subject: manual: add charts explaining tunend and tunmap ...................................................................... manual: add charts explaining tunend and tunmap Change-Id: Ia0674c97eb0d8b5caeae988aefe523c5eee7318b --- M doc/manuals/chapters/overview.adoc 1 file changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/35/30835/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30835 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ia0674c97eb0d8b5caeae988aefe523c5eee7318b Gerrit-Change-Number: 30835 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-upf[master]: manual: use 'tunend' and 'tunmap'
by neels 03 Jan '23

03 Jan '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/30832 ) Change subject: manual: use 'tunend' and 'tunmap' ...................................................................... manual: use 'tunend' and 'tunmap' Change-Id: I09a2fa28465945c98b58b4093c7d5de65e184645 --- M doc/manuals/chapters/overview.adoc M doc/manuals/chapters/running.adoc 2 files changed, 13 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/32/30832/1 diff --git a/doc/manuals/chapters/overview.adoc b/doc/manuals/chapters/overview.adoc index 9cd7751..a6dc345 100644 --- a/doc/manuals/chapters/overview.adoc +++ b/doc/manuals/chapters/overview.adoc @@ -79,14 +79,14 @@ OsmoUPF does not support the complete PFCP feature set. It detects exactly two use cases that will provide service of actual GTP tunnels: -* GTP tunnel encapsulation/decapsulation: +* `tunend`: GTP tunnel encapsulation/decapsulation: - One Packet Detection Rule (PDR) accepts a GTP tunnel from the Access side with an Outer Header Removal. - This PDR uses a Forwarding Action Rule (FAR) for plain IP towards Core. - Another PDR accepts plain IP on a specific IP address from Core. - The second PDR uses a FAR towards Access with Outer Header Creation for GTP. -* GTP tunnel forwarding: +* `tunmap`: GTP tunnel forwarding: - One Packet Detection Rule (PDR) accepts a GTP tunnel from the Access side with an Outer Header Removal. - This PDR uses a Forwarding Action Rule (FAR) towards Core with an Outer diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index 0459541..ab7ab18 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -55,7 +55,7 @@ naming of individual tunnel rulesets does not collide: ---- -nft +tunmap table-name osmo-upf-2 ---- @@ -103,10 +103,10 @@ forwarding proxy, without encapsulation/decapsulation of GTP payloads. [[gtp_module]] -===== Configure Linux Kernel GTP Module +===== Configure Linux Kernel GTP Module for `tunend` -The Linux kernel GTP module is used for GTP encapsulation/decapsulation from/to -"the internet". +The Linux kernel GTP module is used for the `tunend` use case, i.e. GTP +encapsulation/decapsulation from/to "the internet". To use the GTP kernel module, OsmoUPF requires a GTP device, which is a dedicated network device provided by the Linux kernel, serving as GTP tunnel @@ -120,7 +120,7 @@ `apn23` on startup, which is also destroyed on program exit: ---- -gtp +tunend dev create apn23 ---- @@ -131,7 +131,7 @@ called `apn42`: ---- -gtp +tunend dev use apn42 ---- @@ -153,7 +153,7 @@ little sense to configure more than one GTP device. [[nftables]] -===== Configure Linux netfilter +===== Configure Linux netfilter for `tunmap` The Linux kernel netfilter module is used for GTP tunnel proxying, also known as tunnel forwarding or tunnel mapping. @@ -165,6 +165,9 @@ can be configured in `osmo-upf.cfg` like this: ---- -nft +tunmap table-name my-table-name ---- + +When running more than one osmo-upf process on a system, pick distinct table +names to avoid name collisions in the nftables reulesets. -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30832 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I09a2fa28465945c98b58b4093c7d5de65e184645 Gerrit-Change-Number: 30832 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-upf[master]: manual: explain new netinst cfg
by neels 03 Jan '23

03 Jan '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/30833 ) Change subject: manual: explain new netinst cfg ...................................................................... manual: explain new netinst cfg Change-Id: I1d636b8a6ae7628b4369734a45e60f2eaf437dce --- A doc/manuals/chapters/netinst.adoc M doc/manuals/osmoupf-usermanual.adoc 2 files changed, 58 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/33/30833/1 diff --git a/doc/manuals/chapters/netinst.adoc b/doc/manuals/chapters/netinst.adoc new file mode 100644 index 0000000..3add2bb --- /dev/null +++ b/doc/manuals/chapters/netinst.adoc @@ -0,0 +1,56 @@ +== Local GTP Addresses / Network Instance + +PFCP features optional Network Instance IEs, in which the CPF may tell the UPF which local network interface to use for +a PDR and/or a FAR. + +NOTE:: osmo-upf only evaluates the Network Instances configured in PDRs. Since osmo-upf always pairs a PDR+FAR with +another PDR+FAR in reverse direction, each side's PDR is sufficient. + +Network Instance IEs affect both the tunend and the tunmap use cases, as well as which local IP address is returned +in the PFCP response + +1. Look up Network Instance name in the osmo-upf.cfg `netinst` section, to obtain a local IP address. +2. Depending on use case: + - tunend: create the tunnel on a GTP device matching the local IP address, see <<gtp_module>>. + - tunmap: use the local IP address in the netfilter ruleset, see <<nftables>>. +3. Usually, return the chosen local IP address in the F-TEID IE of the Created PDR IE in the PFCP response. + +Network Instance configuration consists of {name, IP address} pairs. + +NOTE:: As soon as a `netinst` configuration is nonempty, receiving an undefined Network Instance name results in a PFCP +Reject response, and a log message on cateogry `session`, level `NOTICE`. To make the PFCP return success, add the +failing name to the `netinst` config. + +=== netinst for tunend + +The following configuration sets up two GTP devices for tunend, expecting Network Instance names `access1` or `access2`: + +---- +tunend + dev create apn1 10.0.0.1 + dev create apn2 10.0.0.2 +netinst + add access1 10.0.0.1 + add access2 10.0.0.2 +---- + +For example, if a Create PDR IE indicates Network Instance = `access1`, a GTP tunnel is set up in GTP kernel device +`apn1`. For `access2`, use `apn2`. + +=== netinst for tunmap + +For the tunmap use case, it is sufficient to configure `netinst` entries, without any addition to the `tunmap` section. +The following example configures various interfaces for tunmap, to match Network Instance names received in PFCP: + +---- +tunmap + table-name osmo-upf +netinst + add access1 10.0.0.1 + add access2 10.0.0.2 + add core1 9.0.0.1 + add core2 9.0.0.2 +---- + +For example, a Create PDR indicating a Network Instance of `core1` will result in an nftables rule that receives packets +on local address `9.0.0.1`. diff --git a/doc/manuals/osmoupf-usermanual.adoc b/doc/manuals/osmoupf-usermanual.adoc index 0e0e7b7..49e3e23 100644 --- a/doc/manuals/osmoupf-usermanual.adoc +++ b/doc/manuals/osmoupf-usermanual.adoc @@ -11,6 +11,8 @@ include::{srcdir}/chapters/running.adoc[] +include::{srcdir}/chapters/netinst.adoc[] + include::./common/chapters/vty.adoc[] include::./common/chapters/logging.adoc[] -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30833 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I1d636b8a6ae7628b4369734a45e60f2eaf437dce Gerrit-Change-Number: 30833 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-upf[master]: manual: tweak 'running' for new netinst feature
by neels 03 Jan '23

03 Jan '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/30834 ) Change subject: manual: tweak 'running' for new netinst feature ...................................................................... manual: tweak 'running' for new netinst feature Change-Id: Iaa7af53aae72099283bb29ef0fc0eba03ae2f27d --- M doc/manuals/chapters/running.adoc 1 file changed, 15 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/34/30834/1 diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index ab7ab18..0f56521 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -117,11 +117,12 @@ range that matches the UE IP addresses that are configured in GTP-C / PFCP. The following configuration placed in `osmo-upf.cfg` creates a GTP device called -`apn23` on startup, which is also destroyed on program exit: +`apn23` on startup of osmo-upf, which is destroyed on program exit. It listens +for GTP on local IP address `1.2.3.4`: ---- tunend - dev create apn23 + dev create apn23 1.2.3.4 ---- TODO:: `osmo-upf` is not yet able to configure this network device's IP address @@ -132,7 +133,7 @@ ---- tunend - dev use apn42 + dev use apn42 2.3.4.5 ---- GTP kernel devices can be managed manually using the `gtp-link` program @@ -146,11 +147,17 @@ $ osmo-upf -c osmo-upf.cfg ---- -NOTE:: It is possible to configure multiple GTP devices in `osmo-upf.cfg`, but -`osmo-upf` currently _only uses the first GTP device_ found in the -configuration. In the future, different devices may be used based on the Network -Instance IE passed in the PFCP Session messages (PDR/FAR). Until then, it makes -little sense to configure more than one GTP device. +It is possible to configure multiple GTP devices in `osmo-upf.cfg`. Depending on +the Network Instance name, osmo-upf creates tunnel endpoints on the GTP device +with a matching IP address: + +- The Network Instance IE in the PDR on the Access side determines the local IP + address to use, see <<netinst>>. +- This local IP address in turn determines the GTP device to use. + +It is possible for a GTP device to listen on ANY -- just omit the IP address in +the `dev` config. In this case, all Network Instance names will be served by +this GTP device. When using ANY, there should be exactly one GTP dev configured. [[nftables]] ===== Configure Linux netfilter for `tunmap` -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30834 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Iaa7af53aae72099283bb29ef0fc0eba03ae2f27d Gerrit-Change-Number: 30834 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.