From: Leon Romanovsky <leon@kernel.org>
To: Ilia Lin <ilia.lin@kernel.org>
Cc: steffen.klassert@secunet.com, herbert@gondor.apana.org.au,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, jeffrey.t.kirsher@intel.com
Subject: Re: [PATCH] xfrm: kconfig: Fix XFRM_OFFLOAD dependency on XFRM
Date: Tue, 25 Jul 2023 08:19:17 +0300 [thread overview]
Message-ID: <20230725051917.GH11388@unreal> (raw)
In-Reply-To: <CA+5LGR3ifQbn4x9ncyjJLxsFU4NRs90rVcqECJ+-UC=pP35OjA@mail.gmail.com>
On Tue, Jul 25, 2023 at 07:41:49AM +0300, Ilia Lin wrote:
> Hi Leon,
You was already asked do not top-post.
https://lore.kernel.org/netdev/20230718105446.GD8808@unreal/
Please stop it.
>
> This is exactly like I described:
> * xfrm.h is included from the net/core/sock.c unconditionally.
> * If CONFIG_XFRM_OFFLOAD is set, then the xfrm_dst_offload_ok() is
> being compiled.
> * If CONFIG_XFRM is not set, the struct dst_entry doesn't have the xfrm member.
> * xfrm_dst_offload_ok() tries to access the dst->xfrm and that fails to compile.
I asked two questions. First one was "How did you set XFRM_OFFLOAD
without XFRM?".
Thanks
>
>
> Thanks,
> Ilia Lin
>
> On Mon, Jul 24, 2023 at 9:11 PM Leon Romanovsky <leon@kernel.org> wrote:
> >
> > On Mon, Jul 24, 2023 at 12:00:44PM +0300, Ilia Lin wrote:
> > > If XFRM_OFFLOAD is configured, but XFRM is not
> >
> > How did you do it?
> >
> > >, it will cause
> > > compilation error on include xfrm.h:
> > > C 05:56:39 In file included from /src/linux/kernel_platform/msm-kernel/net/core/sock.c:127:
> > > C 05:56:39 /src/linux/kernel_platform/msm-kernel/include/net/xfrm.h:1932:30: error: no member named 'xfrm' in 'struct dst_entry'
> > > C 05:56:39 struct xfrm_state *x = dst->xfrm;
> > > C 05:56:39 ~~~ ^
> > >
> > > Making the XFRM_OFFLOAD select the XFRM.
> > >
> > > Fixes: 48e01e001da31 ("ixgbe/ixgbevf: fix XFRM_ALGO dependency")
> > > Reported-by: Ilia Lin <ilia.lin@kernel.org>
> > > Signed-off-by: Ilia Lin <ilia.lin@kernel.org>
> > > ---
> > > net/xfrm/Kconfig | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig
> > > index 3adf31a83a79a..3fc2c1bcb5bbe 100644
> > > --- a/net/xfrm/Kconfig
> > > +++ b/net/xfrm/Kconfig
> > > @@ -10,6 +10,7 @@ config XFRM
> > >
> > > config XFRM_OFFLOAD
> > > bool
> > > + select XFRM
> >
> > struct dst_entry depends on CONFIG_XFRM and not on CONFIG_XFRM_OFFLOAD,
> > so it is unclear to me why do you need to add new "select XFRM" line.
> >
> > 26 struct dst_entry {
> > 27 struct net_device *dev;
> > 28 struct dst_ops *ops;
> > 29 unsigned long _metrics;
> > 30 unsigned long expires;
> > 31 #ifdef CONFIG_XFRM
> > 32 struct xfrm_state *xfrm;
> > 33 #else
> > 34 void *__pad1;
> > 35 #endif
> > 36 int
> >
> > Thanks
next prev parent reply other threads:[~2023-07-25 5:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 9:00 [PATCH] xfrm: kconfig: Fix XFRM_OFFLOAD dependency on XFRM Ilia Lin
2023-07-24 18:11 ` Leon Romanovsky
2023-07-25 4:41 ` Ilia Lin
2023-07-25 5:19 ` Leon Romanovsky [this message]
2023-07-25 9:11 ` Ilia Lin
2023-07-25 9:38 ` Leon Romanovsky
2023-07-25 10:15 ` Ilia Lin
2023-07-25 10:27 ` Leon Romanovsky
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=20230725051917.GH11388@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=ilia.lin@kernel.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=steffen.klassert@secunet.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.