public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: "Weber, Eugene F Jr CIV (USA)" <[email protected]>,
	"[email protected]" <[email protected]>
Subject: Re: Erroneous socket connect pass?
Date: Fri, 27 May 2022 08:47:51 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <60DCCBD6DDA29F4A9EFF6DB52DEE2AB1D866F5D3@UMECHPA66.easf.csd.disa.mil>

On 5/27/22 8:29 AM, Weber, Eugene F Jr CIV (USA) wrote:
> 
> Hi,
> 
> Thanks for creating liburing. Great stuff.
> 
> I **may** have found a bug. I would expect a socket connect using
> io_uring to fail as it does using connect() if the port is not setup
> to listen. In the simple test case attached it does not. If this is
> pilot error, please let me know what I'm doing wrong, or why my
> expectation is incorrect. Version information is in the code header.
> Please let me know if any additional information is needed.

The return value of io_uring_wait_cqe and related functions isn't the
completion result. It's simply if we succeeded in waiting for one or
more events. It could never be the completion result, because consider
what happens if you have multiple requests in flight.

You need to look at cqe->res for the completion result of the request.

-- 
Jens Axboe



      reply	other threads:[~2022-05-27 14:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27 14:29 Erroneous socket connect pass? Weber, Eugene F Jr CIV (USA)
2022-05-27 14:47 ` Jens Axboe [this message]

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] \
    /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