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 2025

  • 1 participants
  • 1491 discussions
[M] Change in osmo-pcap[master]: server: Implement non-blocking write to pcap file with osmo_io
by pespin 17 Jan '25

17 Jan '25
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-pcap/+/39367?usp=email ) Change subject: server: Implement non-blocking write to pcap file with osmo_io ...................................................................... server: Implement non-blocking write to pcap file with osmo_io Actual zero-copy msgb passing from read tcp socket will be implemented in follow-up patches. Change-Id: I098a9455a2a4cc626444e6fc13aa88c4cc9694f0 Related: SYS#7080 --- M include/osmo-pcap/osmo_pcap_server.h M src/osmo_pcap_wr_file.c M src/osmo_server_core.c 3 files changed, 173 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/67/39367/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39367?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Change-Id: I098a9455a2a4cc626444e6fc13aa88c4cc9694f0 Gerrit-Change-Number: 39367 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-pcap[master]: server: Use osmo_stream_srv for non-tls read tcp sock
by pespin 17 Jan '25

17 Jan '25
Attention is currently required from: laforge, osmith. Hello Jenkins Builder, laforge, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcap/+/39343?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Code-Review+1 by laforge, Code-Review+1 by osmith Change subject: server: Use osmo_stream_srv for non-tls read tcp sock ...................................................................... server: Use osmo_stream_srv for non-tls read tcp sock TLS handling adds a lot of complexity, so TLS sockets are still read through the previous code paths, and conversion to osmo_stream_srv is left as a future improvement. Related: SYS#7080 Depends: libosmo-netif.git Change-Id I6e8dd6ece13397074075f05a1a0a8dbdd80d8848 Depends: libosmo-netif.git Change-Id I80a1c4b227629e3ca0c8c587a103db6057322cb4 Depends: libosmocore.git Change-Id I6f9125916a301414301587f84fc3db98549a2f3f Change-Id: I537620fcad6c8e65206a41a1c21bd4b6453fbed4 --- A TODO-RELEASE M include/osmo-pcap/osmo_pcap_server.h M src/osmo_server_core.c M src/osmo_server_network.c 4 files changed, 113 insertions(+), 64 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/43/39343/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39343?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Change-Id: I537620fcad6c8e65206a41a1c21bd4b6453fbed4 Gerrit-Change-Number: 39343 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in osmo-pcap[master]: server: zero-copy msgb from tcp read to file write
by pespin 17 Jan '25

17 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/39370?usp=email ) Change subject: server: zero-copy msgb from tcp read to file write ...................................................................... server: zero-copy msgb from tcp read to file write Related: SYS#7080 Change-Id: Iae9b9eaec42ad8ec86d1a8144d676115fa057766 --- M include/osmo-pcap/osmo_pcap_server.h M src/osmo_server_core.c M src/osmo_server_network.c 3 files changed, 97 insertions(+), 67 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/70/39370/1 diff --git a/include/osmo-pcap/osmo_pcap_server.h b/include/osmo-pcap/osmo_pcap_server.h index e71096b..f97e4ae 100644 --- a/include/osmo-pcap/osmo_pcap_server.h +++ b/include/osmo-pcap/osmo_pcap_server.h @@ -121,15 +121,13 @@ /* pcap stuff */ enum osmo_pcap_fmt file_fmt; bool pcapng_endian_swapped; - uint8_t *file_hdr; - uint32_t file_hdr_len; + struct msgb *file_hdr_msg; /* last time */ struct tm last_write; /* read buffering */ int state; - int pend; bool reopen_delayed; size_t data_max_len; /* size of allocated buffer in data->data. */ @@ -141,13 +139,13 @@ size_t tls_limit_read; struct osmo_tls_session tls_session; struct osmo_wqueue rem_wq; - struct osmo_pcap_data *data; /* Used to store TLS decoded data */ + struct msgb *rx_tls_dec_msg; /* Used to store TLS decoded data */ }; void osmo_pcap_conn_free(struct osmo_pcap_conn *conn); void vty_server_init(void); void osmo_pcap_conn_close(struct osmo_pcap_conn *conn); -int osmo_pcap_conn_process_data(struct osmo_pcap_conn *conn, const uint8_t *data, size_t len); +int osmo_pcap_conn_process_data(struct osmo_pcap_conn *conn, struct msgb *msg); void osmo_pcap_conn_restart_trace(struct osmo_pcap_conn *conn); void osmo_pcap_conn_close_trace(struct osmo_pcap_conn *conn); void osmo_pcap_conn_event(struct osmo_pcap_conn *conn, diff --git a/src/osmo_server_core.c b/src/osmo_server_core.c index bc8c08c..c2f880e 100644 --- a/src/osmo_server_core.c +++ b/src/osmo_server_core.c @@ -109,7 +109,7 @@ talloc_free(event_name); pcap_zmq_send(conn->server->zmq_publ, - conn->file_hdr, conn->file_hdr_len, + msgb_data(conn->file_hdr_msg), msgb_length(conn->file_hdr_msg), ZMQ_SNDMORE); pcap_zmq_send(conn->server->zmq_publ, data, len, @@ -199,7 +199,6 @@ INIT_LLIST_HEAD(&conn->wrf_flushing_list); conn->data_max_len = calc_data_max_len(server); - conn->data = talloc_zero_size(conn, sizeof(struct osmo_pcap_data) + conn->data_max_len); /* a bit nasty. we do not work with ids but names */ desc = talloc_zero(conn, struct rate_ctr_group_desc); if (!desc) { @@ -289,9 +288,11 @@ close(conn->rem_wq.bfd.fd); conn->rem_wq.bfd.fd = -1; osmo_tls_release(&conn->tls_session); + msgb_free(conn->rx_tls_dec_msg); + conn->rx_tls_dec_msg = NULL; } - TALLOC_FREE(conn->file_hdr); - conn->file_hdr_len = 0; + msgb_free(conn->file_hdr_msg); + conn->file_hdr_msg = NULL; osmo_pcap_conn_close_trace(conn); osmo_pcap_conn_event(conn, "disconnect", NULL); @@ -318,6 +319,7 @@ struct tm tm; int rc; char *real_base_path, *curr_filename; + struct msgb *msg; osmo_pcap_conn_close_trace(conn); @@ -352,10 +354,10 @@ if (rc < 0) return; - /* TODO: get msgb from conn object stored: */ - struct msgb *msg = msgb_alloc_c(conn->wrf, conn->file_hdr_len, "local_iofd_hdr"); - memcpy(msgb_put(msg, conn->file_hdr_len), conn->file_hdr, conn->file_hdr_len); - + /* We need to keep a clone assigned to conn to check for incoming hdr changes: */ + OSMO_ASSERT(conn->file_hdr_msg); + msg = msgb_copy_c(conn->wrf, conn->file_hdr_msg, "wrf_hdr"); + OSMO_ASSERT(msg); rc = osmo_pcap_wr_file_write_msgb(conn->wrf, msg); if (rc < 0) { LOGP(DSERVER, LOGL_ERROR, "Failed to write the header: %d\n", errno); @@ -518,16 +520,17 @@ } /* New recorded packet is received. - * Returns 0 on success, negative on error. */ -int osmo_pcap_conn_process_data(struct osmo_pcap_conn *conn, const uint8_t *data, size_t len) + * Returns 0 on success (and owns msgb), negative on error (msgb to be freed by caller). */ +int osmo_pcap_conn_process_data(struct osmo_pcap_conn *conn, struct msgb *msg) { time_t now = time(NULL); int rc; - zmq_send_client_data(conn, data, len); + zmq_send_client_data(conn, msgb_data(msg), msgb_length(msg)); if (!conn->store) { update_last_write(conn, now); + msgb_free(msg); return 0; } @@ -537,20 +540,18 @@ } /* Check if we are past the limit or on a day change. */ - if (!check_restart_pcap_max_size(conn, len)) + if (!check_restart_pcap_max_size(conn, msgb_length(msg))) check_restart_pcap_localtime(conn, now); - /* TODO: get msgb from caller: */ - struct msgb *msg = msgb_alloc_c(conn->wrf, len, "local_iofd_msg"); - memcpy(msgb_put(msg, len), data, len); - + talloc_steal(conn->wrf, msg); rc = osmo_pcap_wr_file_write_msgb(conn->wrf, msg); if (rc < 0) { LOGP(DSERVER, LOGL_ERROR, "%s: Failed writing to file\n", conn->name); - msgb_free(msg); + /* msgb will be freed by caller */ return -1; } update_last_write(conn, now); + /* msgb is now owned by conn->wrf. */ return 0; } diff --git a/src/osmo_server_network.c b/src/osmo_server_network.c index 5c7a008..da14480 100644 --- a/src/osmo_server_network.c +++ b/src/osmo_server_network.c @@ -121,9 +121,29 @@ } } -/* returns >0 on success, <= 0 on failure (closes conn) */ -static int rx_link_hdr(struct osmo_pcap_conn *conn, const struct osmo_pcap_data *data) +/* Updates conn->file_hdr_msg, owns (frees) msg. */ +static void update_conn_file_hdr_msg(struct osmo_pcap_conn *conn, struct msgb *msg) { + /* The msg chunk of memory to hold the hdr data may actually be a lot bigger than + * the actual data (len << data_len). + * Hence, since we may keep this around for a big time (life of the conn), let's + * better keep a reduced memory footprint msgb instead of the original one: */ + msgb_free(conn->file_hdr_msg); + conn->file_hdr_msg = msgb_copy_resize_c(conn, msg, msgb_length(msg), "conn_file_hdr_msg"); + OSMO_ASSERT(conn->file_hdr_msg); + msgb_free(msg); + + /* pull to l2 is done here at the copy since anyway msgb_copy_resize + * cannot shrink available headroom: */ + msgb_pull_to_l2(conn->file_hdr_msg); + + osmo_pcap_conn_restart_trace(conn); +} + +/* returns >0 on success (msg becomes owned), <= 0 on failure (closes conn) */ +static int rx_link_hdr(struct osmo_pcap_conn *conn, struct msgb *msg) +{ + struct osmo_pcap_data *data = (struct osmo_pcap_data *)msg->l1h; int rc; rc = osmo_pcap_file_discover_fmt(data->data, data->len, &conn->file_fmt); @@ -148,19 +168,11 @@ if (conn->store && !conn->wrf) { /* First received link hdr in conn */ - talloc_free(conn->file_hdr); - conn->file_hdr = talloc_size(conn, data->len); - memcpy(conn->file_hdr, data->data, data->len); - conn->file_hdr_len = data->len; - osmo_pcap_conn_restart_trace(conn); - } else if (conn->file_hdr_len != data->len || - memcmp(&conn->file_hdr, data->data, data->len) != 0) { + update_conn_file_hdr_msg(conn, msg); + } else if (msgb_l2len(conn->file_hdr_msg) != msgb_l2len(msg) || + memcmp(msgb_l2(conn->file_hdr_msg), msgb_l2(msg), msgb_l2len(msg)) != 0) { /* Client changed the link hdr in conn */ - talloc_free(conn->file_hdr); - conn->file_hdr = talloc_size(conn, data->len); - memcpy(conn->file_hdr, data->data, data->len); - conn->file_hdr_len = data->len; - osmo_pcap_conn_restart_trace(conn); + update_conn_file_hdr_msg(conn, msg); } return 1; @@ -247,22 +259,25 @@ } /* returns >0 on success, <= 0 on failure (closes conn) */ -static int rx_link_data(struct osmo_pcap_conn *conn, const struct osmo_pcap_data *data) +static int rx_link_data(struct osmo_pcap_conn *conn, struct msgb *msg) { int rc; - if ((rc = validate_link_data(conn, data)) < 0) + if ((rc = validate_link_data(conn, (struct osmo_pcap_data *)msg->l1h)) < 0) return rc; - if ((rc = osmo_pcap_conn_process_data(conn, &data->data[0], data->len)) < 0) + msgb_pull_to_l2(msg); + if ((rc = osmo_pcap_conn_process_data(conn, msg)) < 0) return rc; return 1; } /* Read segment payload, of size data->len. - * returns >0 on success, <= 0 on failure (closes conn) */ -static int rx_link(struct osmo_pcap_conn *conn, const struct osmo_pcap_data *data) + * returns >0 on success, <= 0 on failure (closes conn). + * Message is always owned or freed here. */ +static int rx_link(struct osmo_pcap_conn *conn, struct msgb *msg) { + struct osmo_pcap_data *data = (struct osmo_pcap_data *)msg->l1h; int rc; /* count the full packet we got */ @@ -275,15 +290,18 @@ switch (data->type) { case PKT_LINK_HDR: - rc = rx_link_hdr(conn, data); + rc = rx_link_hdr(conn, msg); break; case PKT_LINK_DATA: - rc = rx_link_data(conn, data); + rc = rx_link_data(conn, msg); break; default: OSMO_ASSERT(0); } + if (rc <= 0) + msgb_free(msg); + if (conn->reopen_delayed) { LOGP(DSERVER, LOGL_INFO, "Reopening log for %s now.\n", conn->name); osmo_pcap_conn_restart_trace(conn); @@ -306,60 +324,69 @@ static int tls_read_cb_initial(struct osmo_pcap_conn *conn) { int rc; + struct msgb *msg = conn->rx_tls_dec_msg; + msg->l1h = msgb_data(msg); + struct osmo_pcap_data *pdata = (struct osmo_pcap_data *)msg->l1h; + size_t pend = sizeof(*pdata) - msgb_length(msg); - rc = do_read_tls(conn, ((uint8_t *)conn->data) + sizeof(*conn->data) - conn->pend, conn->pend); + OSMO_ASSERT(sizeof(*pdata) > msgb_length(msg)); + + rc = do_read_tls(conn, msg->tail, pend); if (rc <= 0) { LOGP(DSERVER, LOGL_ERROR, - "Too short packet. Got %d, wanted %d\n", rc, conn->data->len); + "Too short packet. Got %d, wanted %zu\n", rc, pend); return -1; } - - conn->pend -= rc; - if (conn->pend < 0) { + if (rc > pend) { LOGP(DSERVER, LOGL_ERROR, - "Someone got the pending read wrong: %d\n", conn->pend); + "Someone got the pending read wrong: %zu\n", pend); return -1; } - if (conn->pend > 0) + msgb_put(msg, rc); + + if (pend > rc) return 1; /* Wait for more data before continuing */ - conn->data->len = ntohs(conn->data->len); + pdata->len = ntohs(pdata->len); - if (conn->data->len > conn->data_max_len) { + if (pdata->len + sizeof(*pdata) > conn->data_max_len) { LOGP(DSERVER, LOGL_ERROR, "Implausible data length: %u > %zu (snaplen %u)\n", - conn->data->len, conn->data_max_len, conn->server->max_snaplen); + pdata->len, conn->data_max_len, conn->server->max_snaplen); return -1; } conn->state = STATE_DATA; - conn->pend = conn->data->len; + msg->l2h = msg->tail; return 1; } static int tls_read_cb_data(struct osmo_pcap_conn *conn) { int rc; + struct msgb *msg = conn->rx_tls_dec_msg; + struct osmo_pcap_data *pdata = (struct osmo_pcap_data *)msg->l1h; + size_t pend = pdata->len - msgb_l2len(msg); - rc = do_read_tls(conn, &conn->data->data[conn->data->len - conn->pend], conn->pend); + rc = do_read_tls(conn, msg->tail, pend); if (rc <= 0) { LOGP(DSERVER, LOGL_ERROR, - "Too short packet. Got %d, wanted %d\n", rc, conn->data->len); + "Too short packet. Got %d, wanted %u\n", rc, pdata->len); return -1; } - - conn->pend -= rc; - if (conn->pend < 0) { + if (rc > pend) { LOGP(DSERVER, LOGL_ERROR, - "Someone got the pending read wrong: %d\n", conn->pend); + "Someone got the pending read wrong: %zu\n", pend); return -1; } - if (conn->pend > 0) + msgb_put(msg, rc); + + if (pend > rc) return 1; /* Wait for more data before continuing */ conn->state = STATE_INITIAL; - conn->pend = sizeof(*conn->data); + conn->rx_tls_dec_msg = msgb_alloc_c(conn, conn->data_max_len, "rx_tls_dec_data"); - return rx_link(conn, conn->data); + return rx_link(conn, msg); } /* returns >0 on success, <= 0 on failure (closes conn) */ @@ -422,11 +449,15 @@ return 0; } - data = (struct osmo_pcap_data *)msgb_data(msg); + OSMO_ASSERT(msgb_length(msg) >= sizeof(*data)); + + msg->l1h = msgb_data(msg); + data = (struct osmo_pcap_data *)msg->l1h; data->len = osmo_ntohs(data->len); - rc = rx_link(conn, data); - msgb_free(msg); + msg->l2h = msg->l1h + sizeof(*data); + + rc = rx_link(conn, msg); if (rc <= 0) osmo_pcap_conn_close(conn); return 0; @@ -485,7 +516,7 @@ } /* Prepare for first read of segment header: */ conn->state = STATE_INITIAL; - conn->pend = sizeof(struct osmo_pcap_data); + conn->rx_tls_dec_msg = msgb_alloc_c(conn, conn->data_max_len, "rx_tls_dec_data"); if (!osmo_tls_init_server_session(conn, server)) { osmo_pcap_conn_close(conn); return; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39370?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Change-Id: Iae9b9eaec42ad8ec86d1a8144d676115fa057766 Gerrit-Change-Number: 39370 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-netif[master]: stream: Add osmo_stream_srv_link_set_msgb_alloc_info()
by pespin 17 Jan '25

17 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/39369?usp=email ) Change subject: stream: Add osmo_stream_srv_link_set_msgb_alloc_info() ...................................................................... stream: Add osmo_stream_srv_link_set_msgb_alloc_info() This is needed so that user can set desired headroom+size info on rx-allocated msgbs, so that osmo_stream_srv can inherit them upon osmo_stream_srv_create2(). Manually obtaining the iofd through osmo_stream_srv_get_iofd() and changing the params directly in the iofd produces undesired effects, since the first msgbs are alredy allocated during osmo_stream_srv_create2 (which calls osmo_iofd_register()) before the object is available to the user. As a result, first rx messages may come with unexpected size/headroom. Ideally we'd had written the osmo_stream_srv APIs to have a 2 step setup, eg _alloc() + _run()/_start(), but too late to do so now. This approach is already follwed by existing osmo_stream_srv_link_set_tx_queue_max_length() API. Change-Id: I80a1c4b227629e3ca0c8c587a103db6057322cb4 --- M TODO-RELEASE M include/osmocom/netif/stream.h M src/stream_srv.c 3 files changed, 34 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/69/39369/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index e66b421..dfdbd89 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -11,3 +11,4 @@ libosmo-netif add API osmo-stream_cli_set_tx_queue_max_length(), osmo_stream_srv_link_set_tx_queue_max_length() libosmo-netif add API struct osmo_ipa_ka_fsm_inst libosmo-netif add API osmo_stream_{cli,srv}_set_segmentation_cb2() +libosmo-netif add API osmo_stream_srv_link_set_msgb_alloc_info() diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index 2866ea3..951f42a 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -85,6 +85,7 @@ char *osmo_stream_srv_link_get_sockname(const struct osmo_stream_srv_link *link); struct osmo_fd *osmo_stream_srv_link_get_ofd(struct osmo_stream_srv_link *link); int osmo_stream_srv_link_get_fd(const struct osmo_stream_srv_link *link); +int osmo_stream_srv_link_set_msgb_alloc_info(struct osmo_stream_srv_link *link, unsigned int size, unsigned int headroom); bool osmo_stream_srv_link_is_opened(const struct osmo_stream_srv_link *link); int osmo_stream_srv_link_open(struct osmo_stream_srv_link *link); void osmo_stream_srv_link_close(struct osmo_stream_srv_link *link); diff --git a/src/stream_srv.c b/src/stream_srv.c index c2b187a..261539b 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -69,6 +69,15 @@ * Server side. */ +struct msgb_alloc_info { + /*! Whether it was set by user or we use iofd defaults */ + bool set_by_user; + /*! size of msgb to allocate (excluding headroom) */ + unsigned int size; + /*! headroom to allocate when allocating msgb's */ + unsigned int headroom; +}; + #define OSMO_STREAM_SRV_F_RECONF (1 << 0) #define OSMO_STREAM_SRV_F_NODELAY (1 << 1) @@ -88,6 +97,7 @@ void *data; int flags; unsigned int tx_queue_max_length; /* Max amount of msgbs which can be enqueued */ + struct msgb_alloc_info msgb_alloc; struct osmo_sock_init2_multiaddr_pars ma_pars; }; @@ -506,6 +516,26 @@ link->accept_cb = accept_cb; } +/*! Set the msgb allocation parameters on child osmo_stream_srv objects + * \param[in] link Stream Server Link + * \param[in] size Size of msgb to allocate (excluding headroom) + * \param[in] headroom Headroom to allocate when allocating msgb's + * + * The parameters are applied to osmo_stream_srv objects upon creation. + * Setting both to 0 leaves it as implementation default. + **/ +int osmo_stream_srv_link_set_msgb_alloc_info(struct osmo_stream_srv_link *link, unsigned int size, unsigned int headroom) +{ + if (size == 0 && headroom == 0) { + link->msgb_alloc.set_by_user = false; + } else { + link->msgb_alloc.set_by_user = true; + link->msgb_alloc.headroom = headroom; + link->msgb_alloc.size = size; + } + return 0; +} + /*! Destroy the stream server link. Closes + Releases Memory. * \param[in] link Stream Server Link */ void osmo_stream_srv_link_destroy(struct osmo_stream_srv_link *link) @@ -962,6 +992,8 @@ } osmo_iofd_set_txqueue_max_length(conn->iofd, conn->srv->tx_queue_max_length); + if (conn->srv->msgb_alloc.set_by_user) + osmo_iofd_set_alloc_info(conn->iofd, conn->srv->msgb_alloc.size, conn->srv->msgb_alloc.headroom); if (osmo_iofd_register(conn->iofd, fd) < 0) { LOGSSRV(conn, LOGL_ERROR, "could not register FD %d\n", fd); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/39369?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I80a1c4b227629e3ca0c8c587a103db6057322cb4 Gerrit-Change-Number: 39369 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in libosmocore[master]: msgb: msgb_copy_resize_c: Fix validation check to avoid memcpy buffer...
by pespin 17 Jan '25

17 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/39368?usp=email ) Change subject: msgb: msgb_copy_resize_c: Fix validation check to avoid memcpy buffer overflow ...................................................................... msgb: msgb_copy_resize_c: Fix validation check to avoid memcpy buffer overflow If msg->data pointer is not allocated at the start of the msgb, (eg. because it was pull()ed or had some headroom), the existing check wouldn't catch it and memcpy() would write passed the allocated chunk (msg->data - msg->_data) bytes. Change-Id: If4c84162a4e5b44b82813fb58029fae04bd38230 --- M src/core/msgb.c 1 file changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/68/39368/1 diff --git a/src/core/msgb.c b/src/core/msgb.c index 713510c..6f081bb 100644 --- a/src/core/msgb.c +++ b/src/core/msgb.c @@ -327,10 +327,10 @@ { struct msgb *new_msg; - if (new_len < msgb_length(msg)) { + if (new_len < (msg->data - msg->_data) + msgb_length(msg)) { LOGP(DLGLOBAL, LOGL_ERROR, - "Data from old msgb (%u bytes) won't fit into new msgb (%u bytes) after reallocation\n", - msgb_length(msg), new_len); + "Data from old msgb (%u bytes at offset %u) won't fit into new msgb (%u total bytes) after reallocation\n", + msgb_length(msg), (uint16_t)(msg->data - msg->_data), new_len); return NULL; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39368?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: If4c84162a4e5b44b82813fb58029fae04bd38230 Gerrit-Change-Number: 39368 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-pcap[master]: server: Correct error check calling osmo_pcap_conn_process_data()
by pespin 17 Jan '25

17 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/39366?usp=email ) Change subject: server: Correct error check calling osmo_pcap_conn_process_data() ...................................................................... server: Correct error check calling osmo_pcap_conn_process_data() The function is not expected to return >0, so clarify it when calling it. Change-Id: I8338b886db7bb7996229d78fe19025ebe5d0c5f8 --- M src/osmo_server_network.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/66/39366/1 diff --git a/src/osmo_server_network.c b/src/osmo_server_network.c index c93ce6d..5b31958 100644 --- a/src/osmo_server_network.c +++ b/src/osmo_server_network.c @@ -252,7 +252,7 @@ if ((rc = validate_link_data(conn, data)) < 0) return rc; - if ((rc = osmo_pcap_conn_process_data(conn, &data->data[0], data->len))) + if ((rc = osmo_pcap_conn_process_data(conn, &data->data[0], data->len)) < 0) return rc; return 1; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39366?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Change-Id: I8338b886db7bb7996229d78fe19025ebe5d0c5f8 Gerrit-Change-Number: 39366 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-pcap[master]: server: Introduce struct osmo_pcap_wr_file
by pespin 17 Jan '25

17 Jan '25
Attention is currently required from: laforge, osmith, pespin. Hello Jenkins Builder, laforge, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcap/+/39353?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by laforge, Code-Review+1 by osmith, Verified-1 by Jenkins Builder Change subject: server: Introduce struct osmo_pcap_wr_file ...................................................................... server: Introduce struct osmo_pcap_wr_file This encloses file state and operation, allowing for further improvement later on: * Making non-blocking/async writes * Writing to new file while finishing writes to previous files Related: SYS#7080 Change-Id: I5244fbc7a5dc047e1f5f7b77954cbb9c1f610181 --- M include/osmo-pcap/osmo_pcap_server.h M src/Makefile.am A src/osmo_pcap_wr_file.c M src/osmo_server_core.c M src/osmo_server_network.c M tests/rotate_localtime/Makefile.am 6 files changed, 226 insertions(+), 132 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/53/39353/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39353?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Change-Id: I5244fbc7a5dc047e1f5f7b77954cbb9c1f610181 Gerrit-Change-Number: 39353 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-pcap[master]: server: Implement non-blocking write to pcap file with osmo_io
by pespin 17 Jan '25

17 Jan '25
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/39367?usp=email ) Change subject: server: Implement non-blocking write to pcap file with osmo_io ...................................................................... server: Implement non-blocking write to pcap file with osmo_io Actual zero-copy msgb passing from read tcp socket will be implemented in follow-up patches. Change-Id: I098a9455a2a4cc626444e6fc13aa88c4cc9694f0 Related: SYS#7080 --- M include/osmo-pcap/osmo_pcap_server.h M src/osmo_pcap_wr_file.c M src/osmo_server_core.c 3 files changed, 171 insertions(+), 39 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/67/39367/1 diff --git a/include/osmo-pcap/osmo_pcap_server.h b/include/osmo-pcap/osmo_pcap_server.h index 9b93888..e71096b 100644 --- a/include/osmo-pcap/osmo_pcap_server.h +++ b/include/osmo-pcap/osmo_pcap_server.h @@ -29,6 +29,7 @@ #include <pcap.h> +#include <osmocom/core/osmo_io.h> #include <osmocom/core/select.h> #include <osmocom/core/linuxlist.h> #include <osmocom/core/write_queue.h> @@ -73,20 +74,30 @@ SERVER_CTR_NOCLIENT, }; +struct osmo_pcap_wr_file; +typedef void (*osmo_pcap_wr_file_flush_completed_cb_t)(struct osmo_pcap_wr_file *wrf, void *data); struct osmo_pcap_wr_file { + struct llist_head entry; /* entry into (osmo_pcap_conn)->wrf_flushing_list */ void *data; /* user backpointer */ /* canonicalized absolute pathname of pcap file we write to */ char *filename; /* file descriptor of the file we write to */ - int local_fd; + struct osmo_io_fd *local_iofd; /* Current write offset of the file we write to (local_fd) */ off_t wr_offset; + /* Number of bytes confirmed to be written, <=wr_offset */ + off_t wr_completed; + osmo_pcap_wr_file_flush_completed_cb_t flush_completed_cb; }; struct osmo_pcap_wr_file *osmo_pcap_wr_file_alloc(void *ctx, void *data); void osmo_pcap_wr_file_free(struct osmo_pcap_wr_file *wrf); +void osmo_pcap_wr_file_set_flush_completed_cb(struct osmo_pcap_wr_file *wrf, osmo_pcap_wr_file_flush_completed_cb_t flush_completed_cb); int osmo_pcap_wr_file_open(struct osmo_pcap_wr_file *wrf, const char *filename, mode_t mode); void osmo_pcap_wr_file_close(struct osmo_pcap_wr_file *wrf); -int osmo_pcap_wr_file_write(struct osmo_pcap_wr_file *wrf, const uint8_t *data, size_t len); +int osmo_pcap_wr_file_write_msgb(struct osmo_pcap_wr_file *wrf, struct msgb *msg); +bool osmo_pcap_wr_file_has_pending_writes(const struct osmo_pcap_wr_file *wrf); +int osmo_pcap_wr_file_flush(struct osmo_pcap_wr_file *wrf, struct llist_head *wrf_flushing_list); +bool osmo_pcap_wr_file_is_flushing(const struct osmo_pcap_wr_file *wrf); void osmo_pcap_wr_file_move_to_dir(struct osmo_pcap_wr_file *wrf, const char *dst_dirpath); struct osmo_pcap_conn { @@ -103,6 +114,9 @@ /* Remote connection */ struct osmo_stream_srv *srv; struct osmo_pcap_wr_file *wrf; + /* list of osmo_pcap_wr_file->entry. + * wrf which we want to close but still have pending writes to be completed */ + struct llist_head wrf_flushing_list; /* pcap stuff */ enum osmo_pcap_fmt file_fmt; diff --git a/src/osmo_pcap_wr_file.c b/src/osmo_pcap_wr_file.c index a66e5e2..418a129 100644 --- a/src/osmo_pcap_wr_file.c +++ b/src/osmo_pcap_wr_file.c @@ -1,5 +1,5 @@ /* - * Write to a file + * Asynchronous non-blocking write to a file * * (C) 2025 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> * All Rights Reserved @@ -32,14 +32,49 @@ #include <osmo-pcap/common.h> #include <osmo-pcap/osmo_pcap_server.h> +static void local_iofd_write_cb(struct osmo_io_fd *iofd, int res, struct msgb *msg) +{ + struct osmo_pcap_wr_file *wrf = osmo_iofd_get_data(iofd); + + LOGP(DSERVER, LOGL_DEBUG, "%s: write_cb(%s, %d)\n", osmo_iofd_get_name(iofd), wrf->filename, res); + if (res <= 0) { + LOGP(DSERVER, LOGL_ERROR, "%s: Failed writing to file path='%s' fd=%d: %s (%d)\n", + osmo_iofd_get_name(iofd), wrf->filename, osmo_iofd_get_fd(iofd), strerror(-res), res); + /* Trigger cb to tell user to free it, even if it was not being flushed. + * Special attention must be kept at the user regarding this code path, ie. + * user can't assume the werf was actually in flushing state... + */ + if (wrf->flush_completed_cb) + wrf->flush_completed_cb(wrf, wrf->data); + /* wrf may be freed here. */ + return; + } + + wrf->wr_completed += res; + + if (osmo_pcap_wr_file_is_flushing(wrf)) { + if (!osmo_pcap_wr_file_has_pending_writes(wrf)) { + LOGP(DSERVER, LOGL_DEBUG, "%s: closing now after completed data write path='%s' fd=%d\n", + osmo_iofd_get_name(iofd), wrf->filename, osmo_iofd_get_fd(iofd)); + if (wrf->flush_completed_cb) + wrf->flush_completed_cb(wrf, wrf->data); + /* wrf may be freed here. */ + return; + } + } +} + struct osmo_pcap_wr_file *osmo_pcap_wr_file_alloc(void *ctx, void *data) { struct osmo_pcap_wr_file *wrf = talloc_zero(ctx, struct osmo_pcap_wr_file); OSMO_ASSERT(wrf); + /* Initialize entry so that we can know whether we are included in a + * list in osmo_pcap_wr_file_is_flushing(): */ + INIT_LLIST_HEAD(&wrf->entry); wrf->data = data; - wrf->local_fd = -1; wrf->wr_offset = 0; + wrf->wr_completed = 0; return wrf; } @@ -49,22 +84,43 @@ if (!wrf) return; osmo_pcap_wr_file_close(wrf); + if (osmo_pcap_wr_file_is_flushing(wrf)) + llist_del(&wrf->entry); talloc_free(wrf); } +void osmo_pcap_wr_file_set_flush_completed_cb(struct osmo_pcap_wr_file *wrf, osmo_pcap_wr_file_flush_completed_cb_t flush_completed_cb) +{ + wrf->flush_completed_cb = flush_completed_cb; +} + int osmo_pcap_wr_file_open(struct osmo_pcap_wr_file *wrf, const char *filename, mode_t mode) { + struct osmo_io_ops ioops = { + .read_cb = NULL, + .write_cb = local_iofd_write_cb, + }; int rc; OSMO_ASSERT(filename); - OSMO_ASSERT(wrf->local_fd == -1); + OSMO_ASSERT(wrf->local_iofd == NULL); - rc = open(filename, O_CREAT|O_WRONLY|O_TRUNC, mode); + rc = open(filename, O_CREAT|O_WRONLY|O_TRUNC|O_NONBLOCK, mode); if (rc < 0) { LOGP(DSERVER, LOGL_ERROR, "Failed to open file '%s': %s\n", filename, strerror(errno)); return rc; } - wrf->local_fd = rc; + + wrf->local_iofd = osmo_iofd_setup(wrf, rc, filename, OSMO_IO_FD_MODE_READ_WRITE, + &ioops, wrf); + if (!wrf->local_iofd) + return -EBADFD; + if (osmo_iofd_register(wrf->local_iofd, -1) < 0) { + osmo_iofd_free(wrf->local_iofd); + wrf->local_iofd = NULL; + return -ENAVAIL; + } + wrf->filename = talloc_strdup(wrf, filename); OSMO_ASSERT(wrf->filename); return rc; @@ -72,26 +128,55 @@ void osmo_pcap_wr_file_close(struct osmo_pcap_wr_file *wrf) { - if (wrf->local_fd > 0) { - close(wrf->local_fd); - wrf->local_fd = -1; - } + osmo_iofd_free(wrf->local_iofd); + wrf->local_iofd = NULL; } -int osmo_pcap_wr_file_write(struct osmo_pcap_wr_file *wrf, const uint8_t *data, size_t len) +int osmo_pcap_wr_file_write_msgb(struct osmo_pcap_wr_file *wrf, struct msgb *msg) { - int rc = write(wrf->local_fd, data, len); - if (rc >= 0) { - wrf->wr_offset += rc; - if (rc != len) { - LOGP(DSERVER, LOGL_ERROR, "Short write '%s': ret %d != %zu\n", - wrf->filename, rc, len); - return -1; - } - } + int rc = osmo_iofd_write_msgb(wrf->local_iofd, msg); + if (rc < 0) + return rc; + wrf->wr_offset += msgb_length(msg); return rc; } +bool osmo_pcap_wr_file_has_pending_writes(const struct osmo_pcap_wr_file *wrf) +{ + return wrf->wr_completed < wrf->wr_offset; +} + +/* Mark the wrf as done writing to it. It will be closed and freed + * asynchronously when all data has been written to it. + * wrf may be freed during the call to this function, so don't use it anymore. */ +int osmo_pcap_wr_file_flush(struct osmo_pcap_wr_file *wrf, struct llist_head *wrf_flushing_list) +{ + if (osmo_pcap_wr_file_is_flushing(wrf)) { + LOGP(DSERVER, LOGL_ERROR, "Trying to flush a file which was already being flushed: '%s'\n", + wrf->filename); + return -EINVAL; + } + + if (!osmo_pcap_wr_file_has_pending_writes(wrf)) { + if (wrf->flush_completed_cb) + wrf->flush_completed_cb(wrf, wrf->data); + /* wrf may be freed here. */ + return 0; + } + + /* Put it in the flushing list, it will be closed freed once pending writes complete. */ + llist_add_tail(&wrf->entry, wrf_flushing_list); + return 0; +} + +/* whether we finished pushing more data to the wrf and we are waiting for it to + * finish writing before closing: + */ +bool osmo_pcap_wr_file_is_flushing(const struct osmo_pcap_wr_file *wrf) +{ + return !llist_empty(&wrf->entry); +} + /* Move file from current dir to dst_dirpath, and updates wrf->filename to point to new location. */ void osmo_pcap_wr_file_move_to_dir(struct osmo_pcap_wr_file *wrf, const char *dst_dirpath) { diff --git a/src/osmo_server_core.c b/src/osmo_server_core.c index 782ead9..bc8c08c 100644 --- a/src/osmo_server_core.c +++ b/src/osmo_server_core.c @@ -116,6 +116,35 @@ 0); } +/* wrf has written all data and can safely be closed, rotated, etc. */ +static void osmo_pcap_wr_file_flush_completed_cb(struct osmo_pcap_wr_file *wrf, void *data) +{ + struct osmo_pcap_conn *conn = data; + + if (wrf->wr_completed < wrf->wr_offset) { + LOGP(DSERVER, LOGL_NOTICE, "%s: Closing file with pending writes (%zu completed bytes < %zu wrote bytes)\n", + wrf->filename, wrf->wr_completed, wrf->wr_offset); + } + + if (!osmo_pcap_wr_file_is_flushing(wrf)) { + /* If it is not flushing, it probably is still assigned to conn; + * unassign it: */ + if (conn->wrf == wrf) + conn->wrf = NULL; + } + + osmo_pcap_wr_file_close(wrf); + + if (conn->server->completed_path) + osmo_pcap_wr_file_move_to_dir(wrf, conn->server->completed_path); + + osmo_pcap_conn_event(conn, "closingtracefile", wrf->filename); + rate_ctr_inc2(conn->ctrg, PEER_CTR_PROTATE); + rate_ctr_inc2(conn->server->ctrg, SERVER_CTR_PROTATE); + + osmo_pcap_wr_file_free(wrf); +} + static inline size_t calc_data_max_len(const struct osmo_pcap_server *server) { size_t data_max_len; @@ -168,6 +197,7 @@ return NULL; } + INIT_LLIST_HEAD(&conn->wrf_flushing_list); conn->data_max_len = calc_data_max_len(server); conn->data = talloc_zero_size(conn, sizeof(struct osmo_pcap_data) + conn->data_max_len); /* a bit nasty. we do not work with ids but names */ @@ -227,7 +257,11 @@ void osmo_pcap_conn_free(struct osmo_pcap_conn *conn) { + struct osmo_pcap_wr_file *wrf; osmo_pcap_conn_close(conn); + /* We are freeing, make sure all files are processed even if we may be lossing some data... */ + while ((wrf = llist_first_entry_or_null(&conn->wrf_flushing_list, struct osmo_pcap_wr_file, entry))) + osmo_pcap_wr_file_flush_completed_cb(wrf, conn); llist_del(&conn->entry); talloc_free(conn); } @@ -237,16 +271,8 @@ if (!conn->wrf) return; - osmo_pcap_wr_file_close(conn->wrf); - - if (conn->server->completed_path) - osmo_pcap_wr_file_move_to_dir(conn->wrf, conn->server->completed_path); - - osmo_pcap_conn_event(conn, "closingtracefile", conn->wrf->filename); - rate_ctr_inc2(conn->ctrg, PEER_CTR_PROTATE); - rate_ctr_inc2(conn->server->ctrg, SERVER_CTR_PROTATE); - - osmo_pcap_wr_file_free(conn->wrf); + osmo_pcap_wr_file_flush(conn->wrf, &conn->wrf_flushing_list); + /* conn->wrf may have been freed or moved to conn->wrf_flushing_list: */ conn->wrf = NULL; } @@ -298,9 +324,6 @@ /* omit any storing/creation of the file */ if (!conn->store) { update_last_write(conn, now); - /* TODO: Once we support async write, we'll want to schedule close here instead of freeing: */ - osmo_pcap_wr_file_free(conn->wrf); - conn->wrf = NULL; return; } @@ -323,16 +346,21 @@ } conn->wrf = osmo_pcap_wr_file_alloc(conn, conn); + osmo_pcap_wr_file_set_flush_completed_cb(conn->wrf, osmo_pcap_wr_file_flush_completed_cb); rc = osmo_pcap_wr_file_open(conn->wrf, curr_filename, conn->server->permission_mask); talloc_free(curr_filename); if (rc < 0) return; - rc = osmo_pcap_wr_file_write(conn->wrf, conn->file_hdr, conn->file_hdr_len); - if (rc != conn->file_hdr_len) { + /* TODO: get msgb from conn object stored: */ + struct msgb *msg = msgb_alloc_c(conn->wrf, conn->file_hdr_len, "local_iofd_hdr"); + memcpy(msgb_put(msg, conn->file_hdr_len), conn->file_hdr, conn->file_hdr_len); + + rc = osmo_pcap_wr_file_write_msgb(conn->wrf, msg); + if (rc < 0) { LOGP(DSERVER, LOGL_ERROR, "Failed to write the header: %d\n", errno); - osmo_pcap_wr_file_free(conn->wrf); - conn->wrf = NULL; + msgb_free(msg); + osmo_pcap_conn_close_trace(conn); return; } update_last_write(conn, now); @@ -512,9 +540,14 @@ if (!check_restart_pcap_max_size(conn, len)) check_restart_pcap_localtime(conn, now); - rc = osmo_pcap_wr_file_write(conn->wrf, data, len); + /* TODO: get msgb from caller: */ + struct msgb *msg = msgb_alloc_c(conn->wrf, len, "local_iofd_msg"); + memcpy(msgb_put(msg, len), data, len); + + rc = osmo_pcap_wr_file_write_msgb(conn->wrf, msg); if (rc < 0) { LOGP(DSERVER, LOGL_ERROR, "%s: Failed writing to file\n", conn->name); + msgb_free(msg); return -1; } update_last_write(conn, now); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39367?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Change-Id: I098a9455a2a4cc626444e6fc13aa88c4cc9694f0 Gerrit-Change-Number: 39367 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmocore[master]: osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE
by pespin 17 Jan '25

17 Jan '25
Attention is currently required from: daniel, jolly, laforge. Hello Jenkins Builder, daniel, jolly, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/39363?usp=email to look at the new patch set (#3). Change subject: osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE ...................................................................... osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE Trying to use IORING_OP_SENDMSG on local files fails with "Socket operation on non-socket" errors. Change-Id: Iefcbc7d09f429f4ecc611227cb5ef796f50c0539 --- M src/core/osmo_io_poll.c M src/core/osmo_io_uring.c M tests/osmo_io/osmo_io_test.c M tests/osmo_io/osmo_io_test.ok 4 files changed, 136 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/63/39363/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39363?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iefcbc7d09f429f4ecc611227cb5ef796f50c0539 Gerrit-Change-Number: 39363 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
1 0
0 0
[M] Change in libosmocore[master]: osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE
by pespin 17 Jan '25

17 Jan '25
Attention is currently required from: daniel, jolly, laforge. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmocore/+/39363?usp=email ) Change subject: osmo_io: Support writing to files with mode OSMO_IO_FD_MODE_READ_WRITE ...................................................................... Patch Set 2: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39363?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iefcbc7d09f429f4ecc611227cb5ef796f50c0539 Gerrit-Change-Number: 39363 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Fri, 17 Jan 2025 15:45:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • ...
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.