Hi all,
This patch set adds to libosmocore an optimized Viterbi decodeer for
architecture specific (Intel SSE) and non-specific cases. The
implementation covers codes with constraint lengths of K=5 and K=7 and
rates 1/4 to 3/4, which make up the majority of GSM use cases. Speedup
from the current implementation is in the range of 5 to 20 depending on
the processor and code type. API is unchanged.
Tested on Haswell (i7-4770K) and Atom (D2550). Additional test codes
from osmo-bts are included. Further tests for AWGN bit-error-rate
and benchmarks can be found in the following repository.
https://github.com/ttsou/osmo-conv-test
Here are some examples.
Bit error test for GPRS CS2 with SNR of 5 dB and 100000 bursts.
$ ./conv_test -c 2 -e -r 5 -i 100000
=================================================
[+] Testing: GPRS CS2
[.] Specs: (N=2, K=5, non-recursive, flushed, not punctured)
[.] Input length : ret = 290 exp = 290 -> OK
[.] Output length : ret = 588 exp = 588 -> OK
[.] BER tests:
[..] Testing base:
[..] Input BER.......................... 0.042443
[..] Output BER......................... 0.000006
[..] Output FER......................... 0.001350 (135)
[..] Testing SIMD:
[..] Input BER.......................... 0.042460
[..] Output BER......................... 0.000005
[..] Output FER......................... 0.001240 (124)
Timed AFS benchmark with 8 threads and 100000 bursts per thread.
$ ./conv_test -b -c 10 -j 8 -i 100000
=================================================
[+] Testing: GSM TCH/AFS 6.7
[.] Specs: (N=4, K=5, recursive, flushed, punctured)
[.] Input length : ret = 140 exp = 140 -> OK
[.] Output length : ret = 448 exp = 448 -> OK
[.] Performance benchmark:
[..] Encoding / Decoding 800000 bursts on 8 thread(s):
[..] Testing base:
[..] Elapsed time....................... 4.320001 secs
[..] Rate............................... 25.925920 Mbps
[..] Testing SIMD:
[..] Elapsed time....................... 0.458272 secs
[..] Rate............................... 244.396341 Mbps
[..] Speedup............................ 9.426718
-TT
Good afternoon!
In libbsc/bsc_init.c we have the following case:
case GSM_BAND_900:
if (bts->c0->arfcn < 1 ||
(bts->c0->arfcn > 124 && bts->c0->arfcn < 955) ||
bts->c0->arfcn > 1023) {
LOGP(DNM, LOGL_ERROR, "GSM900 channel must be between 1-124, 955-1023.\n");
return -EINVAL;
}
break;
3GPP 45.005, table 2-2 gives valid channel numbers as:
P-GSM900 -> 1-124,
E-GSM900 -> 0-124 and 975-1023
R-GSM900 -> 0-124 and 955-1023
ER-GSM900 -> 0-124 and 940-1023
The code looks to bounds check ARFCN closest to R-GSM900, but omits ARFCN 0.
Is the check "bts->c0->arfcn < 1" erroneous, or am I missing some history?
Also should it really check for the R-GSM 900 range, or should it be E-GSM (more common)?
The other band checks look correct.
Kind Regards,
Mike
PS: osmo-arfcn is okay with ARFCN 0:
$ ./osmo-arfcn -a 0
ARFCN 0: Uplink 890.0 MHz / Downlink 935.0 MHz
Currently the DL sometimes hangs and sometimes a lot of messages
(still not able to send PDU) are logged. This is caused by an invalid
timer delay computation, setting msecs either to 0 or to some big value.
This is due to an '&' operator at the wrong place, accessing some
parts in fc instead of the first element of the list.
This commit fixes that issue.
Sponsored-by: On-Waves ehf
---
src/gb/gprs_bssgp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index 4c93b69..fe4fcca 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -628,7 +628,7 @@ static int fc_queue_timer_cfg(struct bssgp_flow_control *fc)
if (llist_empty(&fc->queue))
return 0;
- fcqe = llist_entry(&fc->queue.next, struct bssgp_fc_queue_element,
+ fcqe = llist_entry(fc->queue.next, struct bssgp_fc_queue_element,
list);
if (fc->bucket_leak_rate != 0) {
--
1.9.1
In test_rtp_seq_state an assignment is accidently done within an
assertion.
This commit changes that into a comparison as it was intended.
Fixes: Coverity CID 1295457, 1295458
Sponsored-by: On-Waves ehf
---
openbsc/tests/mgcp/mgcp_transcoding_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openbsc/tests/mgcp/mgcp_transcoding_test.c b/openbsc/tests/mgcp/mgcp_transcoding_test.c
index 1b8001e..c5c0a0b 100644
--- a/openbsc/tests/mgcp/mgcp_transcoding_test.c
+++ b/openbsc/tests/mgcp/mgcp_transcoding_test.c
@@ -295,7 +295,7 @@ static void test_rtp_seq_state(void)
OSMO_ASSERT(cont >= 0);
OSMO_ASSERT(state->is_running);
OSMO_ASSERT(state->next_seq == 2);
- OSMO_ASSERT(state->next_time = 240);
+ OSMO_ASSERT(state->next_time == 240);
/* verify that the right timestamp was written */
OSMO_ASSERT(len == audio_packets_pcma[0].len);
--
1.9.1
From: Holger Hans Peter Freyther <holger(a)moiji-mobile.com>
---
openbsc/doc/sgsn-remote-protocol.txt | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/openbsc/doc/sgsn-remote-protocol.txt b/openbsc/doc/sgsn-remote-protocol.txt
index 3369d19..88a384e 100644
--- a/openbsc/doc/sgsn-remote-protocol.txt
+++ b/openbsc/doc/sgsn-remote-protocol.txt
@@ -121,6 +121,7 @@ Network peer -> SGSN
01 IMSI 4.2.9 M TLV 2-10
04 PDP info complete 4.2.8 O TLV 2
05 PDP info 4.2.3 1-10 TLV
+ 13 MSISDN 4.2.10 O TLV 0-9
If the PDP info complete IE is present, the old PDP info list shall be cleared.
@@ -357,6 +358,7 @@ IEI that shall be used for the encoding.
| 0x10 PDP context id big endian int |
| 0x11 PDP type 4.2.4 |
| 0x12 APN 04.08, 10.5.6.1 |
+ | 0x13 MSISDN ISDN-AddressString/octet |
| 0x20 RAND octet string |
| 0x21 SRES octet string |
| 0x22 Kc octet string |
@@ -397,3 +399,24 @@ The IMSI is encoded like in octet 4-N of the Called Party BCD Number defined in
Note 1) Either '1 1 1 1 | Number digit N' (N odd) or
'Number digit N | Number digit N-1' (N even),
where N is the number of digits.
+
+4.2.10. ISDN-AddressString / MSISDN /Called Party BCD Number
+
+
+MSISDN. ISDN-AddressString in GSM 09.02 and Called Party
+BCD Number in GSM 04.08.
+
+ 8 7 6 5 4 3 2 1
+ +-----------------------------------------------------+
+ | | IEI | octet 1
+ +-----------------------------------------------------+
+ | Length of IE contents | octet 2
+ +-----------------------------------------------------+
+ | ext | Type of num | Numbering plan | octet 2
+ +-----------------------------------------------------+
+ | Number digit 2 | Number digit 1 | octet 3
+ +-----------------------------------------------------+
+ | Number digit 4 | Number digit 3 | octet 4
+ +-----------------------------------------------------+
+ : : :
+ +-----------------------------------------------------+
--
2.3.5