lkml.org 
[lkml]   [2023]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [net-next PATCH V3] octeontx2-af: Install TC filter rules in hardware based on priority
On Tue, Jul 18, 2023 at 10:10:49AM +0530, Suman Ghosh wrote:
> As of today, hardware does not support installing tc filter
> rules based on priority. This patch adds support to install
> the hardware rules based on priority. The final hardware rules
> will not be dependent on rule installation order, it will be strictly
> priority based, same as software.
>
> Signed-off-by: Suman Ghosh <sumang@marvell.com>

...

> @@ -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?

> + }
> +
> mutex_unlock(&nic->mbox.lock);
> + return 0;
> +}

...

\
 
 \ /
  Last update: 2023-07-19 22:33    [W:0.134 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site