public inbox for [email protected]
 help / color / mirror / Atom feed
From: Breno Leitao <[email protected]>
To: Greg KH <[email protected]>
Cc: Jens Axboe <[email protected]>,
	Pavel Begunkov <[email protected]>,
	"David S. Miller" <[email protected]>,
	Eric Dumazet <[email protected]>,
	Jakub Kicinski <[email protected]>, Paolo Abeni <[email protected]>,
	"open list:IO_URING" <[email protected]>,
	open list <[email protected]>,
	"open list:NETWORKING [GENERAL]" <[email protected]>
Subject: Re: [PATCH v3] io_uring: Add io_uring command support for sockets
Date: Fri, 23 Jun 2023 08:55:48 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <2023062351-tastiness-half-034f@gregkh>

On Fri, Jun 23, 2023 at 08:39:02AM +0200, Greg KH wrote:
> On Thu, Jun 22, 2023 at 02:59:14PM -0700, Breno Leitao wrote:
> > --- a/io_uring/uring_cmd.c
> > +++ b/io_uring/uring_cmd.c
> > @@ -7,6 +7,7 @@
> >  #include <linux/nospec.h>
> >  
> >  #include <uapi/linux/io_uring.h>
> > +#include <uapi/asm-generic/ioctls.h>
> 
> Is this still needed?

Yes, this is what is providing the definitions for SIOCINQ and SIOCOUTQ.
If we don't include these headers, we get the following compilation
failure:

	In file included from ./include/linux/socket.h:7,
			 from ./include/net/af_unix.h:5,
			 from io_uring/rsrc.h:5,
			 from io_uring/uring_cmd.c:12:
	io_uring/uring_cmd.c: In function ‘io_uring_cmd_sock’:
	./include/uapi/linux/sockios.h:26:18: error: ‘FIONREAD’ undeclared (first use in this function); did you mean ‘READ’?
	 #define SIOCINQ  FIONREAD
			  ^~~~~~~~
	io_uring/uring_cmd.c:171:32: note: in expansion of macro ‘SIOCINQ’
	   ret = sk->sk_prot->ioctl(sk, SIOCINQ, &arg);
					^~~~~~~
	./include/uapi/linux/sockios.h:26:18: note: each undeclared identifier is reported only once for each function it appears in
	 #define SIOCINQ  FIONREAD
			  ^~~~~~~~
	io_uring/uring_cmd.c:171:32: note: in expansion of macro ‘SIOCINQ’
	   ret = sk->sk_prot->ioctl(sk, SIOCINQ, &arg);
					^~~~~~~
	./include/uapi/linux/sockios.h:27:18: error: ‘TIOCOUTQ’ undeclared (first use in this function); did you mean ‘SIOCOUTQ’?
	 #define SIOCOUTQ TIOCOUTQ        /* output queue size (not sent + not acked) */
			  ^~~~~~~~
	io_uring/uring_cmd.c:176:32: note: in expansion of macro ‘SIOCOUTQ’
	   ret = sk->sk_prot->ioctl(sk, SIOCOUTQ, &arg);
					^~~~~~~~
	make[2]: *** [scripts/Makefile.build:252: io_uring/uring_cmd.o] Error 1

  reply	other threads:[~2023-06-23 15:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 21:59 [PATCH v3] io_uring: Add io_uring command support for sockets Breno Leitao
2023-06-23  6:39 ` Greg KH
2023-06-23 15:55   ` Breno Leitao [this message]
2023-06-23 19:35 ` Kuniyuki Iwashima

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox