Change in libosmocore[master]: libosmogsm: add Doxygen docs for gsm0502_hop_seq_gen()
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18245 ) Change subject: libosmogsm: add Doxygen docs for gsm0502_hop_seq_gen() .. Patch Set 4: (1 comment) This change is ready for review. https://gerrit.osmocom.org/c/libosmocore/+/18245/3/src/gsm/gsm0502.c File src/gsm/gsm0502.c: https://gerrit.osmocom.org/c/libosmocore/+/18245/3/src/gsm/gsm0502.c@228 PS3, Line 228: * \param[in] ma array of ARFCN representing the Mobile Allocation. > ACK. Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ife660f00d7a6d3b874ab2e59e34dca2109fa82d8 Gerrit-Change-Number: 18245 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-Comment-Date: Fri, 15 May 2020 05:51:00 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: tnt Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
Change in libosmocore[master]: libosmogsm: import hopping sequence generation code
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18244 ) Change subject: libosmogsm: import hopping sequence generation code .. Patch Set 4: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18244 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I8aba1578cc9d1bd89d4f5d33a6e8fedc8bea789a Gerrit-Change-Number: 18244 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-Comment-Date: Fri, 15 May 2020 05:50:37 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: pcu: Introduce test TC_countdown_procedure
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18260 ) Change subject: pcu: Introduce test TC_countdown_procedure .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18260 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: I2b92bf4a17e89b1d68869aac4243c0e106ce3be5 Gerrit-Change-Number: 18260 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 15 May 2020 05:34:15 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: pcu: f_tx_rlcmac_ul_n_blocks(): Keep BSN state and return all payload...
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18259 ) Change subject: pcu: f_tx_rlcmac_ul_n_blocks(): Keep BSN state and return all payload sent .. Patch Set 1: Code-Review+1 (2 comments) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18259/1/pcu/PCU_Tests.ttcn File pcu/PCU_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18259/1/pcu/PCU_Tests.ttcn@529 PS1, Line 529: f_tx_rlcmac_ul_block Please add a comment stating that "this function returns number of padding bytes". https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18259/1/pcu/PCU_Tests.ttcn@543 PS1, Line 543: inout I don't see where this 'out' part is actually used. Please add a comment what is it (planned) for. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18259 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: I7dde6a2e71a9e64cf6c704eda37b47838460102b Gerrit-Change-Number: 18259 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 15 May 2020 05:30:30 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: pcu: Use BS_CV_MAX in f_tx_rlcmac_ul_n_blocks
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18258 ) Change subject: pcu: Use BS_CV_MAX in f_tx_rlcmac_ul_n_blocks .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18258 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: I685d1535154197bb85e18875e0a4d41122a24fa0 Gerrit-Change-Number: 18258 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Fri, 15 May 2020 05:22:41 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: Introduce test TC_force_two_phase_access
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18254 ) Change subject: Introduce test TC_force_two_phase_access .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18254 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: Icce25b5d113eb5b37ec1e5b6c6c14aacdb01cd8d Gerrit-Change-Number: 18254 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Fri, 15 May 2020 05:21:15 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: pcu: use correct RA type to properly test 2phase access
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 ) Change subject: pcu: use correct RA type to properly test 2phase access .. Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 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: If636a4898dfa175fdbd6baf04f7f2c955a9c525d Gerrit-Change-Number: 18239 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 15 May 2020 05:18:35 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: pcu: Support decoding Egprs Pkt Ul Ass on PDCH
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18252 ) Change subject: pcu: Support decoding Egprs Pkt Ul Ass on PDCH .. Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18252/1/library/RLCMAC_CSN1_Types.ttcn File library/RLCMAC_CSN1_Types.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18252/1/library/RLCMAC_CSN1_Types.ttcn@266 PS1, Line 266: Alignment. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18252 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: I30fb98aab67303997b803a0359ffc2e0b65ebf01 Gerrit-Change-Number: 18252 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Fri, 15 May 2020 05:17:54 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-netif[master]: amr: Fix OA<->BWE conversion.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/18265 ) Change subject: amr: Fix OA<->BWE conversion. .. Patch Set 5: Code-Review+1 I reverted the previous version of this patch because it had a bug, now it has a few changes, and I don't feel solid enough to +2 right away. Can another reviewer give it another look plz... -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/18265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0462e054a0adc9080456f3eeea9cab7c229cdb70 Gerrit-Change-Number: 18265 Gerrit-PatchSet: 5 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Comment-Date: Fri, 15 May 2020 00:13:19 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-netif[master]: amr: Fix OA<->BWE conversion.
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/18265 to look at the new patch set (#5). Change subject: amr: Fix OA<->BWE conversion. .. amr: Fix OA<->BWE conversion. Size of a single AMR frame doesn't always shrink by a byte when converted from octet-aligned to bandwidth-efficient mode. It does shrink for AMR modes 2, 3, 4, 6, and 7 but doesn't shrink for AMR modes 0, 1, 5, and SID frames because we only remove 6 bits. So old code generated truncated AMR packets for those AMR modes. This patch fixes the length calculation by properly counting bits. Proper bit counting is also bringing us one small step closer to properly handlig multi-frame AMR packets. Change-Id: I0462e054a0adc9080456f3eeea9cab7c229cdb70 --- M include/osmocom/netif/amr.h M src/amr.c M tests/amr/amr_test.c M tests/amr/amr_test.ok 4 files changed, 151 insertions(+), 75 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/65/18265/5 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/18265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0462e054a0adc9080456f3eeea9cab7c229cdb70 Gerrit-Change-Number: 18265 Gerrit-PatchSet: 5 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in libosmo-netif[master]: amr: Fix OA<->BWE conversion.
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/18265 to look at the new patch set (#3). Change subject: amr: Fix OA<->BWE conversion. .. amr: Fix OA<->BWE conversion. Size of a single AMR frame doesn't always shrink by a byte when converted from octet-aligned to bandwidth-efficient mode. It does shrink for AMR modes 2, 3, 4, 6, and 7 but doesn't shrink for AMR modes 0, 1, 5, and SID frames because we only remove 6 bits. So old code generated truncated AMR packets for those AMR modes. This patch fixes the length calculation by properly counting bits. Proper bit counting is also bringing us one small step closer to properly handlig multi-frame AMR packets. Change-Id: I0462e054a0adc9080456f3eeea9cab7c229cdb70 --- M include/osmocom/netif/amr.h M src/amr.c M tests/amr/amr_test.c M tests/amr/amr_test.ok 4 files changed, 151 insertions(+), 75 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/65/18265/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/18265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0462e054a0adc9080456f3eeea9cab7c229cdb70 Gerrit-Change-Number: 18265 Gerrit-PatchSet: 3 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in libosmo-netif[master]: amr: Fix OA<->BWE conversion.
neels has uploaded a new patch set (#4) to the change originally created by ipse. ( https://gerrit.osmocom.org/c/libosmo-netif/+/18265 ) Change subject: amr: Fix OA<->BWE conversion. .. amr: Fix OA<->BWE conversion. Size of a single AMR frame doesn't always shrink by a byte when converted from octet-aligned to bandwidth-efficient mode. It does shrink for AMR modes 2, 3, 4, 6, and 7 but doesn't shrink for AMR modes 0, 1, 5, and SID frames because we only remove 6 bits. So old code generated truncated AMR packets for those AMR modes. This patch fixes the length calculation by properly counting bits. Proper bit counting is also bringing us one small step closer to properly handlig multi-frame AMR packets. Change-Id: I0462e054a0adc9080456f3eeea9cab7c229cdb70 --- M include/osmocom/netif/amr.h M src/amr.c M tests/amr/amr_test.c M tests/amr/amr_test.ok 4 files changed, 147 insertions(+), 75 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/65/18265/4 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/18265 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0462e054a0adc9080456f3eeea9cab7c229cdb70 Gerrit-Change-Number: 18265 Gerrit-PatchSet: 4 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in libosmo-netif[master]: amr: Fix OA<->BWE conversion.
ipse has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/18265 ) Change subject: amr: Fix OA<->BWE conversion. .. amr: Fix OA<->BWE conversion. Size of a single AMR frame doesn't always shrink by a byte when converted from octet-aligned to bandwidth-efficient mode. It does shrink for AMR modes 2, 3, 4, 6, and 7 but doesn't shrink for AMR modes 0, 1, 5, and SID frames because we only remove 6 bits. So old code generated truncated AMR packets for those AMR modes. This patch fixes the length calculation by properly counting bits. Proper bit counting is also bringing us one small step closer to properly handlig multi-frame AMR packets. Change-Id: I0462e054a0adc9080456f3eeea9cab7c229cdb70 --- M include/osmocom/netif/amr.h M src/amr.c M tests/amr/amr_test.c M tests/amr/amr_test.ok 4 files changed, 147 insertions(+), 75 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/65/18265/1 diff --git a/include/osmocom/netif/amr.h b/include/osmocom/netif/amr.h index 6e37c99..c5a8e28 100644 --- a/include/osmocom/netif/amr.h +++ b/include/osmocom/netif/amr.h @@ -78,20 +78,34 @@ #define AMR_FT_SID 8 /* SID */ #define AMR_FT_MAX 9 -/* AMR voice frame length (in bytes, rounded), - * See also RFC 3267, chapter 3.6 */ -#define AMR_FT_0_LEN 12 /* 4.75 */ -#define AMR_FT_1_LEN 13 /* 5.15 */ -#define AMR_FT_2_LEN 15 /* 5.90 */ -#define AMR_FT_3_LEN 17 /* 6.70 */ -#define AMR_FT_4_LEN 19 /* 7.40 */ -#define AMR_FT_5_LEN 20 /* 7.95 */ -#define AMR_FT_6_LEN 26 /* 10.2 */ -#define AMR_FT_7_LEN 31 /* 12.2 */ -#define AMR_FT_SID_LEN 5 /* SID */ - -/* NOTE: the above constant refers to the length of one AMR speech frame-block, +/* AMR voice frame length (in bits). + * See also RFC 3267, chapter 3.6. + * + * NOTE: These constants refer to the length of one AMR speech frame-block, * not counting CMR, TOC. */ +#define AMR_FT_0_LEN_BITS 95 /* 4.75 */ +#define AMR_FT_1_LEN_BITS 103 /* 5.15 */ +#define AMR_FT_2_LEN_BITS 118 /* 5.90 */ +#define AMR_FT_3_LEN_BITS 134 /* 6.70 */ +#define AMR_FT_4_LEN_BITS 148 /* 7.40 */ +#define AMR_FT_5_LEN_BITS 159 /* 7.95 */ +#define AMR_FT_6_LEN_BITS 204 /* 10.2 */ +#define AMR_FT_7_LEN_BITS 244 /* 12.2 */ +#define AMR_FT_SID_LEN_BITS39 /* SID */ + +/* AMR voice frame length (in bytes, rounded). + * + * NOTE: These constants refer to the length of one AMR speech frame-block, + * not counting CMR, TOC. */ +#define AMR_FT_0_LEN ((AMR_FT_0_LEN_BITS+7)/8) /* 4.75 */ +#define AMR_FT_1_LEN ((AMR_FT_1_LEN_BITS+7)/8) /* 5.15 */ +#define AMR_FT_2_LEN ((AMR_FT_2_LEN_BITS+7)/8) /* 5.90 */ +#define AMR_FT_3_LEN ((AMR_FT_3_LEN_BITS+7)/8) /* 6.70 */ +#define AMR_FT_4_LEN ((AMR_FT_4_LEN_BITS+7)/8) /* 7.40 */ +#define AMR_FT_5_LEN ((AMR_FT_5_LEN_BITS+7)/8) /* 7.95 */ +#define AMR_FT_6_LEN ((AMR_FT_6_LEN_BITS+7)/8) /* 10.2 */ +#define AMR_FT_7_LEN ((AMR_FT_7_LEN_BITS+7)/8) /* 12.2 */ +#define AMR_FT_SID_LEN ((AMR_FT_SID_LEN_BITS+7)/8) /* SID */ int osmo_amr_ft_valid(uint8_t amr_ft); size_t osmo_amr_bytes(uint8_t amr_cmr); diff --git a/src/amr.c b/src/amr.c index 5609c46..838915d 100644 --- a/src/amr.c +++ b/src/amr.c @@ -29,6 +29,18 @@ * 7 12.20 24431 */ +static size_t amr_ft_to_bits[AMR_FT_MAX] = { + [AMR_FT_0] = AMR_FT_0_LEN_BITS, + [AMR_FT_1] = AMR_FT_1_LEN_BITS, + [AMR_FT_2] = AMR_FT_2_LEN_BITS, + [AMR_FT_3] = AMR_FT_3_LEN_BITS, + [AMR_FT_4] = AMR_FT_4_LEN_BITS, + [AMR_FT_5] = AMR_FT_5_LEN_BITS, + [AMR_FT_6] = AMR_FT_6_LEN_BITS, + [AMR_FT_7] = AMR_FT_7_LEN_BITS, + [AMR_FT_SID]= AMR_FT_SID_LEN_BITS, +}; + static size_t amr_ft_to_bytes[AMR_FT_MAX] = { [AMR_FT_0] = AMR_FT_0_LEN, [AMR_FT_1] = AMR_FT_1_LEN, @@ -41,6 +53,11 @@ [AMR_FT_SID]= AMR_FT_SID_LEN, }; +size_t osmo_amr_bits(uint8_t amr_ft) +{ + return amr_ft_to_bits[amr_ft]; +} + size_t osmo_amr_bytes(uint8_t amr_ft) { return amr_ft_to_bytes[amr_ft]; @@ -119,8 +136,10 @@ int osmo_amr_oa_to_bwe(uint8_t *payload, unsigned int payload_len) { struct amr_hdr *oa_hdr = (struct amr_hdr *)payload; + unsigned int ft = oa_hdr->ft; unsigned int frame_len = payload_len - sizeof(struct amr_hdr); unsigned int i; + int bwe_payload_len; /* This implementation is not capable to handle multi-frame * packets, so we need to make sure that the frame we operate on @@ -137,8 +156,10 @@ payload[i + 2] = payload[i + 2] << 6; } - /* The overall saving is one byte! */ - return payload_len - 1; + /* Calculate new payload length */ + bwe_payload_len
Change in libosmo-netif[master]: Revert "amr: Fix OA<->BWE conversion."
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/18264 ) Change subject: Revert "amr: Fix OA<->BWE conversion." .. Patch Set 1: Code-Review+2 self +2 to fix the current master build -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/18264 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I8232521c513722435e71dc90bdbfee10f8f83496 Gerrit-Change-Number: 18264 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 23:27:22 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-netif[master]: Revert "amr: Fix OA<->BWE conversion."
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/18264 ) Change subject: Revert "amr: Fix OA<->BWE conversion." .. Revert "amr: Fix OA<->BWE conversion." This reverts commit 002a51e2180cf19bf5e11e16d78271998d0b3f5c. Reason for revert: amr_test fails with sanitizer build: Sample No.: 6 bw-efficient: a7bfc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03f 10100011 ../../../src/libosmo-netif/src/amr.c:63:24: runtime error: index 15 out of bounds for type 'size_t [9]' ../../../src/libosmo-netif/src/amr.c:63:24: runtime error: load of address 0x7f69498e56b8 with insufficient space for an object of type 'size_t' 0x7f69498e56b8: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 67 00 00 00 00 00 00 00 76 00 00 00 ^ = ==489935==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f69498e56b8 at pc 0x7f69498abec7 bp 0x7ffeafb35330 sp 0x7ffeafb35328 READ of size 8 at 0x7f69498e56b8 thread T0 #0 0x7f69498abec6 in osmo_amr_bytes ../../../src/libosmo-netif/src/amr.c:63 #1 0x7f69498ac661 in osmo_amr_bwe_to_oa ../../../src/libosmo-netif/src/amr.c:193 #2 0x5648b11afb96 in osmo_amr_bwe_to_oa_test ../../../src/libosmo-netif/tests/amr/amr_test.c:134 #3 0x5648b11af31d in main ../../../src/libosmo-netif/tests/amr/amr_test.c:235 #4 0x7f6948d5de0a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26e0a) #5 0x5648b11af3d9 in _start (/n/s/dev/make/libosmo-netif/tests/amr/amr_test+0x43d9) 0x7f69498e56b8 is located 8 bytes to the left of global variable 'amr_ft_to_bits' defined in '../../../src/libosmo-netif/src/amr.c:32:15' (0x7f69498e56c0) of size 72 0x7f69498e56b8 is located 48 bytes to the right of global variable 'amr_ft_to_bytes' defined in '../../../src/libosmo-netif/src/amr.c:44:15' (0x7f69498e5640) of size 72 SUMMARY: AddressSanitizer: global-buffer-overflow ../../../src/libosmo-netif/src/amr.c:63 in osmo_amr_bytes Change-Id: I8232521c513722435e71dc90bdbfee10f8f83496 --- M include/osmocom/netif/amr.h M src/amr.c M tests/amr/amr_test.c M tests/amr/amr_test.ok 4 files changed, 74 insertions(+), 144 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, approved diff --git a/include/osmocom/netif/amr.h b/include/osmocom/netif/amr.h index c5a8e28..6e37c99 100644 --- a/include/osmocom/netif/amr.h +++ b/include/osmocom/netif/amr.h @@ -78,34 +78,20 @@ #define AMR_FT_SID 8 /* SID */ #define AMR_FT_MAX 9 -/* AMR voice frame length (in bits). - * See also RFC 3267, chapter 3.6. - * - * NOTE: These constants refer to the length of one AMR speech frame-block, - * not counting CMR, TOC. */ -#define AMR_FT_0_LEN_BITS 95 /* 4.75 */ -#define AMR_FT_1_LEN_BITS 103 /* 5.15 */ -#define AMR_FT_2_LEN_BITS 118 /* 5.90 */ -#define AMR_FT_3_LEN_BITS 134 /* 6.70 */ -#define AMR_FT_4_LEN_BITS 148 /* 7.40 */ -#define AMR_FT_5_LEN_BITS 159 /* 7.95 */ -#define AMR_FT_6_LEN_BITS 204 /* 10.2 */ -#define AMR_FT_7_LEN_BITS 244 /* 12.2 */ -#define AMR_FT_SID_LEN_BITS39 /* SID */ +/* AMR voice frame length (in bytes, rounded), + * See also RFC 3267, chapter 3.6 */ +#define AMR_FT_0_LEN 12 /* 4.75 */ +#define AMR_FT_1_LEN 13 /* 5.15 */ +#define AMR_FT_2_LEN 15 /* 5.90 */ +#define AMR_FT_3_LEN 17 /* 6.70 */ +#define AMR_FT_4_LEN 19 /* 7.40 */ +#define AMR_FT_5_LEN 20 /* 7.95 */ +#define AMR_FT_6_LEN 26 /* 10.2 */ +#define AMR_FT_7_LEN 31 /* 12.2 */ +#define AMR_FT_SID_LEN 5 /* SID */ -/* AMR voice frame length (in bytes, rounded). - * - * NOTE: These constants refer to the length of one AMR speech frame-block, +/* NOTE: the above constant refers to the length of one AMR speech frame-block, * not counting CMR, TOC. */ -#define AMR_FT_0_LEN ((AMR_FT_0_LEN_BITS+7)/8) /* 4.75 */ -#define AMR_FT_1_LEN ((AMR_FT_1_LEN_BITS+7)/8) /* 5.15 */ -#define AMR_FT_2_LEN ((AMR_FT_2_LEN_BITS+7)/8) /* 5.90 */ -#define AMR_FT_3_LEN ((AMR_FT_3_LEN_BITS+7)/8) /* 6.70 */ -#define AMR_FT_4_LEN ((AMR_FT_4_LEN_BITS+7)/8) /* 7.40 */ -#define AMR_FT_5_LEN ((AMR_FT_5_LEN_BITS+7)/8) /* 7.95 */ -#define AMR_FT_6_LEN ((AMR_FT_6_LEN_BITS+7)/8) /* 10.2 */ -#define AMR_FT_7_LEN ((AMR_FT_7_LEN_BITS+7)/8) /* 12.2 */ -#define AMR_FT_SID_LEN ((AMR_FT_SID_LEN_BITS+7)/8) /* SID */ int osmo_amr_ft_valid(uint8_t amr_ft); size_t osmo_amr_bytes(uint8_t amr_cmr); diff --git a/src/amr.c b/src/amr.c
Change in libosmo-netif[master]: amr: Fix OA<->BWE conversion.
neels has created a revert of this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/17997 ) Change subject: amr: Fix OA<->BWE conversion. .. -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/17997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I9fc5fb92e9bada22a47a82fcfb0925e892e50ced Gerrit-Change-Number: 17997 Gerrit-PatchSet: 8 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: revert
Change in libosmo-netif[master]: Revert "amr: Fix OA<->BWE conversion."
Hello dexter, pespin, ipse, laforge, Jenkins Builder, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/18264 to review the following change. Change subject: Revert "amr: Fix OA<->BWE conversion." .. Revert "amr: Fix OA<->BWE conversion." This reverts commit 002a51e2180cf19bf5e11e16d78271998d0b3f5c. Reason for revert: amr_test fails with sanitizer build: Sample No.: 6 bw-efficient: a7bfc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03f 10100011 ../../../src/libosmo-netif/src/amr.c:63:24: runtime error: index 15 out of bounds for type 'size_t [9]' ../../../src/libosmo-netif/src/amr.c:63:24: runtime error: load of address 0x7f69498e56b8 with insufficient space for an object of type 'size_t' 0x7f69498e56b8: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 5f 00 00 00 00 00 00 00 67 00 00 00 00 00 00 00 76 00 00 00 ^ = ==489935==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f69498e56b8 at pc 0x7f69498abec7 bp 0x7ffeafb35330 sp 0x7ffeafb35328 READ of size 8 at 0x7f69498e56b8 thread T0 #0 0x7f69498abec6 in osmo_amr_bytes ../../../src/libosmo-netif/src/amr.c:63 #1 0x7f69498ac661 in osmo_amr_bwe_to_oa ../../../src/libosmo-netif/src/amr.c:193 #2 0x5648b11afb96 in osmo_amr_bwe_to_oa_test ../../../src/libosmo-netif/tests/amr/amr_test.c:134 #3 0x5648b11af31d in main ../../../src/libosmo-netif/tests/amr/amr_test.c:235 #4 0x7f6948d5de0a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26e0a) #5 0x5648b11af3d9 in _start (/n/s/dev/make/libosmo-netif/tests/amr/amr_test+0x43d9) 0x7f69498e56b8 is located 8 bytes to the left of global variable 'amr_ft_to_bits' defined in '../../../src/libosmo-netif/src/amr.c:32:15' (0x7f69498e56c0) of size 72 0x7f69498e56b8 is located 48 bytes to the right of global variable 'amr_ft_to_bytes' defined in '../../../src/libosmo-netif/src/amr.c:44:15' (0x7f69498e5640) of size 72 SUMMARY: AddressSanitizer: global-buffer-overflow ../../../src/libosmo-netif/src/amr.c:63 in osmo_amr_bytes Change-Id: I8232521c513722435e71dc90bdbfee10f8f83496 --- M include/osmocom/netif/amr.h M src/amr.c M tests/amr/amr_test.c M tests/amr/amr_test.ok 4 files changed, 74 insertions(+), 144 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/64/18264/1 diff --git a/include/osmocom/netif/amr.h b/include/osmocom/netif/amr.h index c5a8e28..6e37c99 100644 --- a/include/osmocom/netif/amr.h +++ b/include/osmocom/netif/amr.h @@ -78,34 +78,20 @@ #define AMR_FT_SID 8 /* SID */ #define AMR_FT_MAX 9 -/* AMR voice frame length (in bits). - * See also RFC 3267, chapter 3.6. - * - * NOTE: These constants refer to the length of one AMR speech frame-block, - * not counting CMR, TOC. */ -#define AMR_FT_0_LEN_BITS 95 /* 4.75 */ -#define AMR_FT_1_LEN_BITS 103 /* 5.15 */ -#define AMR_FT_2_LEN_BITS 118 /* 5.90 */ -#define AMR_FT_3_LEN_BITS 134 /* 6.70 */ -#define AMR_FT_4_LEN_BITS 148 /* 7.40 */ -#define AMR_FT_5_LEN_BITS 159 /* 7.95 */ -#define AMR_FT_6_LEN_BITS 204 /* 10.2 */ -#define AMR_FT_7_LEN_BITS 244 /* 12.2 */ -#define AMR_FT_SID_LEN_BITS39 /* SID */ +/* AMR voice frame length (in bytes, rounded), + * See also RFC 3267, chapter 3.6 */ +#define AMR_FT_0_LEN 12 /* 4.75 */ +#define AMR_FT_1_LEN 13 /* 5.15 */ +#define AMR_FT_2_LEN 15 /* 5.90 */ +#define AMR_FT_3_LEN 17 /* 6.70 */ +#define AMR_FT_4_LEN 19 /* 7.40 */ +#define AMR_FT_5_LEN 20 /* 7.95 */ +#define AMR_FT_6_LEN 26 /* 10.2 */ +#define AMR_FT_7_LEN 31 /* 12.2 */ +#define AMR_FT_SID_LEN 5 /* SID */ -/* AMR voice frame length (in bytes, rounded). - * - * NOTE: These constants refer to the length of one AMR speech frame-block, +/* NOTE: the above constant refers to the length of one AMR speech frame-block, * not counting CMR, TOC. */ -#define AMR_FT_0_LEN ((AMR_FT_0_LEN_BITS+7)/8) /* 4.75 */ -#define AMR_FT_1_LEN ((AMR_FT_1_LEN_BITS+7)/8) /* 5.15 */ -#define AMR_FT_2_LEN ((AMR_FT_2_LEN_BITS+7)/8) /* 5.90 */ -#define AMR_FT_3_LEN ((AMR_FT_3_LEN_BITS+7)/8) /* 6.70 */ -#define AMR_FT_4_LEN ((AMR_FT_4_LEN_BITS+7)/8) /* 7.40 */ -#define AMR_FT_5_LEN ((AMR_FT_5_LEN_BITS+7)/8) /* 7.95 */ -#define AMR_FT_6_LEN ((AMR_FT_6_LEN_BITS+7)/8) /* 10.2 */ -#define AMR_FT_7_LEN ((AMR_FT_7_LEN_BITS+7)/8) /* 12.2 */ -#define AMR_FT_SID_LEN ((AMR_FT_SID_LEN_BITS+7)/8) /* SID */ int
Change in osmo-bsc[master]: bsc_vty: Coding style fix - brackets around a complex if/else
ipse has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18263 ) Change subject: bsc_vty: Coding style fix - brackets around a complex if/else .. bsc_vty: Coding style fix - brackets around a complex if/else Change-Id: I771ef866aba6af9e2a10a06e593eef78b7405377 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 0fd462f..30f685f 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -5007,9 +5007,9 @@ return CMD_WARNING; if (!strcmp(argv[4], "borken")) { - if (lchan->fi->state == LCHAN_ST_UNUSED) + if (lchan->fi->state == LCHAN_ST_UNUSED) { osmo_fsm_inst_state_chg(lchan->fi, LCHAN_ST_BORKEN, 0, 0); - else { + } else { vty_out(vty, "%% lchan is in state %s, only lchans that are in state %s may be moved to state %s manually%s", osmo_fsm_state_name(lchan->fi->fsm, lchan->fi->state), -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I771ef866aba6af9e2a10a06e593eef78b7405377 Gerrit-Change-Number: 18263 Gerrit-PatchSet: 3 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-bsc[master]: stats: Add counters and gauges for BORKEN lchans/TS
Hello pespin, neels, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/18192 to look at the new patch set (#7). Change subject: stats: Add counters and gauges for BORKEN lchans/TS .. stats: Add counters and gauges for BORKEN lchans/TS Now we can monitor the situation with the BORKEN lchans and TS in our BTS's over time. Change-Id: I427bbe1613a0e92bff432a7d76592fe50f620ebe --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/gsm_data.c M src/osmo-bsc/lchan_fsm.c M src/osmo-bsc/timeslot_fsm.c 5 files changed, 136 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/18192/7 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I427bbe1613a0e92bff432a7d76592fe50f620ebe Gerrit-Change-Number: 18192 Gerrit-PatchSet: 7 Gerrit-Owner: ipse Gerrit-Assignee: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in osmo-bsc[master]: stats: Add counters and gauges for BORKEN lchans/TS
ipse has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18192 ) Change subject: stats: Add counters and gauges for BORKEN lchans/TS .. Patch Set 6: (2 comments) https://gerrit.osmocom.org/c/osmo-bsc/+/18192/6/src/osmo-bsc/lchan_fsm.c File src/osmo-bsc/lchan_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/18192/6/src/osmo-bsc/lchan_fsm.c@1417 PS6, Line 1417: osmo_stat_item_set(lchan->ts->trx->bts->bts_statg->items[BTS_STAT_LCHAN_BORKEN], 0); > I this set(0) correct? Ok, you're right. We should decrease the stat. I forgot that it's per-BTS. https://gerrit.osmocom.org/c/osmo-bsc/+/18192/6/src/osmo-bsc/timeslot_fsm.c File src/osmo-bsc/timeslot_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/18192/6/src/osmo-bsc/timeslot_fsm.c@767 PS6, Line 767: osmo_stat_item_set(ts->trx->bts->bts_statg->items[BTS_STAT_TS_BORKEN], 0); > Same here. Ack -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I427bbe1613a0e92bff432a7d76592fe50f620ebe Gerrit-Change-Number: 18192 Gerrit-PatchSet: 6 Gerrit-Owner: ipse Gerrit-Assignee: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 22:42:54 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin Gerrit-MessageType: comment
Change in osmo-bsc[master]: bsc_vty: Coding style fix - brackets around a complex if/else
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18263 ) Change subject: bsc_vty: Coding style fix - brackets around a complex if/else .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I771ef866aba6af9e2a10a06e593eef78b7405377 Gerrit-Change-Number: 18263 Gerrit-PatchSet: 2 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 22:29:09 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bsc[master]: stats: Add counters and gauges for BORKEN lchans/TS
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18192 ) Change subject: stats: Add counters and gauges for BORKEN lchans/TS .. Patch Set 6: (2 comments) https://gerrit.osmocom.org/c/osmo-bsc/+/18192/6/src/osmo-bsc/lchan_fsm.c File src/osmo-bsc/lchan_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/18192/6/src/osmo-bsc/lchan_fsm.c@1417 PS6, Line 1417: osmo_stat_item_set(lchan->ts->trx->bts->bts_statg->items[BTS_STAT_LCHAN_BORKEN], 0); I this set(0) correct? https://gerrit.osmocom.org/c/osmo-bsc/+/18192/6/src/osmo-bsc/timeslot_fsm.c File src/osmo-bsc/timeslot_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/18192/6/src/osmo-bsc/timeslot_fsm.c@767 PS6, Line 767: osmo_stat_item_set(ts->trx->bts->bts_statg->items[BTS_STAT_TS_BORKEN], 0); Same here. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I427bbe1613a0e92bff432a7d76592fe50f620ebe Gerrit-Change-Number: 18192 Gerrit-PatchSet: 6 Gerrit-Owner: ipse Gerrit-Assignee: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 22:28:50 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmocom-bb[master]: trx_toolkit/gsm_shared.py: implement hopping sequence generation
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/18261 ) Change subject: trx_toolkit/gsm_shared.py: implement hopping sequence generation .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/18261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9ecabfef6f5a4e4180956c6a019c386ccb1c9acd Gerrit-Change-Number: 18261 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 22:18:18 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: struct_endianess.py: also recognise unnamed substructs
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18256 ) Change subject: struct_endianess.py: also recognise unnamed substructs .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3c4986ebd1e41aad8b279d6132b7e3b2539d7dc5 Gerrit-Change-Number: 18256 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 22:00:45 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: add missing endian.h in gsm_23_041.h
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18255 ) Change subject: add missing endian.h in gsm_23_041.h .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18255 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I593cc5e8272469b570559206bb02b6e79797340b Gerrit-Change-Number: 18255 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 21:59:06 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-bsc[master]: stats: Add counters and gauges for BORKEN lchans/TS
ipse has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18192 ) Change subject: stats: Add counters and gauges for BORKEN lchans/TS .. Patch Set 4: (3 comments) This change is ready for review. https://gerrit.osmocom.org/c/osmo-bsc/+/18192/4/src/osmo-bsc/bsc_vty.c File src/osmo-bsc/bsc_vty.c: https://gerrit.osmocom.org/c/osmo-bsc/+/18192/4/src/osmo-bsc/bsc_vty.c@5010 PS4, Line 5010: if (lchan->fi->state == LCHAN_ST_UNUSED) { > (unrelated cosmetic change) Sorry, a leftover from a previous version where there was a counter here as well. https://gerrit.osmocom.org/c/osmo-bsc/+/18192/4/src/osmo-bsc/lchan_fsm.c File src/osmo-bsc/lchan_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/18192/4/src/osmo-bsc/lchan_fsm.c@1413 PS4, Line 1413: { > you need to also change the stat item and possibly also add a counter here, > […] Thanks a lot for the hint! Fixed in the new patchset https://gerrit.osmocom.org/c/osmo-bsc/+/18192/4/src/osmo-bsc/timeslot_fsm.c File src/osmo-bsc/timeslot_fsm.c: https://gerrit.osmocom.org/c/osmo-bsc/+/18192/4/src/osmo-bsc/timeslot_fsm.c@899 PS4, Line 899: .allstate_action = ts_fsm_allstate, > you also need to add a cleanup function to track those TS leaving the BORKEN > state due to FSM deallo […] Yep. Will add. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I427bbe1613a0e92bff432a7d76592fe50f620ebe Gerrit-Change-Number: 18192 Gerrit-PatchSet: 4 Gerrit-Owner: ipse Gerrit-Assignee: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 21:24:58 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels Gerrit-MessageType: comment
Change in osmo-bsc[master]: stats: Add counters and gauges for BORKEN lchans/TS
Hello pespin, neels, laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bsc/+/18192 to look at the new patch set (#5). Change subject: stats: Add counters and gauges for BORKEN lchans/TS .. stats: Add counters and gauges for BORKEN lchans/TS Now we can monitor the situation with the BORKEN lchans and TS in our BTS's over time. Change-Id: I427bbe1613a0e92bff432a7d76592fe50f620ebe --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_vty.c M src/osmo-bsc/gsm_data.c M src/osmo-bsc/lchan_fsm.c M src/osmo-bsc/timeslot_fsm.c 5 files changed, 134 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/92/18192/5 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18192 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I427bbe1613a0e92bff432a7d76592fe50f620ebe Gerrit-Change-Number: 18192 Gerrit-PatchSet: 5 Gerrit-Owner: ipse Gerrit-Assignee: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in osmo-bsc[master]: bsc_vty: Coding style fix - brackets around a complex if/else
ipse has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18263 ) Change subject: bsc_vty: Coding style fix - brackets around a complex if/else .. bsc_vty: Coding style fix - brackets around a complex if/else Change-Id: I771ef866aba6af9e2a10a06e593eef78b7405377 --- M src/osmo-bsc/bsc_vty.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/63/18263/1 diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c index 83a7e2a..d699cf7 100644 --- a/src/osmo-bsc/bsc_vty.c +++ b/src/osmo-bsc/bsc_vty.c @@ -5007,9 +5007,9 @@ return CMD_WARNING; if (!strcmp(argv[4], "borken")) { - if (lchan->fi->state == LCHAN_ST_UNUSED) + if (lchan->fi->state == LCHAN_ST_UNUSED) { osmo_fsm_inst_state_chg(lchan->fi, LCHAN_ST_BORKEN, 0, 0); - else { + } else { vty_out(vty, "%% lchan is in state %s, only lchans that are in state %s may be moved to state %s manually%s", osmo_fsm_state_name(lchan->fi->fsm, lchan->fi->state), -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18263 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I771ef866aba6af9e2a10a06e593eef78b7405377 Gerrit-Change-Number: 18263 Gerrit-PatchSet: 1 Gerrit-Owner: ipse Gerrit-MessageType: newchange
Change in osmocom-bb[master]: trx_toolkit/transceiver.py: add frequency hopping support
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/18262 ) Change subject: trx_toolkit/transceiver.py: add frequency hopping support .. Patch Set 1: Let's keep it WIP for now. I need to change some things in trxcon. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/18262 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I587e4f5da67c7b7f28e010ed46b24622c31a3fdd Gerrit-Change-Number: 18262 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Comment-Date: Thu, 14 May 2020 19:24:01 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmocom-bb[master]: trx_toolkit/gsm_shared.py: implement hopping sequence generation
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/18261 ) Change subject: trx_toolkit/gsm_shared.py: implement hopping sequence generation .. trx_toolkit/gsm_shared.py: implement hopping sequence generation Based on firmware/layer1/rfch.c:rfch_hop_seq_gen() by Sylvain Munaut. Change-Id: I9ecabfef6f5a4e4180956c6a019c386ccb1c9acd --- M src/target/trx_toolkit/gsm_shared.py 1 file changed, 73 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/61/18261/1 diff --git a/src/target/trx_toolkit/gsm_shared.py b/src/target/trx_toolkit/gsm_shared.py index 71f43a7..c8c6b8f 100644 --- a/src/target/trx_toolkit/gsm_shared.py +++ b/src/target/trx_toolkit/gsm_shared.py @@ -2,9 +2,10 @@ # -*- coding: utf-8 -*- # TRX Toolkit -# Common GSM constants +# Common GSM constants and helpers # -# (C) 2018-2019 by Vadim Yanitskiy +# (C) 2018-2020 by Vadim Yanitskiy +# Contributions by sysmocom - s.f.m.c. GmbH # # All Rights Reserved # @@ -106,3 +107,73 @@ return ts return None + +class HoppingParams: + """ Hopping sequence generation as per 3GPP TS 45.002, section 6.2.3. + + Based on firmware/layer1/rfch.c:rfch_hop_seq_gen() by Sylvain Munaut. + + """ + + # Magic numbers for pseudo-random hopping sequence generation + RNTABLE = [ +48, 98, 63, 1, 36, 95, 78, 102, 94, 73, + 0, 64, 25, 81, 76, 59, 124, 23, 104, 100, + 101, 47, 118, 85, 18, 56, 96, 86, 54, 2, +80, 34, 127, 13, 6, 89, 57, 103, 12, 74, +55, 111, 75, 38, 109, 71, 112, 29, 11, 88, +87, 19, 3, 68, 110, 26, 33, 31, 8, 45, +82, 58, 40, 107, 32, 5, 106, 92, 62, 67, +77, 108, 122, 37, 60, 66, 121, 42, 51, 126, + 117, 114, 4, 90, 43, 52, 53, 113, 120, 72, +16, 49, 7, 79, 119, 61, 22, 84, 9, 97, +91, 15, 21, 24, 46, 39, 93, 105, 65, 70, + 125, 99, 17, 123, + ] + + def __init__(self, hsn, maio, ma): + # Make sure MA is not empty + ma_len = len(ma) + if ma_len == 0: # TODO: or rather > 1? + raise ValueError("Mobile Allocation is empty") + + self.hsn = hsn + self.maio = maio + self.ma = ma + + # Pre-calculate 2 ** NBIN in advance + self._pnm = (ma_len >> 0) | (ma_len >> 1) \ + | (ma_len >> 2) | (ma_len >> 3) \ + | (ma_len >> 4) | (ma_len >> 5) \ + | (ma_len >> 6) + + def __str__(self): + fmt = "hsn=%u, maio=%u, ma_len=%u" + return fmt % (self.hsn, self.maio, len(self.ma)) + + @staticmethod + def fn2gsm_time(fn): + t1 = fn // (26 * 51) + t2 = fn % 26 + t3 = fn % 51 + tc = (fn // 51) % 8 + return (t1, t2, t3, tc) + + # Resolve current ARFCN using the given TDMA frame number + def resolve(self, fn): + # Cyclic hopping + if self.hsn == 0: + mai = (fn + self.maio) % len(self.ma) + return self.ma[mai] + + # Pseudo random hopping + (t1, t2, t3, tc) = self.fn2gsm_time(fn) + ma_len = len(self.ma) + + rn_idx = (self.hsn ^ (t1 & 63)) + t3 + m = t2 + self.RNTABLE[rn_idx] + mp = m & self._pnm + + s = mp if mp < ma_len else (mp + t3 & self._pnm) % ma_len + mai = (s + self.maio) % ma_len + return self.ma[mai] -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/18261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I9ecabfef6f5a4e4180956c6a019c386ccb1c9acd Gerrit-Change-Number: 18261 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria Gerrit-MessageType: newchange
Change in osmocom-bb[master]: trx_toolkit/transceiver.py: add frequency hopping support
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/18262 ) Change subject: trx_toolkit/transceiver.py: add frequency hopping support .. trx_toolkit/transceiver.py: add frequency hopping support There are two ways to implement frequency hopping: a) The Transceiver is configured with the hopping parameters, in particular HSN, MAIO, and the list of ARFCNs (channels), so the actual Rx/Tx frequencies are changed by the Transceiver itself depending on the current TDMA frame number. b) The L1 maintains several Transceivers (two or more), so each instance is assigned one dedicated RF carrier frequency, and hence the number of available hopping frequencies is equal to the number of Transceivers. In this case, it's the task of the L1 to commutate bursts between Transceivers (frequencies). For the MS side, a) is preferred, because a phone usually has only one Transceiver (per RAT). On the other hand, b) is more suitable for the BTS side, because it's relatively easy to implement and there is no technical limitation on the amount of Transceivers. FakeTRX obviously does support b) since multi-TRX feature has been implemented, as well as a) by resolving UL/DL frequencies using a preconfigured (by the L1) set of the hopping parameters. The later can be enabled using the SETFH control command: CMD SETFH [... ] where and is a pair of Rx/Tx frequencies (in kHz) corresponding to one ARFCN the Mobile Allocation. Note that the channel list is expected to be sorted in ascending order. NOTE: in the current implementation, mode a) applies to the whole Transceiver and all its timeslots, so using in for the BTS side does not make any sense (imagine BCCH hopping together with DCCH). Change-Id: I587e4f5da67c7b7f28e010ed46b24622c31a3fdd --- M src/target/trx_toolkit/burst_fwd.py M src/target/trx_toolkit/ctrl_if.py M src/target/trx_toolkit/ctrl_if_trx.py M src/target/trx_toolkit/fake_pm.py M src/target/trx_toolkit/transceiver.py 5 files changed, 147 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/62/18262/1 diff --git a/src/target/trx_toolkit/burst_fwd.py b/src/target/trx_toolkit/burst_fwd.py index fd6013b..9fb308f 100644 --- a/src/target/trx_toolkit/burst_fwd.py +++ b/src/target/trx_toolkit/burst_fwd.py @@ -4,7 +4,8 @@ # TRX Toolkit # Burst forwarding between transceivers # -# (C) 2017-2018 by Vadim Yanitskiy +# (C) 2017-2020 by Vadim Yanitskiy +# Contributions by sysmocom - s.f.m.c. GmbH # # All Rights Reserved # @@ -65,6 +66,10 @@ self.trx_list.remove(trx) def forward_msg(self, src_trx, rx_msg): + # Originating Transceiver may use frequency hopping, + # so let's precalculate its Tx frequency in advance + tx_freq = src_trx.get_tx_freq(rx_msg.fn) + # Iterate over all known transceivers for trx in self.trx_list: if trx == src_trx: @@ -73,11 +78,13 @@ # Check transceiver state if not trx.running: continue - if trx.rx_freq != src_trx.tx_freq: - continue if rx_msg.tn not in trx.ts_list: continue + # Match Tx/Rx frequencies of the both transceivers + if trx.get_rx_freq(rx_msg.fn) != tx_freq: + continue + # Transform from L12TRX to TRX2L1 and forward tx_msg = rx_msg.gen_trx2l1(ver = trx.data_if._hdr_ver) trx.handle_data_msg(src_trx, rx_msg, tx_msg) diff --git a/src/target/trx_toolkit/ctrl_if.py b/src/target/trx_toolkit/ctrl_if.py index 89dfe46..7333501 100644 --- a/src/target/trx_toolkit/ctrl_if.py +++ b/src/target/trx_toolkit/ctrl_if.py @@ -4,7 +4,8 @@ # TRX Toolkit # CTRL interface implementation # -# (C) 2016-2017 by Vadim Yanitskiy +# (C) 2016-2020 by Vadim Yanitskiy +# Contributions by sysmocom - s.f.m.c. GmbH # # All Rights Reserved # @@ -61,13 +62,17 @@ # Now we have something like ["TXTUNE", "941600"] return request - def verify_cmd(self, request, cmd, argc): + # If va is True, the command can have variable number of arguments + def verify_cmd(self, request, cmd, argc, va = False): # Check if requested command matches if request[0] != cmd: return False # And has enough arguments - if len(request) - 1 != argc: + req_len = len(request[1:]) + if not va and req_len != argc: + return False + elif va and req_len
Change in libosmocore[master]: gsm0808: Implement helper functions for CONFUSION BSSMAP message deco...
Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/18231 to look at the new patch set (#2). Change subject: gsm0808: Implement helper functions for CONFUSION BSSMAP message decoding. .. gsm0808: Implement helper functions for CONFUSION BSSMAP message decoding. Also add a test for an actual CONFUSION message parsing. Change-Id: If8afd2d096fb66c6c2f255a08fc1129de3d09cec --- M include/osmocom/gsm/gsm0808.h M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/libosmogsm.map M tests/gsm0808/gsm0808_test.c M tests/gsm0808/gsm0808_test.ok 6 files changed, 113 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/18231/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18231 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If8afd2d096fb66c6c2f255a08fc1129de3d09cec Gerrit-Change-Number: 18231 Gerrit-PatchSet: 2 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-MessageType: newpatchset
Change in libosmocore[master]: gsm0808: Implement helper functions for CONFUSION BSSMAP message deco...
ipse has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18231 ) Change subject: gsm0808: Implement helper functions for CONFUSION BSSMAP message decoding. .. Patch Set 1: (5 comments) https://gerrit.osmocom.org/c/libosmocore/+/18231/1/include/osmocom/gsm/gsm0808.h File include/osmocom/gsm/gsm0808.h: https://gerrit.osmocom.org/c/libosmocore/+/18231/1/include/osmocom/gsm/gsm0808.h@322 PS1, Line 322: diagnostics > Could be shortened to '_diag_oct_loc_str'. Not critical. Why speak in riddles and make reading the code hard? https://gerrit.osmocom.org/c/libosmocore/+/18231/1/include/osmocom/gsm/protocol/gsm_08_08.h File include/osmocom/gsm/protocol/gsm_08_08.h: https://gerrit.osmocom.org/c/libosmocore/+/18231/1/include/osmocom/gsm/protocol/gsm_08_08.h@674 PS1, Line 674: struct gsm0808_diagnostics { > Hint: Probably better to generate bigendian/littleendian with > ./contrib/struct_endianess. […] Done https://gerrit.osmocom.org/c/libosmocore/+/18231/1/src/gsm/gsm0808.c File src/gsm/gsm0808.c: https://gerrit.osmocom.org/c/libosmocore/+/18231/1/src/gsm/gsm0808.c@40 PS1, Line 40: static __thread char str_buff[512]; > As Usual, I don't really like adding more and more static buffers every time > we add some function. […] Is this really critical? Using a caller allocated but makes the user code quite ugly https://gerrit.osmocom.org/c/libosmocore/+/18231/1/src/gsm/gsm0808.c@1682 PS1, Line 1682: else if (pointer == 1) > If possible, would be nice to use a 'value_string' here, or at least the > 'switch' statement. Makes sense https://gerrit.osmocom.org/c/libosmocore/+/18231/1/tests/gsm0808/gsm0808_test.c File tests/gsm0808/gsm0808_test.c: https://gerrit.osmocom.org/c/libosmocore/+/18231/1/tests/gsm0808/gsm0808_test.c@393 PS1, Line 393: > whitespace Ack -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18231 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If8afd2d096fb66c6c2f255a08fc1129de3d09cec Gerrit-Change-Number: 18231 Gerrit-PatchSet: 1 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 14 May 2020 17:53:41 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Comment-In-Reply-To: pespin Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: Move some types from GSM_RR_Types.ttcn to RLCMAC_CSN1_Types.ttcn
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18251 ) Change subject: Move some types from GSM_RR_Types.ttcn to RLCMAC_CSN1_Types.ttcn .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18251 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: Iccaaa2743dc44a36046c19d4d4ff882dc02fb479 Gerrit-Change-Number: 18251 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 17:53:03 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: pcu: Introduce test TC_countdown_procedure
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18260 ) Change subject: pcu: Introduce test TC_countdown_procedure .. pcu: Introduce test TC_countdown_procedure Change-Id: I2b92bf4a17e89b1d68869aac4243c0e106ce3be5 --- M pcu/PCU_Tests.ttcn 1 file changed, 60 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/60/18260/1 diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index ce4ea8d..cc2add2 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -1434,6 +1434,65 @@ f_shutdown(__BFILE__, __LINE__, final := true); } +/* Verify PCU handles correctly Countdown Procedure based on BS_CV_MAX */ +testcase TC_countdown_procedure() runs on RAW_PCU_Test_CT { + var GsmRrMessage rr_imm_ass; + var PacketUlAssign ul_tbf_ass; + var RlcmacDlBlock dl_block; + var boolean ok; + var uint32_t sched_fn; + var OCT4 tlli := '0001'O; + var uint14_t bsn := 1; + var PDU_BSSGP bssgp_pdu; + var octetstring total_payload; + var integer padding_len; + + /* Initialize NS/BSSGP side */ + f_init_bssgp(); + + /* Initialize the PCU interface abstraction */ + f_init_raw(testcasename()); + + /* Establish BSSGP connection to the PCU */ + f_bssgp_establish(); + f_bssgp_client_llgmm_assign(''O, tlli); + + /* Establish an Uplink TBF */ + ok := f_establish_tbf(rr_imm_ass); + if (not ok) { + setverdict(fail, "Failed to establish TBF"); + f_shutdown(__BFILE__, __LINE__); + } + /* Make sure we've got an Uplink TBF assignment */ + f_imm_ass_verify_ul_tbf_ass(rr_imm_ass, ul_tbf_ass); + + /* Send one UL block (with TLLI since we are in One-Phase Access + contention resoultion) and make sure it is ACKED fine. */ + total_payload := f_rnd_octstring(16); /* 16 bytes fills the llc block (because TLLI takes 4 bytes) */ + var template (value) RlcmacUlBlock ul_data := t_RLCMAC_UL_DATA_TLLI( + tfi := ul_tbf_ass.dynamic.tfi_assignment, + cv := 15, /* Set CV = 15 to signal there's still more than BS_CV_MAX blocks to be sent */ + bsn := 0, + blocks := { valueof(t_RLCMAC_LLCBLOCK(total_payload)) }, + tlli := tlli); + + f_tx_rlcmac_ul_block(ul_data, 0); + f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn); + /* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */ + f_tx_rlcmac_ul_block(ts_RLCMAC_CTRL_ACK(tlli), 0, sched_fn); + + /* Send enough blocks to test whole procedure: Until Nth block + (N=BS_CV_MAX), CV=15 is sent, and then the decreasing countdown value is sent. +*/ + total_payload := total_payload & f_tx_rlcmac_ul_n_blocks(ul_tbf_ass.dynamic.tfi_assignment, bsn, 20); + f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, sched_fn); + /* DL ACK/NACK sets poll+rrbp requesting PACKET CONTROL ACK */ + f_tx_rlcmac_ul_block(ts_RLCMAC_CTRL_ACK(tlli), 0, sched_fn); + + /* receive one message on BSSGP with all aggregated data in payload: */ + BSSGP[0].receive(tr_BSSGP_UL_UD(tlli, mp_gb_cfg.cell_id, total_payload)); +} + /* Test scenario where MS wants to send some data on PDCH against SGSN and it is * answered, so TBFs for uplink and later for downlink are created. */ @@ -2188,6 +2247,7 @@ execute( TC_cs_max_ul() ); execute( TC_t3169() ); execute( TC_t3193() ); + execute( TC_countdown_procedure() ); execute( TC_mo_ping_pong() ); execute( TC_mo_ping_pong_with_ul_racap() ); execute( TC_force_two_phase_access() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18260 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: I2b92bf4a17e89b1d68869aac4243c0e106ce3be5 Gerrit-Change-Number: 18260 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: pcu: Use BS_CV_MAX in f_tx_rlcmac_ul_n_blocks
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18258 ) Change subject: pcu: Use BS_CV_MAX in f_tx_rlcmac_ul_n_blocks .. pcu: Use BS_CV_MAX in f_tx_rlcmac_ul_n_blocks Also increment BSN with each new submitted packet. Change-Id: I685d1535154197bb85e18875e0a4d41122a24fa0 --- M pcu/PCU_Tests.ttcn 1 file changed, 11 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/58/18258/1 diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 2077ac6..e11ff44 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -136,6 +136,9 @@ var uint8_t g_mcs_max_dl := 9; var uint8_t g_mcs_max_ul := 9; + /* Value at which Countdown Procedure starts. Announced by network (GPRS Cell Options as per TS 04.60 Chapter 12.24) */ + var uint4_t g_bs_cv_max := 4; + var boolean g_egprs_only := false; var boolean g_force_two_phase_access := false; @@ -538,8 +541,8 @@ runs on RAW_PCU_Test_CT { var template (value) RlcmacUlBlock ul_data := t_RLCMAC_UL_DATA( tfi := tfi, - cv := num_blocks - 1, /* num UL blocks to be sent (to be overridden in loop) */ - bsn := 0, /* TODO: what should be here? */ + cv := 15, /* num UL blocks to be sent (to be overridden in loop) */ + bsn := 0, /* TODO: what should be initial value? */ blocks := { /* To be generated in loop */ }); if (not istemplatekind(tlli, "omit")) { @@ -549,7 +552,12 @@ for (var integer i := 0; i < num_blocks; i := i + 1) { /* Prepare a new UL block (CV, random payload) */ - ul_data.data.mac_hdr.countdown := (num_blocks - i - 1); + var integer cv := num_blocks - i - 1; + if (cv > g_bs_cv_max) { + cv := 15; + } + ul_data.data.mac_hdr.countdown := cv; + ul_data.data.mac_hdr.bsn := i; ul_data.data.blocks := { valueof(t_RLCMAC_LLCBLOCK(f_rnd_octstring(10))) }; f_tx_rlcmac_ul_block(ul_data); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18258 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: I685d1535154197bb85e18875e0a4d41122a24fa0 Gerrit-Change-Number: 18258 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: pcu: f_tx_rlcmac_ul_n_blocks(): Keep BSN state and return all payload...
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18259 ) Change subject: pcu: f_tx_rlcmac_ul_n_blocks(): Keep BSN state and return all payload sent .. pcu: f_tx_rlcmac_ul_n_blocks(): Keep BSN state and return all payload sent These features will be used in test added in next commit. Change-Id: I7dde6a2e71a9e64cf6c704eda37b47838460102b --- M pcu/PCU_Tests.ttcn 1 file changed, 26 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/59/18259/1 diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index e11ff44..ce4ea8d 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -527,22 +527,26 @@ } private function f_tx_rlcmac_ul_block(template (value) RlcmacUlBlock ul_data, int16_t lqual_cb := 0, uint32_t fn := 0) -runs on RAW_PCU_Test_CT { +runs on RAW_PCU_Test_CT return integer { var octetstring data; + var integer padding_len; /* Encode the payload of DATA.ind */ data := enc_RlcmacUlBlock(valueof(ul_data)); + padding_len := 23 - lengthof(data); data := f_pad_oct(data, 23, '00'O); /* CS-1 */ /* Enqueue DATA.ind (both TDMA frame and block numbers to be patched) */ f_pcuif_tx_data_ind(data, lqual_cb, fn); + return padding_len; } -private function f_tx_rlcmac_ul_n_blocks(uint5_t tfi, integer num_blocks := 1, template (omit) GprsTlli tlli := omit) -runs on RAW_PCU_Test_CT { +private function f_tx_rlcmac_ul_n_blocks(uint5_t tfi, inout uint14_t bsn, integer num_blocks := 1, template (omit) GprsTlli tlli := omit) +runs on RAW_PCU_Test_CT return octetstring { + var octetstring total_payload := ''O; var template (value) RlcmacUlBlock ul_data := t_RLCMAC_UL_DATA( tfi := tfi, cv := 15, /* num UL blocks to be sent (to be overridden in loop) */ - bsn := 0, /* TODO: what should be initial value? */ + bsn := 0, /* To be generated in loop */ blocks := { /* To be generated in loop */ }); if (not istemplatekind(tlli, "omit")) { @@ -551,16 +555,21 @@ } for (var integer i := 0; i < num_blocks; i := i + 1) { + var integer padding_len; + var octetstring payload := f_rnd_octstring(10); /* Prepare a new UL block (CV, random payload) */ var integer cv := num_blocks - i - 1; if (cv > g_bs_cv_max) { cv := 15; } ul_data.data.mac_hdr.countdown := cv; - ul_data.data.mac_hdr.bsn := i; - ul_data.data.blocks := { valueof(t_RLCMAC_LLCBLOCK(f_rnd_octstring(10))) }; - f_tx_rlcmac_ul_block(ul_data); + ul_data.data.mac_hdr.bsn := bsn + i; + ul_data.data.blocks := { valueof(t_RLCMAC_LLCBLOCK(payload)) }; + padding_len := f_tx_rlcmac_ul_block(ul_data); + total_payload := total_payload & payload & f_pad_oct(''O, padding_len, '00'O); } + bsn := valueof(ul_data.data.mac_hdr.bsn) + 1; /* update bsn to point to next one */ + return total_payload; } private function f_rx_rlcmac_dl_block(out RlcmacDlBlock dl_block, out uint32_t dl_fn, template (present) CodingScheme exp_cs_mcs := ?) @@ -1323,6 +1332,7 @@ var boolean ok; var uint32_t unused_fn; var OCT4 tlli := '0001'O; + var uint14_t bsn := 0; /* Initialize NS/BSSGP side */ f_init_bssgp(); @@ -1350,7 +1360,7 @@ /* Send one UL block (with TLLI since we are in One-Phase Access contention resoultion) and make sure it is ACKED fine */ - f_tx_rlcmac_ul_n_blocks(ul_tbf_ass.dynamic.tfi_assignment, 1, tlli); + f_tx_rlcmac_ul_n_blocks(ul_tbf_ass.dynamic.tfi_assignment, bsn, 1, tlli); f_rx_rlcmac_dl_block_exp_ack_nack(dl_block, unused_fn); /* UL block should be received in SGSN */ BSSGP[0].receive(tr_BSSGP_UL_UD(tlli, mp_gb_cfg.cell_id)); @@ -1359,7 +1369,8 @@ f_sleep(int2float(info_ind.t3169) + 1.0); /* Send an UL block once again, the TBF should be gone by now so no ACK */ - f_tx_rlcmac_ul_n_blocks(ul_tbf_ass.dynamic.tfi_assignment, 1); + bsn := 0; + f_tx_rlcmac_ul_n_blocks(ul_tbf_ass.dynamic.tfi_assignment, bsn, 1); f_rx_rlcmac_dl_block_exp_dummy(dl_block); f_shutdown(__BFILE__, __LINE__, final := true); @@ -1438,6 +1449,7 @@ var uint32_t dl_fn; var OCT4 tlli := '0001'O; var AckNackDescription ack_nack_desc := valueof(t_AckNackDescription_init); + var uint14_t bsn := 0; /* Initialize NS/BSSGP side */ f_init_bssgp(); @@ -1461,7 +1473,7 @@ /* Send one UL block (with TLLI since we are in One-Phase Access contention resoultion) and make sure it is ACKED fine */ -
Change in libosmocore[master]: cosmetic: apply changes to match struct_endianess.py output
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18257 ) Change subject: cosmetic: apply changes to match struct_endianess.py output .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7432f5337d6589262c31f5186dfd0ac32221c467 Gerrit-Change-Number: 18257 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-Comment-Date: Thu, 14 May 2020 15:56:08 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: codec: Add functions for AMR s->d bits and d->s bits
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18246 ) Change subject: codec: Add functions for AMR s->d bits and d->s bits .. codec: Add functions for AMR s->d bits and d->s bits These functions implement re-ordering of bits as per TS 06.90 / 26.101 based on the already existing tables we've had in libosmocoding. Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 --- M include/osmocom/codec/codec.h M src/codec/Makefile.am M src/codec/gsm690.c M tests/codec/codec_test.c M tests/codec/codec_test.ok 5 files changed, 165 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified tnt: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index 6a1bf9f..cbdad75 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -6,6 +6,7 @@ #include #include +#include /* TS 101318 Chapter 5.1: 260 bits + 4bit sig */ #define GSM_FR_BYTES 33 @@ -51,6 +52,11 @@ AMR_GOOD = 1 }; +extern const uint8_t gsm690_bitlength[AMR_NO_DATA+1]; + +int osmo_amr_s_to_d(ubit_t *out, const ubit_t *in, uint16_t n_bits, enum osmo_amr_type amr_mode); +int osmo_amr_d_to_s(ubit_t *out, const ubit_t *in, uint16_t n_bits, enum osmo_amr_type amr_mode); + /*! Check if given AMR Frame Type is a speech frame * \param[in] ft AMR Frame Type * \returns true if AMR with given Frame Type contains voice, false otherwise diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am index ac33aa0..778eb2a 100644 --- a/src/codec/Makefile.am +++ b/src/codec/Makefile.am @@ -3,7 +3,7 @@ # before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html LIBVERSION=2:0:2 -AM_CPPFLAGS = -I$(top_srcdir)/include $(TALLOC_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall if ENABLE_PSEUDOTALLOC diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index 8ab1df1..cc6cdf0 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -2,6 +2,7 @@ * GSM 06.90 - GSM AMR Codec. */ /* * (C) 2010 Sylvain Munaut + * (C) 2020 Harald Welte * * All Rights Reserved * @@ -29,6 +30,7 @@ #include #include +#include #include /* * These table map between the raw encoder parameter output and @@ -216,6 +218,114 @@ 92, 31, 52, 65, 86, }; +/*! These constants refer to the length of one "AMR core frame" as per + * TS 26.101 Section 4.2.2 / Table 2. */ +const uint8_t gsm690_bitlength[AMR_NO_DATA+1] = { + [AMR_4_75] = 95, + [AMR_5_15] = 103, + [AMR_5_90] = 118, + [AMR_6_70] = 134, + [AMR_7_40] = 148, + [AMR_7_95] = 159, + [AMR_10_2] = 204, + [AMR_12_2] = 244, + [AMR_SID] = 39, +}; + +struct ts26101_reorder_table { + /*! Table as per TS 26.101 Annex B to compute d-bits from s-bits */ + const uint16_t *s_to_d; + /*! size of table */ + uint8_t len; +}; + +static const struct ts26101_reorder_table ts26101_reorder_tables[8] = { + [AMR_4_75] = { + .s_to_d = gsm690_4_75_bitorder, + .len = ARRAY_SIZE(gsm690_4_75_bitorder), + }, + [AMR_5_15] = { + .s_to_d = gsm690_5_15_bitorder, + .len = ARRAY_SIZE(gsm690_5_15_bitorder), + }, + [AMR_5_90] = { + .s_to_d = gsm690_5_9_bitorder, + .len = ARRAY_SIZE(gsm690_5_9_bitorder), + }, + [AMR_6_70] = { + .s_to_d = gsm690_6_7_bitorder, + .len = ARRAY_SIZE(gsm690_6_7_bitorder), + }, + [AMR_7_40] = { + .s_to_d = gsm690_7_4_bitorder, + .len = ARRAY_SIZE(gsm690_7_4_bitorder), + }, + [AMR_7_95] = { + .s_to_d = gsm690_7_95_bitorder, + .len = ARRAY_SIZE(gsm690_7_95_bitorder), + }, + [AMR_10_2] = { + .s_to_d = gsm690_10_2_bitorder, + .len = ARRAY_SIZE(gsm690_10_2_bitorder), + }, + [AMR_12_2] = { + .s_to_d = gsm690_12_2_bitorder, + .len = ARRAY_SIZE(gsm690_12_2_bitorder), + }, +}; + +/*! Convert from S-bits (codec output) to d-bits. + * \param[out] out user-provided output buffer for generated unpacked d-bits + * \param[in] in input buffer for unpacked s-bits + * \param[in] n_bits number of bits (in both in and out) + * \param[in] AMR mode (0..7) */ +int osmo_amr_s_to_d(ubit_t *out, const ubit_t *in, uint16_t n_bits, enum osmo_amr_type amr_mode) +{ + const struct ts26101_reorder_table *tbl; + int i; + + if (amr_mode >= ARRAY_SIZE(ts26101_reorder_tables)) + return -ENODEV; + + tbl = _reorder_tables[amr_mode]; + + if (n_bits > tbl->len) + return -EINVAL; + + for (i = 0; i < n_bits; i++) { +
Change in libosmocore[master]: codec: Add functions for AMR s->d bits and d->s bits
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18246 ) Change subject: codec: Add functions for AMR s->d bits and d->s bits .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 Gerrit-Change-Number: 18246 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-Comment-Date: Thu, 14 May 2020 15:54:33 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: Introduce test TC_force_two_phase_access
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18254 ) Change subject: Introduce test TC_force_two_phase_access .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18254 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: Icce25b5d113eb5b37ec1e5b6c6c14aacdb01cd8d Gerrit-Change-Number: 18254 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 May 2020 15:53:49 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: pcu: Introduce TC_mo_ping_pong_with_ul_racap_egprs_only
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18253 ) Change subject: pcu: Introduce TC_mo_ping_pong_with_ul_racap_egprs_only .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18253 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: I396dbd0ca200fbf9365c534f4d479f903d0417ff Gerrit-Change-Number: 18253 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 May 2020 15:53:34 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: Move some types from GSM_RR_Types.ttcn to RLCMAC_CSN1_Types.ttcn
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18251 ) Change subject: Move some types from GSM_RR_Types.ttcn to RLCMAC_CSN1_Types.ttcn .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18251 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: Iccaaa2743dc44a36046c19d4d4ff882dc02fb479 Gerrit-Change-Number: 18251 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 May 2020 15:52:16 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: pcu: Support decoding Egprs Pkt Ul Ass on PDCH
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18252 ) Change subject: pcu: Support decoding Egprs Pkt Ul Ass on PDCH .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18252 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: I30fb98aab67303997b803a0359ffc2e0b65ebf01 Gerrit-Change-Number: 18252 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 May 2020 15:52:46 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: pcu: use correct RA type to properly test 2phase access
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 ) Change subject: pcu: use correct RA type to properly test 2phase access .. Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 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: If636a4898dfa175fdbd6baf04f7f2c955a9c525d Gerrit-Change-Number: 18239 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Thu, 14 May 2020 15:51:54 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: lapd/lapdm: print user-defined string name instead of (dl=%p)
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18002 ) Change subject: lapd/lapdm: print user-defined string name instead of (dl=%p) .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18002 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie6742843fff809edffcac24c4dce4edf66bc71be Gerrit-Change-Number: 18002 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 15:50:43 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-abis[master]: trau_frame: Fix AMR frame decoding
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/18182 ) Change subject: trau_frame: Fix AMR frame decoding .. trau_frame: Fix AMR frame decoding Change-Id: I9b2dbca05217ee78cade2a47a02857f7cf7e0cd7 --- M src/trau_frame.c 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified tnt: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/trau_frame.c b/src/trau_frame.c index 9558b3f..ac373aa 100644 --- a/src/trau_frame.c +++ b/src/trau_frame.c @@ -85,6 +85,7 @@ memcpy(fr->t_bits+0, trau_bits+316, 4); /* D1 .. D5 */ memcpy(fr->d_bits, trau_bits+43, 5); + d_idx += 5; /* D6 .. D245 */ for (i = 48; i < 304; i += 16) { memcpy(fr->d_bits + d_idx, trau_bits+i+1, 15); -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/18182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I9b2dbca05217ee78cade2a47a02857f7cf7e0cd7 Gerrit-Change-Number: 18182 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-CC: pespin Gerrit-MessageType: merged
Change in libosmo-abis[master]: trau_frame: Add 16k HR + OAM encoding/decoding; add AMR encoding
laforge has abandoned this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/18181 ) Change subject: trau_frame: Add 16k HR + OAM encoding/decoding; add AMR encoding .. Abandoned let's not add thsi to the old code, but to the new code instead. -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/18181 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I589a0e97e48e7f89d9166793b9887462756e8f09 Gerrit-Change-Number: 18181 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: abandon
Change in libosmocore[master]: cosmetic: apply changes to match struct_endianess.py output
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18257 ) Change subject: cosmetic: apply changes to match struct_endianess.py output .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7432f5337d6589262c31f5186dfd0ac32221c467 Gerrit-Change-Number: 18257 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 14 May 2020 15:47:39 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-abis[master]: trau_frame: Fix AMR frame decoding
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/18182 ) Change subject: trau_frame: Fix AMR frame decoding .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/18182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I9b2dbca05217ee78cade2a47a02857f7cf7e0cd7 Gerrit-Change-Number: 18182 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 14 May 2020 15:48:02 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: cosmetic: apply changes to match struct_endianess.py output
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18257 ) Change subject: cosmetic: apply changes to match struct_endianess.py output .. cosmetic: apply changes to match struct_endianess.py output gsm48_pag_resp and gsm48_service_request: omit comments in big endian part. dtap_header: better segment the substruct. gsm23041_msg_param_gsm: match up whitespace / comments. Rationale: the script is a good way to avoid bugs from manually composing the big endian parts (for example, it detected the missing endian.h include, fixed in I593cc5e8272469b570559206bb02b6e79797340b). However, it becomes cumbersome if it creates numerous edits in the source tree, which cause more time spent for whoever wanted to rather save time with it. So let's keep the code tree matching that struct's output. Change-Id: I7432f5337d6589262c31f5186dfd0ac32221c467 --- M include/osmocom/gsm/protocol/gsm_04_08.h M include/osmocom/gsm/protocol/gsm_08_08.h M include/osmocom/gsm/protocol/gsm_23_041.h 3 files changed, 8 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/18257/1 diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 1bca068..f8f2eab 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -664,7 +664,7 @@ /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t key_seq:4, spare:4; union { - uint32_t classmark2; /* Backward compatibility */ + uint32_t classmark2; struct { uint8_t cm2_len; struct gsm48_classmark2 cm2; @@ -815,7 +815,7 @@ /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t cipher_key_seq:4, cm_service_type:4; union { - uint32_t classmark; /* Backward compatibility */ + uint32_t classmark; struct { uint8_t cm2_len; struct gsm48_classmark2 classmark2; diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h index e791b07..d8a7773 100644 --- a/include/osmocom/gsm/protocol/gsm_08_08.h +++ b/include/osmocom/gsm/protocol/gsm_08_08.h @@ -41,27 +41,21 @@ } __attribute__((packed)); struct dtap_header { -#if OSMO_IS_LITTLE_ENDIAN uint8_t type; union { uint8_t link_id; /* Backward compatibility */ struct { +#if OSMO_IS_LITTLE_ENDIAN uint8_t dlci_cc:2, dlci_spare:3, dlci_sapi:3; /* enum gsm0406_dlc_sapi */ - }; - }; - uint8_t length; #elif OSMO_IS_BIG_ENDIAN - uint8_t type; - union { - uint8_t link_id; - struct { +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t dlci_sapi:3, dlci_spare:3, dlci_cc:2; +#endif }; }; uint8_t length; -#endif } __attribute__((packed)); /* Data Link Control SAPI, GSM 08.06 § 6.3.2, GSM 04.06 § 3.3.3 */ diff --git a/include/osmocom/gsm/protocol/gsm_23_041.h b/include/osmocom/gsm/protocol/gsm_23_041.h index e60c324..e726cff 100644 --- a/include/osmocom/gsm/protocol/gsm_23_041.h +++ b/include/osmocom/gsm/protocol/gsm_23_041.h @@ -11,9 +11,9 @@ #if OSMO_IS_LITTLE_ENDIAN uint8_t num_pages:4, page_nr:4; -#else - uint8_t page_nr:4, - num_pages:4; +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t page_nr:4, num_pages:4; #endif } page_param; uint8_t content[0]; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18257 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7432f5337d6589262c31f5186dfd0ac32221c467 Gerrit-Change-Number: 18257 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange
Change in libosmocore[master]: add missing endian.h in gsm_23_041.h
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18255 ) Change subject: add missing endian.h in gsm_23_041.h .. add missing endian.h in gsm_23_041.h Change-Id: I593cc5e8272469b570559206bb02b6e79797340b --- M include/osmocom/gsm/protocol/gsm_23_041.h 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/55/18255/1 diff --git a/include/osmocom/gsm/protocol/gsm_23_041.h b/include/osmocom/gsm/protocol/gsm_23_041.h index c75c088..e60c324 100644 --- a/include/osmocom/gsm/protocol/gsm_23_041.h +++ b/include/osmocom/gsm/protocol/gsm_23_041.h @@ -1,5 +1,7 @@ #pragma once +#include + /* Section 9.4.1.2: GSM Message Format */ struct gsm23041_msg_param_gsm { uint16_t serial_nr; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18255 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I593cc5e8272469b570559206bb02b6e79797340b Gerrit-Change-Number: 18255 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange
Change in libosmocore[master]: struct_endianess.py: also recognise unnamed substructs
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18256 ) Change subject: struct_endianess.py: also recognise unnamed substructs .. struct_endianess.py: also recognise unnamed substructs Before this, the new dtap_header substruct construct would end up being split up in a weird way: struct dtap_header { uint8_t type; union { uint8_t link_id; /* Backward compatibility */ struct { uint8_t dlci_cc:2, dlci_spare:3, dlci_sapi:3; /* enum gsm0406_dlc_sapi */ }; }; uint8_t length; } __attribute__((packed)); would previously become struct dtap_header { uint8_t type; union { uint8_t link_id; /* Backward compatibility */ struct { #if OSMO_IS_LITTLE_ENDIAN uint8_t dlci_cc:2, dlci_spare:3, dlci_sapi:3; /* enum gsm0406_dlc_sapi */ }; }; uint8_t length; #elif OSMO_IS_BIG_ENDIAN /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t dlci_sapi:3, dlci_spare:3, dlci_cc:2; }; }; uint8_t length; #endif } __attribute__((packed)); now becomes struct dtap_header { uint8_t type; union { uint8_t link_id; /* Backward compatibility */ struct { #if OSMO_IS_LITTLE_ENDIAN uint8_t dlci_cc:2, dlci_spare:3, dlci_sapi:3; /* enum gsm0406_dlc_sapi */ #elif OSMO_IS_BIG_ENDIAN /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ uint8_t dlci_sapi:3, dlci_spare:3, dlci_cc:2; #endif }; }; uint8_t length; } __attribute__((packed)); Change-Id: I3c4986ebd1e41aad8b279d6132b7e3b2539d7dc5 --- M contrib/struct_endianess.py 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/18256/1 diff --git a/contrib/struct_endianess.py b/contrib/struct_endianess.py index be73fbe..6ce75fc 100755 --- a/contrib/struct_endianess.py +++ b/contrib/struct_endianess.py @@ -17,6 +17,7 @@ re_substruct_start = re.compile(r'^\s+struct\s*{\s*$') re_substruct_end = re.compile(r'^\s+}\s*([^;]*\s)[a-zA-Z_][a-zA-Z_0-9]*\s*;\s*$') +re_unnamed_substruct_end = re.compile(r'^\s+}\s*;\s*$') re_int_def = re.compile(r'(^\s*((const|unsigned|signed|char|int|long|int[0-9]+_t|uint[0-9]_t)\s+)+\s*)([^;]*;)', re.DOTALL | re.MULTILINE) @@ -73,7 +74,8 @@ line = struct_body_lines[j] if (re_substruct_start.fullmatch(line) -or re_substruct_end.fullmatch(line)): +or re_substruct_end.fullmatch(line) +or re_unnamed_substruct_end.fullmatch(line)): end_def() arbitrary_part.append(line) j += 1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18256 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I3c4986ebd1e41aad8b279d6132b7e3b2539d7dc5 Gerrit-Change-Number: 18256 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-MessageType: newchange
Change in libosmo-abis[master]: trau_frame: Fix AMR frame decoding
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/18182 ) Change subject: trau_frame: Fix AMR frame decoding .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/18182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I9b2dbca05217ee78cade2a47a02857f7cf7e0cd7 Gerrit-Change-Number: 18182 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt Gerrit-CC: pespin Gerrit-Comment-Date: Thu, 14 May 2020 14:48:58 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: Introduce test TC_force_two_phase_access
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18254 ) Change subject: Introduce test TC_force_two_phase_access .. Introduce test TC_force_two_phase_access Change-Id: Icce25b5d113eb5b37ec1e5b6c6c14aacdb01cd8d --- M pcu/PCU_Tests.ttcn 1 file changed, 29 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/54/18254/1 diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 986bbd5..2077ac6 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -137,6 +137,7 @@ var uint8_t g_mcs_max_ul := 9; var boolean g_egprs_only := false; + var boolean g_force_two_phase_access := false; /* Guard timeout */ timer g_T_guard := 60.0; @@ -190,6 +191,12 @@ } else { f_vty_config2(PCUVTY, {"pcu"}, "no egprs"); } + + if (g_force_two_phase_access) { + f_vty_config2(PCUVTY, {"pcu"}, "two-phase-access"); + } else { + f_vty_config2(PCUVTY, {"pcu"}, "no two-phase-access"); + } } function f_init_raw(charstring id, template (value) PCUIF_info_ind info_ind := ts_PCUIF_INFO_default) @@ -1502,6 +1509,12 @@ var CodingScheme cs_mcs; /* 0111 0xxx: Single block packet access; one block period on a PDCH is needed for two phase packet access or other RR signalling purpose. */ var uint16_t ra := oct2int('70'O); + if (g_force_two_phase_access) { + /* If 2phase access is enforced by the network, then let's + request a One phase packet access, we'll receive a single block + anyway */ + ra := bit2int(chan_req_def); + } /* Initialize NS/BSSGP side */ f_init_bssgp(); @@ -1597,6 +1610,21 @@ f_TC_mo_ping_pong_2phase_access(ms_racap, exp_ul_cs_mcs, exp_dl_cs_mcs); } +testcase TC_force_two_phase_access() runs on RAW_PCU_Test_CT { + /* Configure PCU to force two phase access */ + g_force_two_phase_access := true; + + var MultislotCap_GPRS mscap_gprs := { + gprsmultislotclass := '00011'B, + gprsextendeddynalloccap := '0'B + }; + var MSRadioAccessCapabilityV ms_racap := { valueof(ts_RaCapRec('0001'B /* E-GSM */, mscap_gprs, omit)) }; + var CodingScheme exp_ul_cs_mcs := f_rlcmac_block_int2cs_mcs(g_mcs_initial_ul, false); + var CodingScheme exp_dl_cs_mcs := CS_2; + + f_TC_mo_ping_pong_2phase_access(ms_racap, exp_ul_cs_mcs, exp_dl_cs_mcs); +} + /* Test scenario where SGSN wants to send some data against MS and it is * answered by the MS on PDCH, so TBFs for downlink and later for uplink are created. */ @@ -2140,6 +2168,7 @@ execute( TC_t3193() ); execute( TC_mo_ping_pong() ); execute( TC_mo_ping_pong_with_ul_racap() ); + execute( TC_force_two_phase_access() ); execute( TC_mt_ping_pong() ); execute( TC_mt_ping_pong_with_dl_racap() ); execute( TC_imm_ass_dl_block_retrans() ); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18254 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: Icce25b5d113eb5b37ec1e5b6c6c14aacdb01cd8d Gerrit-Change-Number: 18254 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange
Change in osmo-ttcn3-hacks[master]: pcu: Support decoding Egprs Pkt Ul Ass on PDCH
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18252 ) Change subject: pcu: Support decoding Egprs Pkt Ul Ass on PDCH .. pcu: Support decoding Egprs Pkt Ul Ass on PDCH Change-Id: I30fb98aab67303997b803a0359ffc2e0b65ebf01 --- M library/RLCMAC_CSN1_Templates.ttcn M library/RLCMAC_CSN1_Types.ttcn M library/RLCMAC_Templates.ttcn M pcu/PCU_Tests.ttcn 4 files changed, 131 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/52/18252/1 diff --git a/library/RLCMAC_CSN1_Templates.ttcn b/library/RLCMAC_CSN1_Templates.ttcn index 2c1bc04..772df13 100644 --- a/library/RLCMAC_CSN1_Templates.ttcn +++ b/library/RLCMAC_CSN1_Templates.ttcn @@ -167,27 +167,54 @@ return '1'B; } - template PktUlAssGprs tr_PktUlAssGprsDynamic(template uint5_t tfi := ?) := { + template DynamicAllocation tr_DynamicAllocation(template uint5_t tfi:= ?) := { + extd_dyn_alloc := ?, + p0_present := ?, + p0 := *, + pr_mode := *, + usf_granularity := ?, + ul_tfi_ass_present := f_presence_bit_tfi(tfi), + ul_tfi_assignment := tfi, + reserved := '0'B, + tbf_starting_time_present := ?, + tbf_starting_time := *, + ts_allocation := ? + }; + + template PktUlAssGprs tr_PktUlAssGprsDynamic(template DynamicAllocation dyn_alloc := ?) := { ch_coding_cmd := ?, tlli_block_chan_coding := ?, pkt_ta := ?, freq_par_present := ?, freq_par := *, alloc_present := '01'B, - dyn_block_alloc := { - extd_dyn_alloc := ?, - p0_present := ?, - p0 := *, - pr_mode := *, - usf_granularity := ?, - ul_tfi_ass_present := f_presence_bit_tfi(tfi), - ul_tfi_assignment := tfi, - reserved := '0'B, - tbf_starting_time_present := ?, - tbf_starting_time := *, - ts_allocation := ? - }, + dyn_block_alloc := dyn_alloc, sgl_block_alloc := omit }; + template PktUlAssEgprs tr_PktUlAssEgprsDynamic(template DynamicAllocation dyn_alloc := ?) := { + dual_carrier := '00'B, + tlli_present := ?, + tlli := *, + compact_reduced_ma_present := ?, + compact_reduced_ma := *, + chan_coding_cmd := ?, + resegment := ?, + window_size := ?, + ats_present := ?, + ats := *, /* ? */ + arac_retrans_req := ?, + tlli_block_chan_coding := ?, + bep_period2_present := ?, + bep_period2 := *, + pkt_ta := ?, + pkt_ext_ta_present := ?, + pkt_ext_ta := *, + freq_par_present := ?, + freq_par := *, + alloc_present := ?, + dyn_block_alloc := dyn_alloc, + multi_block_alloc := omit + }; + } with { encode "RAW"; variant "FIELDORDER(msb)" variant "BYTEORDER(last)" }; diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn index 447e52b..a74789d 100644 --- a/library/RLCMAC_CSN1_Types.ttcn +++ b/library/RLCMAC_CSN1_Types.ttcn @@ -233,6 +233,16 @@ variant (dyn_block_alloc) "PRESENCE(alloc_present = '01'B)" variant (sgl_block_alloc) "PRESENCE(alloc_present = '10'B)" }; + type record COMPACTreducedMA { + uint7_t ma_bitmap_length, + bitstring ma_bitmap, + BIT1maio_2_present, + BIT6maio_2 + } with { + variant (ma_bitmap_length) "LENGTHTO (ma_bitmap)" + variant (ma_bitmap_length) "UNIT(bits)" + variant (maio_2) "PRESENCE(maio_2_present = '1'B)" + }; type record of AccessTechnologiesRequest AccessTechnologiesRequestRepetition with { variant "EXTENSION_BIT(reverse)" }; type record AccessTechnologiesRequest @@ -240,16 +250,72 @@ BIT4accessTechnType, BIT1extensionBit } with { variant "FIELDORDER(msb)" }; + type record MultiBlockAllocation { + uint3_t timeslot_nr, + BIT1alpha_gamma_present, + uint4_t alpha optional, + uint5_t gamma_tn optional, + BIT1p0_present, + uint4_t p0
Change in osmo-ttcn3-hacks[master]: pcu: Introduce TC_mo_ping_pong_with_ul_racap_egprs_only
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18253 ) Change subject: pcu: Introduce TC_mo_ping_pong_with_ul_racap_egprs_only .. pcu: Introduce TC_mo_ping_pong_with_ul_racap_egprs_only Change-Id: I396dbd0ca200fbf9365c534f4d479f903d0417ff --- M library/RLCMAC_Templates.ttcn M pcu/PCU_Tests.ttcn 2 files changed, 95 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/53/18253/1 diff --git a/library/RLCMAC_Templates.ttcn b/library/RLCMAC_Templates.ttcn index be751d7..1774197 100644 --- a/library/RLCMAC_Templates.ttcn +++ b/library/RLCMAC_Templates.ttcn @@ -93,6 +93,46 @@ return CS_1; } + function f_rlcmac_block_ChCodingCommand2cs_mcs(ChCodingCommand chcc) return CodingScheme { + select (chcc) { + case (CH_CODING_CS1) { return CS_1; } + case (CH_CODING_CS2) { return CS_2; } + case (CH_CODING_CS3) { return CS_3; } + case (CH_CODING_CS4) { return CS_4; } + } + return CS_1; + } + + function f_rlcmac_block_EgprsChCodingCommand2cs_mcs(EgprsChCodingCommand echcc) return CodingScheme { + select (echcc) { + case (CH_CODING_MCS1) { return MCS_1; } + case (CH_CODING_MCS2) { return MCS_2; } + case (CH_CODING_MCS3) { return MCS_3; } + case (CH_CODING_MCS4) { return MCS_4; } + case (CH_CODING_MCS5) { return MCS_5; } + case (CH_CODING_MCS6) { return MCS_6; } + case (CH_CODING_MCS7) { return MCS_7; } + case (CH_CODING_MCS8) { return MCS_8; } + case (CH_CODING_MCS9) { return MCS_9; } + /* CH_CODING_MCS5_7 */ + /* CH_CODING_MCS6_9 */ + } + return MCS_1; + } + + /* 1 -> CS_1 / MCS_1, 2 -> CS_2 / MCS_2, etc. */ + function f_rlcmac_block_int2cs_mcs(integer n, boolean is_mcs) return CodingScheme { + var CodingScheme cs_mcs; + if (not is_mcs) { + int2enum(n - 1, cs_mcs); + return cs_mcs; + } else { + cs_mcs := MCS_0; + int2enum(enum2int(cs_mcs) + n, cs_mcs); + return cs_mcs; + } + } + /* Coding and Puncturing Scheme indicator field for Header type 1 in EGPRS TBF or EC TBF or downlink EGPRS2 TBF */ function f_rlcmac_cps_htype1_to_mcs(uint3_t cps) return CodingScheme { var CodingSchemeArray egprs_Header_type1_coding_puncturing_scheme_to_mcs := { diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn index 18189fa..986bbd5 100644 --- a/pcu/PCU_Tests.ttcn +++ b/pcu/PCU_Tests.ttcn @@ -262,6 +262,25 @@ return 0; /* make compiler happy */ } +private function f_rlcmac_dl_block_get_cs_mcs(RlcmacDlBlock dl_block) +runs on RAW_PCU_Test_CT return CodingScheme { + if (ischosen(dl_block.data)) { + /* TODO: get it from data header */ + } else if (ischosen(dl_block.data_egprs)) { + /* TODO: get it from data header */ + } else { /* Ctrl block */ + if (match(dl_block, tr_RLCMAC_UL_PACKET_ASS_GPRS(?, tr_PktUlAssGprsDynamic(? { + return f_rlcmac_block_ChCodingCommand2cs_mcs(dl_block.ctrl.payload.u.ul_assignment.gprs.ch_coding_cmd); + } + if (match(dl_block, tr_RLCMAC_UL_PACKET_ASS_EGPRS(?, tr_PktUlAssEgprsDynamic(? { + return f_rlcmac_block_EgprsChCodingCommand2cs_mcs(dl_block.ctrl.payload.u.ul_assignment.egprs.chan_coding_cmd); + } + } + setverdict(fail, "DlBlock doesn't contain CS_MCS information:", dl_block); + f_shutdown(__BFILE__, __LINE__); + return CS_1; /* make compiler happy */ +} + /* TS 44.060 sec 12.3 Ack/Nack Description */ private function f_acknackdesc_ack_block(inout AckNackDescription desc, RlcmacDlBlock dl_block, BIT1 final_ack := '0'B) { @@ -1465,7 +1484,10 @@ /* Test scenario where MS wants to send some data on PDCH against SGSN and it is * answered, so TBFs for uplink and later for downlink are created. */ -private function f_TC_mo_ping_pong_2phase_access(template (value) MSRadioAccessCapabilityV ms_racap, template (present) CodingScheme exp_cs_mcs := ?) runs on RAW_PCU_Test_CT { +private function f_TC_mo_ping_pong_2phase_access(template (value) MSRadioAccessCapabilityV ms_racap, +template (present) CodingScheme exp_ul_cs_mcs := ?, +template (present) CodingScheme exp_dl_cs_mcs := ?) +runs
Change in osmo-ttcn3-hacks[master]: Move some types from GSM_RR_Types.ttcn to RLCMAC_CSN1_Types.ttcn
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18251 ) Change subject: Move some types from GSM_RR_Types.ttcn to RLCMAC_CSN1_Types.ttcn .. Move some types from GSM_RR_Types.ttcn to RLCMAC_CSN1_Types.ttcn Some types already available in GSM_RR_Types.ttcn will also be required by messages sent over PDCH and which belong to RLCMAC_CSN1_Types. Since GSM_RR_Types.ttcn already requires RLCMAC_CSN1_Types.ttcn, let's move them there so they can be used in both places. Change-Id: Iccaaa2743dc44a36046c19d4d4ff882dc02fb479 --- M library/GSM_RR_Types.ttcn M library/RLCMAC_CSN1_Types.ttcn 2 files changed, 56 insertions(+), 61 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/51/18251/1 diff --git a/library/GSM_RR_Types.ttcn b/library/GSM_RR_Types.ttcn index dcf12ae..b09a760 100644 --- a/library/GSM_RR_Types.ttcn +++ b/library/GSM_RR_Types.ttcn @@ -512,67 +512,6 @@ } with { variant (compressed_irat_ho_info_ind) "CSN.1 L/H" }; - - - type record of AccessTechnologiesRequest - AccessTechnologiesRequestRepetition - with { variant "EXTENSION_BIT(reverse)" }; - - type record AccessTechnologiesRequest - { - BIT4accessTechnType, - BIT1extensionBit - } with { variant "FIELDORDER(msb)" }; - - type enumerated EgprsChCodingCommand { - CH_CODING_MCS1 (''B), - CH_CODING_MCS2 ('0001'B), - CH_CODING_MCS3 ('0010'B), - CH_CODING_MCS4 ('0011'B), - CH_CODING_MCS5 ('0100'B), - CH_CODING_MCS6 ('0101'B), - CH_CODING_MCS7 ('0110'B), - CH_CODING_MCS8 ('0111'B), - CH_CODING_MCS9 ('1000'B), - CH_CODING_MCS5_7('1001'B), - CH_CODING_MCS6_9('1010'B) - } with { variant "FIELDLENGTH(4)" }; - - /* TS 44.060 Table 12.5.2.1 */ - type enumerated EgprsWindowSize { - EGPRS_WS_64 ('0'B), - EGPRS_WS_96 ('1'B), - EGPRS_WS_128('00010'B), - EGPRS_WS_160('00011'B), - EGPRS_WS_192('00100'B), - EGPRS_WS_224('00101'B), - EGPRS_WS_256('00110'B), - EGPRS_WS_288('00111'B), - EGPRS_WS_320('01000'B), - EGPRS_WS_352('01001'B), - EGPRS_WS_384('01010'B), - EGPRS_WS_416('01011'B), - EGPRS_WS_448('01100'B), - EGPRS_WS_480('01101'B), - EGPRS_WS_512('01110'B), - EGPRS_WS_544('0'B), - EGPRS_WS_576('1'B), - EGPRS_WS_608('10001'B), - EGPRS_WS_640('10010'B), - EGPRS_WS_672('10011'B), - EGPRS_WS_704('10100'B), - EGPRS_WS_736('10101'B), - EGPRS_WS_768('10110'B), - EGPRS_WS_800('10111'B), - EGPRS_WS_832('11000'B), - EGPRS_WS_864('11001'B), - EGPRS_WS_896('11010'B), - EGPRS_WS_928('11011'B), - EGPRS_WS_960('11100'B), - EGPRS_WS_992('11101'B), - EGPRS_WS_1024 ('0'B) - } with { variant "FIELDLENGTH(5)" }; - type record EgprsUlAssignDyn { uint5_t tfi_assignment, BIT1polling, diff --git a/library/RLCMAC_CSN1_Types.ttcn b/library/RLCMAC_CSN1_Types.ttcn index bca4351..447e52b 100644 --- a/library/RLCMAC_CSN1_Types.ttcn +++ b/library/RLCMAC_CSN1_Types.ttcn @@ -56,6 +56,55 @@ MBMS_DL_ACK_NACK('01'B) } with { variant "FIELDLENGTH(6)" }; + type enumerated EgprsChCodingCommand { + CH_CODING_MCS1 (''B), + CH_CODING_MCS2 ('0001'B), + CH_CODING_MCS3 ('0010'B), + CH_CODING_MCS4 ('0011'B), + CH_CODING_MCS5 ('0100'B), + CH_CODING_MCS6 ('0101'B), + CH_CODING_MCS7 ('0110'B), + CH_CODING_MCS8 ('0111'B), + CH_CODING_MCS9 ('1000'B), + CH_CODING_MCS5_7('1001'B), + CH_CODING_MCS6_9('1010'B) + } with { variant "FIELDLENGTH(4)" }; + + /* TS 44.060 Table 12.5.2.1 */ + type enumerated
Change in osmo-ttcn3-hacks[master]: pcu: use correct RA type to properly test 2phase access
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 ) Change subject: pcu: use correct RA type to properly test 2phase access .. Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239/1/pcu/PCU_Tests.ttcn File pcu/PCU_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239/1/pcu/PCU_Tests.ttcn@612 PS1, Line 612: f_rrbp_ack_fn > So here we assume that RRBP is always valid for DL Assignment? If so, let's > add a comment. Same as for f_rx_rlcmac_dl_block_exp_pkt_ul_ass(). TBH I'm not sure whether it's always expected. For now I'm assuming it it seeing the behavior of osmo-pcu, but it's still unknown (didn't look at the relevant parts of the spec yet to confirm). -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 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: If636a4898dfa175fdbd6baf04f7f2c955a9c525d Gerrit-Change-Number: 18239 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: fixeria Gerrit-Comment-Date: Thu, 14 May 2020 13:19:52 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
Change in osmo-bsc[master]: manual: fix config example typo 'msc-addr'
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/18241 ) Change subject: manual: fix config example typo 'msc-addr' .. manual: fix config example typo 'msc-addr' Change-Id: Ifb84d7ceddc772e3e1ae59c8d5859b6be6f1b4eb --- M doc/manuals/chapters/running.adoc 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/doc/manuals/chapters/running.adoc b/doc/manuals/chapters/running.adoc index eeefa6c..ae45afc 100644 --- a/doc/manuals/chapters/running.adoc +++ b/doc/manuals/chapters/running.adoc @@ -93,7 +93,7 @@ sccp-address msc point-code 0.23.1 msc 0 - msc-address msc + msc-addr msc This configuration is explained in detail in <>. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/18241 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ifb84d7ceddc772e3e1ae59c8d5859b6be6f1b4eb Gerrit-Change-Number: 18241 Gerrit-PatchSet: 1 Gerrit-Owner: neels Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in libosmocore[master]: codec: Add functions for AMR s->d bits and d->s bits
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18246 ) Change subject: codec: Add functions for AMR s->d bits and d->s bits .. Patch Set 4: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 Gerrit-Change-Number: 18246 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt Gerrit-Comment-Date: Thu, 14 May 2020 13:04:04 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: codec: Add functions for AMR s->d bits and d->s bits
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/18246 to look at the new patch set (#4). Change subject: codec: Add functions for AMR s->d bits and d->s bits .. codec: Add functions for AMR s->d bits and d->s bits These functions implement re-ordering of bits as per TS 06.90 / 26.101 based on the already existing tables we've had in libosmocoding. Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 --- M include/osmocom/codec/codec.h M src/codec/Makefile.am M src/codec/gsm690.c M tests/codec/codec_test.c M tests/codec/codec_test.ok 5 files changed, 165 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/46/18246/4 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 Gerrit-Change-Number: 18246 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: tnt Gerrit-MessageType: newpatchset
Change in libosmocore[master]: codec: Add functions for AMR s->d bits and d->s bits
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/18246 to look at the new patch set (#3). Change subject: codec: Add functions for AMR s->d bits and d->s bits .. codec: Add functions for AMR s->d bits and d->s bits These functions implement re-ordering of bits as per TS 06.90 / 26.101 based on the already existing tables we've had in libosmocoding. Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 --- M include/osmocom/codec/codec.h M src/codec/Makefile.am M src/codec/gsm690.c M tests/codec/codec_test.c M tests/codec/codec_test.ok 5 files changed, 163 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/46/18246/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 Gerrit-Change-Number: 18246 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: tnt Gerrit-MessageType: newpatchset
Change in libosmo-netif[master]: amr: Fix OA<->BWE conversion.
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/17997 ) Change subject: amr: Fix OA<->BWE conversion. .. amr: Fix OA<->BWE conversion. Size of a single AMR frame doesn't always shrink by a byte when converted from octet-aligned to bandwidth-efficient mode. It does shrink for AMR modes 2, 3, 4, 6, and 7 but doesn't shrink for AMR modes 0, 1, 5, and SID frames because we only remove 6 bits. So old code generated truncated AMR packets for those AMR modes. This patch fixes the length calculation by properly counting bits. Proper bit counting is also bringing us one small step closer to properly handlig multi-frame AMR packets. Change-Id: I9fc5fb92e9bada22a47a82fcfb0925e892e50ced --- M include/osmocom/netif/amr.h M src/amr.c M tests/amr/amr_test.c M tests/amr/amr_test.ok 4 files changed, 145 insertions(+), 75 deletions(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/netif/amr.h b/include/osmocom/netif/amr.h index 6e37c99..c5a8e28 100644 --- a/include/osmocom/netif/amr.h +++ b/include/osmocom/netif/amr.h @@ -78,20 +78,34 @@ #define AMR_FT_SID 8 /* SID */ #define AMR_FT_MAX 9 -/* AMR voice frame length (in bytes, rounded), - * See also RFC 3267, chapter 3.6 */ -#define AMR_FT_0_LEN 12 /* 4.75 */ -#define AMR_FT_1_LEN 13 /* 5.15 */ -#define AMR_FT_2_LEN 15 /* 5.90 */ -#define AMR_FT_3_LEN 17 /* 6.70 */ -#define AMR_FT_4_LEN 19 /* 7.40 */ -#define AMR_FT_5_LEN 20 /* 7.95 */ -#define AMR_FT_6_LEN 26 /* 10.2 */ -#define AMR_FT_7_LEN 31 /* 12.2 */ -#define AMR_FT_SID_LEN 5 /* SID */ - -/* NOTE: the above constant refers to the length of one AMR speech frame-block, +/* AMR voice frame length (in bits). + * See also RFC 3267, chapter 3.6. + * + * NOTE: These constants refer to the length of one AMR speech frame-block, * not counting CMR, TOC. */ +#define AMR_FT_0_LEN_BITS 95 /* 4.75 */ +#define AMR_FT_1_LEN_BITS 103 /* 5.15 */ +#define AMR_FT_2_LEN_BITS 118 /* 5.90 */ +#define AMR_FT_3_LEN_BITS 134 /* 6.70 */ +#define AMR_FT_4_LEN_BITS 148 /* 7.40 */ +#define AMR_FT_5_LEN_BITS 159 /* 7.95 */ +#define AMR_FT_6_LEN_BITS 204 /* 10.2 */ +#define AMR_FT_7_LEN_BITS 244 /* 12.2 */ +#define AMR_FT_SID_LEN_BITS39 /* SID */ + +/* AMR voice frame length (in bytes, rounded). + * + * NOTE: These constants refer to the length of one AMR speech frame-block, + * not counting CMR, TOC. */ +#define AMR_FT_0_LEN ((AMR_FT_0_LEN_BITS+7)/8) /* 4.75 */ +#define AMR_FT_1_LEN ((AMR_FT_1_LEN_BITS+7)/8) /* 5.15 */ +#define AMR_FT_2_LEN ((AMR_FT_2_LEN_BITS+7)/8) /* 5.90 */ +#define AMR_FT_3_LEN ((AMR_FT_3_LEN_BITS+7)/8) /* 6.70 */ +#define AMR_FT_4_LEN ((AMR_FT_4_LEN_BITS+7)/8) /* 7.40 */ +#define AMR_FT_5_LEN ((AMR_FT_5_LEN_BITS+7)/8) /* 7.95 */ +#define AMR_FT_6_LEN ((AMR_FT_6_LEN_BITS+7)/8) /* 10.2 */ +#define AMR_FT_7_LEN ((AMR_FT_7_LEN_BITS+7)/8) /* 12.2 */ +#define AMR_FT_SID_LEN ((AMR_FT_SID_LEN_BITS+7)/8) /* SID */ int osmo_amr_ft_valid(uint8_t amr_ft); size_t osmo_amr_bytes(uint8_t amr_cmr); diff --git a/src/amr.c b/src/amr.c index 5609c46..a6b8361 100644 --- a/src/amr.c +++ b/src/amr.c @@ -29,6 +29,18 @@ * 7 12.20 24431 */ +static size_t amr_ft_to_bits[AMR_FT_MAX] = { + [AMR_FT_0] = AMR_FT_0_LEN_BITS, + [AMR_FT_1] = AMR_FT_1_LEN_BITS, + [AMR_FT_2] = AMR_FT_2_LEN_BITS, + [AMR_FT_3] = AMR_FT_3_LEN_BITS, + [AMR_FT_4] = AMR_FT_4_LEN_BITS, + [AMR_FT_5] = AMR_FT_5_LEN_BITS, + [AMR_FT_6] = AMR_FT_6_LEN_BITS, + [AMR_FT_7] = AMR_FT_7_LEN_BITS, + [AMR_FT_SID]= AMR_FT_SID_LEN_BITS, +}; + static size_t amr_ft_to_bytes[AMR_FT_MAX] = { [AMR_FT_0] = AMR_FT_0_LEN, [AMR_FT_1] = AMR_FT_1_LEN, @@ -41,6 +53,11 @@ [AMR_FT_SID]= AMR_FT_SID_LEN, }; +size_t osmo_amr_bits(uint8_t amr_ft) +{ + return amr_ft_to_bits[amr_ft]; +} + size_t osmo_amr_bytes(uint8_t amr_ft) { return amr_ft_to_bytes[amr_ft]; @@ -119,8 +136,10 @@ int osmo_amr_oa_to_bwe(uint8_t *payload, unsigned int payload_len) { struct amr_hdr *oa_hdr = (struct amr_hdr *)payload; + unsigned int ft = oa_hdr->ft; unsigned int frame_len = payload_len - sizeof(struct amr_hdr); unsigned int i; + int bwe_payload_len; /* This implementation is not capable to handle multi-frame * packets, so we need to make sure that the frame we operate on @@ -137,8 +156,10 @@ payload[i + 2] = payload[i + 2] << 6; } - /* The overall saving is one byte! */ - return payload_len - 1; + /* Calculate
Change in libosmo-netif[master]: amr: Fix OA<->BWE conversion.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/17997 ) Change subject: amr: Fix OA<->BWE conversion. .. Patch Set 7: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/17997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I9fc5fb92e9bada22a47a82fcfb0925e892e50ced Gerrit-Change-Number: 17997 Gerrit-PatchSet: 7 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 12:03:40 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: lapd/lapdm: print user-defined string name instead of (dl=%p)
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18002 ) Change subject: lapd/lapdm: print user-defined string name instead of (dl=%p) .. Patch Set 4: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/18002/4/TODO-RELEASE File TODO-RELEASE: https://gerrit.osmocom.org/c/libosmocore/+/18002/4/TODO-RELEASE@12 PS4, Line 12: sim API/ABI change all over the place > Not related to this patch? this patch adds a 'name' member to the lapd_datalink. Maybe you missed that? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18002 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ie6742843fff809edffcac24c4dce4edf66bc71be Gerrit-Change-Number: 18002 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 12:02:25 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin Gerrit-MessageType: comment
Change in libosmo-abis[master]: trau_frame: Add 16k HR + OAM encoding/decoding; add AMR encoding
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/18181 ) Change subject: trau_frame: Add 16k HR + OAM encoding/decoding; add AMR encoding .. Patch Set 2: Code-Review-1 Actually I'm not sure if it's worth adding this to the old API as I'm introducing a new API anyway (with support for more types than the old one could) -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/18181 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I589a0e97e48e7f89d9166793b9887462756e8f09 Gerrit-Change-Number: 18181 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 11:57:18 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmo-abis[master]: WIP: Add new TRAU frame sync code
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/18250 ) Change subject: WIP: Add new TRAU frame sync code .. WIP: Add new TRAU frame sync code This code is able to detect and sync against a variety of TRAU frame sync patterns. Focus is so far on those patterns present on 16k sub-slots, but 8k sub-slots are expected to be supported soon, too. Change-Id: Ia6fe6228b0b8b9a27999f37ce1115ed5558881ea --- M include/Makefile.am A include/osmocom/trau/trau_sync.h M src/Makefile.am A src/trau/trau_sync.c M tests/Makefile.am M tests/testsuite.at A tests/trau_sync/trau_sync_test.c A tests/trau_sync/trau_sync_test.err A tests/trau_sync/trau_sync_test.ok 9 files changed, 640 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/50/18250/1 diff --git a/include/Makefile.am b/include/Makefile.am index 2048520..2e57565 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -4,4 +4,4 @@ osmocom/abis/ipa_proxy.h osmocom/abis/ipaccess.h osmocom/abis/abis.h \ osmocom/abis/subchan_demux.h osmocom/abis/e1_input.h \ osmocom/abis/lapd.h osmocom/abis/lapd_pcap.h osmocom/trau/osmo_ortp.h \ - osmocom/abis/unixsocket_proto.h + osmocom/abis/unixsocket_proto.h osmocom/trau/trau_sync.h diff --git a/include/osmocom/trau/trau_sync.h b/include/osmocom/trau/trau_sync.h new file mode 100644 index 000..94507e8 --- /dev/null +++ b/include/osmocom/trau/trau_sync.h @@ -0,0 +1,10 @@ +#pragma once +#include +#include + +typedef void (*frame_out_cb_t)(void *user_data, const ubit_t *bits, unsigned int num_bits); + +struct osmo_fsm_inst * +osmo_trau_sync_alloc(void *ctx, const char *name, frame_out_cb_t frame_out_cb, void *user_data); + +void osmo_trau_sync_rx_ubits(struct osmo_fsm_inst *fi, const ubit_t *bits, size_t n_bits); diff --git a/src/Makefile.am b/src/Makefile.am index 3838a5a..a4f91cb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -35,4 +35,6 @@ libosmotrau_la_CFLAGS = $(AM_CFLAGS) $(ORTP_CFLAGS) libosmotrau_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(TRAU_LIBVERSION) libosmotrau_la_LIBADD = $(COMMONLIBS) $(ORTP_LIBS) -libosmotrau_la_SOURCES = trau/osmo_ortp.c +libosmotrau_la_SOURCES = trau/osmo_ortp.c trau/trau_sync.c + +noinst_HEADERS = trau/ubit_buf.h diff --git a/src/trau/trau_sync.c b/src/trau/trau_sync.c new file mode 100644 index 000..e35f88a --- /dev/null +++ b/src/trau/trau_sync.c @@ -0,0 +1,504 @@ +/* GSM A-bis TRAU frame synchronization as per TS 08.60 / 08.61 */ + +#include + +#include +#include +#include + +#include "ubit_buf.h" +#include + +#define S(x) (1 << (x)) + +#define MAX_TRAU_BYTES 40 + +#define T_SYNC 1 + +struct sync_pattern { + /* provided by user */ + const char *name; /*!< human-readable name */ + const uint8_t byte_pattern[MAX_TRAU_BYTES]; /*!< bytes to match against */ + const uint8_t byte_mask[MAX_TRAU_BYTES];/*!< mask applied before matching */ + uint8_t byte_len; /*!< length of mask in bytes */ + + /* generated by code */ + ubit_t ubit_pattern[MAX_TRAU_BYTES*8]; /*!< bits to match against */ + ubit_t ubit_mask[MAX_TRAU_BYTES*8]; /*!< mask applied before matching */ + uint8_t bitcount; /*!< number of high bits in mask */ +}; + + +/* TS 08.60 Section 4.8.1 */ +static struct sync_pattern ts0860_fr_pattern = { + .name = "FR/EFR", + .byte_pattern = { + 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + }, + .byte_mask = { + 0xff, 0xff, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, + }, + .byte_len = 40, +}; + +/* TS 08.61 Section 6.8.2.1.1 */ +static struct sync_pattern ts0861_hr8_pattern = { + .name = "HR8", + .byte_pattern = { + 0x00, 0x80, 0x40, 0x80, + 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, + }, + .byte_mask = { + 0xff, 0x80, 0xC0, 0x80, + 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, + }, + .byte_len = 20, +}; + +/* TS 08.61 Section 6.8.2.1.2 */ +/*
Change in libosmo-abis[master]: WIP: unixsocket: Add support for TRAU frames
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/18248 ) Change subject: WIP: unixsocket: Add support for TRAU frames .. WIP: unixsocket: Add support for TRAU frames Change-Id: I4baa02f061cc05c8364dc7169cd9b70f07b0615a --- M include/osmocom/abis/unixsocket_proto.h M src/input/unixsocket.c 2 files changed, 52 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/48/18248/1 diff --git a/include/osmocom/abis/unixsocket_proto.h b/include/osmocom/abis/unixsocket_proto.h index 25718ff..08e511e 100644 --- a/include/osmocom/abis/unixsocket_proto.h +++ b/include/osmocom/abis/unixsocket_proto.h @@ -11,6 +11,7 @@ * * data:| 0x1 | 0x0 | lapd ..| * control: | 0x1 | 0x1 | control payload | + * traffic: | 0x1 | 0x2 | timeslot | rae E1 bitstream data | * * Atm there is only one control packet: * - set_altc (superchannel or timeslot) @@ -26,6 +27,7 @@ enum { UNIXSOCKET_PROTO_DATA = 0x0, UNIXSOCKET_PROTO_CONTROL = 0x1, + UNIXSOCKET_PROTO_TRAFFIC = 0x2, }; #endif /* UNIXSOCKET_PROTO_H */ diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c index cfb4979..c99b801 100644 --- a/src/input/unixsocket.c +++ b/src/input/unixsocket.c @@ -80,6 +80,7 @@ { struct e1inp_line *line = bfd->data; struct msgb *msg = msgb_alloc(UNIXSOCKET_ALLOC_SIZE, "UNIXSOCKET TS"); + uint8_t ts_nr; uint8_t version; uint8_t controldata; int ret; @@ -117,11 +118,19 @@ switch (controldata) { case UNIXSOCKET_PROTO_DATA: + /* FIXME: don't blindly assume TS0 is the signaling slot */ return e1inp_rx_ts_lapd(>ts[0], msg); case UNIXSOCKET_PROTO_CONTROL: LOGPIL(line, DLMI, LOGL_ERROR, "received (invalid) control message."); ret = -1; break; + case UNIXSOCKET_PROTO_TRAFFIC: + ts_nr = msgb_pull_u8(msg); + if (ts_nr >= line->num_ts) { + ret = -1; + } else + return e1inp_rx_ts(>ts[ts_nr], msg, 0, 0); + break; default: LOGPIL(line, DLMI, LOGL_ERROR, "received invalid message."); ret = -1; @@ -143,29 +152,52 @@ static int unixsocket_write_cb(struct osmo_fd *bfd) { struct e1inp_line *line = bfd->data; - struct e1inp_ts *e1i_ts = >ts[0]; - struct msgb *msg; - struct e1inp_sign_link *sign_link; + int i; bfd->when &= ~BSC_FD_WRITE; - /* get the next msg for this timeslot */ - msg = e1inp_tx_ts(e1i_ts, _link); - if (!msg) { - /* no message after tx delay timer */ - LOGPITS(e1i_ts, DLINP, LOGL_INFO, "no message available (line=%p)\n", line); - return 0; + for (i = 0; i < line->num_ts; i++) { + struct e1inp_ts *e1i_ts = >ts[i]; + struct e1inp_sign_link *sign_link; + struct msgb *msg; + int rc; + + /* get the next msg for this timeslot */ + msg = e1inp_tx_ts(e1i_ts, _link); + if (!msg) { + /* no message after tx delay timer */ + LOGPITS(e1i_ts, DLINP, LOGL_INFO, "no message available (line=%p)\n", line); + continue; + } + + LOGPITS(e1i_ts, DLINP, LOGL_DEBUG, "sending: %s (line=%p)\n", msgb_hexdump(msg), line); + switch (e1i_ts->type) { + case E1INP_TS_TYPE_SIGN: + lapd_transmit(e1i_ts->lapd, sign_link->tei, sign_link->sapi, msg); + /* set tx delay timer for next event */ + osmo_timer_setup(_ts->sign.tx_timer, timeout_ts1_write, e1i_ts); + osmo_timer_schedule(_ts->sign.tx_timer, 0, e1i_ts->sign.delay); + break; + case E1INP_TS_TYPE_RAW: + msgb_push_u8(msg, i); /* timeslot number */ + msgb_push_u8(msg, UNIXSOCKET_PROTO_TRAFFIC); + msgb_push_u8(msg, UNIXSOCKET_PROTO_VERSION); + rc = write(bfd->fd, msg->data, msg->len); + if (rc < msg->len) { + LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "write returne d%d instead of %d\n", + rc, msg->len); + msgb_free(msg); + return 0; + } + msgb_free(msg); + break; + default: + LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "unsupported timeslot type %s\n", + e1inp_tstype_name(e1i_ts->type)); + break; + }
Change in osmo-ttcn3-hacks[master]: pcu: use correct RA type to properly test 2phase access
Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 to look at the new patch set (#4). Change subject: pcu: use correct RA type to properly test 2phase access .. pcu: use correct RA type to properly test 2phase access Old code was not setting Single Block Packet Access type, and 2phase access was not properly triggered. Once it's triggered, message flow changes quite a lot from the 1phase access, specially because the 2nd Ul Assignment arrives through PDCH instead of CCCH, which means a different record is received and hence code for 1phase cannot be easily re-used. For similar reasons, f_tx_rlcmac_ul_n_blocks() is modified to receive the only required tfi param instead of a full dl_block. Some functions are also extended to support SingleBlock Allocation instead of usual DynamicAllocation. Change-Id: If636a4898dfa175fdbd6baf04f7f2c955a9c525d --- M library/RLCMAC_CSN1_Templates.ttcn M library/RLCMAC_Templates.ttcn M pcu/PCU_Tests.ttcn 3 files changed, 152 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/39/18239/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 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: If636a4898dfa175fdbd6baf04f7f2c955a9c525d Gerrit-Change-Number: 18239 Gerrit-PatchSet: 4 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: pcu: use correct RA type to properly test 2phase access
Hello laforge, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 to look at the new patch set (#3). Change subject: pcu: use correct RA type to properly test 2phase access .. pcu: use correct RA type to properly test 2phase access Old code was not setting Single Block Packet Access type, and 2phase access was not properly triggered. Once it's triggered, message flow changes quite a lot from the 1phase access, specially because the 2nd Ul Assignment arrives through PDCH instead of CCCH, which means a different record is received and hence code for 1phase cannot be easily re-used. For similar reasons, f_tx_rlcmac_ul_n_blocks() is modified to receive the only required tfi param instead of a full dl_block. Some functions are also extended to support SingleBlock Allocation instead of usual DynamicAllocation. Change-Id: If636a4898dfa175fdbd6baf04f7f2c955a9c525d --- M library/RLCMAC_CSN1_Templates.ttcn M library/RLCMAC_Templates.ttcn M pcu/PCU_Tests.ttcn 3 files changed, 152 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/39/18239/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 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: If636a4898dfa175fdbd6baf04f7f2c955a9c525d Gerrit-Change-Number: 18239 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-MessageType: newpatchset
Change in osmo-pcu[master]: Drop unneeded arg 'ta' in tbf_alloc_ul()
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18224 ) Change subject: Drop unneeded arg 'ta' in tbf_alloc_ul() .. Drop unneeded arg 'ta' in tbf_alloc_ul() The function is simply setting the ta on the ms, so simply make sure ta is set on callers before passing the ms object. Change-Id: Iebb9c57f458690e045ddc45c800209ad8cf621e0 --- M src/pdch.cpp M src/tbf.cpp M src/tbf.h M tests/tbf/TbfTest.err 4 files changed, 16 insertions(+), 20 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/pdch.cpp b/src/pdch.cpp index 048577d..88d5d31 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -118,7 +118,7 @@ bts->channel_request_description(); /* This call will register the new TBF with the MS on success */ - gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->ms(), tbf->trx->trx_no, tbf->tlli(), tbf->ta()); + gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->ms(), tbf->trx->trx_no, tbf->tlli()); /* schedule uplink assignment or reject */ if (ul_tbf) { @@ -551,7 +551,6 @@ struct gprs_rlcmac_ul_tbf *ul_tbf; struct gprs_rlcmac_dl_tbf *dl_tbf; uint32_t tlli = request->ID.u.TLLI; - uint8_t ta = GSM48_TA_INVALID; bool found = true; GprsMs *ms = bts()->ms_by_tlli(tlli); @@ -566,7 +565,6 @@ if (found) { ul_tbf = ms->ul_tbf(); dl_tbf = ms->dl_tbf(); - ta = ms->ta(); /* We got a RACH so the MS was in packet idle mode and thus * didn't have any active TBFs */ if (ul_tbf) { @@ -593,7 +591,7 @@ "block, but there is no resource request " "scheduled!\n"); } else { - ta = sba->ta; + ms->set_ta(sba->ta); bts()->sba()->free_sba(sba); } if (request->Exist_MS_Radio_Access_capability2) { @@ -613,7 +611,7 @@ "MS supports EGPRS multislot class %d.\n", ms->egprs_ms_class()); - ul_tbf = tbf_alloc_ul(bts_data(), ms, trx_no(), tlli, ta); + ul_tbf = tbf_alloc_ul(bts_data(), ms, trx_no(), tlli); if (!ul_tbf) { handle_tbf_reject(bts_data(), ms, tlli, trx_no(), ts_no); diff --git a/src/tbf.cpp b/src/tbf.cpp index 56fdcd1..2693223 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -416,7 +416,7 @@ } gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, -uint32_t tlli, uint8_t ta) +uint32_t tlli) { struct gprs_rlcmac_ul_tbf *tbf; @@ -435,8 +435,6 @@ tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF); OSMO_ASSERT(tbf->ms()); - tbf->ms()->set_ta(ta); - return tbf; } diff --git a/src/tbf.h b/src/tbf.h index 5ebd2e8..2b4cf6d 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -347,7 +347,7 @@ struct gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts, GprsMs *ms, - int8_t use_trx, uint32_t tlli, uint8_t ta); + int8_t use_trx, uint32_t tlli); struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot); diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err index 6019def..ca16149 100644 --- a/tests/tbf/TbfTest.err +++ b/tests/tbf/TbfTest.err @@ -1526,6 +1526,7 @@ - RX : Uplink Control Block - Creating MS object, TLLI = 0x MS requests UL TBF in packet resource request of single block, so we provide one: +Modifying MS object, TLLI = 0x, TA 220 -> 7 Modifying MS object, TLLI = 0x, MS class 0 -> 1 ** UL-TBF starts here ** Allocating UL TBF: MS_CLASS=1/0 @@ -1545,7 +1546,6 @@ TBF(TFI=0 TLLI=0x DIR=UL STATE=NULL) changes state from NULL to ASSIGN TBF(TFI=0 TLLI=0x DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0 Modifying MS object, UL TLLI: 0x -> 0xf1223344, not yet confirmed -Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7 TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete. TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH) @@ -1608,6
Change in osmo-pcu[master]: bts: Drop specific functions to increase counters
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18226 ) Change subject: bts: Drop specific functions to increase counters .. bts: Drop specific functions to increase counters It's super annoying seeing lots of functions being called everywhere only to find out they are only incrementing a counter. Let's drop all those functions and increment the counter so people looking at code doesn't see dozens of code paths evyerwhere. Most of the commit was generated by following sh snippet: """ #!/bin/bash grep -r -l ^CREATE_COUNT_INLINE . | xargs cat | grep "^CREATE_COUNT_INLINE("| tr -d ",;" | tr "()" " " | awk '{ print $2 " " $3 }' >/tmp/hello while read -r func_name ctr_name do #echo "$func_name -> $ctr_name" files="$(grep -r -l "${func_name}()" .)" for f in $files; do echo "$f: $func_name -> $ctr_name"; sed -i "s#${func_name}()#do_rate_ctr_inc(${ctr_name})#g" $f done; done < /tmp/hello grep -r -l "void do_rate_ctr_inc" | xargs sed -i "/void do_rate_ctr_inc(CTR/d" grep -r -l "CREATE_COUNT_INLINE" | xargs sed -i "/^CREATE_COUNT_INLINE/d" """ Change-Id: I360e322a30edf639aefb3c0f0e4354d98c9035a3 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_sched.cpp M src/gprs_rlcmac_ts_alloc.cpp M src/llc.cpp M src/pdch.cpp M src/rlc.cpp M src/sba.cpp M src/tbf.cpp M src/tbf_dl.cpp M src/tbf_ul.cpp 11 files changed, 186 insertions(+), 346 deletions(-) Approvals: laforge: Looks good to me, approved neels: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 2916ee7..2cf219a 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -344,7 +344,7 @@ LOGP(DRLCMAC, LOGL_NOTICE, "Late RLC block, FN delta: %d FN: %d curFN: %d\n", delay, fn, current_frame_number()); - rlc_late_block(); + do_rate_ctr_inc(CTR_RLC_LATE_BLOCK); } m_cur_blk_fn = fn; @@ -755,10 +755,10 @@ bool failure = false; GprsMs *ms; - rach_frame(); + do_rate_ctr_inc(CTR_RACH_REQUESTS); if (is_11bit) - rach_frame_11bit(); + do_rate_ctr_inc(CTR_11BIT_RACH_REQUESTS); /* Determine full frame number */ Fn = rfn_to_fn(Fn); @@ -831,7 +831,7 @@ plen = Encoding::write_immediate_assignment_reject( immediate_assignment, ra, Fn, burst_type); - immediate_assignment_reject(); + do_rate_ctr_inc(CTR_IMMEDIATE_ASSIGN_REJ); } else { LOGP(DRLCMAC, LOGL_DEBUG, @@ -845,7 +845,7 @@ } if (plen >= 0) { - immediate_assignment_ul_tbf(); + do_rate_ctr_inc(CTR_IMMEDIATE_ASSIGN_UL_TBF); pcu_l1if_tx_agch(immediate_assignment, plen); } @@ -920,7 +920,7 @@ tbf->poll_fn, m_bts.alpha, m_bts.gamma, -1, GSM_L1_BURST_TYPE_ACCESS_0); if (plen >= 0) { - immediate_assignment_dl_tbf(); + do_rate_ctr_inc(CTR_IMMEDIATE_ASSIGN_DL_TBF); pcu_l1if_tx_pch(immediate_assignment, plen, pgroup); } diff --git a/src/bts.h b/src/bts.h index 4fddc0b..471ac2e 100644 --- a/src/bts.h +++ b/src/bts.h @@ -175,6 +175,94 @@ uint32_t app_info_pending; /* Count of MS with active TBF, to which we did not send app_info yet */ }; +enum { + CTR_TBF_DL_ALLOCATED, + CTR_TBF_DL_FREED, + CTR_TBF_DL_ABORTED, + CTR_TBF_UL_ALLOCATED, + CTR_TBF_UL_FREED, + CTR_TBF_UL_ABORTED, + CTR_TBF_REUSED, + CTR_TBF_ALLOC_ALGO_A, + CTR_TBF_ALLOC_ALGO_B, + CTR_TBF_FAILED_EGPRS_ONLY, + CTR_RLC_SENT, + CTR_RLC_RESENT, + CTR_RLC_RESTARTED, + CTR_RLC_STALLED, + CTR_RLC_NACKED, + CTR_RLC_FINAL_BLOCK_RESENT, + CTR_RLC_ASS_TIMEDOUT, + CTR_RLC_ASS_FAILED, + CTR_RLC_ACK_TIMEDOUT, + CTR_RLC_ACK_FAILED, + CTR_RLC_REL_TIMEDOUT, + CTR_RLC_LATE_BLOCK, + CTR_RLC_SENT_DUMMY, + CTR_RLC_SENT_CONTROL, + CTR_RLC_DL_BYTES, + CTR_RLC_DL_PAYLOAD_BYTES, + CTR_RLC_UL_BYTES, + CTR_RLC_UL_PAYLOAD_BYTES, + CTR_DECODE_ERRORS, + CTR_SBA_ALLOCATED, + CTR_SBA_FREED, + CTR_SBA_TIMEDOUT, + CTR_LLC_FRAME_TIMEDOUT, + CTR_LLC_FRAME_DROPPED, + CTR_LLC_FRAME_SCHED, + CTR_LLC_DL_BYTES, + CTR_LLC_UL_BYTES, + CTR_RACH_REQUESTS, + CTR_11BIT_RACH_REQUESTS, + CTR_SPB_UL_FIRST_SEGMENT, + CTR_SPB_UL_SECOND_SEGMENT, + CTR_SPB_DL_FIRST_SEGMENT, + CTR_SPB_DL_SECOND_SEGMENT, + CTR_IMMEDIATE_ASSIGN_UL_TBF, + CTR_IMMEDIATE_ASSIGN_REJ, + CTR_IMMEDIATE_ASSIGN_DL_TBF, + CTR_CHANNEL_REQUEST_DESCRIPTION, +
Change in osmo-pcu[master]: pdch: rcv_resource_request(): Clarify tbf_free only needed if MS used...
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18223 ) Change subject: pdch: rcv_resource_request(): Clarify tbf_free only needed if MS used to exist beforehand .. pdch: rcv_resource_request(): Clarify tbf_free only needed if MS used to exist beforehand Variable found is used to always call Guard() on MS to avoid possible unexpected freeing regressions. Change-Id: I62f24fe04ca10fca19bedda288fe3ed3ce75413f --- M src/pdch.cpp 1 file changed, 25 insertions(+), 23 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve neels: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/pdch.cpp b/src/pdch.cpp index 149ca1f..048577d 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -548,38 +548,41 @@ struct gprs_rlcmac_sba *sba; if (request->ID.UnionType) { - struct gprs_rlcmac_ul_tbf *ul_tbf = NULL; - struct gprs_rlcmac_dl_tbf *dl_tbf = NULL; + struct gprs_rlcmac_ul_tbf *ul_tbf; + struct gprs_rlcmac_dl_tbf *dl_tbf; uint32_t tlli = request->ID.u.TLLI; uint8_t ta = GSM48_TA_INVALID; + bool found = true; GprsMs *ms = bts()->ms_by_tlli(tlli); - if (!ms) + if (!ms) { + found = false; ms = bts()->ms_alloc(0, 0); /* ms class updated later */ + } /* Keep the ms, even if it gets idle temporarily */ GprsMs::Guard guard(ms); - ul_tbf = ms->ul_tbf(); - dl_tbf = ms->dl_tbf(); - ta = ms->ta(); - /* We got a RACH so the MS was in packet idle mode and thus -* didn't have any active TBFs */ - if (ul_tbf) { - LOGPTBFUL(ul_tbf, LOGL_NOTICE, - "Got RACH from TLLI=0x%08x while TBF still exists. Killing pending UL TBF\n", - tlli); - tbf_free(ul_tbf); - ul_tbf = NULL; + if (found) { + ul_tbf = ms->ul_tbf(); + dl_tbf = ms->dl_tbf(); + ta = ms->ta(); + /* We got a RACH so the MS was in packet idle mode and thus +* didn't have any active TBFs */ + if (ul_tbf) { + LOGPTBFUL(ul_tbf, LOGL_NOTICE, + "Got RACH from TLLI=0x%08x while TBF still exists. Killing pending UL TBF\n", + tlli); + tbf_free(ul_tbf); + } + if (dl_tbf) { + LOGPTBFUL(dl_tbf, LOGL_NOTICE, + "Got RACH from TLLI=0x%08x while TBF still exists. Release pending DL TBF\n", + tlli); + tbf_free(dl_tbf); + } } - if (dl_tbf) { - LOGPTBFUL(dl_tbf, LOGL_NOTICE, - "Got RACH from TLLI=0x%08x while TBF still exists. Release pending DL TBF\n", - tlli); - tbf_free(dl_tbf); - dl_tbf = NULL; - } LOGP(DRLCMAC, LOGL_DEBUG, "MS requests UL TBF " "in packet resource request of single " "block, so we provide one:\n"); @@ -606,12 +609,11 @@ if (!ms->ms_class()) LOGP(DRLCMAC, LOGL_NOTICE, "MS does not give us a class.\n"); if (ms->egprs_ms_class()) - LOGP(DRLCMAC, LOGL_NOTICE, + LOGP(DRLCMAC, LOGL_INFO, "MS supports EGPRS multislot class %d.\n", ms->egprs_ms_class()); ul_tbf = tbf_alloc_ul(bts_data(), ms, trx_no(), tlli, ta); - if (!ul_tbf) { handle_tbf_reject(bts_data(), ms, tlli, trx_no(), ts_no); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I62f24fe04ca10fca19bedda288fe3ed3ce75413f Gerrit-Change-Number: 18223 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-pcu[master]: bts: Drop specific functions to add values to stats
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18228 ) Change subject: bts: Drop specific functions to add values to stats .. bts: Drop specific functions to add values to stats Change-Id: I877a9c9a35b6c94c3dd6b1ab3019bc57f6c8568a --- M src/bts.h M src/gprs_ms_storage.cpp 2 files changed, 11 insertions(+), 25 deletions(-) Approvals: laforge: Looks good to me, approved neels: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/bts.h b/src/bts.h index 5090f58..15dd482 100644 --- a/src/bts.h +++ b/src/bts.h @@ -263,6 +263,10 @@ CTR_EGPRS_UL_MCS9, }; +enum { + STAT_MS_PRESENT, +}; + #ifdef __cplusplus /** * I represent a GSM BTS. I have one or more TRX, I know the current @@ -271,10 +275,6 @@ */ struct BTS { public: - enum { - STAT_MS_PRESENT, - }; - BTS(); ~BTS(); void cleanup(); @@ -318,19 +318,13 @@ const uint8_t *data, unsigned int len); /* -* Statistics -*/ - - void ms_present(int32_t n); - int32_t ms_present_get(); - - /* * Below for C interface for the VTY */ struct rate_ctr_group *rate_counters() const; struct osmo_stat_item_group *stat_items() const; void do_rate_ctr_inc(unsigned int ctr_id); void do_rate_ctr_add(unsigned int ctr_id, int inc); + void stat_item_add(unsigned int stat_id, int inc); LListHead& ul_tbfs(); LListHead& dl_tbfs(); @@ -408,18 +402,10 @@ rate_ctr_add(_ratectrs->ctr[ctr_id], inc); } - -#define CREATE_STAT_INLINE(func_name, func_name_get, stat_name) \ - inline void BTS::func_name(int32_t val) {\ - osmo_stat_item_set(m_statg->items[stat_name], val); \ - } \ - inline int32_t BTS::func_name_get() {\ - return osmo_stat_item_get_last(m_statg->items[stat_name]); \ - } - -CREATE_STAT_INLINE(ms_present, ms_present_get, STAT_MS_PRESENT); - -#undef CREATE_STAT_INLINE +inline void BTS::stat_item_add(unsigned int stat_id, int inc) { + int32_t val = osmo_stat_item_get_last(m_statg->items[stat_id]); + osmo_stat_item_set(m_statg->items[stat_id], val + inc); +} #endif diff --git a/src/gprs_ms_storage.cpp b/src/gprs_ms_storage.cpp index 04518c5..19b6e1c 100644 --- a/src/gprs_ms_storage.cpp +++ b/src/gprs_ms_storage.cpp @@ -55,7 +55,7 @@ { llist_del(>list()); if (m_bts) - m_bts->ms_present(m_bts->ms_present_get() - 1); + m_bts->stat_item_add(STAT_MS_PRESENT, -1); if (ms->is_idle()) delete ms; } @@ -102,7 +102,7 @@ ms->set_callback(this); llist_add(>list(), _list); if (m_bts) - m_bts->ms_present(m_bts->ms_present_get() + 1); + m_bts->stat_item_add(STAT_MS_PRESENT, 1); return ms; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18228 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I877a9c9a35b6c94c3dd6b1ab3019bc57f6c8568a Gerrit-Change-Number: 18228 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: neels Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in osmo-pcu[master]: bts: Drop specific functions to add values to counters
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18227 ) Change subject: bts: Drop specific functions to add values to counters .. bts: Drop specific functions to add values to counters It's super annoying seeing lots of functions being called everywhere only to find out they are only incrementing a counter. Let's drop all those functions and increment the counter so people looking at code doesn't see dozens of code paths evyerwhere. Most of the commit was generated by following sh snippet: """ #!/bin/bash define_pattern="^CREATE_COUNT_ADD_INLINE" generic_func="do_rate_ctr_add" grep -r -l "${define_pattern}" . | xargs cat | grep "${define_pattern}("| tr -d ",;" | tr "()" " " | awk '{ print $2 " " $3 }' >/tmp/hello while read -r func_name ctr_name do #echo "$func_name -> $ctr_name"; files="$(grep -r -l "${func_name}(" .)" for f in $files; do echo "$f: $func_name -> $ctr_name"; sed -i "s#${func_name}(#${generic_func}(${ctr_name}, #g" $f done; done < /tmp/hello grep -r -l "void ${generic_func}" | xargs sed -i "/void ${generic_func}(CTR/d" grep -r -l "$define_pattern" | xargs sed -i "/$define_pattern/d" """ Change-Id: I966221d6f9fb9bb4f6068bf45ca2978008a0efed --- M src/bts.h M src/gprs_rlcmac_sched.cpp M src/pdch.cpp M src/tbf_dl.cpp M src/tbf_ul.cpp 5 files changed, 10 insertions(+), 22 deletions(-) Approvals: laforge: Looks good to me, approved neels: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/bts.h b/src/bts.h index 471ac2e..5090f58 100644 --- a/src/bts.h +++ b/src/bts.h @@ -320,12 +320,6 @@ /* * Statistics */ - void rlc_dl_bytes(int bytes); - void rlc_dl_payload_bytes(int bytes); - void rlc_ul_bytes(int bytes); - void rlc_ul_payload_bytes(int bytes); - void llc_dl_bytes(int bytes); - void llc_ul_bytes(int bytes); void ms_present(int32_t n); int32_t ms_present_get(); @@ -336,6 +330,7 @@ struct rate_ctr_group *rate_counters() const; struct osmo_stat_item_group *stat_items() const; void do_rate_ctr_inc(unsigned int ctr_id); + void do_rate_ctr_add(unsigned int ctr_id, int inc); LListHead& ul_tbfs(); LListHead& dl_tbfs(); @@ -409,17 +404,10 @@ rate_ctr_inc(_ratectrs->ctr[ctr_id]); } -#define CREATE_COUNT_ADD_INLINE(func_name, ctr_name) \ - inline void BTS::func_name(int inc) {\ - rate_ctr_add(_ratectrs->ctr[ctr_name], inc); \ - } +inline void BTS::do_rate_ctr_add(unsigned int ctr_id, int inc) { + rate_ctr_add(_ratectrs->ctr[ctr_id], inc); +} -CREATE_COUNT_ADD_INLINE(rlc_dl_bytes, CTR_RLC_DL_BYTES); -CREATE_COUNT_ADD_INLINE(rlc_dl_payload_bytes, CTR_RLC_DL_PAYLOAD_BYTES); -CREATE_COUNT_ADD_INLINE(rlc_ul_bytes, CTR_RLC_UL_BYTES); -CREATE_COUNT_ADD_INLINE(rlc_ul_payload_bytes, CTR_RLC_UL_PAYLOAD_BYTES); -CREATE_COUNT_ADD_INLINE(llc_dl_bytes, CTR_LLC_DL_BYTES); -CREATE_COUNT_ADD_INLINE(llc_ul_bytes, CTR_LLC_UL_BYTES); #define CREATE_STAT_INLINE(func_name, func_name_get, stat_name) \ inline void BTS::func_name(int32_t val) {\ diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 6a53468..3db3365 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -444,7 +444,7 @@ if (!msg) return -ENOMEM; /* msg is now available */ - bts->bts->rlc_dl_bytes(msg->data_len); + bts->bts->do_rate_ctr_add(CTR_RLC_DL_BYTES, msg->data_len); /* set USF */ OSMO_ASSERT(msgb_length(msg) > 0); diff --git a/src/pdch.cpp b/src/pdch.cpp index 202f642..fb02d59 100644 --- a/src/pdch.cpp +++ b/src/pdch.cpp @@ -759,7 +759,7 @@ return -EINVAL; } - bts()->rlc_ul_bytes(len); + bts()->do_rate_ctr_add(CTR_RLC_UL_BYTES, len); LOGP(DRLCMACUL, LOGL_DEBUG, "Got RLC block, coding scheme: %s, " "length: %d (%d))\n", mcs_name(cs), len, cs.usedSizeUL()); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 5197717..dab1e29 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -630,14 +630,14 @@ _llc, _offset, _chunks, data, is_final, _written); if (payload_written > 0) - bts->rlc_dl_payload_bytes(payload_written); + bts->do_rate_ctr_add(CTR_RLC_DL_PAYLOAD_BYTES, payload_written); if (ar == Encoding::AR_NEED_MORE_BLOCKS) break; LOGPTBFDL(this, LOGL_DEBUG, "Complete DL frame, len=%d\n", m_llc.frame_length()); gprs_rlcmac_dl_bw(this, m_llc.frame_length()); - bts->llc_dl_bytes(m_llc.frame_length()); + bts->do_rate_ctr_add(CTR_LLC_DL_BYTES, m_llc.frame_length()); m_llc.reset(); if (is_final) { diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index
Change in osmo-pcu[master]: Drop unneeded arg 'ta' in tbf_alloc_ul()
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/18224 ) Change subject: Drop unneeded arg 'ta' in tbf_alloc_ul() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/18224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iebb9c57f458690e045ddc45c800209ad8cf621e0 Gerrit-Change-Number: 18224 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-CC: neels Gerrit-Comment-Date: Thu, 14 May 2020 11:16:58 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: Implement ITU-T I.460 multiplex / demultiplex
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18247 ) Change subject: Implement ITU-T I.460 multiplex / demultiplex .. Patch Set 5: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/18247/5/src/gsm/i460_mux.c File src/gsm/i460_mux.c: https://gerrit.osmocom.org/c/libosmocore/+/18247/5/src/gsm/i460_mux.c@208 PS5, Line 208: static uint8_t mux_timeslot_provide_bits(struct osmo_i460_timeslot *ts) According to the specs, any bits that's not used by a subchannel should be set to 1. This doesn't do that AFAICT. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id522f06e73b77332b437b7a27e4966872da70eda Gerrit-Change-Number: 18247 Gerrit-PatchSet: 5 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: tnt Gerrit-Comment-Date: Thu, 14 May 2020 11:05:57 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in libosmocore[master]: codec: Add functions for AMR s->d bits and d->s bits
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18246 ) Change subject: codec: Add functions for AMR s->d bits and d->s bits .. Patch Set 2: (3 comments) https://gerrit.osmocom.org/c/libosmocore/+/18246/2/src/codec/gsm690.c File src/codec/gsm690.c: https://gerrit.osmocom.org/c/libosmocore/+/18246/2/src/codec/gsm690.c@4 PS2, Line 4: * (C) 2010 Sylvain Munaut wtf ... 10 years ago ... damn. https://gerrit.osmocom.org/c/libosmocore/+/18246/2/src/codec/gsm690.c@278 PS2, Line 278: if (n_bits >= tbl->len) Should be > and not >= https://gerrit.osmocom.org/c/libosmocore/+/18246/2/src/codec/gsm690.c@304 PS2, Line 304: if (n_bits >= tbl->len) Same as above -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 Gerrit-Change-Number: 18246 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-CC: tnt Gerrit-Comment-Date: Thu, 14 May 2020 10:46:54 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in libosmocore[master]: codec: Add functions for AMR s->d bits and d->s bits
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/18246 to look at the new patch set (#2). Change subject: codec: Add functions for AMR s->d bits and d->s bits .. codec: Add functions for AMR s->d bits and d->s bits These functions implement re-ordering of bits as per TS 06.90 / 26.101 based on the already existing tables we've had in libosmocoding. Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 --- M include/osmocom/codec/codec.h M src/codec/Makefile.am M src/codec/gsm690.c 3 files changed, 101 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/46/18246/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18246 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 Gerrit-Change-Number: 18246 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in libosmocore[master]: Implement ITU-T I.460 multiplex / demultiplex
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/18247 to look at the new patch set (#4). Change subject: Implement ITU-T I.460 multiplex / demultiplex .. Implement ITU-T I.460 multiplex / demultiplex This implements a multiplexer and de-multiplexer for the ITU-T I.460 standard. The latter covers the transmission of sub-slots of 32/16/8k inside 64k timeslots. Change-Id: Id522f06e73b77332b437b7a27e4966872da70eda --- M include/Makefile.am A include/osmocom/gsm/i460_mux.h M src/gsm/Makefile.am A src/gsm/i460_mux.c M src/gsm/libosmogsm.map M tests/Makefile.am A tests/i460_mux/i460_mux_test.c A tests/i460_mux/i460_mux_test.ok M tests/testsuite.at 9 files changed, 898 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/47/18247/4 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id522f06e73b77332b437b7a27e4966872da70eda Gerrit-Change-Number: 18247 Gerrit-PatchSet: 4 Gerrit-Owner: laforge Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
Change in libosmocore[master]: Implement ITU-T I.460 multiplex / demultiplex
laforge has uploaded a new patch set (#3). ( https://gerrit.osmocom.org/c/libosmocore/+/18247 ) Change subject: Implement ITU-T I.460 multiplex / demultiplex .. Implement ITU-T I.460 multiplex / demultiplex This implements a multiplexer and de-multiplexer for the ITU-T I.460 standard. The latter covers the transmission of sub-slots of 32/16/8k inside 64k timeslots. Change-Id: Id522f06e73b77332b437b7a27e4966872da70eda --- M include/Makefile.am A include/osmocom/gsm/i460_mux.h M src/gsm/Makefile.am M src/gsm/libosmogsm.map M tests/Makefile.am A tests/i460_mux/i460_mux_test.c A tests/i460_mux/i460_mux_test.ok M tests/testsuite.at 8 files changed, 568 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/47/18247/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id522f06e73b77332b437b7a27e4966872da70eda Gerrit-Change-Number: 18247 Gerrit-PatchSet: 3 Gerrit-Owner: laforge Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
Change in libosmocore[master]: Implement ITU-T I.460 multiplex / demultiplex
laforge has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/libosmocore/+/18247 ) Change subject: Implement ITU-T I.460 multiplex / demultiplex .. Implement ITU-T I.460 multiplex / demultiplex This implements a multiplexer and de-multiplexer for the ITU-T I.460 standard. The latter covers the transmission of sub-slots of 32/16/8k inside 64k timeslots. Change-Id: Id522f06e73b77332b437b7a27e4966872da70eda --- M include/Makefile.am A include/osmocom/gsm/i460_mux.h M src/gsm/Makefile.am M src/gsm/libosmogsm.map M tests/Makefile.am A tests/i460_mux/i460_mux_test.c A tests/i460_mux/i460_mux_test.ok M tests/testsuite.at 8 files changed, 568 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/47/18247/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18247 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id522f06e73b77332b437b7a27e4966872da70eda Gerrit-Change-Number: 18247 Gerrit-PatchSet: 2 Gerrit-Owner: laforge Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
Change in libosmocore[master]: Implement ITU-T I.460 multiplex / demultiplex
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18247 ) Change subject: Implement ITU-T I.460 multiplex / demultiplex .. Implement ITU-T I.460 multiplex / demultiplex This implements a multiplexer and de-multiplexer for the ITU-T I.460 standard. The latter covers the transmission of sub-slots of 32/16/8k inside 64k timeslots. Change-Id: Id522f06e73b77332b437b7a27e4966872da70eda --- M include/Makefile.am A include/osmocom/gsm/i460_mux.h M src/gsm/Makefile.am M src/gsm/libosmogsm.map 4 files changed, 88 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/47/18247/1 diff --git a/include/Makefile.am b/include/Makefile.am index 572c880..456b8ef 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -103,6 +103,7 @@ osmocom/gsm/gsm_utils.h \ osmocom/gsm/gsup.h \ osmocom/gsm/gsup_sms.h \ + osmocom/gsm/i460_mux.h \ osmocom/gsm/ipa.h \ osmocom/gsm/lapd_core.h \ osmocom/gsm/lapdm.h \ diff --git a/include/osmocom/gsm/i460_mux.h b/include/osmocom/gsm/i460_mux.h new file mode 100644 index 000..759e392 --- /dev/null +++ b/include/osmocom/gsm/i460_mux.h @@ -0,0 +1,79 @@ +#pragma once +#include +#include +#include +#include + +/* I.460 sub-slot rate */ +enum osmo_i460_rate { + OSMO_I460_RATE_NONE,/* disabled */ + OSMO_I460_RATE_64k, + OSMO_I460_RATE_32k, + OSMO_I460_RATE_16k, + OSMO_I460_RATE_8k, +}; + +typedef void (*out_cb_bits_t)(void *user_data, const ubit_t *bits, unsigned int num_bits); +typedef void (*out_cb_bytes_t)(void *user_data, const uint8_t *bytes, unsigned int num_bytes); + +struct osmo_i460_subchan_demux { + /*! bit-buffer for output bits */ + uint8_t *out_bitbuf; + /*! size of out_bitbuf in bytes */ + unsigned int out_bitbuf_size; + /*! offset of next bit to be written in out_bitbuf */ + unsigned int out_idx; + /*! callback to be called once we have received out_bitbuf_size bits */ + out_cb_bits_t out_cb_bits; + out_cb_bytes_t out_cb_bytes; + void *user_data; +}; + +struct osmo_i460_subchan_mux { + /*! list of to-be-transmitted message buffers */ + struct llist_head tx_queue; +}; + +struct osmo_i460_subchan { + enum osmo_i460_rate rate; /* 8/16/32/64k */ + uint8_t bit_offset; /* bit offset inside each byte of the B-channel */ + struct osmo_i460_subchan_demux demux; + struct osmo_i460_subchan_mux mux; +}; + +struct osmo_i460_timeslot { + struct osmo_i460_subchan schan[8]; +}; + +/*! description of a sub-channel; passed by caller */ +struct osmo_i460_schan_desc { + enum osmo_i460_rate rate; + uint8_t bit_offset; + struct { + /* size (in bits) of the internal buffer; determines granularity */ + size_t num_bits; + /*! call-back function called whenever we received num_bits */ + out_cb_bits_t out_cb_bits; + /*! out_cb_bytes call-back function called whenever we received num_bits. +* The user is usually expected to provide either out_cb_bits or out_cb_bytes. If only +* out_cb_bits is provided, output data will always be provided as unpacked bits; if only +* out_cb_bytes is provided, output data will always be provided as packet bits (bytes). If +* both are provided, it is up to the I.460 multiplex to decide if it calls either of the two, +* depending on what can be provided without extra conversion. */ + out_cb_bytes_t out_cb_bytes; + /* opaque user data pointer to pass to out_cb */ + void *user_data; + } demux; +}; + +void osmo_i460_demux_in(struct osmo_i460_timeslot *ts, const uint8_t *data, size_t data_len); + +void osmo_i460_mux_enqueue(struct osmo_i460_subchan *schan, struct msgb *msg); +int osmo_i460_mux_out(struct osmo_i460_timeslot *ts, uint8_t *out, size_t out_len); + +void osmo_i460_ts_init(struct osmo_i460_timeslot *ts); + +struct osmo_i460_subchan * +osmo_i460_subchan_add(void *ctx, struct osmo_i460_timeslot *ts, const struct osmo_i460_schan_desc *chd); + +void osmo_i460_subchan_del(struct osmo_i460_subchan *schan); diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am index 6935eab..eeb1164 100644 --- a/src/gsm/Makefile.am +++ b/src/gsm/Makefile.am @@ -32,7 +32,7 @@ milenage/milenage.c gan.c ipa.c gsm0341.c apn.c \ gsup.c gsup_sms.c gprs_gea.c gsm0503_conv.c oap.c gsm0808_utils.c \ gsm23003.c mncc.c bts_features.c oap_client.c \ - gsm29118.c gsm48_rest_octets.c cbsp.c
Change in libosmocore[master]: codec: Add functions for AMR s->d bits and d->s bits
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/18246 ) Change subject: codec: Add functions for AMR s->d bits and d->s bits .. codec: Add functions for AMR s->d bits and d->s bits These functions implement re-ordering of bits as per TS 06.90 / 26.101 based on the already existing tables we've had in libosmocoding. Change-Id: Ia4ac2aea2e96f9185f082a07ca64dfc5276efb46 --- M include/osmocom/codec/codec.h M src/codec/gsm690.c 2 files changed, 100 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/46/18246/1 diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index 6a1bf9f..cceedc5 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -6,6 +6,7 @@ #include #include +#include /* TS 101318 Chapter 5.1: 260 bits + 4bit sig */ #define GSM_FR_BYTES 33 @@ -51,6 +52,9 @@ AMR_GOOD = 1 }; +int osmo_amr_s_to_d(ubit_t *out, const ubit_t *in, uint16_t n_bits, enum osmo_amr_type amr_mode); +int osmo_amr_d_to_s(ubit_t *out, const ubit_t *in, uint16_t n_bits, enum osmo_amr_type amr_mode); + /*! Check if given AMR Frame Type is a speech frame * \param[in] ft AMR Frame Type * \returns true if AMR with given Frame Type contains voice, false otherwise diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index 8ab1df1..c01bd5f 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -2,6 +2,7 @@ * GSM 06.90 - GSM AMR Codec. */ /* * (C) 2010 Sylvain Munaut + * (C) 2020 Harald Welte * * All Rights Reserved * @@ -29,6 +30,7 @@ #include #include +#include #include /* * These table map between the raw encoder parameter output and @@ -216,6 +218,100 @@ 92, 31, 52, 65, 86, }; +struct ts26101_reorder_table { + /*! Table as per TS 26.101 Annex B to compute d-bits from s-bits */ + const uint16_t *s_to_d; + /*! size of table */ + uint8_t len; +}; + +static const struct ts26101_reorder_table ts26101_reorder_tables[8] = { + [AMR_4_75] = { + .s_to_d = gsm690_4_75_bitorder, + .len = ARRAY_SIZE(gsm690_4_75_bitorder), + }, + [AMR_5_15] = { + .s_to_d = gsm690_5_15_bitorder, + .len = ARRAY_SIZE(gsm690_5_15_bitorder), + }, + [AMR_5_90] = { + .s_to_d = gsm690_5_9_bitorder, + .len = ARRAY_SIZE(gsm690_5_9_bitorder), + }, + [AMR_6_70] = { + .s_to_d = gsm690_6_7_bitorder, + .len = ARRAY_SIZE(gsm690_6_7_bitorder), + }, + [AMR_7_40] = { + .s_to_d = gsm690_7_4_bitorder, + .len = ARRAY_SIZE(gsm690_7_4_bitorder), + }, + [AMR_7_95] = { + .s_to_d = gsm690_7_95_bitorder, + .len = ARRAY_SIZE(gsm690_7_95_bitorder), + }, + [AMR_10_2] = { + .s_to_d = gsm690_10_2_bitorder, + .len = ARRAY_SIZE(gsm690_10_2_bitorder), + }, + [AMR_12_2] = { + .s_to_d = gsm690_12_2_bitorder, + .len = ARRAY_SIZE(gsm690_12_2_bitorder), + }, +}; + +/*! Convert from S-bits (codec output) to d-bits. + * \param[out] out user-provided output buffer for generated unpacked d-bits + * \param[in] in input buffer for unpacked s-bits + * \param[in] n_bits number of bits (in both in and out) + * \param[in] AMR mode (0..7) */ +int osmo_amr_s_to_d(ubit_t *out, const ubit_t *in, uint16_t n_bits, enum osmo_amr_type amr_mode) +{ + const struct ts26101_reorder_table *tbl; + int i; + + if (amr_mode >= ARRAY_SIZE(ts26101_reorder_tables)) + return -ENODEV; + + tbl = _reorder_tables[amr_mode]; + + if (n_bits >= tbl->len) + return -EINVAL; + + for (i = 0; i < n_bits; i++) { + uint16_t n = tbl->s_to_d[i]; + out[i] = in[n]; + } + + return n_bits; +} + +/*! Convert from d-bits to s-bits (codec input). + * \param[out] out user-provided output buffer for generated unpacked s-bits + * \param[in] in input buffer for unpacked d-bits + * \param[in] n_bits number of bits (in both in and out) + * \param[in] AMR mode (0..7) */ +int osmo_amr_d_to_s(ubit_t *out, const ubit_t *in, uint16_t n_bits, enum osmo_amr_type amr_mode) +{ + const struct ts26101_reorder_table *tbl; + int i; + + if (amr_mode >= ARRAY_SIZE(ts26101_reorder_tables)) + return -ENODEV; + + tbl = _reorder_tables[amr_mode]; + + if (n_bits >= tbl->len) + return -EINVAL; + + for (i = 0; i < n_bits; i++) { + uint16_t n = tbl->s_to_d[i]; + out[n] = in[i]; + } + + return n_bits; +} + /* See also RFC 4867 §3.6, Table 1, Column "Total speech bits" */ static const uint8_t amr_len_by_ft[16] = { 12, 13, 15, 17, 19, 20, 26, 31,
Change in libosmocore[master]: libosmogsm: cosmetic: add spaces before and after PRIu32
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18243 ) Change subject: libosmogsm: cosmetic: add spaces before and after PRIu32 .. libosmogsm: cosmetic: add spaces before and after PRIu32 As was pointed out by pespin, some compilers may not like the lack of spaces around the format macro constants. Change-Id: I4b6517989030c8e3f6a1bf16c43044e4e9137f40 --- M src/gsm/gsm0502.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved tnt: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gsm/gsm0502.c b/src/gsm/gsm0502.c index 1a71e61..5c5aa12 100644 --- a/src/gsm/gsm0502.c +++ b/src/gsm/gsm0502.c @@ -193,7 +193,7 @@ } if (sub == -1) { - LOGP(DLGLOBAL, LOGL_ERROR, "could not remap frame number!, fn=%"PRIu32"\n", fn); + LOGP(DLGLOBAL, LOGL_ERROR, "could not remap frame number!, fn=%" PRIu32 "\n", fn); return fn; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4b6517989030c8e3f6a1bf16c43044e4e9137f40 Gerrit-Change-Number: 18243 Gerrit-PatchSet: 4 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-MessageType: merged
Change in osmo-ttcn3-hacks[master]: pcu: use correct RA type to properly test 2phase access
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 ) Change subject: pcu: use correct RA type to properly test 2phase access .. Patch Set 2: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239/2/library/RLCMAC_Templates.ttcn File library/RLCMAC_Templates.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239/2/library/RLCMAC_Templates.ttcn@439 PS2, Line 439: tr_RLCMAC_UL_PACKET_ASS > You could do it without code duplication by extending (inheriting) this > template using 'extends' key […] 'extends' is used for components; 'modifies' for teplates. Apart from that formality, I agree with fixeria. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 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: If636a4898dfa175fdbd6baf04f7f2c955a9c525d Gerrit-Change-Number: 18239 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Comment-Date: Thu, 14 May 2020 09:11:31 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria Gerrit-MessageType: comment
Change in libosmocore[master]: libosmogsm: cosmetic: add spaces before and after PRIu32
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18243 ) Change subject: libosmogsm: cosmetic: add spaces before and after PRIu32 .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4b6517989030c8e3f6a1bf16c43044e4e9137f40 Gerrit-Change-Number: 18243 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-Comment-Date: Thu, 14 May 2020 09:11:51 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: pcu: use correct RA type to properly test 2phase access
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 ) Change subject: pcu: use correct RA type to properly test 2phase access .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18239 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: If636a4898dfa175fdbd6baf04f7f2c955a9c525d Gerrit-Change-Number: 18239 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-CC: fixeria Gerrit-Comment-Date: Thu, 14 May 2020 09:10:49 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a depr...
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18242 ) Change subject: gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a deprecation notice. .. gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a deprecation notice. In Change-Id Idf2b99e9ef014eba26e3d4f0f38c2714d3a0520a we accidentially removed this symbol, let's re-introduce it. Change-Id: I9fbcbcc6619ef0c63d3682fc86adc80045baab02 --- M include/osmocom/gsm/gsm0808_utils.h M src/gsm/gsm0808_utils.c 2 files changed, 8 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h index a8852e4..59db6ed 100644 --- a/include/osmocom/gsm/gsm0808_utils.h +++ b/include/osmocom/gsm/gsm0808_utils.h @@ -155,6 +155,9 @@ return (cause & 0x80) && !(cause & 0x0F); } +int gsm0808_get_cipher_reject_cause(const struct tlv_parsed *tp) +OSMO_DEPRECATED("Use gsm0808_get_cause() instead"); + /*! \returns 3GPP TS 48.008 3.2.2.49 Current Channel Type 1 from enum gsm_chan_t. */ static inline uint8_t gsm0808_current_channel_type_1(enum gsm_chan_t type) { diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 6f3c07a..6bf771f 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -1563,6 +1563,11 @@ return 0; } +int gsm0808_get_cipher_reject_cause(const struct tlv_parsed *tp) +{ + return gsm0808_get_cause(tp); +} + /*! Print a human readable name of the cell identifier to the char buffer. * This is useful both for struct gsm0808_cell_id and struct gsm0808_cell_id_list2. * See also gsm0808_cell_id_name() and gsm0808_cell_id_list_name(). -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9fbcbcc6619ef0c63d3682fc86adc80045baab02 Gerrit-Change-Number: 18242 Gerrit-PatchSet: 4 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: merged
Change in libosmocore[master]: gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a depr...
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18242 ) Change subject: gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a deprecation notice. .. Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9fbcbcc6619ef0c63d3682fc86adc80045baab02 Gerrit-Change-Number: 18242 Gerrit-PatchSet: 3 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-Comment-Date: Thu, 14 May 2020 09:01:54 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a depr...
laforge has uploaded a new patch set (#3) to the change originally created by ipse. ( https://gerrit.osmocom.org/c/libosmocore/+/18242 ) Change subject: gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a deprecation notice. .. gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a deprecation notice. In Change-Id Idf2b99e9ef014eba26e3d4f0f38c2714d3a0520a we accidentially removed this symbol, let's re-introduce it. Change-Id: I9fbcbcc6619ef0c63d3682fc86adc80045baab02 --- M include/osmocom/gsm/gsm0808_utils.h M src/gsm/gsm0808_utils.c 2 files changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/42/18242/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9fbcbcc6619ef0c63d3682fc86adc80045baab02 Gerrit-Change-Number: 18242 Gerrit-PatchSet: 3 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: pespin Gerrit-MessageType: newpatchset
Change in libosmocore[master]: gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a depr...
laforge has removed a vote from this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18242 ) Change subject: gsm0808_utils: Add gsm0808_get_cipher_reject_cause() back with a deprecation notice. .. Removed Code-Review-2 by pespin -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18242 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I9fbcbcc6619ef0c63d3682fc86adc80045baab02 Gerrit-Change-Number: 18242 Gerrit-PatchSet: 3 Gerrit-Owner: ipse Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: ipse Gerrit-Reviewer: laforge Gerrit-Reviewer: pespin Gerrit-MessageType: deleteVote
Change in libosmocore[master]: libosmogsm: add Doxygen docs for gsm0502_hop_seq_gen()
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18245 ) Change subject: libosmogsm: add Doxygen docs for gsm0502_hop_seq_gen() .. Patch Set 3: (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/18245/3/src/gsm/gsm0502.c File src/gsm/gsm0502.c: https://gerrit.osmocom.org/c/libosmocore/+/18245/3/src/gsm/gsm0502.c@228 PS3, Line 228: * \param[in] ma array of ARFCN representing the Mobile Allocation. > I'd maybe just add array need to be sorted by ascending ARFCN IIRC. ACK. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ife660f00d7a6d3b874ab2e59e34dca2109fa82d8 Gerrit-Change-Number: 18245 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-Comment-Date: Thu, 14 May 2020 06:48:48 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: tnt Gerrit-MessageType: comment
Change in libosmocore[master]: libosmogsm: cosmetic: add spaces before and after PRIu32
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18243 ) Change subject: libosmogsm: cosmetic: add spaces before and after PRIu32 .. Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18243 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4b6517989030c8e3f6a1bf16c43044e4e9137f40 Gerrit-Change-Number: 18243 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: tnt Gerrit-Comment-Date: Thu, 14 May 2020 06:48:31 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in libosmocore[master]: libosmogsm: add Doxygen docs for gsm0502_hop_seq_gen()
tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/18245 ) Change subject: libosmogsm: add Doxygen docs for gsm0502_hop_seq_gen() .. Patch Set 3: Code-Review+1 (1 comment) https://gerrit.osmocom.org/c/libosmocore/+/18245/3/src/gsm/gsm0502.c File src/gsm/gsm0502.c: https://gerrit.osmocom.org/c/libosmocore/+/18245/3/src/gsm/gsm0502.c@228 PS3, Line 228: * \param[in] ma array of ARFCN representing the Mobile Allocation. I'd maybe just add array need to be sorted by ascending ARFCN IIRC. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18245 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ife660f00d7a6d3b874ab2e59e34dca2109fa82d8 Gerrit-Change-Number: 18245 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Reviewer: tnt Gerrit-Comment-Date: Thu, 14 May 2020 06:47:04 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment