Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/27429 )
Change subject: osmo-bts-trx: do not run osmo_{fr,hr}_check_sid() on FACCH/U frames
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-bts/+/27429/comment/7555719d_8e6c9338
PS1, Line 8:
Please explain better the patch here, why and so on.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/27429
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2f8137993acfe8a8add3fc2af276e5eb4da1605e
Gerrit-Change-Number: 27429
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 12:32:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: neels.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27428 )
Change subject: sgsn: add TC_iu_attach_encr with UEA > 0
......................................................................
Patch Set 2:
(3 comments)
File sgsn/SGSN_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27428/comment/31a802b2_1283…
PS1, Line 691: mm
> It should be '_gmm_' in the context of GPRS.
Done
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27428/comment/19ce2e56_1c49…
PS1, Line 691: private function f_mm_ciph_utran() runs on BSSGP_ConnHdlr
> This looks more like an altstep to me rather than a function. […]
Done
File sgsn/SGSN_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27428/comment/60281843_e215…
PS2, Line 785: alt
No need for an alt statement. As I said, you can just call it as a normal function.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27428
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: I1a7c3b156830058c43f15f55883ea301d2d01d5f
Gerrit-Change-Number: 27428
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 12:07:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/27430 )
Change subject: osmo-bts-trx: rx_tchh_fn(): fix HR SID detection (wrong offset)
......................................................................
Patch Set 1: Verified+1
(1 comment)
Patchset:
PS1:
FYI: I added some debug prints, and made a test call. Without this patch osmo_hr_check_sid() does not detect SID frames at all. With this patch it works as expected.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/27430
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ie5fa776dcb2b2203a97aed56ecbf2450af7d87c1
Gerrit-Change-Number: 27430
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Mar 2022 12:03:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27431 )
Change subject: libosmocodec: osmo_hr_check_sid(): simplify the logic
......................................................................
libosmocodec: osmo_hr_check_sid(): simplify the logic
According to TS 101 318, section 5.2.2, a SID frame is identified
by a SID codeword consisting of 79 bits (r34..r112) which are all 1.
Given that there are no gaps in the codeword, we don't really need
to use bitvec_get_bit_pos() and check each field individually.
This brings additional complexity and negatively affects performance.
Instead, let's use bitvec_get_bit_pos() to check all bits in a row.
Change-Id: I678f8ff92317fe87f1aca511a3a062ad898e55cc
Related: SYS#5853
---
M src/codec/gsm620.c
1 file changed, 8 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/31/27431/1
diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c
index cf7cfd7..4eae514 100644
--- a/src/codec/gsm620.c
+++ b/src/codec/gsm620.c
@@ -264,12 +264,6 @@
81, /* Code 3:7 */
};
-static inline uint16_t mask(const uint8_t msb)
-{
- const uint16_t m = (uint16_t)1 << (msb - 1);
- return (m - 1) ^ m;
-}
-
/*! Check whether RTP frame contains HR SID code word according to
* TS 101 318 §5.2.2
* \param[in] rtp_payload Buffer with RTP payload
@@ -278,15 +272,15 @@
*/
bool osmo_hr_check_sid(const uint8_t *rtp_payload, size_t payload_len)
{
- uint8_t i, bits[] = { 1, 2, 8, 9, 5, 4, 9, 5, 4, 9, 5, 4, 9, 5 };
- struct bitvec bv;
- bv.data = (uint8_t *) rtp_payload;
- bv.data_len = payload_len;
- bv.cur_bit = 33;
+ struct bitvec bv = {
+ .data = (uint8_t *)rtp_payload,
+ .data_len = payload_len,
+ };
- /* code word is all 1 at given bits, numbered from 1, MODE is always 3 */
- for (i = 0; i < ARRAY_SIZE(bits); i++)
- if (bitvec_get_uint(&bv, bits[i]) != mask(bits[i]))
+ /* A SID frame is identified by a SID codeword consisting of 79 bits which are all 1,
+ * so we basically check if all bits in range r34..r112 (inclusive) are 1. */
+ for (bv.cur_bit = 33; bv.cur_bit < bv.data_len * 8; bv.cur_bit++)
+ if (bitvec_get_bit_pos(&bv, bv.cur_bit) != ONE)
return false;
return true;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27431
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I678f8ff92317fe87f1aca511a3a062ad898e55cc
Gerrit-Change-Number: 27431
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: neels.
Hello osmith, Jenkins Builder, laforge, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27428
to look at the new patch set (#2).
Change subject: sgsn: add TC_iu_attach_encr with UEA > 0
......................................................................
sgsn: add TC_iu_attach_encr with UEA > 0
Test new osmo-sgsn Iu attach with UEA (encryption) enabled
Related: SYS#5516
Depends: I27e8e0078c45426bf227bb44aac82a4875d18d0f (osmo-sgsn)
Change-Id: I1a7c3b156830058c43f15f55883ea301d2d01d5f
---
M sgsn/SGSN_Tests.ttcn
M sgsn/SGSN_Tests_Iu.ttcn
2 files changed, 58 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/28/27428/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27428
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: I1a7c3b156830058c43f15f55883ea301d2d01d5f
Gerrit-Change-Number: 27428
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/27425 )
Change subject: osmo_time_cc: rate_ctr presence should not affect counting
......................................................................
osmo_time_cc: rate_ctr presence should not affect counting
Make sure that osmo_time_cc counts exactly the same, regardless of a
rate_ctr being present or not. Only skip sending counter increments when
there is no rate counter, do not affect anything else.
In osmo-bsc, we are discussing a patch where an lchan redirects
osmo_time_cc counter increments to different rate counters depending on
its current type. In my comments I am also claiming that osmo_time_cc
works the same regardless of a rate_ctr being present or not. Looking at
the code, this is not actually the case.
Before this patch, when there is no rate_ctr, the reported_sum would
freeze, and as soon as a rate_ctr shows up, all counter increments from
the previous reported_sum would be sent to the newly set rate_ctr.
Instead, we want counter increments to simply be lost while there is no
rate_ctr set. IOW, rate_ctr == NULL should mean >/dev/null.
Related: I1b0670c47cb5e0b7776eda89d1e71545ba0e3347 (osmo-bsc)
Change-Id: I380b28d7ab0a6c8aab6c7e2a64bc73cab14863d2
---
M src/time_cc.c
1 file changed, 3 insertions(+), 4 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
neels: Looks good to me, approved
diff --git a/src/time_cc.c b/src/time_cc.c
index ae99b58..05971fe 100644
--- a/src/time_cc.c
+++ b/src/time_cc.c
@@ -120,8 +120,6 @@
{
uint64_t delta;
uint64_t n;
- if (!tc->cfg.rate_ctr)
- return;
/* We report a sum "rounded up", ahead of time. If the granularity period has not yet elapsed after the last
* reporting, do not report again yet. */
if (tc->reported_sum > tc->sum)
@@ -139,7 +137,8 @@
/* integer sanity, since rate_ctr_add() takes an int argument. */
if (n > INT_MAX)
n = INT_MAX;
- rate_ctr_add(tc->cfg.rate_ctr, n);
+ if (tc->cfg.rate_ctr)
+ rate_ctr_add(tc->cfg.rate_ctr, n);
/* Store the increments of gran_usec that were counted. */
tc->reported_sum += n * GRAN_USEC(tc);
}
@@ -205,7 +204,7 @@
next_event = OSMO_MIN(next_event, next_forget_time);
}
/* Next rate_ctr increment? */
- if (tc->flag_state && tc->cfg.rate_ctr) {
+ if (tc->flag_state) {
uint64_t next_inc = now + (tc->reported_sum - tc->sum) + ROUND_THRESHOLD_USEC(tc);
next_event = OSMO_MIN(next_event, next_inc);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27425
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I380b28d7ab0a6c8aab6c7e2a64bc73cab14863d2
Gerrit-Change-Number: 27425
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged