Skip to content
Merged
25 changes: 25 additions & 0 deletions ports/folly/fix-has-include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake
index e41c128..5117a65 100644
--- a/CMake/folly-deps.cmake
+++ b/CMake/folly-deps.cmake
@@ -157,6 +157,7 @@ if(WITH_liburing)
find_package(LibUring)
list(APPEND FOLLY_LINK_LIBRARIES ${LIBURING_LIBRARIES})
list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBURING_INCLUDE_DIRS})
+ add_compile_options(-DFOLLY_WITH_LIBURING)
endif()

if(NOT CMAKE_DISABLE_FIND_PACKAGE_unofficial-sodium)
diff --git a/folly/io/async/Liburing.h b/folly/io/async/Liburing.h
index 8e81aaa..bb6060e 100644
--- a/folly/io/async/Liburing.h
+++ b/folly/io/async/Liburing.h
@@ -16,7 +16,7 @@

#pragma once

-#if defined(__linux__) && __has_include(<liburing.h>)
+#if defined(__linux__) && __has_include(<liburing.h>) && defined FOLLY_WITH_LIBURING
#define FOLLY_HAS_LIBURING 1
#else
#define FOLLY_HAS_LIBURING 0
1 change: 1 addition & 0 deletions ports/folly/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ vcpkg_from_github(
fix-unistd-include.patch
fix-libunwind.patch
fix-absolute-dir.patch
fix-has-include.patch
)

file(REMOVE "${SOURCE_PATH}/CMake/FindFastFloat.cmake")
Expand Down
1 change: 1 addition & 0 deletions ports/folly/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "folly",
"version-string": "2025.03.17.00",
"port-version": 1,
"description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows",
"homepage": "https://github.com/facebook/folly",
"license": "Apache-2.0",
Expand Down
47 changes: 47 additions & 0 deletions ports/liburing/add-basic-support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
diff --git a/src/include/liburing.h b/src/include/liburing.h
index 49b4edf..a15bc33 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -132,6 +132,16 @@ struct io_uring {
unsigned pad2;
};

+struct io_uring_zcrx_rq {
+ __u32 *khead;
+ __u32 *ktail;
+ __u32 rq_tail;
+ unsigned ring_entries;
+
+ struct io_uring_zcrx_rqe *rqes;
+ void *ring_ptr;
+ };
+
/*
* Library interface
*/
@@ -265,6 +275,8 @@ int io_uring_register_file_alloc_range(struct io_uring *ring,

int io_uring_register_napi(struct io_uring *ring, struct io_uring_napi *napi);
int io_uring_unregister_napi(struct io_uring *ring, struct io_uring_napi *napi);
+int io_uring_register_ifq(struct io_uring *ring,
+ struct io_uring_zcrx_ifq_reg *reg);

int io_uring_register_clock(struct io_uring *ring,
struct io_uring_clock_register *arg);
diff --git a/src/register.c b/src/register.c
index 0fff208..20a624c 100644
--- a/src/register.c
+++ b/src/register.c
@@ -422,6 +422,12 @@ int io_uring_clone_buffers(struct io_uring *dst, struct io_uring *src)
return io_uring_clone_buffers_offset(dst, src, 0, 0, 0, 0);
}

+int io_uring_register_ifq(struct io_uring *ring,
+ struct io_uring_zcrx_ifq_reg *reg)
+ {
+ return do_register(ring, IORING_REGISTER_ZCRX_IFQ, reg, 1);
+ }
+
int io_uring_resize_rings(struct io_uring *ring, struct io_uring_params *p)
{
unsigned sq_head, sq_tail;
17 changes: 16 additions & 1 deletion ports/liburing/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
vcpkg_download_distfile(SYNC_ZCRX_CHANGES_1
URLS https://github.com/axboe/liburing/commit/48d8d54e524a9c37e0cc52921bb41070156a597f.patch?full_index=1
SHA512 d16a6622538256c163785c0eaa89dd2ac53c5e7f1a93fc471198325628305d3d494ca3716233e666d0589d3d0a9e67708f6e8c2b46cda3bc4588fde11e091749
FILENAME liburing-sync-zcrx-changes-1.patch
)

vcpkg_download_distfile(SYNC_ZCRX_CHANGES_2
URLS https://github.com/axboe/liburing/commit/ce3a65747d43a405cc19a630d5f8a0f613293f5c.patch?full_index=1
SHA512 571d0e8cdc5334208947de750b6458277653d64235dfeae99ae130e8de61e9ababc5827232eae9db3f44743fd93dd22f1cd248ec2ea22a035dd7efd10f18b2bd
FILENAME liburing-sync-zcrx-changes-2.patch
)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO axboe/liburing
REF "liburing-${VERSION}"
SHA512 d40d041b94bb0f004bd92890988c0e4b8a7bb9ae43659790ee4b19e5417f7dc5b9a554489834769ee71edfc6a44bcd87a5fca34845f61cc80e4e8e588c6950ec
SHA512 f27233e6128444175b18cd1d45647acdd27b906a8cd561029508710e443b44416b916cad1b2c1217e23d9a5ffb5ba68b119e9c812eae406650fbd10bf26c2fa5
HEAD_REF master
PATCHES
fix-configure.patch # ignore unsupported options, handle ENABLE_SHARED
disable-tests-and-examples.patch
${SYNC_ZCRX_CHANGES_1}
${SYNC_ZCRX_CHANGES_2}
add-basic-support.patch # https://github.com/axboe/liburing/commit/d7ec4ce3421fbbdaba07426d589b72e204ac92e9
)

# https://github.com/axboe/liburing/blob/liburing-2.8/src/Makefile#L13
Expand Down
2 changes: 1 addition & 1 deletion ports/liburing/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "liburing",
"version": "2.8",
"version": "2.9",
"description": "Linux-native io_uring I/O access library",
"homepage": "https://github.com/axboe/liburing",
"license": "(MIT OR LGPL-2.1) AND (MIT OR (GPL-2.0 WITH Linux-syscall-note))",

Check notice on line 6 in ports/liburing/vcpkg.json

View workflow job for this annotation

GitHub Actions / Check

SPDX deprecated license identifier LGPL-2.1. If you feel able to do so, please consider replacing it. Updated license identifiers can be found at https://spdx.org/licenses/.

Check notice on line 6 in ports/liburing/vcpkg.json

View workflow job for this annotation

GitHub Actions / Check

SPDX deprecated license identifier GPL-2.0. If you feel able to do so, please consider replacing it. Updated license identifiers can be found at https://spdx.org/licenses/.
"supports": "linux"
}
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2886,7 +2886,7 @@
},
"folly": {
"baseline": "2025.03.17.00",
"port-version": 0
"port-version": 1
},
"font-chef": {
"baseline": "1.1.0",
Expand Down Expand Up @@ -5353,7 +5353,7 @@
"port-version": 3
},
"liburing": {
"baseline": "2.8",
"baseline": "2.9",
"port-version": 0
},
"libusb": {
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/folly.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "6724c01126e4de2d5014252336e7e23109d4c33b",
"version-string": "2025.03.17.00",
"port-version": 1
},
{
"git-tree": "a26a1419ef8f846b5e75af719187f60d35e845c7",
"version-string": "2025.03.17.00",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/liburing.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "407de8efd734478970668239ff668e47ecf69735",
"version": "2.9",
"port-version": 0
},
{
"git-tree": "d7ec4cc6b825d55cc4c5f2768d85d01398735f64",
"version": "2.8",
Expand Down