Change in osmo-sgsn[master]: sgsn_libgtp.c: Drop use of deprecated libgtp APIs gtp_retrans*()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Oct 21 08:31:31 UTC 2019


pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15579 )

Change subject: sgsn_libgtp.c: Drop use of deprecated libgtp APIs gtp_retrans*()
......................................................................

sgsn_libgtp.c: Drop use of deprecated libgtp APIs gtp_retrans*()

Since osmo-ggsn.git c94837c6a401bf0f80791b619a9b4cfbe9160afd, those
APIs are a no-op since timers are tracked internally through osmocom
APIs (and at the same time, new implementation fixes some timing related
bugs).

As a result, osmo-sgsn depends now on at least that libgtp commit. Since
it's not yet avaiable on latest libgtp release, let's track it down in
TODO-RELESE to not forget to update libgtp requirements during osmo-sgsn
release.

Related: OS#4178
Change-Id: Ia9a93d4a6ed63cd0c736f9a99d81d730b958d82e
---
M TODO-RELEASE
M include/osmocom/sgsn/sgsn.h
M src/sgsn/sgsn_libgtp.c
3 files changed, 3 insertions(+), 28 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/TODO-RELEASE b/TODO-RELEASE
index 1c5d61f..ac6dcb2 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -1 +1,4 @@
 #component	what		description / commit summary line
+osmo-sgsn	libgtp		We dropped libgtp gtp_retranstimeout timer code which became a
+				no-op in osmo-ggsn.git c94837c6a401bf0f80791b619a9b4cfbe9160afd,
+				which means next osmo-sgsn release will require libgtp > 1.4.0.
diff --git a/include/osmocom/sgsn/sgsn.h b/include/osmocom/sgsn/sgsn.h
index e1c5c4a..f5ff524 100644
--- a/include/osmocom/sgsn/sgsn.h
+++ b/include/osmocom/sgsn/sgsn.h
@@ -130,8 +130,6 @@
 	struct osmo_fd gtp_fd0;
 	struct osmo_fd gtp_fd1c;
 	struct osmo_fd gtp_fd1u;
-	/* Timer for libGTP */
-	struct osmo_timer_list gtp_timer;
 	/* GSN instance for libgtp */
 	struct gsn_t *gsn;
 	/* Subscriber */
diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c
index c45431a..c20c8dc 100644
--- a/src/sgsn/sgsn_libgtp.c
+++ b/src/sgsn/sgsn_libgtp.c
@@ -753,28 +753,6 @@
 	return rc;
 }
 
-static void sgsn_gtp_tmr_start(struct sgsn_instance *sgi)
-{
-	struct timeval next;
-
-	/* Retrieve next retransmission as struct timeval */
-	gtp_retranstimeout(sgi->gsn, &next);
-
-	/* re-schedule the timer */
-	osmo_timer_schedule(&sgi->gtp_timer, next.tv_sec, next.tv_usec/1000);
-}
-
-/* timer callback for libgtp retransmissions and ping */
-static void sgsn_gtp_tmr_cb(void *data)
-{
-	struct sgsn_instance *sgi = data;
-
-	/* Do all the retransmissions as needed */
-	gtp_retrans(sgi->gsn);
-
-	sgsn_gtp_tmr_start(sgi);
-}
-
 int sgsn_gtp_init(struct sgsn_instance *sgi)
 {
 	int rc;
@@ -825,10 +803,6 @@
 		return rc;
 	}
 
-	/* Start GTP re-transmission timer */
-	osmo_timer_setup(&sgi->gtp_timer, sgsn_gtp_tmr_cb, sgi);
-	sgsn_gtp_tmr_start(sgi);
-
 	/* Register callbackcs with libgtp */
 	gtp_set_cb_delete_context(gsn, cb_delete_context);
 	gtp_set_cb_conf(gsn, cb_conf);

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ia9a93d4a6ed63cd0c736f9a99d81d730b958d82e
Gerrit-Change-Number: 15579
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191021/dfdf3221/attachment.htm>


More information about the gerrit-log mailing list