This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.orgHello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/4072
to look at the new patch set (#2).
Add multislot classes from latest spec
The table B.1 is copy-pasted from 3GPP TS 45.002 and reformatted via
Emacs macros into C struct to avoid typos.
Also make sure to check index properly when accessing multislot class.
Note: classes 35-45 which need TA offset are not properly supported
yet - this can be extended once we have such devices to test it.
Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c
Related: OS#2282
---
M src/gprs_rlcmac_ts_alloc.cpp
1 file changed, 26 insertions(+), 10 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/72/4072/2
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index 2b08cf6..9284406 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -32,12 +32,15 @@
/* Consider a PDCH as idle if has at most this number of TBFs assigned to it */
#define PDCH_IDLE_TBF_THRESH 1
-/* 3GPP TS 05.02 Annex B.1 */
+/* 3GPP TS 45.002 Annex B Table B.1 */
#define MS_NA 255 /* N/A */
#define MS_A 254 /* 1 with hopping, 0 without */
#define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/
#define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/
+/* FIXME: use actual TA offset for computation - make sure to adjust "1 + MS_TO" accordingly
+ see also "Offset required" bit in 3GPP TS 24.008 §10.5.1.7 */
+#define MS_TO 0 /* 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value) */
struct gprs_ms_multislot_class {
uint8_t rx, tx, sum; /* Maximum Number of Slots: RX, Tx, Sum Rx+Tx */
@@ -45,7 +48,7 @@
uint8_t type; /* Type of Mobile */
};
-static const struct gprs_ms_multislot_class gprs_ms_multislot_class[32] = {
+static const struct gprs_ms_multislot_class gprs_ms_multislot_class[] = {
/* M-S Class | Max # of slots | Min # of slots | Type */
/* | Rx Tx Sum | Tta Ttb Tra Trb | */
/* N/A */ { MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA },
@@ -78,8 +81,22 @@
/* 27 */ { 8, 4, MS_NA, 2, MS_B, 2, MS_C, 1 },
/* 28 */ { 8, 6, MS_NA, 2, MS_B, 2, MS_C, 1 },
/* 29 */ { 8, 8, MS_NA, 2, MS_B, 2, MS_C, 1 },
-/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA },
-/* N/A */ { MS_NA,MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA, MS_NA },
+ /* 30 */ { 5, 1, 6, 2, 1, 1, 1, 1 },
+ /* 31 */ { 5, 2, 6, 2, 1, 1, 1, 1 },
+ /* 32 */ { 5, 3, 6, 2, 1, 1, 1, 1 },
+ /* 33 */ { 5, 4, 6, 2, 1, 1, 1, 1 },
+ /* 34 */ { 5, 5, 6, 2, 1, 1, 1, 1 },
+ /* 35 */ { 5, 1, 6, 2, 1, 1 + MS_TO, 1, 1 },
+ /* 36 */ { 5, 2, 6, 2, 1, 1 + MS_TO, 1, 1 },
+ /* 37 */ { 5, 3, 6, 2, 1, 1 + MS_TO, 1, 1 },
+ /* 38 */ { 5, 4, 6, 2, 1, 1 + MS_TO, 1, 1 },
+ /* 39 */ { 5, 5, 6, 2, 1, 1 + MS_TO, 1, 1 },
+ /* 40 */ { 6, 1, 7, 1, 1, 1, MS_TO, 1 },
+ /* 41 */ { 6, 2, 7, 1, 1, 1, MS_TO, 1 },
+ /* 42 */ { 6, 3, 7, 1, 1, 1, MS_TO, 1 },
+ /* 43 */ { 6, 4, 7, 1, 1, 1, MS_TO, 1 },
+ /* 44 */ { 6, 5, 7, 1, 1, 1, MS_TO, 1 },
+ /* 45 */ { 6, 6, 7, 1, 1, 1, MS_TO, 1 },
};
static char *set_flag_chars(char *buf, uint8_t val, char set_char, char unset_char = 0)
@@ -510,13 +527,12 @@
enum {MASK_TT, MASK_TR};
unsigned mask_sel;
- if (ms->ms_class() >= 32) {
- LOGP(DRLCMAC, LOGL_ERROR, "Multislot class %d out of range.\n",
- ms->ms_class());
- return -EINVAL;
- }
-
if (ms->ms_class()) {
+ if (ms->ms_class() >= ARRAY_SIZE(gprs_ms_multislot_class)) {
+ LOGP(DRLCMAC, LOGL_ERROR, "Multislot class %u out of range [1, %u].\n",
+ ms->ms_class(), ARRAY_SIZE(gprs_ms_multislot_class));
+ return -EINVAL;
+ }
ms_class = &gprs_ms_multislot_class[ms->ms_class()];
LOGP(DRLCMAC, LOGL_DEBUG, "Slot Allocation (Algorithm B) for "
"class %d\n", ms->ms_class());
--
To view, visit https://gerrit.osmocom.org/4072
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1ef2eb99c517f25e7d1e71b985a3e0eb3879eb2c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder