Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp953174lqh; Sat, 1 Jun 2024 03:19:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7FA2YEKyfHvIN9uioGrVfMwqT+RXsm4rxHxHzdznw8/ZYSosmQI+cO1fIef4xzRji7aSjwPuwBFcVae/yVqDLjVpTAnddgveJgiwqpw== X-Google-Smtp-Source: AGHT+IEs6/BYh4tx+HDJxf12m554jgCO6MCXWWSFDkEifoPMcm/gIyM8t82ypG2iqJut7W45QV23 X-Received: by 2002:a17:90a:fa14:b0:2bd:9255:4738 with SMTP id 98e67ed59e1d1-2c1dc5690b0mr3871760a91.5.1717237187196; Sat, 01 Jun 2024 03:19:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717237187; cv=pass; d=google.com; s=arc-20160816; b=PXG8cFpizO/1mNVb6M0oY9Hb7OORFQE8EDCAqhbO6Z6AnaoWzvC+yIMua2gI5dLm5S qlMH9Y41ENG4Dzxmjm9DxhFfSfkg/JYdAfOcFZXBbU05XGlCcHUW1UweisRYLWdWVJQt +smef6ic3cpGd8HZy7D0PBbk90B4TVD7LjkLLWlWwMVqFZtNsjxAKD0G8AcFChDQIZ3V EctK3kKcl57YAe51KdWsIFiF8ECWQUrREgygg57fv4kbHHCjdC7n6tBVtaOJzYuhMr9x aQiGG27Ad2kLnv+vr8H22pSn4OH8/Ukytn8ELAvLW70BBaig9/la+87BHyFyNcazOkjH /KkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EL2qCZve4GNaL3g2c3EkbuC8304lXy6dYK6PJb42bko=; fh=nfeNlPgxECSr4XGd3Ztrgiwx7uI5ZLZuJ2Fky0L9+4Q=; b=awqGRxvQs4IYM15BdVhZMgTnQeFuIFAfPZ8nGkWhnWuyynIbIQ8X9ySq2uV8cixjnA 7GIulnroUrpjTgfffmzCt7kwXYwhS2y0g2o/+zHms49c4HYUXC9WZwFW89XmRSgW+Ag9 g7PylDj7m9rWp95WEVk8Kmuzk0m8Tmizy+xw6IiUFGl+VaZ3SxD3z7xSjLvsqABtcTwp VN50ZW6UdYP6gcbl+M6EG4OXuddORofv4rxV2Uv+MXAFZHqUUgtEyhXxcIEUheeferrk A/9I/jZTev3uqLXR7dHxZiiH8K0jvbWyzHuXSKfM4mYlWwYqhBxY82Ll/rDxtg8qEzgK ELIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MlbC5hHi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-197800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a77c4692si5094979a91.149.2024.06.01.03.19.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 03:19:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MlbC5hHi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-197800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197800-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BE05D283EAB for ; Sat, 1 Jun 2024 10:19:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21AC614EC44; Sat, 1 Jun 2024 10:19:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MlbC5hHi" 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 470FBAD59; Sat, 1 Jun 2024 10:19: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=1717237176; cv=none; b=JaWtYEGNZ75dxR/lE+t4TAOEgPpSecszZzAZHHVUwK9AIDgx2a5hO+XtqSlE72/CvxAUbalL1JY9h0Pgmna3iWE/YO11tNocZ+rms+Xkd0HFr5C3yWLuSWt3ETU5q4EbVwzir/nZK9xaMYTP73nKzhjJugPjyh9fKU2g5sXVJPg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717237176; c=relaxed/simple; bh=sMFhjPh7JDKJ1MjejY8b9DGy1ZvZd+eBy+OfIkYL1e0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WpddA1gyY9YOcktHezi8J/ct/oKhYLqs67PLfW4eoqgKuJxFmZ+oGbRVSMu4j1S7h02Sn8nxdZsgPzwv45fHrWoJBwgjFKz57LkZrUkQitn2PswyDBSCZB9WMo7jQ4PXwzJMNpO8MIUkwXcnqTBt1zvvlcseu/PYAJsnyWGFo7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MlbC5hHi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC06BC116B1; Sat, 1 Jun 2024 10:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717237175; bh=sMFhjPh7JDKJ1MjejY8b9DGy1ZvZd+eBy+OfIkYL1e0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MlbC5hHi5JsXsNZTldG4HACIMBwI2931rl1FnngOMBCoooNYUwYYyoLii092jhhQr 0JLu8MhI/da2xOxoop9FSCaZXplPzPGV1rNvK1aBb6+DB7JgV3yIqAOtRl340r1bvb y8aXw/ickHFoEsUSrgsBMzaZtuJE+qtBXhjZGZVpRqKcVuCscr8k3c9wVQ2ifzbamn FeHk8XYRfati+QSzyfI00jdH5Jb5Vs+KJjGZhY4DF8WGFhR9yEdYpnXx1ypExvycY5 FvSLopPKSTVNajvqS9EmJFW7n16Z4ikuoGJcB7+ega1OSwVs/4To1xgNrMI3UhR8vv wMoXGI1dcdFiw== Date: Sat, 1 Jun 2024 11:19:30 +0100 From: Simon Horman To: Bharat Bhushan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com, hkelam@marvell.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, jerinj@marvell.com, lcherian@marvell.com, richardcochran@gmail.com Subject: Re: [net-next,v3 6/8] cn10k-ipsec: Process inline ipsec transmit offload Message-ID: <20240601101930.GB491852@kernel.org> References: <20240528135349.932669-1-bbhushan2@marvell.com> <20240528135349.932669-7-bbhushan2@marvell.com> 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: <20240528135349.932669-7-bbhushan2@marvell.com> On Tue, May 28, 2024 at 07:23:47PM +0530, Bharat Bhushan wrote: > Prepare and submit crypto hardware (CPT) instruction for > outbound inline ipsec crypto mode offload. The CPT instruction > have authentication offset, IV offset and encapsulation offset > in input packet. Also provide SA context pointer which have > details about algo, keys, salt etc. Crypto hardware encrypt, > authenticate and provide the ESP packet to networking hardware. > > Signed-off-by: Bharat Bhushan Hi Bharat, A minor nit from my side as it looks like there will be a v4 anyway. ... > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c ... > +bool cn10k_ipsec_transmit(struct otx2_nic *pf, struct netdev_queue *txq, > + struct otx2_snd_queue *sq, struct sk_buff *skb, > + int num_segs, int size) > +{ ... > + /* Check for valid SA context */ > + sa_info = (struct cpt_ctx_info_s *)x->xso.offload_handle; > + if (!sa_info || !sa_info->sa_iova) { > + netdev_err(pf->netdev, "Invalid SA conext\n"); nit: context checkpatch.pl --codespell is your friend. > + goto drop; > + } ...