Re: (subset) [PATCH v1 0/2] io_uring uapi updates

From: Pavel Begunkov
Date: Wed Nov 16 2022 - 15:32:52 EST


On 11/16/22 20:03, Stefan Metzmacher wrote:
Am 16.11.22 um 20:46 schrieb Jens Axboe:
On 11/16/22 7:22 AM, Stefan Metzmacher wrote:
Am 16.11.22 um 14:50 schrieb Jens Axboe:
On 11/15/22 11:34 PM, Ammar Faizi wrote:
On 11/16/22 6:14 AM, Jens Axboe wrote:
On Wed, 16 Nov 2022 04:29:51 +0700, Ammar Faizi wrote:
From: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx>

Hi Jens,

io_uring uapi updates:

1) Don't force linux/time_types.h for userspace. Linux's io_uring.h is
???? synced 1:1 into liburing's io_uring.h. liburing has a configure
???? check to detect the need for linux/time_types.h (Stefan).

[...]

Applied, thanks!

[1/2] io_uring: uapi: Don't force linux/time_types.h for userspace
??????? commit: 958bfdd734b6074ba88ee3abc69d0053e26b7b9c

Jens, please drop this commit. It breaks the build:

Dropped - please actually build your patches, or make it clear that
they were not built at all. None of these 2 patches were any good.

Is it tools/testing/selftests/net/io_uring_zerocopy_tx.c that doesn't build?

Honestly not sure, but saw a few reports come in. Here's the one from
linux-next:

https://lore.kernel.org/all/20221116123556.79a7bbd8@xxxxxxxxxxxxxxxx/

Yes, but the output is pretty useless as it doesn't show what
.c file and what command is failing.

and needs a '#define HAVE_LINUX_TIME_TYPES_H 1'

Just guessing, but adding this into the commit has a chance to work...

--- a/tools/testing/selftests/net/io_uring_zerocopy_tx.c
+++ b/tools/testing/selftests/net/io_uring_zerocopy_tx.c
@@ -15,6 +15,7 @@
 #include <arpa/inet.h>
 #include <linux/errqueue.h>
 #include <linux/if_packet.h>
+#define HAVE_LINUX_TIME_TYPES_H 1
 #include <linux/io_uring.h>
 #include <linux/ipv6.h>
 #include <linux/socket.h>

BTW, the original commit I posted was here:
https://lore.kernel.org/io-uring/c7782923deeb4016f2ac2334bc558921e8d91a67.1666605446.git.metze@xxxxxxxxx/

What's the magic to compile tools/testing/selftests/net/io_uring_zerocopy_tx.c ?

Some variant of make kselftests-foo?

My naive tries both fail (even without my patch):

Mine does too, in various other tests. Stephen?

Pavel, as you created that file, do you remember how you build it?

make headers_install
make -C tools/testing/selftests/net/


IIRC, it uses system uapi headers and apparently yours don't have
IORING_CQE_F_NOTIF, etc. And I don't think it uses the right Makefile,
so -C executes it from the selftest/net folder.

--
Pavel Begunkov