All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Shiraz Saleem <shiraz.saleem@intel.com>
Cc: jgg@nvidia.com, linux-rdma@vger.kernel.org,
	Mustafa Ismail <mustafa.ismail@intel.com>
Subject: Re: [PATCH v1 for-next 2/3] RDMA/irdma: Fix RQ completion opcode
Date: Thu, 10 Nov 2022 10:45:01 +0200	[thread overview]
Message-ID: <Y2y6DXem7XmKi1JM@unreal> (raw)
In-Reply-To: <20221108162958.1227-3-shiraz.saleem@intel.com>

On Tue, Nov 08, 2022 at 10:29:57AM -0600, Shiraz Saleem wrote:
> From: Mustafa Ismail <mustafa.ismail@intel.com>
> 
> The opcode written by HW, in the RQ CQE, is the
> RoCEv2/iWARP protocol opcode from the received
> packet and not the SW opcode as currently assumed.
> Fix this by returning the raw operation type and
> queue type in the CQE to irdma_process_cqe and add
> 2 helpers set_ib_wc_op_sq set_ib_wc_op_rq to map
> IRDMA HW op types to IB op types.
> 
> Note that for iWARP, only Write with Immediate is
> supported so the opcode can only be IB_WC_RECV_RDMA_WITH_IMM
> when there is immediate data present.
> 
> Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
> Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com>
> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
> ---
>  drivers/infiniband/hw/irdma/uk.c    | 19 +++-----
>  drivers/infiniband/hw/irdma/user.h  |  1 +
>  drivers/infiniband/hw/irdma/utils.c |  2 +
>  drivers/infiniband/hw/irdma/verbs.c | 91 +++++++++++++++++++++++--------------
>  4 files changed, 68 insertions(+), 45 deletions(-)

<...>

> +static inline void set_ib_wc_op_sq(struct irdma_cq_poll_info *cq_poll_info,
> +				   struct ib_wc *entry)
> +{
> +	switch (cq_poll_info->op_type) {
> +	case IRDMA_OP_TYPE_RDMA_WRITE:
> +	case IRDMA_OP_TYPE_RDMA_WRITE_SOL:
> +	entry->opcode = IB_WC_RDMA_WRITE;

1. Please run clang formatter on your series, I see wrong indentation here.
2. We are honoring 80-symbol limit, when it is possible. First patch is
full of such warnings.
3. No inline functions in .c code please.

Thanks

  reply	other threads:[~2022-11-10  8:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 16:29 [PATCH v1 for-next 0/3] irdma for-next updates 11-1-2022 Shiraz Saleem
2022-11-08 16:29 ` [PATCH v1 for-next 1/3] RDMA/irdma: Fix inline for multiple SGE's Shiraz Saleem
2022-11-08 16:29 ` [PATCH v1 for-next 2/3] RDMA/irdma: Fix RQ completion opcode Shiraz Saleem
2022-11-10  8:45   ` Leon Romanovsky [this message]
2022-11-08 16:29 ` [PATCH v1 for-next 3/3] RDMA/irdma: Do not request 2-level PBLEs for CQ alloc Shiraz Saleem

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=Y2y6DXem7XmKi1JM@unreal \
    --to=leon@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mustafa.ismail@intel.com \
    --cc=shiraz.saleem@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.