Attention is currently required from: osmith, neels, dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33216 )
Change subject: osmo_sccp_simple_client_on_ss7_id(): Support ASP explicitly configured as sctp server
......................................................................
Patch Set 8:
(1 comment)
File src/sccp_user.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/33216/comment/1e1ea4c7_4dc825f1
PS8, Line 648: asp->cfg.is_server = false;
> should we print a warning here? again not sure if asp->cfg. […]
"asp->cfg.is_server = true"is set by default in osmo_ss7_asp_find_or_create().
So here we want to set it to false by default *iif* it was not explicitly set over the VTY.
It's not that important since I'm anwyay cleaning this complex logic in a followup patch (I did 2 patches because the next one is changing old behavior, while this one more like extends/fixes the old behavior).
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33216
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I20de33edb8751a515d6719c49efadfc387dd85f8
Gerrit-Change-Number: 33216
Gerrit-PatchSet: 8
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 14 Jun 2023 11:53:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels, pespin, dexter.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33216 )
Change subject: osmo_sccp_simple_client_on_ss7_id(): Support ASP explicitly configured as sctp server
......................................................................
Patch Set 8:
(2 comments)
File src/osmo_ss7_vty.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/33216/comment/01d59d37_c2ff2e0d
PS8, Line 858: || !asp->cfg.is_server
I wonder if this still makes sense. Is there any way asp->cfg.is_server could be set to true without going through the VTY?
File src/sccp_user.c:
https://gerrit.osmocom.org/c/libosmo-sccp/+/33216/comment/10792355_d13c5093
PS8, Line 648: asp->cfg.is_server = false;
should we print a warning here? again not sure if asp->cfg.is_server can change without the vty
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33216
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I20de33edb8751a515d6719c49efadfc387dd85f8
Gerrit-Change-Number: 33216
Gerrit-PatchSet: 8
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 14 Jun 2023 11:49:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/33313 )
Change subject: mgcp_client: pool: Only pick clients with an MGCP link considered to be UP
......................................................................
mgcp_client: pool: Only pick clients with an MGCP link considered to be UP
This way the user ends up picking a working MGW instance instead of one
which is not reachable around the time.
Related: SYS#6481
Change-Id: Ia3f451d3cd97851f65074408812b1ddc68f67056
---
M src/libosmo-mgcp-client/mgcp_client_pool.c
1 file changed, 18 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/13/33313/1
diff --git a/src/libosmo-mgcp-client/mgcp_client_pool.c b/src/libosmo-mgcp-client/mgcp_client_pool.c
index 4156664..61fb134 100644
--- a/src/libosmo-mgcp-client/mgcp_client_pool.c
+++ b/src/libosmo-mgcp-client/mgcp_client_pool.c
@@ -94,7 +94,7 @@
}
/* Not every pool member may have a functional MGCP client, we will run through the pool once until we meet a
- * pool member that is suitable (has a client, is not blocked, has a low load). */
+ * pool member that is suitable (is not blocked, has a client with a working link, has a low load). */
static struct mgcp_client_pool_member *mgcp_client_pool_pick(struct mgcp_client_pool *pool)
{
struct mgcp_client_pool_member *pool_member;
@@ -103,14 +103,15 @@
llist_for_each_entry(pool_member, &pool->member_list, list) {
n_pool_members++;
- if (pool_member->blocked == false && pool_member->client) {
+ bool conn_up = pool_member->client && pool_member->client->conn_up;
+ if (pool_member->blocked == false && conn_up) {
if (!pool_member_picked)
pool_member_picked = pool_member;
else if (pool_member_picked->refcount > pool_member->refcount)
pool_member_picked = pool_member;
} else {
- LOGPPMGW(pool_member, LOGL_DEBUG, "%s -- MGW %u is unusable (blocked=%u, cli=%u)\n",
- __func__, pool_member->nr, pool_member->blocked, !!pool_member->client);
+ LOGPPMGW(pool_member, LOGL_DEBUG, "%s -- MGW %u is unusable (blocked=%u, cli=%u, link=%u)\n",
+ __func__, pool_member->nr, pool_member->blocked, !!pool_member->client, conn_up);
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33313
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia3f451d3cd97851f65074408812b1ddc68f67056
Gerrit-Change-Number: 33313
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/33312 )
Change subject: mgw: Allow auditing speciall 'null' endpoint
......................................................................
mgw: Allow auditing speciall 'null' endpoint
This is a special endpoint which can always be audited. This is useful
for clients who wish to submit requests to osmo-mgw periodically to find
out whether the MGW is still reachable. This endpoint will be used by
libomso-mgcp-client as default target endpoint to implement such
feature.
This "null" Endpoint is osmo-mgw specific, not described in MGCP specs.
Related: SYS#6481
Change-Id: Ia409b16e9211e6261e2e0f21288544289d6f3733
---
M doc/manuals/chapters/mgcp_endpoints.adoc
M src/libosmo-mgcp/mgcp_endp.c
M src/libosmo-mgcp/mgcp_protocol.c
3 files changed, 49 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/12/33312/1
diff --git a/doc/manuals/chapters/mgcp_endpoints.adoc b/doc/manuals/chapters/mgcp_endpoints.adoc
index 797fdea..2fb6e16 100644
--- a/doc/manuals/chapters/mgcp_endpoints.adoc
+++ b/doc/manuals/chapters/mgcp_endpoints.adoc
@@ -91,4 +91,10 @@
not yet useable.
NOTE: the VTY command "show mgcp" can be used to get a list of all available
-endpoints (including identifiers)
\ No newline at end of file
+endpoints (including identifiers)
+
+=== The `null` endpoint
+
+OsmoMGW offers a special `null@<domain>` endpoint which can be audited at all times.
+This is useful for MGCP clients who wish to submit requests to OsmoMGW
+periodically to find out whether it is still reachable and in a working state.
\ No newline at end of file
diff --git a/src/libosmo-mgcp/mgcp_endp.c b/src/libosmo-mgcp/mgcp_endp.c
index 2bf15e0..7182fdd 100644
--- a/src/libosmo-mgcp/mgcp_endp.c
+++ b/src/libosmo-mgcp/mgcp_endp.c
@@ -229,6 +229,17 @@
return false;
}
+/*! Check if the given epname refers to a "null" endpoint.
+ * \param[in] epname endpoint name to check
+ * \returns true if epname refers to "null"" endpoint, else false. */
+bool mgcp_endp_is_null(const char *epname)
+{
+ if (strstr(epname, "null"))
+ return true;
+
+ return false;
+}
+
/*! Find an endpoint by its name on a specified trunk.
* \param[out] cause pointer to store cause code, can be NULL.
* \param[in] epname endpoint name to lookup.
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 1fa345b..ce9b85e 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -86,6 +86,9 @@
/* set to true when the request has been classified as wildcarded */
bool wildcarded;
+ /* Set to true when the request is targeted at the "null" endpoint */
+ bool null_endp;
+
/* contains cause code in case of problems during endp/trunk resolution */
int mgcp_cause;
};
@@ -390,7 +393,10 @@
/* Locate endpoint and trunk, if no endpoint can be located try at least to identify the trunk. */
rq.pdata = &pdata;
rq.wildcarded = mgcp_endp_is_wildcarded(pdata.epname);
- rq.endp = mgcp_endp_by_name(&rc, pdata.epname, pdata.cfg);
+ if (!rq.wildcarded)
+ rq.null_endp = mgcp_endp_is_null(pdata.epname);
+ if (!rq.null_endp)
+ rq.endp = mgcp_endp_by_name(&rc, pdata.epname, pdata.cfg);
rq.mgcp_cause = rc;
if (!rq.endp) {
rate_ctr_inc(rate_ctr_group_get_ctr(rate_ctrs, MGCP_GENERAL_RX_FAIL_NO_ENDPOINT));
@@ -407,14 +413,14 @@
rq.name, pdata.epname);
return create_err_response(cfg, NULL, -rq.mgcp_cause, rq.name, pdata.trans);
}
- } else {
+ } else if (!rq.null_endp) {
/* If the endpoint name suggests that the request refers to a specific endpoint, then the
* request cannot be handled and we must stop early. */
LOGP(DLMGCP, LOGL_NOTICE,
"%s: cannot find endpoint \"%s\", cause=%d -- abort\n", rq.name,
pdata.epname, -rq.mgcp_cause);
return create_err_response(cfg, NULL, -rq.mgcp_cause, rq.name, pdata.trans);
- }
+ } /* else: Handle special "null" endpoint below (with rq.endp=NULL, rq.trunk=NULL) */
} else {
osmo_strlcpy(debug_last_endpoint_name, rq.endp->name, sizeof(debug_last_endpoint_name));
rq.trunk = rq.endp->trunk;
@@ -460,6 +466,11 @@
static struct msgb *handle_audit_endpoint(struct mgcp_request_data *rq)
{
LOGPENDP(rq->endp, DLMGCP, LOGL_NOTICE, "AUEP: auditing endpoint ...\n");
+
+ /* Auditing "null" endpoint is allowed for keepalive purposes. There's no rq->endp nor rq->trunk in this case. */
+ if (rq->null_endp)
+ return create_ok_response(rq->pdata->cfg, NULL, 200, "AUEP", rq->pdata->trans);
+
if (!rq->endp || !mgcp_endp_avail(rq->endp)) {
LOGPENDP(rq->endp, DLMGCP, LOGL_ERROR, "AUEP: selected endpoint not available!\n");
return create_err_response(rq->trunk, NULL, 501, "AUEP", rq->pdata->trans);
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/33312
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ia409b16e9211e6261e2e0f21288544289d6f3733
Gerrit-Change-Number: 33312
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/33310 )
Change subject: mgwpool: Document keepalive feature
......................................................................
mgwpool: Document keepalive feature
Related: SYS#6481
Change-Id: I2cb4e2098b71b386278eb6026271a6d786a34c2a
---
M common/chapters/mgwpool.adoc
1 file changed, 60 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/10/33310/1
diff --git a/common/chapters/mgwpool.adoc b/common/chapters/mgwpool.adoc
index c4cf28a..9b0ca38 100644
--- a/common/chapters/mgwpool.adoc
+++ b/common/chapters/mgwpool.adoc
@@ -8,7 +8,7 @@
scale-out to multiple cores on a single host.
The load distribution is managed in such a way that when a new call is placed,
-the pool will automatically assign the call to the MGW with the lowest load.
+the pool will automatically assign the call to the available MGW with the lowest load.
MGW pooling is recommended for larger RAN or CN installations. For small networks
and lab installations the classic method with one MGW per {program-name} offers
@@ -74,10 +74,12 @@
% MGW 0:media-gw-0
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 1
% MGW 1:media-gw-1
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 0
----
@@ -112,14 +114,17 @@
% MGW 0:media-gw-0
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 2
% MGW 1:media-gw-1
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 3
% MGW 2:mgw <1>
% mgcp-client: disconnected
% service: unblocked
+% MGCP link: DOWN
% ongoing calls: 0
----
@@ -148,31 +153,62 @@
% MGW 0:media-gw-0
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 2
% MGW 1:media-gw-1
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 3
% MGW 2:mgw
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 0
----
It should be noted that MGCP a protocol is used via UDP, the connect only
-happens locally to forward the UDP datagrams properly. Also (unless a reset
-endpoint is configured like in the example config above) there will be no
-immediate interaction with the MGW. However, the log should at least confirm
-the connect worked and the MGCP client has been created successfully.
+happens locally to forward the UDP datagrams properly (state printed in
+`mgcp-client: (dis)connected` above). Also (unless a reset endpoint is
+configured like in the example config above) there will be no immediate
+interaction with the MGW. However, the log should at least confirm the connect
+worked and the MGCP client has been created successfully.
----
Mon Aug 2 17:15:00 2021 DLMGCP mgcp_client.c:788 MGCP client: using endpoint domain '@mgw'
Mon Aug 2 17:15:00 2021 DLMGCP mgcp_client.c:908 MGCP GW connection: r=127.0.0.1:2427<->l=127.0.0.1:2727
----
-It is strongly advised to check the activity on the related MGW and to follow
-the log in order to see that the communication between {program-name} and the MGW is
-working correctly.
+For that reason, it is strongly advised to enable the `keepalive` feature in
+{program-name} to schedule periodical queries on the MGW against the
+MGW, in order to make sure it is reachable (the state `MGCP link: UP|DOWN` printed above).
+See section <<mgw_pooling_keepalive>> below for more information.
+
+[[mgw_pooling_keepalive]]
+==== Monitor MGCP link (keepalive) / MGCP-Client
+
+The `keepalive` feature in {program-name} allows scheduling periodical queries on the MGCP layer in order to make sure it is reachable and hence obtain information on the state of the MGCP link. This is in turn used by the MGW Pool when picking an MGW from the pool: MGWs whose link is considered to be DOWN are skipped.
+
+The feature consists of:
+- A `keepalive request-interval` which will trigger a transmission of an MGCP AuditEndpoint command targeting endpoint with name `keepalive request-endpoint`. This interval is updated every time any message is transmitted in the MGCP link, meaning the MGCP AuditEndpoint message is only triggered if no message has been transmitted since `keepalive request-interval` seconds ago.
+- A `keepalive timeout` considering the MGW to be non-reachable (link DOWN) if no message is received over that amount of time.
+
+The `keepalive` parameters are to be preferrably configured so that `"keepalive request-interval" * 2 < "keepalive timeout"`.
+
+Example VTY configuration of `keepalive` feature in {program-name}:
+----
+ mgw 0
+ ...
+ keepalive request-interval 20 <1>
+ keepalive request-endpoint null <2>
+ keepalive timeout 50 <3>
+----
+
+<1> Transmit an MGCP AuditEndpoint message to the MGW if no message has been sent to it over last 10 seconds
+<2> The MGCP AuditEndpoint targets the `null` endpoint. This is a special endpoint available at OsmoMGW for those purposes, but any available endpoint can be configured and used instead.
+<3> Consider the MGCP link to be DOWN if no message is received from the MGW over the last 50 seconds
+
+NOTE: The `keepalive` feature is disabled by default, and must be explicitly configured in order to enable it.
[[mgw_pooling_blocking]]
==== Blocking an MGW / MGCP-Client
@@ -190,14 +226,17 @@
% MGW 0:media-gw-0
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 11
% MGW 1:media-gw-1
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 12
% MGW 2:mgw
% mgcp-client: connected
% service: blocked
+% MGCP link: UP
% ongoing calls: 10
----
@@ -210,14 +249,17 @@
% MGW 0:media-gw-0
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 15
% MGW 1:media-gw-1
% mgcp-client: connected
% service: unblocked
+% MGCP link: UP
% ongoing calls: 14
% MGW 2:mgw
% mgcp-client: connected
% service: blocked
+% MGCP link: UP
% ongoing calls: 0
----
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/33310
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I2cb4e2098b71b386278eb6026271a6d786a34c2a
Gerrit-Change-Number: 33310
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33254 )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: stream: Use cli->state to check if cli is already closed
......................................................................
stream: Use cli->state to check if cli is already closed
Change-Id: I92231528da08f8891e20c1226b61989a65e00ccd
---
M src/stream.c
1 file changed, 10 insertions(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/stream.c b/src/stream.c
index 7c8e21e..6fb41f1 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -306,7 +306,7 @@
* abstraction and close the socket */
void osmo_stream_cli_close(struct osmo_stream_cli *cli)
{
- if (cli->ofd.fd == -1)
+ if (cli->state == STREAM_CLI_STATE_CLOSED)
return;
osmo_fd_unregister(&cli->ofd);
close(cli->ofd.fd);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33254
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I92231528da08f8891e20c1226b61989a65e00ccd
Gerrit-Change-Number: 33254
Gerrit-PatchSet: 3
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: osmith, neels, dexter.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33216 )
Change subject: osmo_sccp_simple_client_on_ss7_id(): Support ASP explicitly configured as sctp server
......................................................................
Patch Set 8:
(1 comment)
Patchset:
PS8:
ping. It's been one week since I submitted last version of this patch, and got yet not enough reviews.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33216
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I20de33edb8751a515d6719c49efadfc387dd85f8
Gerrit-Change-Number: 33216
Gerrit-PatchSet: 8
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 14 Jun 2023 09:12:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33269 )
Change subject: pcu: Rework test TC_ul_tbf_reestablish_with_pkt_resource_req_n3105_max to base it on T3168
......................................................................
pcu: Rework test TC_ul_tbf_reestablish_with_pkt_resource_req_n3105_max to base it on T3168
N3105 is used for DL TBFs only (as tested by TC_n3105_max_t3195). The
test TC_ul_tbf_reestablish_with_pkt_resource_req_n3105_max is hence
wrongly written and should be based on T3168. Since recently, osmo-pcu
also moved to using T3168 in the scenario triggered by this test, hence
move to using it.
Related: osmo-pcu.git Change-Id I87dff68dedd06b60501e7586d20faf02bb1f0c93
Change-Id: Ibdfa9879cc56f5e2090cee0d3d70ee5df7c90454
---
M pcu/PCU_Tests.ttcn
M pcu/expected-results.xml
2 files changed, 45 insertions(+), 48 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index f859b9b..9388f8f 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -3373,7 +3373,7 @@
* ending, by means of sending a Packet Resource Request on ul slot provided by
* last Pkt Ul ACK's RRBP. new Pkt Ul Ass is never confirmed by the MS in this test.
* See 3GPP TS 44.060 sec 9.3.2.4.2 "Non-extended uplink TBF mode" */
-testcase TC_ul_tbf_reestablish_with_pkt_resource_req_n3105_max() runs on RAW_PCU_Test_CT {
+testcase TC_ul_tbf_reestablish_with_pkt_resource_req_t3168() runs on RAW_PCU_Test_CT {
var PCUIF_info_ind info_ind;
var RlcmacDlBlock dl_block;
var octetstring data := f_rnd_octstring(10);
@@ -3383,9 +3383,10 @@
var BTS_PDTCH_Block data_msg;
var template RlcmacDlBlock acknack_tmpl;
var GprsMS ms;
- const integer N3105_MAX := 2;
- var integer N3105 := 0;
- timer T_3195 := 1.0 + 0.5; /* 0.5: extra offset since we cannot match exactly */
+ var integer cnt_rrbp := 0;
+ var integer cnt_dummy_after_timeout := 0;
+ /* Maximum T3168 value = 8 * 500 ms = 4s => * 4 retrans = 16s */
+ timer T_3168 := 16.0 + 0.5; /* 0.5: extra offset since we cannot match exactly */
/* Initialize NS/BSSGP side */
f_init_bssgp();
@@ -3395,9 +3396,7 @@
/* Initialize the PCU interface abstraction */
info_ind := valueof(ts_PCUIF_INFO_default(c_PCUIF_Flags_noMCS));
- /* Speedup test: */
- info_ind.n3105 := N3105_MAX;
- info_ind.t3195 := 1;
+ /* TODO: Speedup test by sending a PCU_IF_SAPI_BCCH SI13 with T3168=0 (500ms) */
f_init_raw(testcasename(), info_ind);
/* Establish BSSGP connection to the PCU */
@@ -3423,6 +3422,7 @@
/* TODO: verify TBF_EST and FinalACK are both '1' above */
/* Send PACKET RESOURCE REQUEST to request a new UL TBF */
+ T_3168.start;
f_ms_tx_ul_block(ms, ts_RLC_UL_CTRL_ACK(ts_RlcMacUlCtrl_PKT_RES_REQ(ms.tlli, omit)), sched_fn);
/* Now Keep ignoring the Pkt Ul Ass on PACCH: */
@@ -3433,12 +3433,18 @@
arfcn := f_trxnr2arfcn(valueof(nr.trx_nr)),
block_nr := nr.blk_nr));
alt {
- [not T_3195.running] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
+ [] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH),
tr_RLCMAC_UL_PACKET_ASS)) -> value data_msg {
+ /* We should not be receiving PKT UL ASS anymore after T3168 timeout */
+ if (not T_3168.running) {
+ setverdict(fail, log2str("Unexpected PKT UL ASS after T3168 timeout: ", data_msg));
+ f_shutdown(__BFILE__, __LINE__);
+ }
+
if (f_dl_block_rrbp_valid(data_msg.dl_block)) {
- log("Ignoring RRBP N3105 ", N3105);
- N3105 := N3105 + 1;
+ log("Ignoring RRBP ", cnt_rrbp);
+ cnt_rrbp := cnt_rrbp + 1;
}
nr := ts_TsTrxBtsNum;
BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr,
@@ -3447,15 +3453,9 @@
block_nr := nr.blk_nr));
repeat;
}
- /* At this point in time (N3105_MAX reached), PCU already moved TBF to
- * RELEASE state so no data for it is tx'ed, hence the dummy blocks:
- */
- [N3105 == N3105_MAX] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
+ [] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH),
tr_RLCMAC_DL_DUMMY_CTRL)) -> value data_msg {
- if (not T_3195.running) {
- T_3195.start;
- }
nr := ts_TsTrxBtsNum;
BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr,
sapi := PCU_IF_SAPI_PDTCH, fn := 0,
@@ -3463,44 +3463,25 @@
block_nr := nr.blk_nr));
repeat;
}
- [N3105 == N3105_MAX] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
+ [] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH),
omit)) -> value data_msg {
- /* We may already receive idle blocks before our own TTCN3 timer
- * triggers due to the TBF being released. Keep going until our T_3195 triggers. */
- nr := ts_TsTrxBtsNum;
- BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr,
- sapi := PCU_IF_SAPI_PDTCH, fn := 0,
- arfcn := f_trxnr2arfcn(valueof(nr.trx_nr)),
- block_nr := nr.blk_nr));
- repeat;
+
+ /* T3168 expired and we are not receiving blocks anymore, meaning PCU released the TBF. */
+ break;
}
- /* We receive Dummy blocks in between Pkt Ul Ass while PCU waits for us to ack it */
- [not T_3195.running] BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
- tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH),
- tr_RLCMAC_DL_DUMMY_CTRL)) -> value data_msg {
- log("Ignoring Dummy block FN ", data_msg.raw.fn);
- nr := ts_TsTrxBtsNum;
- BTS.send(ts_PCUIF_RTS_REQ(nr.bts_nr, nr.trx_nr, nr.ts_nr,
- sapi := PCU_IF_SAPI_PDTCH, fn := 0,
- arfcn := f_trxnr2arfcn(valueof(nr.trx_nr)),
- block_nr := nr.blk_nr));
- repeat;
- }
- [T_3195.running] T_3195.timeout {
- log("T_3195 timeout");
- /* Done in alt, wait for pending RTS initiated previously in
- * above case before continuing (expect nothing to be sent since there's no active TBF): */
- BTS.receive(tr_PCUIF_DATA_PDTCH(nr.bts_nr,
- tr_PCUIF_DATA(nr.trx_nr, nr.ts_nr, sapi := PCU_IF_SAPI_PDTCH),
- omit));
- }
[] BTS.receive {
setverdict(fail, "Unexpected BTS message");
f_shutdown(__BFILE__, __LINE__);
}
}
+ /* Check that we received at least a few PKT UL ASS before T3168 expiration */
+ if (cnt_rrbp <= 3) {
+ setverdict(fail, log2str("Received only ", cnt_rrbp, " before T3168 timeout!"));
+ f_shutdown(__BFILE__, __LINE__);
+ }
+
f_shutdown(__BFILE__, __LINE__, final := true);
}
@@ -7145,7 +7126,7 @@
execute( TC_dl_multislot_tbf_ms_class_from_2phase() );
execute( TC_ul_multislot_tbf_ms_class_from_2phase() );
execute( TC_ul_tbf_reestablish_with_pkt_resource_req() );
- execute( TC_ul_tbf_reestablish_with_pkt_resource_req_n3105_max() );
+ execute( TC_ul_tbf_reestablish_with_pkt_resource_req_t3168() );
execute( TC_ul_tbf_reestablish_with_pkt_dl_ack_nack() );
execute( TC_ul_tbf_reestablish_with_pkt_dl_ack_nack_egprs() );
diff --git a/pcu/expected-results.xml b/pcu/expected-results.xml
index 1f953aa..cdc4aec 100644
--- a/pcu/expected-results.xml
+++ b/pcu/expected-results.xml
@@ -95,7 +95,7 @@
<testcase classname='PCU_Tests' name='TC_dl_multislot_tbf_ms_class_from_2phase' time='MASKED'/>
<testcase classname='PCU_Tests' name='TC_ul_multislot_tbf_ms_class_from_2phase' time='MASKED'/>
<testcase classname='PCU_Tests' name='TC_ul_tbf_reestablish_with_pkt_resource_req' time='MASKED'/>
- <testcase classname='PCU_Tests' name='TC_ul_tbf_reestablish_with_pkt_resource_req_n3105_max' time='MASKED'/>
+ <testcase classname='PCU_Tests' name='TC_ul_tbf_reestablish_with_pkt_resource_req_t3168' time='MASKED'/>
<testcase classname='PCU_Tests' name='TC_ul_tbf_reestablish_with_pkt_dl_ack_nack' time='MASKED'/>
<testcase classname='PCU_Tests' name='TC_ul_tbf_reestablish_with_pkt_dl_ack_nack_egprs' time='MASKED'/>
<testcase classname='PCU_Tests' name='TC_multiplex_dl_gprs_egprs' time='MASKED'/>
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33269
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ibdfa9879cc56f5e2090cee0d3d70ee5df7c90454
Gerrit-Change-Number: 33269
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged