neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30323 )
Change subject: upf: in PFCP Sess Est, use local F-TEID = CHOOSE
......................................................................
upf: in PFCP Sess Est, use local F-TEID = CHOOSE
So far the test asked osmo-upf to use an actual IP address and TEID, but
normally it is sent with CHOOSE = 1 so that osmo-upf picks a new local
TEID and returns it with the proper local IP address in the response.
This is making the test more realistic, and also prepares for testing
Network Instance handling, where osmo-upf will need to return the proper
IP addresses for specific Network Instance names.
Change-Id: Iaba372cbb2e0cf0c5bee80b09d346f9bcb78bfbe
---
M upf/UPF_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, approved
msuraev: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/upf/UPF_Tests.ttcn b/upf/UPF_Tests.ttcn
index fb4ef08..3dd469b 100644
--- a/upf/UPF_Tests.ttcn
+++ b/upf/UPF_Tests.ttcn
@@ -633,7 +633,7 @@
private function f_ruleset_tunend(GTP_Action gtp) return PFCP_Ruleset
{
var PFCP_Ruleset rules := { {}, {} };
- f_ruleset_add_GTP_decaps(rules, ts_PFCP_F_TEID_ipv4(gtp.teid_access_l, gtp.gtp_access_ip));
+ f_ruleset_add_GTP_decaps(rules, ts_PFCP_F_TEID_choose_v4());
f_ruleset_add_GTP_encaps(rules, gtp.core_ip, gtp.teid_access_r, gtp.gtp_access_ip);
return rules;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30323
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: Iaba372cbb2e0cf0c5bee80b09d346f9bcb78bfbe
Gerrit-Change-Number: 30323
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
neels has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/30321 )
Change subject: osmo_pfcp_ip_addrs_set(): do not set port number
......................................................................
osmo_pfcp_ip_addrs_set(): do not set port number
struct osmo_pfcp_ip_addrs uses an osmo_sockaddr for storing IP
addresses. Even though osmo_sockaddr contains a port number, no port
number gets encoded in PFCP messages. Hence always set the port to 0.
I noticed that when osmo_pfcp_ip_addrs_set() is invoked with an
osmo_sockaddr that incidentally has a port number set, subsequent
logging of e.g. a PFCP F-TEID shows a port number, which is confusing.
Change-Id: Ib29a123c06d459c99d7c1c0b9a7694fb78cd9fd8
---
M src/libosmo-pfcp/pfcp_msg.c
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
msuraev: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
neels: Looks good to me, approved
diff --git a/src/libosmo-pfcp/pfcp_msg.c b/src/libosmo-pfcp/pfcp_msg.c
index ff8860a..18b9113 100644
--- a/src/libosmo-pfcp/pfcp_msg.c
+++ b/src/libosmo-pfcp/pfcp_msg.c
@@ -494,16 +494,20 @@
return *next_seid_state;
}
+/* Set either dst->v4 or dst->v6 to addr, depending on addr->family. Set the IP address to addr and port to 0, not
+ * copying the port information from addr. Return zero on success, negative on error (i.e. no known family in addr). */
int osmo_pfcp_ip_addrs_set(struct osmo_pfcp_ip_addrs *dst, const struct osmo_sockaddr *addr)
{
switch (addr->u.sas.ss_family) {
case AF_INET:
dst->v4_present = true;
dst->v4 = *addr;
+ osmo_sockaddr_set_port(&dst->v4.u.sa, 0);
return 0;
case AF_INET6:
dst->v6_present = true;
dst->v6 = *addr;
+ osmo_sockaddr_set_port(&dst->v6.u.sa, 0);
return 0;
default:
return -ENOTSUP;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/30321
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: Ib29a123c06d459c99d7c1c0b9a7694fb78cd9fd8
Gerrit-Change-Number: 30321
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/30321 )
Change subject: osmo_pfcp_ip_addrs_set(): do not set port number
......................................................................
Patch Set 1: Code-Review+2
(2 comments)
Patchset:
PS1:
combine votes
File src/libosmo-pfcp/pfcp_msg.c:
https://gerrit.osmocom.org/c/libosmo-pfcp/+/30321/comment/37898af2_b875e635
PS1, Line 504: dst->v4 = *addr;
> Did you think about simply copying the address part? addr.u.in. […]
i find it conceptually simpler to set the port number to zero instead...
--
To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/30321
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: Ib29a123c06d459c99d7c1c0b9a7694fb78cd9fd8
Gerrit-Change-Number: 30321
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 28 Nov 2022 13:47:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: osmith, fixeria.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30307 )
Change subject: fsms: use configurable timers instead of T23042
......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-bsc/+/30307/comment/47c9582d_7b56631f
PS1, Line 9: It looks like T23042 was a placeholder for timers to be filled in later,
> T23042 may also look like a spec. reference - 3GPP TS 23. […]
let me assure you that i invented this number explicitly as a placeholder, please don't even consider looking in any spec for this number. it is made up, and i chose 23 and 42 and added a zero to hope to surpass the typical four digit range of existing timers, this happened in a time where (negative) X timers were not invented yet
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30307
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id0d4d0788f609f3272fc81c80a754383dde25c16
Gerrit-Change-Number: 30307
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 28 Nov 2022 13:41:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30347 )
Change subject: paging: Replace reqs waiting for retransmission with new incoming inital req if queue is full
......................................................................
paging: Replace reqs waiting for retransmission with new incoming inital req if queue is full
If queue size (in transmit delay of requests) is too long (above
threshold) when a new initial incoming request arrives, instead of
directly discarding it, see if we can drop a pending retransmission and
insert the new one instead, in order to avoid losing initial requests.
This is done under the assumption that is it more important to transmit
intial requests than to retransmit already transmitted ones. The
rationale is that there's lower chances than an MS which didn't answer
lately will answer now (aka being reachable at the cell), so it's better
to allocate resources for new requests (new MS) which may be available
in the cell.
Related: OS#5552
Change-Id: Idfd93254ae456b1ee08416e05479488299dd063d
---
M src/osmo-bsc/paging.c
1 file changed, 42 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/47/30347/1
diff --git a/src/osmo-bsc/paging.c b/src/osmo-bsc/paging.c
index 32ae627..50cc1ed 100644
--- a/src/osmo-bsc/paging.c
+++ b/src/osmo-bsc/paging.c
@@ -416,17 +416,10 @@
unsigned int reqs_before = 0, reqs_before_same_pgroup = 0;
uint8_t pgroup = gsm0502_calc_paging_group(&bts->si_common.chan_desc,
str_to_imsi(params->bsub->imsi));
+ bool queue_full = false;
rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_ATTEMPTED));
- /* Don't try to queue more requests than we can realistically handle within X3113 seconds,
- * see PAGING_THRESHOLD_X3113_DEFAULT_SEC. */
- OSMO_ASSERT(td_x3113);
- if (paging_pending_requests_nr(bts) > paging_estimate_available_slots(bts, td_x3113->val)) {
- rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_OVERLOAD));
- return -ENOSPC;
- }
-
/* Find if we already have one for the given subscriber on this BTS: */
if (bsc_subscr_find_req_by_bts(params->bsub, bts)) {
LOG_PAGING_BTS(params, bts, DPAG, LOGL_INFO, "Paging request already pending for this subscriber\n");
@@ -434,6 +427,22 @@
return -EEXIST;
}
+ /* Don't try to queue more requests than we can realistically handle within X3113 seconds,
+ * see PAGING_THRESHOLD_X3113_DEFAULT_SEC. */
+ OSMO_ASSERT(td_x3113);
+ if (paging_pending_requests_nr(bts) > paging_estimate_available_slots(bts, td_x3113->val)) {
+ struct gsm_paging_request *last_req;
+ rate_ctr_inc(rate_ctr_group_get_ctr(bts->bts_ctrs, BTS_CTR_PAGING_OVERLOAD));
+ OSMO_ASSERT(!llist_empty(&bts_entry->pending_requests));
+ last_req = llist_last_entry(&bts_entry->pending_requests, struct gsm_paging_request, entry);
+ if (last_req->attempts == 0) {
+ /* Queue is full of initial requests, discard new one */
+ return -ENOSPC;
+ }
+ /* There's at least 1 retrans. Flag to remove first retrans in queue once found below. */
+ queue_full = true;
+ }
+
/* Find the last not-yet-ever-once-transmitted request; the new request
* will be added immediately after it, giving higher prio to initial
* transmissions (no retrans). This avoids new subscribers being paged to
@@ -465,6 +474,31 @@
reqs_before_same_pgroup++;
}
+ /* Need to drop a retrans from the queue if possible, in order to make space for the new initial req. */
+ if (queue_full) {
+ if (!last_initial_req) {
+ /* Queue is full of retransmissions only, drop first one to free some space: */
+ struct gsm_paging_request *first_retrans_req;
+ first_retrans_req = llist_first_entry_or_null(&bts_entry->pending_requests, struct gsm_paging_request, entry);
+ OSMO_ASSERT(first_retrans_req);
+ reqs_before--;
+ if (first_retrans_req->pgroup == pgroup)
+ reqs_before_same_pgroup--;
+ paging_remove_request(first_retrans_req);
+ } else {
+ struct gsm_paging_request *last_req;
+ last_req = llist_last_entry(&bts_entry->pending_requests, struct gsm_paging_request, entry);
+ OSMO_ASSERT(last_req);
+ if (&last_initial_req->entry == llist_last(&bts_entry->pending_requests)) {
+ /* Queue is full of initial requests only, discard the current new req: */
+ return -ENOSPC;
+ }
+ /* We checked beforehand (set queue_full = true) that queue contains a retrans.
+ * Hence queue contains [1..N intials, 1..N retrans]: Drop first retransmission to free some space: */
+ paging_remove_request(llist_entry(last_initial_req->entry.next, struct gsm_paging_request, entry));
+ }
+ }
+
LOG_PAGING_BTS(params, bts, DPAG, LOGL_DEBUG, "Start paging\n");
req = talloc_zero(tall_paging_ctx, struct gsm_paging_request);
OSMO_ASSERT(req);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30347
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Idfd93254ae456b1ee08416e05479488299dd063d
Gerrit-Change-Number: 30347
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange