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

May 2023

  • 1 participants
  • 2583 discussions
[S] Change in libosmo-gprs[master]: sm: Fix pdp_act_cnf.accepted flag value swapped
by pespin 04 May '23

04 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32592 ) Change subject: sm: Fix pdp_act_cnf.accepted flag value swapped ...................................................................... sm: Fix pdp_act_cnf.accepted flag value swapped Change-Id: Ieb7b4ce7121b82c40dbd16a50981390b47d94c82 --- M src/sm/sm.c 1 file changed, 10 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/sm/sm.c b/src/sm/sm.c index 4e07f94..1f87f4e 100644 --- a/src/sm/sm.c +++ b/src/sm/sm.c @@ -208,7 +208,7 @@ sm_prim_tx = gprs_sm_prim_alloc_smreg_pdp_act_cnf(); sm_prim_tx->smreg.ms_id = sme->ms->ms_id; - sm_prim_tx->smreg.pdp_act_cnf.accepted = (cause != 0); + sm_prim_tx->smreg.pdp_act_cnf.accepted = (cause == 0); sm_prim_tx->smreg.pdp_act_cnf.nsapi = sme->nsapi; sm_prim_tx->smreg.pdp_act_cnf.pco_len = sme->pco_len; if (sme->pco_len) -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32592 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ieb7b4ce7121b82c40dbd16a50981390b47d94c82 Gerrit-Change-Number: 32592 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-gprs[master]: sm: Fix encoding of dynamic IP address in PDPActCtxReq
by pespin 04 May '23

04 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32582 ) Change subject: sm: Fix encoding of dynamic IP address in PDPActCtxReq ...................................................................... sm: Fix encoding of dynamic IP address in PDPActCtxReq Change-Id: I2d830604d9d9a3f6939926ab67967d5527fdf5c3 --- M src/sm/sm_pdu.c M tests/sm/sm_prim_test.ok 2 files changed, 38 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/sm/sm_pdu.c b/src/sm/sm_pdu.c index e866a33..f8512c0 100644 --- a/src/sm/sm_pdu.c +++ b/src/sm/sm_pdu.c @@ -1,4 +1,4 @@ -/* SM PDUs, 3GPP TS 9.5 24.008 Session Management Messages */ +/* SM PDUs, 3GPP TS 24.008 Session Management Messages */ /* (C) 2023 by Sysmocom s.f.m.c. GmbH * * All Rights Reserved @@ -60,6 +60,7 @@ const struct osmo_sockaddr *pdp_addr_v6) { memset(out, 0, sizeof(*out)); + unsigned int len = 2; out->spare = 0x00; out->organization = GPRS_SM_PDP_ADDR_ORG_IETF; @@ -67,18 +68,34 @@ switch (pdp_addr_ietf_type) { case OSMO_GPRS_SM_PDP_ADDR_IETF_IPV6: - memcpy(out->addr6, pdp_addr_v6->u.sin6.sin6_addr.s6_addr, sizeof(out->addr6)); - return 2 + sizeof(out->addr6); + if (pdp_addr_v6) { + memcpy(out->addr6, pdp_addr_v6->u.sin6.sin6_addr.s6_addr, sizeof(out->addr6)); + len += sizeof(out->addr6); + } + break; case OSMO_GPRS_SM_PDP_ADDR_IETF_IPV4V6: - out->both.addr = pdp_addr_v4->u.sin.sin_addr.s_addr; - memcpy(out->both.addr6, pdp_addr_v6->u.sin6.sin6_addr.s6_addr, sizeof(out->both.addr6)); - return 2 + sizeof(out->both.addr) + sizeof(out->both.addr6); + if (pdp_addr_v4) { + out->both.addr = pdp_addr_v4->u.sin.sin_addr.s_addr; + len += sizeof(out->both.addr); + if (pdp_addr_v6) { + memcpy(out->both.addr6, pdp_addr_v6->u.sin6.sin6_addr.s6_addr, sizeof(out->both.addr6)); + len += sizeof(out->both.addr6); + } + } else if (pdp_addr_v6) { + memcpy(out->addr6, pdp_addr_v6->u.sin6.sin6_addr.s6_addr, sizeof(out->addr6)); + len += sizeof(out->addr6); + } + break; case OSMO_GPRS_SM_PDP_ADDR_IETF_IPV4: default: /* All other values shall be interpreted as IPv4 address in this version of the protocol */ - out->addr = pdp_addr_v4->u.sin.sin_addr.s_addr; - return 2 + sizeof(out->both.addr); + if (pdp_addr_v4) { + out->addr = pdp_addr_v4->u.sin.sin_addr.s_addr; + len += sizeof(out->both.addr); + } + break; } + return len; } int gprs_sm_pdp_addr_dec(const struct gprs_sm_pdp_addr *pdp_addr, @@ -153,7 +170,7 @@ return 0; } -/* Chapter 9.4.1: Attach request */ +/* Chapter 9.5.1: Activate PDP Context Request */ int gprs_sm_build_act_pdp_ctx_req(struct gprs_sm_entity *sme, struct msgb *msg) { @@ -180,8 +197,8 @@ l = msgb_put(msg, 1); /* len */ *l = gprs_sm_pdp_addr_enc_ietf((struct gprs_sm_pdp_addr *)msg->tail, sme->pdp_addr_ietf_type, - &sme->pdp_addr_v4, - &sme->pdp_addr_v6); + !osmo_sockaddr_is_any(&sme->pdp_addr_v4) ? &sme->pdp_addr_v4 : NULL, + !osmo_sockaddr_is_any(&sme->pdp_addr_v6) ? &sme->pdp_addr_v6 : NULL); msgb_put(msg, *l); /* 10.5.6.1 Access point name (Optional) */ diff --git a/tests/sm/sm_prim_test.ok b/tests/sm/sm_prim_test.ok index 0ea44bb..33f7291 100644 --- a/tests/sm/sm_prim_test.ok +++ b/tests/sm/sm_prim_test.ok @@ -1,6 +1,6 @@ ==== test_sm_prim_ms() [start] ==== test_sm_prim_gmm_down_cb(): Rx GMMSM-ESTABLISH.request sess_id=0 -test_sm_prim_gmm_down_cb(): Rx GMMSM-UNITDATA.request sess_id=0 SMPDU=[8a 41 06 03 01 00 06 01 21 00 00 00 00 28 04 27 01 00 ] +test_sm_prim_gmm_down_cb(): Rx GMMSM-UNITDATA.request sess_id=0 SMPDU=[8a 41 06 03 01 00 02 01 21 28 04 27 01 00 ] test_sm_prim_sndcp_up_cb(): Rx SNSM-ACTIVATE.indication test_sm_prim_up_cb(): Rx SMREG-PDP_ACTIVATE.confirm ==== test_sm_prim_ms() [end] ==== -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32582 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I2d830604d9d9a3f6939926ab67967d5527fdf5c3 Gerrit-Change-Number: 32582 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-gprs[master]: gmm: Rework sess_id to identify one GMME
by pespin 04 May '23

04 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32580 ) Change subject: gmm: Rework sess_id to identify one GMME ...................................................................... gmm: Rework sess_id to identify one GMME The GMM layer doesn't really have to differentiate between SM connections, everything is sent over the LLC "GMM" SAPI. However, we still want to identify/related a given MS if there are multiple MS using the stack. Change-Id: Ib757f016824d918ce8b74ae0c2a652a6c1823556 --- M include/osmocom/gprs/gmm/gmm_ms_fsm.h M include/osmocom/gprs/gmm/gmm_private.h M src/gmm/gmm.c M src/gmm/gmm_ms_fsm.c M src/gmm/gmm_prim.c 5 files changed, 32 insertions(+), 41 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/gmm/gmm_ms_fsm.h b/include/osmocom/gprs/gmm/gmm_ms_fsm.h index 516801e..078c535 100644 --- a/include/osmocom/gprs/gmm/gmm_ms_fsm.h +++ b/include/osmocom/gprs/gmm/gmm_ms_fsm.h @@ -48,9 +48,6 @@ bool with_imsi; bool explicit_att; /* true if by SMREG-ATTACH.req requested it */ bool implicit_att; /* true if GMMSM-ESTABLISH.req requested it */ - /* Session Ids waiting for attach to happen during implicit_att: */ - uint32_t sess_id[16]; - uint8_t num_sess_id; /* Retransmission of ATTACH REQUEST (T3310) */ uint8_t req_attempts; }; @@ -78,8 +75,7 @@ int gprs_gmm_ms_fsm_ctx_request_attach(struct gprs_gmm_ms_fsm_ctx *ctx, enum osmo_gprs_gmm_attach_type attach_type, bool attach_with_imsi, - bool explicit_attach, - uint32_t sess_id); + bool explicit_attach); int gprs_gmm_ms_fsm_ctx_request_detach(struct gprs_gmm_ms_fsm_ctx *ctx, enum osmo_gprs_gmm_detach_ms_type detach_type, diff --git a/include/osmocom/gprs/gmm/gmm_private.h b/include/osmocom/gprs/gmm/gmm_private.h index bdff1c1..6abf3be 100644 --- a/include/osmocom/gprs/gmm/gmm_private.h +++ b/include/osmocom/gprs/gmm/gmm_private.h @@ -20,6 +20,8 @@ /* 3GPP TS 44.064 ยง 8.3 TLLI assignment procedures */ #define GPRS_GMM_TLLI_UNASSIGNED (0xffffffff) +#define GPRS_GMM_SESS_ID_UNASSIGNED (0xffffffff) + extern int g_gmm_log_cat[_OSMO_GPRS_GMM_LOGC_MAX]; #define LOGGMM(lvl, fmt, args...) LOGP(g_gmm_log_cat[OSMO_GPRS_GMM_LOGC_GMM], lvl, fmt, ## args) @@ -53,6 +55,7 @@ struct llist_head list; /* item in (struct gprs_gmm_ctx)->gmme_list */ struct gprs_gmm_ms_fsm_ctx ms_fsm; + uint32_t sess_id; /* Used to identify the GMME in GMMSM SAP */ uint32_t ptmsi; uint32_t old_ptmsi; uint32_t tlli; diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index 8f54f04..980f8f4 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -149,6 +149,7 @@ return NULL; } + gmme->sess_id = GPRS_GMM_SESS_ID_UNASSIGNED; gmme->ptmsi = ptmsi; gmme->old_ptmsi = GSM_RESERVED_TMSI; gmme->old_tlli = GPRS_GMM_TLLI_UNASSIGNED; diff --git a/src/gmm/gmm_ms_fsm.c b/src/gmm/gmm_ms_fsm.c index 85aa6bf..6f82815 100644 --- a/src/gmm/gmm_ms_fsm.c +++ b/src/gmm/gmm_ms_fsm.c @@ -132,14 +132,11 @@ if (att.implicit_att) { /* Submit GMMSM-ESTABLISH-CNF as per TS 24.007 Annex C.3 */ - unsigned int i; - for (i = 0; i < att.num_sess_id; i++) { - rc = gprs_gmm_submit_gmmsm_establish_cnf(ctx->gmme, - att.sess_id[i], - false, cause); - if (rc < 0) - return; - } + rc = gprs_gmm_submit_gmmsm_establish_cnf(ctx->gmme, + ctx->gmme->sess_id, + false, cause); + if (rc < 0) + return; } break; case GPRS_GMM_MS_EV_ATTACH_ACCEPTED: @@ -153,12 +150,9 @@ } if (ctx->attach.implicit_att) { /* Submit GMMSM-ESTABLISH-CNF as per TS 24.007 Annex C.3 */ - unsigned int i; - for (i = 0; i < ctx->attach.num_sess_id; i++) { - rc = gprs_gmm_submit_gmmsm_establish_cnf(ctx->gmme, ctx->attach.sess_id[i], true, 0); - if (rc < 0) - return; - } + rc = gprs_gmm_submit_gmmsm_establish_cnf(ctx->gmme, ctx->gmme->sess_id, true, 0); + if (rc < 0) + return; } break; case GPRS_GMM_MS_EV_DETACH_REQUESTED: @@ -419,8 +413,7 @@ int gprs_gmm_ms_fsm_ctx_request_attach(struct gprs_gmm_ms_fsm_ctx *ctx, enum osmo_gprs_gmm_attach_type attach_type, bool attach_with_imsi, - bool explicit_attach, - uint32_t sess_id) + bool explicit_attach) { int rc; @@ -431,23 +424,6 @@ else ctx->attach.implicit_att = true; - if (!explicit_attach) { - unsigned int i; - bool found = false; - if (ctx->attach.num_sess_id == ARRAY_SIZE(ctx->attach.sess_id)) - return -ENOMEM; - for (i = 0; i < ctx->attach.num_sess_id; i++) { - if (sess_id == ctx->attach.sess_id[i]) { - found = true; - break; - } - } - if (!found) { - ctx->attach.sess_id[ctx->attach.num_sess_id] = sess_id; - ctx->attach.num_sess_id++; - } - } - rc = osmo_fsm_inst_dispatch(ctx->fi, GPRS_GMM_MS_EV_ATTACH_REQUESTED, NULL); return rc; } diff --git a/src/gmm/gmm_prim.c b/src/gmm/gmm_prim.c index 2d53a0a..8f8d218 100644 --- a/src/gmm/gmm_prim.c +++ b/src/gmm/gmm_prim.c @@ -389,7 +389,7 @@ rc = gprs_gmm_ms_fsm_ctx_request_attach(&gmme->ms_fsm, gmm_prim->gmmreg.attach_req.attach_type, gmm_prim->gmmreg.attach_req.attach_with_imsi, - true, 0); + true); return rc; } @@ -485,6 +485,8 @@ gmme = gprs_gmm_gmme_find_or_create_by_ptmsi_imsi(gmm_prim->gmmsm.establish_req.ptmsi, gmm_prim->gmmsm.establish_req.imsi); OSMO_ASSERT(gmme); + /* Identify this GMME with this sess_id in GMMSM SAP from now on: */ + gmme->sess_id = gmm_prim->gmmsm.sess_id; if (gmme->ms_fsm.fi->state == GPRS_GMM_MS_ST_REGISTERED) { rc = gprs_gmm_submit_gmmsm_establish_cnf(gmme, gmm_prim->gmmsm.sess_id, true, 0); @@ -499,8 +501,7 @@ rc = gprs_gmm_ms_fsm_ctx_request_attach(&gmme->ms_fsm, gmm_prim->gmmsm.establish_req.attach_type, gmm_prim->gmmsm.establish_req.attach_with_imsi, - false, - gmm_prim->gmmsm.sess_id); + false); return rc; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32580 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ib757f016824d918ce8b74ae0c2a652a6c1823556 Gerrit-Change-Number: 32580 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-gprs[master]: gmm: Implement GMMSM-UNITDATA.ind
by pespin 04 May '23

04 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32581 ) Change subject: gmm: Implement GMMSM-UNITDATA.ind ...................................................................... gmm: Implement GMMSM-UNITDATA.ind Change-Id: Ib1ac220292c61419a65f27fa88a731357728459d --- M include/osmocom/gprs/gmm/gmm_private.h M src/gmm/gmm.c M src/gmm/gmm_prim.c M tests/gmm/gmm_prim_test.c M tests/gmm/gmm_prim_test.err M tests/gmm/gmm_prim_test.ok 6 files changed, 91 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/gmm/gmm_private.h b/include/osmocom/gprs/gmm/gmm_private.h index 6abf3be..df97e1d 100644 --- a/include/osmocom/gprs/gmm/gmm_private.h +++ b/include/osmocom/gprs/gmm/gmm_private.h @@ -106,6 +106,7 @@ struct gprs_gmm_entity *gprs_gmm_find_gmme_by_ptmsi(uint32_t ptmsi); struct gprs_gmm_entity *gprs_gmm_find_gmme_by_imsi(const char *imsi); struct gprs_gmm_entity *gprs_gmm_find_gmme_by_tlli(uint32_t tlli); +struct gprs_gmm_entity *gprs_gmm_find_gmme_by_sess_id(uint32_t id); uint32_t gprs_gmm_alloc_rand_tlli(void); int gprs_gmm_rx(struct gprs_gmm_entity *gmme, struct gsm48_hdr *gh, unsigned int len); int gprs_gmm_tx_att_req(struct gprs_gmm_entity *gmme, diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index 980f8f4..0070dda 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -236,6 +236,17 @@ return NULL; } +struct gprs_gmm_entity *gprs_gmm_find_gmme_by_sess_id(uint32_t id) +{ + struct gprs_gmm_entity *gmme; + + llist_for_each_entry(gmme, &g_gmm_ctx->gmme_list, list) { + if (gmme->sess_id == id) + return gmme; + } + return NULL; +} + uint32_t gprs_gmm_alloc_rand_tlli(void) { /* 3GPP TS 23.003 Table 1: Type of TLLI = Random TLLI_ @@ -754,10 +765,6 @@ int gprs_gmm_rx(struct gprs_gmm_entity *gmme, struct gsm48_hdr *gh, unsigned int len) { int rc = 0; - if (len < sizeof(struct gsm48_hdr)) { - LOGGMME(gmme, LOGL_ERROR, "Rx GMM message too short! len=%u\n", len); - return -EINVAL; - } switch (gh->msg_type) { case GSM48_MT_GMM_ATTACH_ACK: diff --git a/src/gmm/gmm_prim.c b/src/gmm/gmm_prim.c index 8f8d218..573b568 100644 --- a/src/gmm/gmm_prim.c +++ b/src/gmm/gmm_prim.c @@ -508,10 +508,29 @@ /* TS 24.007 9.5.1.5 GMMSM-Unitdata.request:*/ static int gprs_gmm_prim_handle_gmmsm_unitdata_req(struct osmo_gprs_gmm_prim *gmm_prim) { + struct osmo_gprs_llc_prim *llc_prim; int rc; + struct gprs_gmm_entity *gmme; - rc = gprs_gmm_prim_handle_unsupported(gmm_prim); + gmme = gprs_gmm_find_gmme_by_sess_id(gmm_prim->gmmsm.sess_id); + if (!gmme) { + LOGGMM(LOGL_ERROR, "No GMME with sess_id=%u found\n", + gmm_prim->gmmsm.sess_id); + return -ENOENT; + } + llc_prim = osmo_gprs_llc_prim_alloc_ll_unitdata_req( + gmme->tlli, OSMO_GPRS_LLC_SAPI_GMM, + gmm_prim->gmmsm.unitdata_req.smpdu, + gmm_prim->gmmsm.unitdata_req.smpdu_len); + llc_prim->ll.unitdata_req.radio_prio = gmme->radio_prio; + /* TODO: + llc_prim->ll.qos_params[3]; + llc_prim->ll.apply_gea; + llc_prim->ll.apply_gia; + */ + + rc = gprs_gmm_prim_call_llc_down_cb(llc_prim); return rc; } @@ -660,15 +679,39 @@ { struct gprs_gmm_entity *gmme; int rc = 0; + struct gsm48_hdr *gh = (struct gsm48_hdr *)llc_prim->ll.l3_pdu; + unsigned int len = llc_prim->ll.l3_pdu_len; + uint8_t pdisc; + struct osmo_gprs_gmm_prim *gmm_prim; + gmme = gprs_gmm_find_gmme_by_tlli(llc_prim->ll.tlli); if (!gmme) { LOGGMM(LOGL_NOTICE, "Rx %s: Unknown TLLI 0x%08x\n", osmo_gprs_llc_prim_name(llc_prim), llc_prim->ll.tlli); return -ENOENT; } - rc = gprs_gmm_rx(gmme, - (struct gsm48_hdr *)llc_prim->ll.l3_pdu, - llc_prim->ll.l3_pdu_len); + + if (len < sizeof(struct gsm48_hdr)) { + LOGGMME(gmme, LOGL_ERROR, "Rx GMM message too short! len=%u\n", len); + return -EINVAL; + } + + pdisc = gsm48_hdr_pdisc(gh); + + switch (pdisc) { + case GSM48_PDISC_MM_GPRS: + rc = gprs_gmm_rx(gmme, gh, len); + break; + case GSM48_PDISC_SM_GPRS: + /* Forward up to SM layer: */ + gmm_prim = gprs_gmm_prim_alloc_gmmsm_unitdata_ind(gmme->sess_id, + (uint8_t *)gh, + len); + rc = gprs_gmm_prim_call_up_cb(gmm_prim); + break; + default: + OSMO_ASSERT(0); + } return rc; } diff --git a/tests/gmm/gmm_prim_test.c b/tests/gmm/gmm_prim_test.c index acf1e22..7bc02b0 100644 --- a/tests/gmm/gmm_prim_test.c +++ b/tests/gmm/gmm_prim_test.c @@ -204,6 +204,12 @@ gmm_prim->gmmsm.establish_cnf.accepted, gmm_prim->gmmsm.establish_cnf.rej.cause); break; + case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_UNITDATA, PRIM_OP_INDICATION): + printf("%s(): Rx %s sess_id=%u sm_pdu=%s\n", __func__, pdu_name, + gmm_prim->gmmsm.sess_id, + osmo_hexdump(gmm_prim->gmmsm.unitdata_ind.smpdu, + gmm_prim->gmmsm.unitdata_ind.smpdu_len)); + break; //case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_DETACH, PRIM_OP_CONFIRM): // printf("%s(): Rx %s detach_type='%s'\n", __func__, pdu_name, // osmo_gprs_gmm_detach_ms_type_name(gmm_prim->gmmsm.detach_cnf.detach_type)); @@ -355,6 +361,7 @@ char *imei = "42342342342342"; char *imeisv = "4234234234234275"; uint32_t sess_id = 1234; + uint8_t sm_pdu[] = {GSM48_PDISC_SM_GPRS, 0x28, 0x29, 0x30}; /* fake SM PDU */ printf("==== %s() [start] ====\n", __func__); @@ -400,7 +407,18 @@ /* As a result, MS answers GMM Attach Complete */ /* As a result, MS submits GMMSM Establish.cnf */ - /* ... */ + /* SM layer submits Activate PDP Context Req: */ + gmm_prim = osmo_gprs_gmm_prim_alloc_gmmsm_unitdata_req(sess_id, sm_pdu, sizeof(sm_pdu)); + rc = osmo_gprs_gmm_prim_upper_down(gmm_prim); + OSMO_ASSERT(rc == 0); + /* As a result, GMM submits LLC-LL-UNITDATA.req */ + + /* Network answers with Activate PDP Ctx Accept, LLC submits the pdu up to GMM: */ + llc_prim = gprs_llc_prim_alloc_ll_unitdata_ind(rand_tlli, OSMO_GPRS_LLC_SAPI_GMM, sm_pdu, sizeof(sm_pdu)); + OSMO_ASSERT(llc_prim); + rc = osmo_gprs_gmm_prim_llc_lower_up(llc_prim); + OSMO_ASSERT(rc == 0); + /* As a result, GMM submits GMMSM-UNITDATA.ind */ /* DEACT: TODO */ diff --git a/tests/gmm/gmm_prim_test.err b/tests/gmm/gmm_prim_test.err index d589876..7aca515 100644 --- a/tests/gmm/gmm_prim_test.err +++ b/tests/gmm/gmm_prim_test.err @@ -46,3 +46,5 @@ DLGLOBAL INFO GMME(IMSI-1234567890:PTMSI-ea711b41:TLLI-ea711b41) Tx GMM ATTACH COMPL DLGLOBAL INFO GMM_MS{RegisteredInitiated}: Received Event ATTACH_ACCEPTED DLGLOBAL INFO GMM_MS{RegisteredInitiated}: state_chg to Registered +DLGLOBAL INFO Rx from upper layers: GMMSM-UNITDATA.request +DLGLOBAL INFO Rx from lower layers: LL-UNITDATA.indication diff --git a/tests/gmm/gmm_prim_test.ok b/tests/gmm/gmm_prim_test.ok index 156a282..e37507e 100644 --- a/tests/gmm/gmm_prim_test.ok +++ b/tests/gmm/gmm_prim_test.ok @@ -22,4 +22,6 @@ test_gmm_prim_down_cb(): Rx GMRR-ASSIGN.request old_tlli=0x80001234 new_tlli=0xea711b41 test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[08 03 ] test_gmm_prim_up_cb(): Rx GMMSM-ESTABLISH.confirm sess_id=1234 accepted=1 rej_cause=0 +test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xea711b41 SAPI=GMM l3=[0a 28 29 30 ] +test_gmm_prim_up_cb(): Rx GMMSM-UNITDATA.indication sess_id=1234 sm_pdu=0a 28 29 30 ==== test_gmm_prim_ms_gmmsm() [end] ==== -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32581 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ib1ac220292c61419a65f27fa88a731357728459d Gerrit-Change-Number: 32581 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: sm: Fix pdp_act_cnf.accepted flag value swapped
by pespin 04 May '23

04 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32592 ) Change subject: sm: Fix pdp_act_cnf.accepted flag value swapped ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32592 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ieb7b4ce7121b82c40dbd16a50981390b47d94c82 Gerrit-Change-Number: 32592 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 04 May 2023 09:50:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-gprs[master]: sndcp: Initiate LL-XID.req only if we have something to send at L3
by pespin 04 May '23

04 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32591 ) Change subject: sndcp: Initiate LL-XID.req only if we have something to send at L3 ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32591 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I324d841ae4d725d55d2807067cdd56c4457fa941 Gerrit-Change-Number: 32591 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 04 May 2023 09:50:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-gprs[master]: sndcp: Allow cb users taking ownership of primitives
by pespin 04 May '23

04 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32586 ) Change subject: sndcp: Allow cb users taking ownership of primitives ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32586 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ie3ddc835d8393e934d3f357108c81f639247c485 Gerrit-Change-Number: 32586 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 04 May 2023 09:50:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-gprs[master]: llc: use GRR instead of BSSGP to tx XID.req in MS mode
by pespin 04 May '23

04 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32585 ) Change subject: llc: use GRR instead of BSSGP to tx XID.req in MS mode ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32585 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ib2ada2cc7160202f9da5b177da8263076e1eef69 Gerrit-Change-Number: 32585 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 04 May 2023 09:50:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-gprs[master]: sm: Avoid freeing the SME object too quickly
by pespin 04 May '23

04 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32584 ) Change subject: sm: Avoid freeing the SME object too quickly ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32584 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I28655fc6286c92403e3e461cb6433b8567e20fd1 Gerrit-Change-Number: 32584 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 04 May 2023 09:50:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-gprs[master]: sm: Implement rx Act PDP Ctx Rej
by pespin 04 May '23

04 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32583 ) Change subject: sm: Implement rx Act PDP Ctx Rej ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32583 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ib534ebc2a3a0674675621da2f8bd0de218a08ef0 Gerrit-Change-Number: 32583 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 04 May 2023 09:50:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • ...
  • 259
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.