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 uploaded this change for review. ( 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 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, 16 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/35/15535/1 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..a0c6fc3 100644 --- a/src/sgsn/gprs_gb.c +++ b/src/sgsn/gprs_gb.c @@ -34,6 +34,11 @@ #include <osmocom/sgsn/gprs_sm.h> #include <osmocom/sgsn/debug.h> +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 +55,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..5ef7a12 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,11 @@ /* FIXME: move this RA_ID up to the LLME or even higher */ bssgp_parse_cell_id(&sne->ra_id, msgb_bcid(msg)); + /* We should only receive data packages for a valid MM */ + mmctx = sgsn_mm_ctx_by_tlli(msgb_tlli(msg), &sne->ra_id); + OSMO_ASSERT(mmctx); + 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: 1 Gerrit-Owner: lynxis lazus <lynxis at fe80.eu> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190916/a9231c61/attachment.htm>