[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<IA2PR18MB58852DD00543026135C7BBF0D679A@IA2PR18MB5885.namprd18.prod.outlook.com>
Date: Mon, 23 Jun 2025 06:48:31 +0000
From: Tanmay Jagdale <tanmay@...vell.com>
To: Simon Horman <horms@...nel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"leon@...nel.org"
<leon@...nel.org>,
Sunil Kovvuri Goutham <sgoutham@...vell.com>,
Bharat
Bhushan <bbhushan2@...vell.com>,
"herbert@...dor.apana.org.au"
<herbert@...dor.apana.org.au>,
"linux-crypto@...r.kernel.org"
<linux-crypto@...r.kernel.org>,
"netdev@...r.kernel.org"
<netdev@...r.kernel.org>,
Rakesh Kudurumalla <rkudurumalla@...vell.com>
Subject: Re: [PATCH net-next v2 05/14] octeontx2-af: Add support for CPT
second pass
Hi Simon,
>> From: Rakesh Kudurumalla <rkudurumalla@...vell.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@...vell.com>
>> Signed-off-by: Tanmay Jagdale <tanmay@...vell.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.
ACK. Will fix this in the next version.
Thanks,
Tanmay
Powered by blists - more mailing lists