netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Doug Ledford <dledford@redhat.com>,
	Maor Gottlieb <maorg@mellanox.com>,
	linux-rdma@vger.kernel.org, Mark Bloch <markb@mellanox.com>,
	Mark Zhang <markz@mellanox.com>,
	netdev@vger.kernel.org, Saeed Mahameed <saeedm@mellanox.com>
Subject: Re: [PATCH mlx5-next v1 1/4] {IB/net}/mlx5: Simplify don't trap code
Date: Sun, 10 May 2020 11:17:14 +0300	[thread overview]
Message-ID: <20200510081714.GA199306@unreal> (raw)
In-Reply-To: <20200508195838.GA9696@ziepe.ca>

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

  parent reply	other threads:[~2020-05-10  8:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04  5:30 [PATCH rdma-next v1 0/4] Add steering support for default miss Leon Romanovsky
2020-05-04  5:30 ` [PATCH mlx5-next v1 1/4] {IB/net}/mlx5: Simplify don't trap code Leon Romanovsky
2020-05-08 19:58   ` Jason Gunthorpe
2020-05-08 20:29     ` Mark Bloch
2020-05-10  8:17     ` Leon Romanovsky [this message]
2020-05-12 20:14       ` Jason Gunthorpe
2020-05-04  5:30 ` [PATCH mlx5-next v1 2/4] net/mlx5: Add support in forward to namespace Leon Romanovsky
2020-05-13  7:05 ` [PATCH rdma-next v1 0/4] Add steering support for default miss Leon Romanovsky
2020-05-13 18:57   ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200510081714.GA199306@unreal \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@mellanox.com \
    --cc=markb@mellanox.com \
    --cc=markz@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).