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 -----
  • 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

February 2023

  • 1 participants
  • 2601 discussions
Change in osmo-ttcn3-hacks[master]: pcu/osmo-pcu.cfg: use the PCUIF for neighbor resolution
by fixeria 10 Feb '23

10 Feb '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31275 ) Change subject: pcu/osmo-pcu.cfg: use the PCUIF for neighbor resolution ...................................................................... pcu/osmo-pcu.cfg: use the PCUIF for neighbor resolution This config is out of sync with the one in docker-playground.git. The 'neighbor resolution' param makes osmo-pcu use the CTRL interface. Change-Id: I8d59096644afd5a5278bc7bb1335670edad72576 Related: OS#5901 --- M pcu/osmo-pcu.cfg 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: dexter: Looks good to me, but someone else must approve pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/pcu/osmo-pcu.cfg b/pcu/osmo-pcu.cfg index f33dfd8..68ea521 100644 --- a/pcu/osmo-pcu.cfg +++ b/pcu/osmo-pcu.cfg @@ -31,6 +31,7 @@ alloc-algorithm dynamic gamma 0 pcu-socket /tmp/pcu_bts - neighbor resolution 127.0.0.1 +! By default, use the PCUIF for neighbor resolution +! neighbor resolution 127.0.0.1 gsmtap-remote-host 127.0.0.1 gsmtap-category enable-all -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31275 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: I8d59096644afd5a5278bc7bb1335670edad72576 Gerrit-Change-Number: 31275 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> 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
Change in libosmo-gprs[master]: sndcp: Add missing osmocom/core/endian.h include
by pespin 10 Feb '23

10 Feb '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31287 ) Change subject: sndcp: Add missing osmocom/core/endian.h include ...................................................................... sndcp: Add missing osmocom/core/endian.h include Header uses OSMO_IS_LITTLE_ENDIAN but it's not including the header conditionally definining it. Change-Id: Ie80bc320b0d31a4b8fc971a864094edd08b0e6dc --- M include/osmocom/gprs/sndcp/sndcp_private.h 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/87/31287/1 diff --git a/include/osmocom/gprs/sndcp/sndcp_private.h b/include/osmocom/gprs/sndcp/sndcp_private.h index 206b660..8943a78 100644 --- a/include/osmocom/gprs/sndcp/sndcp_private.h +++ b/include/osmocom/gprs/sndcp/sndcp_private.h @@ -9,6 +9,7 @@ #include <osmocom/core/linuxlist.h> #include <osmocom/core/msgb.h> #include <osmocom/core/logging.h> +#include <osmocom/core/endian.h> #include <osmocom/gprs/llc/llc.h> #include <osmocom/gprs/sndcp/sndcp.h> -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31287 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ie80bc320b0d31a4b8fc971a864094edd08b0e6dc Gerrit-Change-Number: 31287 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: Introduce DL TBF creation through PCH ImmAss
by pespin 10 Feb '23

10 Feb '23
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31286 to look at the new patch set (#3). Change subject: rlcmac: Introduce DL TBF creation through PCH ImmAss ...................................................................... rlcmac: Introduce DL TBF creation through PCH ImmAss This patch only introduces the gprs_rlcmac_dl_tbf subclass and allocates/frees it based on PCH ImmAss. It provides a unit test to showcase the scenario. Change-Id: I7f98e3456ef35d80becdad3481afeb771457b0ef --- M include/osmocom/gprs/rlcmac/Makefile.am M include/osmocom/gprs/rlcmac/gre.h M include/osmocom/gprs/rlcmac/rlcmac_private.h A include/osmocom/gprs/rlcmac/tbf_dl.h M src/rlcmac/Makefile.am M src/rlcmac/gre.c M src/rlcmac/rlcmac.c A src/rlcmac/tbf_dl.c M tests/rlcmac/rlcmac_prim_test.c M tests/rlcmac/rlcmac_prim_test.err M tests/rlcmac/rlcmac_prim_test.ok 11 files changed, 297 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/86/31286/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I7f98e3456ef35d80becdad3481afeb771457b0ef Gerrit-Change-Number: 31286 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: Introduce DL TBF creation through PCH ImmAss
by pespin 10 Feb '23

10 Feb '23
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31286 to look at the new patch set (#2). Change subject: rlcmac: Introduce DL TBF creation through PCH ImmAss ...................................................................... rlcmac: Introduce DL TBF creation through PCH ImmAss This patch only introduces the gprs_rlcmac_dl_tbf subclass and allocates/frees it based on PCH ImmAss. It provides a unit test to showcase the scenario. Change-Id: I7f98e3456ef35d80becdad3481afeb771457b0ef --- M include/osmocom/gprs/rlcmac/Makefile.am M include/osmocom/gprs/rlcmac/gre.h M include/osmocom/gprs/rlcmac/rlcmac_private.h A include/osmocom/gprs/rlcmac/tbf_dl.h M src/rlcmac/Makefile.am M src/rlcmac/gre.c M src/rlcmac/rlcmac.c A src/rlcmac/tbf_dl.c M tests/rlcmac/rlcmac_prim_test.c M tests/rlcmac/rlcmac_prim_test.err 10 files changed, 294 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/86/31286/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I7f98e3456ef35d80becdad3481afeb771457b0ef Gerrit-Change-Number: 31286 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: Implement GMMRR-ASSIGN.req
by pespin 10 Feb '23

10 Feb '23
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31285 to look at the new patch set (#2). Change subject: rlcmac: Implement GMMRR-ASSIGN.req ...................................................................... rlcmac: Implement GMMRR-ASSIGN.req Change-Id: I3178aa1af4a6c05c84253c6befcd4c786b8dd8e9 --- M include/osmocom/gprs/rlcmac/rlcmac_prim.h M src/rlcmac/rlcmac_prim.c 2 files changed, 16 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/85/31285/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31285 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I3178aa1af4a6c05c84253c6befcd4c786b8dd8e9 Gerrit-Change-Number: 31285 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: Introduce DL TBF creation through PCH ImmAss
by pespin 10 Feb '23

10 Feb '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31286 ) Change subject: rlcmac: Introduce DL TBF creation through PCH ImmAss ...................................................................... rlcmac: Introduce DL TBF creation through PCH ImmAss This patch only introduces the gprs_rlcmac_dl_tbf subclass and allocates/frees it based on PCH ImmAss. It provides a unit test to showcase the scenario. Change-Id: I7f98e3456ef35d80becdad3481afeb771457b0ef --- M include/osmocom/gprs/rlcmac/Makefile.am M include/osmocom/gprs/rlcmac/gre.h M include/osmocom/gprs/rlcmac/rlcmac_private.h A include/osmocom/gprs/rlcmac/tbf_dl.h M src/rlcmac/Makefile.am M src/rlcmac/gre.c M src/rlcmac/rlcmac.c A src/rlcmac/tbf_dl.c M tests/rlcmac/rlcmac_prim_test.c M tests/rlcmac/rlcmac_prim_test.err 10 files changed, 302 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/86/31286/1 diff --git a/include/osmocom/gprs/rlcmac/Makefile.am b/include/osmocom/gprs/rlcmac/Makefile.am index 3f04ee3..02d1a70 100644 --- a/include/osmocom/gprs/rlcmac/Makefile.am +++ b/include/osmocom/gprs/rlcmac/Makefile.am @@ -10,6 +10,7 @@ rlcmac_private.h \ sched.h \ tbf.h \ + tbf_dl.h \ tbf_ul.h \ tbf_ul_fsm.h \ tbf_ul_ass_fsm.h \ diff --git a/include/osmocom/gprs/rlcmac/gre.h b/include/osmocom/gprs/rlcmac/gre.h index ea50ddb..ca5f773 100644 --- a/include/osmocom/gprs/rlcmac/gre.h +++ b/include/osmocom/gprs/rlcmac/gre.h @@ -4,6 +4,7 @@ #include <osmocom/gprs/rlcmac/rlcmac.h> #include <osmocom/gprs/rlcmac/llc_queue.h> +struct gprs_rlcmac_dl_tbf; struct gprs_rlcmac_ul_tbf; struct gprs_rlcmac_entity { @@ -12,6 +13,7 @@ struct gprs_rlcmac_llc_queue *llc_queue; + struct gprs_rlcmac_dl_tbf *dl_tbf; struct gprs_rlcmac_ul_tbf *ul_tbf; }; diff --git a/include/osmocom/gprs/rlcmac/rlcmac_private.h b/include/osmocom/gprs/rlcmac/rlcmac_private.h index f35b69a..f9a2f2e 100644 --- a/include/osmocom/gprs/rlcmac/rlcmac_private.h +++ b/include/osmocom/gprs/rlcmac/rlcmac_private.h @@ -28,6 +28,16 @@ struct gprs_rlcmac_ul_tbf_allocation_ts ts[8]; }; +struct gprs_rlcmac_dl_tbf_allocation_ts { + bool allocated; +}; + +struct gprs_rlcmac_dl_tbf_allocation { + uint8_t dl_tfi; + uint8_t num_ts; /* number of allocated TS */ + struct gprs_rlcmac_dl_tbf_allocation_ts ts[8]; +}; + extern int g_rlcmac_log_cat[_OSMO_GPRS_RLCMAC_LOGC_MAX]; #define LOGRLCMAC(lvl, fmt, args...) LOGP(g_rlcmac_log_cat[OSMO_GPRS_RLCMAC_LOGC_RLCMAC], lvl, fmt, ## args) @@ -56,6 +66,7 @@ struct llist_head gre_list; /* contains (struct gprs_rlcmac_entity)->entry */ uint8_t next_ul_tbf_nr; + uint8_t next_dl_tbf_nr; }; extern struct gprs_rlcmac_ctx *g_ctx; diff --git a/include/osmocom/gprs/rlcmac/tbf_dl.h b/include/osmocom/gprs/rlcmac/tbf_dl.h new file mode 100644 index 0000000..ce97ea8 --- /dev/null +++ b/include/osmocom/gprs/rlcmac/tbf_dl.h @@ -0,0 +1,52 @@ +/* Downlink TBF, 3GPP TS 44.060 */ +#pragma once + +#include <inttypes.h> + +#include <osmocom/core/msgb.h> + +#include <osmocom/gprs/rlcmac/tbf.h> +//#include <osmocom/gprs/rlcmac/tbf_dl_fsm.h> +#include <osmocom/gprs/rlcmac/coding_scheme.h> +#include <osmocom/gprs/rlcmac/sched.h> +#include <osmocom/gprs/rlcmac/rlcmac_private.h> + +struct gprs_rlcmac_dl_tbf { + struct gprs_rlcmac_tbf tbf; + //struct gprs_rlcmac_tbf_dl_fsm_ctx state_fsm; + + /* Current TS/TFI/USF allocated by the PCU: */ + struct gprs_rlcmac_dl_tbf_allocation cur_alloc; +}; + +struct gprs_rlcmac_dl_tbf *gprs_rlcmac_dl_tbf_alloc(struct gprs_rlcmac_entity *gre); +void gprs_rlcmac_dl_tbf_free(struct gprs_rlcmac_dl_tbf *dl_tbf); + +int gprs_rlcmac_dl_tbf_configure_l1ctl(struct gprs_rlcmac_dl_tbf *dl_tbf); + +static inline struct gprs_rlcmac_tbf *dl_tbf_as_tbf(struct gprs_rlcmac_dl_tbf *dl_tbf) +{ + return &dl_tbf->tbf; +} + +static inline const struct gprs_rlcmac_tbf *dl_tbf_as_tbf_const(const struct gprs_rlcmac_dl_tbf *dl_tbf) +{ + return &dl_tbf->tbf; +} + +static inline struct gprs_rlcmac_dl_tbf *tbf_as_dl_tbf(struct gprs_rlcmac_tbf *tbf) +{ + OSMO_ASSERT(tbf->direction == GPRS_RLCMAC_TBF_DIR_DL); + return (struct gprs_rlcmac_dl_tbf *)tbf; +} + +static inline const struct gprs_rlcmac_dl_tbf *tbf_as_dl_tbf_const(struct gprs_rlcmac_tbf *tbf) +{ + OSMO_ASSERT(tbf->direction == GPRS_RLCMAC_TBF_DIR_DL); + return (const struct gprs_rlcmac_dl_tbf *)tbf; +} + +#define LOGPTBFDL(dl_tbf, lvl, fmt, args...) \ + LOGP(g_rlcmac_log_cat[OSMO_GPRS_RLCMAC_LOGC_TBFUL], lvl, "TBF(DL:NR-%" PRIu8 ":TLLI-%08x) " fmt, \ + (dl_tbf)->tbf.nr, (dl_tbf)->tbf.gre->tlli, \ + ## args) diff --git a/src/rlcmac/Makefile.am b/src/rlcmac/Makefile.am index 6fca2b0..bdbb6a4 100644 --- a/src/rlcmac/Makefile.am +++ b/src/rlcmac/Makefile.am @@ -39,6 +39,7 @@ rlcmac_prim.c \ sched.c \ tbf.c \ + tbf_dl.c \ tbf_ul.c \ tbf_ul_fsm.c \ tbf_ul_ass_fsm.c \ diff --git a/src/rlcmac/gre.c b/src/rlcmac/gre.c index 3d8ba08..40cd585 100644 --- a/src/rlcmac/gre.c +++ b/src/rlcmac/gre.c @@ -24,6 +24,7 @@ #include <osmocom/gprs/rlcmac/rlcmac.h> #include <osmocom/gprs/rlcmac/rlcmac_prim.h> #include <osmocom/gprs/rlcmac/rlcmac_private.h> +#include <osmocom/gprs/rlcmac/tbf_dl.h> #include <osmocom/gprs/rlcmac/tbf_ul_fsm.h> #include <osmocom/gprs/rlcmac/tbf_ul.h> #include <osmocom/gprs/rlcmac/gre.h> @@ -58,6 +59,7 @@ if (!gre) return; + gprs_rlcmac_dl_tbf_free(gre->dl_tbf); gprs_rlcmac_ul_tbf_free(gre->ul_tbf); gprs_rlcmac_llc_queue_free(gre->llc_queue); llist_del(&gre->entry); diff --git a/src/rlcmac/rlcmac.c b/src/rlcmac/rlcmac.c index e5a583e..c1a5d76 100644 --- a/src/rlcmac/rlcmac.c +++ b/src/rlcmac/rlcmac.c @@ -29,6 +29,7 @@ #include <osmocom/gprs/rlcmac/tbf_ul_fsm.h> #include <osmocom/gprs/rlcmac/tbf_ul_ass_fsm.h> #include <osmocom/gprs/rlcmac/gre.h> +#include <osmocom/gprs/rlcmac/tbf_dl.h> #include <osmocom/gprs/rlcmac/tbf_ul.h> #include <osmocom/gprs/rlcmac/csn1_defs.h> @@ -140,6 +141,40 @@ return rc; } +static int gprs_rlcmac_handle_ccch_imm_ass_dl_tbf(uint8_t ts_nr, const struct gsm48_imm_ass *ia, const IA_RestOctets_t *iaro) +{ + int rc; + struct gprs_rlcmac_entity *gre; + struct gprs_rlcmac_dl_tbf *dl_tbf; + const Packet_Downlink_ImmAssignment_t *pkdlass; + + if (iaro->UnionType == 1) { + /* TODO */ + return -ENOENT; + } + + pkdlass = &iaro->u.hh.u.UplinkDownlinkAssignment.ul_dl.Packet_Downlink_ImmAssignment; + + gre = gprs_rlcmac_find_entity_by_tlli(pkdlass->TLLI); + if (!gre) { + LOGRLCMAC(LOGL_NOTICE, "Got IMM_ASS (DL_TBF) for unknown TLLI=0x%08x\n", pkdlass->TLLI); + return -ENOENT; + } + + LOGGRE(gre, LOGL_INFO, "Got PCH IMM_ASS (DL_TBF): DL_TFI=%u TS=%u\n", + pkdlass->TFI_ASSIGNMENT, ts_nr); + dl_tbf = gprs_rlcmac_dl_tbf_alloc(gre); + dl_tbf->cur_alloc.dl_tfi = pkdlass->TFI_ASSIGNMENT; + dl_tbf->cur_alloc.ts[ts_nr].allocated = true; + + /* replace old DL TBF with new one: */ + gprs_rlcmac_dl_tbf_free(gre->dl_tbf); + gre->dl_tbf = dl_tbf; + + rc = gprs_rlcmac_dl_tbf_configure_l1ctl(gre->dl_tbf); + return rc; +} + int gprs_rlcmac_handle_ccch_imm_ass(const struct gsm48_imm_ass *ia) { int rc; @@ -172,7 +207,7 @@ rc = gprs_rlcmac_handle_ccch_imm_ass_ul_tbf(ch_ts, ia, &iaro); break; case 1: /* iaro.u.ll.lh0x.MultiBlock_PktDlAss.* (IA_MultiBlock_PktDlAss_t) */ - /* TODO: Alloc DL TBF */ + rc = gprs_rlcmac_handle_ccch_imm_ass_dl_tbf(ch_ts, ia, &iaro); break; } /* TODO: iaro.u.lh.AdditionsR13.* (IA_AdditionsR13_t) */ @@ -205,7 +240,7 @@ } break; case 1: /* iaro.u.hh.u.UplinkDownlinkAssignment.ul_dl.Packet_Downlink_ImmAssignment* (Packet_Downlink_ImmAssignment_t) */ - /* TODO: Alloc DL TBF */ + rc = gprs_rlcmac_handle_ccch_imm_ass_dl_tbf(ch_ts, ia, &iaro); break; } break; diff --git a/src/rlcmac/tbf_dl.c b/src/rlcmac/tbf_dl.c new file mode 100644 index 0000000..82a3847 --- /dev/null +++ b/src/rlcmac/tbf_dl.c @@ -0,0 +1,85 @@ +/* Downlink TBF as per 3GPP TS 44.064 */ +/* + * (C) 2023 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 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 Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +#include <osmocom/core/logging.h> + +#include <osmocom/gprs/rlcmac/tbf_dl.h> +#include <osmocom/gprs/rlcmac/gre.h> + +struct gprs_rlcmac_dl_tbf *gprs_rlcmac_dl_tbf_alloc(struct gprs_rlcmac_entity *gre) +{ + struct gprs_rlcmac_dl_tbf *dl_tbf; + //int rc; + + dl_tbf = talloc_zero(gre, struct gprs_rlcmac_dl_tbf); + if (!dl_tbf) + return NULL; + + gprs_rlcmac_tbf_constructor(dl_tbf_as_tbf(dl_tbf), GPRS_RLCMAC_TBF_DIR_DL, gre); + + //rc = gprs_rlcmac_tbf_dl_fsm_constructor(dl_tbf); + //if (rc < 0) + // goto err_tbf_destruct; + + dl_tbf->tbf.nr = g_ctx->next_dl_tbf_nr++; + + return dl_tbf; +#if 0 +err_tbf_destruct: + gprs_rlcmac_tbf_destructor(dl_tbf_as_tbf(dl_tbf)); + talloc_free(dl_tbf); + return NULL; +#endif +} + +void gprs_rlcmac_dl_tbf_free(struct gprs_rlcmac_dl_tbf *dl_tbf) +{ + if (!dl_tbf) + return; + + //gprs_rlcmac_tbf_dl_fsm_destructor(dl_tbf); + + gprs_rlcmac_tbf_destructor(dl_tbf_as_tbf(dl_tbf)); + talloc_free(dl_tbf); +} + + +static uint8_t dl_tbf_dl_slotmask(struct gprs_rlcmac_dl_tbf *dl_tbf) +{ + uint8_t i; + uint8_t dl_slotmask = 0; + + for (i = 0; i < 8; i++) { + if (dl_tbf->cur_alloc.ts[i].allocated) + dl_slotmask |= (1 << i); + } + + return dl_slotmask; +} + +int gprs_rlcmac_dl_tbf_configure_l1ctl(struct gprs_rlcmac_dl_tbf *dl_tbf) +{ + struct osmo_gprs_rlcmac_prim *rlcmac_prim; + uint8_t dl_slotmask = dl_tbf_dl_slotmask(dl_tbf); + + LOGPTBFDL(dl_tbf, LOGL_INFO, "Send L1CTL-CF_DL_TBF.req dl_slotmask=0x%02x\n", dl_slotmask); + rlcmac_prim = gprs_rlcmac_prim_alloc_l1ctl_cfg_dl_tbf_req(dl_tbf->tbf.nr, dl_slotmask, dl_tbf->cur_alloc.dl_tfi); + return gprs_rlcmac_prim_call_down_cb(rlcmac_prim); +} diff --git a/tests/rlcmac/rlcmac_prim_test.c b/tests/rlcmac/rlcmac_prim_test.c index 2070997..65c35de 100644 --- a/tests/rlcmac/rlcmac_prim_test.c +++ b/tests/rlcmac/rlcmac_prim_test.c @@ -119,6 +119,64 @@ 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b }; +/* +GSM CCCH - Immediate Assignment + L2 Pseudo Length + 0010 11.. = L2 Pseudo Length value: 11 + .... 0110 = Protocol discriminator: Radio Resources Management messages (0x6) + .... 0110 = Protocol discriminator: Radio Resources Management messages (0x6) + 0000 .... = Skip Indicator: No indication of selected PLMN (0) + Message Type: Immediate Assignment + Page Mode + .... 0000 = Page Mode: Normal paging (0) + Dedicated mode or TBF + 0011 .... = Dedicated mode or TBF: This message assigns a downlink TBF to the mobile station identified in the IA Rest Octets IE (3) + Packet Channel Description + 0000 1... = Channel Type: 1 + .... .111 = Timeslot: 7 + 111. .... = Training Sequence: 7 + .... .0.. = Spare: 0x00 + .... ..11 0110 0111 = Single channel ARFCN: 871 + Request Reference + Random Access Information (RA): 125 + 1000 0... = T1': 16 + .... .000 000. .... = T3: 0 + ...0 0000 = T2: 0 + [RFN: 21216] + Timing Advance + Timing advance value: 28 + Mobile Allocation + Length: 0 + IA Rest Octets + H... .... = First Discriminator Bit: High + .H.. .... = Second Discriminator Bit: High + ..0. .... = Discriminator Bit: Packet Assignment + ...1 .... = Discriminator Bit: Packet Downlink Assignment + Packet Downlink Assignment + .... 0000 0000 0000 0000 0000 0000 0000 0001 .... = TLLI: 0x00000001 + .... 1... = TFI Assignment (etc): Present + .... .000 00.. .... = TFI_Assignment: 0 + ..0. .... = RLC_Mode: RLC acknowledged mode + ...0 .... = Alpha: Not Present + .... 0000 0... .... = Gamma: 0 dB (0) + .0.. .... = Polling: no action is required from MS + ..0. .... = TA_Valid: the timing advance value is not valid + ...0 .... = Timing Advance Index: Not Present + .... 0... = TBF Starting Time: Not Present + .... .0.. = P0: Not Present + .... ..L. = Additions in R99: Not Present + .... ...L = Additions in Rel-6: Not Present + L... .... = Additions in Rel-7: Not Present + .L.. .... = Additions in Rel-10: Not Present + ..L. .... = Additions in Rel-13: Not Present + Padding Bits: default padding +*/ +static uint8_t ccch_imm_ass_pkt_dl_tbf[] = { + 0x2d, 0x06, 0x3f, 0x30, 0x0f, 0xe3, 0x67, 0x7d, 0x80, 0x00, + 0x1c, 0x00, 0xd0, 0x00, 0x00, 0x00, 0x18, 0x00, 0x03, + 0x2b, 0x2b, 0x2b, 0x2b +}; + static int test_rlcmac_prim_up_cb(struct osmo_gprs_rlcmac_prim *rlcmac_prim, void *user_data) { const char *pdu_name = osmo_gprs_rlcmac_prim_name(rlcmac_prim); @@ -163,6 +221,12 @@ rlcmac_prim->l1ctl.cfg_ul_tbf_req.ul_tbf_nr, rlcmac_prim->l1ctl.cfg_ul_tbf_req.ul_slotmask); break; + case OSMO_PRIM(OSMO_GPRS_RLCMAC_L1CTL_CFG_DL_TBF, PRIM_OP_REQUEST): + printf("%s(): Rx %s dl_tbf_nr=%u dl_slotmask=0x%02x dl_tfi=%u\n", __func__, pdu_name, + rlcmac_prim->l1ctl.cfg_dl_tbf_req.dl_tbf_nr, + rlcmac_prim->l1ctl.cfg_dl_tbf_req.dl_slotmask, + rlcmac_prim->l1ctl.cfg_dl_tbf_req.dl_tfi); + break; default: printf("%s(): Rx %s\n", __func__, pdu_name); } @@ -184,6 +248,12 @@ osmo_gprs_rlcmac_prim_set_down_cb(test_rlcmac_prim_down_cb, NULL); } +void cleanup_test(void) +{ + /* Reinit the RLCMAC layer so that data generated during the test is freed within the test context: */ + osmo_gprs_rlcmac_init(OSMO_GPRS_RLCMAC_LOCATION_MS); +} + static void test_ul_tbf_attach(void) { struct osmo_gprs_rlcmac_prim *rlcmac_prim; @@ -211,7 +281,40 @@ rc = osmo_gprs_rlcmac_prim_lower_up(rlcmac_prim); OSMO_ASSERT(rc == 0); + printf("=== %s end ===\n", __func__); + cleanup_test(); +} + +/* PCU allocates a DL TBF through PCH ImmAss for MS (when in packet-idle) */ +static void test_dl_tbf_ccch_assign(void) +{ + struct osmo_gprs_rlcmac_prim *rlcmac_prim; + int rc; + + printf("=== %s start ===\n", __func__); + prepare_test(); + uint32_t tlli = 0x0000001; + //uint8_t ts_nr = 7; + //uint8_t usf = 0; + //uint32_t rts_fn = 4; + + /* Notify RLCMAC about our TLLI */ + rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_gmmrr_assign_req(tlli); + rc = osmo_gprs_rlcmac_prim_upper_down(rlcmac_prim); + + OSMO_ASSERT(sizeof(ccch_imm_ass_pkt_dl_tbf) == GSM_MACBLOCK_LEN); + rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_l1ctl_ccch_data_ind(0, ccch_imm_ass_pkt_dl_tbf); + rc = osmo_gprs_rlcmac_prim_lower_up(rlcmac_prim); + OSMO_ASSERT(rc == 0); + + /* Trigger transmission of LLC data (GMM Attach) */ + //rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_l1ctl_pdch_rts_ind(ts_nr, rts_fn, usf); + //rc = osmo_gprs_rlcmac_prim_lower_up(rlcmac_prim); + + OSMO_ASSERT(rc == 0); + printf("=== %s end ===\n", __func__); + cleanup_test(); } static const struct log_info_cat test_log_categories[] = { }; @@ -235,6 +338,7 @@ log_set_use_color(osmo_stderr_target, 0); test_ul_tbf_attach(); + test_dl_tbf_ccch_assign(); talloc_free(tall_ctx); } diff --git a/tests/rlcmac/rlcmac_prim_test.err b/tests/rlcmac/rlcmac_prim_test.err index e6d6b30..4658184 100644 --- a/tests/rlcmac/rlcmac_prim_test.err +++ b/tests/rlcmac/rlcmac_prim_test.err @@ -25,3 +25,10 @@ DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying 1 RLC blocks, 1 BSNs DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN 0) DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 0, CS-2): 3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated +DLGLOBAL INFO UL_TBF{FLOW}: Deallocated +DLGLOBAL INFO Rx from upper layers: GMMRR-ASSIGN.request +DLGLOBAL INFO GMMRR-ASSIGN.req: creating new entity TLLI=0x00000001 +DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication +DLGLOBAL INFO GRE(00000001) Got PCH IMM_ASS (DL_TBF): DL_TFI=0 TS=7 +DLGLOBAL INFO TBF(DL:NR-0:TLLI-00000001) Send L1CTL-CF_DL_TBF.req dl_slotmask=0x80 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31286 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I7f98e3456ef35d80becdad3481afeb771457b0ef Gerrit-Change-Number: 31286 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: llc_queue: Make sure queue is cleared before freeing mem
by pespin 10 Feb '23

10 Feb '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31283 ) Change subject: rlcmac: llc_queue: Make sure queue is cleared before freeing mem ...................................................................... rlcmac: llc_queue: Make sure queue is cleared before freeing mem Change-Id: Iadd08c727d46dfb5cac4df5219ecbcbacf6482eb --- M src/rlcmac/llc_queue.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/83/31283/1 diff --git a/src/rlcmac/llc_queue.c b/src/rlcmac/llc_queue.c index 1422f1f..2643b66 100644 --- a/src/rlcmac/llc_queue.c +++ b/src/rlcmac/llc_queue.c @@ -56,6 +56,7 @@ void gprs_rlcmac_llc_queue_free(struct gprs_rlcmac_llc_queue *q) { + gprs_rlcmac_llc_queue_clear(q); talloc_free(q); } -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31283 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Iadd08c727d46dfb5cac4df5219ecbcbacf6482eb Gerrit-Change-Number: 31283 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: Implement GMMRR-ASSIGN.req
by pespin 10 Feb '23

10 Feb '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31285 ) Change subject: rlcmac: Implement GMMRR-ASSIGN.req ...................................................................... rlcmac: Implement GMMRR-ASSIGN.req Change-Id: I3178aa1af4a6c05c84253c6befcd4c786b8dd8e9 --- M include/osmocom/gprs/rlcmac/rlcmac_prim.h M src/rlcmac/rlcmac_prim.c 2 files changed, 16 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/85/31285/1 diff --git a/include/osmocom/gprs/rlcmac/rlcmac_prim.h b/include/osmocom/gprs/rlcmac/rlcmac_prim.h index 92e644e..40d2d9a 100644 --- a/include/osmocom/gprs/rlcmac/rlcmac_prim.h +++ b/include/osmocom/gprs/rlcmac/rlcmac_prim.h @@ -186,7 +186,7 @@ uint32_t tlli, uint8_t *ll_pdu, size_t ll_pdu_len); /* Alloc primitive for GMMRR SAP: */ -struct osmo_gprs_rlcmac_prim *osmo_gprs_rlcmac_prim_alloc_gmmrr_asign_req( +struct osmo_gprs_rlcmac_prim *osmo_gprs_rlcmac_prim_alloc_gmmrr_assign_req( uint32_t new_tlli); /* Alloc primitive for L1CTL SAP: */ diff --git a/src/rlcmac/rlcmac_prim.c b/src/rlcmac/rlcmac_prim.c index ef0dd22..9e0c12f 100644 --- a/src/rlcmac/rlcmac_prim.c +++ b/src/rlcmac/rlcmac_prim.c @@ -383,8 +383,21 @@ static int rlcmac_prim_handle_gmmrr_assign_req(struct osmo_gprs_rlcmac_prim *rlcmac_prim) { - int rc = gprs_rlcmac_prim_handle_unsupported(rlcmac_prim); - return rc; + struct gprs_rlcmac_entity *gre; + + gre = gprs_rlcmac_find_entity_by_tlli(rlcmac_prim->gmmrr.assign_req.new_tlli); + if (!gre) { + LOGRLCMAC(LOGL_INFO, "GMMRR-ASSIGN.req: TLLI=0x%08x not found, creating entity on the fly\n", + rlcmac_prim->gmmrr.assign_req.new_tlli); + gre = gprs_rlcmac_entity_alloc(rlcmac_prim->gmmrr.assign_req.new_tlli); + OSMO_ASSERT(gre); + } else { + LOGRLCMAC(LOGL_INFO, "GMMRR-ASSIGN.req: TLLI=0x%08x already exists\n", + rlcmac_prim->gmmrr.assign_req.new_tlli); + } + + msgb_free(rlcmac_prim->oph.msg); + return 0; } static int gprs_rlcmac_prim_gmmrr_upper_down(struct osmo_gprs_rlcmac_prim *rlcmac_prim) -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31285 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I3178aa1af4a6c05c84253c6befcd4c786b8dd8e9 Gerrit-Change-Number: 31285 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: Make sure entities are freed if lib is re-initialized
by pespin 10 Feb '23

10 Feb '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31284 ) Change subject: rlcmac: Make sure entities are freed if lib is re-initialized ...................................................................... rlcmac: Make sure entities are freed if lib is re-initialized This allows proper memory cleanup of the whole library everytime we want to run a new unit test in the same proces. Change-Id: I568e2f783a575ae457f0845eca34951ae9822eeb --- M src/rlcmac/rlcmac.c 1 file changed, 11 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/84/31284/1 diff --git a/src/rlcmac/rlcmac.c b/src/rlcmac/rlcmac.c index 424008a..1fae450 100644 --- a/src/rlcmac/rlcmac.c +++ b/src/rlcmac/rlcmac.c @@ -41,6 +41,16 @@ { 0 } /* empty item at the end */ }; +static void gprs_rlcmac_ctx_free(void) +{ + struct gprs_rlcmac_entity *gre; + + while ((gre = llist_first_entry_or_null(&g_ctx->gre_list, struct gprs_rlcmac_entity, entry))) + gprs_rlcmac_entity_free(gre); + + talloc_free(g_ctx); +} + int osmo_gprs_rlcmac_init(enum osmo_gprs_rlcmac_location location) { bool first_init = true; @@ -48,7 +58,7 @@ OSMO_ASSERT(location == OSMO_GPRS_RLCMAC_LOCATION_MS || location == OSMO_GPRS_RLCMAC_LOCATION_PCU) if (g_ctx) { - talloc_free(g_ctx); + gprs_rlcmac_ctx_free(); first_init = false; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31284 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I568e2f783a575ae457f0845eca34951ae9822eeb Gerrit-Change-Number: 31284 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: Initial ul_tbf data support
by pespin 10 Feb '23

10 Feb '23
Attention is currently required from: pespin, fixeria. Hello Jenkins Builder, laforge, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31170 to look at the new patch set (#9). Change subject: rlcmac: Initial ul_tbf data support ...................................................................... rlcmac: Initial ul_tbf data support This is basically an import of relevant code from osmo-pcu.git 08523c2286dfe27402f8e2eb4b98da5a529c7915 which allows encoding LLC frames into RLC/MAC uplink data blocks. A 1-to-1 import was not possible for several reasons: * osmo-pcu uses C++ in some places * osmo-pcu implements encoding of DL data blocks, not UL data blocks * Some osmo-pcu code is still not really polished and stuff is still mixed (for instance rlc_window(_ul).c/h were split into their own files here). Hence this was not a "copy all files and leave as they are" import, but rather looking at the encode path starting on osmo-pcu.git scheduler and see which code had to be pulled in to encode the RLC/MAC blocks. Due to the slightly different requerirements for UL and DL blocks, it is well possible that further work in needed in order to have the code produce correct blocks. This is only a first step to pull in all code so that stuff can be fixed in smallish incremental steps. Related: OS#5500 Change-Id: I0a01d79d16bbfc63aa88e6bb0f432f3772645730 --- M include/osmocom/gprs/rlcmac/Makefile.am A include/osmocom/gprs/rlcmac/coding_scheme.h A include/osmocom/gprs/rlcmac/rlc.h A include/osmocom/gprs/rlcmac/rlc_window.h A include/osmocom/gprs/rlcmac/rlc_window_ul.h M include/osmocom/gprs/rlcmac/rlcmac_enc.h M include/osmocom/gprs/rlcmac/rlcmac_private.h M include/osmocom/gprs/rlcmac/tbf.h M include/osmocom/gprs/rlcmac/tbf_ul.h M include/osmocom/gprs/rlcmac/tbf_ul_fsm.h M src/rlcmac/Makefile.am A src/rlcmac/coding_scheme.c A src/rlcmac/rlc.c A src/rlcmac/rlc_window.c A src/rlcmac/rlc_window_ul.c M src/rlcmac/rlcmac.c M src/rlcmac/rlcmac_enc.c M src/rlcmac/sched.c M src/rlcmac/tbf_ul.c M src/rlcmac/tbf_ul_ass_fsm.c M src/rlcmac/tbf_ul_fsm.c M tests/rlcmac/rlcmac_prim_test.c M tests/rlcmac/rlcmac_prim_test.err M tests/rlcmac/rlcmac_prim_test.ok 24 files changed, 2,562 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/70/31170/9 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31170 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I0a01d79d16bbfc63aa88e6bb0f432f3772645730 Gerrit-Change-Number: 31170 Gerrit-PatchSet: 9 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-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • ...
  • 261
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.