From: Jason Gunthorpe <jgg@ziepe.ca>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Maor Gottlieb <maorg@mellanox.com>,
linux-rdma@vger.kernel.org, Mark Zhang <markz@mellanox.com>
Subject: Re: [PATCH rdma-next 4/4] RDMA/mlx5: Add support in steering default miss
Date: Fri, 24 Apr 2020 10:17:26 -0300 [thread overview]
Message-ID: <20200424131726.GA23075@ziepe.ca> (raw)
In-Reply-To: <20200413135220.934007-5-leon@kernel.org>
On Mon, Apr 13, 2020 at 04:52:20PM +0300, Leon Romanovsky wrote:
> From: Maor Gottlieb <maorg@mellanox.com>
>
> User can configure default miss rule in order to skip matching in
> the user domain and forward the packet to the kernel steering domain.
> When user requests a default miss rule, we add steering rule
> to forward the traffic to the next namespace.
>
> Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
> Reviewed-by: Mark Zhang <markz@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> drivers/infiniband/hw/mlx5/flow.c | 35 ++++++++++++++++++++----
> drivers/infiniband/hw/mlx5/main.c | 9 +++---
> include/uapi/rdma/mlx5_user_ioctl_cmds.h | 5 ++++
> 3 files changed, 38 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/flow.c b/drivers/infiniband/hw/mlx5/flow.c
> index 7ff8d7188b82..7db672fd1395 100644
> +++ b/drivers/infiniband/hw/mlx5/flow.c
> @@ -69,19 +69,35 @@ static const struct uverbs_attr_spec mlx5_ib_flow_type[] = {
>
> static int get_dests(struct uverbs_attr_bundle *attrs,
> struct mlx5_ib_flow_matcher *fs_matcher, int *dest_id,
> - int *dest_type, struct ib_qp **qp)
> + int *dest_type, struct ib_qp **qp, bool *def_miss)
> {
> bool dest_devx, dest_qp;
> void *devx_obj;
> + u32 flags;
>
> dest_devx = uverbs_attr_is_valid(attrs,
> MLX5_IB_ATTR_CREATE_FLOW_DEST_DEVX);
> dest_qp = uverbs_attr_is_valid(attrs,
> MLX5_IB_ATTR_CREATE_FLOW_DEST_QP);
>
> - if (fs_matcher->ns_type == MLX5_FLOW_NAMESPACE_BYPASS &&
> - ((dest_devx && dest_qp) || (!dest_devx && !dest_qp)))
> - return -EINVAL;
> + *def_miss = false;
> + if (uverbs_attr_is_valid(attrs, MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS)) {
attr_is_valid should not be called on flags, get_flags already knows
to return 0 as the flags if the attr is not present.
Jason
prev parent reply other threads:[~2020-04-24 13:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 13:52 [PATCH rdma-next 0/4] Add steering support for default miss Leon Romanovsky
2020-04-13 13:52 ` [PATCH mlx5-next 1/4] {IB/net}/mlx5: Simplify don't trap code Leon Romanovsky
2020-04-13 13:52 ` [PATCH mlx5-next 2/4] net/mlx5: Add support in forward to namespace Leon Romanovsky
2020-04-13 13:52 ` [PATCH rdma-next 3/4] RDMA/mlx5: Refactor DV create flow Leon Romanovsky
2020-04-13 13:52 ` [PATCH rdma-next 4/4] RDMA/mlx5: Add support in steering default miss Leon Romanovsky
2020-04-24 13:17 ` Jason Gunthorpe [this message]
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=20200424131726.GA23075@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@mellanox.com \
--cc=markz@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).