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
[S] Change in osmo-msc[master]: csd_bs_list_to_gsm0808_ct: assert -> ret -EINVAL
by osmith 23 Aug '23

23 Aug '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/34171 ) Change subject: csd_bs_list_to_gsm0808_ct: assert -> ret -EINVAL ...................................................................... csd_bs_list_to_gsm0808_ct: assert -> ret -EINVAL Instead of asserting on an empty list of bearer services, return -EINVAL. This makes the function more similar to sdp_audio_codecs_to_gsm0808_channel_type which also doesn't assert if an empty list of codecs is passed. Related: OS#4394 Change-Id: I15a389e1f7a9d3d17b6531c9836d3d5f9d148267 --- M src/libmsc/csd_bs.c 1 file changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/71/34171/1 diff --git a/src/libmsc/csd_bs.c b/src/libmsc/csd_bs.c index 3a2c82a..caea057 100644 --- a/src/libmsc/csd_bs.c +++ b/src/libmsc/csd_bs.c @@ -382,7 +382,8 @@ .ch_indctr = GSM0808_CHAN_DATA, }; - OSMO_ASSERT(list->count); + if (!list->count) + return -EINVAL; if (csd_bs_is_transp(list->bs[0])) { ct->data_transparent = true; -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/34171 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I15a389e1f7a9d3d17b6531c9836d3d5f9d148267 Gerrit-Change-Number: 34171 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: Cosmetic: fix typo
by osmith 23 Aug '23

23 Aug '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/34170 ) Change subject: Cosmetic: fix typo ...................................................................... Cosmetic: fix typo Change-Id: Ib707fa66ae789abfa8795b4e521a16e24c77647d --- M src/libmsc/transaction.c 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/70/34170/1 diff --git a/src/libmsc/transaction.c b/src/libmsc/transaction.c index 3e458f1..7ae4c7d 100644 --- a/src/libmsc/transaction.c +++ b/src/libmsc/transaction.c @@ -186,7 +186,7 @@ static uint32_t new_call_id = 1; /*! Allocate a new transaction and add it to network list - * \param[in] net Netwokr in which we allocate transaction + * \param[in] net Network in which we allocate transaction * \param[in] subscr Subscriber for which we allocate transaction * \param[in] protocol Protocol (CC/SMS/...) * \param[in] callref Call Reference -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/34170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ib707fa66ae789abfa8795b4e521a16e24c77647d Gerrit-Change-Number: 34170 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmocom-bb[master]: layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind
by fixeria 23 Aug '23

23 Aug '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34133 ) Change subject: layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind ...................................................................... Patch Set 7: (1 comment) File src/host/layer23/src/modem/grr.c: https://gerrit.osmocom.org/c/osmocom-bb/+/34133/comment/912286a6_3f514bee PS6, Line 210: FN=%u BCCH message (type=0x%02x) > Done You forgot to reorder the format string arguments. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I7a9f31ae363fe7de019ff1a906f3978ff3074036 Gerrit-Change-Number: 34133 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: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 23 Aug 2023 13:22:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind
by osmith 23 Aug '23

23 Aug '23
Attention is currently required from: pespin, fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34133 ) Change subject: layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind ...................................................................... Patch Set 7: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I7a9f31ae363fe7de019ff1a906f3978ff3074036 Gerrit-Change-Number: 34133 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: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 23 Aug 2023 12:13:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind
by pespin 23 Aug '23

23 Aug '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/34133 ) Change subject: layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind ...................................................................... Patch Set 7: (3 comments) File src/host/layer23/src/modem/grr.c: https://gerrit.osmocom.org/c/osmocom-bb/+/34133/comment/45e9b4ff_b746e2cb PS6, Line 98: uint32_t fn = *(uint32_t *)(&msg->cb[0]); > also const like below? Done https://gerrit.osmocom.org/c/osmocom-bb/+/34133/comment/e4703211_fb13b840 PS6, Line 210: FN=%u BCCH message (type=0x%02x) > Please move the `Fn=%u` inside the braces to have consistent formatting: […] Done https://gerrit.osmocom.org/c/osmocom-bb/+/34133/comment/b5d881f2_e94d67f7 PS6, Line 381: memcpy > Doing `memcpy` is not really needed, right? […] Done -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I7a9f31ae363fe7de019ff1a906f3978ff3074036 Gerrit-Change-Number: 34133 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: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 23 Aug 2023 12:00:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-pcu[master]: vty: Allow modifying default msclass
by pespin 23 Aug '23

23 Aug '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33983 ) Change subject: vty: Allow modifying default msclass ...................................................................... vty: Allow modifying default msclass Until now, if timeslot resources where being allocated for an MS whose msclass is not known, msclass=12 was being selected. While it's true that msclass=12 is quite a usual one implemented by phones (Rx=4, Rx=4, Sum=5), some MS implementations may not support such modes. As a result, if the PCU allocates a TBF for an MS which its msclass is not known (eg. because it used 1-phase access aka no Pkt Res Req), then a minimal msclass=1 should be assumed. Otherwise, it may assign more multislots than the MS can handle, and will work incorrectly since an amount of RLC/MAC blocks won't be sent/received properly. With the existing code base, changing the default MSCLASS to 1 would, however, create a worse user experiencie for the vast majority of devices (which are msclass >= 12). The code should be improved to first use only 1 TS until the MS CLASS is known, and at that point reallocate resources and re-assign them (eg. RECONFIGURE TBF rlc/mac ctrl blk). So, for now, simply add a hidden VTY config to allow changing the default assumed MS Class, so that operators wishing to support all devices can eg. set it to 1. Change-Id: If80fdd793db7dad029faa83dbf980ffc4959e2e5 --- M src/gprs_pcu.c M src/gprs_pcu.h M src/mslot_class.c M src/mslot_class.h M src/pcu_vty.c 5 files changed, 53 insertions(+), 3 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Hoernchen: Looks good to me, but someone else must approve jolly: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/gprs_pcu.c b/src/gprs_pcu.c index 069f170..83ae38d 100644 --- a/src/gprs_pcu.c +++ b/src/gprs_pcu.c @@ -129,6 +129,7 @@ /* TODO: increase them when CRBB decoding is implemented */ pcu->vty.ws_base = 64; pcu->vty.ws_pdch = 0; + pcu->vty.msclass_default = PCU_DEFAULT_MSLOT_CLASS; pcu->vty.llc_codel_interval_msec = LLC_CODEL_USE_DEFAULT; pcu->vty.llc_idle_ack_csec = 10; diff --git a/src/gprs_pcu.h b/src/gprs_pcu.h index 66cfca3..4451996 100644 --- a/src/gprs_pcu.h +++ b/src/gprs_pcu.h @@ -43,6 +43,9 @@ #define PCU_TDEF_NEIGH_CACHE_ALIVE (-10) #define PCU_TDEF_SI_CACHE_ALIVE (-11) +/* If Multislot Class is not known during TS allocation, assume ms_class=12: Rx=4 Tx=4 Sum=5 */ +#define PCU_DEFAULT_MSLOT_CLASS 12 + /* see bts->gsmtap_categ_mask */ enum pcu_gsmtap_category { PCU_GSMTAP_C_DL_UNKNOWN = 0, /* unknown or undecodable downlink blocks */ @@ -108,6 +111,7 @@ int ns_priority; uint16_t ws_base; uint16_t ws_pdch; /* increase WS by this value per PDCH */ + uint8_t msclass_default; /* Assume this MSCLASS if unknown when creating TBF */ uint16_t force_llc_lifetime; /* overrides lifetime from SGSN */ uint32_t llc_discard_csec; uint32_t llc_idle_ack_csec; diff --git a/src/mslot_class.c b/src/mslot_class.c index 1809cd7..caab2b5 100644 --- a/src/mslot_class.c +++ b/src/mslot_class.c @@ -18,6 +18,7 @@ #include <mslot_class.h> #include <gprs_debug.h> +#include <gprs_pcu.h> #include <osmocom/core/bits.h> #include <osmocom/core/utils.h> @@ -86,7 +87,7 @@ static inline const struct gprs_ms_multislot_class *get_mslot_table(uint8_t ms_cl) { - uint8_t index = ms_cl ? ms_cl : DEFAULT_MSLOT_CLASS; + uint8_t index = ms_cl ? ms_cl : the_pcu->vty.msclass_default; if (ms_cl >= ARRAY_SIZE(gprs_ms_multislot_class)) index = 0; diff --git a/src/mslot_class.h b/src/mslot_class.h index d273cad..0d48c83 100644 --- a/src/mslot_class.h +++ b/src/mslot_class.h @@ -30,8 +30,6 @@ #define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ #define MS_TO 251 /* 31 symbol periods (this can be provided by a TA offset, i.e. a minimum TA value) */ -#define DEFAULT_MSLOT_CLASS 12 - #define NO_FREE_TFI 0xffffffff enum { MASK_TT = 0, MASK_TR = 1 }; diff --git a/src/pcu_vty.c b/src/pcu_vty.c index 84c0456..9de99c8 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -279,6 +279,8 @@ vty_out(vty, " gamma %d%s", the_pcu->vty.gamma * 2, VTY_NEWLINE); if (!the_pcu->vty.dl_tbf_preemptive_retransmission) vty_out(vty, " no dl-tbf-preemptive-retransmission%s", VTY_NEWLINE); + if (the_pcu->vty.msclass_default != PCU_DEFAULT_MSLOT_CLASS) + vty_out(vty, " multislot-class default %u%s", the_pcu->vty.msclass_default, VTY_NEWLINE); if (strcmp(the_pcu->pcu_sock_path, PCU_SOCK_DEFAULT)) vty_out(vty, " pcu-socket %s%s", the_pcu->pcu_sock_path, VTY_NEWLINE); @@ -882,6 +884,19 @@ return CMD_SUCCESS; } +DEFUN_ATTR_USRATTR(cfg_pcu_msclass_default, + cfg_pcu_msclass_default_cmd, + CMD_ATTR_HIDDEN, + X(PCU_VTY_ATTR_NEW_TBF), + "multislot-class default <1-45>", + "MultiSlot Class configuration\n" + "Set assumed default MultiSlot Class if unknown during TBF allocation\n" + "MultiSlot Class number to use as default (default: 12)\n") +{ + the_pcu->vty.msclass_default = atoi(argv[0]); + return CMD_SUCCESS; +} + #define MS_IDLE_TIME_STR "keep an idle MS object alive for the time given\n" DEFUN_DEPRECATED(cfg_pcu_ms_idle_time, cfg_pcu_ms_idle_time_cmd, @@ -1314,6 +1329,7 @@ install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_idle_time_cmd); install_element(PCU_NODE, &cfg_pcu_dl_tbf_preemptive_retransmission_cmd); install_element(PCU_NODE, &cfg_pcu_no_dl_tbf_preemptive_retransmission_cmd); + install_element(PCU_NODE, &cfg_pcu_msclass_default_cmd); install_element(PCU_NODE, &cfg_pcu_ms_idle_time_cmd); install_element(PCU_NODE, &cfg_pcu_no_ms_idle_time_cmd); install_element(PCU_NODE, &cfg_pcu_gsmtap_remote_host_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If80fdd793db7dad029faa83dbf980ffc4959e2e5 Gerrit-Change-Number: 33983 Gerrit-PatchSet: 6 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(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: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-pcu[master]: vty: Allow modifying default msclass
by pespin 23 Aug '23

23 Aug '23
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/33983 ) Change subject: vty: Allow modifying default msclass ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/33983 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: If80fdd793db7dad029faa83dbf980ffc4959e2e5 Gerrit-Change-Number: 33983 Gerrit-PatchSet: 5 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(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: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 23 Aug 2023 11:55:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind
by pespin 23 Aug '23

23 Aug '23
Attention is currently required from: pespin. Hello osmith, Jenkins Builder, jolly, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmocom-bb/+/34133 to look at the new patch set (#7). Change subject: layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind ...................................................................... layer23: modem: Pass fn from lapdm to L1CTL-CCCH_DATA.ind Change-Id: I7a9f31ae363fe7de019ff1a906f3978ff3074036 --- M src/host/layer23/src/modem/grr.c 1 file changed, 18 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/33/34133/7 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/34133 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I7a9f31ae363fe7de019ff1a906f3978ff3074036 Gerrit-Change-Number: 34133 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: osmith <osmith(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-netif[master]: stream: Use new flag OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED for SCTP sockets
by pespin 23 Aug '23

23 Aug '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34114 ) Change subject: stream: Use new flag OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED for SCTP sockets ...................................................................... stream: Use new flag OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED for SCTP sockets This is required if the user of the stream API wants to use SCTP extra features such as setting the Peer Primary Address through ASCONF. At a later point we may want to add new osmo_stream APIs to set extra flags for the socket, or maybe simply add a new API specifically to enable ASCONF for the stream. Depends: libosmocore.git Change-Id Iac07031927b66a9d32d2bb2faab817e4c922a359 Related: OS#6076 Change-Id: I807b3748b8535d8e75ceea812d7baaf153fa1d60 --- M src/stream_cli.c M src/stream_srv.c 2 files changed, 21 insertions(+), 3 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified daniel: Looks good to me, approved diff --git a/src/stream_cli.c b/src/stream_cli.c index 1ee0ba5..b5ef66c 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -747,7 +747,7 @@ ret = osmo_sock_init2_multiaddr(AF_UNSPEC, SOCK_STREAM, cli->proto, (const char **)cli->local_addr, cli->local_addrcnt, cli->local_port, (const char **)cli->addr, cli->addrcnt, cli->port, - OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); + OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK|OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED); break; #endif default: @@ -826,7 +826,7 @@ ret = osmo_sock_init2_multiaddr(cli->sk_domain, cli->sk_type, cli->proto, (const char **)cli->local_addr, cli->local_addrcnt, cli->local_port, (const char **)cli->addr, cli->addrcnt, cli->port, - OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); + OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK|OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED); break; #endif default: diff --git a/src/stream_srv.c b/src/stream_srv.c index 17925af..c8d3233 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -411,7 +411,7 @@ case IPPROTO_SCTP: ret = osmo_sock_init2_multiaddr(link->sk_domain, link->sk_type, link->proto, (const char **)link->addr, link->addrcnt, link->port, - NULL, 0, 0, OSMO_SOCK_F_BIND); + NULL, 0, 0, OSMO_SOCK_F_BIND|OSMO_SOCK_F_SCTP_ASCONF_SUPPORTED); break; #endif default: -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34114 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I807b3748b8535d8e75ceea812d7baaf153fa1d60 Gerrit-Change-Number: 34114 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> 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 libosmo-gprs[master]: rlcmac: Fix Starting Time rfn->fn calculation
by pespin 23 Aug '23

23 Aug '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/34044 ) 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(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..a0b3490 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # 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 +libosmocore >1.8.0 gsm_fn2rfn(), gsm_rfn2fn() diff --git a/src/rlcmac/rlcmac_dec.c b/src/rlcmac/rlcmac_dec.c index d607aae..dcdc856 100644 --- a/src/rlcmac/rlcmac_dec.c +++ b/src/rlcmac/rlcmac_dec.c @@ -429,15 +429,17 @@ return num_blocks; } -/* 12.21 Starting Frame Number Description */ +/* TS 44.060 12.21 Starting Frame Number Description + * TS 44.018 10.5.2.38 Starting Time */ uint32_t TBF_StartingTime_to_fn(const StartingTime_t *tbf_start_time, uint32_t curr_fn) { - const struct gsm_time g_time = { - .t1 = tbf_start_time->N32, - .t2 = tbf_start_time->N51, - .t3 = tbf_start_time->N26 - }; - return gsm_gsmtime2fn(&g_time); + const uint8_t t1p = tbf_start_time->N32; + const uint8_t t3 = tbf_start_time->N51; + const uint8_t t2 = tbf_start_time->N26; + const uint16_t rfn = 51 * OSMO_MOD_FLR((t3 - t2), 26) + t3 + 51 * 26 * t1p; + const uint32_t fn = gsm_rfn2fn(rfn, curr_fn); + LOGRLCMAC(LOGL_DEBUG, "curr_fn=%u + RFN=%u -> FN=%u\n", curr_fn, rfn, fn); + return fn; } diff --git a/tests/rlcmac/Makefile.am b/tests/rlcmac/Makefile.am index 9d1f5b0..2fc5f9b 100644 --- a/tests/rlcmac/Makefile.am +++ b/tests/rlcmac/Makefile.am @@ -16,6 +16,7 @@ csn1_ts_44_018_test \ csn1_ts_44_060_test \ rlcmac_prim_test \ + rlcmac_types_test \ $(NULL) EXTRA_DIST = \ @@ -25,6 +26,8 @@ csn1_ts_44_060_test.err \ rlcmac_prim_test.ok \ rlcmac_prim_test.err \ + rlcmac_types_test.ok \ + rlcmac_types_test.err \ $(NULL) # Common LDADD entries @@ -44,3 +47,6 @@ rlcmac_prim_test_SOURCES = rlcmac_prim_test.c rlcmac_prim_test_LDADD = $(LDADD) + +rlcmac_types_test_SOURCES = rlcmac_types_test.c +rlcmac_types_test_LDADD = $(LDADD) diff --git a/tests/rlcmac/rlcmac_types_test.c b/tests/rlcmac/rlcmac_types_test.c new file mode 100644 index 0000000..1c32c91 --- /dev/null +++ b/tests/rlcmac/rlcmac_types_test.c @@ -0,0 +1,88 @@ +/* rlcmac_types_test.c + * + * (C) 2023 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <stdint.h> +#include <stdio.h> + +#include <osmocom/core/application.h> +#include <osmocom/core/logging.h> +#include <osmocom/core/utils.h> +#include <osmocom/core/msgb.h> +#include <osmocom/core/fsm.h> +#include <osmocom/core/timer.h> +#include <osmocom/core/select.h> +#include <osmocom/gsm/protocol/gsm_04_08.h> +#include <osmocom/gsm/gsm48_rest_octets.h> + +#include <osmocom/gprs/rlcmac/rlcmac.h> +#include <osmocom/gprs/rlcmac/csn1_defs.h> +#include <osmocom/gprs/rlcmac/rlcmac_dec.h> + +static void *tall_ctx = NULL; + + +/* SGSN->PCU->BTS --PCH--> MS containing "Paging Request Type 1" asking for PS services. + * RLCMAC will send GMMRR-PAGE.ind to GMM layer, which is in charge of orchestrating the response. */ +static void test_tbf_starting_time_to_fn(const uint32_t cur_fn, const uint32_t fn) +{ + const uint16_t rfn = gsm_fn2rfn(fn); + StartingTime_t st; + + printf("=== %s(cur_fn=%u, fn=%u) start ===\n", __func__, cur_fn, fn); + + /* TBF_STARTING_TIME -- same as 3GPP TS 44.018 §10.5.2.38 Starting Time without tag: */ + st.N32 = (rfn / (26 * 51)) % 32; + st.N51 = rfn % 51; + st.N26 = rfn % 26; + + printf("cur_fn=%u fn=%u rfn=%u [T1'=%u T3=%u T2=%u]\n", + cur_fn, fn, rfn, st.N32, st.N51, st.N26); + + uint32_t res_fn = TBF_StartingTime_to_fn(&st, cur_fn); + printf("res_fn=%u\n", res_fn); + OSMO_ASSERT(res_fn == fn); + + printf("=== %s(cur_fn=%u, fn=%u) end ===\n", __func__, cur_fn, fn); +} + +static const struct log_info_cat test_log_categories[] = { }; +static const struct log_info test_log_info = { + .cat = test_log_categories, + .num_cat = ARRAY_SIZE(test_log_categories), +}; + +int main(int argc, char *argv[]) +{ + tall_ctx = talloc_named_const(NULL, 1, __FILE__); + + osmo_init_logging2(tall_ctx, &test_log_info); + log_parse_category_mask(osmo_stderr_target, "DLGLOBAL,1:"); + osmo_fsm_log_addr(false); + + log_set_print_filename2(osmo_stderr_target, LOG_FILENAME_NONE); + log_set_print_category_hex(osmo_stderr_target, 0); + log_set_print_category(osmo_stderr_target, 1); + log_set_print_level(osmo_stderr_target, 1); + log_set_use_color(osmo_stderr_target, 0); + + test_tbf_starting_time_to_fn(0, 0); + test_tbf_starting_time_to_fn(0, 4); + test_tbf_starting_time_to_fn(4953, 4961); + test_tbf_starting_time_to_fn(2229729, 2229786); + test_tbf_starting_time_to_fn(2229777, 2229786); + test_tbf_starting_time_to_fn(1320458, 1320462); + + talloc_free(tall_ctx); +} diff --git a/tests/rlcmac/rlcmac_types_test.err b/tests/rlcmac/rlcmac_types_test.err new file mode 100644 index 0000000..ae698a7 --- /dev/null +++ b/tests/rlcmac/rlcmac_types_test.err @@ -0,0 +1,6 @@ +DLGLOBAL DEBUG curr_fn=0 + RFN=0 -> FN=0 +DLGLOBAL DEBUG curr_fn=0 + RFN=4 -> FN=4 +DLGLOBAL DEBUG curr_fn=4953 + RFN=4961 -> FN=4961 +DLGLOBAL DEBUG curr_fn=2229729 + RFN=23322 -> FN=2229786 +DLGLOBAL DEBUG curr_fn=2229777 + RFN=23322 -> FN=2229786 +DLGLOBAL DEBUG curr_fn=1320458 + RFN=5070 -> FN=1320462 diff --git a/tests/rlcmac/rlcmac_types_test.ok b/tests/rlcmac/rlcmac_types_test.ok new file mode 100644 index 0000000..aab6913 --- /dev/null +++ b/tests/rlcmac/rlcmac_types_test.ok @@ -0,0 +1,24 @@ +=== test_tbf_starting_time_to_fn(cur_fn=0, fn=0) start === +cur_fn=0 fn=0 rfn=0 [T1'=0 T3=0 T2=0] +res_fn=0 +=== test_tbf_starting_time_to_fn(cur_fn=0, fn=0) end === +=== test_tbf_starting_time_to_fn(cur_fn=0, fn=4) start === +cur_fn=0 fn=4 rfn=4 [T1'=0 T3=4 T2=4] +res_fn=4 +=== test_tbf_starting_time_to_fn(cur_fn=0, fn=4) end === +=== test_tbf_starting_time_to_fn(cur_fn=4953, fn=4961) start === +cur_fn=4953 fn=4961 rfn=4961 [T1'=3 T3=14 T2=21] +res_fn=4961 +=== test_tbf_starting_time_to_fn(cur_fn=4953, fn=4961) end === +=== test_tbf_starting_time_to_fn(cur_fn=2229729, fn=2229786) start === +cur_fn=2229729 fn=2229786 rfn=23322 [T1'=17 T3=15 T2=0] +res_fn=2229786 +=== test_tbf_starting_time_to_fn(cur_fn=2229729, fn=2229786) end === +=== test_tbf_starting_time_to_fn(cur_fn=2229777, fn=2229786) start === +cur_fn=2229777 fn=2229786 rfn=23322 [T1'=17 T3=15 T2=0] +res_fn=2229786 +=== test_tbf_starting_time_to_fn(cur_fn=2229777, fn=2229786) end === +=== test_tbf_starting_time_to_fn(cur_fn=1320458, fn=1320462) start === +cur_fn=1320458 fn=1320462 rfn=5070 [T1'=3 T3=21 T2=0] +res_fn=1320462 +=== test_tbf_starting_time_to_fn(cur_fn=1320458, fn=1320462) end === diff --git a/tests/testsuite.at b/tests/testsuite.at index 74fd43a..ce51e35 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -64,6 +64,13 @@ AT_CHECK([$abs_top_builddir/tests/rlcmac/rlcmac_prim_test], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([rlcmac/rlcmac_types]) +AT_KEYWORDS([rlcmac rlcmac_types]) +cat $abs_srcdir/rlcmac/rlcmac_types_test.ok > expout +cat $abs_srcdir/rlcmac/rlcmac_types_test.err > experr +AT_CHECK([$abs_top_builddir/tests/rlcmac/rlcmac_types_test], [0], [expout], [experr]) +AT_CLEANUP + AT_SETUP([sm/sm_prim]) AT_KEYWORDS([sm sm_prim]) cat $abs_srcdir/sm/sm_prim_test.ok > expout -- 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-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • ...
  • 152
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.