pespin has uploaded this change for review.

View Change

Logging improvements

Log the Node ID the PFCP Entity belongs to.
Log PFCP Node peer creation.

Change-Id: Ie3e015cdcce21876b48b70e8f8374052d6f30a20
---
M src/osmo-upf/pfcp_entity_peer.c
M src/osmo-upf/pfcp_node_peer.c
M src/osmo-upf/up_gtp_action.c
M src/osmo-upf/up_session.c
4 files changed, 13 insertions(+), 5 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/94/44094/1
diff --git a/src/osmo-upf/pfcp_entity_peer.c b/src/osmo-upf/pfcp_entity_peer.c
index 7b8c28d..9ac3981 100644
--- a/src/osmo-upf/pfcp_entity_peer.c
+++ b/src/osmo-upf/pfcp_entity_peer.c
@@ -112,7 +112,9 @@

static void pfcp_entity_peer_update_id(struct pfcp_entity_peer *peer)
{
- osmo_fsm_inst_update_id_f_sanitize(peer->fi, '-', "%s", pfcp_entity_peer_remote_addr_str(peer));
+ osmo_fsm_inst_update_id_f_sanitize(peer->fi, '-', "%s@%s",
+ pfcp_entity_peer_remote_addr_str(peer),
+ pfcp_node_peer_node_id_str(peer->node_peer));
LOGPFSML(peer->fi, LOGL_DEBUG, "Updated id\n");
}

diff --git a/src/osmo-upf/pfcp_node_peer.c b/src/osmo-upf/pfcp_node_peer.c
index f4c7025..92abd2e 100644
--- a/src/osmo-upf/pfcp_node_peer.c
+++ b/src/osmo-upf/pfcp_node_peer.c
@@ -113,6 +113,8 @@
osmo_pfcp_bits_set(node_peer->local_up_features.bits, OSMO_PFCP_UP_FEAT_FTUP, true);

llist_add(&node_peer->entry, &up_endpoint->pfcp_node_peer_list);
+
+ LOG_PNP(node_peer, LOGL_NOTICE, "created\n");
return node_peer;
}

diff --git a/src/osmo-upf/up_gtp_action.c b/src/osmo-upf/up_gtp_action.c
index 8ae2c3e..776d4a0 100644
--- a/src/osmo-upf/up_gtp_action.c
+++ b/src/osmo-upf/up_gtp_action.c
@@ -29,6 +29,7 @@
#include <osmocom/upf/upf.h>
#include <osmocom/upf/up_gtp_action.h>
#include <osmocom/upf/pfcp_entity_peer.h>
+#include <osmocom/upf/pfcp_node_peer.h>
#include <osmocom/upf/up_session.h>

int up_gtp_action_cmp(const struct up_gtp_action *a, const struct up_gtp_action *b)
@@ -187,8 +188,10 @@
break;
}
if (a->session)
- OSMO_STRBUF_PRINTF(sb, " PFCP-peer:%s SEID-l:0x%"PRIx64,
- pfcp_entity_peer_remote_addr_str(a->session->entity_peer), a->session->up_seid);
+ OSMO_STRBUF_PRINTF(sb, " PFCP-peer:%s@%s SEID-l:0x%"PRIx64,
+ pfcp_entity_peer_remote_addr_str(a->session->entity_peer),
+ pfcp_node_peer_node_id_str(a->session->entity_peer->node_peer),
+ a->session->up_seid);
OSMO_STRBUF_PRINTF(sb, " PDR-access:%d", a->pdr_access);
OSMO_STRBUF_PRINTF(sb, " PDR-core:%d", a->pdr_core);
return sb.chars_needed;
diff --git a/src/osmo-upf/up_session.c b/src/osmo-upf/up_session.c
index 5fd664b..6cbd03d 100644
--- a/src/osmo-upf/up_session.c
+++ b/src/osmo-upf/up_session.c
@@ -1012,9 +1012,10 @@

static void up_session_update_id(struct up_session *session)
{
- osmo_fsm_inst_update_id_f_sanitize(session->fi, '-', "%s-0x%" PRIx64,
+ osmo_fsm_inst_update_id_f_sanitize(session->fi, '-', "%s-0x%" PRIx64 "@%s",
pfcp_entity_peer_remote_addr_str(session->entity_peer),
- session->up_seid);
+ session->up_seid,
+ pfcp_node_peer_node_id_str(session->entity_peer->node_peer));
LOGPFSML(session->fi, LOGL_DEBUG, "Updated id\n");
}


To view, visit change 44094. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ie3e015cdcce21876b48b70e8f8374052d6f30a20
Gerrit-Change-Number: 44094
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>