[XS] Change in libosmocore[master]: osmo_io: uring: Let iofd_msghdr_alloc() allocate msgb internally in r...
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/44140?usp=email ) Change subject: osmo_io: uring: Let iofd_msghdr_alloc() allocate msgb internally in read path ...................................................................... osmo_io: uring: Let iofd_msghdr_alloc() allocate msgb internally in read path Do it the same way as in osmo_io_poll, to have similar code paths and avoid extra code. Change-Id: I947a97ee9db8b6bb2635ae122426210f068b1a8a --- M src/core/osmo_io_uring.c 1 file changed, 1 insertion(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/44140/1 diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c index 6ae21cf..400b65b 100644 --- a/src/core/osmo_io_uring.c +++ b/src/core/osmo_io_uring.c @@ -246,7 +246,6 @@ static inline int iofd_uring_submit_recv_sqe(struct osmo_io_fd *iofd, enum iofd_msg_action action) { - struct msgb *msg; struct iofd_msghdr *msghdr; struct io_uring_sqe *sqe; uint8_t idx; @@ -260,13 +259,7 @@ OSMO_ASSERT(0); } - msg = iofd_msgb_alloc(iofd); - if (!msg) { - LOGPIO(iofd, LOGL_ERROR, "Could not allocate msgb for reading\n"); - OSMO_ASSERT(0); - } - - msghdr = iofd_msghdr_alloc(iofd, action, msg, iofd->cmsg_size); + msghdr = iofd_msghdr_alloc(iofd, action, NULL, iofd->cmsg_size); if (!msghdr) { LOGPIO(iofd, LOGL_ERROR, "Could not allocate msghdr for reading\n"); OSMO_ASSERT(0); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44140?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: I947a97ee9db8b6bb2635ae122426210f068b1a8a Gerrit-Change-Number: 44140 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de>
participants (1)
-
pespin