Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp4272588rwo; Tue, 25 Jul 2023 03:38:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlENl2pInxT0mKrqXQR+y/K8yfm/QHg3cPWoyzT20sxcGogHBQ5LEB2pBTMfpjIkyWRNnqPZ X-Received: by 2002:a05:6402:10d4:b0:51a:5c1d:5c06 with SMTP id p20-20020a05640210d400b0051a5c1d5c06mr8621187edu.42.1690281482044; Tue, 25 Jul 2023 03:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690281482; cv=none; d=google.com; s=arc-20160816; b=As1i8jr3N20FuidtMuHutKQ3SAq45oW/rVQkmpN4xW9Jb8tTGzwuT/GNwficYfiGkh XD9yl+kf5IJWjOl1gHnjv52CwoDUM5R+mISYAUdKeuw8RMcua4ckcE/RByP/GnNQLRie eh3qCNEWwYGiabL9W9o9Al7Serty/fHPyOuUuEyFKqdCbG485IveA91XEmB5Vg5NvQqG 0whUTTNUfXEVIY6g/rnU3Nc3ZmAY6wgBJLNc7Soli1L9EmeCV/KX9nid+wW9F/xQaAzu XScGGim6+PiBHOQPbEJvMobLPrJH9CrAqXrRgGFDyTEByni2EtAaBfaTwBUEQre2B8Jx xqTg== 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=n5TSbcqYYDzHD4gxKOVI1Xf6EGwtCCtRVJPYHr8csiE=; fh=aFDUE+uG8MfFuu3r1tXvYKqDSVU1K+gd9OxQppAhGb0=; b=UiIMbEK9kM65ijtYDd+BnITXvNAC0z/CoMKGkR1BiEt4EDaBSTYPKrgAW5v+SF3S/v AvmD0YT5/TGJXhMBM2tj4GJhq5BHxCbnDqpF89CsGewRW9b/DJxP4r1WsTUzRepvB0xe CY58a+Cw6/s7Ax1i/sgHSO8YigD36sO7nnEWfmRiEtV7HGIpa+a0dQLCk9/Y/G5QQ1pZ BrSbRekT1gY6sgkoHyVX2qt+Bn+/tommzTwIGaYSXxKX7JbeKh9yXc6zfP6d4eqH7ZDC Xvjf3RpMzp6j2YcHK0vhhawHnQedgVr713NSjKEa3FiitzCRYS6MFvdQkELBT98KNkxj V9bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TEFDw1rU; 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 d5-20020a50fb05000000b0051e0fa08e8csi7615319edq.284.2023.07.25.03.37.36; Tue, 25 Jul 2023 03:38:02 -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=TEFDw1rU; 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 S232389AbjGYK2P (ORCPT + 99 others); Tue, 25 Jul 2023 06:28:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232628AbjGYK2M (ORCPT ); Tue, 25 Jul 2023 06:28:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B11A1FC7 for ; Tue, 25 Jul 2023 03:27:26 -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 2CC23615FB for ; Tue, 25 Jul 2023 10:27:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF1ACC433C7; Tue, 25 Jul 2023 10:27:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690280826; bh=dEUftBuVlThgLNzSUzD39UsyTnVeI1zwp2BGdviWBrw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TEFDw1rUnewSFxDujnX4M1bWQ+pQFPlX+Lb7Ad/oSwZZUFC8Ddv/bwQU3FZjnj0/M VH9ULWCbJYwG0CX7eBIPJnutCyK4L9qLtpDTVBkom9tefKT6WBiV8SiIR5397ehmsd LQwFdgo2IsrCFeicn26DIUu5LnmlbXd4ZkxHyDdIbiz8rgrSEu5JGsjSbt38Zv2rYn 9iT74l3K4xfq+HPUGI85UImETX95HtkqrolHY9kOiw8c/X1CRkvBpbvV1w7KWW1EQz tYanXCqFUPi9jChfp5dEd52cvuJV/3tbUk3iQusCjvqEZaBi/B1MAfnV2KU1xYqgDS GReDuBZkhRi+w== Date: Tue, 25 Jul 2023 13:27:02 +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: <20230725102702.GP11388@unreal> References: <20230724090044.2668064-1-ilia.lin@kernel.org> <20230724181105.GD11388@unreal> <20230725051917.GH11388@unreal> <20230725093826.GO11388@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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 01:15:12PM +0300, Ilia Lin wrote: > On Tue, Jul 25, 2023 at 12:38 PM Leon Romanovsky wrote: > > > > On Tue, Jul 25, 2023 at 12:11:06PM +0300, Ilia Lin wrote: > > > On Tue, Jul 25, 2023 at 8:19 AM Leon Romanovsky wrote: > > > > > > > > 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 > > > > > > > In driver Kconfig: "select XFRM_OFFLOAD" > > > > In driver Kconfig, one should use "depends on XFRM_OFFLOAD" and not "select XFRM_OFFLOAD". > > Drivers shouldn't enable XFRM_OFFLOAD directly and all upstream users are safe here. > > Thank you for that information, but the XFRM_OFFLOAD doesn't depend on > XFRM either. Indirectly, XFRM_OFFLOAD depends on XFRM. INET_ESP_OFFLOAD -> INET_ESP/XFRM_OFFLOAD -> XFRM_ESP -> XFRM_ALGO -> XFRM. Thanks > > > > > Thanks