linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yanjun <zyjzyj2000@gmail.com>
To: Bob Pearson <rpearsonhpe@gmail.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH for-next v2 2/3] RDMA/rxe: Fix bug in rxe_net.c
Date: Mon, 2 Aug 2021 16:33:13 +0800	[thread overview]
Message-ID: <CAD=hENf5i3+rHZtA-O_bafEfZtYp-0FwkT=jPrd59VxyT0=XmQ@mail.gmail.com> (raw)
In-Reply-To: <20210729220039.18549-3-rpearsonhpe@gmail.com>

On Fri, Jul 30, 2021 at 6:01 AM Bob Pearson <rpearsonhpe@gmail.com> wrote:
>
> An earlier patch removed setting of tot_len in IPV4 headers because it
> was also set in ip_local_out. However, this change resulted in an incorrect
> ICRC being computed because the tot_len field is not masked out. This
> patch restores that line. This fixes the bug reported by Zhu Yanjun.
> This bug affects anyone using rxe which is currently broken.
>
> Fixes: 230bb836ee88 ("RDMA/rxe: Fix redundant call to ip_send_check")
> Reported-by: Zhu Yanjun <zyjzyj2000@gmail.com>
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>

This commit is needed.

Without this commit,  on some different kernel versions,
SoftRoCE can not connect to each other.

Thanks a lot.
Reviewed-and-tested-by: Zhu Yanjun <zyjzyj2000@gmail.com>

Zhu Yanjun

> ---
>  drivers/infiniband/sw/rxe/rxe_net.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
> index 10c13dfebcbc..2cb810cb890a 100644
> --- a/drivers/infiniband/sw/rxe/rxe_net.c
> +++ b/drivers/infiniband/sw/rxe/rxe_net.c
> @@ -259,6 +259,7 @@ static void prepare_ipv4_hdr(struct dst_entry *dst, struct sk_buff *skb,
>
>         iph->version    =       IPVERSION;
>         iph->ihl        =       sizeof(struct iphdr) >> 2;
> +       iph->tot_len    =       htons(skb->len);
>         iph->frag_off   =       df;
>         iph->protocol   =       proto;
>         iph->tos        =       tos;
> --
> 2.30.2
>

  reply	other threads:[~2021-08-02  8:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29 22:00 [PATCH for-next v2 0/3] Three rxe bug fixes Bob Pearson
2021-07-29 22:00 ` [PATCH for-next v2 1/3] RDMA/rxe: Fix bug in get_srq_wqe() in rxe_resp.c Bob Pearson
2021-07-29 22:00 ` [PATCH for-next v2 2/3] RDMA/rxe: Fix bug in rxe_net.c Bob Pearson
2021-08-02  8:33   ` Zhu Yanjun [this message]
2021-07-29 22:00 ` [PATCH for-next v2 3/3] RDMA/rxe: Add memory barriers to kernel queues Bob Pearson
2021-08-03 15:58 ` [PATCH for-next v2 0/3] Three rxe bug fixes Jason Gunthorpe
2021-08-04  1:39   ` Zhu Yanjun

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='CAD=hENf5i3+rHZtA-O_bafEfZtYp-0FwkT=jPrd59VxyT0=XmQ@mail.gmail.com' \
    --to=zyjzyj2000@gmail.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=rpearsonhpe@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 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).