Change in ...osmo-sgsn[master]: ranap: add non-spec T1001

2019-10-08 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15701 )

Change subject: ranap: add non-spec T1001
..


Patch Set 2: Code-Review-1

(4 comments)

https://gerrit.osmocom.org/#/c/15701/2//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/15701/2//COMMIT_MSG@10
PS2, Line 10: and waits for a Release Complete. Use T1001 to release the Iu 
connection
If it's non-spec, then we name them X1001, and values are negative.


https://gerrit.osmocom.org/#/c/15701/2/src/sgsn/gprs_ranap.c
File src/sgsn/gprs_ranap.c:

https://gerrit.osmocom.org/#/c/15701/2/src/sgsn/gprs_ranap.c@180
PS2, Line 180:  unsigned long T1001;
X1001


https://gerrit.osmocom.org/#/c/15701/2/src/sgsn/gprs_ranap.c@188
PS2, Line 188:  T1001 = osmo_tdef_get(sgsn->cfg.T_defs, 1001, OSMO_TDEF_S, -1);
-1001


https://gerrit.osmocom.org/#/c/15701/2/src/sgsn/sgsn_vty.c
File src/sgsn/sgsn_vty.c:

https://gerrit.osmocom.org/#/c/15701/2/src/sgsn/sgsn_vty.c@112
PS2, Line 112:  { .T=-1001, .default_val=NONSPEC_T1001_SECS, .desc="RANAP 
Release timeout. Wait for RANAP Release Complete."
Please put it before -3314, we usually order them this way afaik.



--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15701
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Tue, 08 Oct 2019 12:58:03 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: ranap: add non-spec T1001

2019-10-08 Thread lynxis lazus
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-sgsn/+/15701

to look at the new patch set (#2).

Change subject: ranap: add non-spec T1001
..

ranap: add non-spec T1001

When the SGSN releases a RANAP connection, it sends a Release Command
and waits for a Release Complete. Use T1001 to release the Iu connection
when the Release Complete is lost/never received.

Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
---
M src/sgsn/gprs_ranap.c
M src/sgsn/sgsn_vty.c
M tests/test_nodes.vty
3 files changed, 12 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/01/15701/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15701
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in ...osmo-sgsn[master]: ranap: add non-spec T1001

2019-10-08 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/15701


Change subject: ranap: add non-spec T1001
..

ranap: add non-spec T1001

When the SGSN releases a RANAP connection, it sends a Release Command
and waits for a Release Complete. Use T1001 to release the Iu connection
when the Release Complete is lost/never received.

Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
---
M src/sgsn/gprs_ranap.c
M src/sgsn/sgsn_vty.c
2 files changed, 11 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/01/15701/1

diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c
index 6ebbd69..d2841df 100644
--- a/src/sgsn/gprs_ranap.c
+++ b/src/sgsn/gprs_ranap.c
@@ -25,6 +25,7 @@
 #include 

 #include 
+#include 

 #include 

@@ -161,8 +162,6 @@
return rc;
 }

-/* TODO: use timers */
-#define TIMEOUT_RANAP_RELEASE_SEC 5
 void sgsn_ranap_iu_free(struct sgsn_mm_ctx *ctx)
 {
if (!ctx)
@@ -178,15 +177,19 @@
 void sgsn_ranap_iu_release_free(struct sgsn_mm_ctx *ctx,
const struct RANAP_Cause *cause)
 {
+   unsigned long T1001;
+
if (!ctx)
return;

if (!ctx->iu.ue_ctx)
return;

+   T1001 = osmo_tdef_get(sgsn->cfg.T_defs, 1001, OSMO_TDEF_S, -1);
+
ranap_iu_tx_release_free(ctx->iu.ue_ctx,
 cause,
-TIMEOUT_RANAP_RELEASE_SEC);
+(int) T1001);
ctx->iu.ue_ctx = NULL;
 }

diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c
index 17b64c8..855598c 100644
--- a/src/sgsn/sgsn_vty.c
+++ b/src/sgsn/sgsn_vty.c
@@ -90,6 +90,9 @@
 #define GSM0408_T3395_SECS 8   /* wait for DEACT PDP CTX ACK */
 #define GSM0408_T3397_SECS 8   /* wait for DEACT AA PDP CTX ACK */

+/* Non spec timer */
+#define NONSPEC_T1001_SECS 5   /* wait for a RANAP Release Complete */
+

 static struct osmo_tdef sgsn_T_defs[] = {
{ .T=3312, .default_val=GSM0408_T3312_SECS, .desc="Periodic RA Update 
timer (s)" },
@@ -106,6 +109,8 @@
{ .T=3397, .default_val=GSM0408_T3397_SECS, .desc="Wait for DEACT AA 
PDP CTX ACK timer (s)" },
/* non spec timers */
{ .T=-3314, .default_val=GSM0408_T3314_SECS, .desc="Iu User inactivity 
timer. On expiry release Iu connection (s)" },
+   { .T=-1001, .default_val=NONSPEC_T1001_SECS, .desc="RANAP Release 
timeout. Wait for RANAP Release Complete."
+  "On expiry release 
Iu connection (s)" },
{}
 };


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15701
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
Gerrit-Change-Number: 15701
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-MessageType: newchange