The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Breno Leitao <leitao@debian.org>
To: 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 09:28:42 -0700	[thread overview]
Message-ID: <aiwyvEbSHLHKNXBk@gmail.com> (raw)
In-Reply-To: <willemdebruijn.kernel.26a37316bb5e2@gmail.com>

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.

      reply	other threads:[~2026-06-12 16:29 UTC|newest]

Thread overview: 5+ 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 [this message]

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=aiwyvEbSHLHKNXBk@gmail.com \
    --to=leitao@debian.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.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 \
    --cc=willemdebruijn.kernel@gmail.com \
    /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