[MERGED] osmo-iuh[master]: new_rab_par_voice(): add bitrate params, call with (6700, 12...

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Feb 2 20:04:34 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: new_rab_par_voice(): add bitrate params, call with (6700, 12200)
......................................................................


new_rab_par_voice(): add bitrate params, call with (6700, 12200)

The guaranteedBitrate lowers from 12200 to 6700, which is mimicking the values
found in a trace from a production 3G environment. So far we have no reason to
choose these values other than knowing that other operators seem to do this.

This came up while trying to fix voice RAB for the nano3G, but this patch had
no effect on that. Now that it's here, we might as well keep it.

Change-Id: Ia7eecca43d62a6a020466e9b8dc8b566ca988f9f
---
M src/ranap_msg_factory.c
M src/tests/test-ranap.ok
2 files changed, 9 insertions(+), 8 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c
index 4634a07..64d87f9 100644
--- a/src/ranap_msg_factory.c
+++ b/src/ranap_msg_factory.c
@@ -559,7 +559,8 @@
 }
 
 /* See Chapter 5 of TS 26.102 */
-static RANAP_RAB_Parameters_t *new_rab_par_voice(void)
+static RANAP_RAB_Parameters_t *new_rab_par_voice(long bitrate_guaranteed,
+						 long bitrate_max)
 {
 	RANAP_RAB_Parameters_t *rab = CALLOC(1, sizeof(*rab));
 	RANAP_SDU_ParameterItem_t *sdui;
@@ -567,9 +568,9 @@
 	rab->trafficClass = RANAP_TrafficClass_conversational;
 	rab->rAB_AsymmetryIndicator = RANAP_RAB_AsymmetryIndicator_symmetric_bidirectional;
 
-	ASN_SEQUENCE_ADD(&rab->maxBitrate.list, new_long(12200));
+	ASN_SEQUENCE_ADD(&rab->maxBitrate.list, new_long(bitrate_max));
 	rab->guaranteedBitRate = CALLOC(1, sizeof(*rab->guaranteedBitRate));
-	ASN_SEQUENCE_ADD(rab->guaranteedBitRate, new_long(12200));
+	ASN_SEQUENCE_ADD(rab->guaranteedBitRate, new_long(bitrate_guaranteed));
 	rab->deliveryOrder = RANAP_DeliveryOrder_delivery_order_requested;
 	rab->maxSDU_Size = 244;
 
@@ -738,7 +739,7 @@
 	memset(&first, 0, sizeof(first));
 	assign_new_ra_id(&first.rAB_ID, rab_id);
 	first.nAS_SynchronisationIndicator = new_rab_nas_sync_ind(60);
-	first.rAB_Parameters = new_rab_par_voice();
+	first.rAB_Parameters = new_rab_par_voice(6700, 12200);
 	first.userPlaneInformation = new_upi(RANAP_UserPlaneMode_support_mode_for_predefined_SDU_sizes, 1); /* 2? */
 	first.transportLayerInformation = new_transp_info_rtp(rtp_ip, rtp_port,
 							      use_x213_nsap);
diff --git a/src/tests/test-ranap.ok b/src/tests/test-ranap.ok
index bd44d33..2a8de8f 100644
--- a/src/tests/test-ranap.ok
+++ b/src/tests/test-ranap.ok
@@ -88,7 +88,7 @@
     <id>53</id>
     <firstCriticality><reject/></firstCriticality>
     <firstValue>
-        78 02 CD 80 10 2F A7 20 2F A8 00 00 F4 4C 08 0A 
+        78 02 CD 80 10 2F A7 20 1A 2C 00 00 F4 4C 08 0A 
         02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 
         28 14 00 3C 40 00 00 00 50 3D 02 00 02 27 C0 35 
         00 01 0A 0B 0C 0D 00 00 00 00 00 00 00 00 00 00 
@@ -101,15 +101,15 @@
     <id>54</id>
     <criticality><ignore/></criticality>
     <value>
-        00 00 01 00 35 00 48 78 02 CD 80 10 2F A7 20 2F 
-        A8 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 
+        00 00 01 00 35 00 48 78 02 CD 80 10 2F A7 20 1A 
+        2C 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 
         14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 
         3D 02 00 02 27 C0 35 00 01 0A 0B 0C 0D 00 00 00 
         00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 
         01 00
     </value>
 </RANAP_IE>
-00 00 00 59 00 00 01 00 36 40 52 00 00 01 00 35 00 48 78 02 cd 80 10 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 27 c0 35 00 01 0a 0b 0c 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 01 00 
+00 00 00 59 00 00 01 00 36 40 52 00 00 01 00 35 00 48 78 02 cd 80 10 2f a7 20 1a 2c 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 27 c0 35 00 01 0a 0b 0c 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 40 09 26 00 00 40 01 00 
 
 ==> RAB ASSIGNMENT COMMAND (DATA)
 <RANAP_ProtocolIE-FieldPair>

-- 
To view, visit https://gerrit.osmocom.org/1643
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7eecca43d62a6a020466e9b8dc8b566ca988f9f
Gerrit-PatchSet: 3
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder


More information about the gerrit-log mailing list