Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 ) Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm .. Patch Set 7: (1 comment) https://gerrit.osmocom.org/#/c/15552/4/src/sgsn/gprs_sgsn.c File src/sgsn/gprs_sgsn.c: https://gerrit.osmocom.org/#/c/15552/4/src/sgsn/gprs_sgsn.c@250 PS4, Line 250: INIT_LLIST_HEAD(>pdp_list); > maybe OSMO_ASSERT onboth, or gracefully cleanup if fsm_installoc fails? I'll create a seperate patchset to check all osmo_fsm_inst_alloc() -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 Gerrit-Change-Number: 15552 Gerrit-PatchSet: 7 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 08 Oct 2019 13:42:53 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment
Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm
lynxis lazus has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 ) Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm .. gprs_sgsn: always allocate Gb/Iu mm fsm When moving between RANs we need them at a later point. Allocate them always to not make the code (more) complex. Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 --- M src/sgsn/gprs_sgsn.c 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c index 465a5fa..474f8f9 100644 --- a/src/sgsn/gprs_sgsn.c +++ b/src/sgsn/gprs_sgsn.c @@ -245,6 +245,10 @@ } ctx->gmm_fsm = osmo_fsm_inst_alloc(_fsm, ctx, ctx, LOGL_DEBUG, "gmm_fsm"); ctx->gmm_att_req.fsm = osmo_fsm_inst_alloc(_attach_req_fsm, ctx, ctx, LOGL_DEBUG, "gb_gmm_req"); + ctx->gb.mm_state_fsm = osmo_fsm_inst_alloc(_state_gb_fsm, ctx, ctx, LOGL_DEBUG, NULL); +#ifdef BUILD_IU + ctx->iu.mm_state_fsm = osmo_fsm_inst_alloc(_state_iu_fsm, ctx, ctx, LOGL_DEBUG, NULL); +#endif INIT_LLIST_HEAD(>pdp_list); llist_add(>list, _mm_ctxts); @@ -256,7 +260,6 @@ const struct gprs_ra_id *raid) { struct sgsn_mm_ctx *ctx; - char buf[32]; ctx = sgsn_mm_ctx_alloc(tlli); if (!ctx) @@ -266,8 +269,7 @@ ctx->ran_type = MM_CTX_T_GERAN_Gb; ctx->gb.tlli = tlli; ctx->ciph_algo = sgsn->cfg.cipher; - snprintf(buf, sizeof(buf), "%" PRIu32, tlli); - ctx->gb.mm_state_fsm = osmo_fsm_inst_alloc(_state_gb_fsm, ctx, ctx, LOGL_DEBUG, buf); + osmo_fsm_inst_update_id_f(ctx->gb.mm_state_fsm, "%" PRIu32, tlli); LOGMMCTXP(LOGL_DEBUG, ctx, "Allocated with %s cipher.\n", get_value_string(gprs_cipher_names, ctx->ciph_algo)); @@ -278,7 +280,6 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc_iu(void *uectx) { #if BUILD_IU - char buf[32]; struct sgsn_mm_ctx *ctx; struct ranap_ue_conn_ctx *ue_ctx = uectx; @@ -292,8 +293,7 @@ ctx->iu.ue_ctx = ue_ctx; ctx->iu.ue_ctx->rab_assign_addr_enc = sgsn->cfg.iu.rab_assign_addr_enc; ctx->iu.new_key = 1; - snprintf(buf, sizeof(buf), "%" PRIu32, ue_ctx->conn_id); - ctx->iu.mm_state_fsm = osmo_fsm_inst_alloc(_state_iu_fsm, ctx, ctx, LOGL_DEBUG, buf); + osmo_fsm_inst_update_id_f(ctx->iu.mm_state_fsm, "%" PRIu32, ue_ctx->conn_id); return ctx; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 Gerrit-Change-Number: 15552 Gerrit-PatchSet: 7 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: lynxis lazus Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 ) Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm .. Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 Gerrit-Change-Number: 15552 Gerrit-PatchSet: 6 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sun, 29 Sep 2019 18:08:39 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 ) Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm .. Patch Set 6: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 Gerrit-Change-Number: 15552 Gerrit-PatchSet: 6 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Sat, 28 Sep 2019 21:02:33 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm
Hello pespin, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 to look at the new patch set (#5). Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm .. gprs_sgsn: always allocate Gb/Iu mm fsm When moving between RANs we need them at a later point. Allocate them always to not make the code (more) complex. Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 --- M src/sgsn/gprs_sgsn.c 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/52/15552/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 Gerrit-Change-Number: 15552 Gerrit-PatchSet: 5 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 ) Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 Gerrit-Change-Number: 15552 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Tue, 17 Sep 2019 17:56:57 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 ) Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm .. Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/15552/4/src/sgsn/gprs_sgsn.c File src/sgsn/gprs_sgsn.c: https://gerrit.osmocom.org/#/c/15552/4/src/sgsn/gprs_sgsn.c@250 PS4, Line 250: INIT_LLIST_HEAD(>pdp_list); maybe OSMO_ASSERT onboth, or gracefully cleanup if fsm_installoc fails? -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 Gerrit-Change-Number: 15552 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 17 Sep 2019 17:52:37 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 ) Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm .. Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 Gerrit-Change-Number: 15552 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 17 Sep 2019 17:52:08 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in ...osmo-sgsn[master]: gprs_sgsn: always allocate Gb/Iu mm fsm
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 Change subject: gprs_sgsn: always allocate Gb/Iu mm fsm .. gprs_sgsn: always allocate Gb/Iu mm fsm When moving between RANs we need them at a later point. Allocate them always to not make the code (more) complex. Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 --- M src/sgsn/gprs_sgsn.c 1 file changed, 4 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/52/15552/1 diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c index 465a5fa..ce06e7a 100644 --- a/src/sgsn/gprs_sgsn.c +++ b/src/sgsn/gprs_sgsn.c @@ -245,6 +245,8 @@ } ctx->gmm_fsm = osmo_fsm_inst_alloc(_fsm, ctx, ctx, LOGL_DEBUG, "gmm_fsm"); ctx->gmm_att_req.fsm = osmo_fsm_inst_alloc(_attach_req_fsm, ctx, ctx, LOGL_DEBUG, "gb_gmm_req"); + ctx->gb.mm_state_fsm = osmo_fsm_inst_alloc(_state_gb_fsm, ctx, ctx, LOGL_DEBUG, NULL); + ctx->iu.mm_state_fsm = osmo_fsm_inst_alloc(_state_iu_fsm, ctx, ctx, LOGL_DEBUG, NULL); INIT_LLIST_HEAD(>pdp_list); llist_add(>list, _mm_ctxts); @@ -256,7 +258,6 @@ const struct gprs_ra_id *raid) { struct sgsn_mm_ctx *ctx; - char buf[32]; ctx = sgsn_mm_ctx_alloc(tlli); if (!ctx) @@ -266,8 +267,7 @@ ctx->ran_type = MM_CTX_T_GERAN_Gb; ctx->gb.tlli = tlli; ctx->ciph_algo = sgsn->cfg.cipher; - snprintf(buf, sizeof(buf), "%" PRIu32, tlli); - ctx->gb.mm_state_fsm = osmo_fsm_inst_alloc(_state_gb_fsm, ctx, ctx, LOGL_DEBUG, buf); + osmo_fsm_inst_update_id_f(ctx->gb.mm_state_fsm, "%" PRIu32, tlli); LOGMMCTXP(LOGL_DEBUG, ctx, "Allocated with %s cipher.\n", get_value_string(gprs_cipher_names, ctx->ciph_algo)); @@ -278,7 +278,6 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc_iu(void *uectx) { #if BUILD_IU - char buf[32]; struct sgsn_mm_ctx *ctx; struct ranap_ue_conn_ctx *ue_ctx = uectx; @@ -292,8 +291,7 @@ ctx->iu.ue_ctx = ue_ctx; ctx->iu.ue_ctx->rab_assign_addr_enc = sgsn->cfg.iu.rab_assign_addr_enc; ctx->iu.new_key = 1; - snprintf(buf, sizeof(buf), "%" PRIu32, ue_ctx->conn_id); - ctx->iu.mm_state_fsm = osmo_fsm_inst_alloc(_state_iu_fsm, ctx, ctx, LOGL_DEBUG, buf); + osmo_fsm_inst_update_id_f(ctx->iu.mm_state_fsm, "%" PRIu32, ue_ctx->conn_id); return ctx; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15552 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I1724790335b0820f153a0cbdb5cfd1cfea36d1e9 Gerrit-Change-Number: 15552 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-MessageType: newchange