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]: rlcmac: P1,P2 Rest Octets: Add missing final padding to definitions
by pespin 29 May '23

29 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32999 ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: rlcmac: P1,P2 Rest Octets: Add missing final padding to definitions ...................................................................... rlcmac: P1,P2 Rest Octets: Add missing final padding to definitions Change-Id: I26f1405bd99a7c1aba0782a25e22a69943493a69 --- M src/rlcmac/csn1_ts_44_018.c M tests/rlcmac/csn1_ts_44_018_test.err M tests/rlcmac/rlcmac_prim_test.err 3 files changed, 14 insertions(+), 3 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rlcmac/csn1_ts_44_018.c b/src/rlcmac/csn1_ts_44_018.c index 40275f4..3606346 100644 --- a/src/rlcmac/csn1_ts_44_018.c +++ b/src/rlcmac/csn1_ts_44_018.c @@ -113,6 +113,8 @@ M_UINT_LH (P1_Rest_Octets_t, Packet_Page_Indication_1, 1), M_UINT_LH (P1_Rest_Octets_t, Packet_Page_Indication_2, 1), + /* TODO: Additions for Rel-6,7,8,10,11,12,13,14,15 */ + M_PADDING_BITS (IA_RestOctets_t), CSN_DESCR_END (P1_Rest_Octets_t) static const @@ -134,6 +136,8 @@ M_UINT (P2_Rest_Octets_t, Priority3, 3), M_UINT_LH (P2_Rest_Octets_t, Packet_Page_Indication_3, 1), + /* TODO: Additions for Rel-6,10,11,13,14,15 */ + M_PADDING_BITS (IA_RestOctets_t), CSN_DESCR_END (P2_Rest_Octets_t) static const diff --git a/tests/rlcmac/csn1_ts_44_018_test.err b/tests/rlcmac/csn1_ts_44_018_test.err index 0f3d92b..20ec5a8 100644 --- a/tests/rlcmac/csn1_ts_44_018_test.err +++ b/tests/rlcmac/csn1_ts_44_018_test.err @@ -8,5 +8,4 @@ DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.hh = 3 | : u.hh | u.UplinkDownlinkAssignment = 0 | : u.UplinkDownlinkAssignment | ul_dl.Packet_Downlink_ImmAssignment = 1 | : ul_dl.Packet_Downlink_ImmAssignment | TLLI = 0xd6e1ae5a | Exist_TFI_to_TA_VALID = 1 | TFI_ASSIGNMENT = 3 | RLC_MODE = 0 | Exist_ALPHA = 0 | GAMMA = 15 | POLLING = 0 | TA_VALID = 0 | Exist_TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | Exist_P0_PR_MODE = 1 | P0 = 0 | BTS_PWR_CTRL_MODE = 0 | PR_MODE = 1 | Exist_AdditionsR99 = 0 | : End ul_dl.Packet_Downlink_ImmAssignment | : End u.UplinkDownlinkAssignment | Exist_AdditionsR10 = 0 | Exist_AdditionsR13 = 0 | : End u.hh | Padding = 0|86|86|-22| DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | lh0x = 0 | : lh0x | u.EGPRS_PktUlAss = 0 | : u.EGPRS_PktUlAss | ExtendedRA = 12 | AccessTechnologyType = Exist | AccessTechnologyType = 0 | AccessTechnologyType = Exist | AccessTechnologyType = 3 | AccessTechnologyType = 0 | Access.OnePhaseAccess = 1 | : Access.OnePhaseAccess | TFI_ASSIGNMENT = 7 | POLLING = 0 | Allocation.DynamicAllocation = 0 | : Allocation.DynamicAllocation | USF = 3 | USF_GRANULARITY = 0 | Exist_P0_PR_MODE = 0 | : End Allocation.DynamicAllocation | EGPRS_CHANNEL_CODING_COMMAND = 2 | TLLI_BLOCK_CHANNEL_CODING = 1 | Exist_BEP_PERIOD2 = 1 | BEP_PERIOD2 = 5 | RESEGMENT = 1 | EGPRS_WindowSize = 4 | Exist_ALPHA = 0 | GAMMA = 13 | Exist_TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | : End Access.OnePhaseAccess | : End u.EGPRS_PktUlAss | : End lh0x | : AdditionsR13 | Exist_AdditionsR13 = 0 | : End AdditionsR13 | : End u.lh | Padding = 0|172|172|-22| DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | lh0x = 0 | : lh0x | u.EGPRS_PktUlAss = 0 | : u.EGPRS_PktUlAss | ExtendedRA = 8 | AccessTechnologyType = Exist | AccessTechnologyType = 0 | AccessTechnologyType = Exist | AccessTechnologyType = 3 | AccessTechnologyType = 0 | Access.TwoPhaseAccess = 0 | : Access.TwoPhaseAccess | Exist_ALPHA = 0 | GAMMA = 13 | : TBF_STARTING_TIME | N32 = 20 | N51 = 45 | N26 = 0 | : End TBF_STARTING_TIME | NR_OF_RADIO_BLOCKS_ALLOCATED = 1 | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.TwoPhaseAccess | : End u.EGPRS_PktUlAss | : End lh0x | : AdditionsR13 | Exist_AdditionsR13 = 0 | : End AdditionsR13 | : End u.lh | Padding = 0|86|86|86|86|-22| -DLCSN1 INFO osmo_csn1_stream_decode (P1 Rest Octets): Exist_NLN_PCH_and_NLN_status = 0 | Exist_Priority1 = 0 | Exist_Priority2 = 0 | Exist_Group_Call_information = 0 | Packet_Page_Indication_1 = 1 | Packet_Page_Indication_2 = 1 | -DLGLOBAL NOTICE P1 Rest Octets: 74 remaining bits unhandled by decoder +DLCSN1 INFO osmo_csn1_stream_decode (P1 Rest Octets): Exist_NLN_PCH_and_NLN_status = 0 | Exist_Priority1 = 0 | Exist_Priority2 = 0 | Exist_Group_Call_information = 0 | Packet_Page_Indication_1 = 1 | Packet_Page_Indication_2 = 1 | Padding = 0|172|172|172|172|172|172|172|172|-22| diff --git a/tests/rlcmac/rlcmac_prim_test.err b/tests/rlcmac/rlcmac_prim_test.err index 12e64d4..a02739a 100644 --- a/tests/rlcmac/rlcmac_prim_test.err +++ b/tests/rlcmac/rlcmac_prim_test.err @@ -801,5 +801,4 @@ DLGLOBAL INFO DL_TBF_ASS{IDLE}: Allocated DLGLOBAL DEBUG Rx from lower layers: L1CTL-CCCH_DATA.indication DLGLOBAL INFO Rx Paging Request Type 1 -DLGLOBAL NOTICE P1 Rest Octets: 74 remaining bits unhandled by decoder DLGLOBAL INFO DL_TBF_ASS{IDLE}: Deallocated -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32999 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I26f1405bd99a7c1aba0782a25e22a69943493a69 Gerrit-Change-Number: 32999 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-gprs[master]: gmm: Implement P-TMSI Reallocation Cmd/Compl
by pespin 29 May '23

29 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32997 ) Change subject: gmm: Implement P-TMSI Reallocation Cmd/Compl ...................................................................... gmm: Implement P-TMSI Reallocation Cmd/Compl Change-Id: I1bf8bf5f4299db7b026fed2e2c21c07f15690942 --- M include/osmocom/gprs/gmm/gmm_pdu.h M src/gmm/gmm.c M src/gmm/gmm_pdu.c M tests/gmm/gmm_prim_test.c 4 files changed, 155 insertions(+), 14 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_pdu.h b/include/osmocom/gprs/gmm/gmm_pdu.h index a0a840f..249c94f 100644 --- a/include/osmocom/gprs/gmm/gmm_pdu.h +++ b/include/osmocom/gprs/gmm/gmm_pdu.h @@ -25,6 +25,7 @@ struct msgb *msg); int gprs_gmm_build_attach_compl(struct gprs_gmm_entity *gmme, struct msgb *msg); +int gprs_gmm_build_ptmsi_realloc_compl(struct gprs_gmm_entity *gmme, struct msgb *msg); int gprs_gmm_build_identity_resp(struct gprs_gmm_entity *gmme, uint8_t mi_type, diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index 141ef79..1944b86 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -480,6 +480,17 @@ return rc; } +static void gprs_gmm_gmme_update_allocated_ptmsi(struct gprs_gmm_entity *gmme, uint32_t new_ptmsi) +{ + gmme->old_ptmsi = gmme->ptmsi; + gmme->ptmsi = new_ptmsi; + /* TS 24.008 4.7.1.4.1:"Upon receipt of the assigned P-TMSI, the MS + * shall derive the local TLLI from this P-TMSI and shall use it for + * addressing at lower layers": */ + gmme->old_tlli = gmme->tlli; + gmme->tlli = gprs_tmsi2tlli(gmme->ptmsi, TLLI_LOCAL); +} + /* Tx Identity Response, 9.2.11 */ static int gprs_gmm_tx_id_resp(struct gprs_gmm_entity *gmme, uint8_t mi_type) @@ -650,6 +661,39 @@ return rc; } +/* Tx GMM Atach Complete, 9.4.3 */ +static int gprs_gmm_tx_ptmsi_realloc_compl(struct gprs_gmm_entity *gmme) +{ + struct osmo_gprs_llc_prim *llc_prim; + int rc; + struct msgb *msg; + + LOGGMME(gmme, LOGL_INFO, "Tx P-TMSI REALLOCATION COMPL\n"); + + llc_prim = osmo_gprs_llc_prim_alloc_ll_unitdata_req( + gmme->tlli, OSMO_GPRS_LLC_SAPI_GMM, NULL, GPRS_GMM_ALLOC_SIZE); + msg = llc_prim->oph.msg; + msg->l3h = msg->tail; + rc = gprs_gmm_build_ptmsi_realloc_compl(gmme, msg); + if (rc < 0) { + msgb_free(msg); + return -EBADMSG; + } + llc_prim->ll.l3_pdu = msg->l3h; + llc_prim->ll.l3_pdu_len = msgb_l3len(msg); + /* TODO: + llc_prim->ll.qos_params.*; + llc_prim->ll.radio_prio; + llc_prim->ll.apply_gea; + llc_prim->ll.apply_gia; + */ + + rc = gprs_gmm_prim_call_llc_down_cb(llc_prim); + if (rc < 0) + return rc; + return rc; +} + /* Tx GMM Routing area update request, 9.4.14 */ int gprs_gmm_tx_rau_req(struct gprs_gmm_entity *gmme, enum gprs_gmm_upd_type rau_type) @@ -777,13 +821,7 @@ LOGGMME(gmme, LOGL_ERROR, "Cannot decode P-TMSI\n"); goto rejected; } - gmme->old_ptmsi = gmme->ptmsi; - gmme->ptmsi = mi.tmsi; - /* TS 24.008 4.7.1.4.1:"Upon receipt of the assigned P-TMSI, the MS - * shall derive the local TLLI from this P-TMSI and shall use it for - * addressing at lower layers": */ - gmme->old_tlli = gmme->tlli; - gmme->tlli = gprs_tmsi2tlli(gmme->ptmsi, TLLI_LOCAL); + gprs_gmm_gmme_update_allocated_ptmsi(gmme, mi.tmsi); } if (TLVP_PRES_LEN(&tp, GSM48_IE_GMM_TIMER_T3302, 1)) @@ -938,13 +976,7 @@ LOGGMME(gmme, LOGL_ERROR, "Cannot decode P-TMSI\n"); goto rejected; } - gmme->old_ptmsi = gmme->ptmsi; - gmme->ptmsi = mi.tmsi; - /* TS 24.008 4.7.1.4.1:"Upon receipt of the assigned P-TMSI, the MS - * shall derive the local TLLI from this P-TMSI and shall use it for - * addressing at lower layers": */ - gmme->old_tlli = gmme->tlli; - gmme->tlli = gprs_tmsi2tlli(gmme->ptmsi, TLLI_LOCAL); + gprs_gmm_gmme_update_allocated_ptmsi(gmme, mi.tmsi); } /* FIXME! what to do it PTMSI changes? probably need to update other layers... Check GPRS ATTACH ACCEPT func */ @@ -1034,6 +1066,75 @@ return gprs_gmm_tx_id_resp(gmme, id_type); } +/* Rx GMM P-TMSI reallocation command, 9.4.7 */ +static int gprs_gmm_rx_ptmsi_realloc_cmd(struct gprs_gmm_entity *gmme, const struct gsm48_hdr *gh, unsigned int len) +{ + const uint8_t *buf = &gh->data[0]; + uint8_t mi_len; + struct osmo_mobile_identity mi; + bool force_standby_indicated; + struct tlv_parsed tp; + int rc; + + if (len != 15) { + LOGGMME(gmme, LOGL_ERROR, "Rx GMM P-TMSI REALLOCATION COMMAND with wrong size %u\n", len); + goto rejected; + } + + mi_len = *buf; + if (mi_len != 5) + goto rejected; + buf++; + if (osmo_mobile_identity_decode(&mi, buf, mi_len, false) || mi.type != GSM_MI_TYPE_TMSI) { + LOGGMME(gmme, LOGL_ERROR, "Rx GMM P-TMSI REALLOCATION COMMAND: Cannot decode P-TMSI\n"); + goto rejected; + } + gprs_gmm_gmme_update_allocated_ptmsi(gmme, mi.tmsi); + buf += mi_len; + + gsm48_parse_ra(&gmme->ra, (const uint8_t *)buf); + buf += 6; + + force_standby_indicated = (*buf >> 4) == 0x01; + if (force_standby_indicated) + gprs_gmm_gmme_ready_timer_stop(gmme); + buf++; + + /* Optional: */ + if (len > (buf - (uint8_t *)gh)) { + rc = gprs_gmm_tlv_parse(&tp, buf, len - (buf - (uint8_t *)gh)); + if (rc < 0) { + LOGGMME(gmme, LOGL_ERROR, "Rx GMM P-TMSI REALLOCATION COMMAND: failed to parse TLVs %d\n", rc); + goto rejected; + } + + /* 10.5.5.8 P-TMSI signature */ + if (TLVP_PRESENT(&tp, GSM48_IE_GMM_PTMSI_SIG)) { + const uint8_t *ptmsi_sig = TLVP_VAL(&tp, GSM48_IE_GMM_PTMSI_SIG); + gmme->ptmsi_sig = (ptmsi_sig[0] << 8) | (ptmsi_sig[1] << 4) | ptmsi_sig[2]; + } else { + gmme->ptmsi_sig = GSM_RESERVED_TMSI; + } + + /* TODO: 10.5.5.35 DCN-ID */ + } + + /* Submit LLGMM-ASSIGN-REQ as per TS 24.007 Annex C.1 */ + rc = gprs_gmm_submit_llgmm_assing_req(gmme); + if (rc < 0) + goto rejected; + + /* Submit GMMRR-ASSIGN-REQ as per TS 24.007 Annex C.1 */ + rc = gprs_gmm_submit_gmmrr_assing_req(gmme); + if (rc < 0) + goto rejected; + + return gprs_gmm_tx_ptmsi_realloc_compl(gmme); + +rejected: + return -EINVAL; /* TODO: what to do on error? */ +} + /* Rx GMM Authentication and ciphering request, 9.4.9 */ static int gprs_gmm_rx_auth_ciph_req(struct gprs_gmm_entity *gmme, struct gsm48_hdr *gh, unsigned int len) { @@ -1120,6 +1221,9 @@ case GSM48_MT_GMM_ID_REQ: rc = gprs_gmm_rx_id_req(gmme, gh, len); break; + case GSM48_MT_GMM_PTMSI_REALL_CMD: + rc = gprs_gmm_rx_ptmsi_realloc_cmd(gmme, gh, len); + break; case GSM48_MT_GMM_AUTH_CIPH_REQ: rc = gprs_gmm_rx_auth_ciph_req(gmme, gh, len); break; diff --git a/src/gmm/gmm_pdu.c b/src/gmm/gmm_pdu.c index ae0baef..d213e70 100644 --- a/src/gmm/gmm_pdu.c +++ b/src/gmm/gmm_pdu.c @@ -284,6 +284,17 @@ return 0; } +/* 9.4.8 P-TMSI reallocation complete */ +int gprs_gmm_build_ptmsi_realloc_compl(struct gprs_gmm_entity *gmme, struct msgb *msg) +{ + struct gsm48_hdr *gh; + + gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); + gh->proto_discr = GSM48_PDISC_MM_GPRS; + gh->msg_type = GSM48_MT_GMM_PTMSI_REALL_COMPL; + return 0; +} + /* Chapter 9.4.14: Routing area update request */ int gprs_gmm_build_rau_req(struct gprs_gmm_entity *gmme, enum gprs_gmm_upd_type rau_type, diff --git a/tests/gmm/gmm_prim_test.c b/tests/gmm/gmm_prim_test.c index 89f621c..50d40d8 100644 --- a/tests/gmm/gmm_prim_test.c +++ b/tests/gmm/gmm_prim_test.c @@ -466,6 +466,22 @@ /* ... */ + /* Test Network sends P-TMSI Reallocation Cmd */ +#if 0 + /* TODO: find a pcap with a P-TMSI Reallocation Cmd */ + llc_prim = gprs_llc_prim_alloc_ll_unitdata_ind(tlli, OSMO_GPRS_LLC_SAPI_GMM, (uint8_t *)pdu_gmm_ptmsi_realloc_cmd, sizeof(pdu_gmm_ptmsi_realloc_cmd)); + OSMO_ASSERT(llc_prim); + rc = osmo_gprs_gmm_prim_llc_lower_up(llc_prim); + OSMO_ASSERT(rc == 0); + /* update the used ptmsi to align with what was assigned from the network: */ + ptmsi = 0xea711b41; + tlli = gprs_tmsi2tlli(ptmsi, TLLI_LOCAL); + /* As a result, MS answers GMM P-TMSI Reallocation Complete */ +#endif + + + /* ... */ + /* DETACH */ gmm_prim = osmo_gprs_gmm_prim_alloc_gmmreg_detach_req(); OSMO_ASSERT(gmm_prim); -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I1bf8bf5f4299db7b026fed2e2c21c07f15690942 Gerrit-Change-Number: 32997 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: gmm: Implement submitting GMMSM-RELEASE.ind when MS becomes detached
by pespin 29 May '23

29 May '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33000 ) Change subject: gmm: Implement submitting GMMSM-RELEASE.ind when MS becomes detached ...................................................................... gmm: Implement submitting GMMSM-RELEASE.ind when MS becomes detached Change-Id: I74176eba870b19b30666ab5deef5eb56f0f0fd83 --- M include/osmocom/gprs/gmm/gmm_private.h M src/gmm/gmm.c M src/gmm/gmm_ms_fsm.c M tests/gmm/gmm_prim_test.c M tests/gmm/gmm_prim_test.ok 5 files changed, 30 insertions(+), 7 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified 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 d93f724..df3f496 100644 --- a/include/osmocom/gprs/gmm/gmm_private.h +++ b/include/osmocom/gprs/gmm/gmm_private.h @@ -102,7 +102,7 @@ struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmrr_assign_req(uint32_t old_tlli, uint32_t new_tlli); struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_establish_cnf(uint32_t id, uint8_t cause); -struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmrr_release_ind(uint32_t id); +struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_release_ind(uint32_t id); struct osmo_gprs_gmm_prim *gprs_gmm_prim_alloc_gmmsm_unitdata_ind(uint32_t id, uint8_t *smpdu, unsigned int smpdu_len); /* gmm.c: */ @@ -131,6 +131,7 @@ int gprs_gmm_submit_gmmreg_attach_cnf(struct gprs_gmm_entity *gmme, bool accepted, uint8_t cause); int gprs_gmm_submit_gmmsm_establish_cnf(struct gprs_gmm_entity *gmme, bool accepted, uint8_t cause); +int gprs_gmm_submit_gmmsm_release_ind(struct gprs_gmm_entity *gmme); int gprs_gmm_submit_llgmm_assing_req(const struct gprs_gmm_entity *gmme); /* misc.c */ diff --git a/src/gmm/gmm.c b/src/gmm/gmm.c index ade4059..2fb341e 100644 --- a/src/gmm/gmm.c +++ b/src/gmm/gmm.c @@ -453,6 +453,16 @@ return rc; } +int gprs_gmm_submit_gmmsm_release_ind(struct gprs_gmm_entity *gmme) +{ + struct osmo_gprs_gmm_prim *gmm_prim_tx; + int rc; + + gmm_prim_tx = gprs_gmm_prim_alloc_gmmsm_release_ind(gmme->sess_id); + rc = gprs_gmm_prim_call_up_cb(gmm_prim_tx); + return rc; +} + static int gprs_gmm_submit_gmmrr_assing_req(struct gprs_gmm_entity *gmme) { struct osmo_gprs_gmm_prim *gmm_prim_tx; @@ -911,8 +921,6 @@ if (force_standby_indicated) gprs_gmm_gmme_ready_timer_stop(gmme); - /* TODO: submit GMMSM-RELEASE-IND */ - /* Submit LLGMM-ASSIGN-REQ as per TS 24.007 Annex C.3 */ gmme->old_tlli = gmme->tlli; gmme->tlli = GPRS_GMM_TLLI_UNASSIGNED; diff --git a/src/gmm/gmm_ms_fsm.c b/src/gmm/gmm_ms_fsm.c index 95e421b..a344494 100644 --- a/src/gmm/gmm_ms_fsm.c +++ b/src/gmm/gmm_ms_fsm.c @@ -89,6 +89,10 @@ memset(&ctx->attach, 0, sizeof(ctx->attach)); gprs_gmm_gmme_t3312_stop(ctx->gmme); + + /* TS 24.007 9.5.1.4: informs SM layerthat the MS has been GPRS detached, e.g. by timer expiry */ + if (prev_state != GPRS_GMM_MS_ST_NULL) + gprs_gmm_submit_gmmsm_release_ind(ctx->gmme); } static void st_gmm_ms_deregistered(struct osmo_fsm_inst *fi, uint32_t event, void *data) diff --git a/tests/gmm/gmm_prim_test.c b/tests/gmm/gmm_prim_test.c index 50d40d8..27b9336 100644 --- a/tests/gmm/gmm_prim_test.c +++ b/tests/gmm/gmm_prim_test.c @@ -294,10 +294,10 @@ 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)); - // break; + case OSMO_PRIM(OSMO_GPRS_GMM_GMMSM_RELEASE, PRIM_OP_INDICATION): + printf("%s(): Rx %s sess_id=%u\n", __func__, pdu_name, + gmm_prim->gmmsm.sess_id); + break; default: printf("%s(): Unexpected Rx %s\n", __func__, pdu_name); OSMO_ASSERT(0) diff --git a/tests/gmm/gmm_prim_test.ok b/tests/gmm/gmm_prim_test.ok index 6cf672a..2ff27f6 100644 --- a/tests/gmm/gmm_prim_test.ok +++ b/tests/gmm/gmm_prim_test.ok @@ -23,6 +23,7 @@ test_gmm_prim_llc_down_cb(): Rx LL-UNITDATA.request TLLI=0xec999002 SAPI=GMM l3=[08 05 20 0a 00 05 f4 ec 99 90 02 ] test_gmm_prim_llc_down_cb(): Rx LLGMM-ASSIGN.request old_TLLI=0xec999002 new_TLLI=0xffffffff test_gmm_prim_up_cb(): Rx GMMREG-DETACH.confirm detach_type='GPRS detach' +test_gmm_prim_up_cb(): Rx GMMSM-RELEASE.indication sess_id=4294967295 ==== test_gmm_prim_ms_gmmreg() [end] ==== ==== test_gmm_prim_ms_gmmsm() [start] ==== sys={0.000000}, mono={0.000000}: clock_override_set -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I74176eba870b19b30666ab5deef5eb56f0f0fd83 Gerrit-Change-Number: 33000 Gerrit-PatchSet: 4 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]: gmm: Implement submitting GMMSM-RELEASE.ind when MS becomes detached
by pespin 29 May '23

29 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33000 ) Change subject: gmm: Implement submitting GMMSM-RELEASE.ind when MS becomes detached ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33000 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I74176eba870b19b30666ab5deef5eb56f0f0fd83 Gerrit-Change-Number: 33000 Gerrit-PatchSet: 4 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-Comment-Date: Mon, 29 May 2023 17:37:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-gprs[master]: gmm: Stop READY timer upon receiving force_stdby IE
by pespin 29 May '23

29 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32998 ) Change subject: gmm: Stop READY timer upon receiving force_stdby IE ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32998 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I44d0f69571f6425fef74a10602001aca4ecb5716 Gerrit-Change-Number: 32998 Gerrit-PatchSet: 4 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-Comment-Date: Mon, 29 May 2023 17:37:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-gprs[master]: gmm: Implement P-TMSI Reallocation Cmd/Compl
by pespin 29 May '23

29 May '23
Attention is currently required from: osmith. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32997 ) Change subject: gmm: Implement P-TMSI Reallocation Cmd/Compl ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I1bf8bf5f4299db7b026fed2e2c21c07f15690942 Gerrit-Change-Number: 32997 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Mon, 29 May 2023 17:37:24 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmo-bts[master]: FR/HR/EFR TCH DL: implement DTX rules
by falconia 29 May '23

29 May '23
falconia has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32714 ) Change subject: FR/HR/EFR TCH DL: implement DTX rules ...................................................................... FR/HR/EFR TCH DL: implement DTX rules GSM 06.31, 06.41 and 06.81 are the respective DTX specs for FR, HR and EFR. In each of these specs, section 5.1.2 specifies the expected shape of radio downlink in the presence of SIDs: one SID frame after each talkspurt (after speech frames), and one SID frame in every SACCH-aligned position every 480 ms (every 240 ms for HR), or if the actual SACCH-aligned position is taken up by FACCH, then just one SID frame as soon as possible after that FACCH - and no transmitted SID frames in other positions. This just-referenced spec section was written with the assumption that it will only be applied when DTXd is enabled - however, if the RTP stream for call leg B DL comes from call leg A UL (TrFO), then we are going to receive SID frames in the stream intended for our DL even when DTXd is disabled or not supported altogether. The easiest solution is to apply FR/HR/EFR DTXd logic whenever the incoming RTP stream contains SID frames, irrespective of physical DTXd enable/disable state. If we apply such "logical DTXd" when physical DTXd is disabled, the BTS model PHY will end up transmitting induced BFIs (dummy FACCH or inverted CRC3) in those frame positions where the "logical DTXd" function says "please transmit nothing". The point remains, however, that the prescribed SID shape on the radio downlink (expected positions of SID frames) won't happen on its own: in the case of TrFO, whichever SID frames are present will be in wrong positions for leg B DL, and even in the case of transcoded calls the responsibility for DL SID shaping cannot be placed on the RTP stream source because that source won't know where SACCH alignment will lie. Therefore, the necessary DL SID reshaping has to be done in the RTP stream receiver in OsmoBTS. Related: OS#5996 Change-Id: I924ab21952dcf8bb03ba7ccef790474bf66fc9e5 --- M include/osmo-bts/lchan.h M src/common/l1sap.c 2 files changed, 324 insertions(+), 18 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve falconia: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h index d89aa1f..d17bf96 100644 --- a/include/osmo-bts/lchan.h +++ b/include/osmo-bts/lchan.h @@ -8,6 +8,7 @@ #include <osmocom/core/linuxlist.h> #include <osmocom/core/logging.h> #include <osmocom/gsm/gsm_utils.h> +#include <osmocom/codec/codec.h> #include <osmocom/codec/ecu.h> #include <osmocom/gsm/lapdm.h> #include <osmocom/gsm/sysinfo.h> @@ -265,6 +266,19 @@ /* last UL SPEECH resume flag */ bool is_speech_resume; } dtx; + struct { + bool last_rtp_input_was_sid; + uint8_t last_sid[GSM_FR_BYTES]; + uint8_t last_sid_len; + uint8_t last_sid_age; + /* A SID was transmitted on the DL in the period + * beginning with the last transmitted speech frame + * or the last mandatory-Tx position, whichever was + * more recent. */ + bool dl_sid_transmitted; + /* The current frame in the DL is taken up by FACCH */ + bool dl_facch_stealing; + } dtx_fr_hr_efr; uint8_t last_cmr; uint32_t last_fn; diff --git a/src/common/l1sap.c b/src/common/l1sap.c index cc775d3..75177a5 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1164,6 +1164,7 @@ pp_msg = lapdm_phsap_dequeue_msg_facch(lchan, le, fn); else pp_msg = lapdm_phsap_dequeue_msg(le); + lchan->tch.dtx_fr_hr_efr.dl_facch_stealing = (pp_msg != NULL); } if (!pp_msg) { if (L1SAP_IS_LINK_SACCH(link_id)) { @@ -1217,26 +1218,259 @@ return 1; } -/* This helper function for l1sap_tch_rts_ind() preens incoming RTP frames - * for FR/EFR SID: if the received frame is a valid SID per the rules of - * GSM 06.31/06.81 section 6.1.1, it needs to be rejuvenated by clearing - * all reserved bits and resetting the SID code word to error-free 95 zeros - * for FR or 95 ones for EFR, and if the received frame is an invalid SID - * per the same rules, then we need to drop it. We return false if - * l1sap_tch_rts_ind() needs to drop this frame, otherwise true. */ -static bool rtppayload_sid_preen(struct gsm_lchan *lchan, struct msgb *msg) +/* The following static functions are helpers for l1sap_tch_rts_ind(), + * used only for FR/HR/EFR speech modes. For these speech TCH modes, + * if our incoming RTP stream includes SID frames, we need to apply + * the following transformations to the downlink frame stream we actually + * transmit: + * + * - We need to cache the last received SID and retransmit it in + * SACCH-aligned frame positions, or if the SACCH-aligned frame + * position was stolen by FACCH, then right after that FACCH. + * + * - That cached SID needs to be aged and expired, in accord with + * TS 28.062 section C.3.2.1.1 paragraph 5 - the paragraph concerning + * expiration of cached downlink SID. + * + * - In all other frame positions, extraneous SID frames need to be + * dropped - we send an empty payload to the BTS model, causing it + * to transmit an induced BFI condition on the air (fake DTXd), + * or perhaps real DTXd (actually turning off Tx) in the future. + */ + +/*! \brief Check if the given FN of TCH-RTS-IND corresponds to a mandatory + * SID position for non-AMR codecs that follow SACCH alignment. + * \param[in] lchan Logical channel on which we check scheduling + * \param[in] fn Frame Number for which we check scheduling + * \returns true if this FN is a mandatory SID position, false otherwise + */ +static inline bool fr_hr_efr_sid_position(struct gsm_lchan *lchan, uint32_t fn) { + /* See GSM 05.08 section 8.3 for frame numbers - but we are + * specifically looking for FNs corresponding to the beginning + * of the complete SID frame to be transmitted, rather than all FNs + * where we have to put out a non-suppressed burst. */ + switch (lchan->type) { + case GSM_LCHAN_TCH_F: + return fn % 104 == 52; + case GSM_LCHAN_TCH_H: + switch (lchan->nr) { + case 0: + return fn % 104 == 0 || fn % 104 == 52; + case 1: + return fn % 104 == 14 || fn % 104 == 66; + default: + return false; + } + default: + return false; + } +} + +/*! \brief This helper function implements DTXd input processing for FR/HR/EFR: + * we got an RTP input frame, now we need to check if it is SID or not, + * and update our DL SID reshaper state accordingly. + * \param[in] lchan Logical channel structure of the TCH we work with + * \param[in] resp_msg The input frame from RTP + * \param[out] sid_result Output flag indicating if the received frame is SID + * \returns true if the frame in resp_msg is good, false otherwise + */ +static bool fr_hr_efr_dtxd_input(struct gsm_lchan *lchan, struct msgb *resp_msg, + bool *sid_result) +{ + enum osmo_gsm631_sid_class sidc; + bool is_sid; + switch (lchan->tch_mode) { case GSM48_CMODE_SPEECH_V1: - if (lchan->type == GSM_LCHAN_TCH_F) - return osmo_fr_sid_preen(msg->data); - else - return true; /* FIXME: see OS#6036 */ + if (lchan->type == GSM_LCHAN_TCH_F) { + sidc = osmo_fr_sid_classify(msgb_l2(resp_msg)); + switch (sidc) { + case OSMO_GSM631_SID_CLASS_SPEECH: + is_sid = false; + break; + case OSMO_GSM631_SID_CLASS_INVALID: + /* TS 28.062 section C.3.2.1.1: invalid SIDs + * from call leg A UL are treated like BFIs. + * Drop this frame and act as if we got nothing + * at all from RTP for this FN. */ + return false; + case OSMO_GSM631_SID_CLASS_VALID: + is_sid = true; + /* The SID code word may have a one bit error - + * rejuvenate it. */ + osmo_fr_sid_reset(msgb_l2(resp_msg)); + break; + default: + /* SID classification per GSM 06.31 section + * 6.1.1 has only 3 possible outcomes. */ + OSMO_ASSERT(0); + } + } else { + /* The same kind of classification as we do in + * osmo_{fr,efr}_sid_classify() is impossible for HR: + * the equivalent ternary SID classification per + * GSM 06.41 can only be done in the UL-handling BTS, + * directly coupled to the GSM 05.03 channel decoder, + * and cannot be reconstructed downstream from frame + * payload bits. The only kind of SID we can detect + * here is the perfect, error-free kind. */ + is_sid = osmo_hr_check_sid(msgb_l2(resp_msg), + msgb_l2len(resp_msg)); + } + break; case GSM48_CMODE_SPEECH_EFR: - return osmo_efr_sid_preen(msg->data); + /* same logic as for FRv1 */ + sidc = osmo_efr_sid_classify(msgb_l2(resp_msg)); + switch (sidc) { + case OSMO_GSM631_SID_CLASS_SPEECH: + is_sid = false; + break; + case OSMO_GSM631_SID_CLASS_INVALID: + return false; + case OSMO_GSM631_SID_CLASS_VALID: + is_sid = true; + osmo_efr_sid_reset(msgb_l2(resp_msg)); + break; + default: + OSMO_ASSERT(0); + } + break; default: - return true; + /* This static function should never be called except for + * V1 and EFR speech modes. */ + OSMO_ASSERT(0); } + *sid_result = is_sid; + lchan->tch.dtx_fr_hr_efr.last_rtp_input_was_sid = is_sid; + if (is_sid) { + uint8_t copy_len; + + copy_len = OSMO_MIN(msgb_l2len(resp_msg), + ARRAY_SIZE(lchan->tch.dtx_fr_hr_efr.last_sid)); + memcpy(lchan->tch.dtx_fr_hr_efr.last_sid, + msgb_l2(resp_msg), copy_len); + lchan->tch.dtx_fr_hr_efr.last_sid_len = copy_len; + lchan->tch.dtx_fr_hr_efr.last_sid_age = 0; + } else { + /* We got a speech frame, not SID - therefore, the state flag + * of "we already transmitted a SID" needs to be cleared, + * so that the very first SID that follows this talkspurt + * will get transmitted right away, without waiting for + * the next mandatory SID position. */ + lchan->tch.dtx_fr_hr_efr.dl_sid_transmitted = false; + } + return true; +} + +/*! \brief This helper function implements DTXd output processing for FR/HR/EFR: + * here we update our state to deal with cached SID aging, mandatory-Tx + * frame positions and FACCH stealing, and we make the desired output + * transformations of either regurgitating a cached SID or vice-versa, + * dropping a SID we received from RTP. + * \param[in] lchan Logical channel structure of the TCH we work with + * \param[in] fn Frame Number for which we are preparing DL + * \param[in] current_input_is_sid Self-explanatory + * \param[in] resp_msg_p Pointer to l1sap_tch_rts_ind() internal variable + * \param[in] resp_l1sap_p ditto + * \param[in] empty_l1sap_p ditto + * + * This function gets called with pointers to l1sap_tch_rts_ind() internal + * variables and cannot be properly understood on its own, without + * understanding the parent function first. This situation is unfortunate, + * but it was the only way to factor the present logic out of + * l1sap_tch_rts_ind() main body. + */ +static void fr_hr_efr_dtxd_output(struct gsm_lchan *lchan, uint32_t fn, + bool current_input_is_sid, + struct msgb **resp_msg_p, + struct osmo_phsap_prim **resp_l1sap_p, + struct osmo_phsap_prim *empty_l1sap_p) +{ + struct msgb *resp_msg = *resp_msg_p; + bool sid_in_hand = current_input_is_sid; + + /* Are we at a mandatory-Tx frame position? If so, clear the state flag + * of "we already transmitted a SID in this window" - as of right now, + * a SID has _not_ been transmitted in the present window yet, and if + * we are in a DTX pause, we do need to transmit a SID update as soon + * as we are able to, FACCH permitting. */ + if (fr_hr_efr_sid_position(lchan, fn)) + lchan->tch.dtx_fr_hr_efr.dl_sid_transmitted = false; + + /* The next stanza implements logic that was originally meant to reside + * in the TFO block in TRAUs: if the source feeding us RTP is in a DTXu + * pause (resp_msg == NULL, meaning we got nothing from RTP) *and* the + * most recent RTP input we did get was a SID, and that SID hasn't + * expired, then we need to replicate that SID. */ + if (!resp_msg && lchan->tch.dtx_fr_hr_efr.last_rtp_input_was_sid && + lchan->tch.dtx_fr_hr_efr.last_sid_age < 47) { + /* Whatever we do further below, any time another 20 ms window + * has passed since the last SID was received in RTP, we have + * to age that cached SID. */ + lchan->tch.dtx_fr_hr_efr.last_sid_age++; + + /* The following conditional checking dl_sid_transmitted flag + * is peculiar to our sans-E1 architecture. In the original + * T1/E1 Abis architecture the TFO-enabled TRAU would repeat + * the cached SID from call leg A into *every* 20 ms frame in + * its Abis output, and then the BTS would select which ones + * it should transmit per the rules of GSM 06.31/06.81 section + * 5.1.2. But in our architecture it would be silly and + * wasteful to allocate and fill an msgb for this cached SID + * only to toss it later in the same function - hence the + * logic of section 5.1.2 is absorbed into the decision right + * here to proceed with cached SID regurgitation or not, + * in the form of the following conditional. */ + if (!lchan->tch.dtx_fr_hr_efr.dl_sid_transmitted) + resp_msg = l1sap_msgb_alloc(lchan->tch.dtx_fr_hr_efr.last_sid_len); + if (resp_msg) { + resp_msg->l2h = msgb_put(resp_msg, + lchan->tch.dtx_fr_hr_efr.last_sid_len); + memcpy(resp_msg->l2h, lchan->tch.dtx_fr_hr_efr.last_sid, + lchan->tch.dtx_fr_hr_efr.last_sid_len); + *resp_msg_p = resp_msg; + *resp_l1sap_p = msgb_l1sap_prim(resp_msg); + sid_in_hand = true; + } + } else if (resp_msg && sid_in_hand) { + /* This "else if" leg implements the logic of section 5.1.2 + * for cases when a SID is already present in the RTP input, + * as indicated by (resp_msg != NULL) and sid_in_hand being + * true. Because we are in the "else" clause of the big "if" + * above, this path executes only when the SID has come from + * RTP in _this_ frame, rather than regurgitated from cache. + * But be it fresh or cached, the rules of section 5.1.2 still + * apply, and if we've already transmitted a SID in the current + * window, then we need to suppress further SIDs and send + * an empty payload to the BTS model, causing the latter + * to transmit an induced BFI condition on the air. This + * strange-seeming behavior is needed so that the spec-compliant + * Rx DTX handler in the MS will produce the expected output, + * same as if the GSM network were the old-fashioned kind with + * Abis TRAUs and TFO. */ + if (lchan->tch.dtx_fr_hr_efr.dl_sid_transmitted) { + msgb_free(resp_msg); + resp_msg = NULL; + *resp_msg_p = NULL; + *resp_l1sap_p = empty_l1sap_p; + } + } + + /* The following conditional answers this question: are we actually + * transmitting a SID frame on the air right now, at this frame number? + * If we are certain the BTS model is going to transmit this SID, + * we set the state flag so we won't be transmitting any more SIDs + * until we either hit the next mandatory-Tx position or get another + * little talkspurt followed by new SID. The check for FACCH stealing + * is included because if the BTS model is going to transmit FACCH in + * the current FN, then we are not actually transmitting SID right now, + * and we still need to transmit a SID ASAP, as soon as the TCH becomes + * becomes free from FACCH activity. GSM 06.31/06.81 section 5.1.2 + * does mention that if the mandatory-Tx frame position is taken up + * by FACCH, then we need to send SID in the following frame. */ + if (resp_msg && sid_in_hand && !lchan->tch.dtx_fr_hr_efr.dl_facch_stealing) + lchan->tch.dtx_fr_hr_efr.dl_sid_transmitted = true; } /* TCH-RTS-IND prim received from bts model */ @@ -1249,6 +1483,7 @@ struct gsm_lchan *lchan; uint8_t chan_nr, marker = 0; uint32_t fn; + bool is_fr_hr_efr_sid = false; chan_nr = rts_ind->chan_nr; fn = rts_ind->fn; @@ -1278,10 +1513,6 @@ if (!resp_msg) { LOGPLCGT(lchan, &g_time, DL1P, LOGL_DEBUG, "DL TCH Tx queue underrun\n"); resp_l1sap = &empty_l1sap; - } else if (!rtppayload_sid_preen(lchan, resp_msg)) { - msgb_free(resp_msg); - resp_msg = NULL; - resp_l1sap = &empty_l1sap; } else { /* Obtain RTP header Marker bit from control buffer */ marker = rtpmsg_marker_bit(resp_msg); @@ -1290,6 +1521,27 @@ msgb_push(resp_msg, sizeof(*resp_l1sap)); resp_msg->l1h = resp_msg->data; resp_l1sap = msgb_l1sap_prim(resp_msg); + + /* FR/HR/EFR SID or non-SID input handling */ + if (lchan->tch_mode == GSM48_CMODE_SPEECH_V1 || + lchan->tch_mode == GSM48_CMODE_SPEECH_EFR) { + bool drop; + + drop = !fr_hr_efr_dtxd_input(lchan, resp_msg, + &is_fr_hr_efr_sid); + if (OSMO_UNLIKELY(drop)) { + msgb_free(resp_msg); + resp_msg = NULL; + resp_l1sap = &empty_l1sap; + } + } + } + + /* FR/HR/EFR DTXd output stage */ + if (lchan->tch_mode == GSM48_CMODE_SPEECH_V1 || + lchan->tch_mode == GSM48_CMODE_SPEECH_EFR) { + fr_hr_efr_dtxd_output(lchan, fn, is_fr_hr_efr_sid, &resp_msg, + &resp_l1sap, &empty_l1sap); } memset(resp_l1sap, 0, sizeof(*resp_l1sap)); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32714 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I924ab21952dcf8bb03ba7ccef790474bf66fc9e5 Gerrit-Change-Number: 32714 Gerrit-PatchSet: 9 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[L] Change in osmo-bts[master]: FR/HR/EFR TCH DL: implement DTX rules
by falconia 29 May '23

29 May '23
Attention is currently required from: fixeria, dexter. falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32714 ) Change subject: FR/HR/EFR TCH DL: implement DTX rules ...................................................................... Patch Set 8: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32714 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I924ab21952dcf8bb03ba7ccef790474bf66fc9e5 Gerrit-Change-Number: 32714 Gerrit-PatchSet: 8 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Mon, 29 May 2023 16:21:08 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmocom-bb[master]: trxcon/l1sched: cosmetic: use variable names like in osmo-bts-trx
by fixeria 29 May '23

29 May '23
Attention is currently required from: laforge. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32920 ) Change subject: trxcon/l1sched: cosmetic: use variable names like in osmo-bts-trx ...................................................................... Patch Set 4: (1 comment) Patchset: PS3: > is this a purely cosmetic change? if so, indicate in the subject, please. Done -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32920 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I8138a45cca4e9063bf7d36ebc920b20b755138dd Gerrit-Change-Number: 32920 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 29 May 2023 15:44:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: trxcon/l1sched: do not align Tx burst transmission
by fixeria 29 May '23

29 May '23
Attention is currently required from: fixeria. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/33006 to look at the new patch set (#3). Change subject: trxcon/l1sched: do not align Tx burst transmission ...................................................................... trxcon/l1sched: do not align Tx burst transmission This is no longer needed thanks to recent patch b0be904b. Change-Id: Ia397cbe16f719729a814b7ef0b7035c7fe8ba165 Related: b0be904b "trxcon: do not call l1sched_prim_dequeue() at ul_bid != 0" --- M src/host/trxcon/src/sched_lchan_pdtch.c M src/host/trxcon/src/sched_lchan_tchf.c M src/host/trxcon/src/sched_lchan_tchh.c M src/host/trxcon/src/sched_lchan_xcch.c 4 files changed, 18 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/06/33006/3 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ia397cbe16f719729a814b7ef0b7035c7fe8ba165 Gerrit-Change-Number: 33006 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • ...
  • 259
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.