From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54458168A4; Fri, 30 Jun 2023 16:10:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A10FFC433C8; Fri, 30 Jun 2023 16:10:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688141446; bh=65l3uxIkPZ2teqmqxsQP31N9JJV0zpume1JU++/LnAI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dq19zYXMqF5Odo1p5GFM9j0nL2LZbW9qCerBaCPD8Oh6xhb8sATyqGZUXXM9H9unc eRT4kJN5byP86KaZkhnglG8iXD2T0YGHFmLTrQrj3hvDckwk2jEc9VSNh2t9S/gxtJ 0Dx4t8ni/nfwppvYEAAUncwVBPXcvfHU7DJrXLg3fET5wHbfrq5/jlIApbGWZ57tzU idF/ITTbqiOgio39UFgA608R07VkW9agfG8sIhl0EcPgKzi45w4hBlJ3dOUUDCHDjR kxdILhNhzz3xw0Nm/HMh5YNMZKfqYFnsjYN/yyZRKtIIckltFJimgsA/AudefjbpOn X66t6KgUID+dQ== Date: Fri, 30 Jun 2023 09:10:43 -0700 From: Nathan Chancellor To: Jakub Kicinski Cc: David Howells , Aurelien Aptel , netdev@vger.kernel.org, Alexander Duyck , "David S. Miller" , Eric Dumazet , Paolo Abeni , Willem de Bruijn , David Ahern , Matthew Wilcox , Jens Axboe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sagi Grimberg , Willem de Bruijn , Keith Busch , Jens Axboe , Christoph Hellwig , Chaitanya Kulkarni , linux-nvme@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [PATCH net-next v3 10/18] nvme/host: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage Message-ID: <20230630161043.GA2902645@dev-arch.thelio-3990X> References: <253mt0il43o.fsf@mtr-vdi-124.i-did-not-set--mail-host-address--so-tickle-me> <20230620145338.1300897-1-dhowells@redhat.com> <20230620145338.1300897-11-dhowells@redhat.com> <58466.1688074499@warthog.procyon.org.uk> <20230629164318.44f45caf@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230629164318.44f45caf@kernel.org> On Thu, Jun 29, 2023 at 04:43:18PM -0700, Jakub Kicinski wrote: > On Thu, 29 Jun 2023 22:34:59 +0100 David Howells wrote: > > if (!sendpage_ok(page)) > > - msg.msg_flags &= ~MSG_SPLICE_PAGES, > > + msg.msg_flags &= ~MSG_SPLICE_PAGES; > > 😵️ > > Let me CC llvm@ in case someone's there is willing to make > the compiler warn about this. > Turns out clang already has a warning for this, -Wcomma: drivers/nvme/host/tcp.c:1017:38: error: possible misuse of comma operator here [-Werror,-Wcomma] 1017 | msg.msg_flags &= ~MSG_SPLICE_PAGES, | ^ drivers/nvme/host/tcp.c:1017:4: note: cast expression to void to silence warning 1017 | msg.msg_flags &= ~MSG_SPLICE_PAGES, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | (void)( ) 1 error generated. Let me do some wider build testing to see if it is viable to turn this on for the whole kernel because it seems worth it, at least in this case. There are a lot of cases where a warning won't be emitted (see the original upstream review for a list: https://reviews.llvm.org/D3976) but something is better than nothing, right? :) Cheers, Nathan