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-ttcn3-hacks[master]: PFCP_Templates: add Session Modification templates
by neels 11 Jan '23

11 Jan '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30927 ) Change subject: PFCP_Templates: add Session Modification templates ...................................................................... PFCP_Templates: add Session Modification templates Related: SYS#6192 SYS#5599 Change-Id: Id9ca1eff44a4759d25b31f34ededfcc6074517d5 --- M library/PFCP_Templates.ttcn 1 file changed, 76 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/27/30927/1 diff --git a/library/PFCP_Templates.ttcn b/library/PFCP_Templates.ttcn index caab09d..a0d5235 100644 --- a/library/PFCP_Templates.ttcn +++ b/library/PFCP_Templates.ttcn @@ -372,13 +372,33 @@ } } +template (value) Update_Forwarding_Parameters ts_PFCP_Update_Forwarding_Parameters( + e_PFCP_Dest_Iface dest_iface, + template (omit) Outer_Header_Creation outer_header_creation := omit + ) := { + elementIdentifier := 11, + lengthIndicator := 0, + grouped_ie := { + destination_interface := ts_PFCP_Destination_Interface(dest_iface), + pdn_Instance := omit, + redirect_information := omit, + outer_header_creation := outer_header_creation, + transport_level_marking := omit, + forwarding_policy := omit, + header_enrichment := omit, + pfcpSMReq_flags := omit, + traffic_endpoint_id := omit + } +} + template (value) FAR_ID ts_PFCP_FAR_ID(LIN4_BO_LAST far_id) := { elementIdentifier := 108, lengthIndicator := 0, id_value := far_id } -template (value) Create_FAR ts_PFCP_Create_FAR(LIN4_BO_LAST far_id, template (value) Apply_Action aa, Forwarding_Parameters fp) := { +template (value) Create_FAR ts_PFCP_Create_FAR(LIN4_BO_LAST far_id, template (value) Apply_Action aa, + template (omit) Forwarding_Parameters fp) := { elementIdentifier := 3, lengthIndicator := 0, grouped_ie := { @@ -390,6 +410,19 @@ } } +template (value) Update_FAR ts_PFCP_Update_FAR(LIN4_BO_LAST far_id, template (value) Apply_Action aa, + template (omit) Update_Forwarding_Parameters fp) := { + elementIdentifier := 10, + lengthIndicator := 0, + grouped_ie := { + far_id := ts_PFCP_FAR_ID(far_id), + apply_action := aa, + forwarding_parameters := fp, + duplicating_parameters := omit, + bar_id := omit + } +} + template (value) PDR_ID ts_PFCP_PDR_ID(OCT2 pdr_id) := { elementIdentifier := 56, lengthIndicator := 0, @@ -494,6 +527,40 @@ return t; } +function ts_PFCP_Session_Mod_Req(OCT8 up_seid, Update_FAR update_far) + return template (value) PDU_PFCP { + var template (value) PDU_PFCP t := ts_PDU_PFCP(seid := up_seid); + t.message_body := { + pfcp_session_modification_request := { + f_seid := omit, + remove_PDR_list := omit, + remove_FAR_list := omit, + remove_URR_list := omit, + remove_QER_list := omit, + remove_BAR := omit, + remove_traffic_endpoint := omit, + create_PDR_list := omit, + create_FAR_list := omit, + create_URR_list := omit, + create_QER_list := omit, + create_BAR := omit, + create_traffic_endpoint := omit, + update_PDR_list := omit, + update_FAR_list := { update_far }, + update_URR_list := omit, + update_QER_list := omit, + update_BAR := omit, + update_traffic_endpoint := omit, + pfcpSMReq_flags := omit, + query_URR_list := omit, + node_list := omit, + up_inactivity_timer := omit, + querry_urr_reference := omit + } + }; + return t; +} + function tr_PFCP_Session_Mod_Req(template (present) OCT8 seid := ?) return template (present) PDU_PFCP { var template PDU_PFCP t := tr_PDU_PFCP(seid); t.message_body := { @@ -520,6 +587,14 @@ return t; } +function tr_PFCP_Session_Mod_Resp(template (present) OCT8 seid := ?) return template (present) PDU_PFCP { + var template PDU_PFCP t := tr_PDU_PFCP(seid); + t.message_body := { + pfcp_session_modification_response := ? + }; + return t; +} + function ts_PFCP_Session_Del_Req(OCT8 seid) return template (value) PDU_PFCP { var template (value) PDU_PFCP t := ts_PDU_PFCP(seid := seid); t.message_body := { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30927 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id9ca1eff44a4759d25b31f34ededfcc6074517d5 Gerrit-Change-Number: 30927 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: PFCP: add support for Network Instance IE
by neels 11 Jan '23

11 Jan '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30928 ) Change subject: PFCP: add support for Network Instance IE ...................................................................... PFCP: add support for Network Instance IE Related: SYS#6192 Change-Id: Iba8d423cd91e73ea40139a5b58c4e22f1a741dc1 --- M library/PFCP_Templates.ttcn 1 file changed, 24 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/28/30928/1 diff --git a/library/PFCP_Templates.ttcn b/library/PFCP_Templates.ttcn index a0d5235..a5f83ec 100644 --- a/library/PFCP_Templates.ttcn +++ b/library/PFCP_Templates.ttcn @@ -274,15 +274,34 @@ choose_id := choose_id } +/* Convert plain Network Instance name to encoded (length-byte + "name") format. + * Works only for single-label names, i.e. no dots in the name. */ +private function f_netinst_str_to_qname(charstring name) return octetstring +{ + var octetstring qname := int2oct(lengthof(name), 1) & char2oct(name); + return qname; +} + +function ts_PFCP_Network_Instance(charstring netinst_name) return Network_Instance +{ + var Network_Instance netinst := { + elementIdentifier := 22, + lengthIndicator := 0, + pdn_instance := f_netinst_str_to_qname(netinst_name) + } + return netinst; +} + template (value) PDI_IE ts_PFCP_PDI(e_PFCP_Src_Iface src_iface, template (omit) F_TEID local_F_TEID := omit, - template (omit) UE_IP_Address ue_addr_v4 := omit) := { + template (omit) UE_IP_Address ue_addr_v4 := omit, + template (omit) Network_Instance network_instance := omit) := { elementIdentifier := 2, lengthIndicator := 0, grouped_ie := { source_interface := ts_PFCP_Src_Iface(src_iface), local_F_TEID := local_F_TEID, - pdn_instance := omit, + pdn_instance := network_instance, ue_ip_address := ue_addr_v4, traffic_endpoint_id := omit, sdf_filter_list := omit, @@ -356,13 +375,14 @@ template (value) Forwarding_Parameters ts_PFCP_Forwarding_Parameters( e_PFCP_Dest_Iface dest_iface, - template (omit) Outer_Header_Creation outer_header_creation := omit + template (omit) Outer_Header_Creation outer_header_creation := omit, + template (omit) Network_Instance network_instance := omit ) := { elementIdentifier := 4, lengthIndicator := 0, grouped_ie := { destination_interface := ts_PFCP_Destination_Interface(dest_iface), - pdn_Instance := omit, + pdn_Instance := network_instance, redirect_information := omit, outer_header_creation := outer_header_creation, transport_level_marking := omit, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30928 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iba8d423cd91e73ea40139a5b58c4e22f1a741dc1 Gerrit-Change-Number: 30928 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: upf: test Session Mod, test Network Instance
by neels 11 Jan '23

11 Jan '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30929 ) Change subject: upf: test Session Mod, test Network Instance ...................................................................... upf: test Session Mod, test Network Instance Add tests and enhance the upf test suite to be closer to real world usage: - properly verify the F-TEIDs chosen by osmo-upf. - add tests with two-step session creation, i.e. with a Session Establishment followed by Session Modification indicating the remote F-TEID to use on the core side, as is the usual case. - Add module parameters for network instances to use in the test; dynamically configure osmo-upf's "netinst" config via VTY. - pass Network Instance in Create PDR, verify that osmo-upf returns the matching GTP IP addresses in Created PDR. Related: SYS#6192 SYS#5599 Change-Id: I440466f1cc9689391869ac2579a4497ef6008adb --- M upf/CPF_ConnectionHandler.ttcn M upf/UPF_Tests.ttcn M upf/osmo-upf.cfg 3 files changed, 442 insertions(+), 33 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/29/30929/1 diff --git a/upf/CPF_ConnectionHandler.ttcn b/upf/CPF_ConnectionHandler.ttcn index 25f99b9..f983ff0 100644 --- a/upf/CPF_ConnectionHandler.ttcn +++ b/upf/CPF_ConnectionHandler.ttcn @@ -47,11 +47,6 @@ return int2oct(g_next_seid_state, 8); } -function f_next_local_teid() runs on CPF_ConnHdlr return OCT4 { - g_next_local_teid_state := g_next_local_teid_state + 1; - return int2oct(g_next_local_teid_state, 4); -} - function f_next_remote_teid() runs on CPF_ConnHdlr return OCT4 { g_next_remote_teid_state := g_next_remote_teid_state + 1; return int2oct(g_next_remote_teid_state, 4); diff --git a/upf/UPF_Tests.ttcn b/upf/UPF_Tests.ttcn index b5c65d2..5db143a 100644 --- a/upf/UPF_Tests.ttcn +++ b/upf/UPF_Tests.ttcn @@ -42,6 +42,11 @@ charstring mp_pfcp_ip_upf := "127.0.0.1"; charstring mp_pfcp_ip_local := "127.0.0.2"; + charstring mp_netinst_access_ip_1 := "127.0.1.1"; + charstring mp_netinst_access_ip_2 := "127.0.1.2"; + charstring mp_netinst_core_ip_1 := "127.0.2.1"; + charstring mp_netinst_core_ip_2 := "127.0.2.2"; + /* When testing with gtp mockup, actions will not show. */ boolean mp_verify_gtp_actions := false; } @@ -162,13 +167,60 @@ GTP_Action gtp } +/* _r and _l means 'remote' and 'local', from the perspective of the osmo-upf process. */ +type record GTP_Action_tunend { + /* the PDR Id detecting packets from this side */ + integer pdr_id, + /* IP packets arriving from this side are arriving on ip_l */ + charstring ip_l, + + /* the FAR Id forwarding packets to this side */ + integer far_id +} + +/* _r and _l means 'remote' and 'local', from the perspective of the osmo-upf process. */ +type record GTP_Action_tun { + /* the PDR Id detecting packets from this side */ + integer pdr_id, + /* GTP arriving from this side is arriving on gtp_ip_l with teid_l */ + charstring gtp_ip_l, + OCT4 teid_l, + + /* the FAR Id forwarding packets to this side */ + integer far_id, + /* GTP going out to this side should be sent to gtp_ip_r with teid_r */ + charstring gtp_ip_r, + OCT4 teid_r +} + +type union GTP_Action_core { + /* For kind = "tunend", the local IP that the UE has on 'the internet' */ + GTP_Action_tunend tunend, + /* For kind = "tunmap", the second GTP tunnel */ + GTP_Action_tun tunmap +} + +/* State of what GTP functionality osmo-upf should put in place, after a PFCP request was ACKed by it. + * _r and _l means 'remote' and 'local', from the perspective of the osmo-upf process. + * + * tunend: + * Access UPF Core + * GTP-r:127.0.0.2,0x1 <-FAR-1-- | 192.168.0.1 <-PDR-1-- + * --PDR-2-> GTP-l:127.0.0.1,0x2 | --FAR-2-> (IP destination is in each GTP payload) + * + * tunmap: + * Access UPF Core + * GTP-r:127.0.0.2,0x1 <-FAR-1-- | 127.0.0.1,0x1 <-PDR-1-- + * --PDR-2-> GTP-l:127.0.0.1,0x2 | --FAR-2-> GTP-r:127.0.0.3,0x2 + */ type record GTP_Action { /* kind = ("tunend"|"tunmap") */ charstring kind, - charstring gtp_access_ip, - OCT4 teid_access_r, - OCT4 teid_access_l, - charstring core_ip, + /* The access side GTP tunnel. (The 'Access' side is always GTP.) */ + GTP_Action_tun access, + /* The core side GTP tunnel (tunmap) or local IP (tunend) */ + GTP_Action_core core, + /* Reference to the PFCP Session that created this GTP action: PFCP session's F-SEID as seen from osmo-upf */ charstring pfcp_peer, OCT8 seid_l }; @@ -176,17 +228,26 @@ type record of GTP_Action GTP_Action_List; private function f_parse_gtp_action(out GTP_Action ret, charstring str) return boolean { + /* Parse a string like + * "GTP:tunend GTP-access-r:127.0.0.2 TEID-access-r:0x94f0001 TEID-access-l:0x1 IP-core-l:192.168.44.241 PFCP-peer:127.0.0.2 SEID-l:0x1 PDR:1,2" + */ var GTP_Action a; if (not f_get_name_val(a.kind, str, "GTP")) { return false; } - if (not f_get_name_val(a.gtp_access_ip, str, "GTP-access")) { + if (not f_get_name_val(a.access.gtp_ip_r, str, "GTP-access-r")) { return false; } - if (not f_get_name_val_oct4(a.teid_access_r, str, "TEID-r")) { + if (not f_get_name_val_oct4(a.access.teid_r, str, "TEID-access-r")) { return false; } - if (not f_get_name_val_oct4(a.teid_access_l, str, "TEID-l")) { + if (not f_get_name_val(a.access.gtp_ip_l, str, "GTP-access-l")) { + return false; + } + if (not f_get_name_val_oct4(a.access.teid_l, str, "TEID-access-l")) { + return false; + } + if (not f_get_name_val_int(a.access.pdr_id, str, "PDR-access")) { return false; } if (not f_get_name_val(a.pfcp_peer, str, "PFCP-peer")) { @@ -195,9 +256,39 @@ if (not f_get_name_val_oct8(a.seid_l, str, "SEID-l")) { return false; } - if (not f_get_name_val(a.core_ip, str, "IP-core")) { - return false; + if (a.kind == "tunend") { + if (not f_get_name_val_int(a.core.tunend.pdr_id, str, "PDR-core")) { + return false; + } + if (not f_get_name_val(a.core.tunend.ip_l, str, "IP-core-l")) { + return false; + } + /* in these tests, the PDR Id and its FAR Id are always the same: PDR for incoming on Access matches its + * FAR that forwards to Core. */ + a.core.tunend.far_id := a.access.pdr_id; + a.access.far_id := a.core.tunend.pdr_id; + } else if (a.kind == "tunmap") { + if (not f_get_name_val(a.core.tunmap.gtp_ip_r, str, "GTP-core-r")) { + return false; + } + if (not f_get_name_val_oct4(a.core.tunmap.teid_r, str, "TEID-core-r")) { + return false; + } + if (not f_get_name_val(a.core.tunmap.gtp_ip_l, str, "GTP-core-l")) { + return false; + } + if (not f_get_name_val_oct4(a.core.tunmap.teid_l, str, "TEID-core-l")) { + return false; + } + if (not f_get_name_val_int(a.core.tunmap.pdr_id, str, "PDR-core")) { + return false; + } + /* in these tests, the PDR Id and its FAR Id are always the same: PDR for incoming on Access matches its + * FAR that forwards to Core. */ + a.core.tunmap.far_id := a.access.pdr_id; + a.access.far_id := a.core.tunmap.pdr_id; } + ret := a; return true; } @@ -417,6 +508,16 @@ setverdict(pass); } +private function f_vty_netinst_cfg(TELNETasp_PT vty_pt, ro_charstring netinst_cmds) +{ + f_vty_enter_config(vty_pt); + f_vty_transceive(vty_pt, "netinst"); + for (var integer i := 0; i < lengthof(netinst_cmds); i := i + 1) { + f_vty_transceive(vty_pt, netinst_cmds[i]); + } + f_vty_transceive_ret(vty_pt, "end"); +} + function f_init_vty(charstring id := "foo") runs on test_CT { if (UPFVTY.checkstate("Mapped")) { /* skip initialization if already executed once */ @@ -435,6 +536,15 @@ activate(as_Tguard()); f_init_vty("VirtCPF"); + + /* Clear out and set up default network instance config */ + f_vty_netinst_cfg(UPFVTY, + { "clear", + "add access " & mp_netinst_access_ip_1, + "add access2 " & mp_netinst_access_ip_2, + "add core " & mp_netinst_core_ip_1, + "add core2 " & mp_netinst_core_ip_2 + }); } friend function f_shutdown_helper() runs on test_CT { @@ -500,6 +610,7 @@ PFCP.receive(tr_PFCP_Assoc_Release_Resp(cause := tr_PFCP_Cause(REQUEST_ACCEPTED))); } +/* Collection of what a test intends to send to osmo-upf */ type record PFCP_Ruleset { Create_PDR_list pdr, Create_FAR_list far @@ -508,17 +619,18 @@ /* Add to r a rule set that does GTP decapsulation (half of encapsulation/decapsulation): * Receive GTP on src_iface = ACCESS by a local F-TEID to be chosen by osmo-upf. * Dispatch GTP payload as plain IP on dest_iface = CORE. */ -private function f_ruleset_add_GTP_decaps(inout PFCP_Ruleset r) { - var integer pdr_id := lengthof(r.pdr) + 1; - var integer far_id := lengthof(r.far) + 1; - +private function f_ruleset_add_GTP_decaps(inout PFCP_Ruleset r, + integer pdr_id, + charstring src_netinst, + integer far_id) { r.pdr := r.pdr & { valueof( ts_PFCP_Create_PDR( pdr_id, ts_PFCP_PDI( ACCESS, - local_F_TEID := ts_PFCP_F_TEID_choose_v4()), + local_F_TEID := ts_PFCP_F_TEID_choose_v4(), + network_instance := ts_PFCP_Network_Instance(src_netinst)), ts_PFCP_Outer_Header_Removal(GTP_U_UDP_IPV4), far_id ) @@ -537,13 +649,11 @@ /* Add to r a rule set that does GTP encapsulation (half of encapsulation/decapsulation) */ private function f_ruleset_add_GTP_encaps(inout PFCP_Ruleset r, + integer pdr_id, charstring ue_addr_v4 := "192.168.23.42", + integer far_id, OCT4 remote_teid, OCT4 gtp_dest_addr_v4) { - - var integer pdr_id := lengthof(r.pdr) + 1; - var integer far_id := lengthof(r.far) + 1; - r.pdr := r.pdr & { valueof( ts_PFCP_Create_PDR( @@ -572,6 +682,87 @@ }; } +/* Add to r a rule set that forwards GTP from one tunnel to another, i.e. one direction of a tunmap */ +private function f_ruleset_add_GTP_forw(inout PFCP_Ruleset r, + integer pdr_id, + e_PFCP_Src_Iface src_iface, + charstring src_netinst, + integer far_id, + e_PFCP_Dest_Iface dest_iface, + F_TEID dest_remote_f_teid) { + r.pdr := r.pdr & { + valueof( + ts_PFCP_Create_PDR( + pdr_id, + ts_PFCP_PDI( + src_iface, + local_F_TEID := ts_PFCP_F_TEID_choose_v4(), + network_instance := ts_PFCP_Network_Instance(src_netinst)), + ts_PFCP_Outer_Header_Removal(GTP_U_UDP_IPV4), + far_id + ) + ) + }; + r.far := r.far & { + valueof( + ts_PFCP_Create_FAR( + far_id, + ts_PFCP_Apply_Action_FORW(), + valueof(ts_PFCP_Forwarding_Parameters(dest_iface, + ts_PFCP_Outer_Header_Creation_GTP_ipv4(dest_remote_f_teid.teid, + dest_remote_f_teid.ipv4_address))) + ) + ) + }; +} + +/* Add to r a DROP rule from src_iface to dest_iface */ +private function f_ruleset_add_GTP_drop(inout PFCP_Ruleset r, + integer pdr_id, + e_PFCP_Src_Iface src_iface, + charstring src_netinst, + integer far_id, + e_PFCP_Dest_Iface dest_iface) { + r.pdr := r.pdr & { + valueof( + ts_PFCP_Create_PDR( + pdr_id, + ts_PFCP_PDI( + src_iface, + local_F_TEID := ts_PFCP_F_TEID_choose_v4(), + network_instance := ts_PFCP_Network_Instance(src_netinst)), + ts_PFCP_Outer_Header_Removal(GTP_U_UDP_IPV4), + far_id + ) + ) + }; + r.far := r.far & { + valueof( + ts_PFCP_Create_FAR( + far_id, + ts_PFCP_Apply_Action_DROP, + fp := omit + ) + ) + }; +} + +private function f_tunmap_upd_far_to_core(GTP_Action gtp) return Update_FAR +{ + return valueof( + ts_PFCP_Update_FAR( + gtp.core.tunmap.far_id, + ts_PFCP_Apply_Action_FORW(), + valueof(ts_PFCP_Update_Forwarding_Parameters( + CORE, + ts_PFCP_Outer_Header_Creation_GTP_ipv4(gtp.core.tunmap.teid_r, + f_inet_addr(gtp.core.tunmap.gtp_ip_r)) + ) + ) + ) + ); +} + /* Return two PDR+FAR rulesets that involve a src=CP-Function. Such rulesets are emitted by certain third party CPF, and * osmo-upf should ACK the creation but ignore the rules (no-op). This function models rulesets seen in the field, so we * can confirm that osmo-upf ACKs and ignores. */ @@ -630,18 +821,87 @@ return r; } -/* Return a rule set that does GTP encapsulation/decapsulation */ -private function f_ruleset_tunend(GTP_Action gtp) return PFCP_Ruleset +/* Return a rule set that does GTP encapsulation and decapsulation, in both directions. */ +private function f_ruleset_tunend(GTP_Action gtp, charstring netinst_access := "access") return PFCP_Ruleset { var PFCP_Ruleset rules := { {}, {} }; - f_ruleset_add_GTP_decaps(rules); - f_ruleset_add_GTP_encaps(rules, gtp.core_ip, gtp.teid_access_r, f_inet_addr(gtp.gtp_access_ip)); + f_ruleset_add_GTP_decaps(rules, + pdr_id := gtp.access.pdr_id, + src_netinst := netinst_access, + far_id := gtp.core.tunend.far_id); + f_ruleset_add_GTP_encaps(rules, + gtp.core.tunend.pdr_id, + gtp.core.tunend.ip_l, + gtp.access.far_id, + gtp.access.teid_r, + f_inet_addr(gtp.access.gtp_ip_r)); return rules; } -/* Run a PFCP Session Establishment procedure */ -private function f_session_est(inout PFCP_session s, PFCP_Ruleset rules) runs on CPF_ConnHdlr { +/* Return a rule set that does GTP tunnel forwarding in both directions. + * If core_gtp_known == true, place full FORW rules in both directions. + * If core_gtp_known == false, keep the Core side as DROP: this allows testing the usual/realistic case, where upon + * Session Establishment, the core side PGW has not yet provided the destination GTP F-TEID, which will follow later in + * a Session Modification. (This test suite has already configured which GTP F-TEID will be used on the core side, but + * we're omitting it from Session Establishment, until it is time to use it in f_session_mod()). */ +private function f_ruleset_tunmap(GTP_Action gtp, boolean core_gtp_known := true, + charstring netinst_access := "access", + charstring netinst_core := "core") return PFCP_Ruleset +{ + var PFCP_Ruleset rules := { {}, {} }; + /* Access to Core */ + if (core_gtp_known) { + f_ruleset_add_GTP_forw(rules, + pdr_id := gtp.access.pdr_id, + src_iface := ACCESS, + src_netinst := netinst_access, + far_id := gtp.core.tunmap.far_id, + dest_iface := CORE, + dest_remote_f_teid := valueof(ts_PFCP_F_TEID_ipv4(gtp.core.tunmap.teid_r, + f_inet_addr(gtp.core.tunmap.gtp_ip_r)))); + } else { + /* The Core remote GTP will follow in a Session Modification, for now set Core->Access to DROP */ + f_ruleset_add_GTP_drop(rules, + pdr_id := gtp.access.pdr_id, + src_iface := ACCESS, + src_netinst := netinst_access, + far_id := gtp.core.tunmap.far_id, + dest_iface := CORE); + } + /* Core to Access */ + f_ruleset_add_GTP_forw(rules, + pdr_id := gtp.core.tunmap.pdr_id, + src_iface := CORE, + src_netinst := netinst_core, + far_id := gtp.access.far_id, + dest_iface := ACCESS, + dest_remote_f_teid := valueof(ts_PFCP_F_TEID_ipv4(gtp.access.teid_r, + f_inet_addr(gtp.access.gtp_ip_r)))); + return rules; +} +/* From a PFCP Session Establishment Response, retrieve the F_TEID returned in the Created PDR IE for the given PDR Id + */ +private function f_get_created_local_f_teid(PDU_PFCP sess_est_resp, integer pdr_id) return F_TEID +{ + for (var integer i := 0; + i < lengthof(sess_est_resp.message_body.pfcp_session_establishment_response.created_PDR_list); + i := i + 1) { + var Created_PDR cpdr := sess_est_resp.message_body.pfcp_session_establishment_response.created_PDR_list[i]; + if (oct2int(cpdr.grouped_ie.pdr_id.rule_id) != pdr_id) { + continue; + } + log("osmo-upf has chosen local F-TEID: PDR-" & int2str(pdr_id) & " = ", cpdr.grouped_ie.local_F_TEID); + return cpdr.grouped_ie.local_F_TEID; + } + setverdict(fail, "PDR Id " & int2str(pdr_id) & " not found in PFCP message"); + mtc.stop; +} + +/* Run a PFCP Session Establishment procedure */ +private function f_session_est(inout PFCP_session s, PFCP_Ruleset rules) runs on CPF_ConnHdlr +{ + log("f_session_est: rules = ", rules); PFCP.send(ts_PFCP_Session_Est_Req(ts_PFCP_Node_ID_ipv4(f_inet_addr(g_pars.local_addr)), ts_PFCP_F_SEID_ipv4(f_inet_addr(g_pars.local_addr), s.cp_seid), rules.pdr, rules.far)); @@ -650,9 +910,27 @@ PFCP.receive(tr_PFCP_Session_Est_Resp(s.cp_seid)) -> value pfcp; s.up_seid := pfcp.message_body.pfcp_session_establishment_response.UP_F_SEID.seid; s.gtp.seid_l := s.up_seid; + + var F_TEID access_local_f_teid := f_get_created_local_f_teid(pfcp, s.gtp.access.pdr_id); + s.gtp.access.gtp_ip_l := f_inet_ntoa(access_local_f_teid.ipv4_address); + s.gtp.access.teid_l := access_local_f_teid.teid; + + if (ischosen(s.gtp.core.tunmap)) { + var F_TEID core_local_f_teid := f_get_created_local_f_teid(pfcp, s.gtp.core.tunmap.pdr_id); + s.gtp.core.tunmap.gtp_ip_l := f_inet_ntoa(core_local_f_teid.ipv4_address); + s.gtp.core.tunmap.teid_l := core_local_f_teid.teid; + } log("established PFCP session: ", s); } +/* Run a PFCP Session Modification procedure */ +private function f_session_mod(inout PFCP_session s) runs on CPF_ConnHdlr +{ + PFCP.send(ts_PFCP_Session_Mod_Req(s.up_seid, f_tunmap_upd_far_to_core(s.gtp))); + PFCP.receive(tr_PFCP_Session_Mod_Resp(s.cp_seid)); + log("modified PFCP session: ", s); +} + private function f_create_PFCP_session_tunend() runs on CPF_ConnHdlr return PFCP_session { var PFCP_session s := { @@ -660,12 +938,60 @@ cp_seid := f_next_seid(), gtp := { kind := "tunend", - gtp_access_ip := "127.0.0.2", - teid_access_r := f_next_remote_teid(), - teid_access_l := f_next_local_teid(), - core_ip := f_next_ue_addr(), + access := { + pdr_id := 1, + /* gtp_ip_l and teid_l will be returned by Session Establishment Response, Created PDR */ + gtp_ip_l := "", + teid_l := '00000000'O, + far_id := 2, + gtp_ip_r := "127.0.0.2", + teid_r := f_next_remote_teid() + }, + core := { + tunend := { + pdr_id := 2, + ip_l := f_next_ue_addr(), + far_id := 1 + } + }, pfcp_peer := g_pars.local_addr, seid_l := '0000000000000000'O + /* seid_l will be returned by Session Establishment Response */ + } + }; + return s; +} + +private function f_create_PFCP_session_tunmap() runs on CPF_ConnHdlr return PFCP_session +{ + var PFCP_session s := { + up_seid := -, + cp_seid := f_next_seid(), + gtp := { + kind := "tunmap", + access := { + pdr_id := 1, + /* gtp_ip_l and teid_l will be returned by Session Establishment Response, Created PDR */ + gtp_ip_l := "", + teid_l := '00000000'O, + far_id := 2, + gtp_ip_r := "127.0.0.2", + teid_r := f_next_remote_teid() + }, + core := { + tunmap := { + pdr_id := 2, + /* gtp_ip_l and teid_l will be returned by Session Establishment Response, Created PDR */ + gtp_ip_l := "", + teid_l := '00000000'O, + far_id := 1, + gtp_ip_r := "127.0.0.3", + teid_r := f_next_remote_teid() + } + }, + pfcp_peer := g_pars.local_addr, + seid_l := '0000000000000000'O + /* seid_l will be returned by Session Establishment Response */ } }; return s; @@ -778,12 +1104,98 @@ f_shutdown_helper(); } +/* Verify that the Network Instance IE in Create PDR chooses the right local address for a tunmap session */ +private function f_tc_session_est_tunmap(charstring id) runs on CPF_ConnHdlr { + f_assoc_setup(); + var PFCP_session s := f_create_PFCP_session_tunmap(); + f_session_est(s, f_ruleset_tunmap(s.gtp)); + f_sleep(1.0); + f_vty_expect_session_active(UPFVTY, s); + f_session_del(s); + f_vty_expect_no_active_sessions(UPFVTY); + f_vty_expect_no_gtp_actions(UPFVTY); + f_assoc_release(); + setverdict(pass); +} +testcase TC_session_est_tunmap() runs on test_CT { + var CPF_ConnHdlr vc_conn; + + f_init(guard_timeout := 15.0); + + vc_conn := f_start_handler(refers(f_tc_session_est_tunmap)); + vc_conn.done; + f_shutdown_helper(); +} + +/* Set up a tunmap session with a partial Session Establishment, followed by a Session Modification to complete it. */ +private function f_session_est_mod_tunmap(charstring netinst_access, charstring expect_gtp_ip_access, + charstring netinst_core, charstring expect_gtp_ip_core) runs on CPF_ConnHdlr { + f_assoc_setup(); + var PFCP_session s := f_create_PFCP_session_tunmap(); + f_session_est(s, f_ruleset_tunmap(s.gtp, core_gtp_known := false, + netinst_access := netinst_access, netinst_core := netinst_core)); + /* The locally chosen GTP IP addresses where osmo-upf receives GTP traffic were chosen by netinst_access / + * netinst_core and are returned in s.gtp.access.gtp_ip_l / s.gtp.core.tunmap.gtp_ip_l. Verify that the netinst + * names have returned their matching IP addresses. */ + if (s.gtp.access.gtp_ip_l != expect_gtp_ip_access) { + setverdict(fail, "Network Instance '" & netinst_access & "' should have yielded GTP IP " & + expect_gtp_ip_access & " but osmo-upf chose " & s.gtp.access.gtp_ip_l); + mtc.stop; + } + if (s.gtp.core.tunmap.gtp_ip_l != expect_gtp_ip_core) { + setverdict(fail, "Network Instance '" & netinst_core & "' should have yielded GTP IP " & + expect_gtp_ip_core & " but osmo-upf chose " & s.gtp.core.tunmap.gtp_ip_l); + mtc.stop; + } + + f_sleep(1.0); + f_vty_expect_session_status(UPFVTY, s, PFCP_session_inactive); + + f_session_mod(s); + f_sleep(1.0); + f_vty_expect_session_active(UPFVTY, s); + f_session_del(s); + f_vty_expect_no_active_sessions(UPFVTY); + f_vty_expect_no_gtp_actions(UPFVTY); + f_assoc_release(); + setverdict(pass); +} +/* Run f_session_est_mod_tunmap() with the first Network Instances */ +private function f_tc_session_est_mod_tunmap(charstring id) runs on CPF_ConnHdlr { + f_session_est_mod_tunmap("access", mp_netinst_access_ip_1, "core", mp_netinst_core_ip_1); +} +/* Run f_session_est_mod_tunmap() with the second Network Instances */ +private function f_tc_session_est_mod_tunmap2(charstring id) runs on CPF_ConnHdlr { + f_session_est_mod_tunmap("access2", mp_netinst_access_ip_2, "core2", mp_netinst_core_ip_2); +} +testcase TC_session_est_mod_tunmap() runs on test_CT { + var CPF_ConnHdlr vc_conn; + + f_init(guard_timeout := 15.0); + + vc_conn := f_start_handler(refers(f_tc_session_est_mod_tunmap)); + vc_conn.done; + f_shutdown_helper(); +} +testcase TC_session_est_mod_tunmap2() runs on test_CT { + var CPF_ConnHdlr vc_conn; + + f_init(guard_timeout := 15.0); + + vc_conn := f_start_handler(refers(f_tc_session_est_mod_tunmap2)); + vc_conn.done; + f_shutdown_helper(); +} + control { execute( TC_assoc_node_id_v4() ); execute( TC_assoc_node_id_fqdn() ); execute( TC_session_est_tunend() ); execute( TC_session_term_by_assoc_rel() ); execute( TC_session_est_noop() ); + execute( TC_session_est_tunmap() ); + execute( TC_session_est_mod_tunmap() ); + execute( TC_session_est_mod_tunmap2() ); } } diff --git a/upf/osmo-upf.cfg b/upf/osmo-upf.cfg index f84a4ae..c354d8d 100644 --- a/upf/osmo-upf.cfg +++ b/upf/osmo-upf.cfg @@ -14,3 +14,5 @@ mockup nft mockup +#netinst +# the netinst cfg is cleared and setup dynamically in UPF_Tests.ttcn -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I440466f1cc9689391869ac2579a4497ef6008adb Gerrit-Change-Number: 30929 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-upf[master]: manual: fix broken reference to netinst section
by neels 11 Jan '23

11 Jan '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/30923 ) Change subject: manual: fix broken reference to netinst section ...................................................................... manual: fix broken reference to netinst section Change-Id: Ifeee1e90eb2af0e5bff357a000189c047fda03fb --- M doc/manuals/chapters/netinst.adoc 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/23/30923/1 diff --git a/doc/manuals/chapters/netinst.adoc b/doc/manuals/chapters/netinst.adoc index 3add2bb..d29c190 100644 --- a/doc/manuals/chapters/netinst.adoc +++ b/doc/manuals/chapters/netinst.adoc @@ -1,3 +1,4 @@ +[[netinst]] == 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 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ifeee1e90eb2af0e5bff357a000189c047fda03fb Gerrit-Change-Number: 30923 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-sgsn[master]: gtphub.h: Remove dependency on sgsn/gprs_sgsn.h
by pespin 10 Jan '23

10 Jan '23
Attention is currently required from: lynxis lazus. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30903 ) Change subject: gtphub.h: Remove dependency on sgsn/gprs_sgsn.h ...................................................................... Patch Set 2: (1 comment) Patchset: PS2: > Any idea why it differs between libosmocore (100) and sgsn (102)? The +1 is for the null char which is not accounted. The extra 1 missing I guess it's just not properly counting. In any case if we ever find it is wrong then we fix it in libosmocore for everybody. -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30903 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I4c6110feeeaa1adfb6b1f0147eeb56dfe34636ec Gerrit-Change-Number: 30903 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Tue, 10 Jan 2023 21:09:02 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-sgsn[master]: Move global apn_list inside struct sgsn_instance
by pespin 10 Jan '23

10 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30889 ) Change subject: Move global apn_list inside struct sgsn_instance ...................................................................... Move global apn_list inside struct sgsn_instance This way apns are managed by the lifcycle of the main global struct sgsn_instance automatically. Change-Id: I8cc8e540cfb64d0f130e9c0aaedf7b0835f8fe16 --- M include/osmocom/sgsn/apn.h M include/osmocom/sgsn/sgsn.h M src/sgsn/apn.c M src/sgsn/gprs_sgsn.c M src/sgsn/sgsn_vty.c M tests/sgsn/sgsn_test.c 6 files changed, 12 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, approved diff --git a/include/osmocom/sgsn/apn.h b/include/osmocom/sgsn/apn.h index adf62e2..3dc7a70 100644 --- a/include/osmocom/sgsn/apn.h +++ b/include/osmocom/sgsn/apn.h @@ -6,8 +6,6 @@ #define GSM_APN_LENGTH 102 -extern struct llist_head sgsn_apn_ctxts; - struct apn_ctx { struct llist_head list; struct sgsn_ggsn_ctx *ggsn; diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index 7e78eee..0bc88a9 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -151,6 +151,7 @@ struct rate_ctr_group *rate_ctrs; + struct llist_head apn_list; /* list of struct sgsn_apn_ctx */ struct llist_head ggsn_list; /* list of struct sgsn_ggsn_ctx */ struct llist_head mme_list; /* list of struct sgsn_mme_ctx */ diff --git a/src/sgsn/apn.c b/src/sgsn/apn.c index d6d5372..8ed523e 100644 --- a/src/sgsn/apn.c +++ b/src/sgsn/apn.c @@ -25,22 +25,21 @@ #include <talloc.h> #include <osmocom/sgsn/apn.h> +#include <osmocom/sgsn/sgsn.h> extern void *tall_sgsn_ctx; -LLIST_HEAD(sgsn_apn_ctxts); - static struct apn_ctx *sgsn_apn_ctx_alloc(const char *ap_name, const char *imsi_prefix) { struct apn_ctx *actx; - actx = talloc_zero(tall_sgsn_ctx, struct apn_ctx); + actx = talloc_zero(sgsn, struct apn_ctx); if (!actx) return NULL; actx->name = talloc_strdup(actx, ap_name); actx->imsi_prefix = talloc_strdup(actx, imsi_prefix); - llist_add_tail(&actx->list, &sgsn_apn_ctxts); + llist_add_tail(&actx->list, &sgsn->apn_list); return actx; } @@ -59,7 +58,7 @@ size_t name_prio = 0; size_t name_req_len = strlen(name); - llist_for_each_entry(actx, &sgsn_apn_ctxts, list) { + llist_for_each_entry(actx, &sgsn->apn_list, list) { size_t name_ref_len, imsi_ref_len; const char *name_ref_start, *name_match_start; @@ -106,7 +105,7 @@ { struct apn_ctx *actx; - llist_for_each_entry(actx, &sgsn_apn_ctxts, list) { + llist_for_each_entry(actx, &sgsn->apn_list, list) { if (strcasecmp(name, actx->name) == 0 && strcasecmp(imsi_prefix, actx->imsi_prefix) == 0) return actx; diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c index c157625..42d1ece 100644 --- a/src/sgsn/gprs_sgsn.c +++ b/src/sgsn/gprs_sgsn.c @@ -658,7 +658,7 @@ insert_extra(tp, mmctx->subscr->sgsn_data, pdp); continue; } - if (!llist_empty(&sgsn_apn_ctxts)) { + if (!llist_empty(&sgsn->apn_list)) { apn_ctx = sgsn_apn_ctx_match(req_apn_str, mmctx->imsi); /* Not configured */ if (apn_ctx == NULL) @@ -711,7 +711,7 @@ if (apn_ctx != NULL) { ggsn = apn_ctx->ggsn; - } else if (llist_empty(&sgsn_apn_ctxts)) { + } else if (llist_empty(&sgsn->apn_list)) { /* No configuration -> use GGSN 0 */ ggsn = sgsn_ggsn_ctx_by_id(0); } else if (allow_any_apn && @@ -821,6 +821,7 @@ inst->rate_ctrs = rate_ctr_group_alloc(inst, &sgsn_ctrg_desc, 0); OSMO_ASSERT(inst->rate_ctrs); + INIT_LLIST_HEAD(&inst->apn_list); INIT_LLIST_HEAD(&inst->ggsn_list); INIT_LLIST_HEAD(&inst->mme_list); diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c index b678f07..b6d03cf 100644 --- a/src/sgsn/sgsn_vty.c +++ b/src/sgsn/sgsn_vty.c @@ -311,9 +311,9 @@ llist_for_each_entry(acl, &g_cfg->imsi_acl, list) vty_out(vty, " imsi-acl add %s%s", acl->imsi, VTY_NEWLINE); - if (llist_empty(&sgsn_apn_ctxts)) + if (llist_empty(&sgsn->apn_list)) vty_out(vty, " ! apn * ggsn 0%s", VTY_NEWLINE); - llist_for_each_entry(actx, &sgsn_apn_ctxts, list) { + llist_for_each_entry(actx, &sgsn->apn_list, list) { if (strlen(actx->imsi_prefix) > 0) vty_out(vty, " apn %s imsi-prefix %s ggsn %u%s", actx->name, actx->imsi_prefix, actx->ggsn->id, diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index e7f820f..5d46162 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -1346,6 +1346,7 @@ struct apn_ctx *actx, *actxs[9]; printf("Testing APN matching\n"); + sgsn = sgsn_instance_alloc(tall_sgsn_ctx); actxs[0] = sgsn_apn_ctx_find_alloc("*.test", ""); actxs[1] = sgsn_apn_ctx_find_alloc("*.def.test", ""); -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30889 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I8cc8e540cfb64d0f130e9c0aaedf7b0835f8fe16 Gerrit-Change-Number: 30889 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> 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-sgsn[master]: Move gtp related functions to gtp.h
by pespin 10 Jan '23

10 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30888 ) Change subject: Move gtp related functions to gtp.h ...................................................................... Move gtp related functions to gtp.h The functions are implemented in sgsn_libgtp.c and hence belong to header file gtp.h Change-Id: I7f5cf2895b05e03435769548b61051e6284ccb3c --- M include/osmocom/sgsn/gtp.h M include/osmocom/sgsn/sgsn.h M src/sgsn/gprs_gmm.c M src/sgsn/gprs_mm_state_iu_fsm.c M src/sgsn/gprs_ranap.c M src/sgsn/gprs_sgsn.c M src/sgsn/gprs_sm.c M src/sgsn/gtp_ggsn.c M src/sgsn/sgsn_rim.c 9 files changed, 29 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, approved diff --git a/include/osmocom/sgsn/gtp.h b/include/osmocom/sgsn/gtp.h index e835b53..2aec553 100644 --- a/include/osmocom/sgsn/gtp.h +++ b/include/osmocom/sgsn/gtp.h @@ -1,8 +1,30 @@ #pragma once +#include <stddef.h> +#include <stdint.h> + +#include <osmocom/gsm/tlv.h> +#include <osmocom/gprs/gprs_bssgp_rim.h> + +struct gprs_ra_id; struct sgsn_instance; +struct sgsn_ggsn_ctx; +struct sgsn_pdp_ctx; +struct sgsn_mm_ctx; +struct sgsn_mme_ctx; int sgsn_gtp_init(struct sgsn_instance *sgi); +int sgsn_mme_ran_info_req(struct sgsn_mme_ctx *mme, const struct bssgp_ran_information_pdu *pdu); + +void sgsn_ggsn_echo_req(struct sgsn_ggsn_ctx *ggc); +struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, + struct sgsn_mm_ctx *mmctx, + uint16_t nsapi, + struct tlv_parsed *tp); + int sgsn_gtp_data_req(struct gprs_ra_id *ra_id, int32_t tlli, uint8_t nsapi, struct msgb *msg, uint32_t npdu_len, uint8_t *npdu); +int sgsn_delete_pdp_ctx(struct sgsn_pdp_ctx *pctx); +void sgsn_pdp_upd_gtp_u(struct sgsn_pdp_ctx *pdp, void *addr, size_t alen); +int send_act_pdp_cont_acc(struct sgsn_pdp_ctx *pctx); diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index bbeaed4..7e78eee 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -168,18 +168,6 @@ /* sgsn.c */ struct sgsn_instance *sgsn_instance_alloc(void *talloc_ctx); int sgsn_inst_init(struct sgsn_instance *sgsn); - -/* sgsn_libgtp.c */ -struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, - struct sgsn_mm_ctx *mmctx, - uint16_t nsapi, - struct tlv_parsed *tp); -int sgsn_delete_pdp_ctx(struct sgsn_pdp_ctx *pctx); -void sgsn_pdp_upd_gtp_u(struct sgsn_pdp_ctx *pdp, void *addr, size_t alen); -void sgsn_ggsn_echo_req(struct sgsn_ggsn_ctx *ggc); -int send_act_pdp_cont_acc(struct sgsn_pdp_ctx *pctx); -int sgsn_mme_ran_info_req(struct sgsn_mme_ctx *mme, const struct bssgp_ran_information_pdu *pdu); - /* * CDR related functionality */ diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 6aa479b..b385ff1 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -61,6 +61,7 @@ #include <osmocom/sgsn/gprs_sndcp.h> #include <osmocom/sgsn/gprs_ranap.h> #include <osmocom/sgsn/gprs_sm.h> +#include <osmocom/sgsn/gtp.h> #include <pdp.h> diff --git a/src/sgsn/gprs_mm_state_iu_fsm.c b/src/sgsn/gprs_mm_state_iu_fsm.c index b1604f8..d0e9ffc 100644 --- a/src/sgsn/gprs_mm_state_iu_fsm.c +++ b/src/sgsn/gprs_mm_state_iu_fsm.c @@ -29,6 +29,7 @@ #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/sgsn.h> #include <osmocom/sgsn/gprs_ranap.h> +#include <osmocom/sgsn/gtp.h> #define X(s) (1 << (s)) diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c index 72d744d..af1a61c 100644 --- a/src/sgsn/gprs_ranap.c +++ b/src/sgsn/gprs_ranap.c @@ -38,6 +38,7 @@ #include <osmocom/sgsn/gprs_gmm_attach.h> #include <osmocom/sgsn/gprs_mm_state_iu_fsm.h> #include <osmocom/sgsn/gtp_ggsn.h> +#include <osmocom/sgsn/gtp.h> /* Send RAB activation requests for all PDP contexts */ void activate_pdp_rabs(struct sgsn_mm_ctx *ctx) diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c index 9ce632c..c157625 100644 --- a/src/sgsn/gprs_sgsn.c +++ b/src/sgsn/gprs_sgsn.c @@ -51,6 +51,7 @@ #include <osmocom/sgsn/gprs_llc.h> #include <osmocom/sgsn/gprs_sndcp.h> #include <osmocom/sgsn/gtp_ggsn.h> +#include <osmocom/sgsn/gtp.h> #include <pdp.h> diff --git a/src/sgsn/gprs_sm.c b/src/sgsn/gprs_sm.c index 182528d..157e279 100644 --- a/src/sgsn/gprs_sm.c +++ b/src/sgsn/gprs_sm.c @@ -42,6 +42,7 @@ #include <osmocom/sgsn/gprs_llc.h> #include <osmocom/sgsn/gprs_sndcp.h> #include <osmocom/sgsn/gprs_ranap.h> +#include <osmocom/sgsn/gtp.h> extern void *tall_sgsn_ctx; diff --git a/src/sgsn/gtp_ggsn.c b/src/sgsn/gtp_ggsn.c index f8e09e8..be07d13 100644 --- a/src/sgsn/gtp_ggsn.c +++ b/src/sgsn/gtp_ggsn.c @@ -29,6 +29,7 @@ #include <osmocom/core/stats.h> #include <osmocom/sgsn/gtp_ggsn.h> +#include <osmocom/sgsn/gtp.h> #include <osmocom/sgsn/sgsn.h> #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/gprs_gmm_fsm.h> diff --git a/src/sgsn/sgsn_rim.c b/src/sgsn/sgsn_rim.c index f28ba60..57f6ea7 100644 --- a/src/sgsn/sgsn_rim.c +++ b/src/sgsn/sgsn_rim.c @@ -12,6 +12,7 @@ #include <osmocom/gprs/gprs_bssgp_rim.h> #include <osmocom/sgsn/sgsn_rim.h> #include <osmocom/sgsn/gtp_mme.h> +#include <osmocom/sgsn/gtp.h> #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/sgsn.h> -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30888 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I7f5cf2895b05e03435769548b61051e6284ccb3c Gerrit-Change-Number: 30888 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> 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-sgsn[master]: Move func defintions of funcs implemented in gprs_sndcp.c to gprs_snd...
by pespin 10 Jan '23

10 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30886 ) Change subject: Move func defintions of funcs implemented in gprs_sndcp.c to gprs_sndcp.h ...................................................................... Move func defintions of funcs implemented in gprs_sndcp.c to gprs_sndcp.h Move them to the correct header where they belong, so that the all the related protocol stuff is placed together. Change-Id: I9052f48a0af125bb445194f4ae94ebbe49508fda --- M include/osmocom/sgsn/gprs_sndcp.h M include/osmocom/sgsn/sgsn.h M src/sgsn/gprs_sgsn.c 3 files changed, 10 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, approved diff --git a/include/osmocom/sgsn/gprs_sndcp.h b/include/osmocom/sgsn/gprs_sndcp.h index b77fff2..ba0b8f9 100644 --- a/include/osmocom/sgsn/gprs_sndcp.h +++ b/include/osmocom/sgsn/gprs_sndcp.h @@ -85,4 +85,13 @@ int sndcp_sn_ud_ind(struct gprs_sndcp_entity *sne, struct msgb *msg, uint32_t npdu_len, uint8_t *npdu); +/* Entry point for the SNSM-ACTIVATE.indication */ +int sndcp_sm_activate_ind(struct gprs_llc_lle *lle, uint8_t nsapi); +/* Entry point for the SNSM-DEACTIVATE.indication */ +int sndcp_sm_deactivate_ind(const struct gprs_llc_lle *lle, uint8_t nsapi); +int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi, + void *mmcontext); +int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, + uint8_t *hdr, uint16_t len); + #endif /* INT_SNDCP_H */ diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index f2bb49f..bbeaed4 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -180,18 +180,6 @@ int send_act_pdp_cont_acc(struct sgsn_pdp_ctx *pctx); int sgsn_mme_ran_info_req(struct sgsn_mme_ctx *mme, const struct bssgp_ran_information_pdu *pdu); -/* gprs_sndcp.c */ - -/* Entry point for the SNSM-ACTIVATE.indication */ -int sndcp_sm_activate_ind(struct gprs_llc_lle *lle, uint8_t nsapi); -/* Entry point for the SNSM-DEACTIVATE.indication */ -int sndcp_sm_deactivate_ind(const struct gprs_llc_lle *lle, uint8_t nsapi); -int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi, - void *mmcontext); -int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, - uint8_t *hdr, uint16_t len); - - /* * CDR related functionality */ diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c index cdfa029..9ce632c 100644 --- a/src/sgsn/gprs_sgsn.c +++ b/src/sgsn/gprs_sgsn.c @@ -49,6 +49,7 @@ #include <osmocom/sgsn/gprs_mm_state_iu_fsm.h> #include <osmocom/sgsn/gprs_gmm_fsm.h> #include <osmocom/sgsn/gprs_llc.h> +#include <osmocom/sgsn/gprs_sndcp.h> #include <osmocom/sgsn/gtp_ggsn.h> #include <pdp.h> -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30886 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I9052f48a0af125bb445194f4ae94ebbe49508fda Gerrit-Change-Number: 30886 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> 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-sgsn[master]: sndcp: Standarize unitdata function naming
by pespin 10 Jan '23

10 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30887 ) Change subject: sndcp: Standarize unitdata function naming ...................................................................... sndcp: Standarize unitdata function naming Use sndcp_<sap>_type>_<op> so that it's easier to distinguish and identify them. Change-Id: Ib8825570a8f61d0a28d631f86f5244e70d3194aa --- M include/osmocom/sgsn/gprs_sndcp.h M src/sgsn/gprs_llc.c M src/sgsn/gprs_sndcp.c M src/sgsn/sgsn_libgtp.c 4 files changed, 12 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved lynxis lazus: Looks good to me, approved diff --git a/include/osmocom/sgsn/gprs_sndcp.h b/include/osmocom/sgsn/gprs_sndcp.h index ba0b8f9..b4a0af8 100644 --- a/include/osmocom/sgsn/gprs_sndcp.h +++ b/include/osmocom/sgsn/gprs_sndcp.h @@ -82,16 +82,17 @@ void gprs_sndcp_sm_deactivate_ind_by_llme(const struct gprs_llc_llme *llme); /* Called by SNDCP when it has received/re-assembled a N-PDU */ -int sndcp_sn_ud_ind(struct gprs_sndcp_entity *sne, struct msgb *msg, +int sndcp_sn_unitdata_ind(struct gprs_sndcp_entity *sne, struct msgb *msg, uint32_t npdu_len, uint8_t *npdu); +int sndcp_sn_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi, + void *mmcontext); /* Entry point for the SNSM-ACTIVATE.indication */ int sndcp_sm_activate_ind(struct gprs_llc_lle *lle, uint8_t nsapi); /* Entry point for the SNSM-DEACTIVATE.indication */ int sndcp_sm_deactivate_ind(const struct gprs_llc_lle *lle, uint8_t nsapi); -int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi, - void *mmcontext); -int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, + +int sndcp_ll_unitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t *hdr, uint16_t len); #endif /* INT_SNDCP_H */ diff --git a/src/sgsn/gprs_llc.c b/src/sgsn/gprs_llc.c index 612dbca..302e018 100644 --- a/src/sgsn/gprs_llc.c +++ b/src/sgsn/gprs_llc.c @@ -1030,7 +1030,7 @@ case GPRS_SAPI_SNDCP9: case GPRS_SAPI_SNDCP11: /* send LL_DATA_IND/LL_UNITDATA_IND to SNDCP */ - rc = sndcp_llunitdata_ind(msg, lle, llhp.data, llhp.data_len); + rc = sndcp_ll_unitdata_ind(msg, lle, llhp.data, llhp.data_len); break; case GPRS_SAPI_SMS: /* FIXME */ diff --git a/src/sgsn/gprs_sndcp.c b/src/sgsn/gprs_sndcp.c index 8ee752e..6707c28 100644 --- a/src/sgsn/gprs_sndcp.c +++ b/src/sgsn/gprs_sndcp.c @@ -399,7 +399,7 @@ } /* Hand off packet to SGSN (SNDCP SN-UNITDATA.ind), which will forward it to GGSN (GTP): */ - rc = sndcp_sn_ud_ind(sne, msg, npdu_len, expnd); + rc = sndcp_sn_unitdata_ind(sne, msg, npdu_len, expnd); ret_free: /* we must free the memory we allocated above; ownership is not transferred @@ -684,7 +684,7 @@ } /* Request transmission of a SN-PDU over specified LLC Entity + SAPI */ -int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi, +int sndcp_sn_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi, void *mmcontext) { struct gprs_sndcp_entity *sne; @@ -794,7 +794,7 @@ } /* Section 5.1.2.17 LL-UNITDATA.ind */ -int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, +int sndcp_ll_unitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t *hdr, uint16_t len) { struct gprs_sndcp_entity *sne; @@ -878,7 +878,7 @@ } /* Hand off packet to gtp */ - rc = sndcp_sn_ud_ind(sne, msg, npdu_len, expnd); + rc = sndcp_sn_unitdata_ind(sne, msg, npdu_len, expnd); ret_free: if (any_pcomp_or_dcomp_active(sgsn)) @@ -890,7 +890,7 @@ /* 5.1.1.4 SN-UNITDATA.indication * Called by SNDCP when it has received/re-assembled a N-PDU */ -int sndcp_sn_ud_ind(struct gprs_sndcp_entity *sne, +int sndcp_sn_unitdata_ind(struct gprs_sndcp_entity *sne, struct msgb *msg, uint32_t npdu_len, uint8_t *npdu) { /* Hand it off N-PDU to the correct GTP tunnel + GGSN: */ diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c index f76180a..f848e57 100644 --- a/src/sgsn/sgsn_libgtp.c +++ b/src/sgsn/sgsn_libgtp.c @@ -804,7 +804,7 @@ /* It is easier to have a global count */ pdp->cdr_bytes_out += len; - return sndcp_unitdata_req(msg, &mm->gb.llme->lle[pdp->sapi], + return sndcp_sn_unitdata_req(msg, &mm->gb.llme->lle[pdp->sapi], pdp->nsapi, mm); } -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30887 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ib8825570a8f61d0a28d631f86f5244e70d3194aa Gerrit-Change-Number: 30887 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> 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-sgsn[master]: Properly split llc->sndcp->gtp unitdata pathi through extra func call
by pespin 10 Jan '23

10 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30885 ) Change subject: Properly split llc->sndcp->gtp unitdata pathi through extra func call ...................................................................... Properly split llc->sndcp->gtp unitdata pathi through extra func call Beforehand the function handling the LL-UNITDATA primitive from LLC was already submitting the packet to GTP code which had an SNDCP related name, so everything was really confusing and layer separation was not clean. Change-Id: Ia544a9dd4c0c7647b0c1b64ca110351f40820618 --- M include/osmocom/sgsn/gprs_sndcp.h M include/osmocom/sgsn/gtp.h M include/osmocom/sgsn/sgsn.h M src/sgsn/gprs_sndcp.c M src/sgsn/sgsn_libgtp.c 5 files changed, 24 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve lynxis lazus: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/sgsn/gprs_sndcp.h b/include/osmocom/sgsn/gprs_sndcp.h index caf675c..b77fff2 100644 --- a/include/osmocom/sgsn/gprs_sndcp.h +++ b/include/osmocom/sgsn/gprs_sndcp.h @@ -81,4 +81,8 @@ /* Clean up all gprs_sndcp_entities related to llme (OS#4824) */ void gprs_sndcp_sm_deactivate_ind_by_llme(const struct gprs_llc_llme *llme); +/* Called by SNDCP when it has received/re-assembled a N-PDU */ +int sndcp_sn_ud_ind(struct gprs_sndcp_entity *sne, struct msgb *msg, + uint32_t npdu_len, uint8_t *npdu); + #endif /* INT_SNDCP_H */ diff --git a/include/osmocom/sgsn/gtp.h b/include/osmocom/sgsn/gtp.h index 85a50d3..e835b53 100644 --- a/include/osmocom/sgsn/gtp.h +++ b/include/osmocom/sgsn/gtp.h @@ -3,3 +3,6 @@ struct sgsn_instance; int sgsn_gtp_init(struct sgsn_instance *sgi); + +int sgsn_gtp_data_req(struct gprs_ra_id *ra_id, int32_t tlli, uint8_t nsapi, + struct msgb *msg, uint32_t npdu_len, uint8_t *npdu); diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h index 76d5702..f2bb49f 100644 --- a/include/osmocom/sgsn/sgsn.h +++ b/include/osmocom/sgsn/sgsn.h @@ -186,9 +186,6 @@ int sndcp_sm_activate_ind(struct gprs_llc_lle *lle, uint8_t nsapi); /* Entry point for the SNSM-DEACTIVATE.indication */ int sndcp_sm_deactivate_ind(const struct gprs_llc_lle *lle, uint8_t nsapi); -/* Called by SNDCP when it has received/re-assembled a N-PDU */ -int sgsn_rx_sndcp_ud_ind(struct gprs_ra_id *ra_id, int32_t tlli, uint8_t nsapi, - struct msgb *msg, uint32_t npdu_len, uint8_t *npdu); int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi, void *mmcontext); int sndcp_llunitdata_ind(struct msgb *msg, struct gprs_llc_lle *lle, diff --git a/src/sgsn/gprs_sndcp.c b/src/sgsn/gprs_sndcp.c index a0c35bf..8ee752e 100644 --- a/src/sgsn/gprs_sndcp.c +++ b/src/sgsn/gprs_sndcp.c @@ -42,6 +42,7 @@ #include <osmocom/sgsn/gprs_sndcp_dcomp.h> #include <osmocom/sgsn/gprs_sndcp_comp.h> #include <osmocom/sgsn/gprs_gmm.h> +#include <osmocom/sgsn/gtp.h> #define DEBUG_IP_PACKETS 0 /* 0=Disabled, 1=Enabled */ @@ -397,9 +398,8 @@ expnd = npdu; } - /* Hand off packet to gtp */ - rc = sgsn_rx_sndcp_ud_ind(&sne->ra_id, sne->lle->llme->tlli, - sne->nsapi, msg, npdu_len, expnd); + /* Hand off packet to SGSN (SNDCP SN-UNITDATA.ind), which will forward it to GGSN (GTP): */ + rc = sndcp_sn_ud_ind(sne, msg, npdu_len, expnd); ret_free: /* we must free the memory we allocated above; ownership is not transferred @@ -864,8 +864,7 @@ LOGP(DSNDCP, LOGL_ERROR, "Short SNDCP N-PDU: %d\n", npdu_len); return -EIO; } - /* actually send the N-PDU to the SGSN core code, which then - * hands it off to the correct GTP tunnel + GGSN via gtp_data_req() */ + /* actually send the N-PDU to the SGSN core code (SNDCP SN-UNITDATA.ind) */ /* Decompress packet */ if (any_pcomp_or_dcomp_active(sgsn)) { @@ -879,8 +878,7 @@ } /* Hand off packet to gtp */ - rc = sgsn_rx_sndcp_ud_ind(&sne->ra_id, lle->llme->tlli, - sne->nsapi, msg, npdu_len, expnd); + rc = sndcp_sn_ud_ind(sne, msg, npdu_len, expnd); ret_free: if (any_pcomp_or_dcomp_active(sgsn)) @@ -889,6 +887,17 @@ return rc; } +/* 5.1.1.4 SN-UNITDATA.indication + * Called by SNDCP when it has received/re-assembled a N-PDU + */ +int sndcp_sn_ud_ind(struct gprs_sndcp_entity *sne, + struct msgb *msg, uint32_t npdu_len, uint8_t *npdu) +{ + /* Hand it off N-PDU to the correct GTP tunnel + GGSN: */ + return sgsn_gtp_data_req(&sne->ra_id, sne->lle->llme->tlli, + sne->nsapi, msg, npdu_len, npdu); +} + #if 0 /* Section 5.1.2.1 LL-RESET.ind */ static int sndcp_ll_reset_ind(struct gprs_sndcp_entity *se) diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c index 58e912d..f76180a 100644 --- a/src/sgsn/sgsn_libgtp.c +++ b/src/sgsn/sgsn_libgtp.c @@ -809,7 +809,7 @@ } /* Called by SNDCP when it has received/re-assembled a N-PDU */ -int sgsn_rx_sndcp_ud_ind(struct gprs_ra_id *ra_id, int32_t tlli, uint8_t nsapi, +int sgsn_gtp_data_req(struct gprs_ra_id *ra_id, int32_t tlli, uint8_t nsapi, struct msgb *msg, uint32_t npdu_len, uint8_t *npdu) { struct sgsn_mm_ctx *mmctx; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30885 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ia544a9dd4c0c7647b0c1b64ca110351f40820618 Gerrit-Change-Number: 30885 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> 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
  • ← Newer
  • 1
  • ...
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.