Netdev List
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Breno Leitao <leitao@debian.org>,
	 Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	 Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>,
	 Simon Horman <horms@kernel.org>,  Shuah Khan <shuah@kernel.org>,
	 sdf.kernel@gmail.com,  netdev@vger.kernel.org,
	 linux-kernel@vger.kernel.org,  linux-kselftest@vger.kernel.org,
	 kernel-team@meta.com
Subject: Re: [PATCH net-next 2/2] udp: convert udp_lib_getsockopt to sockopt_t
Date: Fri, 12 Jun 2026 22:13:13 -0400	[thread overview]
Message-ID: <willemdebruijn.kernel.11beaafde34f6@gmail.com> (raw)
In-Reply-To: <aiwyvEbSHLHKNXBk@gmail.com>

Breno Leitao wrote:
> Hello Willem,
> 
> On Fri, Jun 12, 2026 at 10:58:19AM -0400, Willem de Bruijn wrote:
> > Breno Leitao wrote:
> > > In preparation for converting the proto-layer getsockopt callbacks to the
> > > sockopt_t interface, switch udp_lib_getsockopt() to take a sockopt_t.
> >
> > What is the benefit of this conversion?
> 
> This enables kernel callers (io_uring, bpf, etc.) to invoke getsockopt
> directly. The setsockopt() conversion previously used sockptr, but
> Linus objected to that approach and suggested iov_iter instead.
> 
> For full context, see:
> https://lore.kernel.org/all/20260408-getsockopt-v3-0-061bb9cb355d@debian.org/
> 
> > It does add a lot more complexity and makes the code less obvious.
> 
> I agree this adds complexity. Unfortunately, I don't see a simpler way
> to enable getsockopt to work with non-__user addresses.

Oh right, this is already applied for other protocols such as l2tp_ppp
rds and smc.


  reply	other threads:[~2026-06-13  2:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 11:45 [PATCH net-next 0/2] net: convert UDP getsockopt to sockopt_t Breno Leitao
2026-06-12 11:45 ` [PATCH net-next 1/2] net: add sockopt_init_user() for getsockopt conversion Breno Leitao
2026-06-12 11:45 ` [PATCH net-next 2/2] udp: convert udp_lib_getsockopt to sockopt_t Breno Leitao
2026-06-12 14:58   ` Willem de Bruijn
2026-06-12 16:28     ` Breno Leitao
2026-06-13  2:13       ` Willem de Bruijn [this message]
2026-06-13  2:10   ` Stanislav Fomichev

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=willemdebruijn.kernel.11beaafde34f6@gmail.com \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf.kernel@gmail.com \
    --cc=shuah@kernel.org \
    /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