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/.
daniel gerrit-no-reply at lists.osmocom.orgdaniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21460 )
Change subject: gbproxy: Change generic LOG messageas so BVCI/NSEI fmt is consistent
......................................................................
gbproxy: Change generic LOG messageas so BVCI/NSEI fmt is consistent
Fixes: SYS#5233
Change-Id: I93296353dd964602699480faae1248096e331c6a
---
M src/gbproxy/gb_proxy.c
M src/gbproxy/gb_proxy_main.c
2 files changed, 18 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/60/21460/1
diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index af8c5fc..bad3838 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -570,7 +570,7 @@
if (!peer) {
LOGP(DLLC, LOGL_INFO,
- "NSEI=%d(%s) patching: didn't find peer for message, "
+ "NSE(%05u)(%s) patching: didn't find peer for message, "
"PDU %d\n",
msgb_nsei(msg), parse_ctx->to_bss ? "BSS" : "SGSN",
parse_ctx->pdu_type);
@@ -878,7 +878,7 @@
peer = gbproxy_peer_by_bvci(cfg, ptp_bvci);
if (!peer) {
- LOGP(DGPRS, LOGL_ERROR, "BVCI=%u: Cannot find BSS\n",
+ LOGP(DGPRS, LOGL_ERROR, "BVC(%05u/??) Cannot find BSS\n",
ptp_bvci);
rate_ctr_inc(&cfg->ctrg->ctr[GBPROX_GLOB_CTR_INV_BVCI]);
return -ENOENT;
@@ -908,7 +908,7 @@
peer = gbproxy_peer_by_bvci(cfg, ptp_bvci);
if (!peer) {
- LOGP(DGPRS, LOGL_ERROR, "BVCI=%u: Cannot find BSS\n",
+ LOGP(DGPRS, LOGL_ERROR, "BVC(%05u/??) Cannot find BSS\n",
ptp_bvci);
rate_ctr_inc(&cfg->ctrg->ctr[GBPROX_GLOB_CTR_INV_BVCI]);
return -ENOENT;
@@ -934,8 +934,8 @@
peer = gbproxy_peer_by_bvci(cfg, ns_bvci);
if (!peer) {
- LOGP(DGPRS, LOGL_NOTICE, "Didn't find peer for "
- "BVCI=%u for PTP message from NSEI=%u (BSS), "
+ LOGP(DGPRS, LOGL_NOTICE, "BVC(%05u/??) Didn't find peer "
+ "for PTP message from NSE(%05u/BSS), "
"discarding message\n",
ns_bvci, nsei);
return bssgp_tx_status(BSSGP_CAUSE_UNKNOWN_BVCI,
@@ -978,8 +978,8 @@
/* Send status messages before patching */
if (!peer) {
- LOGP(DGPRS, LOGL_INFO, "Didn't find peer for "
- "BVCI=%u for message from NSEI=%u (SGSN)\n",
+ LOGP(DGPRS, LOGL_INFO, "BVC(%05u/??) Didn't find peer for "
+ "for message from NSE(%05u/SGSN)\n",
ns_bvci, nsei);
rate_ctr_inc(&cfg->ctrg->
ctr[GBPROX_GLOB_CTR_INV_BVCI]);
@@ -1029,7 +1029,7 @@
int rc;
if (ns_bvci != 0 && ns_bvci != 1) {
- LOGP(DGPRS, LOGL_NOTICE, "NSEI=%u BVCI=%u is not signalling\n",
+ LOGP(DGPRS, LOGL_NOTICE, "NSE(%05u) BVCI=%05u is not signalling\n",
nsei, ns_bvci);
return -EINVAL;
}
@@ -1038,7 +1038,7 @@
* just to make sure */
if (pdu_type == BSSGP_PDUT_UL_UNITDATA ||
pdu_type == BSSGP_PDUT_DL_UNITDATA) {
- LOGP(DGPRS, LOGL_NOTICE, "NSEI=%u UNITDATA not allowed in "
+ LOGP(DGPRS, LOGL_NOTICE, "NSE(%05u) UNITDATA not allowed in "
"signalling\n", nsei);
return -EINVAL;
}
@@ -1072,14 +1072,14 @@
* is common for all point-to-point BVCs (and thus all BTS) */
if (TLVP_PRESENT(&tp, BSSGP_IE_BVCI)) {
uint16_t bvci = ntohs(tlvp_val16_unal(&tp, BSSGP_IE_BVCI));
- LOGP(DGPRS, LOGL_INFO, "NSEI=%u Rx BVC RESET (BVCI=%u)\n",
+ LOGP(DGPRS, LOGL_INFO, "NSE(%05u) Rx BVC RESET (BVCI=%05u)\n",
nsei, bvci);
if (bvci == 0) {
struct gbproxy_nse *nse;
/* Ensure the NSE peer is there and clear all PtP BVCs */
nse = gbproxy_nse_by_nsei_or_new(cfg, nsei);
if (!nse) {
- LOGP(DGPRS, LOGL_ERROR, "Could not allocate NSE for NSEI=%u\n", nsei);
+ LOGP(DGPRS, LOGL_ERROR, "Could not create NSE(%05u)\n", nsei);
return bssgp_tx_status(BSSGP_CAUSE_PROTO_ERR_UNSPEC, 0, msg);
}
@@ -1095,8 +1095,8 @@
if (!from_peer) {
struct gbproxy_nse *nse = gbproxy_nse_by_nsei(cfg, nsei);
if (!nse) {
- LOGP(DGPRS, LOGL_NOTICE, "Got PtP BVC reset before signalling reset for "
- "BVCI=%u NSEI=%u\n", bvci, nsei);
+ LOGP(DGPRS, LOGL_NOTICE, "NSE(%05u) Got PtP BVC reset before signalling reset for "
+ "BVCI=%05u\n", nsei, bvci);
return bssgp_tx_status(BSSGP_CAUSE_PDU_INCOMP_STATE, NULL, msg);
}
/* if a PTP-BVC is reset, and we don't know that
@@ -1108,13 +1108,14 @@
/* Could have moved to a different NSE */
if (!check_peer_nsei(from_peer, nsei)) {
+ LOGPBVC(from_peer, LOGL_NOTICE, "moving peer to NSE(%05u)\n", nsei);
+
struct gbproxy_nse *nse_new = gbproxy_nse_by_nsei(cfg, nsei);
if (!nse_new) {
- LOGP(DGPRS, LOGL_NOTICE, "Got PtP BVC reset before signalling reset for "
- "BVCI=%u NSEI=%u\n", bvci, nsei);
+ LOGP(DGPRS, LOGL_NOTICE, "NSE(%05u) Got PtP BVC reset before signalling reset for "
+ "BVCI=%05u\n", bvci, nsei);
return bssgp_tx_status(BSSGP_CAUSE_PDU_INCOMP_STATE, NULL, msg);
}
- LOGPBVC(from_peer, LOGL_NOTICE, "Peer moved to NSEI=%u\n", nsei);
/* Move peer to different NSE */
gbproxy_peer_move(from_peer, nse_new);
diff --git a/src/gbproxy/gb_proxy_main.c b/src/gbproxy/gb_proxy_main.c
index 3ab8e49..c7ff78c 100644
--- a/src/gbproxy/gb_proxy_main.c
+++ b/src/gbproxy/gb_proxy_main.c
@@ -321,7 +321,7 @@
}
if (!gprs_ns2_nse_by_nsei(gbcfg->nsi, gbcfg->nsip_sgsn_nsei)) {
- LOGP(DGPRS, LOGL_FATAL, "You cannot proxy to NSEI %u "
+ LOGP(DGPRS, LOGL_FATAL, "You cannot proxy to NSE(%05u) "
"without creating that NSEI before\n",
gbcfg->nsip_sgsn_nsei);
exit(2);
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/21460
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I93296353dd964602699480faae1248096e331c6a
Gerrit-Change-Number: 21460
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201202/80e4ecd1/attachment.htm>