pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/29930 )
Change subject: tbf_fsm: Introduce new event TBF_EV_FIRST_UL_DATA_RECVD
......................................................................
tbf_fsm: Introduce new event TBF_EV_FIRST_UL_DATA_RECVD
This allows easier tracking of this event. It will also extended later
on with more logic which is better placed in tbf_fsm.
Change-Id: I5c935914e13db3928c32621ec04eb2760367615d
---
M src/tbf_fsm.c
M src/tbf_fsm.h
M src/tbf_ul.cpp
M src/tbf_ul_ack_fsm.c
M tests/tbf/TbfTest.err
5 files changed, 27 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/30/29930/1
diff --git a/src/tbf_fsm.c b/src/tbf_fsm.c
index a8e7886..b236d27 100644
--- a/src/tbf_fsm.c
+++ b/src/tbf_fsm.c
@@ -25,6 +25,8 @@
#include <encoding.h>
#include <bts.h>
+#include <bts_pch_timer.h>
+
#define X(s) (1 << (s))
const struct osmo_tdef_state_timeout tbf_fsm_timeouts[32] = {
@@ -42,6 +44,7 @@
{ TBF_EV_ASSIGN_ACK_PACCH, "ASSIGN_ACK_PACCH" },
{ TBF_EV_ASSIGN_READY_CCCH, "ASSIGN_READY_CCCH" },
{ TBF_EV_ASSIGN_PCUIF_CNF, "ASSIGN_PCUIF_CNF" },
+ { TBF_EV_FIRST_UL_DATA_RECVD, "FIRST_UL_DATA_RECVD" },
{ TBF_EV_DL_ACKNACK_MISS, "DL_ACKNACK_MISS" },
{ TBF_EV_LAST_DL_DATA_SENT, "LAST_DL_DATA_SENT" },
{ TBF_EV_LAST_UL_DATA_RECVD, "LAST_UL_DATA_RECVD" },
@@ -204,8 +207,17 @@
static void st_flow(struct osmo_fsm_inst *fi, uint32_t event, void *data)
{
struct tbf_fsm_ctx *ctx = (struct tbf_fsm_ctx *)fi->priv;
+ struct GprsMs *ms = tbf_ms(ctx->tbf);
switch (event) {
+ case TBF_EV_FIRST_UL_DATA_RECVD:
+ OSMO_ASSERT(tbf_direction(ctx->tbf) == GPRS_RLCMAC_UL_TBF);
+ /* TS 44.060 7a.2.1.1: "The contention resolution is completed on
+ * the network side when the network receives an RLC data block that
+ * comprises the TLLI value that identifies the mobile station and the
+ * TFI value associated with the TBF." */
+ bts_pch_timer_stop(ms->bts, ms);
+ break;
case TBF_EV_DL_ACKNACK_MISS:
OSMO_ASSERT(tbf_direction(ctx->tbf) == GPRS_RLCMAC_DL_TBF);
/* DL TBF: we missed a DL ACK/NACK. If we started assignment
@@ -455,6 +467,7 @@
},
[TBF_ST_FLOW] = {
.in_event_mask =
+ X(TBF_EV_FIRST_UL_DATA_RECVD) |
X(TBF_EV_DL_ACKNACK_MISS) |
X(TBF_EV_LAST_DL_DATA_SENT) |
X(TBF_EV_LAST_UL_DATA_RECVD) |
diff --git a/src/tbf_fsm.h b/src/tbf_fsm.h
index 22266e7..903bcd7 100644
--- a/src/tbf_fsm.h
+++ b/src/tbf_fsm.h
@@ -28,6 +28,7 @@
TBF_EV_ASSIGN_ACK_PACCH, /* We received a CTRL ACK confirming assignment started on PACCH */
TBF_EV_ASSIGN_READY_CCCH, /* TBF Start Time timer triggered */
TBF_EV_ASSIGN_PCUIF_CNF, /* Transmission of IMM.ASS for DL TBF to the MS confirmed by BTS over PCUIF */
+ TBF_EV_FIRST_UL_DATA_RECVD, /* UL TBF: Received first UL data from MS. Equals to Contention Resolution completed on the network side */
TBF_EV_DL_ACKNACK_MISS, /* DL TBF: We polled for DL ACK/NACK but we received none (POLL timeout) */
TBF_EV_LAST_DL_DATA_SENT, /* DL TBF sends RLCMAC block containing last DL avilable data buffered */
TBF_EV_LAST_UL_DATA_RECVD, /* UL TBF sends RLCMAC block containing last UL data (cv=0) */
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 910bfb4..40129ec 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -398,7 +398,7 @@
"Decoded premier TLLI=0x%08x of UL DATA TFI=%d.\n",
new_tlli, rlc->tfi);
ms_update_announced_tlli(ms(), new_tlli);
- bts_pch_timer_stop(bts, ms());
+ osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_FIRST_UL_DATA_RECVD, NULL);
} else if (new_tlli != GSM_RESERVED_TMSI && new_tlli != tlli()) {
LOGPTBFUL(this, LOGL_NOTICE,
"Decoded TLLI=%08x mismatch on UL DATA TFI=%d. (Ignoring due to contention resolution)\n",
diff --git a/src/tbf_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c
index 8ec2199..b0506d1 100644
--- a/src/tbf_ul_ack_fsm.c
+++ b/src/tbf_ul_ack_fsm.c
@@ -80,10 +80,15 @@
/* TS 44.060 7a.2.1.1: "The contention resolution is completed on
* the network side when the network receives an RLC data block that
* comprises the TLLI value that identifies the mobile station and the
- * TFI value associated with the TBF."
- * However, it's handier for us to mark contention resolution success
- * here since according to spec upon rx UL ACK is the time at which MS
- * realizes contention resolution succeeds. */
+ * TFI value associated with the TBF." (see TBF_EV_FIRST_UL_DATA_RECVD).
+ *
+ * However, it's handier for us to mark contention resolution success here
+ * since upon rx UL ACK is the time at which MS realizes contention resolution
+ * succeeds:
+ * TS 44.060 7.1.2.3: "The contention resolution is successfully completed
+ * on the mobile station side when the mobile station receives a
+ * PACKET UPLINK ACK/NACK"
+ */
if (ms_tlli(ms) != GSM_RESERVED_TMSI)
ul_tbf_contention_resolution_success(ctx->tbf);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 6a7ca38..27ed39b 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -1832,6 +1832,7 @@
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(UL-TFI_0){FLOW}: Received Event FIRST_UL_DATA_RECVD
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
@@ -1893,6 +1894,7 @@
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(UL-TFI_0){FLOW}: Received Event FIRST_UL_DATA_RECVD
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
@@ -2669,6 +2671,7 @@
DL_ASS_TBF(DL-TFI_0){NONE}: Deallocated
MS(TLLI=0xf1223344, IMSI=0011223344, TA=7, 1/0,) Clearing MS object
MS(TLLI=0xffffffff, IMSI=, TA=7, 1/0,) Destroying MS object
+TBF(UL-TFI_0){FLOW}: Received Event FIRST_UL_DATA_RECVD
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/+/29930
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I5c935914e13db3928c32621ec04eb2760367615d
Gerrit-Change-Number: 29930
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: arehbein, lynxis lazus.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29903 )
Change subject: gb/vty: Show if NSVC is blocked locally by O&M/vty or by remote
......................................................................
Patch Set 4:
(2 comments)
Patchset:
PS4:
Its important to click "done" when an a comment is resolved.
File include/osmocom/core/fsm.h:
https://gerrit.osmocom.org/c/libosmocore/+/29903/comment/99e7f9f8_7e796a57
PS3, Line 103: bool om_blocked;
> From my understanding, this is an NSVC related variable. […]
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29903
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0e8a12c3e54b701c9e697d50de1c9cb0bcc817e0
Gerrit-Change-Number: 29903
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Mon, 31 Oct 2022 14:03:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: arehbein, lynxis lazus.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29903 )
Change subject: gb/vty: Show if NSVC is blocked locally by O&M/vty or by remote
......................................................................
Patch Set 4: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/29903
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0e8a12c3e54b701c9e697d50de1c9cb0bcc817e0
Gerrit-Change-Number: 29903
Gerrit-PatchSet: 4
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Mon, 31 Oct 2022 13:53:02 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/29929 )
Change subject: trxcon: fixup: trx_if_cmd_poweroff(): do not complain if trx->powered_up
......................................................................
trxcon: fixup: trx_if_cmd_poweroff(): do not complain if trx->powered_up
In commit [1] I introduced a regression by removing the conditional
part completely. My intention was to remove the logging statement,
the return should be kept to prevent sending POWERON twice.
This regression affects the following TTCN-3 testcases:
* TC_sacch_chan_act_ho_async,
* TC_sacch_chan_act_ho_sync.
Change-Id: Iccd0bbac91a7899ef72df3dfe623b56eb66305fa
Fixes: [1] 1c75c0012b621d6cc7194d70d79a8198eb7fddb1
---
M src/host/trxcon/src/trx_if.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/29929/1
diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index 3e1bb79..6ae00f3 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -259,6 +259,8 @@
static int trx_if_cmd_poweron(struct trx_instance *trx)
{
+ if (trx->powered_up)
+ return -EAGAIN;
return trx_ctrl_cmd(trx, 1, "POWERON", "");
}
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/29929
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Iccd0bbac91a7899ef72df3dfe623b56eb66305fa
Gerrit-Change-Number: 29929
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-pcu/+/29924
to look at the new patch set (#2).
Change subject: Move UL allocation&assign functions to gprs_ms.c
......................................................................
Move UL allocation&assign functions to gprs_ms.c
Similar structure as what we have with DL-TBF.
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/2
--
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: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
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/+/29925
to look at the new patch set (#2).
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/2
--
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: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-pcu/+/29926
to look at the new patch set (#2).
Change subject: Join ms_merge_and_clear_ms() and ms_merge_old_ms()
......................................................................
Join ms_merge_and_clear_ms() and ms_merge_old_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/2
--
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: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-pcu/+/29927
to look at the new patch set (#2).
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/2
--
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: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset