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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/15547 )
Change subject: sgsn_libgtp: refactor ps paging into gprs_gb
......................................................................
sgsn_libgtp: refactor ps paging into gprs_gb
Paging should be done in gprs_gb
Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
---
M include/osmocom/sgsn/gprs_gb.h
M src/sgsn/gprs_gb.c
M src/sgsn/sgsn_libgtp.c
3 files changed, 28 insertions(+), 11 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/include/osmocom/sgsn/gprs_gb.h b/include/osmocom/sgsn/gprs_gb.h
index 47f2a31..461eee3 100644
--- a/include/osmocom/sgsn/gprs_gb.h
+++ b/include/osmocom/sgsn/gprs_gb.h
@@ -9,3 +9,6 @@
bool drop_cipherable);
/* Has to be called whenever any PDU (signaling, data, ...) has been received */
void gprs_gb_recv_pdu(struct sgsn_mm_ctx *mmctx);
+
+/* page a MS in its routing area */
+int gprs_gb_page_ps_ra(struct sgsn_mm_ctx *mmctx);
diff --git a/src/sgsn/gprs_gb.c b/src/sgsn/gprs_gb.c
index 9fa8e00..d470cfa 100644
--- a/src/sgsn/gprs_gb.c
+++ b/src/sgsn/gprs_gb.c
@@ -80,3 +80,26 @@
return rc;
}
+
+
+int gprs_gb_page_ps_ra(struct sgsn_mm_ctx *mmctx)
+{
+ struct bssgp_paging_info pinfo;
+ int rc;
+
+ /* FIXME: page whole routing area, not only the last known cell */
+
+ /* initiate PS PAGING procedure */
+ memset(&pinfo, 0, sizeof(pinfo));
+ pinfo.mode = BSSGP_PAGING_PS;
+ pinfo.scope = BSSGP_PAGING_BVCI;
+ pinfo.bvci = mmctx->gb.bvci;
+ pinfo.imsi = mmctx->imsi;
+ pinfo.ptmsi = &mmctx->p_tmsi;
+ pinfo.drx_params = mmctx->drx_parms;
+ pinfo.qos[0] = 0; // FIXME
+ rc = bssgp_tx_paging(mmctx->gb.nsei, 0, &pinfo);
+ rate_ctr_inc(&mmctx->ctrg->ctr[GMM_CTR_PAGING_PS]);
+
+ return rc;
+}
diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c
index c5bc5b8..a39687f 100644
--- a/src/sgsn/sgsn_libgtp.c
+++ b/src/sgsn/sgsn_libgtp.c
@@ -45,6 +45,7 @@
#include <osmocom/sgsn/signal.h>
#include <osmocom/sgsn/debug.h>
#include <osmocom/sgsn/sgsn.h>
+#include <osmocom/sgsn/gprs_gb.h>
#include <osmocom/sgsn/gprs_llc.h>
#include <osmocom/sgsn/gprs_sgsn.h>
#include <osmocom/sgsn/gprs_gmm.h>
@@ -614,7 +615,6 @@
/* Called whenever we receive a DATA packet */
static int cb_data_ind(struct pdp_t *lib, void *packet, unsigned int len)
{
- struct bssgp_paging_info pinfo;
struct sgsn_pdp_ctx *pdp;
struct sgsn_mm_ctx *mm;
struct msgb *msg;
@@ -660,16 +660,7 @@
switch (mm->gmm_fsm->state) {
case ST_GMM_REGISTERED_SUSPENDED:
/* initiate PS PAGING procedure */
- memset(&pinfo, 0, sizeof(pinfo));
- pinfo.mode = BSSGP_PAGING_PS;
- pinfo.scope = BSSGP_PAGING_BVCI;
- pinfo.bvci = mm->gb.bvci;
- pinfo.imsi = mm->imsi;
- pinfo.ptmsi = &mm->p_tmsi;
- pinfo.drx_params = mm->drx_parms;
- pinfo.qos[0] = 0; // FIXME
- bssgp_tx_paging(mm->gb.nsei, 0, &pinfo);
- rate_ctr_inc(&mm->ctrg->ctr[GMM_CTR_PAGING_PS]);
+ gprs_gb_page_ps_ra(mm);
/* FIXME: queue the packet we received from GTP */
break;
case ST_GMM_REGISTERED_NORMAL:
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/15547
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I3020020f52005aa460ca6b245ee2297aec9821b3
Gerrit-Change-Number: 15547
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
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/20191017/1fc27d4f/attachment.htm>