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 -----
  • December
  • 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

August 2023

  • 1 participants
  • 1514 discussions
[M] Change in libosmo-netif[master]: stream: Add and use IPA send function
by pespin 07 Aug '23

07 Aug '23
Attention is currently required from: arehbein, laforge, daniel. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33201 ) Change subject: stream: Add and use IPA send function ...................................................................... Patch Set 16: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I61e1fe59166c46595efe8c1f32b8f2607cb6c529 Gerrit-Change-Number: 33201 Gerrit-PatchSet: 16 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> 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-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Mon, 07 Aug 2023 17:15:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-netif[master]: stream: Refactor sctp_recvmsg_wrapper() logging
by pespin 07 Aug '23

07 Aug '23
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/34081 ) Change subject: stream: Refactor sctp_recvmsg_wrapper() logging ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34081 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I0ed84cc2effb71b6ef1f6efb3f8b663c602a5a31 Gerrit-Change-Number: 34081 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 07 Aug 2023 17:15:01 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-netif[master]: stream_cli: Forward SCTP MSG_NOTIFICATION to upper layers
by pespin 07 Aug '23

07 Aug '23
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/34080 to look at the new patch set (#4). Change subject: stream_cli: Forward SCTP MSG_NOTIFICATION to upper layers ...................................................................... stream_cli: Forward SCTP MSG_NOTIFICATION to upper layers Same mechanism as already used in stream_srv. Change-Id: I4cb94d264109f1b763cccd44c6ba049cc7509319 --- M src/stream_cli.c 1 file changed, 52 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/80/34080/4 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34080 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I4cb94d264109f1b763cccd44c6ba049cc7509319 Gerrit-Change-Number: 34080 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-netif[master]: examples: Add extension header octet to example
by daniel 07 Aug '23

07 Aug '23
daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33202 ) ( 13 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: examples: Add extension header octet to example ...................................................................... examples: Add extension header octet to example Mainly to make data/packets look (pseudo-)correct in Wireshark. Also: Add helper for allocating message buffers with extended headroom for IPA. Change-Id: I962b9edcba65cdc98da00d2f8753dc5acd481502 --- M examples/ipa-stream-client.c M include/osmocom/netif/ipa.h M src/ipa.c 3 files changed, 23 insertions(+), 2 deletions(-) Approvals: daniel: Looks good to me, approved Jenkins Builder: Verified diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c index b66d93a..10eb786 100644 --- a/examples/ipa-stream-client.c +++ b/examples/ipa-stream-client.c @@ -74,7 +74,7 @@ char *ptr; int x; - msg = osmo_ipa_msg_alloc(0); + msg = osmo_ipa_ext_msg_alloc(0); if (msg == NULL) { LOGP(DLINP, LOGL_ERROR, "cannot alloc msg\n"); return -1; @@ -93,6 +93,7 @@ msg_sent->num = i; llist_add(&msg_sent->head, &msg_sent_list); + ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_MGCP); osmo_ipa_msg_push_header(msg, IPAC_PROTO_OSMO); osmo_stream_cli_send(conn, msg); @@ -115,7 +116,7 @@ int num; struct msg_sent *cur, *tmp, *found = NULL; - num = ntohl(*((int *)(msg->data + sizeof(struct ipa_head)))); + num = ntohl(*((int *)(msg->data + sizeof(struct ipa_head) + sizeof(struct ipa_head_ext)))); LOGP(DLINP, LOGL_DEBUG, "received msg number %d\n", num); llist_for_each_entry_safe(cur, tmp, &msg_sent_list, head) { diff --git a/include/osmocom/netif/ipa.h b/include/osmocom/netif/ipa.h index 0d1085f..7494d8d 100644 --- a/include/osmocom/netif/ipa.h +++ b/include/osmocom/netif/ipa.h @@ -19,6 +19,8 @@ } __attribute__ ((packed)); struct msgb *osmo_ipa_msg_alloc(int headroom); +struct msgb *osmo_ipa_ext_msg_alloc(size_t headroom); + void osmo_ipa_msg_push_header(struct msgb *msg, uint8_t proto); int osmo_ipa_process_msg(struct msgb *msg); diff --git a/src/ipa.c b/src/ipa.c index 197a47f..5f62e88 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -97,6 +97,11 @@ return msg; } +struct msgb *osmo_ipa_ext_msg_alloc(size_t headroom) +{ + return osmo_ipa_msg_alloc(sizeof(struct ipa_head_ext) + headroom); +} + void osmo_ipa_msg_push_header(struct msgb *msg, uint8_t proto) { struct ipa_head *hh; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33202 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I962b9edcba65cdc98da00d2f8753dc5acd481502 Gerrit-Change-Number: 33202 Gerrit-PatchSet: 14 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-netif[master]: ipa: Add segmentation callback
by daniel 07 Aug '23

07 Aug '23
daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33652 ) Change subject: ipa: Add segmentation callback ...................................................................... ipa: Add segmentation callback Related: OS#5753 Change-Id: I87ef4c7023126b783dd79e7ed47be31e1b76f975 --- M include/osmocom/netif/ipa.h M src/ipa.c 2 files changed, 86 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmocom/netif/ipa.h b/include/osmocom/netif/ipa.h index 7494d8d..1923253 100644 --- a/include/osmocom/netif/ipa.h +++ b/include/osmocom/netif/ipa.h @@ -18,6 +18,15 @@ uint8_t data[0]; } __attribute__ ((packed)); +struct osmo_ipa_msgb_cb { + uint8_t proto; + uint8_t proto_ext; +} __attribute__ ((packed)); + +#define OSMO_IPA_MSGB_CB(__msg) ((struct osmo_ipa_msgb_cb *)&((__msg)->cb[0])) +#define osmo_ipa_msgb_cb_proto(__x) OSMO_IPA_MSGB_CB(__x)->proto +#define osmo_ipa_msgb_cb_proto_ext(__x) OSMO_IPA_MSGB_CB(__x)->proto_ext + struct msgb *osmo_ipa_msg_alloc(int headroom); struct msgb *osmo_ipa_ext_msg_alloc(size_t headroom); @@ -42,4 +51,6 @@ int osmo_ipa_parse_msg_id_resp(struct msgb *msg, struct ipaccess_unit *unit_data); +int osmo_ipa_segmentation_cb(struct msgb *msg); + #endif diff --git a/src/ipa.c b/src/ipa.c index 5f62e88..a67521f 100644 --- a/src/ipa.c +++ b/src/ipa.c @@ -371,3 +371,68 @@ return 0; } + +#define MSG_CB_IPA_INFO_OFFSET 0 + +/* Check and remove headers (in case of p == IPAC_PROTO_OSMO, also the IPA extension header). + * Returns a negative number on error, otherwise the number of octets removed */ +static inline int ipa_check_pull_headers(struct msgb *msg) +{ + int ret; + size_t octets_removed = 0; + msg->l1h = msg->data; + struct ipa_head *ih = (struct ipa_head *)msg->data; + osmo_ipa_msgb_cb_proto(msg) = ih->proto; + + if ((ret = osmo_ipa_process_msg(msg)) < 0) { + LOGP(DLINP, LOGL_ERROR, "Error processing IPA message\n"); + return -EIO; + } + msgb_pull(msg, sizeof(struct ipa_head)); + octets_removed += sizeof(struct ipa_head); + msg->l2h = msg->data; + if (ih->proto != IPAC_PROTO_OSMO) + return octets_removed; + + osmo_ipa_msgb_cb_proto_ext(msg) = msg->data[0]; + msgb_pull(msg, sizeof(struct ipa_head_ext)); + octets_removed += sizeof(struct ipa_head_ext); + return octets_removed; +} + +/*! Segmentation callback used by libosmo-netif streaming backend + * See definition of `struct osmo_io_ops` for callback semantics + * \param[out] msg Original `struct msgb` received via osmo_io + * \returns The total packet length indicated by the first header, + * otherwise negative number on error. Constants: + * -EAGAIN, if the header has not been read yet, + * -ENOBUFS, if the header declares a payload too large + */ +int osmo_ipa_segmentation_cb(struct msgb *msg) +{ + const struct ipa_head *hh = (const struct ipa_head *) msg->data; + size_t payload_len, total_len; + size_t available = msgb_length(msg) + msgb_tailroom(msg); + int removed_octets = 0; + + if (msgb_length(msg) < sizeof(*hh)) { + /* Haven't even read the entire header */ + return -EAGAIN; + } + payload_len = osmo_ntohs(hh->len); + total_len = sizeof(*hh) + payload_len; + if (OSMO_UNLIKELY(available < total_len)) { + LOGP(DLINP, LOGL_ERROR, "Not enough space left in message buffer. " + "Have %zu octets, but need %zu\n", + available, total_len); + return -ENOBUFS; + } + if (total_len <= msgb_length(msg)) { + removed_octets = ipa_check_pull_headers(msg); + if (removed_octets < 0) { + LOGP(DLINP, LOGL_ERROR, "Error pulling IPA headers\n"); + return removed_octets; + } + } + return total_len; +} -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33652 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I87ef4c7023126b783dd79e7ed47be31e1b76f975 Gerrit-Change-Number: 33652 Gerrit-PatchSet: 6 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-netif[master]: stream: Add and use IPA send function
by daniel 07 Aug '23

07 Aug '23
Attention is currently required from: arehbein, laforge, pespin, daniel. daniel has uploaded a new patch set (#16) to the change originally created by arehbein. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33201 ) Change subject: stream: Add and use IPA send function ...................................................................... stream: Add and use IPA send function Related OS#5753, OS#5751 Change-Id: I61e1fe59166c46595efe8c1f32b8f2607cb6c529 --- M examples/ipa-stream-client.c M examples/ipa-stream-server.c M include/osmocom/netif/ipa.h M src/ipa.c M tests/stream/stream_test.c 5 files changed, 68 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/01/33201/16 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33201 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I61e1fe59166c46595efe8c1f32b8f2607cb6c529 Gerrit-Change-Number: 33201 Gerrit-PatchSet: 16 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> 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-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-netif[master]: stream: Append data to current tail of message upon recv()
by pespin 07 Aug '23

07 Aug '23
Attention is currently required from: pespin. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/34074 to look at the new patch set (#2). Change subject: stream: Append data to current tail of message upon recv() ...................................................................... stream: Append data to current tail of message upon recv() The previous behavior was not standarized, and even erratic under some code paths (passing msgb_data() and size=msgb_tailroom()). This patch standarizes the behavior, and makes it possible to append content if the user wishes so instead of erasing old data in the msgb passed to it. Change-Id: I2cfcd4f61545e6a76d84495c3467999efccf22df --- M src/stream_cli.c M src/stream_srv.c 2 files changed, 21 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/74/34074/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I2cfcd4f61545e6a76d84495c3467999efccf22df Gerrit-Change-Number: 34074 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-netif[master]: stream_srv: call setsockopt(SO_NOSIGPIPE) also in srv sockets
by pespin 07 Aug '23

07 Aug '23
Attention is currently required from: pespin. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/34072 to look at the new patch set (#2). Change subject: stream_srv: call setsockopt(SO_NOSIGPIPE) also in srv sockets ...................................................................... stream_srv: call setsockopt(SO_NOSIGPIPE) also in srv sockets Commit 5b0ad8bd851e4ce888b386be68c1821e4f2ca301 added call to setsockopt(SO_NOSIGPIPE) in order to avoid SIGPIPE being signalled on platforms not supporting send() flag MSG_NOSIGNAL (macOS, FreeBSD etc...). While it may be a topic to discuss whether we support those platorms or not, the fact that we call an extra setsockopt() during socket creation doesn't hurt much, and for sure we want to have the same behavior in client and server. Hence, this commit adds the same behavior pesent in srv sockets to cli ones. Change-Id: I867d8e244e473679abb7e7e7a9b531eeed046436 --- M src/stream_cli.c M src/stream_srv.c 2 files changed, 38 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/72/34072/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34072 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I867d8e244e473679abb7e7e7a9b531eeed046436 Gerrit-Change-Number: 34072 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-netif[master]: stream_srv: Improve logging lines accepting new connections
by pespin 07 Aug '23

07 Aug '23
Attention is currently required from: pespin. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/34073 to look at the new patch set (#2). Change subject: stream_srv: Improve logging lines accepting new connections ...................................................................... stream_srv: Improve logging lines accepting new connections Change-Id: Iaca9a99417d2f1dbf449e2b20e5dfcdd5e05b683 --- M src/stream_srv.c M tests/stream/stream_test.err 2 files changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/73/34073/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34073 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Iaca9a99417d2f1dbf449e2b20e5dfcdd5e05b683 Gerrit-Change-Number: 34073 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-netif[master]: stream_srv: Handle ESHUTDOWN and other write() errors destroying the ...
by pespin 07 Aug '23

07 Aug '23
Attention is currently required from: pespin. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-netif/+/34078 to look at the new patch set (#3). Change subject: stream_srv: Handle ESHUTDOWN and other write() errors destroying the socket ...................................................................... stream_srv: Handle ESHUTDOWN and other write() errors destroying the socket If internal send() fails with a fatal error, it should destroy the socket. The user will know about the event through the close_cb() called during osmo_stream_srv_destroy(). As a result, the socket is not closed when receiving SHUTDOWN by the peer (through SCTP MSG_NOTIFICATION), but keep it alive since the socket can still keep receiving data from the peer. Only fail if write() to that read-only socket is attempted. Related: OS#6134 Change-Id: I84ddebabdffe47733cb529bcfebec8757e6a172b --- M src/stream_srv.c 1 file changed, 34 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/78/34078/3 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/34078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I84ddebabdffe47733cb529bcfebec8757e6a172b Gerrit-Change-Number: 34078 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • ...
  • 152
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.