This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15535 ) Change subject: sgsn: when receiving data PDU notify the Gb GMM fsm ...................................................................... sgsn: when receiving data PDU notify the Gb GMM fsm When receiving a PDU, the GMM fsm will change to state MM_READY and will re-arm the T3314 Relates: OS#1941 Change-Id: I78f40762fb17bbd4a6f35608a793f8e5271e9b86 --- M include/osmocom/sgsn/gprs_gb.h M src/sgsn/gprs_gb.c M src/sgsn/gprs_sndcp.c 3 files changed, 21 insertions(+), 2 deletions(-) Approvals: pespin: Looks good to me, approved osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/sgsn/gprs_gb.h b/include/osmocom/sgsn/gprs_gb.h index 3bc3676..47f2a31 100644 --- a/include/osmocom/sgsn/gprs_gb.h +++ b/include/osmocom/sgsn/gprs_gb.h @@ -3,7 +3,9 @@ #include <stdbool.h> #include <osmocom/core/msgb.h> -#include <osmocom/sgsn/gprs_rllc.h> +#include <osmocom/sgsn/gprs_llc.h> int gsm0408_gprs_rcvmsg_gb(struct msgb *msg, struct gprs_llc_llme *llme, bool drop_cipherable); +/* Has to be called whenever any PDU (signaling, data, ...) has been received */ +void gprs_gb_recv_pdu(struct sgsn_mm_ctx *mmctx); diff --git a/src/sgsn/gprs_gb.c b/src/sgsn/gprs_gb.c index 2d9c25a..9fa8e00 100644 --- a/src/sgsn/gprs_gb.c +++ b/src/sgsn/gprs_gb.c @@ -34,6 +34,12 @@ #include <osmocom/sgsn/gprs_sm.h> #include <osmocom/sgsn/debug.h> +/* Has to be called whenever any PDU (signaling, data, ...) has been received */ +void gprs_gb_recv_pdu(struct sgsn_mm_ctx *mmctx) { + if (mmctx->gb.llme) + osmo_fsm_inst_dispatch(mmctx->gb.mm_state_fsm, E_MM_PDU_RECEPTION, NULL); +} + /* Main entry point for incoming 04.08 GPRS messages from Gb */ int gsm0408_gprs_rcvmsg_gb(struct msgb *msg, struct gprs_llc_llme *llme, bool drop_cipherable) @@ -50,7 +56,7 @@ msgid2mmctx(mmctx, msg); rate_ctr_inc(&mmctx->ctrg->ctr[GMM_CTR_PKTS_SIG_IN]); mmctx->gb.llme = llme; - osmo_fsm_inst_dispatch(mmctx->gb.mm_state_fsm, E_MM_PDU_RECEPTION, NULL); + gprs_gb_recv_pdu(mmctx); } /* MMCTX can be NULL */ diff --git a/src/sgsn/gprs_sndcp.c b/src/sgsn/gprs_sndcp.c index d9aa1e5..01be57e 100644 --- a/src/sgsn/gprs_sndcp.c +++ b/src/sgsn/gprs_sndcp.c @@ -31,6 +31,7 @@ #include <osmocom/gprs/gprs_bssgp.h> #include <osmocom/sgsn/debug.h> +#include <osmocom/sgsn/gprs_gb.h> #include <osmocom/sgsn/gprs_llc.h> #include <osmocom/sgsn/sgsn.h> #include <osmocom/sgsn/gprs_sndcp.h> @@ -745,6 +746,7 @@ struct sndcp_common_hdr *sch = (struct sndcp_common_hdr *)hdr; struct sndcp_comp_hdr *scomph = NULL; struct sndcp_udata_hdr *suh; + struct sgsn_mm_ctx *mmctx; uint8_t *npdu; uint16_t npdu_num __attribute__((unused)); int npdu_len; @@ -778,6 +780,15 @@ /* FIXME: move this RA_ID up to the LLME or even higher */ bssgp_parse_cell_id(&sne->ra_id, msgb_bcid(msg)); + mmctx = sgsn_mm_ctx_by_tlli(msgb_tlli(msg), &sne->ra_id); + if (!mmctx) { + LOGP(DSNDCP, LOGL_ERROR, "Message for non-existing MM ctx " + "(lle=%p, TLLI=%08x, SAPI=%u, NSAPI=%u)\n", + lle, lle->llme->tlli, lle->sapi, sch->nsapi); + return -EIO; + } + gprs_gb_recv_pdu(mmctx); + if (scomph) { sne->defrag.pcomp = scomph->pcomp; sne->defrag.dcomp = scomph->dcomp; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15535 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I78f40762fb17bbd4a6f35608a793f8e5271e9b86 Gerrit-Change-Number: 15535 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: osmith <osmith at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190928/5d720ea0/attachment.htm>