Change in osmo-sgsn[master]: gbproxy: Rename gbproxy_cfg.nses to gbproxy_cfg.bss_nses

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.org
Mon Dec 7 13:14:19 UTC 2020


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

Change subject: gbproxy: Rename gbproxy_cfg.nses to gbproxy_cfg.bss_nses
......................................................................

gbproxy: Rename gbproxy_cfg.nses to gbproxy_cfg.bss_nses

We will soon also have a list of sgsn-side NSEs, and we need to
differentiate those.

Change-Id: If5accec0c70c01b88927ea07beba6f6488bd9d5a
Related: OS#4472
---
M include/osmocom/sgsn/gb_proxy.h
M src/gbproxy/gb_proxy.c
M src/gbproxy/gb_proxy_ctrl.c
M src/gbproxy/gb_proxy_peer.c
M src/gbproxy/gb_proxy_vty.c
M tests/gbproxy/gbproxy_test.c
6 files changed, 27 insertions(+), 27 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/include/osmocom/sgsn/gb_proxy.h b/include/osmocom/sgsn/gb_proxy.h
index 818ab9d..27b47cf 100644
--- a/include/osmocom/sgsn/gb_proxy.h
+++ b/include/osmocom/sgsn/gb_proxy.h
@@ -101,8 +101,8 @@
 	/* NS instance of libosmogb */
 	struct gprs_ns2_inst *nsi;
 
-	/* Linked list of all Gb peers (except SGSN) */
-	struct llist_head nses;
+	/* Linked list of all BSS side Gb peers */
+	struct llist_head bss_nses;
 
 	/* Counter */
 	struct rate_ctr_group *ctrg;
@@ -175,7 +175,7 @@
 
 /* one NS Entity that we interact with (BSS/PCU) */
 struct gbproxy_nse {
-	/* linked to gbproxy_config.nses */
+	/* linked to gbproxy_config.bss_nses */
 	struct llist_head list;
 
 	/* point back to the config */
diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index 94944f9..4c34941 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -1203,7 +1203,7 @@
 	} else if (TLVP_PRES_LEN(tp, BSSGP_IE_ROUTEING_AREA, 6)) {
 		errctr = GBPROX_GLOB_CTR_INV_RAI;
 		/* iterate over all bvcs and dispatch the paging to each matching one */
-		llist_for_each_entry(nse, &cfg->nses, list) {
+		llist_for_each_entry(nse, &cfg->bss_nses, list) {
 			llist_for_each_entry(bvc, &nse->bvcs, list) {
 				if (!memcmp(bvc->ra, TLVP_VAL(tp, BSSGP_IE_ROUTEING_AREA), 6)) {
 					LOGPNSE(nse, LOGL_INFO, "routing to NSE (RAI match)\n");
@@ -1217,7 +1217,7 @@
 	} else if (TLVP_PRES_LEN(tp, BSSGP_IE_LOCATION_AREA, 5)) {
 		errctr = GBPROX_GLOB_CTR_INV_LAI;
 		/* iterate over all bvcs and dispatch the paging to each matching one */
-		llist_for_each_entry(nse, &cfg->nses, list) {
+		llist_for_each_entry(nse, &cfg->bss_nses, list) {
 			llist_for_each_entry(bvc, &nse->bvcs, list) {
 				if (!memcmp(bvc->ra, TLVP_VAL(tp, BSSGP_IE_LOCATION_AREA), 5)) {
 					LOGPNSE(nse, LOGL_INFO, "routing to NSE (LAI match)\n");
@@ -1230,7 +1230,7 @@
 		}
 	} else if (TLVP_PRES_LEN(tp, BSSGP_IE_BSS_AREA_ID, 1)) {
 		/* iterate over all bvcs and dispatch the paging to each matching one */
-		llist_for_each_entry(nse, &cfg->nses, list) {
+		llist_for_each_entry(nse, &cfg->bss_nses, list) {
 			llist_for_each_entry(bvc, &nse->bvcs, list) {
 				LOGPNSE(nse, LOGL_INFO, "routing to NSE (broadcast)\n");
 				gbprox_relay2nse(msg, nse, ns_bvci);
@@ -1291,7 +1291,7 @@
 	 * from the SGSN.  As the signalling BVCI is shared
 	 * among all the BSS's that we multiplex, it needs to
 	 * be relayed  */
-	llist_for_each_entry(nse, &cfg->nses, list) {
+	llist_for_each_entry(nse, &cfg->bss_nses, list) {
 		llist_for_each_entry(bvc, &nse->bvcs, list)
 			gbprox_relay2peer(msg, bvc, ns_bvci);
 	}
@@ -1425,7 +1425,7 @@
 		LOGP(DGPRS, LOGL_DEBUG,
 			"NSE(%05u/SGSN) BSSGP %s: broadcasting\n", nsei, bssgp_pdu_str(pdu_type));
 		/* broadcast to all BSS-side bvcs */
-		llist_for_each_entry(nse, &cfg->nses, list) {
+		llist_for_each_entry(nse, &cfg->bss_nses, list) {
 			gbprox_relay2nse(msg, nse, 0);
 		}
 		break;
@@ -1620,7 +1620,7 @@
 {
 	struct gbproxy_nse *nse, *ntmp;
 
-	llist_for_each_entry_safe(nse, ntmp, &cfg->nses, list) {
+	llist_for_each_entry_safe(nse, ntmp, &cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc, *tmp;
 		llist_for_each_entry_safe(bvc, tmp, &nse->bvcs, list)
 			gbproxy_bvc_free(bvc);
@@ -1636,7 +1636,7 @@
 {
 	struct timespec tp;
 
-	INIT_LLIST_HEAD(&cfg->nses);
+	INIT_LLIST_HEAD(&cfg->bss_nses);
 	cfg->ctrg = rate_ctr_group_alloc(tall_sgsn_ctx, &global_ctrg_desc, 0);
 	if (!cfg->ctrg) {
 		LOGP(DGPRS, LOGL_ERROR, "Cannot allocate global counter group!\n");
diff --git a/src/gbproxy/gb_proxy_ctrl.c b/src/gbproxy/gb_proxy_ctrl.c
index 097a29e..c3cfddf 100644
--- a/src/gbproxy/gb_proxy_ctrl.c
+++ b/src/gbproxy/gb_proxy_ctrl.c
@@ -69,7 +69,7 @@
 		gprs_ns2_nse_foreach_nsvc(nse, &ctrl_nsvc_state_cb, cmd);
 
 	/* NS-VCs for BSS peers */
-	llist_for_each_entry(nse_peer, &cfg->nses, list) {
+	llist_for_each_entry(nse_peer, &cfg->bss_nses, list) {
 		nse = gprs_ns2_nse_by_nsei(nsi, nse_peer->nsei);
 		if (nse)
 			gprs_ns2_nse_foreach_nsvc(nse, &ctrl_nsvc_state_cb, cmd);
@@ -87,7 +87,7 @@
 
 	cmd->reply = talloc_strdup(cmd, "");
 
-	llist_for_each_entry(nse_peer, &cfg->nses, list) {
+	llist_for_each_entry(nse_peer, &cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc;
 		llist_for_each_entry(bvc, &nse_peer->bvcs, list) {
 			struct gprs_ra_id raid;
@@ -112,7 +112,7 @@
 	struct gbproxy_nse *nse_peer;
 	uint32_t count = 0;
 
-	llist_for_each_entry(nse_peer, &cfg->nses, list)
+	llist_for_each_entry(nse_peer, &cfg->bss_nses, list)
 		count += llist_count(&nse_peer->bvcs);
 
 	cmd->reply = talloc_strdup(cmd, "");
diff --git a/src/gbproxy/gb_proxy_peer.c b/src/gbproxy/gb_proxy_peer.c
index a5b93ee..c48a78f 100644
--- a/src/gbproxy/gb_proxy_peer.c
+++ b/src/gbproxy/gb_proxy_peer.c
@@ -87,7 +87,7 @@
 {
 	struct gbproxy_nse *nse;
 
-	llist_for_each_entry(nse, &cfg->nses, list) {
+	llist_for_each_entry(nse, &cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc;
 		llist_for_each_entry(bvc, &nse->bvcs, list) {
 			if (bvc->bvci == bvci)
@@ -103,7 +103,7 @@
 					  uint16_t nsei)
 {
 	struct gbproxy_nse *nse;
-	llist_for_each_entry(nse, &cfg->nses, list) {
+	llist_for_each_entry(nse, &cfg->bss_nses, list) {
 		if (nse->nsei == nsei && !llist_empty(&nse->bvcs))
 			return llist_first_entry(&nse->bvcs, struct gbproxy_bvc, list);
 	}
@@ -117,7 +117,7 @@
 {
 	struct gbproxy_nse *nse;
 
-	llist_for_each_entry(nse, &cfg->nses, list) {
+	llist_for_each_entry(nse, &cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc;
 		llist_for_each_entry(bvc, &nse->bvcs, list) {
 			if (!memcmp(bvc->ra, ra, 6))
@@ -135,7 +135,7 @@
 {
 	struct gbproxy_nse *nse;
 
-	llist_for_each_entry(nse, &cfg->nses, list) {
+	llist_for_each_entry(nse, &cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc;
 		llist_for_each_entry(bvc, &nse->bvcs, list) {
 			if (!memcmp(bvc->ra, la, 5))
@@ -152,7 +152,7 @@
 {
 	struct gbproxy_nse *nse;
 
-	llist_for_each_entry(nse, &cfg->nses, list) {
+	llist_for_each_entry(nse, &cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc;
 		llist_for_each_entry(bvc, &nse->bvcs, list) {
 			if (!memcmp(bvc->ra + 3, la + 3, 2))
@@ -272,7 +272,7 @@
 	struct gbproxy_nse *nse, *ntmp;
 	OSMO_ASSERT(cfg);
 
-	llist_for_each_entry_safe(nse, ntmp, &cfg->nses, list) {
+	llist_for_each_entry_safe(nse, ntmp, &cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc, *tmp;
 		if (nse->nsei != nsei)
 			continue;
@@ -300,7 +300,7 @@
 	nse->nsei = nsei;
 	nse->cfg = cfg;
 
-	llist_add(&nse->list, &cfg->nses);
+	llist_add(&nse->list, &cfg->bss_nses);
 
 	INIT_LLIST_HEAD(&nse->bvcs);
 
@@ -326,7 +326,7 @@
 	struct gbproxy_nse *nse;
 	OSMO_ASSERT(cfg);
 
-	llist_for_each_entry(nse, &cfg->nses, list) {
+	llist_for_each_entry(nse, &cfg->bss_nses, list) {
 		if (nse->nsei == nsei)
 			return nse;
 	}
diff --git a/src/gbproxy/gb_proxy_vty.c b/src/gbproxy/gb_proxy_vty.c
index 3ef8ccc..e79297d 100644
--- a/src/gbproxy/gb_proxy_vty.c
+++ b/src/gbproxy/gb_proxy_vty.c
@@ -428,7 +428,7 @@
 	   and new frequency is desired to be lower. After initial run, periodic
 	   time is used. Use random() to avoid firing timers for all bvcs at
 	   the same time */
-	llist_for_each_entry(nse, &g_cfg->nses, list) {
+	llist_for_each_entry(nse, &g_cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc;
 		llist_for_each_entry(bvc, &nse->bvcs, list)
 			osmo_timer_schedule(&bvc->clean_stale_timer,
@@ -447,7 +447,7 @@
 	struct gbproxy_nse *nse;
 	g_cfg->clean_stale_timer_freq = 0;
 
-	llist_for_each_entry(nse, &g_cfg->nses, list) {
+	llist_for_each_entry(nse, &g_cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc;
 		llist_for_each_entry(bvc, &nse->bvcs, list)
 			osmo_timer_del(&bvc->clean_stale_timer);
@@ -584,7 +584,7 @@
 	if (show_stats)
 		vty_out_rate_ctr_group(vty, "", g_cfg->ctrg);
 
-	llist_for_each_entry(nse, &g_cfg->nses, list) {
+	llist_for_each_entry(nse, &g_cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc;
 		llist_for_each_entry(bvc, &nse->bvcs, list) {
 			gbprox_vty_print_bvc(vty, bvc);
@@ -606,7 +606,7 @@
 	osmo_clock_gettime(CLOCK_MONOTONIC, &ts);
 	now = ts.tv_sec;
 
-	llist_for_each_entry(nse, &g_cfg->nses, list) {
+	llist_for_each_entry(nse, &g_cfg->bss_nses, list) {
 		struct gbproxy_bvc *bvc;
 		llist_for_each_entry(bvc, &nse->bvcs, list) {
 			struct gbproxy_link_info *link_info;
@@ -704,7 +704,7 @@
 			struct gbproxy_nse *nse;
 			struct gbproxy_bvc *bvc;
 			counter = 0;
-			llist_for_each_entry(nse, &g_cfg->nses, list) {
+			llist_for_each_entry(nse, &g_cfg->bss_nses, list) {
 				if (nse->nsei != nsei)
 					continue;
 				llist_for_each_entry(bvc, &nse->bvcs, list) {
diff --git a/tests/gbproxy/gbproxy_test.c b/tests/gbproxy/gbproxy_test.c
index 873319b..5538089 100644
--- a/tests/gbproxy/gbproxy_test.c
+++ b/tests/gbproxy/gbproxy_test.c
@@ -129,7 +129,7 @@
 		return rc;
 
 
-	llist_for_each_entry(nse, &cfg->nses, list) {
+	llist_for_each_entry(nse, &cfg->bss_nses, list) {
 		struct gbproxy_bvc *peer;
 		llist_for_each_entry(peer, &nse->bvcs, list) {
 			struct gbproxy_link_info *link_info;

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: If5accec0c70c01b88927ea07beba6f6488bd9d5a
Gerrit-Change-Number: 21549
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
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/20201207/8e29d3e5/attachment.htm>


More information about the gerrit-log mailing list