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

March 2023

  • 1 participants
  • 3642 discussions
[M] Change in osmo-bts[master]: Rewrite pcu_sock_write()
by osmith 15 Mar '23

15 Mar '23
Attention is currently required from: arehbein, pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31924 ) Change subject: Rewrite pcu_sock_write() ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7ffff98cd8cdf2041bff486c3fde6f16365028d5 Gerrit-Change-Number: 31924 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Mar 2023 17:12:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: Rewrite pcu_sock_write()
by fixeria 15 Mar '23

15 Mar '23
Attention is currently required from: osmith, arehbein, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31924 ) Change subject: Rewrite pcu_sock_write() ...................................................................... Patch Set 2: Code-Review+1 (1 comment) File src/common/pcu_sock.c: https://gerrit.osmocom.org/c/osmo-bts/+/31924/comment/647fe78a_7b149971 PS1, Line 1104: msgb_enqueue(&state->upqueue, msg); > This should actually prepend it, I'll fix it. Ack -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7ffff98cd8cdf2041bff486c3fde6f16365028d5 Gerrit-Change-Number: 31924 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Mar 2023 16:54:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: Rewrite pcu_sock_write()
by pespin 15 Mar '23

15 Mar '23
Attention is currently required from: osmith, arehbein. Hello osmith, Jenkins Builder, arehbein, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-bts/+/31924 to look at the new patch set (#2). Change subject: Rewrite pcu_sock_write() ...................................................................... Rewrite pcu_sock_write() The code in that function is pretty rotten: * osmo_fd_write_disable() is called for each message in the queue, there's no need for that. Let's simply call it at the end if the queue is empty. * Asserting for obvious stuff like dequeue returning the first entry in the list. * Having error code path for empty message: That shouldn't happen, abort immediately. With all thse changes, the function is way simpler, easy to read and more efficient. Change-Id: I7ffff98cd8cdf2041bff486c3fde6f16365028d5 --- M src/common/pcu_sock.c 1 file changed, 32 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/31924/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7ffff98cd8cdf2041bff486c3fde6f16365028d5 Gerrit-Change-Number: 31924 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-bts[master]: Rewrite pcu_sock_write()
by pespin 15 Mar '23

15 Mar '23
Attention is currently required from: osmith, arehbein. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31924 ) Change subject: Rewrite pcu_sock_write() ...................................................................... Patch Set 1: (1 comment) File src/common/pcu_sock.c: https://gerrit.osmocom.org/c/osmo-bts/+/31924/comment/49778e3a_43c47a91 PS1, Line 1104: msgb_enqueue(&state->upqueue, msg); This should actually prepend it, I'll fix it. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7ffff98cd8cdf2041bff486c3fde6f16365028d5 Gerrit-Change-Number: 31924 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Mar 2023 16:42:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: Rewrite pcu_sock_write()
by fixeria 15 Mar '23

15 Mar '23
Attention is currently required from: osmith, arehbein, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31924 ) Change subject: Rewrite pcu_sock_write() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7ffff98cd8cdf2041bff486c3fde6f16365028d5 Gerrit-Change-Number: 31924 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Mar 2023 16:40:52 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: common: Have PCU socket connection use osmo_wqueue
by pespin 15 Mar '23

15 Mar '23
Attention is currently required from: arehbein, laforge, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31533 ) Change subject: common: Have PCU socket connection use osmo_wqueue ...................................................................... Patch Set 5: (1 comment) File src/common/pcu_sock.c: https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/87a0f064_fe79df2e PS2, Line 1102: osmo_fd_write_disable(&state->upqueue.bfd); > I have looked at some of our projects and seen similar code (code that disables the fd before calling write or transmitting data (probably also ultimately calling write) in osmo-trx, osmo-bts and libosmo-abis code. That should happen only when the wqueue becomes empty, please have a look at the code and if it's not the case share a detailed example. I see that this can be done in the previous because it's inside a while(!llist_empty()) loop, but then it makes no sense to call it on every loop iteration. In this new code here, you cannot do that. > Probably isn't noticeable because sooner or later, the enable happens, anyways. Yes, next time a packet is enqueued. That doesn't mean it's correct though. I submitted https://gerrit.osmocom.org/c/osmo-bts/+/31924 to clean up this function, this may amke it easier for you to understand, feel free to rebase your work on top of it. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31533 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia6e61dda4b3cd4bba76e6acb7771d70335062fe1 Gerrit-Change-Number: 31533 Gerrit-PatchSet: 5 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Mar 2023 16:31:34 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-bts[master]: Rewrite pcu_sock_write()
by pespin 15 Mar '23

15 Mar '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/31924 ) Change subject: Rewrite pcu_sock_write() ...................................................................... Rewrite pcu_sock_write() The code in that function is pretty rotten: * osmo_fd_write_disable() is called for each message in the queue, there's no need for that. Let's simply call it at the end if the queue is empty. * Asserting for obvious stuff like dequeue returning the first entry in the list. * Having error code path for empty message: That shouldn't happen, abort immediately. With all thse changes, the function is way simpler, easy to read and more efficient. Change-Id: I7ffff98cd8cdf2041bff486c3fde6f16365028d5 --- M src/common/pcu_sock.c 1 file changed, 31 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/24/31924/1 diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 145942b..b639026 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -28,6 +28,7 @@ #include <inttypes.h> #include <osmocom/core/talloc.h> +#include <osmocom/core/utils.h> #include <osmocom/core/select.h> #include <osmocom/core/socket.h> #include <osmocom/gsm/gsm23003.h> @@ -1087,48 +1088,32 @@ static int pcu_sock_write(struct osmo_fd *bfd) { struct pcu_sock_state *state = bfd->data; + struct msgb *msg; int rc; - while (!llist_empty(&state->upqueue)) { - struct msgb *msg, *msg2; - struct gsm_pcu_if *pcu_prim; - - /* peek at the beginning of the queue */ - msg = llist_entry(state->upqueue.next, struct msgb, list); - pcu_prim = (struct gsm_pcu_if *)msg->data; - - osmo_fd_write_disable(bfd); - + while ((msg = msgb_dequeue(&state->upqueue))) { /* bug hunter 8-): maybe someone forgot msgb_put(...) ? */ - if (!msgb_length(msg)) { - LOGP(DPCU, LOGL_ERROR, "message type (%d) with ZERO " - "bytes!\n", pcu_prim->msg_type); - goto dontsend; - } + OSMO_ASSERT(msgb_length(msg) > 0); /* try to send it over the socket */ rc = write(bfd->fd, msgb_data(msg), msgb_length(msg)); - if (rc == 0) + if (OSMO_UNLIKELY(rc == 0)) goto close; - if (rc < 0) { + if (OSMO_UNLIKELY(rc < 0)) { if (errno == EAGAIN) { - osmo_fd_write_enable(bfd); - break; + msgb_enqueue(&state->upqueue, msg); + return 0; } goto close; } - -dontsend: - /* _after_ we send it, we can deueue */ - msg2 = msgb_dequeue(&state->upqueue); - assert(msg == msg2); msgb_free(msg); } + osmo_fd_write_disable(bfd); return 0; close: + msgb_free(msg); pcu_sock_close(state); - return -1; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31924 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I7ffff98cd8cdf2041bff486c3fde6f16365028d5 Gerrit-Change-Number: 31924 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmocom-bb[master]: layer23: modem: Depend on libosmo-gprs-gmm
by pespin 15 Mar '23

15 Mar '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31923 ) Change subject: layer23: modem: Depend on libosmo-gprs-gmm ...................................................................... layer23: modem: Depend on libosmo-gprs-gmm Related: OS#5501 Change-Id: I82a2b9c043eae42435ca781689fc3381e7a31bea --- M src/host/layer23/configure.ac M src/host/layer23/include/osmocom/bb/common/logging.h M src/host/layer23/include/osmocom/bb/modem/Makefile.am A src/host/layer23/include/osmocom/bb/modem/gmm.h M src/host/layer23/src/modem/Makefile.am M src/host/layer23/src/modem/app_modem.c A src/host/layer23/src/modem/gmm.c 7 files changed, 125 insertions(+), 0 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified osmith: Looks good to me, approved diff --git a/src/host/layer23/configure.ac b/src/host/layer23/configure.ac index 459065c..1434fbf 100644 --- a/src/host/layer23/configure.ac +++ b/src/host/layer23/configure.ac @@ -49,6 +49,7 @@ PKG_CHECK_MODULES(LIBOSMOGPRSRLCMAC, libosmo-gprs-rlcmac) PKG_CHECK_MODULES(LIBOSMOGPRSLLC, libosmo-gprs-llc) PKG_CHECK_MODULES(LIBOSMOGPRSSNDCP, libosmo-gprs-sndcp) +PKG_CHECK_MODULES(LIBOSMOGPRSGMM, libosmo-gprs-gmm) AC_CHECK_LIB(gps, gps_waiting, LIBGPS_CFLAGS=" -D_HAVE_GPSD" LIBGPS_LIBS=" -lgps ",,) AC_SUBST([LIBGPS_CFLAGS]) AC_SUBST([LIBGPS_LIBS]) diff --git a/src/host/layer23/include/osmocom/bb/common/logging.h b/src/host/layer23/include/osmocom/bb/common/logging.h index 818b149..fc0861e 100644 --- a/src/host/layer23/include/osmocom/bb/common/logging.h +++ b/src/host/layer23/include/osmocom/bb/common/logging.h @@ -30,6 +30,7 @@ DRLCMAC, DLLC, DSNDCP, + DGMM, }; extern const struct log_info log_info; diff --git a/src/host/layer23/include/osmocom/bb/modem/Makefile.am b/src/host/layer23/include/osmocom/bb/modem/Makefile.am index b2e3059..6dfc98e 100644 --- a/src/host/layer23/include/osmocom/bb/modem/Makefile.am +++ b/src/host/layer23/include/osmocom/bb/modem/Makefile.am @@ -1,5 +1,6 @@ noinst_HEADERS = \ modem.h \ + gmm.h \ grr.h \ llc.h \ rlcmac.h \ diff --git a/src/host/layer23/include/osmocom/bb/modem/gmm.h b/src/host/layer23/include/osmocom/bb/modem/gmm.h new file mode 100644 index 0000000..4ec3e8e --- /dev/null +++ b/src/host/layer23/include/osmocom/bb/modem/gmm.h @@ -0,0 +1,7 @@ +#pragma once + +#include <stdbool.h> + +struct osmocom_ms; + +int modem_gmm_init(struct osmocom_ms *ms); diff --git a/src/host/layer23/src/modem/Makefile.am b/src/host/layer23/src/modem/Makefile.am index 500b031..086c2f3 100644 --- a/src/host/layer23/src/modem/Makefile.am +++ b/src/host/layer23/src/modem/Makefile.am @@ -11,6 +11,7 @@ $(LIBOSMOGPRSRLCMAC_CFLAGS) \ $(LIBOSMOGPRSLLC_CFLAGS) \ $(LIBOSMOGPRSSNDCP_CFLAGS) \ + $(LIBOSMOGPRSGMM_CFLAGS) \ $(NULL) bin_PROGRAMS = modem @@ -18,6 +19,7 @@ modem_SOURCES = \ $(top_srcdir)/src/common/main.c \ app_modem.c \ + gmm.c \ grr.c \ llc.c \ rlcmac.c \ @@ -32,4 +34,5 @@ $(LIBOSMOGPRSRLCMAC_LIBS) \ $(LIBOSMOGPRSLLC_LIBS) \ $(LIBOSMOGPRSSNDCP_LIBS) \ + $(LIBOSMOGPRSGMM_LIBS) \ $(NULL) diff --git a/src/host/layer23/src/modem/app_modem.c b/src/host/layer23/src/modem/app_modem.c index e33ad6a..58328c2 100644 --- a/src/host/layer23/src/modem/app_modem.c +++ b/src/host/layer23/src/modem/app_modem.c @@ -50,6 +50,7 @@ #include <osmocom/bb/modem/rlcmac.h> #include <osmocom/bb/modem/llc.h> #include <osmocom/bb/modem/sndcp.h> +#include <osmocom/bb/modem/gmm.h> #include <osmocom/bb/modem/vty.h> #include <osmocom/bb/modem/grr.h> @@ -174,6 +175,11 @@ return rc; } + if ((rc = modem_gmm_init(app_data.ms))) { + LOGP(DGMM, LOGL_FATAL, "Failed initializing GMM layer\n"); + return rc; + } + osmo_signal_register_handler(SS_L1CTL, &signal_cb, NULL); lapdm_channel_set_l3(&app_data.ms->lapdm_channel, &modem_grr_rslms_cb, app_data.ms); return 0; diff --git a/src/host/layer23/src/modem/gmm.c b/src/host/layer23/src/modem/gmm.c new file mode 100644 index 0000000..6a84909 --- /dev/null +++ b/src/host/layer23/src/modem/gmm.c @@ -0,0 +1,96 @@ +/* GPRS GMM interfaces as per 3GPP TS 24.008, TS 24.007 */ +/* (C) 2023 by sysmocom - s.m.f.c. GmbH <info(a)sysmocom.de> + * All Rights Reserved + * Author: Pau Espin Pedrol <pespin(a)sysmocom.de> + * + * 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/lienses/>. + * + */ + +#include <stdbool.h> +#include <string.h> +#include <stdint.h> +#include <errno.h> +#include <stdio.h> + +#include <osmocom/core/msgb.h> +#include <osmocom/core/prim.h> +#include <osmocom/core/utils.h> +#include <osmocom/core/linuxlist.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/tun.h> + +#include <osmocom/gprs/llc/llc.h> +#include <osmocom/gprs/llc/llc_prim.h> +#include <osmocom/gprs/gmm/gmm_prim.h> +#include <osmocom/gprs/gmm/gmm.h> + +#include <osmocom/bb/common/settings.h> +#include <osmocom/bb/common/logging.h> +#include <osmocom/bb/common/apn.h> +#include <osmocom/bb/common/ms.h> +#include <osmocom/bb/modem/gmm.h> + + +static int modem_gmm_prim_up_cb(struct osmo_gprs_gmm_prim *gmm_prim, void *user_data) +{ + const char *pdu_name = osmo_gprs_gmm_prim_name(gmm_prim); + int rc = 0; + + switch (gmm_prim->oph.sap) { + case OSMO_GPRS_GMM_SAP_GMMREG: + switch (OSMO_PRIM_HDR(&gmm_prim->oph)) { + case OSMO_PRIM(OSMO_GPRS_GMM_GMMREG_ATTACH, PRIM_OP_CONFIRM): + case OSMO_PRIM(OSMO_GPRS_GMM_GMMREG_DETACH, PRIM_OP_CONFIRM): + case OSMO_PRIM(OSMO_GPRS_GMM_GMMREG_DETACH, PRIM_OP_INDICATION): + default: + LOGP(DGMM, LOGL_ERROR, "%s(): Rx %s UNIMPLEMENTED\n", __func__, pdu_name); + break; + }; + default: + LOGP(DGMM, LOGL_ERROR, "%s(): Unexpected Rx %s\n", __func__, pdu_name); + OSMO_ASSERT(0); + } + + return rc; +} + +static int modem_gmm_prim_down_cb(struct osmo_gprs_gmm_prim *gmm_prim, void *user_data) +{ + const char *pdu_name = osmo_gprs_gmm_prim_name(gmm_prim); + int rc = 0; + + switch (gmm_prim->oph.sap) { + case OSMO_GPRS_GMM_SAP_GMMREG: + default: + LOGP(DGMM, LOGL_ERROR, "%s(): Unexpected Rx %s\n", __func__, pdu_name); + OSMO_ASSERT(0); + } + + return rc; +} + +int modem_gmm_init(struct osmocom_ms *ms) +{ + int rc; + rc = osmo_gprs_gmm_init(OSMO_GPRS_GMM_LOCATION_MS); + if (rc != 0) + return rc; + + osmo_gprs_gmm_set_log_cat(OSMO_GPRS_GMM_LOGC_GMM, DGMM); + + osmo_gprs_gmm_prim_set_up_cb(modem_gmm_prim_up_cb, ms); + osmo_gprs_gmm_prim_set_down_cb(modem_gmm_prim_down_cb, ms); + return rc; +} -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I82a2b9c043eae42435ca781689fc3381e7a31bea Gerrit-Change-Number: 31923 Gerrit-PatchSet: 2 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
[M] Change in osmo-bts[master]: common: Have PCU socket connection use osmo_wqueue
by arehbein 15 Mar '23

15 Mar '23
Attention is currently required from: laforge, fixeria, pespin. arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31533 ) Change subject: common: Have PCU socket connection use osmo_wqueue ...................................................................... Patch Set 5: (2 comments) File include/osmo-bts/pcuif_proto.h: https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/d0edd8d4_78d2fe9f PS4, Line 7: > ws change, please revert this chunk Done File src/common/pcu_sock.c: https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/a25ceeba_585fac4f PS2, Line 1102: osmo_fd_write_disable(&state->upqueue.bfd); > Ah alright, good to know (just read a bit into the code/`fd_set`-related matters). […] @pespin I wrote this because I wanted to make sure the previous code was indeed wrong (as I said, I didn't change the logic with respect to that). I have looked at some of our projects and seen similar code (code that disables the fd before calling `write` or transmitting data (probably also ultimately calling write) in osmo-trx, osmo-bts and libosmo-abis code. Probably isn't noticeable because sooner or later, the enable happens, anyways. Should I still change the code so that the fd is disabled only when there is no data to write anymore (and enabled after data is added to the msg queue)? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31533 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia6e61dda4b3cd4bba76e6acb7771d70335062fe1 Gerrit-Change-Number: 31533 Gerrit-PatchSet: 5 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Mar 2023 15:48:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmocom-bb[master]: layer23: modem: Depend on libosmo-gprs-gmm
by osmith 15 Mar '23

15 Mar '23
Attention is currently required from: pespin. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/31923 ) Change subject: layer23: modem: Depend on libosmo-gprs-gmm ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/31923 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I82a2b9c043eae42435ca781689fc3381e7a31bea Gerrit-Change-Number: 31923 Gerrit-PatchSet: 2 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-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Mar 2023 15:23:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • ...
  • 365
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.