pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39499?usp=email )
Change subject: pcu: Fix TC_dl_cs1_to_cs4 sporadic fail
......................................................................
pcu: Fix TC_dl_cs1_to_cs4 sporadic fail
The test TC_dl_cs1_to_cs4 failed sporadically in ttcn3-pcu-test-asan.
Due to how the DL data arriving at Gb is split in chunks over RLC/MAC
(also based on how CS changes over time), it may happen that the full
PDU content doesn't finish at the exact block number where PCU expects
the DL ACK/NACK. As a result, since PCU delays finishing the DL TBF and
some data for that DL TBF has already not been ACKed (and since there's
no more active DL TBFs), it will decide to retransmit some of the
RLC/MAC blocks which haven't been yet ACKed, instead of transmitting
nothing.
This is an optimization to increase the probabilities the MS has
received all the data.
We need to account for this possibility in f_dl_data_exp_cs(), used in
the mentioned test. In there, it needs to be checked whether the
received DL data block is a retransmission, and use that knowledge to
resolve that all data has been transmitted and hence the final condition
can be checked.
Change-Id: I7fb40689547645adf1d54f43c263161be1d7a440
---
M pcu/GPRS_Components.ttcn
M pcu/PCU_Tests.ttcn
2 files changed, 72 insertions(+), 4 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/pcu/GPRS_Components.ttcn b/pcu/GPRS_Components.ttcn
index cf8ef5f..c48497a 100644
--- a/pcu/GPRS_Components.ttcn
+++ b/pcu/GPRS_Components.ttcn
@@ -439,6 +439,17 @@
return n;
}
+function f_dltbf_bsn_is_retrans(inout DlTbf dl_tbf, RlcmacDlBlock dl_block)
+runs on MS_BTS_IFACE_CT return boolean {
+ var boolean is_egprs := ischosen(dl_block.data_egprs);
+ var uint11_t bsn := f_rlcmac_dl_block_get_bsn(dl_block);
+ if (is_egprs) {
+ return f_egprs_acknackdesc_bsn_is_retrans(dl_tbf.egprs_acknack_desc, bsn);
+ } else {
+ return f_acknackdesc_bsn_is_retrans(dl_tbf.acknack_desc, bsn);
+ }
+}
+
function f_dltbf_ack_block(inout DlTbf dl_tbf, RlcmacDlBlock dl_block, BIT1 final_ack := '0'B)
runs on MS_BTS_IFACE_CT {
var boolean is_egprs := ischosen(dl_block.data_egprs);
@@ -796,6 +807,36 @@
return CS_1; /* make compiler happy */
}
+function f_rlcmac_dl_block_get_bsn(RlcmacDlBlock dl_block)
+runs on MS_BTS_IFACE_CT return uint11_t {
+ if (ischosen(dl_block.data_egprs)) {
+ return dl_block.data_egprs.mac_hdr.bsn1;
+ }
+ if (ischosen(dl_block.data)) {
+ return dl_block.data.mac_hdr.hdr_ext.bsn;
+ }
+ setverdict(fail, "DlBlock doesn't contain BSN information:", dl_block);
+ f_shutdown(__BFILE__, __LINE__);
+ return 0; /* make compiler happy */
+}
+
+/* Check whether a given BSN is a retransmission in the not yet ACKed Tx window. */
+function f_acknackdesc_bsn_is_retrans(inout AckNackDescription desc, uint7_t bsn) return boolean
+{
+ var BIT1 received;
+ /* Filling hole? */
+ if (bsn < desc.starting_seq_nr) {
+ received := desc.receive_block_bitmap[lengthof(desc.receive_block_bitmap) - (desc.starting_seq_nr - bsn)];
+ return received == '1'B;
+ }
+ /* Filling hole, wraparound: */
+ if (bsn - desc.starting_seq_nr > lengthof(desc.receive_block_bitmap)) {
+ received := desc.receive_block_bitmap[lengthof(desc.receive_block_bitmap) - (desc.starting_seq_nr + (218 - bsn))];
+ return received == '1'B;
+ }
+ return false; /* make compiler happy */
+}
+
/* TS 44.060 sec 12.3 Ack/Nack Description */
function f_acknackdesc_ack_block(inout AckNackDescription desc, RlcmacDlBlock dl_block, BIT1 final_ack := '0'B)
{
@@ -832,6 +873,29 @@
desc.final_ack := final_ack;
}
+/* Check whether a given BSN is a retransmission in the not yet ACKed Tx window. */
+function f_egprs_acknackdesc_bsn_is_retrans(inout EgprsAckNackDescription desc, uint11_t bsn) return boolean
+{
+ var BIT1 received;
+ var integer inc;
+ var integer v_q := (desc.starting_seq_nr + 2047) mod 2048; /* SSN = V(Q) + 1 */
+
+
+ /* Repetition? */
+ if (bsn < v_q) {
+ /* Filling hole, wraparound: */
+ if (bsn - v_q > lengthof(desc.urbb)) {
+ received := desc.urbb[lengthof(desc.urbb) - (v_q + (2048 - bsn))];
+ return received == '1'B;
+ }
+ return true;
+ }
+
+ inc := bsn - v_q + 1;
+ received := desc.urbb[lengthof(desc.urbb) - inc];
+ return received == '1'B;
+}
+
/* TS 44.060 sec 12.3 Ack/Nack Description */
function f_egprs_acknackdesc_ack_block(inout EgprsAckNackDescription desc, RlcmacDlBlock dl_block, BIT1 final_ack := '0'B)
{
diff --git a/pcu/PCU_Tests.ttcn b/pcu/PCU_Tests.ttcn
index 7aca712..f1f80db 100644
--- a/pcu/PCU_Tests.ttcn
+++ b/pcu/PCU_Tests.ttcn
@@ -1121,6 +1121,13 @@
break;
}
+ if (tx_data_remain == 0 and f_dltbf_bsn_is_retrans(ms.dl_tbf, dl_block)) {
+ /* If PCU already sent all data, it may happen that it retransmits data
+ * not yet ACKed before requesting an ACK after N transmissions. */
+ f_rlcmac_dl_block_exp_data(dl_block, ?, ?, exp_tmp_csmcs);
+ break;
+ }
+
f_rlcmac_dl_block_exp_data(dl_block, ?, bsn, exp_tmp_csmcs);
/* Keep Ack/Nack description updated */
@@ -1140,10 +1147,7 @@
f_rx_rlcmac_dl_block(dl_block, fn);
}
- bsn := (bsn + (bsn_mod-1)) mod bsn_mod; /* previous bsn: bsn -1 */
- f_rlcmac_dl_block_exp_data(prev_dl_block, ?, bsn, exp_final_cs);
-
-
+ f_rlcmac_dl_block_exp_data(prev_dl_block, ?, ?, exp_final_cs);
f_shutdown(__BFILE__, __LINE__, final := true);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39499?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7fb40689547645adf1d54f43c263161be1d7a440
Gerrit-Change-Number: 39499
Gerrit-PatchSet: 1
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: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/39512?usp=email )
Change subject: Bump version: 1.12.0.37-cf65-dirty → 1.13.0
......................................................................
Bump version: 1.12.0.37-cf65-dirty → 1.13.0
Change-Id: I7dbdd71d62fb13ba2ffc30d7d50fb4207a06340b
---
M TODO-RELEASE
M configure.ac
M debian/changelog
M debian/control
R debian/libgtp11.install
R debian/libgtp11.shlibs
M debian/rules
M gtp/Makefile.am
8 files changed, 58 insertions(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/12/39512/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 1e70d13..0ed7189 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,8 +7,3 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
-libgtp append new field dir_tun_flags in struct pdp_t (older users not using the field should be fine since struct pdp_t is allocated internally)
-libgtp ABI break new field cb_create_context_ind in struct gsn_t
-libgtp new API gtp_set_cb_update_context_ind(), gtp_update_context_resp()
-libosmocore >1.10.0 osmo_tundev_get_fd()
-libgtp new API gtp_set_talloc_ctx()
diff --git a/configure.ac b/configure.ac
index 945075a..cc5a459 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,9 +154,9 @@
AM_INIT_AUTOMAKE([foreign])
-PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.10.0)
-PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.10.0)
-PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.10.0)
+PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.11.0)
+PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.11.0)
+PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.11.0)
AC_ARG_ENABLE(sanitize,
[AS_HELP_STRING(
diff --git a/debian/changelog b/debian/changelog
index d36f674..1c1994b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,50 @@
+osmo-ggsn (1.13.0) unstable; urgency=medium
+
+ [ Pau Espin Pedrol ]
+ * gtp: Allow tx Direct Tunnel Flags in UpdatePDPCtx{Req,Resp}
+ * gtp: Store rx Direct Tunnel Flags in UpdatePDPCtx{Req,Resp}
+ * gtp: Allow UpdatePDPContext initiated by GGSN
+ * gtp: Allow setting callback to receive update_context_ind
+ * ggsn: Mark internal cb function static
+ * ggsn: kernel gtpu: Support updating pdp ctx remote IP address and TEID
+ * Move apn allocation code out of vty file
+ * Move ggsn allocation code out of vty file
+ * Move g_ggsn_list declaration to ggsn.c
+ * vty: Fix missing newline in description of 'apn tun-device' cmd
+ * ggsn: Support announcing APN MTU over PCO
+ * ggsn: Support announcing APN MTU over ICMPv6 RA
+ * ggsn: use libosmocore tundev API to create apn tun device
+ * ggsn: Use osmo_netdev_addaddr() libosmocore API
+ * ggsn: apply configured APN MTU to tun
+ * doc: Fix typo in user manual
+ * doc: Remove reference to non longer existing osmo-ggsn.init
+ * doc: Fix typo: wrong interface named
+ * doc: Reorder some chapters
+ * tun: Fix null pointer derefence when in kernel gtp mode
+ * ggsn: Avoid forwarding IPv6 solicited-node multicast addr to tun device
+ * ggsn: Rename confusing functions
+ * tun.h: Remove non-existent tun_decaps()
+ * Rename tun_encaps -> tun_inject_pkt
+ * Refactor tun_t fields and alloc APIs
+ * tun: Use OSMO_STRLCPY_ARRAY
+ * doc: Document MTU features in User Manual and example config files
+ * doc: Update all iptables references with nftables
+ * jenkins.sh: Use --disable-doxygen configure param
+
+ [ Alexander Couzens ]
+ * gtp_internal.h: add missing include to <stdint.h>
+ * gtpie: fix comment
+ * gtp.h: add more GTP cause code from 29.060 v15.3.30
+ * gtp_new(): use talloc instead of calloc/free
+ * gtpie: add gtp_encaps a modern encapsulation method
+ * gtp: split gtp_req into 2 parts: transmit and fill header
+
+ [ Daniel Willmann ]
+ * gtp: Make peer addr const in gtp_req/gtp_resp
+ * gtp: Rework gtp_resp() into gtp_resp_pdp()
+
+ -- Oliver Smith <osmith(a)sysmocom.de> Wed, 12 Feb 2025 12:09:58 +0100
+
osmo-ggsn (1.12.0) unstable; urgency=medium
[ Daniel Willmann ]
diff --git a/debian/control b/debian/control
index e2f801e..d93a28b 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@
pkg-config,
libdpkg-perl, git,
dh-autoreconf,
- libosmocore-dev (>= 1.10.0),
+ libosmocore-dev (>= 1.11.0),
osmo-gsm-manuals-dev (>= 1.6.0),
libgtpnl-dev (>= 1.3.0)
Standards-Version: 3.9.6
@@ -24,7 +24,7 @@
operators as the interface between the Internet and the rest of the
mobile network infrastructure.
-Package: libgtp10
+Package: libgtp11
Architecture: any
Multi-Arch: same
Section: libs
@@ -49,7 +49,7 @@
Multi-Arch: same
Section: libdevel
Depends: ${misc:Depends},
- libgtp10 (= ${binary:Version})
+ libgtp11 (= ${binary:Version})
Description: Development files for libgtp
OsmoGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile
operators as the interface between the Internet and the rest of the
@@ -62,7 +62,7 @@
Section: debug
Architecture: any
Priority: extra
-Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp10 (= ${binary:Version}), osmo-ggsn (= ${binary:Version})
+Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp11 (= ${binary:Version}), osmo-ggsn (= ${binary:Version})
Multi-Arch: same
Description: Debug symbols for OsmoGGSN
OsmoGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile
@@ -82,7 +82,7 @@
Section: debug
Architecture: any
Priority: extra
-Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp10 (= ${binary:Version})
+Depends: ${shlibs:Depends}, ${misc:Depends}, libgtp11 (= ${binary:Version})
Multi-Arch: same
Description: Debug symbols for OsmoGGSN
OsmoGGSN is a Gateway GPRS Support Node (GGSN). It is used by mobile
diff --git a/debian/libgtp10.install b/debian/libgtp11.install
similarity index 100%
rename from debian/libgtp10.install
rename to debian/libgtp11.install
diff --git a/debian/libgtp6.shlibs b/debian/libgtp11.shlibs
similarity index 69%
rename from debian/libgtp6.shlibs
rename to debian/libgtp11.shlibs
index 43d45e7..e80f92d 100644
--- a/debian/libgtp6.shlibs
+++ b/debian/libgtp11.shlibs
@@ -1,2 +1,2 @@
# Most recent version of the package that added new symbols (OS#5318)
-libgtp 6 libgtp6 (>= 1.8.0)
+libgtp 11 libgtp11 (>= 1.13.0)
diff --git a/debian/rules b/debian/rules
index 48397a8..89d627a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,7 @@
override_dh_strip:
dh_strip -posmo-ggsn --dbg-package=osmo-ggsn-dbg
- dh_strip -plibgtp10 --dbg-package=libgtp-dbg
+ dh_strip -plibgtp11 --dbg-package=libgtp-dbg
override_dh_auto_configure:
dh_auto_configure -- \
diff --git a/gtp/Makefile.am b/gtp/Makefile.am
index db1942d..fe5abe8 100644
--- a/gtp/Makefile.am
+++ b/gtp/Makefile.am
@@ -2,7 +2,7 @@
# Please read chapter "Library interface versions" of the libtool documentation
# before making any modifications: https://www.gnu.org/software/libtool/manual/html_node/Versioning.html
# If major=current-age is increased, remember to update the dh_strip line in debian/rules!
-LIBVERSION=10:0:0
+LIBVERSION=11:0:0
lib_LTLIBRARIES = libgtp.la
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/39512?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I7dbdd71d62fb13ba2ffc30d7d50fb4207a06340b
Gerrit-Change-Number: 39512
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>