laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/dahdi-linux/+/27492 )
Change subject: icE1usb: avoid system hang if USB transfer submission fails
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/27492
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ie6f7f11a64fae0d8c2b7c8ae90df886f2eb8f0c2
Gerrit-Change-Number: 27492
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-Comment-Date: Sat, 12 Mar 2022 13:06:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: laforge.
manawyrm has posted comments on this change. ( https://gerrit.osmocom.org/c/dahdi-linux/+/27492 )
Change subject: icE1usb: avoid system hang if USB transfer submission fails
......................................................................
Patch Set 1: Verified+1 Code-Review+1
(1 comment)
Patchset:
PS1:
Yep, tested on the T430, less crashing, nice.
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/27492
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: Ie6f7f11a64fae0d8c2b7c8ae90df886f2eb8f0c2
Gerrit-Change-Number: 27492
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: manawyrm <osmocom.account(a)tbspace.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Sat, 12 Mar 2022 12:12:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
fixeria has submitted this change. ( 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(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/27491 )
Change subject: Cosmetic: linuxlist.h: fix misleading comment
......................................................................
Cosmetic: linuxlist.h: fix misleading comment
Whenever iterating over a list and removing entries,
llist_for_each_entry_safe must be used instead of llist_for_each_entry.
The comment with "non-consecutive(!)" entries sounds like this is not
needed as long as one is iterating over the list consecutively. I guess
that might have worked with prefetch logic, however the prefetch
function is just a stub in linuxlist.h. (Also prefetch has been removed
from list.h in linux.git e66eed651fd18a961f11cda62f3b5286c8cc4f9f.)
Change-Id: I217e6871afe121edba26e4c6fd1a461e397c9e72
---
M include/osmocom/core/linuxlist.h
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/91/27491/1
diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h
index 725c60c..2fc3fa7 100644
--- a/include/osmocom/core/linuxlist.h
+++ b/include/osmocom/core/linuxlist.h
@@ -328,8 +328,7 @@
pos = llist_entry(pos->member.next, typeof(*pos), member), \
prefetch(pos->member.next))
-/*! Iterate over llist of given type, safe against removal of
- * non-consecutive(!) llist entries.
+/*! Iterate over llist of given type, safe against removal of llist entry.
* \param pos the 'type *' to use as a loop counter.
* \param n another 'type *' to use as temporary storage.
* \param head the head of the list over which to iterate.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/27491
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I217e6871afe121edba26e4c6fd1a461e397c9e72
Gerrit-Change-Number: 27491
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27489 )
Change subject: BTS_Tests: fix expectations in TC_sacch_chan_act_ho_{sync,async}
......................................................................
BTS_Tests: fix expectations in TC_sacch_chan_act_ho_{sync,async}
According to 3GPP TS 48.058:
* 4.1.3 async handover: "If the MS Power IE is present the BTS
*may* start transmission also on the SACCH".
* 4.1.4 sync handover: "If only the MS Power IE is present the BTS
*may* start transmission also on the SACCH".
"May" does not mean "shall", so osmo-bts does not.
Change-Id: I5e97944e56b7860f2d912cd8d3c978a0f1e08645
Related: SYS#5838, OS#4008, OS#4009
---
M bts/BTS_Tests.ttcn
1 file changed, 13 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/27489/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 5741458..7f2faff 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1074,7 +1074,9 @@
}
/* verify that given SACCH payload is present */
-private function f_sacch_present(template octetstring l3_exp) runs on ConnHdlr {
+private function f_sacch_present(template octetstring l3_exp,
+ boolean do_fail := true)
+runs on ConnHdlr {
var L1ctlDlMessage dl;
timer T_sacch := 3.0;
L1CTL.clear;
@@ -1089,7 +1091,10 @@
}
}
[] L1CTL.receive { repeat; }
- [] T_sacch.timeout {
+ [not do_fail] T_sacch.timeout {
+ log("Timeout waiting for SACCH ", l3_exp);
+ }
+ [do_fail] T_sacch.timeout {
setverdict(fail, "Timeout waiting for SACCH ", l3_exp);
Misc_Helpers.f_shutdown(__BFILE__, __LINE__);
}
@@ -1384,8 +1389,9 @@
/* enable dedicated mode */
f_l1ctl_est_dchan(L1CTL, g_pars);
- /* Verify that DL SACCH is being received */
- f_sacch_present(si5);
+ /* 4.1.3 "If the MS Power IE is present the BTS *may* start transmission
+ * also on the SACCH". "May" does not mean "shall", so osmo-bts does not. */
+ f_sacch_present(si5, do_fail := false);
/* Send handover Access Burst and expect SACCH to remain present */
f_L1CTL_RACH(L1CTL, ho_ref, chan_nr := g_pars.chan_nr);
@@ -1460,8 +1466,9 @@
/* enable dedicated mode */
f_l1ctl_est_dchan(L1CTL, g_pars);
- /* Verify that DL SACCH is being received, because MS Power IE was sent */
- f_sacch_present(si5);
+ /* 4.1.4 "If only the MS Power IE is present the BTS *may* start transmission
+ * also on the SACCH". "May" does not mean "shall", so osmo-bts does not. */
+ f_sacch_present(si5, do_fail := false);
/* Send handover Access Burst and expect SACCH to remain present */
f_L1CTL_RACH(L1CTL, ho_ref, chan_nr := g_pars.chan_nr);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27489
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: I5e97944e56b7860f2d912cd8d3c978a0f1e08645
Gerrit-Change-Number: 27489
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27490 )
Change subject: BTS_Tests: exec TC_sacch_chan_act_ho_{sync,async} on g_AllChanTypes[]
......................................................................
BTS_Tests: exec TC_sacch_chan_act_ho_{sync,async} on g_AllChanTypes[]
Currently we execute both test cases on *all* available dedicated
channels from g_AllChannels[]. Given that SACCH is slow, and in
some cases we intentionally wait for a timeout of 3.0 seconds to
expire, the overall execution time is quite long. We have a risk
of the test execution being aborted due to the guard timeout.
I agree that using g_AllChannels[] makes sense for TC_ho_rach, which
tests handover RACH detection. There we want to be sure that detection
works on all slots of all DCCH types (especially when running a setup
with real MS/BTS hardware).
But for both TC_sacch_chan_act_ho_{sync,async} it's enough to run
on different channel types (see g_AllChanTypes[]), because what
we actually want to test is the Downlink SACCH operation.
Change-Id: Ic1937edd72ff842cb619e153d0f6a624ceb95281
Related: SYS#5838, OS#4008, OS#4009
---
M bts/BTS_Tests.ttcn
1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/27490/1
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index 7f2faff..3c5dbf0 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -1406,9 +1406,9 @@
var ConnHdlrPars pars;
f_init();
- for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) {
- pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN));
- log(testcasename(), ": Starting for ", g_AllChannels[i]);
+ for (var integer i := 0; i < sizeof(g_AllChanTypes); i := i+1) {
+ pars := valueof(t_Pars(g_AllChanTypes[i], ts_RSL_ChanMode_SIGN));
+ log(testcasename(), ": Starting for ", g_AllChanTypes[i]);
vc_conn := f_start_handler(refers(f_TC_sacch_chan_act_ho_async), pars);
vc_conn.done;
}
@@ -1532,9 +1532,9 @@
var ConnHdlrPars pars;
f_init();
- for (var integer i := 0; i < sizeof(g_AllChannels); i := i+1) {
- pars := valueof(t_Pars(g_AllChannels[i], ts_RSL_ChanMode_SIGN));
- log(testcasename(), ": Starting for ", g_AllChannels[i]);
+ for (var integer i := 0; i < sizeof(g_AllChanTypes); i := i+1) {
+ pars := valueof(t_Pars(g_AllChanTypes[i], ts_RSL_ChanMode_SIGN));
+ log(testcasename(), ": Starting for ", g_AllChanTypes[i]);
vc_conn := f_start_handler(refers(f_TC_sacch_chan_act_ho_sync), pars);
vc_conn.done;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27490
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: Ic1937edd72ff842cb619e153d0f6a624ceb95281
Gerrit-Change-Number: 27490
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange