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

October 2022

  • 2 participants
  • 2331 discussions
Change in osmo-pcu[master]: Rework tbf::update_ms()
by pespin 31 Oct '22

31 Oct '22
Attention is currently required from: fixeria, pespin. Hello osmith, Jenkins Builder, laforge, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/29846 to look at the new patch set (#5). Change subject: Rework tbf::update_ms() ...................................................................... Rework tbf::update_ms() That function was pretty confusing since it used a "enum gprs_rlcmac_tbf_direction dir" param (whose type is expected to describe the data direction of a TBF) to describe the direction of the the packet which triggered its call. The parameter was actually always called with "GPRS_RLCMAC_UL_TBF" which in this case meant "uplink direction" which meant "TLLI was updated from the MS, not the SGSN". The DL direction was only used in unit tests, which can hence be simply replaced by ms_confirm_tlli(), which this commit does. So this update_ms() function was actually used in practice in osmo-pcu to trigger update of TLLI and find duplicates only when an RLCMAC block (control or data) was received from the MS. Therefore, this function is renamed in this patch and moved to the gprs_ms class, since it really does nothing with the TBF. Related: OS#5700 Change-Id: I1b7c0fde15b9bb8a973068994dbe972285ad0aff --- M src/gprs_ms.c M src/gprs_ms.h M src/gprs_ms_storage.cpp M src/gprs_ms_storage.h M src/pdch.cpp M src/tbf.cpp M src/tbf.h M src/tbf_ul.cpp M tests/alloc/AllocTest.cpp M tests/tbf/TbfTest.cpp 10 files changed, 63 insertions(+), 44 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/46/29846/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29846 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1b7c0fde15b9bb8a973068994dbe972285ad0aff Gerrit-Change-Number: 29846 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-pcu[master]: update_ms(): Set TLLI of new MS object before merge with old MS
by pespin 31 Oct '22

31 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29925 ) Change subject: update_ms(): Set TLLI of new MS object before merge with old MS ...................................................................... update_ms(): Set TLLI of new MS object before merge with old MS This way it becomes clearer in logs that we are merging MS which contains the same TLLI. Change-Id: Ifd232daa4219e1726c30449d647312a3a226a61d --- M src/tbf.cpp M tests/tbf/TbfTest.err 2 files changed, 9 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/25/29925/1 diff --git a/src/tbf.cpp b/src/tbf.cpp index 58695d2..dfed320 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -215,6 +215,8 @@ void gprs_rlcmac_tbf::update_ms(uint32_t tlli, enum gprs_rlcmac_tbf_direction dir) { + GprsMs *old_ms = NULL; + if (tlli == GSM_RESERVED_TMSI) return; @@ -222,18 +224,17 @@ * MS object that belongs to that TLLI and if yes make sure one of them * gets deleted. This is the same problem that can arise with * IMSI in dl_tbf_handle() so there should be a unified solution */ - if (!ms_check_tlli(ms(), tlli)) { - GprsMs *old_ms; - + if (!ms_check_tlli(ms(), tlli)) old_ms = bts_ms_store(bts)->get_ms(tlli, GSM_RESERVED_TMSI, NULL); - if (old_ms) - ms_merge_and_clear_ms(ms(), old_ms); - } if (dir == GPRS_RLCMAC_UL_TBF) ms_set_tlli(ms(), tlli); else ms_confirm_tlli(ms(), tlli); + + if (old_ms) + ms_merge_and_clear_ms(ms(), old_ms); + /* old_ms may no longer be available here */ } static void tbf_unlink_pdch(struct gprs_rlcmac_tbf *tbf) diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index bde7940..fe7b628 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -2655,6 +2655,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=FLOW) BSN 0 storing in window (0..63) TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=FLOW) data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=FLOW) Decoded premier TLLI=0xf1223344 of UL DATA TFI=0. +Modifying MS object, UL TLLI: 0xffffffff -> 0xf1223344, not yet confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) free PDCH(bts=0,trx=0,ts=7) Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN), 1 TBFs, USFs = 01, TFIs = 00000001. MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0,) Detaching TBF: TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) @@ -2662,10 +2663,9 @@ TBF(DL-TFI_0){ASSIGN}: Deallocated UL_ASS_TBF(DL-TFI_0){NONE}: Deallocated DL_ASS_TBF(DL-TFI_0){NONE}: Deallocated -Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 1 +Modifying MS object, TLLI = 0xf1223344, MS class 0 -> 1 MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0,) Clearing MS object MS(TLLI=0xffffffff, IMSI=, TA=7, 1/0,) Destroying MS object -Modifying MS object, UL TLLI: 0xffffffff -> 0xf1223344, not yet confirmed TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Assembling frames: (len=20) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Frame 1 starts at offset 4, length=16, is_complete=1 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) complete UL frame len=16 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29925 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ifd232daa4219e1726c30449d647312a3a226a61d Gerrit-Change-Number: 29925 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: gprs_ms: Add comment warning the user that a ptr may be freed after c...
by pespin 31 Oct '22

31 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29927 ) Change subject: gprs_ms: Add comment warning the user that a ptr may be freed after call to func ...................................................................... gprs_ms: Add comment warning the user that a ptr may be freed after call to func Change-Id: Ifa3d6b38fca89500ef02c9b972f514ceaf8fe83b --- M src/gprs_ms.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/27/29927/1 diff --git a/src/gprs_ms.c b/src/gprs_ms.c index f1b0c6a..5bf929e 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -527,6 +527,7 @@ imsi, ms_tlli(old_ms)); ms_merge_and_clear_ms(ms, old_ms); + /* old_ms may no longer be available here */ } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29927 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ifa3d6b38fca89500ef02c9b972f514ceaf8fe83b Gerrit-Change-Number: 29927 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: Join ms_merge_and_clear_ms() and ms_merge_and_clear_ms()
by pespin 31 Oct '22

31 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29926 ) Change subject: Join ms_merge_and_clear_ms() and ms_merge_and_clear_ms() ...................................................................... Join ms_merge_and_clear_ms() and ms_merge_and_clear_ms() While at it, improve logging of the merge action Change-Id: I39d9eac159448fc3c3a4db9e1b9c5364e906a78f --- M src/gprs_ms.c M tests/tbf/TbfTest.err 2 files changed, 14 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/26/29926/1 diff --git a/src/gprs_ms.c b/src/gprs_ms.c index bf4d08a..f1b0c6a 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -402,9 +402,17 @@ ms->imsi[0] = '\0'; } -static void ms_merge_old_ms(struct GprsMs *ms, struct GprsMs *old_ms) +/* Merge 'old_ms' object into 'ms' object. + * 'old_ms' may be freed during the call to this function, don't use the pointer to it afterwards */ +void ms_merge_and_clear_ms(struct GprsMs *ms, struct GprsMs *old_ms) { + char old_ms_name[128]; OSMO_ASSERT(old_ms != ms); + ms_ref(old_ms); + + ms_name_buf(old_ms, old_ms_name, sizeof(old_ms_name)); + + LOGPMS(ms, DRLCMAC, LOGL_INFO, "Merge MS: %s\n", old_ms_name); if (strlen(ms_imsi(ms)) == 0 && strlen(ms_imsi(old_ms)) != 0) osmo_strlcpy(ms->imsi, ms_imsi(old_ms), sizeof(ms->imsi)); @@ -417,14 +425,6 @@ llc_queue_move_and_merge(&ms->llc_queue, &old_ms->llc_queue); - ms_reset(old_ms); -} - -void ms_merge_and_clear_ms(struct GprsMs *ms, struct GprsMs *old_ms) -{ - OSMO_ASSERT(old_ms != ms); - - ms_ref(old_ms); /* Clean up the old MS object */ /* TODO: Use timer? */ @@ -433,7 +433,7 @@ if (ms_dl_tbf(old_ms) && !tbf_timers_pending((struct gprs_rlcmac_tbf *)ms_dl_tbf(old_ms), T_MAX)) tbf_free((struct gprs_rlcmac_tbf *)ms_dl_tbf(old_ms)); - ms_merge_old_ms(ms, old_ms); + ms_reset(old_ms); ms_unref(old_ms); } diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index fe7b628..6a7ca38 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -617,6 +617,7 @@ Modifying MS object, TLLI = 0xf1000001, IMSI '001001000000001' -> '001001000000002' Modifying MS object, TLLI = 0xf1000002, IMSI '' -> '001001000000002' MS(TLLI=0xf1000002, IMSI=, TA=0, 45/0, DL) IMSI '001001000000002' was already assigned to another MS object: TLLI = 0xf1000001, that IMSI will be removed +MS(TLLI=0xf1000002, IMSI=, TA=0, 45/0, DL) Merge MS: MS(TLLI=0xf1000001, IMSI=001001000000002, TA=0, 45/0, DL) TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=FLOW) free PDCH(bts=0,trx=0,ts=4) Detaching TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=FLOW), 2 TBFs, USFs = 00, TFIs = 00000003. MS(TLLI=0xf1000001, IMSI=001001000000002, TA=0, 45/0,) Detaching TBF: TBF(TFI=0 TLLI=0xf1000001 DIR=DL STATE=FLOW) @@ -2314,6 +2315,7 @@ IMSI 0011223344, old TBF TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED): moving DL TBF to new MS object MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0, UL) Detaching TBF: TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) MS(TLLI=0xf5667788, IMSI=, TA=7, 1/0, UL) Attaching DL TBF: TBF(TFI=0 TLLI=0xf5667788 DIR=DL STATE=FINISHED) +MS(TLLI=0xf5667788, IMSI=, TA=7, 1/0, UL DL) Merge MS: MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0, UL) TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) free PDCH(bts=0,trx=0,ts=7) Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW), 2 TBFs, USFs = 03, TFIs = 00000003. MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0,) Detaching TBF: TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) @@ -2656,6 +2658,8 @@ TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=FLOW) data_length=20, data=f1 22 33 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 TBF(TFI=0 TLLI=0xffffffff DIR=UL STATE=FLOW) Decoded premier TLLI=0xf1223344 of UL DATA TFI=0. Modifying MS object, UL TLLI: 0xffffffff -> 0xf1223344, not yet confirmed +MS(TLLI=0xf1223344, IMSI=, TA=7, 0/0, UL) Merge MS: MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0, DL) +Modifying MS object, TLLI = 0xf1223344, MS class 0 -> 1 TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) free PDCH(bts=0,trx=0,ts=7) Detaching TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN), 1 TBFs, USFs = 01, TFIs = 00000001. MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0,) Detaching TBF: TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) @@ -2663,7 +2667,6 @@ TBF(DL-TFI_0){ASSIGN}: Deallocated UL_ASS_TBF(DL-TFI_0){NONE}: Deallocated DL_ASS_TBF(DL-TFI_0){NONE}: Deallocated -Modifying MS object, TLLI = 0xf1223344, MS class 0 -> 1 MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0,) Clearing MS object MS(TLLI=0xffffffff, IMSI=, TA=7, 1/0,) Destroying MS object TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW) Assembling frames: (len=20) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29926 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I39d9eac159448fc3c3a4db9e1b9c5364e906a78f Gerrit-Change-Number: 29926 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: WIP: Move UL allocation&assign functions to gprs_ms.c
by pespin 31 Oct '22

31 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29924 ) Change subject: WIP: Move UL allocation&assign functions to gprs_ms.c ...................................................................... WIP: Move UL allocation&assign functions to gprs_ms.c Change-Id: I256aeede2a2678c9738539fb6ec4db9766fa85e4 --- M src/bts.cpp M src/gprs_ms.c M src/gprs_ms.h M src/pdch.cpp M src/tbf.cpp M src/tbf.h M src/tbf_fsm.c M src/tbf_ul.cpp M src/tbf_ul.h 9 files changed, 69 insertions(+), 54 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/24/29924/1 diff --git a/src/bts.cpp b/src/bts.cpp index 2389987..31c2b0a 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -981,7 +981,7 @@ bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_UL_TBF_TWO_PHASE); } else { GprsMs *ms = bts_alloc_ms(bts, 0, chan_req.egprs_mslot_class); - tbf = tbf_alloc_ul_ccch(bts, ms); + tbf = ms_new_ul_tbf_assigned_agch(ms); if (!tbf) { /* Send RR Immediate Assignment Reject */ rc = -EBUSY; diff --git a/src/gprs_ms.c b/src/gprs_ms.c index 90e8289..bf4d08a 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -1056,6 +1056,46 @@ } +/* Alloc a UL TBF to be assigned over PACCH. Called when an MS requests to + * create a new UL TBF during the end of life of a previous UL TBF (or an SBA). + * In summary, this TBF is allocated as a consequence of receiving a "Pkt + * Resource Req" or "Pkt Ctrl Ack" from the MS. + * See TS 44.060 9.3.2.4.2 "Non-extended uplink TBF mode". + */ +struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_assigned_pacch(struct GprsMs *ms, int8_t use_trx) +{ + const bool single_slot = false; + struct gprs_rlcmac_ul_tbf *ul_tbf; + + ul_tbf = tbf_alloc_ul_tbf(ms->bts, ms, use_trx, single_slot); + if (!ul_tbf) { + LOGPMS(ms, DTBF, LOGL_NOTICE, "No PDCH resource\n"); + /* Caller will most probably send a Imm Ass Reject after return */ + return NULL; + } + osmo_fsm_inst_dispatch(tbf_state_fi(ul_tbf_as_tbf(ul_tbf)), TBF_EV_ASSIGN_ADD_PACCH, NULL); + /* Contention resolution is considered to be done since TLLI is known in MS */ + return ul_tbf; +} + +/* Alloc a UL TBF to be assigned over AGCH. Used by request of a "One phase + * packet access", where MS requested only 1 PDCH TS (TS 44.018 Table 9.1.8.1). */ +struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_assigned_agch(struct GprsMs *ms) +{ + const int8_t trx_no = -1; + const bool single_slot = true; + struct gprs_rlcmac_ul_tbf *ul_tbf; + + ul_tbf = tbf_alloc_ul_tbf(ms->bts, ms, trx_no, single_slot); + if (!ul_tbf) { + LOGP(DTBF, LOGL_NOTICE, "No PDCH resource for Uplink TBF\n"); + /* Caller will most probably send a Imm Ass Reject after return */ + return NULL; + } + osmo_fsm_inst_dispatch(tbf_state_fi(ul_tbf_as_tbf(ul_tbf)), TBF_EV_ASSIGN_ADD_CCCH, NULL); + return ul_tbf; +} + /* A new DL-TBF is allocated and assigned through PACCH using "tbf". * "tbf" may be either a UL-TBF or a DL-TBF. * Note: This should be called only when MS is reachable, see ms_is_reachable_for_dl_ass(). @@ -1088,7 +1128,6 @@ struct gprs_rlcmac_dl_tbf *dl_tbf; dl_tbf = dl_tbf_alloc(ms->bts, ms, trx_no, single_slot); - if (!dl_tbf) { LOGPMS(ms, DTBF, LOGL_NOTICE, "No PDCH resource\n"); return -EBUSY; diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 8014f26..53b0cd6 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -144,6 +144,8 @@ bool ms_nacc_rts(const struct GprsMs *ms); struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts); +struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_assigned_pacch(struct GprsMs *ms, int8_t use_trx); +struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_assigned_agch(struct GprsMs *ms); int ms_new_dl_tbf_assigned_on_pacch(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf); int ms_new_dl_tbf_assigned_on_pch(struct GprsMs *ms); int ms_append_llc_dl_data(struct GprsMs *ms, uint16_t pdu_delay_csec, const uint8_t *data, uint16_t len); diff --git a/src/pdch.cpp b/src/pdch.cpp index ad521e3..8dd7597 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -119,7 +119,7 @@ bts_do_rate_ctr_inc(bts, CTR_CHANNEL_REQUEST_DESCRIPTION); /* This call will register the new TBF with the MS on success */ - gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul_pacch(bts, tbf->ms(), tbf->trx->trx_no); + gprs_rlcmac_ul_tbf *ul_tbf = ms_new_ul_tbf_assigned_pacch(tbf->ms(), tbf->trx->trx_no); /* schedule uplink assignment or reject */ if (ul_tbf) { @@ -757,7 +757,7 @@ get_meas(meas, request); ms_update_l1_meas(ms, meas); - ul_tbf = tbf_alloc_ul_pacch(bts, ms, trx_no()); + ul_tbf = ms_new_ul_tbf_assigned_pacch(ms, trx_no()); if (!ul_tbf) { handle_tbf_reject(bts, ms, trx_no(), ts_no); goto return_unref; diff --git a/src/tbf.cpp b/src/tbf.cpp index d855083..58695d2 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -801,6 +801,11 @@ return (enum tbf_fsm_states)tbf->state_fsm.fi->state; } +struct osmo_fsm_inst *tbf_state_fi(const struct gprs_rlcmac_tbf *tbf) +{ + return tbf->state_fsm.fi; +} + struct osmo_fsm_inst *tbf_ul_ass_fi(const struct gprs_rlcmac_tbf *tbf) { return tbf->ul_ass_fsm.fi; diff --git a/src/tbf.h b/src/tbf.h index 65b131e..616c3e0 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -125,6 +125,7 @@ enum tbf_fsm_states tbf_state(const struct gprs_rlcmac_tbf *tbf); struct osmo_fsm_inst *tbf_ul_ass_fi(const struct gprs_rlcmac_tbf *tbf); struct osmo_fsm_inst *tbf_dl_ass_fi(const struct gprs_rlcmac_tbf *tbf); +struct osmo_fsm_inst *tbf_state_fi(const struct gprs_rlcmac_tbf *tbf); enum gprs_rlcmac_tbf_direction tbf_direction(const struct gprs_rlcmac_tbf *tbf); void tbf_set_ms(struct gprs_rlcmac_tbf *tbf, struct GprsMs *ms); struct llist_head *tbf_ms_list(struct gprs_rlcmac_tbf *tbf); diff --git a/src/tbf_fsm.c b/src/tbf_fsm.c index 9118fd7..a8e7886 100644 --- a/src/tbf_fsm.c +++ b/src/tbf_fsm.c @@ -99,8 +99,13 @@ switch (event) { case TBF_EV_ASSIGN_ADD_CCCH: mod_ass_type(ctx, GPRS_RLCMAC_FLAG_CCCH, true); - tbf_fsm_state_chg(fi, tbf_direction(ctx->tbf) == GPRS_RLCMAC_DL_TBF ? - TBF_ST_ASSIGN : TBF_ST_FLOW); + if (tbf_direction(ctx->tbf) == GPRS_RLCMAC_UL_TBF) { + struct gprs_rlcmac_ul_tbf *ul_tbf = tbf_as_ul_tbf(ctx->tbf); + tbf_fsm_state_chg(fi, TBF_ST_FLOW); + ul_tbf_contention_resolution_start(ul_tbf); + } else { + tbf_fsm_state_chg(fi, TBF_ST_ASSIGN); + } break; case TBF_EV_ASSIGN_ADD_PACCH: mod_ass_type(ctx, GPRS_RLCMAC_FLAG_PACCH, true); diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 7189b6f..6edf8be 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -104,7 +104,7 @@ } /* Generic function to alloc a UL TBF, later configured to be assigned either over CCCH or PACCH */ -struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot) +struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot) { struct gprs_rlcmac_ul_tbf *tbf; int rc; @@ -147,48 +147,6 @@ return tbf; } -/* Alloc a UL TBF to be assigned over PACCH. Called when an MS requests to - * create a new UL TBF during the end of life of a previous UL TBF (or an SBA). - * In summary, this TBF is allocated as a consequence of receiving a "Pkt - * Resource Req" or "Pkt Ctrl Ack" from the MS. - * See TS 44.060 9.3.2.4.2 "Non-extended uplink TBF mode". - */ -gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx) -{ - struct gprs_rlcmac_ul_tbf *tbf; - - tbf = tbf_alloc_ul_tbf(bts, ms, use_trx, false); - if (!tbf) { - LOGPMS(ms, DTBF, LOGL_NOTICE, "No PDCH resource\n"); - /* Caller will most probably send a Imm Ass Reject after return */ - return NULL; - } - /* Contention resolution is considered to be done since TLLI is known in MS: */ - tbf->m_contention_resolution_done = true; - osmo_fsm_inst_dispatch(tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_PACCH, NULL); - - return tbf; -} - -/* Alloc a UL TBF to be assigned over CCCH. Used by request of a "One phase - * packet access", where MS requested only 1 PDCH TS (TS 44.018 Table 9.1.8.1). */ -struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_ccch(struct gprs_rlcmac_bts *bts, struct GprsMs *ms) -{ - struct gprs_rlcmac_ul_tbf *tbf; - - tbf = tbf_alloc_ul_tbf(bts, ms, -1, true); - if (!tbf) { - LOGP(DTBF, LOGL_NOTICE, "No PDCH resource for Uplink TBF\n"); - /* Caller will most probably send a Imm Ass Reject after return */ - return NULL; - } - osmo_fsm_inst_dispatch(tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_CCCH, NULL); - tbf->contention_resolution_start(); - OSMO_ASSERT(tbf->ms()); - - return tbf; -} - /* Create a temporary dummy TBF to Tx a ImmAssReject if allocating a new one during * packet resource Request failed. This is similar as tbf_alloc_ul() but without * calling tbf->setup() (in charge of TFI/USF allocation), and reusing resources @@ -237,7 +195,7 @@ gprs_rlcmac_ul_tbf::gprs_rlcmac_ul_tbf(struct gprs_rlcmac_bts *bts_, GprsMs *ms) : gprs_rlcmac_tbf(bts_, ms, GPRS_RLCMAC_UL_TBF), m_rx_counter(0), - m_contention_resolution_done(false), + m_contention_resolution_done(true), m_ul_gprs_ctrs(NULL), m_ul_egprs_ctrs(NULL) { @@ -311,6 +269,7 @@ * timeout only for one-phase packet access, since two-phase is handled * through SBA structs, which are freed by the PDCH UL Controller if the * single allocated block is lost. */ + m_contention_resolution_done = false; T_START(this, T3141, 3141, "Contention resolution (UL-TBF, CCCH)", true); } void gprs_rlcmac_ul_tbf::contention_resolution_success() @@ -782,6 +741,11 @@ return tbf->ul_ack_fsm.fi; } +void ul_tbf_contention_resolution_start(struct gprs_rlcmac_ul_tbf *tbf) +{ + tbf->contention_resolution_start(); +} + void ul_tbf_contention_resolution_success(struct gprs_rlcmac_ul_tbf *tbf) { return tbf->contention_resolution_success(); diff --git a/src/tbf_ul.h b/src/tbf_ul.h index 59e5d66..0812b9d 100644 --- a/src/tbf_ul.h +++ b/src/tbf_ul.h @@ -121,9 +121,6 @@ return m_window.ws(); } -struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot); -struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_pacch(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx); -struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_ccch(struct gprs_rlcmac_bts *bts, struct GprsMs *ms); struct gprs_rlcmac_ul_tbf *handle_tbf_reject(struct gprs_rlcmac_bts *bts, GprsMs *ms, uint8_t trx_no, uint8_t ts_no); @@ -135,13 +132,15 @@ #ifdef __cplusplus extern "C" { #endif +struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, int8_t use_trx, bool single_slot); void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); struct gprs_rlcmac_ul_tbf *tbf_as_ul_tbf(struct gprs_rlcmac_tbf *tbf); void tbf_usf_timeout(struct gprs_rlcmac_ul_tbf *tbf); +void ul_tbf_contention_resolution_start(struct gprs_rlcmac_ul_tbf *tbf); +void ul_tbf_contention_resolution_success(struct gprs_rlcmac_ul_tbf *tbf); bool ul_tbf_contention_resolution_done(const struct gprs_rlcmac_ul_tbf *tbf); struct osmo_fsm_inst *tbf_ul_ack_fi(const struct gprs_rlcmac_ul_tbf *tbf); -void ul_tbf_contention_resolution_success(struct gprs_rlcmac_ul_tbf *tbf); static inline struct gprs_rlcmac_tbf *ul_tbf_as_tbf(struct gprs_rlcmac_ul_tbf *ul_tbf) { -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I256aeede2a2678c9738539fb6ec4db9766fa85e4 Gerrit-Change-Number: 29924 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bts[master]: pcuif_proto: cosmetic: add constant PCU_IF_NUM_NSVC and replace magic...
by dexter 31 Oct '22

31 Oct '22
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/29896 ) Change subject: pcuif_proto: cosmetic: add constant PCU_IF_NUM_NSVC and replace magic numbers ...................................................................... pcuif_proto: cosmetic: add constant PCU_IF_NUM_NSVC and replace magic numbers The number of NSVCs is fixed but lets not use magic numbers to define the sizes of the arrays that hold the config values. In osmo-pcu there is already a define constant, so lets use a define here as well. Change-Id: If7fa44abb86c18900110d7ee81fe6140c8c4635b --- M include/osmo-bts/pcuif_proto.h 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index 3e6f651..a5f03e3 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -58,6 +58,8 @@ #define PCU_IF_ADDR_TYPE_IPV4 0x04 /* IPv4 address */ #define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */ +#define PCU_IF_NUM_NSVC 2 + enum gsm_pcu_if_text_type { PCU_VERSION, PCU_OML_ALERT, @@ -169,14 +171,14 @@ uint8_t initial_cs; uint8_t initial_mcs; /* NSVC */ - uint16_t nsvci[2]; - uint16_t local_port[2]; - uint16_t remote_port[2]; - uint8_t address_type[2]; + uint16_t nsvci[PCU_IF_NUM_NSVC]; + uint16_t local_port[PCU_IF_NUM_NSVC]; + uint16_t remote_port[PCU_IF_NUM_NSVC]; + uint8_t address_type[PCU_IF_NUM_NSVC]; union { struct in_addr v4; struct in6_addr v6; - } remote_ip[2]; + } remote_ip[PCU_IF_NUM_NSVC]; } __attribute__ ((packed)); struct gsm_pcu_if_act_req { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/29896 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: If7fa44abb86c18900110d7ee81fe6140c8c4635b Gerrit-Change-Number: 29896 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-pcu[master]: ul_tbf: Define m_contention_resolution_done as bool
by pespin 31 Oct '22

31 Oct '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29923 ) Change subject: ul_tbf: Define m_contention_resolution_done as bool ...................................................................... ul_tbf: Define m_contention_resolution_done as bool Change-Id: Ief048cc1b5e8a18ceaeb5432415d14f5ef7ee0ea --- M src/tbf_ul.cpp M src/tbf_ul.h M tests/alloc/AllocTest.cpp 3 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/23/29923/1 diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 3988176..7189b6f 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -164,7 +164,7 @@ return NULL; } /* Contention resolution is considered to be done since TLLI is known in MS: */ - tbf->m_contention_resolution_done = 1; + tbf->m_contention_resolution_done = true; osmo_fsm_inst_dispatch(tbf->state_fsm.fi, TBF_EV_ASSIGN_ADD_PACCH, NULL); return tbf; @@ -237,7 +237,7 @@ gprs_rlcmac_ul_tbf::gprs_rlcmac_ul_tbf(struct gprs_rlcmac_bts *bts_, GprsMs *ms) : gprs_rlcmac_tbf(bts_, ms, GPRS_RLCMAC_UL_TBF), m_rx_counter(0), - m_contention_resolution_done(0), + m_contention_resolution_done(false), m_ul_gprs_ctrs(NULL), m_ul_egprs_ctrs(NULL) { @@ -327,7 +327,7 @@ /* now we must set this flag, so we are allowed to assign downlink * TBF on PACCH. it is only allowed when TLLI is acknowledged. */ - m_contention_resolution_done = 1; + m_contention_resolution_done = true; bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_UL_TBF_CONTENTION_RESOLUTION_SUCCESS); } diff --git a/src/tbf_ul.h b/src/tbf_ul.h index 301c52a..59e5d66 100644 --- a/src/tbf_ul.h +++ b/src/tbf_ul.h @@ -98,7 +98,7 @@ */ int32_t m_rx_counter; /* count all received blocks */ uint8_t m_usf[8]; /* list USFs per PDCH (timeslot), initialized to USF_INVALID */ - uint8_t m_contention_resolution_done; /* set after done */ + bool m_contention_resolution_done; /* set after done */ struct rate_ctr_group *m_ul_gprs_ctrs; struct rate_ctr_group *m_ul_egprs_ctrs; diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index 5e1f06d..3426f23 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -280,7 +280,7 @@ return false; ul_tbf->update_ms(0x23, GPRS_RLCMAC_UL_TBF); - ul_tbf->m_contention_resolution_done = 1; + ul_tbf->m_contention_resolution_done = true; dump_assignment(ul_tbf, "UL", verbose); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/29923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ief048cc1b5e8a18ceaeb5432415d14f5ef7ee0ea Gerrit-Change-Number: 29923 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: Add BTS setup ramping to prevent BSC overloading
by pespin 31 Oct '22

31 Oct '22
Attention is currently required from: neels, fixeria, lynxis lazus. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29788 ) Change subject: Add BTS setup ramping to prevent BSC overloading ...................................................................... Patch Set 10: (4 comments) File src/osmo-bsc/bts_setup_ramp.c: https://gerrit.osmocom.org/c/osmo-bsc/+/29788/comment/770beaf1_4164d9eb PS4, Line 98: && net->bts_setup_ramp.step_size > 0 > Extra spacing makes this construct hard to read. Please align properly. Ack https://gerrit.osmocom.org/c/osmo-bsc/+/29788/comment/123f401e_89c5bcf1 PS4, Line 101: net->bts_setup_ramp.active > because it's a single line. If ramp_active() is checking more, i'll use it here too. The point is to use the API here so that if you/anyone changes the API implementtion you don't need to find out where to apply this in different sides of the code ;) But fine with how it is now, not a big problem. File src/osmo-bsc/nm_bts_sm_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/29788/comment/967391ea_18dae2f9 PS10, Line 102: static void configure_loop(struct gsm_bts_sm *site_mgr) This is till wrong and has not been addressed. You now call configure_loop from two states, I'd welcome if you added the opstart param here so that it looks similar to the other FSMs and it is easier to extend in the future without screwing the transitions. File src/osmo-bsc/nm_channel_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/29788/comment/30e93c88_9d61475d PS10, Line 224: configure_loop(ts, &ts->mo.nm_state, false); this is wrong, it should be "true". -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29788 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id56dde6d58f3d0d20352f6c306598d2cccc6345d Gerrit-Change-Number: 29788 Gerrit-PatchSet: 10 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Mon, 31 Oct 2022 09:34:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: Add BTS setup ramping to prevent BSC overloading
by pespin 31 Oct '22

31 Oct '22
Attention is currently required from: neels, fixeria, lynxis lazus. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/29788 ) Change subject: Add BTS setup ramping to prevent BSC overloading ...................................................................... Patch Set 10: (1 comment) File src/osmo-bsc/nm_bb_transc_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/29788/comment/84334d2d_c3974d5d PS1, Line 345: case NM_EV_RAMP_GO: > If I do it as you ask, I would have to check in which state the fsm is to prevent the LOGL_ERROR lin […] I'm not really following you. Why do you need to call config_loop if you are already in ENABLED mode? the config_loop is precisely uses to reach ENABLED mode. How can you end up sending the NM_EV_RAMP_GO event already being in enabled state? -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/29788 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Id56dde6d58f3d0d20352f6c306598d2cccc6345d Gerrit-Change-Number: 29788 Gerrit-PatchSet: 10 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Mon, 31 Oct 2022 09:25:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-e1-hardware[master]: major update of README
by laforge 31 Oct '22

31 Oct '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1-hardware/+/29922 ) Change subject: major update of README ...................................................................... major update of README * make sure all projects and relevant links are mentioned * indicate which sub-directories relate to which project * use markdown syntax Change-Id: If126790c5652a6228e8a8ad1986e3b08adf46fae --- D README A README.md 2 files changed, 94 insertions(+), 47 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved; Verified diff --git a/README b/README deleted file mode 100644 index 2766310..0000000 --- a/README +++ /dev/null @@ -1,47 +0,0 @@ -osmo-e1-hardware - Collection of various E1/TDM hardware projects -====================================================================== - -This repository hosts three different sub-projects: - -* osmo-e1-xcvr (E1 LIU + magnetics) - https://osmocom.org/projects/e1-t1-adapter/wiki/Osmo-e1-xcvr -* osmo-e1-tracer (fully integrated passive raw bitstream tracer) - https://osmocom.org/projects/e1-t1-adapter/wiki/E1_tracer -* osmo-e1-tap (passive high-impedance tap) - -== osmo-e1-xcvr == - -This is a simple hardware project that aims to generate a reusable module -for interfacing E1/T1/J1 lines from various custom FPGA/CPLD/microcontroller -projects. - -The board contains tranformers, the analog circuitry, the LIU (line interface -unit), an oscillator as well as an integrated transceiver chip. - -It exposes the control interface (SPI) as well as the decoded synchronous -Rx/Tx bitstreams each on a 2x5pin header. - -Framer, Multiplexe,r HDLC decoder or anything like that is out-of-scope for -now. The idea relaly is to provide an interface as low-level as possible. - -One of the ideas is to create a "soft E1" interface, where the Rx/Tx bitstreams -are interfaced with the SSC of an AT91SAM3S and subsequently passed into a PC -via USB. The 2Mbps signal is very low-bandwidth, so that a pure software -implementation should be absolutely no problem for todays computing power. - -See https://osmocom.org/projects/e1-t1-adapter/wiki/Osmo-e1-xcvr for more details - - -== osmo-e1-tap == - -This is a small passive board that allows you to perform high-impedance tracing on an E1 -or T1 line. - - -== osmo-e1-tracer == - -This is a fully integrated design that allows you to obtainm bi-directional high-impedance -bitstream E1 traces. It features an iCE40 FPGA with USB + E1 cores from Sylvain Munaut, -as well as two E1 LIUs. - -See https://osmocom.org/projects/e1-t1-adapter/wiki/E1_tracer for more details. diff --git a/README.md b/README.md new file mode 100644 index 0000000..52bc59c --- /dev/null +++ b/README.md @@ -0,0 +1,94 @@ +osmo-e1-hardware - Collection of various E1/TDM hardware projects +================================================================= + +This repository contains a variety of different projects related to +E1/TDM hardware interfaces + +* `icE1usb` (fully-fledged USB E1 interface adapter) +* `osmo-e1-tracer` (fully integrated passive raw bitstream tracer) +* `osmo-e1-tap` (passive high-impedance E1/T1 tap) +* `osmo-e1-xcvr` (E1 LIU + magnetics) + https://osmocom.org/projects/e1-t1-adapter/wiki/Osmo-e1-xcvr + +icE1usb +------- + +The Osmocom icE1usb project is an open source hardware, gateware and firmware +project implementing a USB-attached interface for E1 circuits. Use this +if you want to implement a system speaking to an E1 circuit, such as +* a GSM BSC (using [OsmoBSC](https://osmocom.org/projects/osmobsc/wiki)) talking Abis/E1 to a GSM Base station, +* using [osmo-gbproxy](https://osmocom.org/projects/osmo-gbproxy/wiki/Osmo-gbproxy) to convert classing Gb/E1 to Gb/IP +* talking to legacy ISDN PRI equipment such as PBX, RAS servers, etc. +* connecting legacy ISDN PRI equipment such as PBX, RAS servers, etc. to + the [OCTOI comminity TDMoIP network](https://osmocom.org/projects/octoi/wiki) + +Depending on your USB host controller, it supports one or two E1 +circuits. Most host controllers can only support one E1 circuit. + +In order to provide a stable E1 clock reference, it contains a GPS disciplined oscillator. + +See <https://osmocom.org/projects/e1-t1-adapter/wiki/IcE1usb> for more details. + +Fully assembled units can be purchased at the [sysmocom +webshop](https://shop.sysmocom.de/Osmocom-icE1usb-E1-interface-for-USB/icE1usb-kit) + +Check the `hardware/icE1usb`, `firmware/ice40-riscv/icE1usb` directories in this repository. + +The host software is provided either +* via [osmo-e1d](https://osmocom.org/projects/osmo-e1d/wiki), or +* via the [icE1usb DAHDI driver](https://gitea.osmocom.org/retronetworking/dahdi-linux) + + +osmo-e1-tracer +-------------- + +This is a fully integrated design that allows you to obtain bi-directional high-impedance +bitstream E1 traces. It features an iCE40 FPGA with USB + E1 cores from Sylvain Munaut, +as well as two E1 LIUs. + +See <https://osmocom.org/projects/e1-t1-adapter/wiki/E1_tracer> for more details. + +Fully assembled units can be purchased made-to-order from +[sysmocom](https://sysmocom.de). + +Check the `hardware/e1-tracer`, `firmware/ice40-riscv/e1-tracer` and `software/e1-tracer` +directories in this repository. + + +osmo-e1-xcvr +------------ + +This was a simple hardware project that aims to generate a reusable module +for interfacing E1/T1/J1 lines from various custom FPGA/CPLD/microcontroller +projects. Consider it part of an earlier R&D setup before icE1usb and +osmo-e1-tracer were around. + +The board contains transformers, the analog circuitry, the LIU (line interface +unit), an oscillator as well as an integrated transceiver chip. + +It exposes the control interface (SPI) as well as the decoded synchronous +Rx/Tx bitstreams each on a 2x5pin header. + +Framer, Multiplexer, HDLC decoder or anything like that is out-of-scope for +now. The idea really is to provide an interface as low-level as possible. + +One of the ideas is to create a "soft E1" interface, where the Rx/Tx bitstreams +are interfaced with the SSC of an AT91SAM3S and subsequently passed into a PC +via USB. The 2Mbps signal is very low-bandwidth, so that a pure software +implementation should be absolutely no problem for todays computing power. + +See <https://osmocom.org/projects/e1-t1-adapter/wiki/Osmo-e1-xcvr> for more details + +Check the `hardware/e1-xcvr` directory in this repository. + + +osmo-e1-tap +----------- + +This is a small passive board that allows you to perform high-impedance tracing on an E1 +or T1 line. + +Fully assembled units can be purchased at the [sysmocom +webshop](https://shop.sysmocom.de/E1-T1-tap-adapter/e1-tap). + +Check the `hardware/e1-tap` directory in this repository. -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-hardware/+/29922 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-hardware Gerrit-Branch: master Gerrit-Change-Id: If126790c5652a6228e8a8ad1986e3b08adf46fae Gerrit-Change-Number: 29922 Gerrit-PatchSet: 4 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: tnt <tnt(a)246tNt.com> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • ...
  • 234
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.