Re: [PATCH net-next v2 05/14] octeontx2-af: Add support for CPT second pass
From: Tanmay Jagdale <hidden>
Date: 2025-06-23 06:48:55
Also in:
linux-crypto
Hi Simon,
quoted
From: Rakesh Kudurumalla <redacted> 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 <redacted> Signed-off-by: Tanmay Jagdale <redacted>...quoted
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...quoted
+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...quoted
+ 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.
ACK. Will fix this in the next version. Thanks, Tanmay