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

May 2023

  • 1 participants
  • 2583 discussions
[M] Change in osmo-bts[master]: TCH DL, FR & EFR: reshape SIDs per 06.31/06.81 section 5.1.2
by falconia 16 May '23

16 May '23
Attention is currently required from: pespin, dexter. falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32714 ) Change subject: TCH DL, FR & EFR: reshape SIDs per 06.31/06.81 section 5.1.2 ...................................................................... Patch Set 3: (3 comments) File src/common/l1sap.c: https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/3a18ccbd_79bdce91 PS3, Line 1308: static inline bool nonamr_mand_sid_position(struct gsm_lchan *lchan, > fr_efr_sid_position() would be more inline with the rest. But this particular function is not limited to FR & EFR, this one already supports TCH/H too, so it is good for all 3 non-AMR codecs. https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/d82eeab9_44c700c7 PS3, Line 1415: } else > missing {} in this else following a multiple line if. Fair enough - I'll fix it in the next revision. https://gerrit.osmocom.org/c/osmo-bts/+/32714/comment/377bd5c7_ecc3fa56 PS3, Line 1441: if (!resp_msg && lchan->tch.dtx_fr_efr.last_rtp_input_was_sid && > I'd welcome if you could give a try to see if you can simplify a bit these code paths below, even if […] In the classic GSM architecture this logic was split between two separate components: the first part in the TRAU, the second part in the BTS. The part in the TRAU would cache and repeat the last valid SID per the rules of TS 28.062 section C.3.2.1.1, and the part in the BTS would then throw away most of those SID copies, keeping only those in the right positions per GSM 06.31/06.81 section 5.1.2. If we were to replicate that most-classic approach in OsmoBTS, the code would first resurrect a cached SID copy with l1sap_msgb_alloc(), and then just a few lines later toss it with msgb_free() - it would be very clean logically and exactly replicate what the specs intended, but do we really want the silliness and inefficiency of l1sap_msgb_alloc() immediately followed by msgb_free() for almost every frame position during periods of DTX silence? The code I have right now seems to be the best compromise between cleanness and efficiency - the flow of code from the top to the bottom of the screen-full exactly follows the logical order of conceptually separate transformations and state changes. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32714 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I924ab21952dcf8bb03ba7ccef790474bf66fc9e5 Gerrit-Change-Number: 32714 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 16 May 2023 08:22:51 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in simtrace2[master]: contrib/jenkins: tweak shell logic
by osmith 16 May '23

16 May '23
Attention is currently required from: Hoernchen, pespin, dexter. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/32728 ) Change subject: contrib/jenkins: tweak shell logic ...................................................................... Patch Set 2: (1 comment) Patchset: PS1: > why CR -1? please read the updated commit message. (oh I thought CR -1 was for patchset 2 ... nvm) -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/32728 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Id768e0dbed9265f042b942e6699683723ca40a7c Gerrit-Change-Number: 32728 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 16 May 2023 08:18:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: osmith <osmith(a)sysmocom.de> Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: ns2: Count transmitted/dropped in each layer implementation
by pespin 16 May '23

16 May '23
Attention is currently required from: daniel. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32535 ) Change subject: ns2: Count transmitted/dropped in each layer implementation ...................................................................... Patch Set 4: (1 comment) Patchset: PS4: @daniel leaving merge of this patch to you since you are working on this now. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32535 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I8109cee07f157ebf1806f82a071f58de3a2dcc9c Gerrit-Change-Number: 32535 Gerrit-PatchSet: 4 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: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Tue, 16 May 2023 08:17:54 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in simtrace2[master]: contrib/jenkins: tweak shell logic
by osmith 16 May '23

16 May '23
Attention is currently required from: Hoernchen, pespin, dexter. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/32728 ) Change subject: contrib/jenkins: tweak shell logic ...................................................................... Patch Set 2: (1 comment) Patchset: PS1: > The shebang line at the top LITERALLY specifies bash.. […] why CR -1? please read the updated commit message. -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/32728 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Id768e0dbed9265f042b942e6699683723ca40a7c Gerrit-Change-Number: 32728 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 16 May 2023 08:17:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in simtrace2[master]: contrib/jenkins: tweak shell logic
by Hoernchen 16 May '23

16 May '23
Attention is currently required from: pespin, dexter. Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/32728 ) Change subject: contrib/jenkins: tweak shell logic ...................................................................... Patch Set 1: Code-Review-1 (1 comment) Patchset: PS1: > I think the problem is comparing strings with "==", that's bash specific afair. The shebang line at the top LITERALLY specifies bash.. It obviously breaks when changing that line to /bin/dash or some other shell but that is the expected result... -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/32728 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Id768e0dbed9265f042b942e6699683723ca40a7c Gerrit-Change-Number: 32728 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 16 May 2023 08:16:52 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in simtrace2[master]: contrib/jenkins: tweak shell logic
by osmith 16 May '23

16 May '23
Attention is currently required from: Hoernchen, pespin, dexter. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/32728 ) Change subject: contrib/jenkins: tweak shell logic ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > what shell is this supposed to be that breaks the test? you're right, the shell logic part I mentioned doesn't make sense. Sorry... I still think printing which compiler we use is useful, updated the commit message. -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/32728 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Id768e0dbed9265f042b942e6699683723ca40a7c Gerrit-Change-Number: 32728 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 16 May 2023 08:15:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in simtrace2[master]: contrib/jenkins: tweak shell logic
by osmith 16 May '23

16 May '23
Attention is currently required from: osmith, Hoernchen, dexter. Hello Jenkins Builder, Hoernchen, pespin, dexter, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/simtrace2/+/32728 to look at the new patch set (#2). Change subject: contrib/jenkins: tweak shell logic ...................................................................... contrib/jenkins: tweak shell logic Move the logic down to where make gets called, so we don't need the variable. Print whether we use CLANG or GCC. Don't put /opt/llvm-arm/bin infront of PATH unless building with CLANG. Right now it doesn't seem to have e.g. an override for gcc, but the files in that path may change when we update LLVM-embedded-toolchain-for-Arm. Related: OS#6026 Change-Id: Id768e0dbed9265f042b942e6699683723ca40a7c --- M contrib/jenkins.sh 1 file changed, 28 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/28/32728/2 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/32728 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Id768e0dbed9265f042b942e6699683723ca40a7c Gerrit-Change-Number: 32728 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in simtrace2[master]: contrib/jenkins: fix shell logic
by pespin 16 May '23

16 May '23
Attention is currently required from: osmith, Hoernchen, dexter. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/simtrace2/+/32728 ) Change subject: contrib/jenkins: fix shell logic ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > what shell is this supposed to be that breaks the test? I think the problem is comparing strings with "==", that's bash specific afair. -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/32728 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: Id768e0dbed9265f042b942e6699683723ca40a7c Gerrit-Change-Number: 32728 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 16 May 2023 08:14:21 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: gpsr_ns2_udp: Use osmo_io_fd instead of osmo_fd
by daniel 16 May '23

16 May '23
daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30936 ) ( 17 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: gpsr_ns2_udp: Use osmo_io_fd instead of osmo_fd ...................................................................... gpsr_ns2_udp: Use osmo_io_fd instead of osmo_fd Change-Id: Id776d2d9f35c304620f3d5b94492148dd987f5a0 --- M src/gb/gprs_ns2_internal.h M src/gb/gprs_ns2_udp.c 2 files changed, 59 insertions(+), 75 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h index 4f33221..37b142e 100644 --- a/src/gb/gprs_ns2_internal.h +++ b/src/gb/gprs_ns2_internal.h @@ -6,6 +6,7 @@ #include <stdint.h> #include <osmocom/core/logging.h> +#include <osmocom/core/rate_ctr.h> #include <osmocom/gprs/protocol/gsm_08_16.h> #include <osmocom/gprs/gprs_ns2.h> diff --git a/src/gb/gprs_ns2_udp.c b/src/gb/gprs_ns2_udp.c index 7ecf276..e9e9e38 100644 --- a/src/gb/gprs_ns2_udp.c +++ b/src/gb/gprs_ns2_udp.c @@ -28,6 +28,7 @@ #include <errno.h> +#include <osmocom/core/osmo_io.h> #include <osmocom/core/select.h> #include <osmocom/core/sockaddr_str.h> #include <osmocom/core/socket.h> @@ -46,7 +47,7 @@ }; struct priv_bind { - struct osmo_fd fd; + struct osmo_io_fd *iofd; struct osmo_sockaddr addr; int dscp; uint8_t priority; @@ -68,7 +69,8 @@ priv = bind->priv; - osmo_fd_close(&priv->fd); + osmo_iofd_free(priv->iofd); + priv->iofd = NULL; talloc_free(priv); } @@ -143,17 +145,11 @@ static inline int nsip_sendmsg(struct gprs_ns2_vc_bind *bind, struct msgb *msg, - struct osmo_sockaddr *dest) + const struct osmo_sockaddr *dest) { - int rc; struct priv_bind *priv = bind->priv; - rc = sendto(priv->fd.fd, msg->data, msg->len, 0, - &dest->u.sa, sizeof(*dest)); - - msgb_free(msg); - - return rc; + return osmo_iofd_sendto_msgb(priv->iofd, msg, 0, dest); } /*! send the msg and free it afterwards. @@ -171,40 +167,7 @@ return rc; } -/* Read a single NS-over-IP message */ -static struct msgb *read_nsip_msg(struct osmo_fd *bfd, int *error, struct osmo_sockaddr *saddr, - const struct gprs_ns2_vc_bind *bind) -{ - struct msgb *msg = ns2_msgb_alloc(); - int ret = 0; - socklen_t saddr_len = sizeof(*saddr); - - if (!msg) { - *error = -ENOMEM; - return NULL; - } - - ret = recvfrom(bfd->fd, msg->data, NS_ALLOC_SIZE - NS_ALLOC_HEADROOM, 0, - &saddr->u.sa, &saddr_len); - if (ret < 0) { - LOGBIND(bind, LOGL_ERROR, "recv error %s during NSIP recvfrom %s\n", - strerror(errno), osmo_sock_get_name2(bfd->fd)); - msgb_free(msg); - *error = ret; - return NULL; - } else if (ret == 0) { - msgb_free(msg); - *error = ret; - return NULL; - } - - msg->l2h = msg->data; - msgb_put(msg, ret); - - return msg; -} - -static struct priv_vc *ns2_driver_alloc_vc(struct gprs_ns2_vc_bind *bind, struct gprs_ns2_vc *nsvc, struct osmo_sockaddr *remote) +static struct priv_vc *ns2_driver_alloc_vc(struct gprs_ns2_vc_bind *bind, struct gprs_ns2_vc *nsvc, const struct osmo_sockaddr *remote) { struct priv_vc *priv = talloc_zero(bind, struct priv_vc); if (!priv) @@ -216,24 +179,22 @@ return priv; } -static int handle_nsip_read(struct osmo_fd *bfd) +static void handle_nsip_recvfrom(struct osmo_io_fd *iofd, int error, struct msgb *msg, + const struct osmo_sockaddr *saddr) { int rc = 0; - int error = 0; - struct gprs_ns2_vc_bind *bind = bfd->data; - struct osmo_sockaddr saddr; + struct gprs_ns2_vc_bind *bind = osmo_iofd_get_data(iofd); struct gprs_ns2_vc *nsvc; - struct msgb *msg = read_nsip_msg(bfd, &error, &saddr, bind); + struct msgb *reject; - if (!msg) - return -EINVAL; + msg->l2h = msgb_data(msg); /* check if a vc is available */ - nsvc = gprs_ns2_nsvc_by_sockaddr_bind(bind, &saddr); + nsvc = gprs_ns2_nsvc_by_sockaddr_bind(bind, saddr); if (!nsvc) { /* VC not found */ - rc = ns2_create_vc(bind, msg, &saddr, "newconnection", &reject, &nsvc); + rc = ns2_create_vc(bind, msg, saddr, "newconnection", &reject, &nsvc); switch (rc) { case NS2_CS_FOUND: break; @@ -243,10 +204,10 @@ goto out; case NS2_CS_REJECTED: /* nsip_sendmsg will free reject */ - rc = nsip_sendmsg(bind, reject, &saddr); + rc = nsip_sendmsg(bind, reject, saddr); goto out; case NS2_CS_CREATED: - ns2_driver_alloc_vc(bind, nsvc, &saddr); + ns2_driver_alloc_vc(bind, nsvc, saddr); /* only start the fsm for non SNS. SNS will take care of its own */ if (nsvc->nse->dialect != GPRS_NS2_DIALECT_SNS) ns2_vc_fsm_start(nsvc); @@ -254,29 +215,31 @@ } } - return ns2_recv_vc(nsvc, msg); + ns2_recv_vc(nsvc, msg); + return; out: msgb_free(msg); - return rc; } -static int handle_nsip_write(struct osmo_fd *bfd) +static void handle_nsip_sendto(struct osmo_io_fd *iofd, int res, + const struct msgb *msg, + const struct osmo_sockaddr *daddr) { - /* FIXME: actually send the data here instead of nsip_sendmsg() */ - return -EIO; -} + struct gprs_ns2_vc_bind *bind = osmo_iofd_get_data(iofd); + struct gprs_ns2_vc *nsvc; -static int nsip_fd_cb(struct osmo_fd *bfd, unsigned int what) -{ - int rc = 0; + nsvc = gprs_ns2_nsvc_by_sockaddr_bind(bind, daddr); + if (!nsvc) + return; - if (what & OSMO_FD_READ) - rc = handle_nsip_read(bfd); - if (what & OSMO_FD_WRITE) - rc = handle_nsip_write(bfd); - - return rc; + if (OSMO_LIKELY(res >= 0)) { + RATE_CTR_INC_NS(nsvc, NS_CTR_PKTS_OUT); + RATE_CTR_ADD_NS(nsvc, NS_CTR_BYTES_OUT, res); + } else { + RATE_CTR_INC_NS(nsvc, NS_CTR_PKTS_OUT_DROP); + RATE_CTR_ADD_NS(nsvc, NS_CTR_BYTES_OUT_DROP, msgb_length(msg)); + } } /*! Find NS bind for a given socket address @@ -321,6 +284,11 @@ struct priv_bind *priv; int rc; + struct osmo_io_ops ioops = { + .sendto_cb = &handle_nsip_sendto, + .recvfrom_cb = &handle_nsip_recvfrom, + }; + if (local->u.sa.sa_family != AF_INET && local->u.sa.sa_family != AF_INET6) return -EINVAL; @@ -353,12 +321,11 @@ gprs_ns2_free_bind(bind); return -ENOMEM; } - priv->fd.cb = nsip_fd_cb; - priv->fd.data = bind; + priv->addr = *local; priv->dscp = dscp; - rc = osmo_sock_init_osa_ofd(&priv->fd, SOCK_DGRAM, IPPROTO_UDP, + rc = osmo_sock_init_osa(SOCK_DGRAM, IPPROTO_UDP, local, NULL, OSMO_SOCK_F_BIND | OSMO_SOCK_F_DSCP(priv->dscp)); if (rc < 0) { @@ -366,6 +333,13 @@ return rc; } + priv->iofd = osmo_iofd_setup(bind, rc, "NS bind", OSMO_IO_FD_MODE_RECVFROM_SENDTO, &ioops, bind); + osmo_iofd_register(priv->iofd, rc); + osmo_iofd_set_alloc_info(priv->iofd, 4096, 128); + + osmo_iofd_read_enable(priv->iofd); + osmo_iofd_write_enable(priv->iofd); + /* IPv4: max fragmented payload can be (13 bit) * 8 byte => 65535. * IPv6: max payload can be 65535 (RFC 2460). * UDP header = 8 byte */ @@ -521,7 +495,7 @@ if (dscp != priv->dscp) { priv->dscp = dscp; - rc = osmo_sock_set_dscp(priv->fd.fd, dscp); + rc = osmo_sock_set_dscp(osmo_iofd_get_fd(priv->iofd), dscp); if (rc < 0) { LOGBIND(bind, LOGL_ERROR, "Failed to set the DSCP to %u with ret(%d) errno(%d)\n", dscp, rc, errno); @@ -543,7 +517,7 @@ if (priority != priv->priority) { priv->priority = priority; - rc = osmo_sock_set_priority(priv->fd.fd, priority); + rc = osmo_sock_set_priority(osmo_iofd_get_fd(priv->iofd), priority); if (rc < 0) { LOGBIND(bind, LOGL_ERROR, "Failed to set the priority to %u with ret(%d) errno(%d)\n", priority, rc, errno); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30936 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id776d2d9f35c304620f3d5b94492148dd987f5a0 Gerrit-Change-Number: 30936 Gerrit-PatchSet: 18 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-bsc[master]: ctrl: Add getting neighbor list
by pespin 16 May '23

16 May '23
Attention is currently required from: fixeria, matanp. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32565 ) Change subject: ctrl: Add getting neighbor list ...................................................................... Patch Set 3: (1 comment) File src/osmo-bsc/bts_ctrl.c: https://gerrit.osmocom.org/c/osmo-bsc/+/32565/comment/61a28a26_aa08380c PS3, Line 531: cmd->reply = talloc_asprintf_append(cmd->reply, i == 0 ? "%u" : " %u", i); > 1-In my opinion "rf_states", "channel-load", "rach-access-control-classes" and "neighbor-bts list" k […] 1- Ok I was unaware of other commands using something other than spaces. I think it makes sense to have them standarized. @laforge feedback from you here would be welcome. 2- if it's using realloc then I think it's fine enough. THough I agree that if you know the maximum size (not sure where 4009 comes from), then simply allocate that buffer and use OSMO_STRBUF_APPEND. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32565 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icba0b7d92f4c67e617d707ca651d674f0d1ba8a7 Gerrit-Change-Number: 32565 Gerrit-PatchSet: 3 Gerrit-Owner: matanp <matan1008(a)gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: matanp <matan1008(a)gmail.com> Gerrit-Comment-Date: Tue, 16 May 2023 08:12:06 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: matanp <matan1008(a)gmail.com> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • ...
  • 259
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.