Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2606506lqo; Tue, 14 May 2024 04:10:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU3Zc5ILBpM+I79F6fBYxwU8oSgH7Gl/tgv0eiUV8Ug0q5OU/SvXpeWE8Zccboe6BslTAjOukxQk/hSMKzHV/p1bU2sSYYnMd9okkvpqQ== X-Google-Smtp-Source: AGHT+IG1+LDME0BybpotAK3Ym7rGf0gjV9rgpl9u4jC2M5+mSvEVBEegd7vO71zrUMs3JpFJmu// X-Received: by 2002:a05:620a:5e52:b0:790:cc3b:fe65 with SMTP id af79cd13be357-792c7577559mr1350634185a.10.1715685052733; Tue, 14 May 2024 04:10:52 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf33b1fesi1216485085a.425.2024.05.14.04.10.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 04:10:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178574-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b="R4e/0vTo"; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-178574-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178574-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5E7A71C2114B for ; Tue, 14 May 2024 11:10:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 499B813F00A; Tue, 14 May 2024 10:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="R4e/0vTo" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58FC16D1B4; Tue, 14 May 2024 10:46:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715683595; cv=none; b=ebl81oE9puI6D8Xe+6x9PKN/QiScty1ixMf7rKobzEPWaode8QUA/xOQyi+3xPkcOat6UE/jPk5kFRwP+AgcayFQM8cW9xEXSANSG50KC46qyIFL6QeuRunGcuNSWYfPzqOdxcOWgO3Xu2h23n+Fid2Z9kvJt5o+31jEdNo2K7k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715683595; c=relaxed/simple; bh=DHFuiyL6T5J2md2p75u4E5Jz8QSMYKiBIleKiS1nJh0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZU1528G/m2+5s2lJPkHO+m+uXCj9ZzGqmNs2zLxkpunD5AGpHNPLSmjBSwwECM4PCnYTcw/lvl1u93Rd75u8P2QUz/YWuB0djvZfHrGgjFwXmH6vmt/Schw60Ejc4GuP3z4feLfLEcUT3kikjJWy9kxfLJ2LMNZe1ucT8QgeRZ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=R4e/0vTo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14BE6C2BD10; Tue, 14 May 2024 10:46:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715683595; bh=DHFuiyL6T5J2md2p75u4E5Jz8QSMYKiBIleKiS1nJh0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R4e/0vToJzWnMNABYFEb4mmjwzdFvt8whPVkDhVQGVZsd1pCwDU5fO/OnKDblY/i3 88Sm+EYr5yGI0aO4xWDXQ1dfL7KZ+Vq6/YhRZhOIJCCCBx+oaXk5ADEFadUSOvIZJp Mizuyt+YaWqmabrF+GUHajeM8UubkHt2uxD+WOayb5bD4WgWHLZO9Krv9XIurhl7ql 30/NPnQpZPKzIECZ8fvkVPCHDM5b2d/YQT6yQq7BJo22H/wGq38yxAlfhsHV3qEKY5 3YhljaB8T2eZ4XVEugsVw/z/DhtdTK0k2lkcy3ER60Lfp+nJv1cr0pEy+0AN6XrQ4J MvA4WPFkgVsbQ== Date: Tue, 14 May 2024 11:46:26 +0100 From: Simon Horman To: Bharat Bhushan Cc: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sunil Kovvuri Goutham , Geethasowjanya Akula , Subbaraya Sundeep Bhatta , Hariprasad Kelam , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , Jerin Jacob , Linu Cherian , "richardcochran@gmail.com" Subject: Re: [EXTERNAL] Re: [net-next,v2 5/8] cn10k-ipsec: Add SA add/delete support for outb inline ipsec Message-ID: <20240514104626.GE2787@kernel.org> References: <20240513105446.297451-1-bbhushan2@marvell.com> <20240513105446.297451-6-bbhushan2@marvell.com> <20240513165133.GS2787@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, May 14, 2024 at 06:52:38AM +0000, Bharat Bhushan wrote: > Please see inline > > > -----Original Message----- > > From: Simon Horman .. > > > +static const struct xfrmdev_ops cn10k_ipsec_xfrmdev_ops = { > > > + .xdo_dev_state_add = cn10k_ipsec_add_state, > > > + .xdo_dev_state_delete = cn10k_ipsec_del_state, > > > +}; > > > + > > > > cn10k_ipsec_xfrmdev_ops is unused. > > Perhaps it, along with it's callbacks, > > should be added by the function that uses it? > > I wanted to enable ipsec offload in last patch of the series > ("[net-next,v2 8/8] cn10k-ipsec: Enable outbound inline ipsec offload") I appreciate the patchset being split up like this. > Is it okay to set xfrmdev_ops in this patch without setting NETIF_F_HW_ESP (below two lines of last patch) > + /* Set xfrm device ops */ > + netdev->xfrmdev_ops = &cn10k_ipsec_xfrmdev_ops; > > Last patch will set below flags. > + netdev->hw_features |= NETIF_F_HW_ESP; > + netdev->hw_enc_features |= NETIF_F_HW_ESP; > + IMHO, yes, something like that would be fine, as long as it leads to a working system (with a feature not enabled). Perhaps it would be good to include a comment in the code about this to make it clear what is going on. ..