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 A7F0EC41513 for ; Tue, 8 Aug 2023 20:27:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbjHHU1y (ORCPT ); Tue, 8 Aug 2023 16:27:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233210AbjHHU1h (ORCPT ); Tue, 8 Aug 2023 16:27:37 -0400 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71E41ACB76; Tue, 8 Aug 2023 10:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:Mime-Version:Message-Id:Cc:To:From :Date:subject:date:message-id:reply-to; bh=8iItz4fAqc9eHWlkPTlOj5+qnfmys/TzLvwC/yA08jQ=; b=EMf5xQwVyzUnLtsBrpCxqvTU0F 5Cvjq4BE1nyD8fihHctOb9LNCkiIVbbjd08EoEK1TXKDdnFDKsn9oAz1HBEp4coKLnxcnYtJ+Wfp0 TXIAc6Va1L6Da8baMlf++ElczSmxomYyZDnTD64lVhCabao/gxZ50trd64IPE1ovX1GU=; Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:37588 helo=pettiford) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1qTQnA-0001gq-K0; Tue, 08 Aug 2023 13:46:49 -0400 Date: Tue, 8 Aug 2023 13:46:47 -0400 From: Hugo Villeneuve To: Breno Leitao Cc: sdf@google.com, axboe@kernel.dk, asml.silence@gmail.com, willemdebruijn.kernel@gmail.com, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, io-uring@vger.kernel.org Message-Id: <20230808134647.3e0e702f54ef5e5b4378ff98@hugovil.com> In-Reply-To: References: <20230808134049.1407498-1-leitao@debian.org> <20230808134049.1407498-2-leitao@debian.org> <20230808121323.bc144c719eba5979e161aac6@hugovil.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 184.161.19.61 X-SA-Exim-Mail-From: hugo@hugovil.com Subject: Re: [PATCH v2 1/8] net: expose sock_use_custom_sol_socket X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Tue, 8 Aug 2023 10:21:03 -0700 Breno Leitao wrote: > Hello Hugo, > > On Tue, Aug 08, 2023 at 12:13:23PM -0400, Hugo Villeneuve wrote: > > On Tue, 8 Aug 2023 06:40:41 -0700 > > Breno Leitao wrote: > > > > > Exposing function sock_use_custom_sol_socket(), so it could be used by > > > io_uring subsystem. > > > > > > This function will be used in the function io_uring_cmd_setsockopt() in > > > the coming patch, so, let's move it to the socket.h header file. > > > > Hi, > > this description doesn't seem to match the code change below... > > I re-read the patch comment and it seems to match what the code does, > so, probably this description only makes sense to me (?). > > That said, hat have you understood from reading the description above? > socket.h > Thanks for the review, Hi Breno, your comments says "move it to the socket.h header file" but it seems to be moved to the net.h header file? Hugo Villeneuve > > > --- > > > include/linux/net.h | 5 +++++ > > > net/socket.c | 5 ----- > > > 2 files changed, 5 insertions(+), 5 deletions(-) > > > > > > diff --git a/include/linux/net.h b/include/linux/net.h > > > index 41c608c1b02c..14a956e4530e 100644 > > > --- a/include/linux/net.h > > > +++ b/include/linux/net.h > > > @@ -355,4 +355,9 @@ u32 kernel_sock_ip_overhead(struct sock *sk); > > > #define MODULE_ALIAS_NET_PF_PROTO_NAME(pf, proto, name) \ > > > MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \ > > > name) > > > + > > > +static inline bool sock_use_custom_sol_socket(const struct socket *sock) > > > +{ > > > + return test_bit(SOCK_CUSTOM_SOCKOPT, &sock->flags); > > > +} > > > #endif /* _LINUX_NET_H */ > > > diff --git a/net/socket.c b/net/socket.c > > > index 1dc23f5298ba..8df54352af83 100644 > > > --- a/net/socket.c > > > +++ b/net/socket.c > > > @@ -2216,11 +2216,6 @@ SYSCALL_DEFINE4(recv, int, fd, void __user *, ubuf, size_t, size, > > > return __sys_recvfrom(fd, ubuf, size, flags, NULL, NULL); > > > } > > > > > > -static bool sock_use_custom_sol_socket(const struct socket *sock) > > > -{ > > > - return test_bit(SOCK_CUSTOM_SOCKOPT, &sock->flags); > > > -} > > > - > > > /* > > > * Set a socket option. Because we don't know the option lengths we have > > > * to pass the user mode parameter for the protocols to sort out. > > > -- > > > 2.34.1 > > >