aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpravin <pravin.manoharan@radisys.com>2016-09-30 16:00:39 +0530
committerpravin <pravin.manoharan@radisys.com>2016-09-30 16:00:39 +0530
commitdcb2f6b3dea6b5c8337565fe76f3da1ae205cfcd (patch)
tree3eaf3f3fdea299a76b6d0ad35a2bfb95f365320a
parentf15edb81ff67385420df9c725dcf5a276ff292b4 (diff)
Update README with working commit versions of osmo components
Necessary changes for build this pcu.
-rw-r--r--README9
-rw-r--r--contrib/0001-Add-function-to-get-uninterrupted-bit-run.patch83
-rw-r--r--examples/osmo-pcu.cfg22
3 files changed, 112 insertions, 2 deletions
diff --git a/README b/README
index 77fad7a..9fa1f9c 100644
--- a/README
+++ b/README
@@ -2,6 +2,15 @@ This is an implementation of Packet Control Unit (PCU) according to TS 04.60
The PCU is part of BSS, so it connects directly to SGSN.
+For this PCU the dependent libosmocore patch is in contrib which has to be
+applied on top of libosmmocore 8319a6799ffc9d4c5e7e094b96af30cbebf89f65.
+osmo-pcu.cfg is updated.
+
+This PCU enables
+ * Support for EPDAN
+ * Support for PUAN with CRBB
+ * Fix for OS#1789
+ * Fix for OS#1792
== Current limitations ==
diff --git a/contrib/0001-Add-function-to-get-uninterrupted-bit-run.patch b/contrib/0001-Add-function-to-get-uninterrupted-bit-run.patch
new file mode 100644
index 0000000..2d0aaf0
--- /dev/null
+++ b/contrib/0001-Add-function-to-get-uninterrupted-bit-run.patch
@@ -0,0 +1,83 @@
+From 459a30ef8eb37b2781e7a716769c3970f1721a25 Mon Sep 17 00:00:00 2001
+From: pravin <pravin.manoharan@radisys.com>
+Date: Tue, 27 Sep 2016 17:27:40 +0530
+Subject: [PATCH] Add function to get uninterrupted bit run
+
+Function bitvec_rl_curbit added to get number of uninterrupted
+bits run in vector starting from the current bit till max number
+of bits.
+---
+ include/osmocom/core/bitvec.h | 1 +
+ src/bitvec.c | 44 +++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 45 insertions(+)
+
+diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h
+index 19e2af8..0e17ba7 100644
+--- a/include/osmocom/core/bitvec.h
++++ b/include/osmocom/core/bitvec.h
+@@ -89,6 +89,7 @@ char bit_value_to_char(enum bit_value v);
+ void bitvec_to_string_r(const struct bitvec *bv, char *str);
+ void bitvec_zero(struct bitvec *bv);
+ unsigned bitvec_rl(const struct bitvec *bv, bool b);
++unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, int max_bits);
+ void bitvec_shiftl(struct bitvec *bv, unsigned int n);
+ int16_t bitvec_get_int16_msb(const struct bitvec *bv, unsigned int num_bits);
+ unsigned int bitvec_add_array(struct bitvec *bv, const uint32_t *array,
+diff --git a/src/bitvec.c b/src/bitvec.c
+index 38148ac..20ba0d7 100644
+--- a/src/bitvec.c
++++ b/src/bitvec.c
+@@ -575,6 +575,50 @@ unsigned bitvec_rl(const struct bitvec *bv, bool b)
+ return bv->cur_bit;
+ }
+
++/*! \brief Return number (bits) of uninterrupted bit run in vector starting from the current bit
++ * \param[in] bv The boolean vector to work on
++ * \param[in] b The boolean, sequence of 1's or 0's to be checked
++ * \returns Number of consecutive bits of \p b in \p bv
++ */
++unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, int max_bits)
++{
++ unsigned i = 0;
++ int temp_res = 0;
++ int count = 0;
++ unsigned readIndex = bv->cur_bit;
++ if (bv->cur_bit % 8 == 0) {
++ for (i = (bv->cur_bit/8); i < (max_bits % 8 ? max_bits/8 + 1 : max_bits/8); i++, count++) {
++ if ((b ? 0xFF : 0) != bv->data[i]) {
++ bv->cur_bit = (count * 8 + leading_bits(bv->data[i], b) + readIndex);
++ return count * 8 + leading_bits(bv->data[i], b);
++ }
++ }
++ bv->cur_bit = (count * 8) + readIndex ;
++ if (bv->cur_bit > max_bits)
++ bv->cur_bit = max_bits;
++ return (bv->cur_bit - readIndex);
++ } else {
++ int pos = bv->cur_bit/8;
++ while (bitvec_read_field(bv, &readIndex, 1) == b) {
++ if( bv->cur_bit % 8 >= 0)
++ temp_res++;
++ else {
++ pos++;
++ for (i = pos; i < (max_bits % 8 ? max_bits/8 + 1 : max_bits/8); i++, count++) {
++ if ((b ? 0xFF : 0) != bv->data[i]) {
++ bv->cur_bit = (count * 8 + leading_bits(bv->data[i], b) + temp_res) + readIndex ;
++ return count * 8 + leading_bits(bv->data[i], b) + temp_res;
++ }
++ }
++ bv->cur_bit = (temp_res + (count * 8)) + readIndex;
++ return temp_res + (count * 8);
++ }
++ }
++ bv->cur_bit--;
++ return temp_res;
++ }
++}
++
+ /*! \brief Shifts bitvec to the left, n MSB bits lost */
+ void bitvec_shiftl(struct bitvec *bv, unsigned n)
+ {
+--
+1.9.1
+
diff --git a/examples/osmo-pcu.cfg b/examples/osmo-pcu.cfg
index b88e6e7..703441c 100644
--- a/examples/osmo-pcu.cfg
+++ b/examples/osmo-pcu.cfg
@@ -1,6 +1,24 @@
pcu
+ egprs only
flow-control-interval 10
- cs 2
- alloc-algorithm dynamic
+ flow-control force-bvc-bucket-size 596000
+ flow-control force-bvc-leak-rate 59600
+ flow-control force-ms-bucket-size 596000
+ flow-control force-ms-leak-rate 59600
+ cs 1
+ cs max 1
+ no cs threshold
+ no cs downgrade-threshold
+ cs link-quality-ranges cs1 6 cs2 5 8 cs3 7 13 cs4 12
+ mcs 9 9
+ mcs max 9 9
+ window-size 64 104
+ queue lifetime infinite
+ queue idle-ack-delay 10
+ no queue codel
+ alloc-algorithm b
+ two-phase-access
alpha 0
gamma 0
+ dl-tbf-idle-time 2000
+ maximise-direction dl