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

June 2023

  • 1 participants
  • 2480 discussions
[S] Change in osmocom-bb[master]: l1gprs: properly handle (forward) PTCCH/D blocks
by fixeria 07 Jun '23

07 Jun '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33100 ) Change subject: l1gprs: properly handle (forward) PTCCH/D blocks ...................................................................... l1gprs: properly handle (forward) PTCCH/D blocks Unconditionally forward PTCCH/D blocks towards the upper layers. Calling l1gprs_pdch_filter_dl_block() on them makes no sense. Change-Id: Ifcc53d442426c8bfdacd3d179e20bb45c43f4644 Fixes: BTS_Tests.TC_pcu_ptcch (DL part) Related: OS#5500, OS#5955 --- M src/shared/l1gprs.c 1 file changed, 24 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/shared/l1gprs.c b/src/shared/l1gprs.c index 5874b48..fd18e4e 100644 --- a/src/shared/l1gprs.c +++ b/src/shared/l1gprs.c @@ -383,6 +383,10 @@ return 0; } +/* Check if a Downlink block is a PTCCH/D (see 3GPP TS 45.002, table 6) */ +#define BLOCK_IND_IS_PTCCH(ind) \ + (((ind)->hdr.fn % 104) == 12) + struct msgb *l1gprs_handle_dl_block_ind(struct l1gprs_state *gprs, const struct l1gprs_prim_dl_block_ind *ind) { @@ -401,7 +405,8 @@ pdch = &gprs->pdch[ind->hdr.tn]; LOGP_PDCH(pdch, LOGL_DEBUG, - "Rx DL BLOCK.ind (fn=%u, len=%zu): %s\n", + "Rx DL BLOCK.ind (%s, fn=%u, len=%zu): %s\n", + BLOCK_IND_IS_PTCCH(ind) ? "PTCCH" : "PDTCH", ind->hdr.fn, ind->data_len, osmo_hexdump(ind->data, ind->data_len)); if ((pdch->ul_tbf_count == 0) && (pdch->dl_tbf_count == 0)) { @@ -432,6 +437,10 @@ if (ind->data_len == 0) return msg; + if (BLOCK_IND_IS_PTCCH(ind)) { + memcpy(msgb_put(msg, ind->data_len), ind->data, ind->data_len); + return msg; + } cs = osmo_gprs_dl_cs_by_block_bytes(ind->data_len); switch (cs) { -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33100 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ifcc53d442426c8bfdacd3d179e20bb45c43f4644 Gerrit-Change-Number: 33100 Gerrit-PatchSet: 3 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: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmocom-bb[master]: trxcon/l1sched: do not check TDMA Fn of PTCCH/U prims
by fixeria 07 Jun '23

07 Jun '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33101 ) Change subject: trxcon/l1sched: do not check TDMA Fn of PTCCH/U prims ...................................................................... trxcon/l1sched: do not check TDMA Fn of PTCCH/U prims The PTCCH/U primitives are basically Access Bursts. The TDMA Fn in such primitives is always 0, because there's currently no way to indicate TDMA Fn in L1CTL_RACH_REQ (only the offset). Change-Id: I54ba9b5d9c3eba4aeabf9ed6fcf1e8d09f21cce1 Fixes: BTS_Tests.TC_pcu_ptcch (UL part) Related: OS#5500, OS#5955 --- M src/host/trxcon/src/sched_prim.c 1 file changed, 15 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/host/trxcon/src/sched_prim.c b/src/host/trxcon/src/sched_prim.c index 380d5a8..44cfd37 100644 --- a/src/host/trxcon/src/sched_prim.c +++ b/src/host/trxcon/src/sched_prim.c @@ -365,7 +365,6 @@ /* PDCH is timing critical, we need to check TDMA Fn */ case L1SCHED_PDTCH: - case L1SCHED_PTCCH: { struct msgb *msg = msgb_dequeue(&lchan->tx_prims); const struct l1sched_prim *prim; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33101 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I54ba9b5d9c3eba4aeabf9ed6fcf1e8d09f21cce1 Gerrit-Change-Number: 33101 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(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-MessageType: merged
1 0
0 0
[S] Change in osmo-bts[master]: paging: do not confirm PAGING COMMAND messages
by laforge 07 Jun '23

07 Jun '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32734 ) Change subject: paging: do not confirm PAGING COMMAND messages ...................................................................... paging: do not confirm PAGING COMMAND messages when osmo-bts receives a MAC block from osmo-pcu through the PCUIF it puts it in the review queue without further interpreting it. This also means that it will send confirmations to the PCU for IMMEDIATE ASSIGNMENT and PAGING COMMAND. This is not entirely correct because only IMMEDIATE ASSIGNMENT messages should be confirmed. osmo-pcu has no problem with this since it silently drops the confirmations for PAGING COMMAND messages. This peculiarity of the PCUIF implementation makes the confirmation logic hard to understand, so let's add some logic to osmo-bts that makes sure that only IMMEDIATE ASSIGNMENT messages are confirmed. Related: OS#5927 Change-Id: I8b8264d28b1b1deb08774cdba58dd4c6dafe115d --- M include/osmo-bts/paging.h M src/common/paging.c M src/common/pcu_sock.c 3 files changed, 36 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve dexter: Verified laforge: Looks good to me, approved diff --git a/include/osmo-bts/paging.h b/include/osmo-bts/paging.h index c009831..9a30abb 100644 --- a/include/osmo-bts/paging.h +++ b/include/osmo-bts/paging.h @@ -37,7 +37,7 @@ /* Add a ready formatted MAC block message to the paging queue, this can be an IMMEDIATE ASSIGNMENT, or a * PAGING COMMAND (from the PCU) */ -int paging_add_macblock(struct paging_state *ps, const char *imsi, const uint8_t *macblock); +int paging_add_macblock(struct paging_state *ps, const char *imsi, bool confirm, const uint8_t *macblock); /* generate paging message for given gsm time */ int paging_gen_msg(struct paging_state *ps, uint8_t *out_buf, struct gsm_time *gt, diff --git a/src/common/paging.c b/src/common/paging.c index f49a36b..55f85f6 100644 --- a/src/common/paging.c +++ b/src/common/paging.c @@ -63,6 +63,7 @@ } normal; struct { uint8_t msg[GSM_MACBLOCK_LEN]; + bool confirm; } macblock; } u; }; @@ -269,7 +270,7 @@ /* Add a ready formatted MAC block message to the paging queue, this can be an IMMEDIATE ASSIGNMENT, or a * PAGING COMMAND (from the PCU) */ -int paging_add_macblock(struct paging_state *ps, const char *imsi, const uint8_t *macblock) +int paging_add_macblock(struct paging_state *ps, const char *imsi, bool confirm, const uint8_t *macblock) { struct llist_head *group_q; struct paging_record *pr; @@ -306,6 +307,7 @@ LOGP(DPAG, LOGL_INFO, "Add MAC block to paging queue (group=%u)\n", paging_group); memcpy(pr->u.macblock.msg, macblock, GSM_MACBLOCK_LEN); + pr->u.macblock.confirm = confirm; /* enqueue the new message to the HEAD of the queue */ llist_add(&pr->list, group_q); @@ -634,8 +636,10 @@ /* get MAC block message and free record */ memcpy(out_buf, pr[num_pr]->u.macblock.msg, GSM_MACBLOCK_LEN); - pcu_tx_pch_data_cnf(gt->fn, pr[num_pr]->u.macblock.msg, - GSM_MACBLOCK_LEN); + if (pr[num_pr]->u.macblock.confirm) { + pcu_tx_pch_data_cnf(gt->fn, pr[num_pr]->u.macblock.msg, + GSM_MACBLOCK_LEN); + } talloc_free(pr[num_pr]); return GSM_MACBLOCK_LEN; } diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index ea244b8..811cea4 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -676,6 +676,9 @@ switch (data_req->sapi) { case PCU_IF_SAPI_PCH: + { + const struct gsm48_imm_ass *gsm48_imm_ass; + bool confirm; OSMO_STRLCPY_ARRAY(imsi, (char *)data_req->data); if (data_req->len-3 != GSM_MACBLOCK_LEN) { LOGP(DPCU, LOGL_ERROR, "MAC block with invalid length %d (expecting GSM_MACBLOCK_LEN = %d)\n", @@ -683,8 +686,11 @@ rc = -ENOMEM; break; } - paging_add_macblock(bts->paging_state, imsi, data_req->data + 3); + gsm48_imm_ass = (struct gsm48_imm_ass *)(data_req->data + 3); + confirm = (gsm48_imm_ass->msg_type == GSM48_MT_RR_IMM_ASS); + paging_add_macblock(bts->paging_state, imsi, confirm, data_req->data + 3); break; + } case PCU_IF_SAPI_AGCH: msg = msgb_alloc(data_req->len, "pcu_agch"); if (!msg) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32734 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I8b8264d28b1b1deb08774cdba58dd4c6dafe115d Gerrit-Change-Number: 32734 Gerrit-PatchSet: 14 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(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-MessageType: merged
1 0
0 0
[S] Change in osmo-bts[master]: paging: do not confirm PAGING COMMAND messages
by laforge 07 Jun '23

07 Jun '23
Attention is currently required from: dexter. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32734 ) Change subject: paging: do not confirm PAGING COMMAND messages ...................................................................... Patch Set 14: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32734 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I8b8264d28b1b1deb08774cdba58dd4c6dafe115d Gerrit-Change-Number: 32734 Gerrit-PatchSet: 14 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(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-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Wed, 07 Jun 2023 15:53:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: stream: Update log messages
by laforge 07 Jun '23

07 Jun '23
Attention is currently required from: daniel. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33221 ) Change subject: stream: Update log messages ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ife20b9d18e6ca86a06991d68165694e31052c58a Gerrit-Change-Number: 33221 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Wed, 07 Jun 2023 15:52:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmo-netif[master]: Add osmo_io support to osmo_stream_cli and osmo_stream_srv
by laforge 07 Jun '23

07 Jun '23
Attention is currently required from: arehbein, daniel. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33193 ) Change subject: Add osmo_io support to osmo_stream_cli and osmo_stream_srv ...................................................................... Patch Set 2: (2 comments) File src/stream.c: https://gerrit.osmocom.org/c/libosmo-netif/+/33193/comment/f11619d3_478b4c82 PS1, Line 1758: OSMO_ASSERT > Wow, I just saw that osmo_stream_srv_link_create_iofd() is a 100% copy of the old variant. […] I don't know the code like you do, but I generally agree with your point here. We don't have sockets with tens of thousands of pending accept calls... https://gerrit.osmocom.org/c/libosmo-netif/+/33193/comment/63e5bf9e_2d0c2c2d PS1, Line 1775: talloc_free > No, it simply allocates memory and fills in the struct. […] Done -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I2f52c7107c392b6f4b0bf2a84f8c873c084a200c Gerrit-Change-Number: 33193 Gerrit-PatchSet: 2 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: daniel <dwillmann(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Wed, 07 Jun 2023 15:51:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmo-netif[master]: Add osmo_io support to osmo_stream_cli and osmo_stream_srv
by Jenkins Builder 07 Jun '23

07 Jun '23
Attention is currently required from: arehbein, laforge. Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33193 ) Change subject: Add osmo_io support to osmo_stream_cli and osmo_stream_srv ...................................................................... Patch Set 2: (3 comments) File include/osmocom/netif/stream.h: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7966): https://gerrit.osmocom.org/c/libosmo-netif/+/33193/comment/66fa5003_f54295aa PS2, Line 83: void osmo_stream_cli_set_iofd_read_cb(struct osmo_stream_cli *cli, int (*read_cb)(struct osmo_stream_cli *cli, struct msgb* msg)); "foo* bar" should be "foo *bar" File src/stream.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7966): https://gerrit.osmocom.org/c/libosmo-netif/+/33193/comment/0801d1af_aa8fe9b0 PS2, Line 935: int (*read_cb)(struct osmo_stream_cli *cli, struct msgb* msg)) "foo* bar" should be "foo *bar" Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7966): https://gerrit.osmocom.org/c/libosmo-netif/+/33193/comment/25a0cf0e_2a1cc405 PS2, Line 1713: } void function return statements are not generally useful -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33193 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I2f52c7107c392b6f4b0bf2a84f8c873c084a200c Gerrit-Change-Number: 33193 Gerrit-PatchSet: 2 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: daniel <dwillmann(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-Comment-Date: Wed, 07 Jun 2023 15:49:37 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: osmo_io: Remove osmo_iofd_read/write_enable/disable
by laforge 07 Jun '23

07 Jun '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33220 ) Change subject: osmo_io: Remove osmo_iofd_read/write_enable/disable ...................................................................... osmo_io: Remove osmo_iofd_read/write_enable/disable This API is not really used or needed, so remove it. See discussion in https://gerrit.osmocom.org/c/libosmocore/+/33084 Change-Id: I0dbc14a8cbbdc7b6e4688942c0dac865bbd72c8b --- M include/osmocom/core/osmo_io.h M src/core/osmo_io.c M src/core/osmo_io_internal.h M src/gb/gprs_ns2_udp.c M tests/osmo_io/osmo_io_test.c 5 files changed, 21 insertions(+), 62 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h index a5e6165..d278ce0 100644 --- a/include/osmocom/core/osmo_io.h +++ b/include/osmocom/core/osmo_io.h @@ -74,10 +74,6 @@ void osmo_iofd_txqueue_clear(struct osmo_io_fd *iofd); int osmo_iofd_close(struct osmo_io_fd *iofd); void osmo_iofd_free(struct osmo_io_fd *iofd); -void osmo_iofd_read_enable(struct osmo_io_fd *iofd); -void osmo_iofd_read_disable(struct osmo_io_fd *iofd); -void osmo_iofd_write_enable(struct osmo_io_fd *iofd); -void osmo_iofd_write_disable(struct osmo_io_fd *iofd); int osmo_iofd_write_msgb(struct osmo_io_fd *iofd, struct msgb *msg); int osmo_iofd_sendto_msgb(struct osmo_io_fd *iofd, struct msgb *msg, int sendto_flags, diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c index 9960fb4..d260da4 100644 --- a/src/core/osmo_io.c +++ b/src/core/osmo_io.c @@ -170,7 +170,7 @@ llist_add_tail(&msghdr->list, &iofd->tx_queue.msg_queue); iofd->tx_queue.current_length++; - if (iofd->write_enabled && iofd->tx_queue.current_length == 1) + if (iofd->tx_queue.current_length == 1) osmo_iofd_ops.write_enable(iofd); return 0; @@ -368,46 +368,6 @@ return 0; } -/*! Enable reading from this iofd - * - * \param[in] iofd the file descriptor - */ -void osmo_iofd_read_enable(struct osmo_io_fd *iofd) -{ - iofd->read_enabled = true; - osmo_iofd_ops.read_enable(iofd); -} - -/*! Disable reading from this iofd - * - * \param[in] iofd the file descriptor - */ -void osmo_iofd_read_disable(struct osmo_io_fd *iofd) -{ - iofd->read_enabled = false; - osmo_iofd_ops.read_disable(iofd); -} - -/*! Enable writing to this iofd - * - * \param[in] iofd the file descriptor - */ -void osmo_iofd_write_enable(struct osmo_io_fd *iofd) -{ - iofd->write_enabled = true; - osmo_iofd_ops.write_enable(iofd); -} - -/*! Disable writing to this iofd - * - * \param[in] iofd the file descriptor - */ -void osmo_iofd_write_disable(struct osmo_io_fd *iofd) -{ - iofd->write_enabled = false; - osmo_iofd_ops.write_disable(iofd); -} - /*! Allocate and setup a new iofd * \param[in] ctx the parent context from which to allocate * \param[in] fd the underlying system file descriptor @@ -454,14 +414,19 @@ */ int osmo_iofd_register(struct osmo_io_fd *iofd, int fd) { + int rc = 0; + if (fd >= 0) iofd->fd = fd; iofd->closed = false; if (osmo_iofd_ops.register_fd) - return osmo_iofd_ops.register_fd(iofd); + rc = osmo_iofd_ops.register_fd(iofd); - return 0; + osmo_iofd_ops.read_enable(iofd); + osmo_iofd_ops.write_enable(iofd); + + return rc; } /*! Unregister the fd from the underlying backend diff --git a/src/core/osmo_io_internal.h b/src/core/osmo_io_internal.h index 7fc4b6b..bdd2ac5 100644 --- a/src/core/osmo_io_internal.h +++ b/src/core/osmo_io_internal.h @@ -38,13 +38,11 @@ enum osmo_io_fd_mode mode; /*! flags to guard closing/freeing of iofd */ + /* TODO: Move to bitfield */ bool closed; bool in_callback; bool to_free; - bool write_enabled; - bool read_enabled; - /*! human-readable name to associte with fd */ const char *name; diff --git a/src/gb/gprs_ns2_udp.c b/src/gb/gprs_ns2_udp.c index 0fc1b4b..f24eae6 100644 --- a/src/gb/gprs_ns2_udp.c +++ b/src/gb/gprs_ns2_udp.c @@ -337,9 +337,6 @@ 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 */ diff --git a/tests/osmo_io/osmo_io_test.c b/tests/osmo_io/osmo_io_test.c index bb99b54..3683ee3 100644 --- a/tests/osmo_io/osmo_io_test.c +++ b/tests/osmo_io/osmo_io_test.c @@ -85,10 +85,6 @@ memcpy(buf, TESTDATA, sizeof(TESTDATA)); osmo_iofd_write_msgb(iofd1, msg); - osmo_iofd_write_enable(iofd1); - osmo_iofd_write_enable(iofd2); - osmo_iofd_read_enable(iofd1); - osmo_iofd_read_enable(iofd2); /* Allow enough cycles to handle the messages */ @@ -142,11 +138,6 @@ memcpy(buf, TESTDATA, sizeof(TESTDATA)); osmo_iofd_sendto_msgb(iofd1, msg, 0, NULL); - osmo_iofd_write_enable(iofd1); - osmo_iofd_write_enable(iofd2); - osmo_iofd_read_enable(iofd1); - osmo_iofd_read_enable(iofd2); - /* Allow enough cycles to handle the messages */ for (int i = 0; i < 128; i++) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33220 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I0dbc14a8cbbdc7b6e4688942c0dac865bbd72c8b Gerrit-Change-Number: 33220 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmocore[master]: osmo_io: Don't make msg in write_cb const
by laforge 07 Jun '23

07 Jun '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33219 ) Change subject: osmo_io: Don't make msg in write_cb const ...................................................................... osmo_io: Don't make msg in write_cb const This was discussed in a previous change, but the change was merged as-is. Change-Id: I8b4a2dd7a336dea5c52c9da6e78bbc4d5f2a02f8 --- M include/osmocom/core/osmo_io.h M src/gb/gprs_ns2_udp.c M tests/osmo_io/osmo_io_test.c 3 files changed, 17 insertions(+), 5 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/include/osmocom/core/osmo_io.h b/include/osmocom/core/osmo_io.h index a539c8b..a5e6165 100644 --- a/include/osmocom/core/osmo_io.h +++ b/include/osmocom/core/osmo_io.h @@ -41,7 +41,7 @@ void (*read_cb)(struct osmo_io_fd *iofd, int res, struct msgb *msg); /*! call-back function when write has completed on fd */ void (*write_cb)(struct osmo_io_fd *iofd, int res, - const struct msgb *msg); + struct msgb *msg); /*! call-back function to segment the data at message boundaries. * Needs to return the size of the next message. If it returns * -EAGAIN or a value larger than msgb_length() (message is incomplete) @@ -58,7 +58,7 @@ const struct osmo_sockaddr *saddr); /*! call-back function emulating sendto */ void (*sendto_cb)(struct osmo_io_fd *iofd, int res, - const struct msgb *msg, + struct msgb *msg, const struct osmo_sockaddr *daddr); }; }; diff --git a/src/gb/gprs_ns2_udp.c b/src/gb/gprs_ns2_udp.c index e9e9e38..0fc1b4b 100644 --- a/src/gb/gprs_ns2_udp.c +++ b/src/gb/gprs_ns2_udp.c @@ -223,7 +223,7 @@ } static void handle_nsip_sendto(struct osmo_io_fd *iofd, int res, - const struct msgb *msg, + struct msgb *msg, const struct osmo_sockaddr *daddr) { struct gprs_ns2_vc_bind *bind = osmo_iofd_get_data(iofd); diff --git a/tests/osmo_io/osmo_io_test.c b/tests/osmo_io/osmo_io_test.c index 1991926..bb99b54 100644 --- a/tests/osmo_io/osmo_io_test.c +++ b/tests/osmo_io/osmo_io_test.c @@ -49,7 +49,7 @@ talloc_free(msg); } -static void write_cb(struct osmo_io_fd *iofd, int rc, const struct msgb *msg) +static void write_cb(struct osmo_io_fd *iofd, int rc, struct msgb *msg) { printf("%s: write() returned rc=%d\n", osmo_iofd_get_name(iofd), rc); } @@ -109,7 +109,7 @@ talloc_free(msg); } -static void sendto_cb(struct osmo_io_fd *iofd, int rc, const struct msgb *msg, +static void sendto_cb(struct osmo_io_fd *iofd, int rc, struct msgb *msg, const struct osmo_sockaddr *daddr) { printf("%s: sendto() returned rc=%d\n", osmo_iofd_get_name(iofd), rc); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33219 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I8b4a2dd7a336dea5c52c9da6e78bbc4d5f2a02f8 Gerrit-Change-Number: 33219 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-netif[master]: stream: Update log messages
by daniel 07 Jun '23

07 Jun '23
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33221 ) Change subject: stream: Update log messages ...................................................................... stream: Update log messages Change-Id: Ife20b9d18e6ca86a06991d68165694e31052c58a --- M src/stream.c 1 file changed, 16 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/21/33221/1 diff --git a/src/stream.c b/src/stream.c index 782c0fc..c045b83 100644 --- a/src/stream.c +++ b/src/stream.c @@ -437,7 +437,7 @@ if (errno == EPIPE || errno == ENOTCONN) { osmo_stream_cli_reconnect(cli); } - LOGSCLI(cli, LOGL_ERROR, "error %d to send\n", ret); + LOGSCLI(cli, LOGL_ERROR, "received error %d in response to send\n", errno); } msgb_free(msg); @@ -481,7 +481,7 @@ if (llist_empty(&cli->tx_queue)) osmo_fd_write_disable(&cli->ofd); - LOGSCLI(cli, LOGL_DEBUG, "connection done.\n"); + LOGSCLI(cli, LOGL_DEBUG, "connection established.\n"); cli->state = STREAM_CLI_STATE_CONNECTED; switch (cli->sk_domain) { case AF_UNIX: @@ -561,7 +561,7 @@ return; } - LOGSCLI(cli, LOGL_DEBUG, "connection done.\n"); + LOGSCLI(cli, LOGL_DEBUG, "connection established.\n"); cli->state = STREAM_CLI_STATE_CONNECTED; switch (cli->sk_domain) { case AF_UNIX: @@ -599,7 +599,7 @@ return; } - LOGSCLI(cli, LOGL_DEBUG, "connection done.\n"); + LOGSCLI(cli, LOGL_DEBUG, "connection established.\n"); cli->state = STREAM_CLI_STATE_CONNECTED; switch (cli->sk_domain) { case AF_UNIX: @@ -1565,7 +1565,7 @@ LOGP(DLINP, LOGL_DEBUG, "message received\n"); if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) { - LOGP(DLINP, LOGL_DEBUG, "Connection is being flushed and closed; ignoring received message\n"); + LOGP(DLINP, LOGL_NOTICE, "Connection is being flushed and closed; ignoring received message\n"); return 0; } @@ -1670,11 +1670,9 @@ OSMO_ASSERT(link->mode == OSMO_STREAM_MODE_OSMO_FD); conn = talloc_zero(ctx, struct osmo_stream_srv); - if (conn == NULL) { - LOGP(DLINP, LOGL_ERROR, "cannot allocate new peer in srv, " - "reason=`%s'\n", strerror(errno)); + if (conn == NULL) return NULL; - } + conn->srv = link; osmo_fd_setup(&conn->ofd, fd, OSMO_FD_READ, osmo_stream_srv_cb, conn, 0); conn->read_cb = read_cb; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Ife20b9d18e6ca86a06991d68165694e31052c58a Gerrit-Change-Number: 33221 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • ...
  • 248
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.