[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200510081714.GA199306@unreal>
Date: Sun, 10 May 2020 11:17:14 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Doug Ledford <dledford@...hat.com>,
Maor Gottlieb <maorg@...lanox.com>, linux-rdma@...r.kernel.org,
Mark Bloch <markb@...lanox.com>,
Mark Zhang <markz@...lanox.com>, netdev@...r.kernel.org,
Saeed Mahameed <saeedm@...lanox.com>
Subject: Re: [PATCH mlx5-next v1 1/4] {IB/net}/mlx5: Simplify don't trap code
On Fri, May 08, 2020 at 04:58:38PM -0300, Jason Gunthorpe wrote:
> On Mon, May 04, 2020 at 08:30:09AM +0300, Leon Romanovsky wrote:
> > + flow_act->action &=
> > + ~MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO;
> > + flow_act->action |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
> > + handle = _mlx5_add_flow_rules(ft, spec, flow_act, dest, num_dest);
> > + if (IS_ERR_OR_NULL(handle))
> > + goto unlock;
>
> I never like seeing IS_ERR_OR_NULL()..
>
> In this case I see callers of mlx5_add_flow_rules() that crash if it
> returns NULL, so this can't be right.
>
> Also, I don't see an obvious place where _mlx5_add_flow_rules()
> returns NULL, does it?
You are right, I'll replace this IS_ERR_OR_NULL() to be IS_ERR() once
will take it to mlx5-next.
Is it ok?
Thanks
>
> Jason
Powered by blists - more mailing lists