Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31805 )
Change subject: gsmtap.h: Define a packet type for encapsulation of GSM RLP frames
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
Patchset:
PS1:
You need to add the new entry to `gsmtap_type_names[]`.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31805
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ibb7f0731c31e5a5cd2911f733da5510ce0f3a1d6
Gerrit-Change-Number: 31805
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Fri, 10 Mar 2023 20:31:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/31825 )
Change subject: Avoid allocating conn_id 0x00FFFFFF
......................................................................
Avoid allocating conn_id 0x00FFFFFF
The 0x00FFFFFF source local reference is reserved in M3UA/SCCP, hence
avoid allocating a conn_id with that value since later on when reused as
a source local reference it would fail to be encoded.
Change-Id: Ifcf710ef6024286a1cc3473d6ea3f858552b9926
---
M src/sccp_scoc.c
1 file changed, 28 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
dexter: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/src/sccp_scoc.c b/src/sccp_scoc.c
index 00e677c..2430462 100644
--- a/src/sccp_scoc.c
+++ b/src/sccp_scoc.c
@@ -507,10 +507,22 @@
{
uint32_t conn_id;
+ /* SUA: RFC3868 sec 3.10.4:
+ * The source reference number is a 4 octet long integer.
+ * This is allocated by the source SUA instance.
+ * M3UA/SCCP: ITU-T Q.713 sec 3.3:
+ * The "source local reference" parameter field is a three-octet field containing a
+ * reference number which is generated and used by the local node to identify the
+ * connection section after the connection section is set up.
+ * The coding "all ones" is reserved for future use.
+ * Hence, as we currently use the connection ID also as local reference,
+ * let's simply use 24 bit ids to fit all link types (excluding 0x00ffffff).
+ */
do {
- /* modulo 2^24 as we currently use the connection ID also as local
- * reference, and that is limited to 24 bits */
- user->inst->next_id = (user->inst->next_id + 1) % (1 << 24);
+ /* Optimized modulo operation (% 0x00FFFFFE) using bitwise AND plus CMP: */
+ user->inst->next_id = (user->inst->next_id + 1) & 0x00FFFFFF;
+ if (OSMO_UNLIKELY(user->inst->next_id == 0x00FFFFFF))
+ user->inst->next_id = 0;
conn_id = user->inst->next_id;
} while (conn_find_by_id(user->inst, conn_id));
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/31825
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ifcf710ef6024286a1cc3473d6ea3f858552b9926
Gerrit-Change-Number: 31825
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: neels, laforge, dexter.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31618 )
Change subject: pcu_sock: handle multiple BTSs with one BSC co-located PCU (in theory)
......................................................................
Patch Set 12:
(1 comment)
File src/osmo-bsc/pcu_sock.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/31618/comment/1fc28b2c_83fcc836
PS12, Line 781: osmo_fd_unregister
I saw a patche from @pespin reordering `osmo_fd_unregister()` and `close()`, so that the former is called first. Here it is: https://gerrit.osmocom.org/c/osmo-mgw/+/31806. Should the same be done here?
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31618
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I0b42c2c130106f6ffca2dd08d079e1a7bda41f0b
Gerrit-Change-Number: 31618
Gerrit-PatchSet: 12
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 10 Mar 2023 20:23:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment