Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4034196rwo; Mon, 24 Jul 2023 22:44:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlGY7ATC6P8dC8c1GAWjRas0N/2N/K81zzum+x1A2Lcae5T0rCuDf8GCr5p+gceO5Yff540I X-Received: by 2002:aa7:cfcd:0:b0:522:1d1d:1de8 with SMTP id r13-20020aa7cfcd000000b005221d1d1de8mr6743444edy.2.1690263839766; Mon, 24 Jul 2023 22:43:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690263839; cv=none; d=google.com; s=arc-20160816; b=Fpvss/D6WHUiO15upeKFNyFZGg1TskX/2As5MrTPjWNbuzF8bATbjtK9WoLdURVBvq qaqFzBHKHCyurVTxqBjdpBFqZ5MhLxq4sMhKpY5Mqd64oHas4NZVRwBp+JjqsPIqukZO saTLpdTaKzYZM/YAope/jz/ooofopsiWE13O3TkFnzJ4yF/jMwqI/3ZQfxkH9rxu9+aP TKL43JH9tmjSXRjOtDbv2JOgOpfXn7ZI60272bOQPkMfA092nbu6NTAMkahKvwB6KALL CjYpMpBZJP4cqWcWhBmbopwf/gtDtijs/QUgi/cs9j/OAVerjTbWTNR81UVlxicI4TDN hBhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=slN3VkddcgzUfbuFllFUKbrJWrpgcQ/tBjXtWpMP4xs=; fh=RzymtbcAbrqIYjXLe64BeU2IRt75lvydN6TxkVngpsU=; b=x7dfJYXCff0QATw+VbyOo1zmmjEAnf6Nd3FqVHeQiyzCWptNrJfe+NqUclScofBlZT +PWYPWoyAqy1Z1SGfc/B0JChTawX+G63MURKFn46UdpfWTbxgqgNyUKPPjC5MUGLKWd3 7c5W2MzBxMKo3ESG8mxVGexmssHvVv+C23fQJoQN//UVR1oPUvPtwm2LQfliw6NHRGbK PxePVRPH7dR8S+HeO08Pm72ElpzWkvG87EnJFyKYq3FppnBqKBmRQOmJaJynpXuM8b/T 1rsWWGUPrHW02j4m4o52WWoN2ex0WCZxd99k88OWiNk5iarQz+l8zo3ta02LV8uUKMH7 rQQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ul69iYXk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020aa7dd09000000b005222ae088b1si3140179edv.271.2023.07.24.22.43.36; Mon, 24 Jul 2023 22:43:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ul69iYXk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229999AbjGYEmQ (ORCPT + 99 others); Tue, 25 Jul 2023 00:42:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231445AbjGYEmJ (ORCPT ); Tue, 25 Jul 2023 00:42:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BF0110EF for ; Mon, 24 Jul 2023 21:42:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CD9FF61518 for ; Tue, 25 Jul 2023 04:42:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C66BC433CC; Tue, 25 Jul 2023 04:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690260123; bh=9xmLr5/SpwYPrO0t5OmP14xdMu9QQB8l/VYyS/cO+r8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ul69iYXkJmam1GUGJy/8oyYaGKYYZqCv1IooPEqIJAPloVQuj3Rkt7/pmw8X/pL/u 9wb65jYb0pdr0t5nEni6wxFmmcsjwJEq+P6IGCohPPoRzMRny96OgqEicXxKFJm7nU HxnX0ZGs8ig7WXONybrQEMehS2VFJxDwsNw9Tqv8QReaVDgg4iaT+Q8lO8L9yAfCCo mtmjBLXslM5zmURhXe4fz2gY4klsbRgix89Dwm9m7pJYLhncabl0qVKteBaw3UOlxm L+XvCFL76dQz7P04UDQM2S9LEo1LkrD6NPmTviDPq+fHMSK77OjVx9lYzwpXmmsw4E HtB0FkF4SyXQQ== Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-4fb7589b187so7721587e87.1; Mon, 24 Jul 2023 21:42:03 -0700 (PDT) X-Gm-Message-State: ABy/qLas06e0YiMhptpW2X9WSMwAtiJHXILpFrUX2OBPj4TSEfTqD3xI BwldGqlo8WqwqaLAb/FwOD8gv00y1L5nL3AJBAQ= X-Received: by 2002:a05:6512:220f:b0:4fd:f84a:9901 with SMTP id h15-20020a056512220f00b004fdf84a9901mr3455408lfu.66.1690260121101; Mon, 24 Jul 2023 21:42:01 -0700 (PDT) MIME-Version: 1.0 References: <20230724090044.2668064-1-ilia.lin@kernel.org> <20230724181105.GD11388@unreal> In-Reply-To: <20230724181105.GD11388@unreal> From: Ilia Lin Date: Tue, 25 Jul 2023 07:41:49 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] xfrm: kconfig: Fix XFRM_OFFLOAD dependency on XFRM To: Leon Romanovsky Cc: Ilia Lin , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Leon, 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 mem= ber. * xfrm_dst_offload_ok() tries to access the dst->xfrm and that fails to com= pile. Thanks, Ilia Lin On Mon, Jul 24, 2023 at 9:11=E2=80=AFPM Leon Romanovsky w= rote: > > 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:19= 32:30: error: no member named 'xfrm' in 'struct dst_entry' > > C 05:56:39 struct xfrm_state *x =3D 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 > > Signed-off-by: Ilia Lin > > --- > > 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