neels has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-upf/+/31486 )

 (

2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: cosmetic: clarify session active / partially active semantics
......................................................................

cosmetic: clarify session active / partially active semantics

Change-Id: I2db85b3ffd61cbf8fb404b17ee3b6593d1d189c4
---
M src/osmo-upf/up_session.c
M src/osmo-upf/upf_vty.c
2 files changed, 15 insertions(+), 1 deletion(-)

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




diff --git a/src/osmo-upf/up_session.c b/src/osmo-upf/up_session.c
index 593f131..1438cce 100644
--- a/src/osmo-upf/up_session.c
+++ b/src/osmo-upf/up_session.c
@@ -1529,11 +1529,16 @@
        return cause;
 }

+/* Return true when the session is in Established state and has active GTP 
actions. */
 bool up_session_is_active(struct up_session *session)
 {
        return session && (session->fi->state == UP_SESSION_ST_ESTABLISHED) && 
!llist_empty(&session->active_gtp_actions);
 }

+/* Return true when up_session_is_active() == true *and* it has only active 
PDR/FAR pairs.
+ * A PDR/FAR is inactive when it is not part of an active GTP action. Reasons 
may be that it has no PDR-to-FAR relation,
+ * there is no matching reverse PDR/FAR, that a FAR is not set to FORW, an 
ignored Source/Destination Interface, ...
+ */
 bool up_session_is_fully_active(struct up_session *session, int *active_p, int 
*inactive_p)
 {
        struct pdr *pdr;
diff --git a/src/osmo-upf/upf_vty.c b/src/osmo-upf/upf_vty.c
index 4a76439..44d14db 100644
--- a/src/osmo-upf/upf_vty.c
+++ b/src/osmo-upf/upf_vty.c
@@ -481,7 +481,7 @@
                        }
                }
        }
-       vty_out(vty, "(%d fully-active + %d partially active + %d inactive)%s",
+       vty_out(vty, "(%d fully-active + %d active with some PDR/FAR ignored + 
%d inactive)%s",
                fully_active_count, active_count, inactive_count, VTY_NEWLINE);
        return CMD_SUCCESS;
 }

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

Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I2db85b3ffd61cbf8fb404b17ee3b6593d1d189c4
Gerrit-Change-Number: 31486
Gerrit-PatchSet: 4
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: neels <[email protected]>
Gerrit-MessageType: merged

Reply via email to