io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: Stefan Metzmacher <metze@samba.org>, Jens Axboe <axboe@kernel.dk>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: io-uring@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH for-6.1 0/3] fail io_uring zc with sockets not supporting it
Date: Fri, 21 Oct 2022 11:42:07 +0100	[thread overview]
Message-ID: <114a0ef7-325d-61c7-dc47-3ecd575fd2bf@gmail.com> (raw)
In-Reply-To: <d4d6f627-46cc-8176-6d52-c93219db8c2f@samba.org>

On 10/21/22 11:27, Stefan Metzmacher wrote:
> Hi Pavel,
> 
>> Some sockets don't care about msghdr::ubuf_info and would execute the
>> request by copying data. Such fallback behaviour was always a pain in
>> my experience, so we'd rather want to fail such requests and have a more
>> robust api in the future.
>>
>> Mark struct socket that support it with a new SOCK_SUPPORT_ZC flag.
>> I'm not entirely sure it's the best place for the flag but at least
>> we don't have to do a bunch of extra dereferences in the hot path.
> 
> I'd give the flag another name that indicates msg_ubuf and

Could be renamed, e.g. SOCK_SUPPORT_MSGHDR_UBUF or maybe
SOCK_SUPPORT_EXTERNAL_UBUF

> have a 2nd flag that can indicate support for SO_ZEROCOPY in sk_setsockopt()

There is absolutely no reason to introduce a second flag here, it has
nothing to do with SO_ZEROCOPY.

> The SO_ZEROCOPY version is also provided by AF_RDS.

-- 
Pavel Begunkov

  reply	other threads:[~2022-10-21 10:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 10:16 [PATCH for-6.1 0/3] fail io_uring zc with sockets not supporting it Pavel Begunkov
2022-10-21 10:16 ` [PATCH for-6.1 1/3] net: flag sockets supporting msghdr originated zerocopy Pavel Begunkov
2022-10-21 16:14   ` Jakub Kicinski
2022-10-22 15:57     ` Pavel Begunkov
2022-10-22 16:07       ` Jens Axboe
2022-10-24 12:49         ` Stefan Metzmacher
2022-10-24 14:12           ` Stefan Metzmacher
2022-10-24 17:00             ` Pavel Begunkov
2022-10-24 17:45               ` Stefan Metzmacher
2022-10-21 10:16 ` [PATCH for-6.1 2/3] io_uring/net: fail zc send when unsupported by socket Pavel Begunkov
2022-10-21 10:16 ` [PATCH for-6.1 3/3] io_uring/net: fail zc sendmsg " Pavel Begunkov
2022-10-21 10:27 ` [PATCH for-6.1 0/3] fail io_uring zc with sockets not supporting it Stefan Metzmacher
2022-10-21 10:42   ` Pavel Begunkov [this message]
2022-10-21 12:49     ` Stefan Metzmacher
2022-10-24 20:40 ` patchwork-bot+netdevbpf
2022-10-24 21:15   ` Jakub Kicinski

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 \
    --in-reply-to=114a0ef7-325d-61c7-dc47-3ecd575fd2bf@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=davem@davemloft.net \
    --cc=io-uring@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=metze@samba.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).