All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: <zyjzyj2000@gmail.com>, <linux-rdma@vger.kernel.org>,
	Bob Pearson <rpearson@hpe.com>
Subject: Re: [PATCH for-next] RDMA/rxe: Fix coding error in rxe_recv.c
Date: Fri, 5 Feb 2021 13:57:01 -0400	[thread overview]
Message-ID: <20210205175701.GA968475@nvidia.com> (raw)
In-Reply-To: <20210127214500.3707-1-rpearson@hpe.com>

On Wed, Jan 27, 2021 at 03:45:01PM -0600, Bob Pearson wrote:
> check_type_state() in rxe_recv.c is written as if the type bits in
> the packet opcode were a bit mask which is not correct. This patch
> corrects this code to compare all 3 type bits to the required type.
> 
> Fixes: 8700e3e7c485 ("Soft RoCE driver")
> Signed-off-by: Bob Pearson <rpearson@hpe.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_recv.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)

Applied to for-next, thanks
 
> diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c b/drivers/infiniband/sw/rxe/rxe_recv.c
> index c9984a28eecc..0c9b857194fe 100644
> --- a/drivers/infiniband/sw/rxe/rxe_recv.c
> +++ b/drivers/infiniband/sw/rxe/rxe_recv.c
> @@ -9,21 +9,26 @@
>  #include "rxe.h"
>  #include "rxe_loc.h"
>  
> +/* check that QP matches packet opcode type and is in a valid state */
>  static int check_type_state(struct rxe_dev *rxe, struct rxe_pkt_info *pkt,
>  			    struct rxe_qp *qp)
>  {
> +	int pkt_type;

I fixed this to 'unsigned int'

Jason

      reply	other threads:[~2021-02-05 18:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 21:45 [PATCH for-next] RDMA/rxe: Fix coding error in rxe_recv.c Bob Pearson
2021-02-05 17:57 ` 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=20210205175701.GA968475@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearson@hpe.com \
    --cc=rpearsonhpe@gmail.com \
    --cc=zyjzyj2000@gmail.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.