From: Jakub Kicinski <kuba@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Kuniyuki Iwashima <kuniyu@google.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH net-next] ipv6: add IPV6_CALL() helper
Date: Tue, 3 Mar 2026 18:45:46 -0800 [thread overview]
Message-ID: <20260303184546.6f646803@kernel.org> (raw)
In-Reply-To: <CANn89iLU9F3PKP26U_m22V6E=mpqA8LqvMfe42Xp3u5L4Q0k8g@mail.gmail.com>
On Wed, 4 Mar 2026 03:33:59 +0100 Eric Dumazet wrote:
> > > I thought if we remove IPV6=m we would delete ipv6_stub completely?
> >
> > So we will add #ifdef around helpers ?
> >
> > Lets take :
> >
> > diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
> > index 866746695712aeae425100eefb231e44d52d52d4..5de8fd283ac9b0dbc07d5851f05d15e84c3645e3
> > 100644
> > --- a/drivers/infiniband/core/addr.c
> > +++ b/drivers/infiniband/core/addr.c
> > @@ -411,7 +411,7 @@ static int addr6_resolve(struct sockaddr *src_sock,
> > fl6.saddr = src_in->sin6_addr;
> > fl6.flowi6_oif = addr->bound_dev_if;
> >
> > - dst = ipv6_stub->ipv6_dst_lookup_flow(addr->net, NULL, &fl6, NULL);
> > + dst = ip6_dst_lookup_flow(addr->net, NULL, &fl6, NULL);
> > if (IS_ERR(dst))
> > return PTR_ERR(dst);
> >
> >
> > Is the plan to define ipv6_dst_lookup_flow() differently for IPV6=y and IPV6=n ?
>
> drivers/infiniband/core/addr.c was probably not a good example because
> addr6_resolve()
> is guarded by #if IS_ENABLED(CONFIG_IPV6)
>
> But other places do not have such preprocessor clauses.
"Normally" for code which is either in or out we add static inlines, no?
#if !IS_ENABLED(CONFIG_IPV6)
static inline struct dst_entry *ip6_dst_lookup_flow(...)
{
return ERR_PTR(-EAFNOSUPPORT);
}
#else
struct dst_entry *ip6_dst_lookup_flow(...);
#endif
next prev parent reply other threads:[~2026-03-04 2:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 15:42 [PATCH net-next] ipv6: add IPV6_CALL() helper Eric Dumazet
2026-03-03 19:15 ` Kuniyuki Iwashima
2026-03-04 1:08 ` Jakub Kicinski
2026-03-04 2:13 ` Eric Dumazet
2026-03-04 2:24 ` Jakub Kicinski
2026-03-04 2:32 ` Eric Dumazet
2026-03-04 2:33 ` Eric Dumazet
2026-03-04 2:45 ` Jakub Kicinski [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-03-01 16:25 Eric Dumazet
2026-03-01 19:24 ` Jakub Kicinski
2026-03-01 19:36 ` Jakub Kicinski
2026-03-01 19:37 ` Eric Dumazet
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=20260303184546.6f646803@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuniyu@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.