All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Tanmay Jagdale <tanmay@marvell.com>
Cc: davem@davemloft.net, leon@kernel.org, sgoutham@marvell.com,
	bbhushan2@marvell.com, herbert@gondor.apana.org.au,
	linux-crypto@vger.kernel.org, netdev@vger.kernel.org,
	Rakesh Kudurumalla <rkudurumalla@marvell.com>
Subject: Re: [PATCH net-next v2 05/14] octeontx2-af: Add support for CPT second pass
Date: Fri, 20 Jun 2025 11:55:44 +0100	[thread overview]
Message-ID: <20250620105544.GI194429@horms.kernel.org> (raw)
In-Reply-To: <20250618113020.130888-6-tanmay@marvell.com>

On Wed, Jun 18, 2025 at 04:59:59PM +0530, Tanmay Jagdale wrote:
> From: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> 
> Implemented mailbox to add mechanism to allocate a
> rq_mask and apply to nixlf to toggle RQ context fields
> for CPT second pass packets.
> 
> Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
> Signed-off-by: Tanmay Jagdale <tanmay@marvell.com>

...

>  void rvu_apr_block_cn10k_init(struct rvu *rvu)
> diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c

...

> +int
> +rvu_mbox_handler_nix_lf_inline_rq_cfg(struct rvu *rvu,
> +				      struct nix_rq_cpt_field_mask_cfg_req *req,
> +				      struct msg_rsp *rsp)
> +{
> +	struct rvu_hwinfo *hw = rvu->hw;
> +	struct nix_hw *nix_hw;
> +	int blkaddr, nixlf;
> +	int rq_mask, err;
> +
> +	err = nix_get_nixlf(rvu, req->hdr.pcifunc, &nixlf, &blkaddr);
> +	if (err)
> +		return err;
> +
> +	nix_hw = get_nix_hw(rvu->hw, blkaddr);
> +	if (!nix_hw)
> +		return NIX_AF_ERR_INVALID_NIXBLK;
> +
> +	if (!hw->cap.second_cpt_pass)
> +		return NIX_AF_ERR_INVALID_NIXBLK;
> +
> +	if (req->ipsec_cfg1.rq_mask_enable) {

If this condition is not met...

> +		rq_mask = nix_inline_rq_mask_alloc(rvu, req, nix_hw, blkaddr);
> +		if (rq_mask < 0)
> +			return NIX_AF_ERR_RQ_CPT_MASK;
> +	}
> +

... then rq_mask is used uninitialised on the following line.

Flagged by clang 20.1.7 with -Wsometimes-uninitialized, and Smatch.

> +	configure_rq_mask(rvu, blkaddr, nixlf, rq_mask,
> +			  req->ipsec_cfg1.rq_mask_enable);
> +	configure_spb_cpt(rvu, blkaddr, nixlf, req,
> +			  req->ipsec_cfg1.spb_cpt_enable);
> +	return 0;
> +}

...

  reply	other threads:[~2025-06-20 10:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18 11:29 [PATCH net-next v2 00/14] Enable Inbound IPsec offload on Marvell CN10K SoC Tanmay Jagdale
2025-06-18 11:29 ` [PATCH net-next v2 01/14] crypto: octeontx2: Share engine group info with AF driver Tanmay Jagdale
2025-06-18 11:29 ` [PATCH net-next v2 02/14] octeontx2-af: Configure crypto hardware for inline ipsec Tanmay Jagdale
2025-06-18 11:29 ` [PATCH net-next v2 03/14] octeontx2-af: Setup Large Memory Transaction for crypto Tanmay Jagdale
2025-06-18 11:29 ` [PATCH net-next v2 04/14] octeontx2-af: Handle inbound inline ipsec config in AF Tanmay Jagdale
2025-06-18 11:29 ` [PATCH net-next v2 05/14] octeontx2-af: Add support for CPT second pass Tanmay Jagdale
2025-06-20 10:55   ` Simon Horman [this message]
2025-06-23  6:48     ` Tanmay Jagdale
2025-06-18 11:30 ` [PATCH net-next v2 06/14] octeontx2-af: Add support for SPI to SA index translation Tanmay Jagdale
2025-06-19 14:37   ` kernel test robot
2025-06-18 11:30 ` [PATCH net-next v2 07/14] octeontx2-af: Add mbox to alloc/free BPIDs Tanmay Jagdale
2025-06-18 11:30 ` [PATCH net-next v2 08/14] octeontx2-pf: ipsec: Allocate Ingress SA table Tanmay Jagdale
2025-06-18 11:30 ` [PATCH net-next v2 09/14] octeontx2-pf: ipsec: Setup NIX HW resources for inbound flows Tanmay Jagdale
2025-06-18 11:30 ` [PATCH net-next v2 10/14] octeontx2-pf: ipsec: Handle NPA threshold interrupt Tanmay Jagdale
2025-06-20 11:00   ` Simon Horman
2025-07-10  8:42     ` Tanmay Jagdale
2025-06-18 11:30 ` [PATCH net-next v2 11/14] octeontx2-pf: ipsec: Initialize ingress IPsec Tanmay Jagdale
2025-06-18 11:30 ` [PATCH net-next v2 12/14] octeontx2-pf: ipsec: Process CPT metapackets Tanmay Jagdale
2025-06-20 11:06   ` Simon Horman
2025-07-10  8:44     ` Tanmay Jagdale
2025-06-18 11:30 ` [PATCH net-next v2 13/14] octeontx2-pf: ipsec: Manage NPC rules and SPI-to-SA table entries Tanmay Jagdale
2025-06-19 23:19   ` kernel test robot
2025-06-18 11:30 ` [PATCH net-next v2 14/14] octeontx2-pf: ipsec: Add XFRM state and policy hooks for inbound flows Tanmay Jagdale
2025-06-20 11:22   ` Simon Horman
2025-07-10  8:40     ` Tanmay Jagdale
2025-06-25 14:38   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250620105544.GI194429@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=bbhushan2@marvell.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=leon@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rkudurumalla@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=tanmay@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.