From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Yishai Hadas <yishaih@nvidia.com>,
linux-rdma@vger.kernel.org, yishaih@mellanox.com,
maorg@mellanox.com, phaddad@nvidia.com,
Maor Gottlieb <maorg@nvidia.com>
Subject: Re: [PATCH rdma-core 2/4] mlx5: Implement ibv_query_qp_data_in_order() verb
Date: Thu, 10 Jun 2021 08:42:24 -0300 [thread overview]
Message-ID: <20210610114224.GJ1002214@nvidia.com> (raw)
In-Reply-To: <YMGoQ2ZmTjSun54y@unreal>
On Thu, Jun 10, 2021 at 08:50:59AM +0300, Leon Romanovsky wrote:
> On Wed, Jun 09, 2021 at 06:59:30PM +0300, Yishai Hadas wrote:
> > From: Patrisious Haddad <phaddad@nvidia.com>
> >
> > Implement the ibv_query_qp_data_in_order() verb by using DEVX to read
> > from firmware the 'in_order_data' capability.
> >
> > Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
> > Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
> > Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
> > providers/mlx5/mlx5.c | 1 +
> > providers/mlx5/mlx5.h | 3 +++
> > providers/mlx5/mlx5_ifc.h | 39 +++++++++++++++++++++++++++++++--
> > providers/mlx5/verbs.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++
> > 4 files changed, 96 insertions(+), 2 deletions(-)
>
> <...>
>
> > +int mlx5_query_qp_data_in_order(struct ibv_qp *qp, enum ibv_wr_opcode op,
> > + uint32_t flags)
> > +{
> > + uint32_t in_qp[DEVX_ST_SZ_DW(query_qp_in)] = {};
> > + uint32_t out_qp[DEVX_ST_SZ_DW(query_qp_out)] = {};
> > + struct mlx5_context *mctx = to_mctx(qp->context);
> > + struct mlx5_qp *mqp = to_mqp(qp);
> > + int ret;
> > +
> > +/* Currently this API is only supported for x86 architectures since most
> > + * non-x86 platforms are known to be OOO and need to do a per-platform study.
> > + */
> > +#if !defined(__i386__) && !defined(__x86_64__)
> > + return 0;
> > +#endif
>
> Does it compile without warnings/errors on such platforms?
> You have "return 0;" in the middle of function, so the right thing to do
> it is to write with "#if ..." over function or inside like below, as
> long as "#else" exists.
>
> int mlx5_query_qp_data_in_order(struct ibv_qp *qp, enum ibv_wr_opcode op,
> uint32_t flags)
> {
> #if !defined(__i386__) && !defined(__x86_64__)
> /* Currently this API is only supported for x86 architectures since most
> * non-x86 platforms are known to be OOO and need to do a per-platform study.
> */
> return 0;
> #else
> .....
> #endif
We should probably put the above in the core code anyhow
Jason
next prev parent reply other threads:[~2021-06-10 11:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 15:59 [PATCH rdma-core 0/4] verbs: Introduce ibv_query_qp_data_in_order() verb Yishai Hadas
2021-06-09 15:59 ` [PATCH rdma-core 1/4] " Yishai Hadas
2021-06-09 15:59 ` [PATCH rdma-core 2/4] mlx5: Implement " Yishai Hadas
2021-06-10 5:50 ` Leon Romanovsky
2021-06-10 11:42 ` Jason Gunthorpe [this message]
2021-06-10 11:50 ` Leon Romanovsky
2021-06-10 12:51 ` Yishai Hadas
2021-06-16 8:03 ` Yishai Hadas
2021-06-09 15:59 ` [PATCH rdma-core 3/4] pyverbs: Add query QP data in order support Yishai Hadas
2021-06-09 15:59 ` [PATCH rdma-core 4/4] tests: Add query QP data in order coverage Yishai Hadas
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=20210610114224.GJ1002214@nvidia.com \
--to=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@mellanox.com \
--cc=maorg@nvidia.com \
--cc=phaddad@nvidia.com \
--cc=yishaih@mellanox.com \
--cc=yishaih@nvidia.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