From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F36C7C433FE for ; Fri, 21 Oct 2022 10:27:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229841AbiJUK1d (ORCPT ); Fri, 21 Oct 2022 06:27:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbiJUK1c (ORCPT ); Fri, 21 Oct 2022 06:27:32 -0400 Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::2:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 480B62565E7; Fri, 21 Oct 2022 03:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42; h=From:Cc:To:Date:Message-ID; bh=Kb4GP8DAreI8S/J2byURlpp2EiVOpoaHEyYyicfid1k=; b=x8JWXsOk6ysRahrcxdiURaVS1r Ey8DuVmvMmjASeaACCgc2rw5D0aR44ta/gOGzOJ3KIlCXItcniqz6/dh4eGsiG7grMDt/ivw2ryOM qn4LgewJHPlC409JS+FUseSPtLuRfOTJpxpxIpUBGLCcqGmvnkHztsS6RyGCDY9CJTKmFr9XQMPsw xIfEzWIDhwh1unV5pCZ93trTJfd+X15AYmNY9cG0+2PmgAK7SdgUyO23r5gtBL5/WbloXZpGCHoC2 b1MNgKasCO3x9ZIBuT5n8JMbmZljLedNT0QujXurTuLkq0QEMx8Xj+C8cuh8aIUmVUVQy8v8lpa88 wr8Z68uxMtBQe0bDxrgQaeQDvqf77nJSTE7boRmd1LHbG5kVpLqf2p2DjKg40Ui934zS4Cyv5SJYF 8vkhWT9ub8/p1s3kMnFejqwfcic96QG5JLAaIXK/av8+NT+26AKC3fH9NfHdlpbCqU+9iOkFvUsSW pIsclVDNynyzXn55KogYSuzc; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__ECDSA_SECP256R1_SHA256__CHACHA20_POLY1305:256) (Exim) id 1olpFQ-00591t-CC; Fri, 21 Oct 2022 10:27:28 +0000 Message-ID: Date: Fri, 21 Oct 2022 12:27:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US To: Pavel Begunkov , Jens Axboe , Jakub Kicinski , Paolo Abeni , "David S . Miller" Cc: io-uring@vger.kernel.org, netdev@vger.kernel.org References: From: Stefan Metzmacher Subject: Re: [PATCH for-6.1 0/3] fail io_uring zc with sockets not supporting it In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org 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 have a 2nd flag that can indicate support for SO_ZEROCOPY in sk_setsockopt() The SO_ZEROCOPY version is also provided by AF_RDS. metze