RE: [EXT] Re: [net-next PATCH V3] octeontx2-af: Install TC filter rules in hardware based on priority

From: Suman Ghosh
Date: Fri Jul 21 2023 - 00:34:20 EST


>
>> @@ -729,22 +816,106 @@ static int otx2_del_mcam_flow_entry(struct
>otx2_nic *nic, u16 entry)
>> mutex_unlock(&nic->mbox.lock);
>> return -EFAULT;
>> }
>> +
>> + if (cntr_val) {
>> + rsp = (struct npc_delete_flow_rsp *)otx2_mbox_get_rsp(&nic-
>>mbox.mbox,
>> + 0, &req->hdr);
>> + *cntr_val = rsp->cntr_val;
>
>Hi Suman,
>
>otx2_mbox_get_rsp may return an ERR_PTR.
>Is it ok not to check that before dereferencing rsp?
[Suman] No, we should check for the err pointer. Thanks for pointing it out. Will update in v4
>
>> + }
>> +
>> mutex_unlock(&nic->mbox.lock);
>> + return 0;
>> +}
>
>...