From mboxrd@z Thu Jan 1 00:00:00 1970 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 3089D7C for ; Sun, 25 Jun 2023 07:27:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A140C433C8; Sun, 25 Jun 2023 07:27:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687678074; bh=oeanCofYQYFVZkfR9uusD2YPvVhT36c5HNNsdvTz8QM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h5trcWXtWNgHN5EWXbnW1Idrq2UNKNthrd+l3sdQKCUsEF6IU6ucWwup5y65fy4UQ IbvjspgSDvV/iVKpVsde84MsKmomt3RKq7b+v3fwbrNAANEcpTYPgIsiPXHo2Xtw5u cbaJm8gHOh7MOBq8beLN1qIFKpgyooNbIt/Egi+DPI8/FQMiriHmtzovrdDzSVDepi k6crMSn/jsQ/n8WEwtBOzzlz2+/kn6907pGHc/9f+A42zDI4qXcp0bUUNuMnSw94QU JaEZag6kKl3sYnoFcYVuwmv0A4kAm8HmUCcjbR0dAC3NHNpa+SlZzwfWai39HXmqrA /QxUzH8b0jcSw== Date: Sun, 25 Jun 2023 10:27:50 +0300 From: Leon Romanovsky To: Bharat Bhushan Cc: Steffen Klassert , "herbert@gondor.apana.org.au" , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "netdev@vger.kernel.org" Subject: Re: [EXT] Re: Setting security path with IPsec packet offload mode Message-ID: <20230625072750.GA23952@unreal> References: <20230622083500.GA234767@unreal> Precedence: bulk X-Mailing-List: netdev@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 Fri, Jun 23, 2023 at 06:48:21AM +0000, Bharat Bhushan wrote: > Hi Leon, > > > -----Original Message----- > > From: Leon Romanovsky > > Sent: Thursday, June 22, 2023 2:05 PM > > To: Bharat Bhushan > > Cc: Steffen Klassert ; > > herbert@gondor.apana.org.au; David S. Miller ; Eric > > Dumazet ; Jakub Kicinski ; Paolo > > Abeni ; netdev@vger.kernel.org > > Subject: [EXT] Re: Setting security path with IPsec packet offload mode > > > > External Email > > > > ---------------------------------------------------------------------- > > On Thu, Jun 22, 2023 at 06:58:06AM +0000, Bharat Bhushan wrote: > > > Hi All, > > > > > > Have a query related to security patch (secpath_set()) with packet offload > > mode on egress side. Working to enable ipsec packet offload while Crypto > > offload is working. > > > For packet offload xfrm_offload(*skb) returns false in driver. While looking in > > xfrm framework, cannot find where security patch (secpath_set()) is set with > > packet offload mode on egress side. > > > > The idea of packet offload is to take plain text packets and perform all needed > > magic in HW without need from driver and stack to make anything. > > So driver does not know whether it normal packet and will be transmitted normally or this will undergo inline ipsec in hardware. Yes, this is whole idea of packet offload. Such design allows natively support tunnel and eswitch modes. > > In our case packet transmit requires a different code flow in driver, to pass some extra details in transmit descriptor like state and policy pointers. It sounds like existing IPsec crypto mode to me, which does exactly that - lookup in SW, while crypto in HW. > So is there some way driver can find same and extra state and policy details from skb? I'm not aware, maybe Steffen can answer. > > Thanks > -Bharat Thanks