Re: [PATCH for-6.1 0/3] fail io_uring zc with sockets not supporting it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux