Re: [PATCH bpf-next v3 2/7] net: export inet_lookup_reuseport and inet6_lookup_reuseport

From: Daniel Borkmann
Date: Tue Jun 27 2023 - 06:23:10 EST


On 6/27/23 10:56 AM, Lorenz Bauer wrote:
On Mon, Jun 26, 2023 at 6:33 PM Kuniyuki Iwashima <kuniyu@xxxxxxxxxx> wrote:

From: Lorenz Bauer <lmb@xxxxxxxxxxxxx>
Date: Mon, 26 Jun 2023 16:08:59 +0100
Rename the existing reuseport helpers for IPv4 and IPv6 so that they
can be invoked in the follow up commit. Export them so that DCCP which
may be built as a module can access them.

We need not export the functions unless there is a real user.

I added a deprecation notice for DCCP recently, so I bet DCCP
will not get SO_REUSEPORT support.
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=b144fcaf46d4

Misleading commit message, it turns out that ipv6 as a module also
needs (the v6 functions at least) to be EXPORT_SYMBOL'd. That's
because of some special shenanigans where inet6_hashtables.c is linked
into vmlinux even when CONFIG_IPV6=m.

Also not sure how to work around this: DCCP may be deprecated but
without the export a module build of it fails.

If it breaks the build, then we need to export it.