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

January 2023

  • 1 participants
  • 2205 discussions
Change in osmo-sgsn[master]: gtp_{ggsn,mme}: Allocate contexts under struct sgsn_instance
by pespin 12 Jan '23

12 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30890 ) Change subject: gtp_{ggsn,mme}: Allocate contexts under struct sgsn_instance ...................................................................... gtp_{ggsn,mme}: Allocate contexts under struct sgsn_instance This way apns are managed by the lifcycle of the main global struct sgsn_instance automatically. Change-Id: Ie65d59632a368c6957c33dca64e856ace792b2c6 --- M include/osmocom/sgsn/gtp_ggsn.h M src/sgsn/gprs_sgsn.c M src/sgsn/gprs_sm.c M src/sgsn/gtp_ggsn.c M src/sgsn/gtp_mme.c M src/sgsn/sgsn_libgtp.c M src/sgsn/sgsn_vty.c M tests/sgsn/sgsn_test.c 8 files changed, 25 insertions(+), 26 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved daniel: Looks good to me, but someone else must approve diff --git a/include/osmocom/sgsn/gtp_ggsn.h b/include/osmocom/sgsn/gtp_ggsn.h index 224fa35..6afb866 100644 --- a/include/osmocom/sgsn/gtp_ggsn.h +++ b/include/osmocom/sgsn/gtp_ggsn.h @@ -10,6 +10,7 @@ struct gsn_t; struct sgsn_pdp_ctx; +struct sgsn_instance; struct sgsn_ggsn_ctx { struct llist_head list; @@ -22,11 +23,11 @@ struct osmo_timer_list echo_timer; unsigned int echo_interval; }; -struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_alloc(uint32_t id); +struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_alloc(struct sgsn_instance *sgsn, uint32_t id); void sgsn_ggsn_ctx_free(struct sgsn_ggsn_ctx *ggc); -struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_id(uint32_t id); -struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_addr(struct in_addr *addr); -struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_find_alloc(uint32_t id); +struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_id(struct sgsn_instance *sgsn, uint32_t id); +struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_addr(struct sgsn_instance *sgsn, struct in_addr *addr); +struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_find_alloc(struct sgsn_instance *sgsn, uint32_t id); void sgsn_ggsn_ctx_drop_pdp(struct sgsn_pdp_ctx *pctx); int sgsn_ggsn_ctx_drop_all_pdp_except(struct sgsn_ggsn_ctx *ggsn, struct sgsn_pdp_ctx *except); int sgsn_ggsn_ctx_drop_all_pdp(struct sgsn_ggsn_ctx *ggsn); diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c index 42d1ece..8c2734b 100644 --- a/src/sgsn/gprs_sgsn.c +++ b/src/sgsn/gprs_sgsn.c @@ -713,11 +713,11 @@ ggsn = apn_ctx->ggsn; } else if (llist_empty(&sgsn->apn_list)) { /* No configuration -> use GGSN 0 */ - ggsn = sgsn_ggsn_ctx_by_id(0); + ggsn = sgsn_ggsn_ctx_by_id(sgsn, 0); } else if (allow_any_apn && (selected_apn_str == NULL || strlen(selected_apn_str) == 0)) { /* No APN given and no default configuration -> Use GGSN 0 */ - ggsn = sgsn_ggsn_ctx_by_id(0); + ggsn = sgsn_ggsn_ctx_by_id(sgsn, 0); } else { /* No matching configuration found */ LOGMMCTXP(LOGL_NOTICE, mmctx, diff --git a/src/sgsn/gprs_sm.c b/src/sgsn/gprs_sm.c index 157e279..184350d 100644 --- a/src/sgsn/gprs_sm.c +++ b/src/sgsn/gprs_sm.c @@ -378,7 +378,7 @@ goto reject_due_failure; } - ggsn = sgsn_ggsn_ctx_alloc(UINT32_MAX); + ggsn = sgsn_ggsn_ctx_alloc(sgsn, UINT32_MAX); if (!ggsn) { LOGMMCTXP(LOGL_ERROR, lookup->mmctx, "Failed to create ggsn.\n"); goto reject_due_failure; diff --git a/src/sgsn/gtp_ggsn.c b/src/sgsn/gtp_ggsn.c index be07d13..b43fb25 100644 --- a/src/sgsn/gtp_ggsn.c +++ b/src/sgsn/gtp_ggsn.c @@ -35,8 +35,6 @@ #include <osmocom/sgsn/gprs_gmm_fsm.h> #include <osmocom/sgsn/gprs_sm.h> -extern void *tall_sgsn_ctx; - void sgsn_ggsn_ctx_check_echo_timer(struct sgsn_ggsn_ctx *ggc) { bool pending = osmo_timer_pending(&ggc->echo_timer); @@ -59,11 +57,11 @@ osmo_timer_schedule(&ggc->echo_timer, ggc->echo_interval, 0); } -struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_alloc(uint32_t id) +struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_alloc(struct sgsn_instance *sgsn, uint32_t id) { struct sgsn_ggsn_ctx *ggc; - ggc = talloc_zero(tall_sgsn_ctx, struct sgsn_ggsn_ctx); + ggc = talloc_zero(sgsn, struct sgsn_ggsn_ctx); if (!ggc) return NULL; @@ -86,7 +84,7 @@ talloc_free(ggc); } -struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_id(uint32_t id) +struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_id(struct sgsn_instance *sgsn, uint32_t id) { struct sgsn_ggsn_ctx *ggc; @@ -97,7 +95,7 @@ return NULL; } -struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_addr(struct in_addr *addr) +struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_addr(struct sgsn_instance *sgsn, struct in_addr *addr) { struct sgsn_ggsn_ctx *ggc; @@ -109,13 +107,13 @@ } -struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_find_alloc(uint32_t id) +struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_find_alloc(struct sgsn_instance *sgsn, uint32_t id) { struct sgsn_ggsn_ctx *ggc; - ggc = sgsn_ggsn_ctx_by_id(id); + ggc = sgsn_ggsn_ctx_by_id(sgsn, id); if (!ggc) - ggc = sgsn_ggsn_ctx_alloc(id); + ggc = sgsn_ggsn_ctx_alloc(sgsn, id); return ggc; } diff --git a/src/sgsn/gtp_mme.c b/src/sgsn/gtp_mme.c index 4fe804d..948e8e8 100644 --- a/src/sgsn/gtp_mme.c +++ b/src/sgsn/gtp_mme.c @@ -39,7 +39,7 @@ struct sgsn_mme_ctx *sgsn_mme_ctx_alloc(struct sgsn_instance *sgsn, const char *name) { struct sgsn_mme_ctx *mme; - mme = talloc_zero(tall_sgsn_ctx, struct sgsn_mme_ctx); + mme = talloc_zero(sgsn, struct sgsn_mme_ctx); if (!mme) return NULL; diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c index f848e57..dc3f916 100644 --- a/src/sgsn/sgsn_libgtp.c +++ b/src/sgsn/sgsn_libgtp.c @@ -600,7 +600,7 @@ struct sgsn_ggsn_ctx *ggsn; struct sgsn_pdp_ctx *pctx = NULL; - ggsn = sgsn_ggsn_ctx_by_addr(&peer->sin_addr); + ggsn = sgsn_ggsn_ctx_by_addr(sgsn, &peer->sin_addr); if (!ggsn) { LOGP(DGPRS, LOGL_NOTICE, "Received Recovery IE for unknown GGSN\n"); return -EINVAL; diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c index b6d03cf..3d3e8cd 100644 --- a/src/sgsn/sgsn_vty.c +++ b/src/sgsn/sgsn_vty.c @@ -422,7 +422,7 @@ "IPv4 Address\n") { uint32_t id = atoi(argv[0]); - struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(id); + struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(sgsn, id); inet_aton(argv[1], &ggc->remote_addr); @@ -447,7 +447,7 @@ "Version 0\n" "Version 1\n") { uint32_t id = atoi(argv[0]); - struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(id); + struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(sgsn, id); if (atoi(argv[1])) ggc->gtp_version = 1; @@ -465,7 +465,7 @@ "Interval between echo requests in seconds.\n") { uint32_t id = atoi(argv[0]); - struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(id); + struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(sgsn, id); ggc->echo_interval = atoi(argv[1]); @@ -484,7 +484,7 @@ NO_STR "Send an echo request to this static GGSN every interval.\n") { uint32_t id = atoi(argv[0]); - struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(id); + struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(sgsn, id); ggc->echo_interval = 0; sgsn_ggsn_ctx_check_echo_timer(ggc); @@ -525,7 +525,7 @@ struct apn_ctx *actx; struct sgsn_ggsn_ctx *ggsn; - ggsn = sgsn_ggsn_ctx_by_id(ggsn_id); + ggsn = sgsn_ggsn_ctx_by_id(sgsn, ggsn_id); if (ggsn == NULL) { vty_out(vty, "%% a GGSN with id %d has not been defined%s", ggsn_id, VTY_NEWLINE); diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index 5d46162..bf4d82b 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -1473,9 +1473,9 @@ /* TODO: Add PDP info entries to s1 */ - ggcs[0] = sgsn_ggsn_ctx_find_alloc(0); - ggcs[1] = sgsn_ggsn_ctx_find_alloc(1); - ggcs[2] = sgsn_ggsn_ctx_find_alloc(2); + ggcs[0] = sgsn_ggsn_ctx_find_alloc(sgsn, 0); + ggcs[1] = sgsn_ggsn_ctx_find_alloc(sgsn, 1); + ggcs[2] = sgsn_ggsn_ctx_find_alloc(sgsn, 2); actxs[0] = sgsn_apn_ctx_find_alloc("test.apn", "123456"); actxs[0]->ggsn = ggcs[0]; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30890 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ie65d59632a368c6957c33dca64e856ace792b2c6 Gerrit-Change-Number: 30890 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-sgsn[master]: Drop extern declarations of global sgsn_instance in source files
by pespin 12 Jan '23

12 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30931 ) Change subject: Drop extern declarations of global sgsn_instance in source files ...................................................................... Drop extern declarations of global sgsn_instance in source files There's an extern declaration already in sgsn.h. Change-Id: I2375e13c8436a069e8fe60136c8e1759a9adc2d1 --- M src/sgsn/gprs_gmm.c M src/sgsn/gprs_sgsn.c M src/sgsn/sgsn_cdr.c 3 files changed, 0 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified daniel: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 5505ba9..b12102e 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -67,8 +67,6 @@ #define PTMSI_ALLOC -extern struct sgsn_instance *sgsn; - static const struct tlv_definition gsm48_gmm_att_tlvdef = { .def = { [GSM48_IE_GMM_CIPH_CKSN] = { TLV_TYPE_FIXED, 1 }, diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c index 9a3e983..c911b6a 100644 --- a/src/sgsn/gprs_sgsn.c +++ b/src/sgsn/gprs_sgsn.c @@ -61,7 +61,6 @@ #define GPRS_LLME_CHECK_TICK 30 -extern struct sgsn_instance *sgsn; extern struct osmo_tdef sgsn_T_defs[]; LLIST_HEAD(sgsn_mm_ctxts); diff --git a/src/sgsn/sgsn_cdr.c b/src/sgsn/sgsn_cdr.c index ac0a6fd..c22a6ac 100644 --- a/src/sgsn/sgsn_cdr.c +++ b/src/sgsn/sgsn_cdr.c @@ -39,9 +39,6 @@ #include <stdio.h> #include <inttypes.h> -/* TODO...avoid going through a global */ -extern struct sgsn_instance *sgsn; - /** * The CDR module will generate an entry like: * -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I2375e13c8436a069e8fe60136c8e1759a9adc2d1 Gerrit-Change-Number: 30931 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-sgsn[master]: Move gtphub header to include/osmocom/gtphub/
by pespin 12 Jan '23

12 Jan '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30899 ) Change subject: Move gtphub header to include/osmocom/gtphub/ ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30899 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I82e1f2a3bc8e22b28747a540879bd661f1704cde Gerrit-Change-Number: 30899 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 12 Jan 2023 13:15:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-sgsn[master]: Move sgsn_pdp_ctx to its own file pdpctx.{c,h}
by pespin 12 Jan '23

12 Jan '23
Attention is currently required from: lynxis lazus. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30891 ) Change subject: Move sgsn_pdp_ctx to its own file pdpctx.{c,h} ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30891 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Iad4da06efee7d8514ff48423bdaebc0f26413cc1 Gerrit-Change-Number: 30891 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Thu, 12 Jan 2023 13:15:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-sgsn[master]: Drop extern declarations of global sgsn_instance in source files
by fixeria 12 Jan '23

12 Jan '23
Attention is currently required from: pespin, lynxis lazus. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/30931 ) Change subject: Drop extern declarations of global sgsn_instance in source files ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/30931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I2375e13c8436a069e8fe60136c8e1759a9adc2d1 Gerrit-Change-Number: 30931 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Comment-Date: Thu, 12 Jan 2023 13:14:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: modem: request an Uplink TBF, match Immediate Assignment
by fixeria 12 Jan '23

12 Jan '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30948 ) Change subject: modem: request an Uplink TBF, match Immediate Assignment ...................................................................... modem: request an Uplink TBF, match Immediate Assignment Change-Id: Iec0dcc629d29dec270649cf7428f71af0dfd2dbb Related: SYS#5500 --- M src/host/layer23/src/modem/app_modem.c 1 file changed, 95 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/src/host/layer23/src/modem/app_modem.c b/src/host/layer23/src/modem/app_modem.c index c135ff3..ec267e5 100644 --- a/src/host/layer23/src/modem/app_modem.c +++ b/src/host/layer23/src/modem/app_modem.c @@ -45,8 +45,28 @@ static struct { enum ccch_mode ccch_mode; struct gsm48_sysinfo si; + + /* TODO: use mobile->rrlayer API instead */ + struct { + bool ref_valid; + struct gsm48_req_ref ref; + } chan_req; } app_data; +/* Generate a 8-bit CHANNEL REQUEST message as per 3GPP TS 44.018, 9.1.8 */ +static uint8_t gen_chan_req(bool single_block) +{ + uint8_t rnd = (uint8_t)rand(); + + if (single_block) /* 01110xxx */ + return 0x70 | (rnd & 0x07); + + /* 011110xx or 01111x0x or 01111xx0 */ + if ((rnd & 0x07) == 0x07) + return 0x78; + return 0x78 | (rnd & 0x07); +} + static int handle_si1(struct osmocom_ms *ms, struct msgb *msg) { int rc; @@ -127,6 +147,7 @@ static int handle_si13(struct osmocom_ms *ms, struct msgb *msg) { + struct gsm48_rrlayer *rr = &ms->rrlayer; int rc; if (msgb_l3len(msg) != GSM_MACBLOCK_LEN) @@ -138,6 +159,20 @@ if (rc != 0) return rc; + /* HACK: request an Uplink TBF here (one phase access) */ + if (rr->state == GSM48_RR_ST_IDLE) { + if (!app_data.si.si1) + return 0; + if (!app_data.si.gprs.supported) + return 0; + + rr->cr_ra = gen_chan_req(false); + LOGP(DRR, LOGL_NOTICE, "Sending CHANNEL REQUEST (0x%02x)\n", rr->cr_ra); + l1ctl_tx_rach_req(ms, RSL_CHAN_RACH, 0x00, rr->cr_ra, 0, + app_data.ccch_mode == CCCH_MODE_COMBINED); + rr->state = GSM48_RR_ST_CONN_PEND; + } + return 0; } @@ -166,6 +201,7 @@ static int modem_rx_imm_ass(struct osmocom_ms *ms, struct msgb *msg) { const struct gsm48_imm_ass *ia = msgb_l3(msg); + struct gsm48_rrlayer *rr = &ms->rrlayer; uint8_t ch_type, ch_subch, ch_ts; int rc; @@ -173,6 +209,13 @@ if ((ia->page_mode >> 4) == 0) return 0; + if (rr->state != GSM48_RR_ST_CONN_PEND) + return 0; + if (!app_data.chan_req.ref_valid) + return 0; + if (memcmp(&ia->req_ref, &app_data.chan_req.ref, sizeof(ia->req_ref))) + return 0; + if (rsl_dec_chan_nr(ia->chan_desc.chan_nr, &ch_type, &ch_subch, &ch_ts) != 0) { LOGP(DRR, LOGL_ERROR, "%s(): rsl_dec_chan_nr(chan_nr=0x%02x) failed\n", @@ -190,9 +233,13 @@ "ARFCN=%u, TS=%u, SS=%u, TSC=%u)\n", ia->req_ref.ra, ia->chan_desc.chan_nr, arfcn, ch_ts, ch_subch, ia->chan_desc.h0.tsc); + + l1ctl_tx_dm_est_req_h0(ms, arfcn, RSL_CHAN_OSMO_PDCH, + ia->chan_desc.h0.tsc, GSM48_CMODE_SIGN, 0); } else { /* Hopping */ - uint8_t maio, hsn; + uint8_t maio, hsn, ma_len; + uint16_t ma[64]; hsn = ia->chan_desc.h1.hsn; maio = ia->chan_desc.h1.maio_low | (ia->chan_desc.h1.maio_high << 2); @@ -201,6 +248,22 @@ "HSN=%u, MAIO=%u, TS=%u, SS=%u, TSC=%u)\n", ia->req_ref.ra, ia->chan_desc.chan_nr, hsn, maio, ch_ts, ch_subch, ia->chan_desc.h1.tsc); + + for (unsigned int i = 1, j = 0; i <= 1024; i++) { + unsigned int arfcn = i & 1023; + unsigned int k; + + if (~app_data.si.freq[arfcn].mask & 0x01) + continue; + + k = ia->mob_alloc_len - (j >> 3) - 1; + if (ia->mob_alloc[k] & (1 << (j & 7))) + ma[ma_len++] = arfcn; + j++; + } + + l1ctl_tx_dm_est_req_h1(ms, maio, hsn, &ma[0], ma_len, RSL_CHAN_OSMO_PDCH, + ia->chan_desc.h1.tsc, GSM48_CMODE_SIGN, 0); } const uint8_t *data = msgb_l3(msg) + sizeof(*ia) + ia->mob_alloc_len; @@ -213,6 +276,9 @@ return rc; } + /* TODO: deliver decoded params to the RLC/MAC layer */ + + rr->state = GSM48_RR_ST_DEDICATED; return 0; } @@ -313,6 +379,31 @@ } } +static int modem_rx_rslms_cchan(struct osmocom_ms *ms, struct msgb *msg) +{ + const struct abis_rsl_cchan_hdr *ch = msgb_l2(msg); + struct gsm48_rrlayer *rr = &ms->rrlayer; + + switch (ch->c.msg_type) { + case RSL_MT_CHAN_CONF: /* RACH.conf */ + if (rr->state == GSM48_RR_ST_CONN_PEND) { + const struct gsm48_req_ref *ref = (void *)&ch->data[1]; + LOGP(DRSL, LOGL_NOTICE, + "Rx RACH.conf (RA=0x%02x, T1=%u, T3=%u, T2=%u)\n", + rr->cr_ra, ref->t1, ref->t3_high << 3 | ref->t3_low, ref->t2); + memcpy(&app_data.chan_req.ref, ref, sizeof(*ref)); + app_data.chan_req.ref.ra = rr->cr_ra; + app_data.chan_req.ref_valid = true; + return 0; + } + /* fall-through */ + default: + LOGP(DRSL, LOGL_NOTICE, "Unhandled RSLms CCHAN message " + "(msg_type 0x%02x)\n", ch->c.msg_type); + return -EINVAL; + } +} + static int modem_rslms_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx) { const struct abis_rsl_common_hdr *rslh = msgb_l2(msg); @@ -322,6 +413,9 @@ case ABIS_RSL_MDISC_RLL: rc = modem_rx_rslms_rll((struct osmocom_ms *)ctx, msg); break; + case ABIS_RSL_MDISC_COM_CHAN: + rc = modem_rx_rslms_cchan((struct osmocom_ms *)ctx, msg); + break; default: LOGP(DRSL, LOGL_NOTICE, "Unhandled RSLms message " "(msg_discr 0x%02x)\n", rslh->msg_discr); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iec0dcc629d29dec270649cf7428f71af0dfd2dbb Gerrit-Change-Number: 30948 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: abis_rsl: fix frame number calculation
by fixeria 12 Jan '23

12 Jan '23
Attention is currently required from: laforge, dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30922 ) Change subject: abis_rsl: fix frame number calculation ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30922 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I5fb2b0ada8d409730ac22963741fb4ab0026abdd Gerrit-Change-Number: 30922 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Thu, 12 Jan 2023 13:10:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmocom-bb[master]: modem: request an Uplink TBF, match Immediate Assignment
by pespin 12 Jan '23

12 Jan '23
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30948 ) Change subject: modem: request an Uplink TBF, match Immediate Assignment ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iec0dcc629d29dec270649cf7428f71af0dfd2dbb Gerrit-Change-Number: 30948 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Thu, 12 Jan 2023 13:09:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: abis_rsl: fix sourcecode formatting
by pespin 12 Jan '23

12 Jan '23
Attention is currently required from: dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30947 ) Change subject: abis_rsl: fix sourcecode formatting ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I6c4b6bd86c081046e34f51625c86015fc58c55c2 Gerrit-Change-Number: 30947 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Thu, 12 Jan 2023 13:09:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: abis_rsl: fix frame number calculation
by pespin 12 Jan '23

12 Jan '23
Attention is currently required from: laforge, fixeria, dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30922 ) Change subject: abis_rsl: fix frame number calculation ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30922 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I5fb2b0ada8d409730ac22963741fb4ab0026abdd Gerrit-Change-Number: 30922 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Thu, 12 Jan 2023 13:09:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.