Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4025419rwo; Mon, 24 Jul 2023 22:32:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlEIkNm8Dxe/FreeeG8yvYc9w2AhkjFWOjsurQwFnFa/UtqUIomPDsAvj9UZ43MFq9GTOgtf X-Received: by 2002:a81:6983:0:b0:583:b72c:883b with SMTP id e125-20020a816983000000b00583b72c883bmr7796536ywc.11.1690263124459; Mon, 24 Jul 2023 22:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690263124; cv=none; d=google.com; s=arc-20160816; b=JxZ/IuT5eNyG1eS/qGRpRyEtQ1ZrrqALDALsHQAGitYkq9pkWfOHkQ0Xt7KZZYL8YH VHSVjB7o5ZSSdBGzDMc9vNX7KTwGBTxkhl8pBeuPowYF6DS8i18OZoVuLn+Og7Q2Ikxk wO6QPbjjFUJgGgtpCyPrJ2H/g+0xQK+TUs86VCtCxjzx5H5d0+daDdePGCW+a4RUMF+x NA0JaB2aIgW2tqIdnZ+JfNyOwPYGzOKgIkmuFYY2fyfdmWp6ogD1kOccAIIWAvVY6PVj OT1JEBtajQxGwk3baqEcmzZvtxk7EAGReB09a2gzyWsABueHiMArTHf+y9QBHFX0MLa4 aBNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bW+1WlrPaIMhvB1+zaWiSQgX3E3/K4PwGoEudtUG0Wg=; fh=aFDUE+uG8MfFuu3r1tXvYKqDSVU1K+gd9OxQppAhGb0=; b=LXI4iWhWxpVrcGGcP4eCfjNsTQmrYL82ukWf0sbxKDOCly/2IIMCMAQdONuXVzgFB8 T8lHK28X0vMHIkh3XsnS7g8tjvVIDB33o4FpEf0ygd8+5kq+s8nOFH0qZ0dwlz0o5WYt mUmYr1JYVB6ZvV6l8rg71drFKGFbiEbjAOg+byjyuhYGLVqKLg7takqJufUybt6DtpOm dXlxc7cteYEc+0vpdMVMlUODu2b87cluycfiCj/zEJ98q7eS4wcBvJ6kiYLo+0AYxEct 6N/66g81eV78jntPwZl/Vw1F3U0pbjXdpiYP3RCdBWtP8HDaPX/jak51HqmQc4cVCrvl Ptww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="H0BK/gW2"; 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 cm9-20020a056a00338900b00666887b7eecsi10570940pfb.312.2023.07.24.22.31.52; Mon, 24 Jul 2023 22:32:04 -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="H0BK/gW2"; 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 S231378AbjGYFTZ (ORCPT + 99 others); Tue, 25 Jul 2023 01:19:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229978AbjGYFTX (ORCPT ); Tue, 25 Jul 2023 01:19:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC3B0116 for ; Mon, 24 Jul 2023 22:19:22 -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) server-digest SHA256) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8AF5A614C7 for ; Tue, 25 Jul 2023 05:19:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F837C433C8; Tue, 25 Jul 2023 05:19:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690262361; bh=FTpOMJ1loIDWedIBp8bMdolnNSSRLdDcUGy5Kfd5820=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=H0BK/gW2XqdWD8kelMjt/3dU/vT03Tox7sWL1DG0QuSVnyLC5luP9yY8Tvc0HcYwg lbNEgpBi9jJ8s6MZHiG3kQ/B3sU/Zof9ocJFDXYi/HQYbKI5aIrmjZRwf72xLeoC8R tvO01Oz0P86XQ2JGksGRknEHWlQq9cHl9ners+mdv75CfNKPq4yFsn3Bfs7Gp8HaXY 7l5hqjnos93WxOMDq2cRj09dwgW0RI3bgXyrQkn/fM0T6kPi2qZQv0QuXWGj+HTGo4 Pur3MP/m/kCE5fSv/sj7DBmKjVgsUw1wiDm5G/hndw1DdrFttOj0I313NEJRkCTJc/ 6eZbE2/xdKl2w== Date: Tue, 25 Jul 2023 08:19:17 +0300 From: Leon Romanovsky To: Ilia Lin 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 Message-ID: <20230725051917.GH11388@unreal> References: <20230724090044.2668064-1-ilia.lin@kernel.org> <20230724181105.GD11388@unreal> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 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 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 > > > 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