From: Jens Axboe <[email protected]>
To: Josef <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: SQPOLL question
Date: Sun, 6 Sep 2020 09:49:26 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAss7+p8iVOsP8Z7Yn2691-NU-OGrsvYd6VY9UM6qOgNwNF_1Q@mail.gmail.com>
On 9/6/20 9:44 AM, Josef wrote:
> Hi,
>
> I'm trying to implement SQPOLL in netty at the moment, basically the
> fd are registered by io_uring_register(2), which returns 0, but the
> write event seems to fail with bad file descriptor error(-9) when
> SQPOLL flag is enabled
>
>
> small example to reproduce it:
> https://gist.github.com/1Jo1/171790d549134b5b81ee51b23fb15cd0
>
> what exactly am I doing wrong here? :)
You're using the 'fd' as the file descriptor, for registered files
you want to use the index instead. Since it's the only fd you
registered, the index would be 0 and that's what you should use.
It's worth mentioning that for 5.10 and on, SQPOLL will no longer
require registered files.
--
Jens Axboe
next prev parent reply other threads:[~2020-09-06 15:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-06 15:44 SQPOLL question Josef
2020-09-06 15:49 ` Jens Axboe [this message]
2020-09-06 16:24 ` Josef
2020-09-06 16:25 ` Jens Axboe
2020-09-07 10:23 ` Josef
2020-09-07 12:49 ` Jens Axboe
2020-09-07 14:58 ` Josef
2020-09-07 15:51 ` Jens Axboe
2020-09-08 6:47 ` Josef
2020-09-08 14:36 ` Jens Axboe
2020-09-08 14:57 ` Jens Axboe
2020-09-08 17:42 ` Josef
2020-09-08 17:46 ` Jens Axboe
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] \
/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