Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-pcu/+/32375
to look at the new patch set (#2).
Change subject: bts: free MS object after allocating it if no tbf becomes attached
......................................................................
bts: free MS object after allocating it if no tbf becomes attached
Since no TBF is attached, it means it won't be freed automatically since
the refcounting is never increased, and hence it needs to be freed
manually.
In any case, it makes no sense to keep the MS object around since it has
no relevant information at that point in time yet.
Related: OS#6002
Change-Id: I2088a7ddd76fe9157b6626ef96ae4315e88779ea
---
M src/bts.cpp
M tests/tbf/TbfTest.err
2 files changed, 19 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/75/32375/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32375
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I2088a7ddd76fe9157b6626ef96ae4315e88779ea
Gerrit-Change-Number: 32375
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32379 )
Change subject: tbf: Move enable_egprs() to constructor
......................................................................
tbf: Move enable_egprs() to constructor
Whether the TBF is GPRS or EGPRS is known at allocation time since it
comes from the information known in the MS object used to create it.
Hence, no need to delay calling it to later steps such as setup().
So far it was probably elft in setup() due to the constrains about
requiring the subclass to be constructed (use of window() virtual API).
Change-Id: I2e9d2a98c666a930333d52fb6c0463d7593c2615
---
M src/tbf.cpp
M src/tbf.h
M src/tbf_dl.cpp
M src/tbf_ul.cpp
M tests/tbf/TbfTest.err
5 files changed, 36 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/79/32379/1
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 2f832a5..05d83f9 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -575,9 +575,6 @@
{
int rc;
- if (ms_mode(m_ms) != GPRS)
- enable_egprs();
-
/* select algorithm */
rc = the_pcu->alloc_algorithm(bts, this, single_slot, use_trx);
/* if no resource */
diff --git a/src/tbf.h b/src/tbf.h
index b033590..3f58cd2 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -254,13 +254,13 @@
protected:
void merge_and_clear_ms(GprsMs *old_ms);
+ void enable_egprs(void);
gprs_llc_queue *llc_queue();
const gprs_llc_queue *llc_queue() const;
struct GprsMs *m_ms;
private:
- void enable_egprs();
bool m_egprs_enabled;
struct osmo_timer_list Tarr[T_MAX];
uint8_t Narr[N_MAX];
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 823fcef..23c9d4d 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -183,6 +183,11 @@
state_fsm.dl_tbf = this;
state_fi = osmo_fsm_inst_alloc(&tbf_dl_fsm, this, &state_fsm, LOGL_INFO, NULL);
OSMO_ASSERT(state_fi);
+
+ /* This has to be called in child constructor because enable_egprs()
+ * uses the window() virtual function which is dependent on subclass. */
+ if (ms_mode(m_ms) != GPRS)
+ enable_egprs();
}
/**
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index a6c4ee3..16ef304 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -189,6 +189,11 @@
OSMO_ASSERT(m_ul_egprs_ctrs);
m_ul_gprs_ctrs = rate_ctr_group_alloc(this, &tbf_ul_gprs_ctrg_desc, m_ctrs->idx);
OSMO_ASSERT(m_ul_gprs_ctrs);
+
+ /* This has to be called in child constructor because enable_egprs()
+ * uses the window() virtual function which is dependent on subclass. */
+ if (ms_mode(m_ms) != GPRS)
+ enable_egprs();
}
/*
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index ec77f79..94c29cf 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -9770,15 +9770,15 @@
DL_ASS_TBF{NONE}: Allocated
UL_TBF{NEW}: Allocated
UL_ACK_TBF{NONE}: Allocated
-TBF(UL:TFI-0-0--1:STATE-NEW:GPRS:TLLI-0xffeeddd3) Setting Control TS PDCH(bts=0,trx=0,ts=7)
-MS(TLLI-0xffeeddd3:TA-7:MSCLS-11-11) Attaching UL TBF: TBF(UL:TFI-0-0--1:STATE-NEW:GPRS:TLLI-0xffeeddd3)
+TBF(UL:TFI-0-0--1:STATE-NEW:EGPRS:TLLI-0xffeeddd3) Setting Control TS PDCH(bts=0,trx=0,ts=7)
+MS(TLLI-0xffeeddd3:TA-7:MSCLS-11-11) Attaching UL TBF: TBF(UL:TFI-0-0--1:STATE-NEW:EGPRS:TLLI-0xffeeddd3)
MS(TLLI-0xffeeddd3:TA-7:MSCLS-11-11:UL): + tbf: now used by 2 (rcv_resource_request,tbf)
-UL_TBF(UL:TFI-0-0--1:STATE-NEW:GPRS:TLLI-0xffeeddd3){NEW}: Received Event ASSIGN_ADD_PACCH
-TBF(UL:TFI-0-0--1:STATE-NEW:GPRS:TLLI-0xffeeddd3) set ass. type PACCH [prev CCCH:0, PACCH:0]
-UL_TBF(UL:TFI-0-0--1:STATE-NEW:GPRS:TLLI-0xffeeddd3){NEW}: state_chg to ASSIGN
-TBF(UL:TFI-0-0--1:STATE-ASSIGN:GPRS:TLLI-0xffeeddd3) Starting timer X2001 [assignment (PACCH)] with 2 sec. 0 microsec
-UL_ASS_TBF(UL:TFI-0-0--1:STATE-NEW:GPRS:TLLI-0xffeeddd3){NONE}: Received Event SCHED_ASS_REJ
-UL_ASS_TBF(UL:TFI-0-0--1:STATE-NEW:GPRS:TLLI-0xffeeddd3){NONE}: state_chg to SEND_ASS_REJ
+UL_TBF(UL:TFI-0-0--1:STATE-NEW:EGPRS:TLLI-0xffeeddd3){NEW}: Received Event ASSIGN_ADD_PACCH
+TBF(UL:TFI-0-0--1:STATE-NEW:EGPRS:TLLI-0xffeeddd3) set ass. type PACCH [prev CCCH:0, PACCH:0]
+UL_TBF(UL:TFI-0-0--1:STATE-NEW:EGPRS:TLLI-0xffeeddd3){NEW}: state_chg to ASSIGN
+TBF(UL:TFI-0-0--1:STATE-ASSIGN:EGPRS:TLLI-0xffeeddd3) Starting timer X2001 [assignment (PACCH)] with 2 sec. 0 microsec
+UL_ASS_TBF(UL:TFI-0-0--1:STATE-NEW:EGPRS:TLLI-0xffeeddd3){NONE}: Received Event SCHED_ASS_REJ
+UL_ASS_TBF(UL:TFI-0-0--1:STATE-NEW:EGPRS:TLLI-0xffeeddd3){NONE}: state_chg to SEND_ASS_REJ
MS(TLLI-0xffeeddd3:TA-7:MSCLS-11-11:UL): - rcv_resource_request: now used by 1 (tbf)
PDCH(bts=0,trx=0,ts=7) Expiring FN=82 but previous FN=2654231 is still reserved!
PDCH(bts=0,trx=0,ts=7) Timeout for registered POLL (FN=2654231, reason=UL_ASS): TBF(UL:TFI-0-0-6:STATE-ASSIGN:EGPRS:TLLI-0xffeeddd2)
@@ -9797,7 +9797,7 @@
UL_ASS_TBF(UL:TFI-0-0-0:STATE-NEW:EGPRS:TLLI-0xffeeddcc){SEND_ASS}: state_chg to WAIT_ACK
PDCH(bts=0,trx=0,ts=7) FN=2654218 Scheduling control message at RTS for TBF(UL:TFI-0-0-0:STATE-ASSIGN:EGPRS:TLLI-0xffeeddcc)
MS(TLLI-0xffeeddd3:TA-7:MSCLS-11-11:UL) Destroying MS object
-MS(TLLI-0xffeeddd3:TA-7:MSCLS-11-11:UL) Detaching TBF: TBF(UL:TFI-0-0--1:STATE-ASSIGN:GPRS:TLLI-0xffeeddd3)
+MS(TLLI-0xffeeddd3:TA-7:MSCLS-11-11:UL) Detaching TBF: TBF(UL:TFI-0-0--1:STATE-ASSIGN:EGPRS:TLLI-0xffeeddd3)
MS(TLLI-0xffeeddd3:TA-7:MSCLS-11-11): - tbf: now used by 0 (-)
MS(TLLI-0xffeeddd2:TA-7:MSCLS-11-11:UL) Destroying MS object
MS(TLLI-0xffeeddd2:TA-7:MSCLS-11-11:UL) Detaching TBF: TBF(UL:TFI-0-0-6:STATE-ASSIGN:EGPRS:TLLI-0xffeeddd2)
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32379
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I2e9d2a98c666a930333d52fb6c0463d7593c2615
Gerrit-Change-Number: 32379
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32371 )
Change subject: e1d: set fd number back to 0 on failure
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> why moving fd from -1 to 0? It should never be 0 to start with if it is invalid, it should be -1 (0 […]
That's true, I was also wondering about this. Its probably initialized with zero because the struct was allocated with talloc_zero(). This is really ugly, we should think about this...
However, it will probably never hurt since there is technically no way using stdin as E1 timeslot with osmo-e1d ;-)
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32371
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Ic49e93550f0cff1a30644408ef7dc0648be768df
Gerrit-Change-Number: 32371
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 19 Apr 2023 15:41:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: dexter.
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32374 )
Change subject: e1d: reconnect to osmo-e1d after connection loss
......................................................................
Patch Set 2:
(1 comment)
File src/input/e1d.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-6072):
https://gerrit.osmocom.org/c/libosmo-abis/+/32374/comment/20f53e68_f16a1194
PS2, Line 120: LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "Loosing osmo-e1d connection to timeslot: %d\n", ts);
'Loosing' may be misspelled - perhaps 'Losing'?
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32374
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Iaf4d42c2f009b1d7666e319fabdeb2598aa0b338
Gerrit-Change-Number: 32374
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 19 Apr 2023 15:37:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: dexter.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-abis/+/32374
to look at the new patch set (#2).
Change subject: e1d: reconnect to osmo-e1d after connection loss
......................................................................
e1d: reconnect to osmo-e1d after connection loss
When osmo-e1d crashes while a line is in use the client process may
experience not only a lost connection, it may also hang up in an endless
loop that would also spam the logfile. The reason for this is that the
e1d driver in libosmo-abis lacks mechanisms to detect when the
connection to osmo-e1d gets lost.
When osmo-e1d goes down the effects should be similar to those of a
normal connection loss of an e1 line (cable pulled). So let's add an FSM
that takes care of the recovery of the connection when it is lost. Also
make sure that no havoc happens when the connection gets lost.
Related: OS#5983
Change-Id: Iaf4d42c2f009b1d7666e319fabdeb2598aa0b338
---
M src/input/e1d.c
1 file changed, 252 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/74/32374/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32374
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Iaf4d42c2f009b1d7666e319fabdeb2598aa0b338
Gerrit-Change-Number: 32374
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32375 )
Change subject: bts: free MS object after allocating it if no tbf becomes attached
......................................................................
bts: free MS object after allocating it if no tbf becomes attached
Since no TBF is attached, it means it won't be freed automatically since
the refcounting is never increased, and hence it needs to be freed
manually.
In any case, it makes no sense to keep the MS object around since it has
no relevant information at that point in time yet.
Related: OS#6002
Change-Id: I2088a7ddd76fe9157b6626ef96ae4315e88779ea
---
M src/bts.cpp
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/75/32375/1
diff --git a/src/bts.cpp b/src/bts.cpp
index 40541c5..c9a078a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1010,6 +1010,8 @@
ms_set_egprs_ms_class(ms, chan_req.egprs_mslot_class);
tbf = ms_new_ul_tbf_assigned_agch(ms);
if (!tbf) {
+ /* Release the MS just allocated since no TBF was attached */
+ talloc_free(ms);
/* Send RR Immediate Assignment Reject */
rc = -EBUSY;
goto send_imm_ass_rej;
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32375
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I2088a7ddd76fe9157b6626ef96ae4315e88779ea
Gerrit-Change-Number: 32375
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange