lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

August 2023

  • 1 participants
  • 1514 discussions
[M] Change in osmo-tetra[master]: Added keyfile parsing code and various crypto improvements
by laforge 21 Aug '23

21 Aug '23
Attention is currently required from: wbokslag. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/33997 ) Change subject: Added keyfile parsing code and various crypto improvements ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/33997 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: I1c7afeeb2dcf97ece44bb4b604f44ba88882b93f Gerrit-Change-Number: 33997 Gerrit-PatchSet: 2 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Comment-Date: Mon, 21 Aug 2023 18:34:38 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmocom-bb[master]: l1gprs: implement TBF starting time support
by pespin 21 Aug '23

21 Aug '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33223 ) Change subject: l1gprs: implement TBF starting time support ...................................................................... Patch Set 10: (1 comment) Patchset: PS10: @fixeria see fix patch v9->v10. Unfortunately, now that the changes are scheduled on time (and not before the expected time), new problems show up: At TBF_START_TIME=N, in l1gprs_handle_dl_block_ind() we activate a pending TBF in l1gprs_check_pending_tbfs(), and then send primitive L1CTL_GPRS_DL_BLOCK_IND to upper layers. Further up, in modem app, handle_pdch_block_ind() uses the L1CTL_GPRS_DL_BLOCK_IND primitive to generate an RTS.ind for next_block(N). As a result, if we configure a TBF for TBF_START_TIME=N, we receive the first RTS.ind for N+4 or N+5..... this is completely unexpected and wrong imho. I think we should move the RTS.ind down to the l1gprs, and activate TBFs before triggering RTS.ind there. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I174e3c43d2f4c828a528710b284e62c9bb794122 Gerrit-Change-Number: 33223 Gerrit-PatchSet: 10 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <axilirator(a)gmail.com> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <axilirator(a)gmail.com> Gerrit-Comment-Date: Mon, 21 Aug 2023 16:40:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in osmocom-bb[master]: l1gprs: implement TBF starting time support
by pespin 21 Aug '23

21 Aug '23
pespin has uploaded a new patch set (#10) to the change originally created by fixeria. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33223 ) Change subject: l1gprs: implement TBF starting time support ...................................................................... l1gprs: implement TBF starting time support Change-Id: I174e3c43d2f4c828a528710b284e62c9bb794122 Related: OS#5500 --- M include/l1gprs.h M src/shared/l1gprs.c 2 files changed, 256 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/23/33223/10 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33223 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I174e3c43d2f4c828a528710b284e62c9bb794122 Gerrit-Change-Number: 33223 Gerrit-PatchSet: 10 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in libosmo-gprs[master]: rlcmac: Fix Starting Time rfn->fn calculation
by pespin 21 Aug '23

21 Aug '23
Attention is currently required from: osmith, fixeria. Hello osmith, Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34044 to look at the new patch set (#6). Change subject: rlcmac: Fix Starting Time rfn->fn calculation ...................................................................... rlcmac: Fix Starting Time rfn->fn calculation The Starting time contains a "frame number, FN modulo 42432", aka RFN. The translation to absolute FN was missing. Depends: libosmocore.git Change-Id Ib71e8da976f6cc84c3a4ab17b0a8c2101492e243 Change-Id: I00741289333853a8db472950ee2ac38dc2c74fd3 --- M TODO-RELEASE M src/rlcmac/rlcmac_dec.c M tests/rlcmac/Makefile.am A tests/rlcmac/rlcmac_types_test.c A tests/rlcmac/rlcmac_types_test.err A tests/rlcmac/rlcmac_types_test.ok M tests/testsuite.at 7 files changed, 154 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/44/34044/6 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34044 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I00741289333853a8db472950ee2ac38dc2c74fd3 Gerrit-Change-Number: 34044 Gerrit-PatchSet: 6 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-gprs[master]: rlcmac: Move FN related helper functions to private header inside lib...
by pespin 21 Aug '23

21 Aug '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/34168 ) Change subject: rlcmac: Move FN related helper functions to private header inside libosmo-gprs ...................................................................... rlcmac: Move FN related helper functions to private header inside libosmo-gprs These may be handy in other tests or inside the library. Change-Id: I87393239b05a1c11498323139866aec9f6550f3b --- M include/osmocom/gprs/rlcmac/sched.h M tests/rlcmac/rlcmac_prim_test.c 2 files changed, 25 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/68/34168/1 diff --git a/include/osmocom/gprs/rlcmac/sched.h b/include/osmocom/gprs/rlcmac/sched.h index 18fbe7d..a90cbc1 100644 --- a/include/osmocom/gprs/rlcmac/sched.h +++ b/include/osmocom/gprs/rlcmac/sched.h @@ -2,6 +2,7 @@ #pragma once #include <stdint.h> +#include <osmocom/gsm/gsm_utils.h> struct gprs_rlcmac_rts_block_ind { uint8_t ts; @@ -32,3 +33,16 @@ /* FN1 goes after FN2: */ return 1; } + +static inline uint32_t fn2bn(uint32_t fn) +{ + return (fn % 52) / 4; +} + +static inline uint32_t fn_next_block(uint32_t fn) +{ + uint32_t bn = fn2bn(fn) + 1; + fn = fn - (fn % 52); + fn += bn * 4 + bn / 3; + return fn % GSM_MAX_FN; +} diff --git a/tests/rlcmac/rlcmac_prim_test.c b/tests/rlcmac/rlcmac_prim_test.c index 410b266..6e317b1 100644 --- a/tests/rlcmac/rlcmac_prim_test.c +++ b/tests/rlcmac/rlcmac_prim_test.c @@ -262,20 +262,6 @@ } #define clock_override_add(sec, usec) clock_override_add_debug(sec, usec, true) - -static inline unsigned fn2bn(unsigned fn) -{ - return (fn % 52) / 4; -} - -static inline unsigned fn_next_block(unsigned fn) -{ - unsigned bn = fn2bn(fn) + 1; - fn = fn - (fn % 52); - fn += bn * 4 + bn / 3; - return fn % GSM_MAX_FN; -} - static struct osmo_gprs_rlcmac_prim *create_dl_ctrl_block_buf(uint8_t *buf, int num_bytes, uint8_t tn, uint32_t fn) { struct osmo_gprs_rlcmac_prim *rlcmac_prim; -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34168 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I87393239b05a1c11498323139866aec9f6550f3b Gerrit-Change-Number: 34168 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in libosmo-gprs[master]: rlcmac: Fix Starting Time rfn->fn calculation
by pespin 21 Aug '23

21 Aug '23
Attention is currently required from: osmith, fixeria. Hello osmith, Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34044 to look at the new patch set (#5). Change subject: rlcmac: Fix Starting Time rfn->fn calculation ...................................................................... rlcmac: Fix Starting Time rfn->fn calculation The Starting time contains a "frame number, FN modulo 42432", aka RFN. The translation to absolute FN was missing. Depends: libosmocore.git Change-Id Ib71e8da976f6cc84c3a4ab17b0a8c2101492e243 Change-Id: I00741289333853a8db472950ee2ac38dc2c74fd3 --- M TODO-RELEASE M src/rlcmac/rlcmac_dec.c M tests/rlcmac/Makefile.am A tests/rlcmac/rlcmac_types_test.c A tests/rlcmac/rlcmac_types_test.err A tests/rlcmac/rlcmac_types_test.ok M tests/testsuite.at 7 files changed, 154 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/44/34044/5 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34044 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I00741289333853a8db472950ee2ac38dc2c74fd3 Gerrit-Change-Number: 34044 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmocore[master]: select (WIP): Prevent negative index lookup on osmo_fd_lookup.table
by pespin 21 Aug '23

21 Aug '23
Attention is currently required from: arehbein. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33748 ) Change subject: select (WIP): Prevent negative index lookup on osmo_fd_lookup.table ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33748 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iba81873cbc435229599b1a8139cf4b627f8e6924 Gerrit-Change-Number: 33748 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Comment-Date: Mon, 21 Aug 2023 14:38:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-hnbgw[master]: Tear down call if local IuUP MGW address changed during MDCX
by pespin 21 Aug '23

21 Aug '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/34043 ) Change subject: Tear down call if local IuUP MGW address changed during MDCX ...................................................................... Tear down call if local IuUP MGW address changed during MDCX Due to ip probing used at MGW and specific/complex routing in place between RAN and CN, it may happen that, on the RAN-side endpoint connection, the MGW first selects a local IP address. Then, after the HNBGW signalling it to the HNB with the patched RabAssReq and receiving the HNB local IP address through RabAssResp, then applying it to MGW through MDCX, it can happen that the MDCX ACK contains a changed local IP address at the MGW, due to IP probing after learning the remote address. This change is so far not announced to the HNB in anyway, ending up in the HNB sending IuUP packets to the wrong IP/port, which is rejected with ICMP due to osmo-mgw having no socket open there anymore. We should at least, in osmo-hnbgw, if detecting the local MGW IP address changed during MDCX, tear down the call setup. This patch does precisely that. Related: OS#6127 Change-Id: I32c4a7f838ceb5077bec7945e7976ce455d6b025 --- M src/osmo-hnbgw/mgw_fsm.c 1 file changed, 62 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/osmo-hnbgw/mgw_fsm.c b/src/osmo-hnbgw/mgw_fsm.c index f6f1089..ddab0b5 100644 --- a/src/osmo-hnbgw/mgw_fsm.c +++ b/src/osmo-hnbgw/mgw_fsm.c @@ -113,6 +113,7 @@ struct osmo_mgcpc_ep *mgcpc_ep; struct osmo_mgcpc_ep_ci *mgcpc_ep_ci_hnb; struct osmo_mgcpc_ep_ci *mgcpc_ep_ci_msc; + struct osmo_sockaddr ci_hnb_crcx_ack_addr; char msc_rtp_addr[INET6_ADDRSTRLEN]; uint16_t msc_rtp_port; }; @@ -187,8 +188,8 @@ { struct mgw_fsm_priv *mgw_fsm_priv = fi->priv; const struct mgcp_conn_peer *mgw_info; - struct osmo_sockaddr addr; struct osmo_sockaddr_str addr_str; + struct osmo_sockaddr *addr = &mgw_fsm_priv->ci_hnb_crcx_ack_addr; RANAP_RAB_AssignmentRequestIEs_t *ies; int rc; @@ -207,7 +208,7 @@ addr_str.af = AF_INET6; addr_str.port = mgw_info->port; osmo_strlcpy(addr_str.ip, mgw_info->addr, sizeof(addr_str.ip)); - rc = osmo_sockaddr_str_to_sockaddr(&addr_str, &addr.u.sas); + rc = osmo_sockaddr_str_to_sockaddr(&addr_str, &addr->u.sas); if (rc < 0) { LOGPFSML(fi, LOGL_ERROR, "Failed to convert RTP IP-address (%s) and Port (%u) to its binary representation\n", @@ -217,7 +218,7 @@ } ies = &mgw_fsm_priv->ranap_rab_ass_req_message->msg.raB_AssignmentRequestIEs; - rc = ranap_rab_ass_req_ies_replace_inet_addr(ies, &addr, mgw_fsm_priv->rab_id); + rc = ranap_rab_ass_req_ies_replace_inet_addr(ies, addr, mgw_fsm_priv->rab_id); if (rc < 0) { LOGPFSML(fi, LOGL_ERROR, "Failed to replace RTP IP-address (%s) and Port (%u) in RAB-AssignmentRequest\n", @@ -341,6 +342,9 @@ { struct mgw_fsm_priv *mgw_fsm_priv = fi->priv; const struct mgcp_conn_peer *mgw_info; + struct osmo_sockaddr_str addr_str; + struct osmo_sockaddr addr; + int rc; switch (event) { case MGW_EV_MGCP_OK: @@ -350,6 +354,33 @@ osmo_fsm_inst_state_chg(fi, MGW_ST_FAILURE, 0, 0); return; } + + if (strchr(mgw_info->addr, '.')) + addr_str.af = AF_INET; + else + addr_str.af = AF_INET6; + addr_str.port = mgw_info->port; + osmo_strlcpy(addr_str.ip, mgw_info->addr, sizeof(addr_str.ip)); + rc = osmo_sockaddr_str_to_sockaddr(&addr_str, &addr.u.sas); + if (rc < 0) { + LOGPFSML(fi, LOGL_ERROR, + "Failed to convert RTP IP-address (%s) and Port (%u) to its binary representation\n", + mgw_info->addr, mgw_info->port); + osmo_fsm_inst_state_chg(fi, MGW_ST_FAILURE, 0, 0); + return; + } + + if (osmo_sockaddr_cmp(&mgw_fsm_priv->ci_hnb_crcx_ack_addr, &addr) != 0) { + /* FIXME: Send RAB Modify Req to HNB. See OS#6127 */ + char addr_buf[INET6_ADDRSTRLEN + 8]; + LOGPFSML(fi, LOGL_ERROR, "Local MGW IuUP IP address %s changed to %s during MDCX." + " This is so far unsupported, adapt your osmo-mgw config!\n", + osmo_sockaddr_to_str(&mgw_fsm_priv->ci_hnb_crcx_ack_addr), + osmo_sockaddr_to_str_buf(addr_buf, sizeof(addr_buf), &addr)); + osmo_fsm_inst_state_chg(fi, MGW_ST_FAILURE, 0, 0); + return; + } + mgw_fsm_state_chg(fi, MGW_ST_CRCX_MSC); return; default: -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34043 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I32c4a7f838ceb5077bec7945e7976ce455d6b025 Gerrit-Change-Number: 34043 Gerrit-PatchSet: 1 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-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmocore[master]: rsl: Introduce new osmocom extension IE RSL_IE_OSMO_ABS_FRAME_NUMBER
by pespin 21 Aug '23

21 Aug '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34131 ) Change subject: rsl: Introduce new osmocom extension IE RSL_IE_OSMO_ABS_FRAME_NUMBER ...................................................................... rsl: Introduce new osmocom extension IE RSL_IE_OSMO_ABS_FRAME_NUMBER This will be used in RSLms to provide Absolute Frame Number information of the primitive indications being sent to upper layers, so that it's possible to track GSM time in the upper layers. The existing RSL_IE_FRAME_NUMBER and RSL_IE_STARTNG_TIME cannot be used there, since those are 16bit fields containing Relative FN values. Related: OS#3626 Change-Id: Ia28caa24dd141b1162b6e11500d753353fe6500d --- M include/osmocom/gsm/protocol/gsm_08_58.h M src/gsm/rsl.c 2 files changed, 18 insertions(+), 0 deletions(-) Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h index 0a44db9..ec9ebe7 100644 --- a/include/osmocom/gsm/protocol/gsm_08_58.h +++ b/include/osmocom/gsm/protocol/gsm_08_58.h @@ -369,6 +369,7 @@ RSL_IE_OSMO_TRAINING_SEQUENCE = 0x61, RSL_IE_OSMO_TEMP_OVP_ACCH_CAP = 0x62, RSL_IE_OSMO_OSMUX_CID = 0x63, + RSL_IE_OSMO_ABS_FRAME_NUMBER = 0x64, /* uint32_t fn in network byte order */ /* ip.access */ RSL_IE_IPAC_SRTP_CONFIG = 0xe0, diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c index fbba982..53eb983 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -126,6 +126,7 @@ [RSL_IE_OSMO_TRAINING_SEQUENCE] = { TLV_TYPE_TLV }, [RSL_IE_OSMO_TEMP_OVP_ACCH_CAP] = { TLV_TYPE_TLV }, [RSL_IE_OSMO_OSMUX_CID] = { TLV_TYPE_TLV }, + [RSL_IE_OSMO_ABS_FRAME_NUMBER] = { TLV_TYPE_TLV }, /* uint32_t fn in network byte order */ [RSL_IE_IPAC_SRTP_CONFIG] = { TLV_TYPE_TLV }, [RSL_IE_IPAC_PROXY_UDP] = { TLV_TYPE_FIXED, 2 }, [RSL_IE_IPAC_BSCMPL_TOUT] = { TLV_TYPE_TV }, -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34131 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ia28caa24dd141b1162b6e11500d753353fe6500d Gerrit-Change-Number: 34131 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmocore[master]: lapdm: Append RSL_IE_OSMO_ABS_FRAME_NUMBER to RSLms msgs towards uppe...
by pespin 21 Aug '23

21 Aug '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34132 ) Change subject: lapdm: Append RSL_IE_OSMO_ABS_FRAME_NUMBER to RSLms msgs towards upper layers ...................................................................... lapdm: Append RSL_IE_OSMO_ABS_FRAME_NUMBER to RSLms msgs towards upper layers This makes it possible to track GSM time in the upper layers. The existing RSL_IE_FRAME_NUMBER and RSL_IE_STARTNG_TIME cannot be used there, since those are 16bit fields containing Relative FN values. The IE needs to be added before the L3_INFO one, because user code usually assumes the msgb->l3 pointing to L3_INFO value extends until the end of the message, using msgb3_len(msg). Regarding having an extra IE at the middle, it's not a big problem since the libosmocore version submitting this commit to the upper layers is the same which will also be parsing it through rsl_tlv_parse() later on by the app. Related: OS#3626 Change-Id: Id62c18f49f270449067b25b7104eb8b47f1955ec --- M include/osmocom/gsm/rsl.h M src/gsm/lapdm.c M src/gsm/rsl.c M tests/lapd/lapd_test.c M tests/lapd/lapd_test.ok 5 files changed, 76 insertions(+), 13 deletions(-) Approvals: laforge: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/gsm/rsl.h b/include/osmocom/gsm/rsl.h index 285dbc2..b9d3282 100644 --- a/include/osmocom/gsm/rsl.h +++ b/include/osmocom/gsm/rsl.h @@ -51,6 +51,8 @@ /* Push a RSL RLL header with L3_INFO IE */ void rsl_rll_push_l3(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr, uint8_t link_id, int transparent); +void rsl_rll_push_l3_with_fn(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr, + uint8_t link_id, int transparent, uint32_t fn); /* Allocate msgb and fill with simple RSL RLL header */ struct msgb *rsl_rll_simple(uint8_t msg_type, uint8_t chan_nr, diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index e96e218..c259824 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -503,7 +503,7 @@ int transparent = rsl_is_transparent(msg_type); /* Add the RSL + RLL header */ - rsl_rll_push_l3(msg, msg_type, mctx->chan_nr, mctx->link_id, transparent); + rsl_rll_push_l3_with_fn(msg, msg_type, mctx->chan_nr, mctx->link_id, transparent, mctx->fn); /* send off the RSLms message to L3 */ return rslms_sendmsg(msg, mctx->dl->entity); @@ -513,10 +513,14 @@ static int send_rslms_rll_l3_ui(struct lapdm_msg_ctx *mctx, struct msgb *msg) { uint8_t l3_len = msg->tail - (uint8_t *)msgb_l3(msg); + uint32_t fn_be; /* Add the RSL + RLL header */ msgb_tv16_push(msg, RSL_IE_L3_INFO, l3_len); + osmo_store32be(mctx->fn, &fn_be); + msgb_tlv_push(msg, RSL_IE_OSMO_ABS_FRAME_NUMBER, 4, (uint8_t *)&fn_be); + /* Add two non-standard IEs carrying MS power and TA values for B4 (SACCH) */ if (mctx->lapdm_fmt == LAPDm_FMT_B4) { msgb_tv_push(msg, RSL_IE_MS_POWER, mctx->tx_power_ind); @@ -533,8 +537,12 @@ { struct msgb *msg; int transparent = rsl_is_transparent(msg_type); + uint32_t fn_be; msg = rsl_rll_simple(msg_type, mctx->chan_nr, mctx->link_id, transparent); + /* Add FN to the end to keep backward compat: */ + osmo_store32be(mctx->fn, &fn_be); + msgb_tlv_put(msg, RSL_IE_OSMO_ABS_FRAME_NUMBER, 4, (uint8_t *)&fn_be); /* send off the RSLms message to L3 */ return rslms_sendmsg(msg, mctx->dl->entity); @@ -543,10 +551,15 @@ static int rsl_rll_error(uint8_t cause, struct lapdm_msg_ctx *mctx) { struct msgb *msg; + uint32_t fn_be; LOGDL(&mctx->dl->dl, LOGL_NOTICE, "sending MDL-ERROR-IND %d\n", cause); msg = rsl_rll_simple(RSL_MT_ERROR_IND, mctx->chan_nr, mctx->link_id, 0); msgb_tlv_put(msg, RSL_IE_RLM_CAUSE, 1, &cause); + /* Add FN to the end to keep backward compat: */ + osmo_store32be(mctx->fn, &fn_be); + msgb_tlv_put(msg, RSL_IE_OSMO_ABS_FRAME_NUMBER, 4, (uint8_t *)&fn_be); + return rslms_sendmsg(msg, mctx->dl->entity); } diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c index 53eb983..e0708c1 100644 --- a/src/gsm/rsl.c +++ b/src/gsm/rsl.c @@ -561,6 +561,33 @@ rsl_rll_push_hdr(msg, msg_type, chan_nr, link_id, transparent); } +/*! Wrap msgb in L3 Info IE and push a RSL RLL header + * \param[in] msg Message Buffer to which L3 Header shall be appended + * \param[in] msg_type RSL Message Type + * \param[in] chan_hr RSL Channel Number + * \param[in] link_id Link Identififer + * \param[in] transparent Transparent to BTS (1) or not (0) + * \param[in] fn Frame Number + */ +void rsl_rll_push_l3_with_fn(struct msgb *msg, uint8_t msg_type, uint8_t chan_nr, + uint8_t link_id, int transparent, uint32_t fn) +{ + uint8_t l3_len = msg->tail - (uint8_t *)msgb_l3(msg); + uint32_t fn_be; + + /* construct a RSLms RLL message (DATA INDICATION, UNIT DATA + * INDICATION) and send it off via RSLms */ + + /* Push the L3 IE tag and length */ + msgb_tv16_push(msg, RSL_IE_L3_INFO, l3_len); + + osmo_store32be(fn, &fn_be); + msgb_tlv_push(msg, RSL_IE_OSMO_ABS_FRAME_NUMBER, 4, (uint8_t *)&fn_be); + + /* Then push the RSL header */ + rsl_rll_push_hdr(msg, msg_type, chan_nr, link_id, transparent); +} + /*! Create msgb with RSL RLL header * \param[in] msg_type RSL Message Type * \param[in] chan_nr RSL Channel Number diff --git a/tests/lapd/lapd_test.c b/tests/lapd/lapd_test.c index 2f2a7f4..bae73c2 100644 --- a/tests/lapd/lapd_test.c +++ b/tests/lapd/lapd_test.c @@ -359,7 +359,7 @@ struct abis_rsl_rll_hdr hdr; printf("MS: Verifying incoming primitive.\n"); - OSMO_ASSERT(msg->len == sizeof(struct abis_rsl_rll_hdr)); + OSMO_ASSERT(msg->len >= sizeof(struct abis_rsl_rll_hdr)); /* verify the header */ memset(&hdr, 0, sizeof(hdr)); diff --git a/tests/lapd/lapd_test.ok b/tests/lapd/lapd_test.ok index 065886c..ff9df5b 100644 --- a/tests/lapd/lapd_test.ok +++ b/tests/lapd/lapd_test.ok @@ -1,28 +1,28 @@ I do some very simple LAPDm test. Establishing link. ms_to_bts_l1_cb: MS(us) -> BTS prim message -bts_to_ms_tx_cb: MS->BTS(us) message 25 +bts_to_ms_tx_cb: MS->BTS(us) message 31 BTS: Verifying CM request. Confirming lapdm_phsap_dequeue_prim(): got rc 0: Success Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0, Link 0x00 Message: [L2]> 01 73 41 [L3]> 05 24 31 03 50 18 93 08 29 47 80 00 00 00 00 80 2b 2b 2b 2b -ms_to_bts_tx_cb: BTS->MS(us) message 6 +ms_to_bts_tx_cb: BTS->MS(us) message 12 MS: Verifying incoming primitive. Sending back to MS lapdm_phsap_dequeue_prim(): got rc 0: Success Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0, Link 0x00 Message: [L2]> 03 00 0d [L3]> 05 04 0d 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -ms_to_bts_tx_cb: BTS->MS(us) message 12 +ms_to_bts_tx_cb: BTS->MS(us) message 18 MS: Verifying incoming MM message: 3 ms_to_bts_l1_cb: MS(us) -> BTS prim message lapdm_phsap_dequeue_prim(): got rc -19: No such device Sending back to BTS ms_to_bts_l1_cb: MS(us) -> BTS prim message -bts_to_ms_tx_cb: MS->BTS(us) message 14 +bts_to_ms_tx_cb: MS->BTS(us) message 20 BTS: Verifying dummy message. lapdm_phsap_dequeue_prim(): got rc 0: Success MSGB: L3 is undefined @@ -32,7 +32,7 @@ lapdm_phsap_dequeue_prim(): got rc -19: No such device I test RF channel release of an unestablished channel. I test contention resultion by having two mobiles collide and first mobile repeating SABM. -bts_to_ms_tx_cb: MS->BTS(us) message 25 +bts_to_ms_tx_cb: MS->BTS(us) message 31 BTS: Verifying CM request. lapdm_phsap_dequeue_prim(): got rc 0: Success Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0, Link 0x00 @@ -60,7 +60,7 @@ I test if desync problems exist in LAPDm Establishing SAPI=0 -bts_to_ms_dummy_tx_cb: MS->BTS(us) message 25 +bts_to_ms_dummy_tx_cb: MS->BTS(us) message 31 Dumping queue: 00 00 17 [L2]> 01 73 41 [L3]> 05 24 31 03 50 18 93 08 29 47 80 00 00 00 00 80 @@ -70,7 +70,7 @@ Message: [L2]> 01 73 41 [L3]> 05 24 31 03 50 18 93 08 29 47 80 00 00 00 00 80 2b 2b 2b 2b Sending Classmark Change -bts_to_ms_dummy_tx_cb: MS->BTS(us) message 27 +bts_to_ms_dummy_tx_cb: MS->BTS(us) message 33 Dumping queue: 00 00 17 [L2]> 01 21 01 @@ -87,7 +87,7 @@ Sending GPRS Suspend Request -bts_to_ms_dummy_tx_cb: MS->BTS(us) message 22 +bts_to_ms_dummy_tx_cb: MS->BTS(us) message 28 Dumping queue: 00 00 17 [L2]> 03 40 0d [L3]> 06 35 01 @@ -97,7 +97,7 @@ Message: [L2]> 03 40 0d [L3]> 06 35 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Sending Cipher Mode Complete -bts_to_ms_dummy_tx_cb: MS->BTS(us) message 11 +bts_to_ms_dummy_tx_cb: MS->BTS(us) message 17 Dumping queue: 00 00 17 [L2]> 01 61 01 @@ -108,7 +108,7 @@ Message: [L2]> 01 61 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Establishing SAPI=3 -bts_to_ms_dummy_tx_cb: MS->BTS(us) message 6 +bts_to_ms_dummy_tx_cb: MS->BTS(us) message 12 Dumping queue: @@ -128,7 +128,7 @@ === I test SAPI0/SAPI3 prioritization === MS is establishing a SAPI=0 link -bts_to_ms_dummy_tx_cb: MS->BTS(us) message 22 +bts_to_ms_dummy_tx_cb: MS->BTS(us) message 28 BTS is establishing a SAPI=3 link lapdm_phsap_dequeue_prim(): got rc 0: Success Took message from DCCH queue: L2 header size 3, L3 size 20, SAP 0x1000000, 0/0, Link 0x00 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34132 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id62c18f49f270449067b25b7104eb8b47f1955ec Gerrit-Change-Number: 34132 Gerrit-PatchSet: 7 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • ...
  • 152
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.