gerrit-log
Threads by month
- ----- 2026 -----
- 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
April 2023
- 1 participants
- 2252 discussions
[M] Change in osmo-pcu[master]: bts: Rename bts_ms_by_{tlli,imsi} -> bts_get_ms_by_{tlli,imsi}
by pespin 17 Apr '23
by pespin 17 Apr '23
17 Apr '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32345 )
Change subject: bts: Rename bts_ms_by_{tlli,imsi} -> bts_get_ms_by_{tlli,imsi}
......................................................................
bts: Rename bts_ms_by_{tlli,imsi} -> bts_get_ms_by_{tlli,imsi}
While at it, put them together and mark bts param as const.
This is a preparation for next patch.
Change-Id: Iad8aec4424f1f23cd4d02a14c4f9ec1b9fdb1f75
---
M src/bts.cpp
M src/bts.h
M src/gprs_bssgp_pcu.c
M src/gprs_ms.c
M src/pcu_l1_if.cpp
M src/pdch.cpp
M tests/alloc/AllocTest.cpp
M tests/tbf/TbfTest.cpp
8 files changed, 53 insertions(+), 41 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/32345/1
diff --git a/src/bts.cpp b/src/bts.cpp
index 30450bc..e3a5eeb 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -724,7 +724,7 @@
}
/* Find related TBF and send confirmation signal to FSM */
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms) {
LOGP(DTBFDL, LOGL_ERROR, "FN=%u Got IMM.ASS confirm for unknown MS with TLLI=%08x\n", fn, tlli);
return -EINVAL;
@@ -1212,11 +1212,16 @@
return bts->ms_store;
}
-struct GprsMs *bts_ms_by_tlli(struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli)
+struct GprsMs *bts_get_ms_by_tlli(const struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli)
{
return bts_ms_store(bts)->get_ms(tlli, old_tlli);
}
+struct GprsMs *bts_get_ms_by_imsi(const struct gprs_rlcmac_bts *bts, const char *imsi)
+{
+ return bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
+}
+
/* update TA based on TA provided by PH-DATA-IND */
void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta)
{
@@ -1422,11 +1427,6 @@
bts_set_max_mcs_ul(bts, mcs_ul);
}
-struct GprsMs *bts_ms_by_imsi(struct gprs_rlcmac_bts *bts, const char *imsi)
-{
- return bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
-}
-
const struct llist_head* bts_ms_list(struct gprs_rlcmac_bts *bts)
{
return bts_ms_store(bts)->ms_list();
diff --git a/src/bts.h b/src/bts.h
index a1ea796..7f6be73 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -331,7 +331,8 @@
struct GprsMsStorage *bts_ms_store(const struct gprs_rlcmac_bts *bts);
-struct GprsMs *bts_ms_by_tlli(struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli);
+struct GprsMs *bts_get_ms_by_tlli(const struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli);
+struct GprsMs *bts_get_ms_by_imsi(const struct gprs_rlcmac_bts *bts, const char *imsi);
static inline struct rate_ctr_group *bts_rate_counters(struct gprs_rlcmac_bts *bts)
{
@@ -369,7 +370,6 @@
void bts_recalc_initial_mcs(struct gprs_rlcmac_bts *bts);
void bts_recalc_max_cs(struct gprs_rlcmac_bts *bts);
void bts_recalc_max_mcs(struct gprs_rlcmac_bts *bts);
-struct GprsMs *bts_ms_by_imsi(struct gprs_rlcmac_bts *bts, const char *imsi);
uint8_t bts_max_cs_dl(const struct gprs_rlcmac_bts *bts);
uint8_t bts_max_cs_ul(const struct gprs_rlcmac_bts *bts);
uint8_t bts_max_mcs_dl(const struct gprs_rlcmac_bts *bts);
diff --git a/src/gprs_bssgp_pcu.c b/src/gprs_bssgp_pcu.c
index 656342e..2c5a97a 100644
--- a/src/gprs_bssgp_pcu.c
+++ b/src/gprs_bssgp_pcu.c
@@ -244,9 +244,9 @@
* target MS is using. */
llist_for_each_entry(bts, &the_pcu->bts_list, list) {
/* TODO: Match by TMSI before IMSI if present?! */
- ms = bts_ms_by_tlli(bts, req.tlli, req.tlli);
+ ms = bts_get_ms_by_tlli(bts, req.tlli, req.tlli);
if (!ms && req.mi_imsi_present)
- ms = bts_ms_by_imsi(bts, req.mi_imsi.imsi);
+ ms = bts_get_ms_by_imsi(bts, req.mi_imsi.imsi);
bts_add_paging(bts, &req, ms);
}
diff --git a/src/gprs_ms.c b/src/gprs_ms.c
index 0a9d026..124f6d1 100644
--- a/src/gprs_ms.c
+++ b/src/gprs_ms.c
@@ -549,7 +549,7 @@
"Modifying MS object, TLLI = 0x%08x, IMSI '%s' -> '%s'\n",
ms_tlli(ms), ms->imsi, imsi);
- struct GprsMs *old_ms = bts_ms_by_imsi(ms->bts, imsi);
+ struct GprsMs *old_ms = bts_get_ms_by_imsi(ms->bts, imsi);
/* Check if we are going to store a different MS object with already
existing IMSI. This is probably a bug in code calling this function,
since it should take care of this explicitly */
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 577ba57..7068083 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -1071,7 +1071,7 @@
case GSM_MI_TYPE_IMSI:
req.mi_imsi = mi;
req.mi_imsi_present = true;
- ms = bts_ms_by_imsi(bts, req.mi_imsi.imsi);
+ ms = bts_get_ms_by_imsi(bts, req.mi_imsi.imsi);
break;
default:
LOGP(DL1IF, LOGL_ERROR, "Unexpected MI type %u\n", mi.type);
diff --git a/src/pdch.cpp b/src/pdch.cpp
index e397a8f..081c306 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -348,7 +348,7 @@
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with "
"unknown FN=%u TLLI=0x%08x (TRX %d TS %d)\n",
fn, tlli, trx_no(), ts_no);
- ms = bts_ms_by_tlli(bts(), tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts(), tlli, GSM_RESERVED_TMSI);
if (ms)
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with "
"unknown TBF corresponds to MS with IMSI %s, TA %d, "
@@ -664,7 +664,7 @@
/* First gather MS from TLLI/DL_TFI/UL_TFI:*/
if (request->ID.UnionType) { /* ID_TYPE = TLLI */
uint32_t tlli = request->ID.u.TLLI;
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms) {
ms = bts_alloc_ms(bts);
ms_set_tlli(ms, tlli);
@@ -854,7 +854,7 @@
struct pdch_ulc_node *poll;
GprsMs *ms;
- ms = bts_ms_by_tlli(bts(), report->TLLI, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts(), report->TLLI, GSM_RESERVED_TMSI);
if (!ms) {
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "MS send measurement "
"but TLLI 0x%08x is unknown\n", report->TLLI);
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 3282268..4497fbd 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -559,7 +559,7 @@
enum gprs_rlcmac_tbf_direction dir;
uint32_t tlli = counter + 0xc0000000;
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms)
ms = bts_alloc_ms(bts);
ms_set_ms_class(ms, ms_class);
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 63074d0..42b6d29 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -139,7 +139,7 @@
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
OSMO_ASSERT(ul_tbf->ms() == ms);
- OSMO_ASSERT(bts_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI) == ms);
+ OSMO_ASSERT(bts_get_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI) == ms);
/*
* Now check.. that DL changes and that the timing advance
@@ -148,20 +148,20 @@
ms_confirm_tlli(dl_tbf->ms(), 0x4232);
/* It is still there, since the new TLLI has not been used for UL yet */
- ms_new = bts_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI);
+ ms_new = bts_get_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == ms_new);
- ms_new = bts_ms_by_tlli(bts, 0x4232, GSM_RESERVED_TMSI);
+ ms_new = bts_get_ms_by_tlli(bts, 0x4232, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == ms_new);
OSMO_ASSERT(ms_dl_tbf(ms) == dl_tbf);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
/* Now use the new TLLI for UL */
ms_update_announced_tlli(ms, 0x4232);
- ms_new = bts_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI);
+ ms_new = bts_get_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms_new == NULL);
- ms_new = bts_ms_by_tlli(bts, 0x4232, GSM_RESERVED_TMSI);
+ ms_new = bts_get_ms_by_tlli(bts, 0x4232, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms_new != NULL);
OSMO_ASSERT(ms_ta(ms_new) == 4);
@@ -658,7 +658,7 @@
pdch->rcv_block(&data_msg[0], sizeof(data_msg), *fn, &meas);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
return ul_tbf;
@@ -797,7 +797,7 @@
pdch->rcv_block(&data_msg[0], 23, *fn, &meas);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -941,7 +941,7 @@
pdch->rcv_block(&data_msg[0], 23, *fn, &meas);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -1430,7 +1430,7 @@
check_tbf(ul_tbf);
OSMO_ASSERT(tbf_ul_ack_fi(ul_tbf)->state == TBF_UL_ACK_ST_NONE);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -1511,7 +1511,7 @@
check_tbf(ul_tbf);
OSMO_ASSERT(tbf_ul_ack_fi(ul_tbf)->state == TBF_UL_ACK_ST_NONE);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -1593,7 +1593,7 @@
check_tbf(ul_tbf);
OSMO_ASSERT(tbf_ul_ack_fi(ul_tbf)->state == TBF_UL_ACK_ST_NONE);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -1670,7 +1670,7 @@
pdch->rcv_block(&data_msg[0], sizeof(data_msg), *fn, &meas);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -1688,11 +1688,11 @@
dl_tbf_handle(bts, tlli, 0, imsi, 0, 0,
1000, data, data_size);
- ms = bts_ms_by_imsi(bts, imsi);
+ ms = bts_get_ms_by_imsi(bts, imsi);
OSMO_ASSERT(ms != NULL);
if (imsi[0] != '\0') {
- ms2 = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms2 = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == ms2);
}
}
@@ -1704,7 +1704,7 @@
GprsMs *ms;
unsigned ts_no;
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms);
dl_tbf = ms_dl_tbf(ms);
OSMO_ASSERT(dl_tbf);
@@ -2013,14 +2013,14 @@
* the PCU can see, that both MS objects belong to same MS */
send_dl_data(bts, tlli2, imsi, (const uint8_t *)"DATA", 4);
- ms = bts_ms_by_imsi(bts, imsi);
+ ms = bts_get_ms_by_imsi(bts, imsi);
OSMO_ASSERT(ms == ms2);
print_ms(ms2, false);
- ms = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == NULL);
- ms = bts_ms_by_tlli(bts, tlli2, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli2, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == ms2);
TALLOC_FREE(the_pcu);
@@ -2063,7 +2063,7 @@
/* Get rid of old UL TBF */
tbf_free(ul_tbf);
- ms = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms1 == ms);
/* Now establish a new UL TBF, this will consume one LLC packet */
@@ -2076,7 +2076,7 @@
/* This should be the same MS object */
OSMO_ASSERT(ms2 == ms1);
- ms = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms2 == ms);
/* A DL TBF should still exist */
@@ -2126,7 +2126,7 @@
/* Get rid of old UL TBF */
tbf_free(ul_tbf);
- ms = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms1 == ms);
/* Now establish a new UL TBF */
@@ -2138,7 +2138,7 @@
/* There should be a different MS object */
OSMO_ASSERT(ms2 != ms1);
- ms = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms2 == ms);
OSMO_ASSERT(ms1 != ms);
@@ -2235,7 +2235,7 @@
request_dl_rlc_block(dl_tbf1, &fn);
- ms2 = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms2 = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms2 == ms1);
OSMO_ASSERT(ms_dl_tbf(ms2));
OSMO_ASSERT(ms_dl_tbf(ms2)->state_is(TBF_ST_ASSIGN));
@@ -2607,7 +2607,7 @@
uint8_t data_msg[49] = {0};
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32345
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Iad8aec4424f1f23cd4d02a14c4f9ec1b9fdb1f75
Gerrit-Change-Number: 32345
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
1
0
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/+/32344
to look at the new patch set (#2).
Change subject: ms: Merge ms_storage into bts.cpp
......................................................................
ms: Merge ms_storage into bts.cpp
That class is mostly a C++ class holding a llist plus some callbacks.
Having that in a separate class makes code more complex for no good
reason. This patch moves the llist into bts and allocates stuff directly
from within bts.
This will allow further cleanup of MS lieficyle in future patches.
Change-Id: I627f5db5073189c23ddf2b7f09c90abb24846f62
---
M debian/copyright
M src/Makefile.am
M src/bts.cpp
M src/bts.h
M src/gprs_bssgp_pcu.c
M src/gprs_bssgp_rim.c
M src/gprs_ms.c
D src/gprs_ms_storage.cpp
D src/gprs_ms_storage.h
M src/pcu_l1_if.cpp
M src/pcu_vty_functions.cpp
M src/pdch.cpp
M src/tbf.cpp
M src/tbf_dl.cpp
M tests/alloc/AllocTest.cpp
M tests/ms/MsTest.cpp
M tests/tbf/TbfTest.cpp
17 files changed, 169 insertions(+), 310 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/44/32344/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32344
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I627f5db5073189c23ddf2b7f09c90abb24846f62
Gerrit-Change-Number: 32344
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
1
0
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32344 )
Change subject: ms: Merge ms_storage into bts.cpp
......................................................................
ms: Merge ms_storage into bts.cpp
That class is mostly a C++ class holding a llist plus some callbacks.
Having that in a separate class makes code more complex for no good
reason. This patch moves the llist into bts and allocates stuff directly
from within bts.
This will allow further cleanup of MS lieficyle in future patches.
Change-Id: I627f5db5073189c23ddf2b7f09c90abb24846f62
---
M debian/copyright
M src/Makefile.am
M src/bts.cpp
M src/bts.h
M src/gprs_bssgp_pcu.c
M src/gprs_bssgp_rim.c
M src/gprs_ms.c
D src/gprs_ms_storage.cpp
D src/gprs_ms_storage.h
M src/pcu_l1_if.cpp
M src/pcu_vty_functions.cpp
M src/pdch.cpp
M src/tbf.cpp
M src/tbf_dl.cpp
M tests/alloc/AllocTest.cpp
M tests/ms/MsTest.cpp
M tests/tbf/TbfTest.cpp
17 files changed, 165 insertions(+), 298 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/44/32344/1
diff --git a/debian/copyright b/debian/copyright
index bb471cd..aa6d0e2 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -10,9 +10,7 @@
2015 by Yves Godin <support(a)nuranwireless.com>
License: AGPL-3.0+
-Files: src/gprs_ms_storage.h
- src/gprs_ms_storage.cpp
- src/gprs_ms.h
+Files: src/gprs_ms.h
src/gprs_coding_scheme.cpp
src/gprs_coding_scheme.h
src/coding_scheme.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 9df0caa..6153aa0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -54,7 +54,6 @@
gprs_rlcmac_sched.cpp \
gprs_rlcmac_meas.cpp \
gprs_ms.c \
- gprs_ms_storage.cpp \
gprs_pcu.c \
pcu_l1_if.cpp \
pcu_vty.c \
@@ -100,7 +99,6 @@
gprs_bssgp_rim.h \
gprs_rlcmac.h \
gprs_ms.h \
- gprs_ms_storage.h \
gprs_pcu.h \
pcu_l1_if.h \
pcu_l1_if_phy.h \
diff --git a/src/bts.cpp b/src/bts.cpp
index 30450bc..d7dcbb7 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -30,7 +30,6 @@
#include <gprs_debug.h>
#include <cxx_linuxlist.h>
#include <pdch.h>
-#include <gprs_ms_storage.h>
#include <sba.h>
#include <bts_pch_timer.h>
@@ -241,10 +240,14 @@
static int bts_talloc_destructor(struct gprs_rlcmac_bts* bts)
{
- /* this can cause counter updates and must not be left to the
- * m_ms_store's destructor */
- bts->ms_store->cleanup();
- delete bts->ms_store;
+ struct GprsMs *ms;
+ while ((ms = llist_first_entry_or_null(&bts->ms_list, struct GprsMs, list))) {
+ ms_set_callback(ms, NULL);
+ ms_set_timeout(ms, 0);
+ llist_del(&ms->list);
+ bts_stat_item_dec(bts, STAT_MS_PRESENT);
+ talloc_free(ms);
+ }
gprs_bssgp_destroy(bts);
@@ -282,8 +285,6 @@
bts->pcu = pcu;
bts->nr = bts_nr;
- bts->ms_store = new GprsMsStorage(bts);
-
bts->cur_fn = FN_UNSET;
bts->cur_blk_fn = -1;
bts->max_cs_dl = MAX_GPRS_CS;
@@ -332,6 +333,7 @@
llist_add_tail(&bts->list, &pcu->bts_list);
INIT_LLIST_HEAD(&bts->pch_timer);
+ INIT_LLIST_HEAD(&bts->ms_list);
return bts;
}
@@ -425,7 +427,6 @@
{
uint8_t l, trx, ts, any_tbf = 0;
struct gprs_rlcmac_tbf *tbf;
- struct llist_head *tmp;
const struct osmo_mobile_identity *mi;
uint8_t slot_mask[ARRAY_SIZE(bts->trx)];
int8_t first_ts; /* must be signed */
@@ -460,8 +461,7 @@
* Don't mark, if TBF uses a different slot that is already marked. */
memset(slot_mask, 0, sizeof(slot_mask));
- llist_for_each(tmp, bts_ms_store(bts)->ms_list()) {
- ms = llist_entry(tmp, typeof(*ms), list);
+ llist_for_each_entry(ms, &bts->ms_list, list) {
struct gprs_rlcmac_tbf *tbfs[] = { ms->ul_tbf, ms->dl_tbf };
for (l = 0; l < ARRAY_SIZE(tbfs); l++) {
tbf = tbfs[l];
@@ -724,7 +724,7 @@
}
/* Find related TBF and send confirmation signal to FSM */
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms) {
LOGP(DTBFDL, LOGL_ERROR, "FN=%u Got IMM.ASS confirm for unknown MS with TLLI=%08x\n", fn, tlli);
return -EINVAL;
@@ -1197,24 +1197,72 @@
}
}
+static void bts_ms_idle_cb(struct GprsMs *ms)
+{
+ llist_del(&ms->list);
+ bts_stat_item_dec(ms->bts, STAT_MS_PRESENT);
+ if (ms_is_idle(ms))
+ talloc_free(ms);
+}
+
+static void bts_ms_active_cb(struct GprsMs *ms)
+{
+ /* Nothing to do */
+}
+
GprsMs *bts_alloc_ms(struct gprs_rlcmac_bts* bts)
{
- GprsMs *ms;
- ms = bts_ms_store(bts)->create_ms();
+ struct GprsMs *ms;
+ static struct gpr_ms_callback bts_ms_cb = {
+ .ms_idle = bts_ms_idle_cb,
+ .ms_active = bts_ms_active_cb,
+ };
+
+ ms = ms_alloc(bts);
+
+ ms_set_callback(ms, &bts_ms_cb);
ms_set_timeout(ms, osmo_tdef_get(bts->pcu->T_defs, -2030, OSMO_TDEF_S, -1));
+ llist_add(&ms->list, &bts->ms_list);
+ bts_stat_item_inc(bts, STAT_MS_PRESENT);
return ms;
}
-struct GprsMsStorage *bts_ms_store(const struct gprs_rlcmac_bts *bts)
+struct GprsMs *bts_get_ms(const struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli,
+ const char *imsi)
{
- return bts->ms_store;
+ struct GprsMs *ms;
+
+ if (tlli != GSM_RESERVED_TMSI || old_tlli != GSM_RESERVED_TMSI) {
+ llist_for_each_entry(ms, &bts->ms_list, list) {
+ if (ms_check_tlli(ms, tlli))
+ return ms;
+ if (ms_check_tlli(ms, old_tlli))
+ return ms;
+ }
+ }
+
+ /* not found by TLLI */
+
+ if (imsi && imsi[0] != '\0') {
+ llist_for_each_entry(ms, &bts->ms_list, list) {
+ if (ms_imsi_is_valid(ms) && strcmp(imsi, ms_imsi(ms)) == 0)
+ return ms;
+ }
+ }
+
+ return NULL;
}
-struct GprsMs *bts_ms_by_tlli(struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli)
+struct GprsMs *bts_get_ms_by_tlli(const struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli)
{
- return bts_ms_store(bts)->get_ms(tlli, old_tlli);
+ return bts_get_ms(bts, tlli, old_tlli, NULL);
+}
+
+struct GprsMs *bts_get_ms_by_imsi(const struct gprs_rlcmac_bts *bts, const char *imsi)
+{
+ return bts_get_ms(bts, GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
}
/* update TA based on TA provided by PH-DATA-IND */
@@ -1422,16 +1470,6 @@
bts_set_max_mcs_ul(bts, mcs_ul);
}
-struct GprsMs *bts_ms_by_imsi(struct gprs_rlcmac_bts *bts, const char *imsi)
-{
- return bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
-}
-
-const struct llist_head* bts_ms_list(struct gprs_rlcmac_bts *bts)
-{
- return bts_ms_store(bts)->ms_list();
-}
-
uint8_t bts_get_ms_pwr_alpha(const struct gprs_rlcmac_bts *bts)
{
if (bts->pcu->vty.force_alpha != (uint8_t)-1)
diff --git a/src/bts.h b/src/bts.h
index a1ea796..b1dc12a 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -272,7 +272,7 @@
struct rate_ctr_group *ratectrs;
struct osmo_stat_item_group *statg;
- struct GprsMsStorage *ms_store;
+ struct llist_head ms_list; /* list of struct GprsMs */
/* List of struct bts_pch_timer for active PCH pagings */
struct llist_head pch_timer;
@@ -329,9 +329,10 @@
enum pcu_gsmtap_category categ, uint8_t channel,
const struct rach_ind_params *rip);
-struct GprsMsStorage *bts_ms_store(const struct gprs_rlcmac_bts *bts);
-
-struct GprsMs *bts_ms_by_tlli(struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli);
+struct GprsMs *bts_get_ms(const struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli,
+ const char *imsi);
+struct GprsMs *bts_get_ms_by_tlli(const struct gprs_rlcmac_bts *bts, uint32_t tlli, uint32_t old_tlli);
+struct GprsMs *bts_get_ms_by_imsi(const struct gprs_rlcmac_bts *bts, const char *imsi);
static inline struct rate_ctr_group *bts_rate_counters(struct gprs_rlcmac_bts *bts)
{
@@ -369,7 +370,6 @@
void bts_recalc_initial_mcs(struct gprs_rlcmac_bts *bts);
void bts_recalc_max_cs(struct gprs_rlcmac_bts *bts);
void bts_recalc_max_mcs(struct gprs_rlcmac_bts *bts);
-struct GprsMs *bts_ms_by_imsi(struct gprs_rlcmac_bts *bts, const char *imsi);
uint8_t bts_max_cs_dl(const struct gprs_rlcmac_bts *bts);
uint8_t bts_max_cs_ul(const struct gprs_rlcmac_bts *bts);
uint8_t bts_max_mcs_dl(const struct gprs_rlcmac_bts *bts);
@@ -379,7 +379,6 @@
void bts_set_max_mcs_dl(struct gprs_rlcmac_bts *bts, uint8_t mcs_dl);
void bts_set_max_mcs_ul(struct gprs_rlcmac_bts *bts, uint8_t mcs_ul);
bool bts_cs_dl_is_supported(const struct gprs_rlcmac_bts *bts, enum CodingScheme cs);
-const struct llist_head* bts_ms_list(struct gprs_rlcmac_bts *bts);
uint8_t bts_get_ms_pwr_alpha(const struct gprs_rlcmac_bts *bts);
bool bts_all_pdch_allocated(const struct gprs_rlcmac_bts *bts);
#ifdef __cplusplus
diff --git a/src/gprs_bssgp_pcu.c b/src/gprs_bssgp_pcu.c
index 656342e..2c5a97a 100644
--- a/src/gprs_bssgp_pcu.c
+++ b/src/gprs_bssgp_pcu.c
@@ -244,9 +244,9 @@
* target MS is using. */
llist_for_each_entry(bts, &the_pcu->bts_list, list) {
/* TODO: Match by TMSI before IMSI if present?! */
- ms = bts_ms_by_tlli(bts, req.tlli, req.tlli);
+ ms = bts_get_ms_by_tlli(bts, req.tlli, req.tlli);
if (!ms && req.mi_imsi_present)
- ms = bts_ms_by_imsi(bts, req.mi_imsi.imsi);
+ ms = bts_get_ms_by_imsi(bts, req.mi_imsi.imsi);
bts_add_paging(bts, &req, ms);
}
diff --git a/src/gprs_bssgp_rim.c b/src/gprs_bssgp_rim.c
index 033426b..b8e1cf3 100644
--- a/src/gprs_bssgp_rim.c
+++ b/src/gprs_bssgp_rim.c
@@ -136,7 +136,7 @@
{
struct si_cache_value val;
struct si_cache_entry *entry;
- struct llist_head *tmp;
+ struct GprsMs *ms;
int i;
LOGP(DRIM, LOGL_INFO, "Rx RAN-INFO cell=%s type=%sBCCH num_si=%d\n",
@@ -152,8 +152,7 @@
}
entry = si_cache_add(bts->pcu->si_cache, &nacc->reprt_cell, &val);
- llist_for_each(tmp, bts_ms_list(bts)) {
- struct GprsMs *ms = llist_entry(tmp, typeof(*ms), list);
+ llist_for_each_entry(ms, &bts->ms_list, list) {
if (ms->nacc && nacc_fsm_is_waiting_si_resolution(ms->nacc, &nacc->reprt_cell))
osmo_fsm_inst_dispatch(ms->nacc->fi, NACC_EV_RX_SI, entry);
}
diff --git a/src/gprs_ms.c b/src/gprs_ms.c
index 0a9d026..b48961b 100644
--- a/src/gprs_ms.c
+++ b/src/gprs_ms.c
@@ -24,7 +24,6 @@
#include "pcu_utils.h"
#include "nacc_fsm.h"
#include "tbf_ul_ack_fsm.h"
-#include "gprs_ms_storage.h"
#include <time.h>
@@ -421,7 +420,7 @@
* MS object that belongs to that TLLI and if yes make sure one of them
* gets deleted. */
if (!ms_check_tlli(ms, tlli))
- old_ms = ms_store_get_ms(bts_ms_store(ms->bts), tlli, GSM_RESERVED_TMSI, NULL);
+ old_ms = bts_get_ms_by_tlli(ms->bts, tlli, GSM_RESERVED_TMSI);
ms_set_tlli(ms, tlli);
@@ -549,7 +548,7 @@
"Modifying MS object, TLLI = 0x%08x, IMSI '%s' -> '%s'\n",
ms_tlli(ms), ms->imsi, imsi);
- struct GprsMs *old_ms = bts_ms_by_imsi(ms->bts, imsi);
+ struct GprsMs *old_ms = bts_get_ms_by_imsi(ms->bts, imsi);
/* Check if we are going to store a different MS object with already
existing IMSI. This is probably a bug in code calling this function,
since it should take care of this explicitly */
diff --git a/src/gprs_ms_storage.cpp b/src/gprs_ms_storage.cpp
deleted file mode 100644
index 4741a2d..0000000
--- a/src/gprs_ms_storage.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/* gprs_ms_storage.cpp
- *
- * Copyright (C) 2015 by Sysmocom s.f.m.c. GmbH
- * Author: Jacob Erlbeck <jerlbeck(a)sysmocom.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-
-#include "gprs_ms_storage.h"
-
-#include "tbf.h"
-#include "bts.h"
-
-extern "C" {
- #include <osmocom/core/linuxlist.h>
- #include <osmocom/gsm/gsm48.h>
-}
-
-static void ms_storage_ms_idle_cb(struct GprsMs *ms)
-{
- llist_del(&ms->list);
- bts_stat_item_dec(ms->bts, STAT_MS_PRESENT);
- if (ms_is_idle(ms))
- talloc_free(ms);
-}
-
-static void ms_storage_ms_active_cb(struct GprsMs *ms)
-{
- /* Nothing to do */
-}
-
-static struct gpr_ms_callback ms_storage_ms_cb = {
- .ms_idle = ms_storage_ms_idle_cb,
- .ms_active = ms_storage_ms_active_cb,
-};
-
-GprsMsStorage::GprsMsStorage(struct gprs_rlcmac_bts *bts) :
- m_bts(bts)
-{
- INIT_LLIST_HEAD(&m_list);
-}
-
-GprsMsStorage::~GprsMsStorage()
-{
- cleanup();
-}
-
-void GprsMsStorage::cleanup()
-{
- struct llist_head *pos, *tmp;
-
- llist_for_each_safe(pos, tmp, &m_list) {
- struct GprsMs *ms = llist_entry(pos, typeof(*ms), list);
- ms_set_callback(ms, NULL);
- ms_set_timeout(ms, 0);
- llist_del(&ms->list);
- bts_stat_item_dec(ms->bts, STAT_MS_PRESENT);
- talloc_free(ms);
- }
-}
-
-GprsMs *GprsMsStorage::get_ms(uint32_t tlli, uint32_t old_tlli, const char *imsi) const
-{
- struct llist_head *tmp;
- GprsMs *ms;
-
- if (tlli != GSM_RESERVED_TMSI || old_tlli != GSM_RESERVED_TMSI) {
- llist_for_each(tmp, &m_list) {
- ms = llist_entry(tmp, typeof(*ms), list);
- if (ms_check_tlli(ms, tlli))
- return ms;
- if (ms_check_tlli(ms, old_tlli))
- return ms;
- }
- }
-
- /* not found by TLLI */
-
- if (imsi && imsi[0] != '\0') {
- llist_for_each(tmp, &m_list) {
- ms = llist_entry(tmp, typeof(*ms), list);
- if (ms_imsi_is_valid(ms) && strcmp(imsi, ms_imsi(ms)) == 0)
- return ms;
- }
- }
-
- return NULL;
-}
-
-GprsMs *GprsMsStorage::create_ms()
-{
- GprsMs *ms;
-
- ms = ms_alloc(m_bts);
-
- ms_set_callback(ms, &ms_storage_ms_cb);
- llist_add(&ms->list, &m_list);
- if (m_bts)
- bts_stat_item_inc(m_bts, STAT_MS_PRESENT);
-
- return ms;
-}
-
-struct GprsMs *ms_store_get_ms(struct GprsMsStorage *ms_store, uint32_t tlli, uint32_t old_tlli, const char *imsi)
-{
- return ms_store->get_ms(tlli, old_tlli, imsi);
-}
diff --git a/src/gprs_ms_storage.h b/src/gprs_ms_storage.h
deleted file mode 100644
index 45238cf..0000000
--- a/src/gprs_ms_storage.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* gprs_ms_storage.h
- *
- * Copyright (C) 2015 by Sysmocom s.f.m.c. GmbH
- * Author: Jacob Erlbeck <jerlbeck(a)sysmocom.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#pragma once
-
-#include "gprs_ms.h"
-#include "tbf.h"
-#include <stdint.h>
-#include <stddef.h>
-
-struct gprs_rlcmac_bts;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-struct GprsMsStorage;
-struct GprsMs *ms_store_get_ms(struct GprsMsStorage *ms_store, uint32_t tlli, uint32_t old_tlli, const char *imsi);
-#ifdef __cplusplus
-}
-#endif
-
-#ifdef __cplusplus
-
-struct GprsMsStorage {
-public:
- GprsMsStorage(struct gprs_rlcmac_bts *bts);
- ~GprsMsStorage();
-
- void cleanup();
-
- GprsMs *get_ms(uint32_t tlli, uint32_t old_tlli = GSM_RESERVED_TMSI, const char *imsi = NULL) const;
- GprsMs *create_ms();
-
- const struct llist_head* ms_list() const {return &m_list;}
-private:
- struct gprs_rlcmac_bts *m_bts;
- struct llist_head m_list; /* list of struct GprsMs */
-};
-
-#endif
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 577ba57..1ff20fd 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -55,7 +55,7 @@
#include <pdch.h>
#include <tbf_ul.h>
#include <tbf_dl.h>
-#include <gprs_ms_storage.h>
+#include <gprs_ms.h>
extern void *tall_pcu_ctx;
@@ -1071,7 +1071,7 @@
case GSM_MI_TYPE_IMSI:
req.mi_imsi = mi;
req.mi_imsi_present = true;
- ms = bts_ms_by_imsi(bts, req.mi_imsi.imsi);
+ ms = bts_get_ms_by_imsi(bts, req.mi_imsi.imsi);
break;
default:
LOGP(DL1IF, LOGL_ERROR, "Unexpected MI type %u\n", mi.type);
@@ -1094,7 +1094,7 @@
LOGP(DL1IF, LOGL_INFO, "GPRS Suspend request received: TLLI=0x%08x RAI=%s\n",
susp_req->tlli, osmo_rai_name(&ra_id));
- if ((ms = bts_ms_store(bts)->get_ms(susp_req->tlli))) {
+ if ((ms = bts_get_ms_by_tlli(bts, susp_req->tlli, GSM_RESERVED_TMSI))) {
/* We need to catch both pointers here since MS may become freed
after first tbf_free(dl_tbf) if only DL TBF was available */
dl_tbf = ms_dl_tbf(ms);
@@ -1113,14 +1113,13 @@
static int pcu_rx_app_info_req(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_app_info_req *app_info_req)
{
- struct llist_head *tmp;
+ struct GprsMs *ms;
LOGP(DL1IF, LOGL_DEBUG, "Application Information Request received: type=0x%08x len=%i\n",
app_info_req->application_type, app_info_req->len);
bts->app_info_pending = 0;
- llist_for_each(tmp, bts_ms_store(bts)->ms_list()) {
- GprsMs *ms = llist_entry(tmp, typeof(*ms), list);
+ llist_for_each_entry(ms, &bts->ms_list, list) {
if (!ms_dl_tbf(ms))
continue;
bts->app_info_pending++;
@@ -1147,7 +1146,7 @@
static int pcu_rx_neigh_addr_cnf(struct gprs_rlcmac_bts *bts, struct gsm_pcu_if_neigh_addr_cnf *naddr_cnf)
{
- struct llist_head *tmp;
+ struct GprsMs *ms;
struct osmo_cell_global_id_ps cgi_ps;
struct osmo_cell_global_id_ps *cgi_ps_ptr = &cgi_ps;
@@ -1177,8 +1176,7 @@
NEIGH_CACHE_ENTRY_KEY_ARGS(&neigh_key), naddr_cnf->err_code);
}
- llist_for_each(tmp, bts_ms_store(bts)->ms_list()) {
- GprsMs *ms = llist_entry(tmp, typeof(*ms), list);
+ llist_for_each_entry(ms, &bts->ms_list, list) {
if (ms->nacc && nacc_fsm_is_waiting_addr_resolution(ms->nacc, &neigh_key))
osmo_fsm_inst_dispatch(ms->nacc->fi, NACC_EV_RX_RAC_CI, cgi_ps_ptr);
}
diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp
index 5cdfda3..f5030d1 100644
--- a/src/pcu_vty_functions.cpp
+++ b/src/pcu_vty_functions.cpp
@@ -20,7 +20,6 @@
#include <stdlib.h>
#include "pcu_vty_functions.h"
#include "bts.h"
-#include "gprs_ms_storage.h"
#include "gprs_ms.h"
#include "cxx_linuxlist.h"
#include <llc.h>
@@ -227,12 +226,10 @@
int pcu_vty_show_ms_all(struct vty *vty, struct gprs_rlcmac_bts *bts)
{
- struct llist_head *tmp;
+ struct GprsMs *ms;
- llist_for_each(tmp, bts_ms_store(bts)->ms_list()) {
- GprsMs *ms_iter = llist_entry(tmp, typeof(*ms_iter), list);
- show_ms(vty, ms_iter);
- }
+ llist_for_each_entry(ms, &bts->ms_list, list)
+ show_ms(vty, ms);
return CMD_SUCCESS;
}
@@ -240,7 +237,7 @@
int pcu_vty_show_ms_by_tlli(struct vty *vty, struct gprs_rlcmac_bts *bts,
uint32_t tlli)
{
- GprsMs *ms = bts_ms_store(bts)->get_ms(tlli);
+ struct GprsMs *ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms) {
vty_out(vty, "Unknown TLLI %08x.%s", tlli, VTY_NEWLINE);
return CMD_WARNING;
@@ -252,7 +249,7 @@
int pcu_vty_show_ms_by_imsi(struct vty *vty, struct gprs_rlcmac_bts *bts,
const char *imsi)
{
- GprsMs *ms = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
+ struct GprsMs *ms = bts_get_ms_by_imsi(bts, imsi);
if (!ms) {
vty_out(vty, "Unknown IMSI '%s'.%s", imsi, VTY_NEWLINE);
return CMD_WARNING;
diff --git a/src/pdch.cpp b/src/pdch.cpp
index e397a8f..157e7a1 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -27,7 +27,6 @@
#include <gprs_debug.h>
#include <coding_scheme.h>
#include <gprs_ms.h>
-#include <gprs_ms_storage.h>
#include <pcu_l1_if.h>
#include <rlc.h>
#include <sba.h>
@@ -135,12 +134,11 @@
* avoid alloc_algorithm using it. */
static void pdch_unreserve_all_ms_reserved_slots(struct gprs_rlcmac_pdch *pdch)
{
- struct llist_head *tmp;
+ struct GprsMs *ms;
uint8_t ts_rm_mask = (~(1 << pdch->ts_no));
struct gprs_rlcmac_trx *trx = pdch->trx;
- llist_for_each(tmp, bts_ms_list(trx->bts)) {
- struct GprsMs *ms = llist_entry(tmp, typeof(*ms), list);
+ llist_for_each_entry(ms, &trx->bts->ms_list, list) {
if (ms->current_trx != trx)
continue;
uint8_t old_dl_slots = ms_reserved_dl_slots(ms);
@@ -348,7 +346,7 @@
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with "
"unknown FN=%u TLLI=0x%08x (TRX %d TS %d)\n",
fn, tlli, trx_no(), ts_no);
- ms = bts_ms_by_tlli(bts(), tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts(), tlli, GSM_RESERVED_TMSI);
if (ms)
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "PACKET CONTROL ACK with "
"unknown TBF corresponds to MS with IMSI %s, TA %d, "
@@ -664,7 +662,7 @@
/* First gather MS from TLLI/DL_TFI/UL_TFI:*/
if (request->ID.UnionType) { /* ID_TYPE = TLLI */
uint32_t tlli = request->ID.u.TLLI;
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms) {
ms = bts_alloc_ms(bts);
ms_set_tlli(ms, tlli);
@@ -854,7 +852,7 @@
struct pdch_ulc_node *poll;
GprsMs *ms;
- ms = bts_ms_by_tlli(bts(), report->TLLI, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts(), report->TLLI, GSM_RESERVED_TMSI);
if (!ms) {
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "MS send measurement "
"but TLLI 0x%08x is unknown\n", report->TLLI);
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 9648c71..e972bd0 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -28,7 +28,6 @@
#include <gprs_debug.h>
#include <gprs_ms.h>
#include <pcu_utils.h>
-#include <gprs_ms_storage.h>
#include <sba.h>
#include <pdch.h>
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 5c558c5..431eb58 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -27,7 +27,6 @@
#include <decoding.h>
#include <encoding.h>
#include <gprs_ms.h>
-#include <gprs_ms_storage.h>
#include <llc.h>
#include "pcu_utils.h"
@@ -199,12 +198,12 @@
GprsMs *ms, *ms_old;
/* check for existing TBF */
- ms = bts_ms_store(bts)->get_ms(tlli, tlli_old, imsi);
+ ms = bts_get_ms(bts, tlli, tlli_old, imsi);
/* If we got MS by TLLI above let's see if we already have another MS
* object identified by IMSI and merge them */
if (ms && !ms_imsi_is_valid(ms) && imsi) {
- ms_old = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
+ ms_old = bts_get_ms_by_imsi(bts, imsi);
if (ms_old && ms_old != ms) {
/* The TLLI has changed (RAU), so there are two MS
* objects for the same MS */
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 3282268..4497fbd 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -559,7 +559,7 @@
enum gprs_rlcmac_tbf_direction dir;
uint32_t tlli = counter + 0xc0000000;
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms)
ms = bts_alloc_ms(bts);
ms_set_ms_class(ms, ms_class);
diff --git a/tests/ms/MsTest.cpp b/tests/ms/MsTest.cpp
index ec1672a..45051d4 100644
--- a/tests/ms/MsTest.cpp
+++ b/tests/ms/MsTest.cpp
@@ -24,7 +24,6 @@
#include "tbf_ul.h"
#include "gprs_debug.h"
#include "gprs_ms.h"
-#include "gprs_ms_storage.h"
#include "bts.h"
extern "C" {
@@ -375,13 +374,13 @@
printf("=== end %s ===\n", __func__);
}
-static GprsMs *prepare_ms(GprsMsStorage *st, uint32_t tlli, enum gprs_rlcmac_tbf_direction dir)
+static GprsMs *prepare_ms(struct gprs_rlcmac_bts *bts, uint32_t tlli, enum gprs_rlcmac_tbf_direction dir)
{
- GprsMs *ms = st->get_ms(tlli);
+ GprsMs *ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (ms)
return ms;
- ms = st->create_ms();
+ ms = bts_alloc_ms(bts);
if (dir == GPRS_RLCMAC_UL_TBF)
ms_set_tlli(ms, tlli);
@@ -400,63 +399,62 @@
gprs_rlcmac_ul_tbf *ul_tbf;
struct gprs_rlcmac_bts *bts = bts_alloc(the_pcu, 0);
GprsMs *ms, *ms_tmp;
- GprsMsStorage store(bts);
printf("=== start %s ===\n", __func__);
- ms = store.get_ms(tlli + 0);
+ ms = bts_get_ms_by_tlli(bts, tlli + 0, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == NULL);
- ms = prepare_ms(&store, tlli + 0, GPRS_RLCMAC_UL_TBF);
+ ms = prepare_ms(bts, tlli + 0, GPRS_RLCMAC_UL_TBF);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_tlli(ms) == tlli + 0);
ms_set_imsi(ms, imsi1);
OSMO_ASSERT(strcmp(ms_imsi(ms), imsi1) == 0);
- ms_tmp = store.get_ms(tlli + 0);
+ ms_tmp = bts_get_ms_by_tlli(bts, tlli + 0, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == ms_tmp);
OSMO_ASSERT(ms_tlli(ms) == tlli + 0);
- ms_tmp = store.get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi1);
+ ms_tmp = bts_get_ms_by_imsi(bts, imsi1);
OSMO_ASSERT(ms == ms_tmp);
OSMO_ASSERT(strcmp(ms_imsi(ms), imsi1) == 0);
- ms_tmp = store.get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi2);
+ ms_tmp = bts_get_ms_by_imsi(bts, imsi2);
OSMO_ASSERT(ms_tmp == NULL);
- ms = prepare_ms(&store, tlli + 1, GPRS_RLCMAC_UL_TBF);
+ ms = prepare_ms(bts, tlli + 1, GPRS_RLCMAC_UL_TBF);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_tlli(ms) == tlli + 1);
ms_set_imsi(ms, imsi2);
OSMO_ASSERT(strcmp(ms_imsi(ms), imsi2) == 0);
- ms_tmp = store.get_ms(tlli + 1);
+ ms_tmp = bts_get_ms_by_tlli(bts, tlli + 1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == ms_tmp);
OSMO_ASSERT(ms_tlli(ms) == tlli + 1);
- ms_tmp = store.get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi1);
+ ms_tmp = bts_get_ms_by_imsi(bts, imsi1);
OSMO_ASSERT(ms_tmp != NULL);
OSMO_ASSERT(ms_tmp != ms);
- ms_tmp = store.get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi2);
+ ms_tmp = bts_get_ms_by_imsi(bts, imsi2);
OSMO_ASSERT(ms == ms_tmp);
OSMO_ASSERT(strcmp(ms_imsi(ms), imsi2) == 0);
/* delete ms */
- ms = store.get_ms(tlli + 0);
+ ms = bts_get_ms_by_tlli(bts, tlli + 0, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
ul_tbf = alloc_ul_tbf(bts, ms);
ms_attach_tbf(ms, ul_tbf);
ms_detach_tbf(ms, ul_tbf);
- ms = store.get_ms(tlli + 0);
+ ms = bts_get_ms_by_tlli(bts, tlli + 0, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == NULL);
- ms = store.get_ms(tlli + 1);
+ ms = bts_get_ms_by_tlli(bts, tlli + 1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
/* delete ms */
- ms = store.get_ms(tlli + 1);
+ ms = bts_get_ms_by_tlli(bts, tlli + 1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
ms_attach_tbf(ms, ul_tbf);
ms_detach_tbf(ms, ul_tbf);
- ms = store.get_ms(tlli + 1);
+ ms = bts_get_ms_by_tlli(bts, tlli + 1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == NULL);
talloc_free(ul_tbf);
@@ -646,6 +644,8 @@
vty_init(&pcu_vty_info);
pcu_vty_init();
+ osmo_tdef_set(the_pcu->T_defs, -2030, 0, OSMO_TDEF_S);
+
test_ms_state();
test_ms_callback();
test_ms_replace_tbf();
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index 63074d0..d493e6c 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -26,7 +26,6 @@
#include "tbf_ul.h"
#include "gprs_ms.h"
#include "gprs_debug.h"
-#include "gprs_ms_storage.h"
#include "pcu_utils.h"
#include "gprs_bssgp_pcu.h"
#include "pcu_l1_if.h"
@@ -139,7 +138,7 @@
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
OSMO_ASSERT(ul_tbf->ms() == ms);
- OSMO_ASSERT(bts_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI) == ms);
+ OSMO_ASSERT(bts_get_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI) == ms);
/*
* Now check.. that DL changes and that the timing advance
@@ -148,20 +147,20 @@
ms_confirm_tlli(dl_tbf->ms(), 0x4232);
/* It is still there, since the new TLLI has not been used for UL yet */
- ms_new = bts_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI);
+ ms_new = bts_get_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == ms_new);
- ms_new = bts_ms_by_tlli(bts, 0x4232, GSM_RESERVED_TMSI);
+ ms_new = bts_get_ms_by_tlli(bts, 0x4232, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == ms_new);
OSMO_ASSERT(ms_dl_tbf(ms) == dl_tbf);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
/* Now use the new TLLI for UL */
ms_update_announced_tlli(ms, 0x4232);
- ms_new = bts_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI);
+ ms_new = bts_get_ms_by_tlli(bts, 0x2342, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms_new == NULL);
- ms_new = bts_ms_by_tlli(bts, 0x4232, GSM_RESERVED_TMSI);
+ ms_new = bts_get_ms_by_tlli(bts, 0x4232, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms_new != NULL);
OSMO_ASSERT(ms_ta(ms_new) == 4);
@@ -452,18 +451,18 @@
ms_confirm_tlli(dl_tbf[1]->ms(), 0xf1000002);
ms_set_imsi(dl_tbf[0]->ms(), "001001000000001");
- ms1 = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000001");
+ ms1 = bts_get_ms(bts, GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000001");
OSMO_ASSERT(ms1 != NULL);
- ms2 = bts_ms_store(bts)->get_ms(0xf1000001);
+ ms2 = bts_get_ms_by_tlli(bts, 0xf1000001, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms2 != NULL);
OSMO_ASSERT(strcmp(ms_imsi(ms2), "001001000000001") == 0);
OSMO_ASSERT(ms1 == ms2);
/* change the IMSI on TBF 0 */
ms_set_imsi(dl_tbf[0]->ms(), "001001000000002");
- ms1 = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000001");
+ ms1 = bts_get_ms(bts, GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000001");
OSMO_ASSERT(ms1 == NULL);
- ms1 = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000002");
+ ms1 = bts_get_ms(bts, GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000002");
OSMO_ASSERT(ms1 != NULL);
OSMO_ASSERT(strcmp(ms_imsi(ms2), "001001000000002") == 0);
OSMO_ASSERT(ms1 == ms2);
@@ -472,7 +471,7 @@
{
ms_ref(ms2);
ms_set_imsi(dl_tbf[1]->ms(), "001001000000002");
- ms1 = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000002");
+ ms1 = bts_get_ms(bts, GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000002");
OSMO_ASSERT(ms1 != NULL);
OSMO_ASSERT(ms1 != ms2);
OSMO_ASSERT(strcmp(ms_imsi(ms1), "001001000000002") == 0);
@@ -480,11 +479,11 @@
ms_unref(ms2);
}
- ms2 = bts_ms_store(bts)->get_ms(0xf1000001);
+ ms2 = bts_get_ms_by_tlli(bts, 0xf1000001, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms2 == NULL);
tbf_free(dl_tbf[1]);
- ms1 = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000002");
+ ms1 = bts_get_ms(bts, GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, "001001000000002");
OSMO_ASSERT(ms1 == NULL);
TALLOC_FREE(the_pcu);
@@ -569,7 +568,7 @@
delay_csec, buf, sizeof(buf));
OSMO_ASSERT(rc >= 0);
- ms = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
+ ms = bts_get_ms(bts, GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_dl_tbf(ms) != NULL);
ms_dl_tbf(ms)->set_ta(0);
@@ -658,7 +657,7 @@
pdch->rcv_block(&data_msg[0], sizeof(data_msg), *fn, &meas);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
return ul_tbf;
@@ -797,7 +796,7 @@
pdch->rcv_block(&data_msg[0], 23, *fn, &meas);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -941,7 +940,7 @@
pdch->rcv_block(&data_msg[0], 23, *fn, &meas);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -1430,7 +1429,7 @@
check_tbf(ul_tbf);
OSMO_ASSERT(tbf_ul_ack_fi(ul_tbf)->state == TBF_UL_ACK_ST_NONE);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -1511,7 +1510,7 @@
check_tbf(ul_tbf);
OSMO_ASSERT(tbf_ul_ack_fi(ul_tbf)->state == TBF_UL_ACK_ST_NONE);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -1593,7 +1592,7 @@
check_tbf(ul_tbf);
OSMO_ASSERT(tbf_ul_ack_fi(ul_tbf)->state == TBF_UL_ACK_ST_NONE);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -1670,7 +1669,7 @@
pdch->rcv_block(&data_msg[0], sizeof(data_msg), *fn, &meas);
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
@@ -1683,16 +1682,16 @@
{
GprsMs *ms, *ms2;
- ms = bts_ms_store(bts)->get_ms(tlli, GSM_RESERVED_TMSI, imsi);
+ ms = bts_get_ms(bts, tlli, GSM_RESERVED_TMSI, imsi);
dl_tbf_handle(bts, tlli, 0, imsi, 0, 0,
1000, data, data_size);
- ms = bts_ms_by_imsi(bts, imsi);
+ ms = bts_get_ms_by_imsi(bts, imsi);
OSMO_ASSERT(ms != NULL);
if (imsi[0] != '\0') {
- ms2 = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms2 = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == ms2);
}
}
@@ -1704,7 +1703,7 @@
GprsMs *ms;
unsigned ts_no;
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms);
dl_tbf = ms_dl_tbf(ms);
OSMO_ASSERT(dl_tbf);
@@ -2013,14 +2012,14 @@
* the PCU can see, that both MS objects belong to same MS */
send_dl_data(bts, tlli2, imsi, (const uint8_t *)"DATA", 4);
- ms = bts_ms_by_imsi(bts, imsi);
+ ms = bts_get_ms_by_imsi(bts, imsi);
OSMO_ASSERT(ms == ms2);
print_ms(ms2, false);
- ms = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == NULL);
- ms = bts_ms_by_tlli(bts, tlli2, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli2, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms == ms2);
TALLOC_FREE(the_pcu);
@@ -2063,7 +2062,7 @@
/* Get rid of old UL TBF */
tbf_free(ul_tbf);
- ms = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms1 == ms);
/* Now establish a new UL TBF, this will consume one LLC packet */
@@ -2076,7 +2075,7 @@
/* This should be the same MS object */
OSMO_ASSERT(ms2 == ms1);
- ms = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms2 == ms);
/* A DL TBF should still exist */
@@ -2126,7 +2125,7 @@
/* Get rid of old UL TBF */
tbf_free(ul_tbf);
- ms = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms1 == ms);
/* Now establish a new UL TBF */
@@ -2138,7 +2137,7 @@
/* There should be a different MS object */
OSMO_ASSERT(ms2 != ms1);
- ms = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms2 == ms);
OSMO_ASSERT(ms1 != ms);
@@ -2235,7 +2234,7 @@
request_dl_rlc_block(dl_tbf1, &fn);
- ms2 = bts_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
+ ms2 = bts_get_ms_by_tlli(bts, tlli1, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms2 == ms1);
OSMO_ASSERT(ms_dl_tbf(ms2));
OSMO_ASSERT(ms_dl_tbf(ms2)->state_is(TBF_ST_ASSIGN));
@@ -2464,7 +2463,7 @@
delay_csec, llc_buf, sizeof(llc_buf));
OSMO_ASSERT(rc >= 0);
- first_ms = bts_ms_store(bts)->get_ms(GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
+ first_ms = bts_get_ms(bts, GSM_RESERVED_TMSI, GSM_RESERVED_TMSI, imsi);
OSMO_ASSERT(first_ms);
dl_tbf = ms_dl_tbf(first_ms);
OSMO_ASSERT(dl_tbf);
@@ -2607,7 +2606,7 @@
uint8_t data_msg[49] = {0};
- ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+ ms = bts_get_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
OSMO_ASSERT(ms != NULL);
OSMO_ASSERT(ms_ta(ms) == qta/4);
OSMO_ASSERT(ms_ul_tbf(ms) == ul_tbf);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32344
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I627f5db5073189c23ddf2b7f09c90abb24846f62
Gerrit-Change-Number: 32344
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
1
0
17 Apr '23
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32343 )
Change subject: bsc: improve TC_assignment_csd
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32343
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id0e0c5631d7a36635e1ef49cf5bf554f0336556b
Gerrit-Change-Number: 32343
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 17 Apr 2023 14:02:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
1
0
[S] Change in osmo-ttcn3-hacks[master]: bsc: AssignmentState: voice_call -> rtp_stream
by pespin 17 Apr '23
by pespin 17 Apr '23
17 Apr '23
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32342 )
Change subject: bsc: AssignmentState: voice_call -> rtp_stream
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32342
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Idfd9a102ad172d3aeaa4222a21357cdcd51680df
Gerrit-Change-Number: 32342
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 17 Apr 2023 13:59:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
1
0
17 Apr '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32343 )
Change subject: bsc: improve TC_assignment_csd
......................................................................
bsc: improve TC_assignment_csd
Verify that CSD ipaccess CRCX/MDCX has the CSD RTP payload type, and
that the RSL_IE_IPAC_RTP_CSD_FMT IE is set with
RSL_IPA_RTP_CSD_TRAU_BTS.
Related: OS#4393
Change-Id: Id0e0c5631d7a36635e1ef49cf5bf554f0336556b
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
M library/MGCP_Types.ttcn
M library/RSL_Types.ttcn
4 files changed, 67 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/43/32343/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index f40b19e..aa627b7 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1852,6 +1852,7 @@
private function f_tc_assignment_csd(charstring id) runs on MSC_ConnHdlr {
var template PDU_BSSAP exp_compl := f_gen_exp_compl();
var PDU_BSSAP ass_cmd := f_gen_ass_req();
+ var SDP_FIELD_PayloadType pt_csd := PT_CSD;
ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeCSD);
ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecCSData}));
@@ -1859,6 +1860,11 @@
ass_cmd.pdu.bssmap.assignmentRequest.channelType.speechId_DataIndicator := GSM0808_DATA_RATE_TRANSP_4k8;
f_establish_fully(ass_cmd, exp_compl);
+
+ if (g_media.bts.rtp_pt != enum2int(pt_csd)) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("unexpected RTP payload type: ", g_media.bts.rtp_pt));
+ }
+
f_perform_clear();
}
testcase TC_assignment_csd() runs on test_CT {
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index b3e6af6..fa7cd84 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -198,6 +198,28 @@
return -1;
}
+/* Verify that CSD CRCX/MDCX has the RSL_IE_IPAC_RTP_CSD_FMT IE, and that
+ * inside it the D value is set to RSL_IPA_RTP_CSD_TRAU_BTS. */
+private function f_ipacc_crcx_mdcx_check_rtp_pt_csd(RSL_Message rsl) runs on MSC_ConnHdlr {
+ var SDP_FIELD_PayloadType pt_csd := PT_CSD;
+ var RSL_IE_Body ie;
+
+ if (g_media.bts.rtp_pt != enum2int(pt_csd)) {
+ return;
+ }
+
+ if (f_rsl_find_ie(rsl, RSL_IE_IPAC_RTP_CSD_FMT, ie)) {
+ if (ie.ipa_rtp_csd_fmt.d != RSL_IPA_RTP_CSD_TRAU_BTS) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "Rx unexpected IPAC CRCX for CSD with RTP_CSD_FMT IE");
+ }
+ return;
+ }
+
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "Rx unexpected IPAC CRCX for CSD without RTP_CSD_FMT IE");
+}
+
/* altstep for handling of IPACC media related commands. Activated by as_Media() to test
* RSL level media handling */
altstep as_Media_ipacc(RSL_DCHAN_PT rsl_pt := RSL, RSL_DCHAN_PT rsl_pt_ho_target := RSL1) runs on MSC_ConnHdlr {
@@ -224,6 +246,7 @@
g_media.bts.local_osmux_cid := omit;
g_media.bts.remote_osmux_cid := omit;
}
+ f_ipacc_crcx_mdcx_check_rtp_pt_csd(rsl);
rsl_pt.send(ts_RSL_IPA_CRCX_ACK(g_chan_nr, g_media.bts.conn_id,
f_inet_addr(g_media.bts.bts.host),
g_media.bts.bts.port_nr,
@@ -262,6 +285,7 @@
g_media.bts.local_osmux_cid := omit;
g_media.bts.remote_osmux_cid := omit;
}
+ f_ipacc_crcx_mdcx_check_rtp_pt_csd(rsl);
rsl_pt.send(ts_RSL_IPA_MDCX_ACK(g_chan_nr, g_media.bts.conn_id,
f_inet_addr(g_media.bts.peer.host),
g_media.bts.peer.port_nr,
diff --git a/library/MGCP_Types.ttcn b/library/MGCP_Types.ttcn
index 01d4d3a..da1b7f6 100644
--- a/library/MGCP_Types.ttcn
+++ b/library/MGCP_Types.ttcn
@@ -128,7 +128,8 @@
PT_GSMEFR(110),
PT_GSMHR(111),
PT_AMR(112),
- PT_AMRWB(113)
+ PT_AMRWB(113),
+ PT_CSD(120)
}
} with { encode "TEXT" }
diff --git a/library/RSL_Types.ttcn b/library/RSL_Types.ttcn
index fff87f2..0f03c87 100644
--- a/library/RSL_Types.ttcn
+++ b/library/RSL_Types.ttcn
@@ -945,6 +945,25 @@
RSL_IPA_Codec codec
}
+ type enumerated RSL_IPA_RTP_CSD_FMT_D {
+ RSL_IPA_RTP_CSD_EXT_TRAU ('0000'B),
+ RSL_IPA_RTP_CSD_NON_TRAU ('0001'B),
+ RSL_IPA_RTP_CSD_TRAU_BTS ('0010'B),
+ RSL_IPA_RTP_CSD_IWF_FREE ('0011'B)
+ } with { variant "FIELDLENGTH(4)" }
+
+ type enumerated RSL_IPA_RTP_CSD_FMT_IR {
+ RSL_IPA_RTP_CSD_8k ('0000'B),
+ RSL_IPA_RTP_CSD_16k ('0001'B),
+ RSL_IPA_RTP_CSD_32k ('0010'B),
+ RSL_IPA_RTP_CSD_64 ('0011'B)
+ } with { variant "FIELDLENGTH(4)" }
+
+ type record RSL_IE_IPA_RTP_CSD_FMT {
+ RSL_IPA_RTP_CSD_FMT_IR ir,
+ RSL_IPA_RTP_CSD_FMT_D d
+ }
+
/* 9.3.20 */
type enumerated RSL_IE_ReleaseMode {
RSL_REL_MODE_NORMAL ('00'B),
@@ -1076,6 +1095,7 @@
uint8_t ipa_rtp_pt2,
RSL_IE_IPA_ConnectionStats ipa_stats,
RSL_IE_IPA_SpeechMode ipa_speech_mode,
+ RSL_IE_IPA_RTP_CSD_FMT ipa_rtp_csd_fmt,
RSL_IE_OSMO_TrainingSequence osmo_training_sequence,
RSL_IE_OSMO_RepAcchCap rep_acch_cap,
@@ -1142,6 +1162,7 @@
ipa_rtp_pt2, iei = RSL_IE_IPAC_RTP_PAYLOAD2;
ipa_stats, iei = RSL_IE_IPAC_CONN_STAT;
ipa_speech_mode, iei = RSL_IE_IPAC_SPEECH_MODE;
+ ipa_rtp_csd_fmt, iei = RSL_IE_IPAC_RTP_CSD_FMT;
osmo_training_sequence, iei = RSL_IE_OSMO_TRAINING_SEQUENCE;
rep_acch_cap, iei = RSL_IE_OSMO_REP_ACCH_CAP;
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32343
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id0e0c5631d7a36635e1ef49cf5bf554f0336556b
Gerrit-Change-Number: 32343
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
1
0
[S] Change in osmo-ttcn3-hacks[master]: bsc: AssignmentState: voice_call -> rtp_stream
by osmith 17 Apr '23
by osmith 17 Apr '23
17 Apr '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32342 )
Change subject: bsc: AssignmentState: voice_call -> rtp_stream
......................................................................
bsc: AssignmentState: voice_call -> rtp_stream
Now that CSD is supported, rename the variable. It is true for both
voice calls and for CSD.
Related: OS#4393
Change-Id: Idfd9a102ad172d3aeaa4222a21357cdcd51680df
---
M bsc/BSC_Tests.ttcn
M bsc/MSC_ConnectionHandler.ttcn
2 files changed, 30 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/32342/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index f40b19e..eb44dd7 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -9384,7 +9384,7 @@
BSSAP.send(ass_cmd);
var AssignmentState st := valueof(ts_AssignmentStateInit);
- st.voice_call := true;
+ st.rtp_stream := true;
st.is_assignment := false;
alt {
[] as_modify(st);
@@ -11148,7 +11148,7 @@
ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
var AssignmentState st := valueof(ts_AssignmentStateInit);
- st.voice_call := true;
+ st.rtp_stream := true;
st.is_assignment := true;
var ExpectCriteria mgcpcrit := {
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index b3e6af6..64b4e3d 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -1064,7 +1064,7 @@
type record AssignmentState {
/* global */
- boolean voice_call,
+ boolean rtp_stream,
boolean is_assignment,
/* Assignment related bits */
boolean rr_ass_cmpl_seen,
@@ -1080,7 +1080,7 @@
}
template (value) AssignmentState ts_AssignmentStateInit := {
- voice_call := false,
+ rtp_stream := false,
is_assignment := false,
rr_ass_cmpl_seen := false,
old_lchan_deact_sacch_seen := false,
@@ -1222,7 +1222,7 @@
/* no assignment, just mode modify */
var RSL_Message rsl;
- [st.voice_call and not st.rr_modify_seen] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl {
+ [st.rtp_stream and not st.rr_modify_seen] RSL.receive(tr_RSL_DATA_REQ(g_chan_nr)) -> value rsl {
var PDU_ML3_NW_MS l3 := dec_PDU_ML3_NW_MS(rsl.ies[2].body.l3_info.payload);
log("Rx L3 from net: ", l3);
if (ischosen(l3.msgs.rrm.channelModeModify)) {
@@ -1233,7 +1233,7 @@
}
repeat;
}
- [st.voice_call and st.rr_modify_seen] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl {
+ [st.rtp_stream and st.rr_modify_seen] RSL.receive(tr_RSL_MsgTypeD(RSL_MT_MODE_MODIFY_REQ)) -> value rsl {
st.rsl_mode_modify_msg := rsl;
RSL.send(ts_RSL_MODE_MODIFY_ACK(g_chan_nr));
st.modify_done := true;
@@ -1427,9 +1427,9 @@
transid := omit
};
var AssignmentState st := valueof(ts_AssignmentStateInit);
- /* if the channel type is SIGNAL, we're not handling a voice call */
+ /* if the channel type is SIGNAL, we're not handling an rtp stream */
if (ass_cmd.pdu.bssmap.assignmentRequest.channelType.speechOrDataIndicator != '0011'B) {
- st.voice_call := true;
+ st.rtp_stream := true;
exp_modify := true;
}
@@ -1459,8 +1459,8 @@
g_media.mgcp_conn[0].mdcx_seen_exp := 0;
g_media.mgcp_conn[1].crcx_seen_exp := 0;
g_media.mgcp_conn[1].mdcx_seen_exp := 0;
- } else if (st.voice_call) {
- /* For voice calls we expect the following MGCP activity */
+ } else if (st.rtp_stream) {
+ /* For RTP streams we expect the following MGCP activity */
g_media.mgcp_conn[0].crcx_seen_exp := 1;
g_media.mgcp_conn[0].mdcx_seen_exp := 1;
g_media.mgcp_conn[1].crcx_seen_exp := 1;
@@ -1487,8 +1487,8 @@
/* modify related bits */
[not st.is_assignment and exp_modify] as_modify(st);
- /* voice call related bits (IPA CRCX/MDCX + MGCP) */
- [st.voice_call] as_Media();
+ /* RTP stream related bits (IPA CRCX/MDCX + MGCP) */
+ [st.rtp_stream] as_Media();
/* if we receive exactly what we expected, always return + pass */
[st.is_assignment and st.assignment_done or (not st.is_assignment and (st.modify_done or not exp_modify))] BSSAP.receive(exp_ass_cpl) -> value bssap {
@@ -1526,11 +1526,11 @@
/* TODO: more precisely expect the different types of speech? */
var OCT1 rr_channel_mode := st.rr_channel_mode_modify_msg.msgs.rrm.channelModeModify.channelMode.mode;
- if (st.voice_call and rr_channel_mode == '00'O) {
+ if (st.rtp_stream and rr_channel_mode == '00'O) {
setverdict(fail, "f_establish_fully(): Expected RR Channel Mode Modify",
" to a speech mode, but got channelMode == ", rr_channel_mode);
mtc.stop;
- } else if (not st.voice_call and rr_channel_mode != '00'O) {
+ } else if (not st.rtp_stream and rr_channel_mode != '00'O) {
setverdict(fail, "f_establish_fully(): Expected RR Channel Mode Modify",
" to signalling mode, but got channelMode == ", rr_channel_mode);
mtc.stop;
@@ -1542,11 +1542,11 @@
mtc.stop;
}
var RSL_SpeechDataInd rsl_spd_ind := chan_mode_ie.chan_mode.spd_ind;
- if (st.voice_call and rsl_spd_ind != RSL_SPDI_SPEECH) {
+ if (st.rtp_stream and rsl_spd_ind != RSL_SPDI_SPEECH) {
setverdict(fail, "f_establish_fully(): Expected RSL MODE MODIFY",
" to a speech mode, but got spd_ind == ", rsl_spd_ind);
mtc.stop;
- } else if (not st.voice_call and rsl_spd_ind != RSL_SPDI_SIGN) {
+ } else if (not st.rtp_stream and rsl_spd_ind != RSL_SPDI_SIGN) {
setverdict(fail, "f_establish_fully(): Expected RSL MODE MODIFY",
" to signalling mode, but got spd_ind == ", rsl_spd_ind);
mtc.stop;
@@ -1591,7 +1591,7 @@
}
}
- if (not exp_fail and st.voice_call and not g_pars.aoip) {
+ if (not exp_fail and st.rtp_stream and not g_pars.aoip) {
/* With SCCPLite, connect to BSC-located MGW using a CRCX + SDP.
It is sent in MGCP over IPA in the BSC<->MSC (BSC-NAT)
connection. BSC will forward it to its MGW. */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32342
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Idfd9a102ad172d3aeaa4222a21357cdcd51680df
Gerrit-Change-Number: 32342
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
1
0
[M] Change in osmo-pcu[master]: ms: Drop setting (egprs_)ms_class during bts_alloc_ms()
by pespin 17 Apr '23
by pespin 17 Apr '23
17 Apr '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32341 )
Change subject: ms: Drop setting (egprs_)ms_class during bts_alloc_ms()
......................................................................
ms: Drop setting (egprs_)ms_class during bts_alloc_ms()
That information is not required during allocation of the object, and
most times it is not known.
Defer setting it only to meaningul values in paths obtaining the
information from peers.
Change-Id: I36f07dc389f7abe205fc4bcddbde93735f5d5cfc
---
M src/bts.cpp
M src/bts.h
M src/pdch.cpp
M src/tbf_dl.cpp
M tests/alloc/AllocTest.cpp
M tests/app_info/AppInfoTest.cpp
M tests/llc/LlcTest.cpp
M tests/tbf/TbfTest.cpp
M tests/tbf/TbfTest.err
M tests/types/TypesTest.cpp
10 files changed, 107 insertions(+), 68 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/41/32341/1
diff --git a/src/bts.cpp b/src/bts.cpp
index 524961d..30450bc 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1006,7 +1006,8 @@
"SBFn=%u TRX=%u TS=%u\n", sb_fn, pdch->trx->trx_no, pdch->ts_no);
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);
+ GprsMs *ms = bts_alloc_ms(bts);
+ ms_set_egprs_ms_class(ms, chan_req.egprs_mslot_class);
tbf = ms_new_ul_tbf_assigned_agch(ms);
if (!tbf) {
/* Send RR Immediate Assignment Reject */
@@ -1196,14 +1197,12 @@
}
}
-GprsMs *bts_alloc_ms(struct gprs_rlcmac_bts* bts, uint8_t ms_class, uint8_t egprs_ms_class)
+GprsMs *bts_alloc_ms(struct gprs_rlcmac_bts* bts)
{
GprsMs *ms;
ms = bts_ms_store(bts)->create_ms();
ms_set_timeout(ms, osmo_tdef_get(bts->pcu->T_defs, -2030, OSMO_TDEF_S, -1));
- ms_set_ms_class(ms, ms_class);
- ms_set_egprs_ms_class(ms, egprs_ms_class);
return ms;
}
diff --git a/src/bts.h b/src/bts.h
index 5efbdad..a1ea796 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -293,7 +293,7 @@
struct osmo_mobile_identity mi_imsi;
};
-struct GprsMs *bts_alloc_ms(struct gprs_rlcmac_bts *bts, uint8_t ms_class, uint8_t egprs_ms_class);
+struct GprsMs *bts_alloc_ms(struct gprs_rlcmac_bts *bts);
int bts_add_paging(struct gprs_rlcmac_bts *bts, const struct paging_req_cs *req, struct GprsMs *ms);
uint32_t bts_rfn_to_fn(const struct gprs_rlcmac_bts *bts, uint32_t rfn);
diff --git a/src/pdch.cpp b/src/pdch.cpp
index cc93cfe..e397a8f 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -666,7 +666,7 @@
uint32_t tlli = request->ID.u.TLLI;
ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms) {
- ms = bts_alloc_ms(bts, 0, 0); /* ms class updated later */
+ ms = bts_alloc_ms(bts);
ms_set_tlli(ms, tlli);
}
} else if (request->ID.u.Global_TFI.UnionType) { /* ID_TYPE = DL_TFI */
@@ -858,7 +858,7 @@
if (!ms) {
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "MS send measurement "
"but TLLI 0x%08x is unknown\n", report->TLLI);
- ms = bts_alloc_ms(bts(), 0, 0);
+ ms = bts_alloc_ms(bts());
ms_set_tlli(ms, report->TLLI);
}
if ((poll = pdch_ulc_get_node(ulc, fn))) {
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index f799cb0..5c558c5 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -217,7 +217,7 @@
}
if (!ms)
- ms = bts_alloc_ms(bts, ms_class, egprs_ms_class);
+ ms = bts_alloc_ms(bts);
if (imsi)
ms_set_imsi(ms, imsi);
ms_confirm_tlli(ms, tlli);
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp
index 08f5910..3282268 100644
--- a/tests/alloc/AllocTest.cpp
+++ b/tests/alloc/AllocTest.cpp
@@ -135,7 +135,7 @@
* least this part is working okay.
*/
for (i = 0; i < (int)ARRAY_SIZE(tbfs); ++i) {
- ms = bts_alloc_ms(bts, 0, 0);
+ ms = bts_alloc_ms(bts);
tbfs[i] = tbf_alloc(bts, ms, dir, -1, 0);
if (tbfs[i] == NULL)
break;
@@ -155,7 +155,7 @@
if (tbfs[i])
tbf_free(tbfs[i]);
- ms = bts_alloc_ms(bts, 0, 0);
+ ms = bts_alloc_ms(bts);
tbfs[0] = tbf_alloc(bts, ms, dir, -1, 0);
OSMO_ASSERT(tbfs[0]);
tbf_free(tbfs[0]);
@@ -221,7 +221,8 @@
enable_ts_on_bts(bts, ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7);
- ms = bts_alloc_ms(bts, ms_class, 0);
+ ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, ms_class);
/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
ms_set_timeout(ms, 0);
ul_tbf = ul_tbf_alloc(bts, ms, -1, true);
@@ -263,7 +264,8 @@
enable_ts_on_bts(bts, ts0, ts1, ts2, ts3, ts4, ts5, ts6, ts7);
- ms = bts_alloc_ms(bts, ms_class, 0);
+ ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, ms_class);
/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
ms_set_timeout(ms, 0);
dl_tbf = dl_tbf_alloc(bts, ms, -1, true);
@@ -313,7 +315,8 @@
tfi = bts_tfi_find_free(bts, GPRS_RLCMAC_UL_TBF, &trx_no, -1);
OSMO_ASSERT(tfi >= 0);
- ms = bts_alloc_ms(bts, ms_class, 0);
+ ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, ms_class);
/* Avoid delaying free to avoid tons of to-be-freed ms objects queuing */
ms_set_timeout(ms, 0);
ul_tbf = ul_tbf_alloc(bts, ms, -1, false);
@@ -558,7 +561,7 @@
ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms)
- ms = bts_alloc_ms(bts, 0, 0);
+ ms = bts_alloc_ms(bts);
ms_set_ms_class(ms, ms_class);
ms = alloc_tbfs(bts, ms, mode);
if (!ms)
@@ -767,7 +770,9 @@
trx->pdch[6].enable();
trx->pdch[7].enable();
- ms = bts_alloc_ms(bts, ms_class, egprs_ms_class);
+ ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, ms_class);
+ ms_set_egprs_ms_class(ms, egprs_ms_class);
dl_tbf1 = dl_tbf_alloc(bts, ms, 0, false);
OSMO_ASSERT(dl_tbf1);
@@ -778,7 +783,9 @@
OSMO_ASSERT(numTs1 == 4);
printf("TBF1: numTs(%d)\n", numTs1);
- ms = bts_alloc_ms(bts, ms_class, egprs_ms_class);
+ ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, ms_class);
+ ms_set_egprs_ms_class(ms, egprs_ms_class);
dl_tbf2 = dl_tbf_alloc(bts, ms, 0, false);
OSMO_ASSERT(dl_tbf2);
diff --git a/tests/app_info/AppInfoTest.cpp b/tests/app_info/AppInfoTest.cpp
index 659c011..1a4e660 100644
--- a/tests/app_info/AppInfoTest.cpp
+++ b/tests/app_info/AppInfoTest.cpp
@@ -17,6 +17,7 @@
#include "gprs_rlcmac.h"
#include "bts.h"
#include "tbf_dl.h"
+#include "gprs_ms.h"
extern "C" {
#include <osmocom/vty/telnet_interface.h>
@@ -89,9 +90,13 @@
trx->pdch[6].enable();
trx->pdch[7].enable();
- ms1 = bts_alloc_ms(bts, 10, 11);
+ ms1 = bts_alloc_ms(bts);
+ ms_set_ms_class(ms1, 10);
+ ms_set_egprs_ms_class(ms1, 11);
tbf1 = dl_tbf_alloc(bts, ms1, 0, false);
- ms2 = bts_alloc_ms(bts, 12, 13);
+ ms2 = bts_alloc_ms(bts);
+ ms_set_ms_class(ms2, 12);
+ ms_set_egprs_ms_class(ms2, 13);
tbf2 = dl_tbf_alloc(bts, ms2, 0, false);
fprintf(stderr, "\n");
diff --git a/tests/llc/LlcTest.cpp b/tests/llc/LlcTest.cpp
index 547dc79..3c19787 100644
--- a/tests/llc/LlcTest.cpp
+++ b/tests/llc/LlcTest.cpp
@@ -52,7 +52,7 @@
the_pcu = gprs_pcu_alloc(tall_pcu_ctx);
the_pcu->vty.llc_codel_interval_msec = LLC_CODEL_DISABLE;
struct gprs_rlcmac_bts *bts = bts_alloc(the_pcu, 0);
- struct GprsMs *ms = bts_alloc_ms(bts, 0, 0);
+ struct GprsMs *ms = bts_alloc_ms(bts);
return ms_llc_queue(ms);
}
@@ -235,7 +235,7 @@
/* DEFAULT should be resolved to GPRS_CODEL_SLOW_INTERVAL_MS 4000 */
#define GPRS_CODEL_SLOW_INTERVAL_MS 4000
struct gprs_rlcmac_bts *bts = bts_alloc(the_pcu, 0);
- struct GprsMs *ms = bts_alloc_ms(bts, 0, 0);
+ struct GprsMs *ms = bts_alloc_ms(bts);
gprs_llc_queue *queue = ms_llc_queue(ms);
unsigned int i;
@@ -297,7 +297,7 @@
static void test_llc_merge()
{
gprs_llc_queue *queue1 = prepare_queue();
- struct GprsMs *ms = bts_alloc_ms(queue1->ms->bts, 0, 0);
+ struct GprsMs *ms = bts_alloc_ms(queue1->ms->bts);
gprs_llc_queue *queue2 = ms_llc_queue(ms);
struct timespec expire_time = {0};
diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp
index cc62bc2..63074d0 100644
--- a/tests/tbf/TbfTest.cpp
+++ b/tests/tbf/TbfTest.cpp
@@ -123,7 +123,7 @@
/*
* Make a uplink and downlink allocation
*/
- ms = bts_alloc_ms(bts, 0, 0);
+ ms = bts_alloc_ms(bts);
gprs_rlcmac_tbf *dl_tbf = dl_tbf_alloc(bts,
ms, 0, false);
OSMO_ASSERT(dl_tbf != NULL);
@@ -206,7 +206,9 @@
GprsMs *ms;
gprs_rlcmac_dl_tbf *dl_tbf;
- ms = bts_alloc_ms(bts, ms_class, egprs_ms_class);
+ ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, ms_class);
+ ms_set_egprs_ms_class(ms, egprs_ms_class);
tfi = bts_tfi_find_free(bts, GPRS_RLCMAC_DL_TBF, &trx_no, -1);
OSMO_ASSERT(tfi >= 0);
@@ -2345,7 +2347,8 @@
gprs_bssgp_init(bts, 4234, 4234, 1, 1, false, 0, 0, 0);
/* Does no support EGPRS */
- ms = bts_alloc_ms(bts, ms_class, 0);
+ ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, ms_class);
dl_tbf = dl_tbf_alloc(bts, ms, 0, false);
ws_check(dl_tbf, __func__, 4, 64, true);
@@ -2353,7 +2356,9 @@
/* EGPRS-only */
/* Does support EGPRS */
- ms = bts_alloc_ms(bts, ms_class, ms_class);
+ ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, ms_class);
+ ms_set_egprs_ms_class(ms, ms_class);
dl_tbf = dl_tbf_alloc(bts, ms, 0, false);
ws_check(dl_tbf, __func__, 4, 128 + 4 * 64, true);
@@ -2393,7 +2398,9 @@
/* EGPRS-only */
/* Does support EGPRS */
- ms = bts_alloc_ms(bts, ms_class, ms_class);
+ ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, ms_class);
+ ms_set_egprs_ms_class(ms, ms_class);
dl_tbf = dl_tbf_alloc(bts, ms, 0, true);
ws_check(dl_tbf, __func__, 1, 128 + 1 * 64, false);
@@ -2470,7 +2477,7 @@
trx0->pdch[2].enable();
trx0->pdch[3].enable();
- second_ms = bts_alloc_ms(bts, 0, 0);
+ second_ms = bts_alloc_ms(bts);
ms_set_tlli(second_ms, new_tlli);
ul_tbf = ul_tbf_alloc(bts, second_ms, 0, true);
OSMO_ASSERT(ul_tbf != NULL);
@@ -3329,7 +3336,7 @@
int rc = 0;
- ms = bts_alloc_ms(bts, 0, 0);
+ ms = bts_alloc_ms(bts);
ms_set_tlli(ms, tlli);
ul_tbf = ms_new_ul_tbf_rejected_pacch(ms, pdch);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index b10bef4..73f2903 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -644,9 +644,9 @@
=== start test_tbf_exhaustion ===
PDCH(bts=0,trx=0,ts=4) PDCH state: disabled => enabled
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000000'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000000, partly confirmed
+Modifying MS object, TLLI = 0xc0000000, MS class 0 -> 45
MS(IMSI-001001000000000:TLLI-0xc0000000:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000000:TLLI-0xc0000000:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000000:TLLI-0xc0000000:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -674,9 +674,9 @@
TBF(DL:TFI-0-0-0:STATE-ASSIGN:GPRS:IMSI-001001000000000:TLLI-0xc0000000) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000001'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000001, partly confirmed
+Modifying MS object, TLLI = 0xc0000001, MS class 0 -> 45
MS(IMSI-001001000000001:TLLI-0xc0000001:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000001:TLLI-0xc0000001:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000001:TLLI-0xc0000001:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -704,9 +704,9 @@
TBF(DL:TFI-0-0-1:STATE-ASSIGN:GPRS:IMSI-001001000000001:TLLI-0xc0000001) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000002'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000002, partly confirmed
+Modifying MS object, TLLI = 0xc0000002, MS class 0 -> 45
MS(IMSI-001001000000002:TLLI-0xc0000002:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000002:TLLI-0xc0000002:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000002:TLLI-0xc0000002:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -734,9 +734,9 @@
TBF(DL:TFI-0-0-2:STATE-ASSIGN:GPRS:IMSI-001001000000002:TLLI-0xc0000002) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000003'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000003, partly confirmed
+Modifying MS object, TLLI = 0xc0000003, MS class 0 -> 45
MS(IMSI-001001000000003:TLLI-0xc0000003:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000003:TLLI-0xc0000003:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000003:TLLI-0xc0000003:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -764,9 +764,9 @@
TBF(DL:TFI-0-0-3:STATE-ASSIGN:GPRS:IMSI-001001000000003:TLLI-0xc0000003) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000004'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000004, partly confirmed
+Modifying MS object, TLLI = 0xc0000004, MS class 0 -> 45
MS(IMSI-001001000000004:TLLI-0xc0000004:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000004:TLLI-0xc0000004:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000004:TLLI-0xc0000004:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -794,9 +794,9 @@
TBF(DL:TFI-0-0-4:STATE-ASSIGN:GPRS:IMSI-001001000000004:TLLI-0xc0000004) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000005'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000005, partly confirmed
+Modifying MS object, TLLI = 0xc0000005, MS class 0 -> 45
MS(IMSI-001001000000005:TLLI-0xc0000005:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000005:TLLI-0xc0000005:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000005:TLLI-0xc0000005:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -824,9 +824,9 @@
TBF(DL:TFI-0-0-5:STATE-ASSIGN:GPRS:IMSI-001001000000005:TLLI-0xc0000005) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000006'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000006, partly confirmed
+Modifying MS object, TLLI = 0xc0000006, MS class 0 -> 45
MS(IMSI-001001000000006:TLLI-0xc0000006:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000006:TLLI-0xc0000006:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000006:TLLI-0xc0000006:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -854,9 +854,9 @@
TBF(DL:TFI-0-0-6:STATE-ASSIGN:GPRS:IMSI-001001000000006:TLLI-0xc0000006) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000007'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000007, partly confirmed
+Modifying MS object, TLLI = 0xc0000007, MS class 0 -> 45
MS(IMSI-001001000000007:TLLI-0xc0000007:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000007:TLLI-0xc0000007:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000007:TLLI-0xc0000007:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -884,9 +884,9 @@
TBF(DL:TFI-0-0-7:STATE-ASSIGN:GPRS:IMSI-001001000000007:TLLI-0xc0000007) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000008'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000008, partly confirmed
+Modifying MS object, TLLI = 0xc0000008, MS class 0 -> 45
MS(IMSI-001001000000008:TLLI-0xc0000008:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000008:TLLI-0xc0000008:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000008:TLLI-0xc0000008:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -914,9 +914,9 @@
TBF(DL:TFI-0-0-8:STATE-ASSIGN:GPRS:IMSI-001001000000008:TLLI-0xc0000008) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000009'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000009, partly confirmed
+Modifying MS object, TLLI = 0xc0000009, MS class 0 -> 45
MS(IMSI-001001000000009:TLLI-0xc0000009:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000009:TLLI-0xc0000009:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000009:TLLI-0xc0000009:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -944,9 +944,9 @@
TBF(DL:TFI-0-0-9:STATE-ASSIGN:GPRS:IMSI-001001000000009:TLLI-0xc0000009) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000010'
The MS object cannot fully confirm an unexpected TLLI: 0xc000000a, partly confirmed
+Modifying MS object, TLLI = 0xc000000a, MS class 0 -> 45
MS(IMSI-001001000000010:TLLI-0xc000000a:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000010:TLLI-0xc000000a:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000010:TLLI-0xc000000a:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -974,9 +974,9 @@
TBF(DL:TFI-0-0-10:STATE-ASSIGN:GPRS:IMSI-001001000000010:TLLI-0xc000000a) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000011'
The MS object cannot fully confirm an unexpected TLLI: 0xc000000b, partly confirmed
+Modifying MS object, TLLI = 0xc000000b, MS class 0 -> 45
MS(IMSI-001001000000011:TLLI-0xc000000b:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000011:TLLI-0xc000000b:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000011:TLLI-0xc000000b:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1004,9 +1004,9 @@
TBF(DL:TFI-0-0-11:STATE-ASSIGN:GPRS:IMSI-001001000000011:TLLI-0xc000000b) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000012'
The MS object cannot fully confirm an unexpected TLLI: 0xc000000c, partly confirmed
+Modifying MS object, TLLI = 0xc000000c, MS class 0 -> 45
MS(IMSI-001001000000012:TLLI-0xc000000c:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000012:TLLI-0xc000000c:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000012:TLLI-0xc000000c:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1034,9 +1034,9 @@
TBF(DL:TFI-0-0-12:STATE-ASSIGN:GPRS:IMSI-001001000000012:TLLI-0xc000000c) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000013'
The MS object cannot fully confirm an unexpected TLLI: 0xc000000d, partly confirmed
+Modifying MS object, TLLI = 0xc000000d, MS class 0 -> 45
MS(IMSI-001001000000013:TLLI-0xc000000d:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000013:TLLI-0xc000000d:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000013:TLLI-0xc000000d:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1064,9 +1064,9 @@
TBF(DL:TFI-0-0-13:STATE-ASSIGN:GPRS:IMSI-001001000000013:TLLI-0xc000000d) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000014'
The MS object cannot fully confirm an unexpected TLLI: 0xc000000e, partly confirmed
+Modifying MS object, TLLI = 0xc000000e, MS class 0 -> 45
MS(IMSI-001001000000014:TLLI-0xc000000e:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000014:TLLI-0xc000000e:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000014:TLLI-0xc000000e:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1094,9 +1094,9 @@
TBF(DL:TFI-0-0-14:STATE-ASSIGN:GPRS:IMSI-001001000000014:TLLI-0xc000000e) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000015'
The MS object cannot fully confirm an unexpected TLLI: 0xc000000f, partly confirmed
+Modifying MS object, TLLI = 0xc000000f, MS class 0 -> 45
MS(IMSI-001001000000015:TLLI-0xc000000f:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000015:TLLI-0xc000000f:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000015:TLLI-0xc000000f:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1124,9 +1124,9 @@
TBF(DL:TFI-0-0-15:STATE-ASSIGN:GPRS:IMSI-001001000000015:TLLI-0xc000000f) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000016'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000010, partly confirmed
+Modifying MS object, TLLI = 0xc0000010, MS class 0 -> 45
MS(IMSI-001001000000016:TLLI-0xc0000010:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000016:TLLI-0xc0000010:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000016:TLLI-0xc0000010:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1154,9 +1154,9 @@
TBF(DL:TFI-0-0-16:STATE-ASSIGN:GPRS:IMSI-001001000000016:TLLI-0xc0000010) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000017'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000011, partly confirmed
+Modifying MS object, TLLI = 0xc0000011, MS class 0 -> 45
MS(IMSI-001001000000017:TLLI-0xc0000011:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000017:TLLI-0xc0000011:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000017:TLLI-0xc0000011:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1184,9 +1184,9 @@
TBF(DL:TFI-0-0-17:STATE-ASSIGN:GPRS:IMSI-001001000000017:TLLI-0xc0000011) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000018'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000012, partly confirmed
+Modifying MS object, TLLI = 0xc0000012, MS class 0 -> 45
MS(IMSI-001001000000018:TLLI-0xc0000012:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000018:TLLI-0xc0000012:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000018:TLLI-0xc0000012:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1214,9 +1214,9 @@
TBF(DL:TFI-0-0-18:STATE-ASSIGN:GPRS:IMSI-001001000000018:TLLI-0xc0000012) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000019'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000013, partly confirmed
+Modifying MS object, TLLI = 0xc0000013, MS class 0 -> 45
MS(IMSI-001001000000019:TLLI-0xc0000013:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000019:TLLI-0xc0000013:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000019:TLLI-0xc0000013:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1244,9 +1244,9 @@
TBF(DL:TFI-0-0-19:STATE-ASSIGN:GPRS:IMSI-001001000000019:TLLI-0xc0000013) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000020'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000014, partly confirmed
+Modifying MS object, TLLI = 0xc0000014, MS class 0 -> 45
MS(IMSI-001001000000020:TLLI-0xc0000014:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000020:TLLI-0xc0000014:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000020:TLLI-0xc0000014:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1274,9 +1274,9 @@
TBF(DL:TFI-0-0-20:STATE-ASSIGN:GPRS:IMSI-001001000000020:TLLI-0xc0000014) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000021'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000015, partly confirmed
+Modifying MS object, TLLI = 0xc0000015, MS class 0 -> 45
MS(IMSI-001001000000021:TLLI-0xc0000015:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000021:TLLI-0xc0000015:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000021:TLLI-0xc0000015:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1304,9 +1304,9 @@
TBF(DL:TFI-0-0-21:STATE-ASSIGN:GPRS:IMSI-001001000000021:TLLI-0xc0000015) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000022'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000016, partly confirmed
+Modifying MS object, TLLI = 0xc0000016, MS class 0 -> 45
MS(IMSI-001001000000022:TLLI-0xc0000016:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000022:TLLI-0xc0000016:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000022:TLLI-0xc0000016:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1334,9 +1334,9 @@
TBF(DL:TFI-0-0-22:STATE-ASSIGN:GPRS:IMSI-001001000000022:TLLI-0xc0000016) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000023'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000017, partly confirmed
+Modifying MS object, TLLI = 0xc0000017, MS class 0 -> 45
MS(IMSI-001001000000023:TLLI-0xc0000017:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000023:TLLI-0xc0000017:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000023:TLLI-0xc0000017:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1364,9 +1364,9 @@
TBF(DL:TFI-0-0-23:STATE-ASSIGN:GPRS:IMSI-001001000000023:TLLI-0xc0000017) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000024'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000018, partly confirmed
+Modifying MS object, TLLI = 0xc0000018, MS class 0 -> 45
MS(IMSI-001001000000024:TLLI-0xc0000018:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000024:TLLI-0xc0000018:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000024:TLLI-0xc0000018:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1394,9 +1394,9 @@
TBF(DL:TFI-0-0-24:STATE-ASSIGN:GPRS:IMSI-001001000000024:TLLI-0xc0000018) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000025'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000019, partly confirmed
+Modifying MS object, TLLI = 0xc0000019, MS class 0 -> 45
MS(IMSI-001001000000025:TLLI-0xc0000019:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000025:TLLI-0xc0000019:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000025:TLLI-0xc0000019:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1424,9 +1424,9 @@
TBF(DL:TFI-0-0-25:STATE-ASSIGN:GPRS:IMSI-001001000000025:TLLI-0xc0000019) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000026'
The MS object cannot fully confirm an unexpected TLLI: 0xc000001a, partly confirmed
+Modifying MS object, TLLI = 0xc000001a, MS class 0 -> 45
MS(IMSI-001001000000026:TLLI-0xc000001a:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000026:TLLI-0xc000001a:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000026:TLLI-0xc000001a:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1454,9 +1454,9 @@
TBF(DL:TFI-0-0-26:STATE-ASSIGN:GPRS:IMSI-001001000000026:TLLI-0xc000001a) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000027'
The MS object cannot fully confirm an unexpected TLLI: 0xc000001b, partly confirmed
+Modifying MS object, TLLI = 0xc000001b, MS class 0 -> 45
MS(IMSI-001001000000027:TLLI-0xc000001b:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000027:TLLI-0xc000001b:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000027:TLLI-0xc000001b:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1484,9 +1484,9 @@
TBF(DL:TFI-0-0-27:STATE-ASSIGN:GPRS:IMSI-001001000000027:TLLI-0xc000001b) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000028'
The MS object cannot fully confirm an unexpected TLLI: 0xc000001c, partly confirmed
+Modifying MS object, TLLI = 0xc000001c, MS class 0 -> 45
MS(IMSI-001001000000028:TLLI-0xc000001c:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000028:TLLI-0xc000001c:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000028:TLLI-0xc000001c:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1514,9 +1514,9 @@
TBF(DL:TFI-0-0-28:STATE-ASSIGN:GPRS:IMSI-001001000000028:TLLI-0xc000001c) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000029'
The MS object cannot fully confirm an unexpected TLLI: 0xc000001d, partly confirmed
+Modifying MS object, TLLI = 0xc000001d, MS class 0 -> 45
MS(IMSI-001001000000029:TLLI-0xc000001d:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000029:TLLI-0xc000001d:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000029:TLLI-0xc000001d:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1544,9 +1544,9 @@
TBF(DL:TFI-0-0-29:STATE-ASSIGN:GPRS:IMSI-001001000000029:TLLI-0xc000001d) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000030'
The MS object cannot fully confirm an unexpected TLLI: 0xc000001e, partly confirmed
+Modifying MS object, TLLI = 0xc000001e, MS class 0 -> 45
MS(IMSI-001001000000030:TLLI-0xc000001e:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000030:TLLI-0xc000001e:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000030:TLLI-0xc000001e:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1574,9 +1574,9 @@
TBF(DL:TFI-0-0-30:STATE-ASSIGN:GPRS:IMSI-001001000000030:TLLI-0xc000001e) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000031'
The MS object cannot fully confirm an unexpected TLLI: 0xc000001f, partly confirmed
+Modifying MS object, TLLI = 0xc000001f, MS class 0 -> 45
MS(IMSI-001001000000031:TLLI-0xc000001f:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000031:TLLI-0xc000001f:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000031:TLLI-0xc000001f:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1604,9 +1604,9 @@
TBF(DL:TFI-0-0-31:STATE-ASSIGN:GPRS:IMSI-001001000000031:TLLI-0xc000001f) TX: START Immediate Assignment Downlink (PCH)
- TRX=0 (0) TS=4 TA=220
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000032'
The MS object cannot fully confirm an unexpected TLLI: 0xc0000020, partly confirmed
+Modifying MS object, TLLI = 0xc0000020, MS class 0 -> 45
MS(IMSI-001001000000032:TLLI-0xc0000020:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001000000032:TLLI-0xc0000020:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000032:TLLI-0xc0000020:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -1689,9 +1689,9 @@
=== start test_tbf_dl_llc_loss ===
PDCH(bts=0,trx=0,ts=4) PDCH state: disabled => enabled
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000123456'
The MS object cannot fully confirm an unexpected TLLI: 0xc0123456, partly confirmed
+Modifying MS object, TLLI = 0xc0123456, MS class 0 -> 45
MS(IMSI-001001000123456:TLLI-0xc0123456:TA-220:MSCLS-45-0) appending 19 bytes to DL LLC queue
MS(IMSI-001001000123456:TLLI-0xc0123456:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001000123456:TLLI-0xc0123456:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -3874,9 +3874,9 @@
=== start test_tbf_gprs_egprs ===
PDCH(bts=0,trx=0,ts=4) PDCH state: disabled => enabled
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 45
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001123456789'
The MS object cannot fully confirm an unexpected TLLI: 0xc0006789, partly confirmed
+Modifying MS object, TLLI = 0xc0006789, MS class 0 -> 45
MS(IMSI-001001123456789:TLLI-0xc0006789:TA-220:MSCLS-45-0) appending 256 bytes to DL LLC queue
MS(IMSI-001001123456789:TLLI-0xc0006789:TA-220:MSCLS-45-0) ********** DL-TBF starts here **********
MS(IMSI-001001123456789:TLLI-0xc0006789:TA-220:MSCLS-45-0) Allocating DL TBF
@@ -9579,9 +9579,9 @@
PDCH(bts=0,trx=1,ts=5) PDCH state: disabled => enabled
PDCH(bts=0,trx=1,ts=6) PDCH state: disabled => enabled
Creating MS object
-Modifying MS object, TLLI = 0xffffffff, MS class 0 -> 11
Modifying MS object, TLLI = 0xffffffff, IMSI '' -> '001001000000001'
The MS object cannot fully confirm an unexpected TLLI: 0xa3c2f953, partly confirmed
+Modifying MS object, TLLI = 0xa3c2f953, MS class 0 -> 11
MS(IMSI-001001000000001:TLLI-0xa3c2f953:TA-220:MSCLS-11-0) appending 19 bytes to DL LLC queue
MS(IMSI-001001000000001:TLLI-0xa3c2f953:TA-220:MSCLS-11-0) ********** DL-TBF starts here **********
MS(IMSI-001001000000001:TLLI-0xa3c2f953:TA-220:MSCLS-11-0) Allocating DL TBF
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index a4f6db6..94fc980 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -31,6 +31,7 @@
#include "gprs_rlcmac.h"
#include "egprs_rlc_compression.h"
#include "alloc_algo.h"
+#include "gprs_ms.h"
extern "C" {
#include <osmocom/core/application.h>
@@ -687,7 +688,9 @@
the_pcu->alloc_algorithm = alloc_algorithm_a;
bts->trx[0].pdch[4].enable();
- GprsMs *ms = bts_alloc_ms(bts, 1, 1);
+ GprsMs *ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, 1);
+ ms_set_egprs_ms_class(ms, 1);
struct gprs_rlcmac_ul_tbf *tbf = ul_tbf_alloc(bts, ms, 0, true);
struct crbb_test crbb_test = {0};
bitvec *rbb = NULL;
@@ -778,7 +781,8 @@
the_pcu->alloc_algorithm = alloc_algorithm_a;
bts->trx[0].pdch[2].enable();
bts->trx[0].pdch[3].enable();
- GprsMs *ms = bts_alloc_ms(bts, 1, 0);
+ GprsMs *ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, 1);
struct gprs_rlcmac_tbf *tbf = dl_tbf_alloc(bts, ms, 0, false);
static uint8_t res[] = { 0x06,
@@ -804,7 +808,8 @@
bts->trx[0].pdch[4].enable();
bts->trx[0].pdch[5].enable();
- GprsMs *ms = bts_alloc_ms(bts, 1, 0);
+ GprsMs *ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, 1);
struct gprs_rlcmac_tbf *tbf = ul_tbf_alloc(bts, ms, 0, false);
static uint8_t res[] = { 0x06,
0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
@@ -846,7 +851,9 @@
bts->trx[0].pdch[1].enable();
bts->trx[0].pdch[2].enable();
- GprsMs *ms = bts_alloc_ms(bts, 1, 1);
+ GprsMs *ms = bts_alloc_ms(bts);
+ ms_set_ms_class(ms, 1);
+ ms_set_egprs_ms_class(ms, 1);
struct gprs_rlcmac_tbf *tbf = ul_tbf_alloc(bts, ms, 0, false);
static uint8_t res[] = { 0x06,
0x3f, /* Immediate Assignment Message Type (GSM48_MT_RR_IMM_ASS) */
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/32341
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I36f07dc389f7abe205fc4bcddbde93735f5d5cfc
Gerrit-Change-Number: 32341
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
1
0
[S] Change in libosmo-abis[master]: e1d: maintain error log consistency in handle_ts_hdlc_read
by pespin 17 Apr '23
by pespin 17 Apr '23
17 Apr '23
Attention is currently required from: dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32338 )
Change subject: e1d: maintain error log consistency in handle_ts_hdlc_read
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32338
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I0af06d6adcbf61e0996d9888feb70b74f0c9c0ef
Gerrit-Change-Number: 32338
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 17 Apr 2023 12:32:08 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
1
0
Attention is currently required from: dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32336 )
Change subject: e1d: fix log output
......................................................................
Patch Set 3: Code-Review+1
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/libosmo-abis/+/32336/comment/def00541_7f7e7848
PS3, Line 9: When a read access to the osmo-e1d fd fails we just prind the error to
prind->print
--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32336
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I3a0500f083cbe8cc162826e2ec974875bafcaba9
Gerrit-Change-Number: 32336
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 17 Apr 2023 12:31:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
1
0