Changes of Revision 270

libosmocore.spec Changed
x
 
1
@@ -14,13 +14,13 @@
2
 
3
 Name:           libosmocore
4
 Requires: osmocom-master
5
-Version: 1.9.0.67.be3c3
6
+Version: 1.9.0.68.846118
7
 Release:        0
8
 Summary:        The Open Source Mobile Communications Core Library
9
 License:        GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later
10
 Group:          Productivity/Telephony/Utilities
11
 Url:            https://osmocom.org/projects/libosmocore/wiki/Libosmocore
12
-Source: libosmocore_1.9.0.67.be3c3.tar.xz
13
+Source: libosmocore_1.9.0.68.846118.tar.xz
14
 Source1: rpmlintrc
15
 BuildRequires:  automake >= 1.6
16
 BuildRequires:  libtool >= 2
17
commit_84611881c9285915724da4933edeb4b0dcd1bb1d.txt Added
commit_be3c38ca5579c68fd8faccafd01883125fd3e818.txt Deleted
libosmocore_1.9.0.67.be3c3.dsc -> libosmocore_1.9.0.68.846118.dsc Changed
22
 
1
@@ -2,7 +2,7 @@
2
 Source: libosmocore
3
 Binary: libosmocore, libosmocodec4, libosmocodec-doc, libosmocoding0, libosmocoding-doc, libosmocore21, libosmocore-doc, libosmogb14, libosmogb-doc, libosmogsm20, libosmogsm-doc, libosmoisdn0, libosmoisdn-doc, libosmovty13, libosmovty-doc, libosmoctrl0, libosmoctrl-doc, libosmosim2, libosmosim-doc, libosmousb0, libosmousb-doc, libosmocore-dev, libosmocore-utils, libosmocore-dbg
4
 Architecture: any all
5
-Version: 1.9.0.67.be3c3
6
+Version: 1.9.0.68.846118
7
 Maintainer: Osmocom team <openbsc@lists.osmocom.org>
8
 Homepage: https://projects.osmocom.org/projects/libosmocore
9
 Standards-Version: 3.9.8
10
@@ -35,8 +35,8 @@
11
  libosmovty-doc deb doc optional arch=all
12
  libosmovty13 deb libs optional arch=any
13
 Checksums-Sha1:
14
- 6788591f705ebb450d5ce3c9175dc1463713c2ea 1085304 libosmocore_1.9.0.67.be3c3.tar.xz
15
+ d2a15a5887252b0b6c63907ab3defc31b60f3f00 1085248 libosmocore_1.9.0.68.846118.tar.xz
16
 Checksums-Sha256:
17
- e6a8b06f4cff07a392b07c627396d9b8b11a38361091b65a8ee7539173b0edc6 1085304 libosmocore_1.9.0.67.be3c3.tar.xz
18
+ f97f025e2b2a1c545e36634f5432d54641390cf28b2798529dda6d9804f23099 1085248 libosmocore_1.9.0.68.846118.tar.xz
19
 Files:
20
- fbb7553030d246c128fc480f2577ed4d 1085304 libosmocore_1.9.0.67.be3c3.tar.xz
21
+ 138f5ad9517edc0c8ac8c1b7794f088c 1085248 libosmocore_1.9.0.68.846118.tar.xz
22
libosmocore_1.9.0.67.be3c3.tar.xz/.tarball-version -> libosmocore_1.9.0.68.846118.tar.xz/.tarball-version Changed
4
 
1
@@ -1 +1 @@
2
-1.9.0.67-be3c3
3
+1.9.0.68-846118
4
libosmocore_1.9.0.67.be3c3.tar.xz/debian/changelog -> libosmocore_1.9.0.68.846118.tar.xz/debian/changelog Changed
12
 
1
@@ -1,8 +1,8 @@
2
-libosmocore (1.9.0.67.be3c3) unstable; urgency=medium
3
+libosmocore (1.9.0.68.846118) unstable; urgency=medium
4
 
5
   * Automatically generated changelog entry for building the Osmocom master feed
6
 
7
- -- Osmocom OBS scripts <info@osmocom.org>  Wed, 29 Nov 2023 14:43:00 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org>  Sun, 03 Dec 2023 02:18:19 +0000
9
 
10
 libosmocore (1.9.0) unstable; urgency=medium
11
 
12
libosmocore_1.9.0.67.be3c3.tar.xz/src/core/osmo_io.c -> libosmocore_1.9.0.68.846118.tar.xz/src/core/osmo_io.c Changed
48
 
1
@@ -344,6 +344,46 @@
2
    }
3
 }
4
 
5
+/*! completion handler: Calld by osmo_io backend after a given I/O operation has completed
6
+ *  \paramin iofd I/O file-descriptor on which I/O has completed
7
+ *  \paramin rc return value of the I/O operation
8
+ *  \paramin msghdr serialized msghdr containing state of completed I/O
9
+ */
10
+void iofd_handle_send_completion(struct osmo_io_fd *iofd, int rc, struct iofd_msghdr *msghdr)
11
+{
12
+   struct msgb *msg = msghdr->msg;
13
+
14
+   /* Incomplete write */
15
+   if (rc > 0 && rc < msgb_length(msg)) {
16
+       /* Re-enqueue remaining data */
17
+       msgb_pull(msg, rc);
18
+       msghdr->iov0.iov_len = msgb_length(msg);
19
+       iofd_txqueue_enqueue_front(iofd, msghdr);
20
+       return;
21
+   }
22
+
23
+   /* Reenqueue the complete msgb */
24
+   if (rc == -EAGAIN) {
25
+       iofd_txqueue_enqueue_front(iofd, msghdr);
26
+       return;
27
+   }
28
+
29
+   /* All other failure and success cases are handled here */
30
+   switch (msghdr->action) {
31
+   case IOFD_ACT_WRITE:
32
+       iofd->io_ops.write_cb(iofd, rc, msg);
33
+       break;
34
+   case IOFD_ACT_SENDTO:
35
+       iofd->io_ops.sendto_cb(iofd, rc, msg, &msghdr->osa);
36
+       break;
37
+   default:
38
+       OSMO_ASSERT(0);
39
+   }
40
+
41
+   msgb_free(msghdr->msg);
42
+   iofd_msghdr_free(msghdr);
43
+}
44
+
45
 /* Public functions */
46
 
47
 /*! Send a message through a connected socket.
48
libosmocore_1.9.0.67.be3c3.tar.xz/src/core/osmo_io_internal.h -> libosmocore_1.9.0.68.846118.tar.xz/src/core/osmo_io_internal.h Changed
9
 
1
@@ -146,6 +146,7 @@
2
 struct msgb *iofd_msgb_pending_or_alloc(struct osmo_io_fd *iofd);
3
 
4
 void iofd_handle_recv(struct osmo_io_fd *iofd, struct msgb *msg, int rc, struct iofd_msghdr *msghdr);
5
+void iofd_handle_send_completion(struct osmo_io_fd *iofd, int rc, struct iofd_msghdr *msghdr);
6
 void iofd_handle_segmented_read(struct osmo_io_fd *iofd, struct msgb *msg, int rc);
7
 
8
 int iofd_txqueue_enqueue(struct osmo_io_fd *iofd, struct iofd_msghdr *msghdr);
9
libosmocore_1.9.0.67.be3c3.tar.xz/src/core/osmo_io_poll.c -> libosmocore_1.9.0.68.846118.tar.xz/src/core/osmo_io_poll.c Changed
36
 
1
@@ -78,33 +78,8 @@
2
    if (what & OSMO_FD_WRITE) {
3
        struct iofd_msghdr *msghdr = iofd_txqueue_dequeue(iofd);
4
        if (msghdr) {
5
-           msg = msghdr->msg;
6
-
7
            rc = sendmsg(ofd->fd, &msghdr->hdr, msghdr->flags);
8
-           if (rc > 0 && rc < msgb_length(msg)) {
9
-               msgb_pull(msg, rc);
10
-               iofd_txqueue_enqueue_front(iofd, msghdr);
11
-               return;
12
-           }
13
-           if (rc == -EAGAIN) {
14
-               iofd_txqueue_enqueue_front(iofd, msghdr);
15
-               return;
16
-           }
17
-
18
-           switch (iofd->mode) {
19
-           case OSMO_IO_FD_MODE_READ_WRITE:
20
-               iofd->io_ops.write_cb(iofd, rc, msg);
21
-               break;
22
-           case OSMO_IO_FD_MODE_RECVFROM_SENDTO:
23
-               iofd->io_ops.sendto_cb(iofd, rc, msg, &msghdr->osa);
24
-               break;
25
-           case OSMO_IO_FD_MODE_SCTP_RECVMSG_SEND:
26
-               OSMO_ASSERT(false);
27
-               break;
28
-           }
29
-
30
-           talloc_free(msghdr);
31
-           msgb_free(msg);
32
+           iofd_handle_send_completion(iofd, rc, msghdr);
33
        } else {
34
            if (iofd->mode == OSMO_IO_FD_MODE_READ_WRITE)
35
                /* Socket is writable, but we have no data to send. A non-blocking/async
36
libosmocore_1.9.0.67.be3c3.tar.xz/src/core/osmo_io_uring.c -> libosmocore_1.9.0.68.846118.tar.xz/src/core/osmo_io_uring.c Changed
50
 
1
@@ -186,43 +186,14 @@
2
 static void iofd_uring_handle_tx(struct iofd_msghdr *msghdr, int rc)
3
 {
4
    struct osmo_io_fd *iofd = msghdr->iofd;
5
-   struct msgb *msg = msghdr->msg;
6
 
7
-   if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
8
-       goto out_free;
9
-
10
-   /* Error during write */
11
-   if (rc < 0) {
12
-       if (msghdr->action == IOFD_ACT_WRITE)
13
-           iofd->io_ops.write_cb(iofd, rc, msg);
14
-       else if (msghdr->action == IOFD_ACT_SENDTO)
15
-           iofd->io_ops.sendto_cb(iofd, rc, msg, &msghdr->osa);
16
-       else
17
-           OSMO_ASSERT(0);
18
-       goto out_free;
19
-   }
20
-
21
-   /* Incomplete write */
22
-   if (rc < msgb_length(msg)) {
23
-       /* Re-enqueue remaining data */
24
-       msgb_pull(msg, rc);
25
-       msghdr->iov0.iov_len = msgb_length(msg);
26
-       iofd_txqueue_enqueue_front(iofd, msghdr);
27
-       goto out;
28
+   if (OSMO_UNLIKELY(IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))) {
29
+       msgb_free(msghdr->msg);
30
+       iofd_msghdr_free(msghdr);
31
+   } else {
32
+       iofd_handle_send_completion(iofd, rc, msghdr);
33
    }
34
 
35
-   if (msghdr->action == IOFD_ACT_WRITE)
36
-       iofd->io_ops.write_cb(iofd, rc, msg);
37
-   else if (msghdr->action == IOFD_ACT_SENDTO)
38
-       iofd->io_ops.sendto_cb(iofd, rc, msg, &msghdr->osa);
39
-   else
40
-       OSMO_ASSERT(0);
41
-
42
-out_free:
43
-   msgb_free(msghdr->msg);
44
-   iofd_msghdr_free(msghdr);
45
-
46
-out:
47
    iofd->u.uring.write_msghdr = NULL;
48
    /* submit the next to-be-transmitted message for this file descriptor */
49
    if (iofd->u.uring.write_enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
50