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
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
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
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
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
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