[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAN+4W8ihqdQnZW5oWxhgmNaEDisdG9UDQYozVw_HpR41HkWL_g@mail.gmail.com>
Date: Mon, 3 Jul 2023 10:45:59 +0100
From: Lorenz Bauer <lmb@...valent.com>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: andrii@...nel.org, ast@...nel.org, bpf@...r.kernel.org,
daniel@...earbox.net, davem@...emloft.net, dsahern@...nel.org,
edumazet@...gle.com, haoluo@...gle.com, hemanthmalla@...il.com,
joe@...d.net.nz, john.fastabend@...il.com, jolsa@...nel.org,
kpsingh@...nel.org, kuba@...nel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, martin.lau@...ux.dev,
mykolal@...com, netdev@...r.kernel.org, pabeni@...hat.com,
sdf@...gle.com, shuah@...nel.org, song@...nel.org,
willemdebruijn.kernel@...il.com, yhs@...com
Subject: Re: [PATCH bpf-next v4 3/7] net: remove duplicate reuseport_lookup functions
On Wed, Jun 28, 2023 at 7:33 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
> > +
> > +inet6_ehashfn_t inet6_ehashfn;
> > +
> > +INDIRECT_CALLABLE_DECLARE(inet6_ehashfn_t udp6_ehashfn);
>
> We need not define udp6_ehashfn() here as inet6_hashtables.c has
> the definition.
>
> Only inet6_ehashfn() is needed because sk_ehashfn() uses it.
Without udp6_ehashfn we get the following error, as reported by Simon
against v1:
net/ipv4/udp.c:410:5: error: no previous prototype for ‘udp_ehashfn’
[-Werror=missing-prototypes]
410 | u32 udp_ehashfn(const struct net *net, const __be32 laddr,
const __u16 lport,
| ^~~~~~~~~~~
> > +inet_ehashfn_t inet_ehashfn;
> > +
> > +INDIRECT_CALLABLE_DECLARE(inet_ehashfn_t udp_ehashfn);
> > +
>
> We don't need inet_ehashfn() and udp_ehashfn() declarations here.
Without inet_ehashfn I get:
./include/net/inet_hashtables.h: In function ‘__inet_lookup_skb’:
./include/net/inet_hashtables.h:501:42: error: ‘inet_ehashfn’
undeclared (first use in this function); did you mean ‘inet_bhashfn’?
501 | refcounted, inet_ehashfn);
Same problem with the warning as above.
I think this needs to stay the way it is.
Powered by blists - more mailing lists