All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Kamal Heib <kamalheib1@gmail.com>
Cc: Zhu Yanjun <zyjzyj2000@gmail.com>,
	RDMA mailing list <linux-rdma@vger.kernel.org>,
	Doug Ledford <dledford@redhat.com>
Subject: Re: [PATCH for-rc] RDMA/rxe: Fix failure during driver load
Date: Wed, 2 Jun 2021 20:31:44 -0300	[thread overview]
Message-ID: <20210602233144.GO1096940@ziepe.ca> (raw)
In-Reply-To: <YLeDL+Omy8QdI+Q+@kheib-workstation>

On Wed, Jun 02, 2021 at 04:10:07PM +0300, Kamal Heib wrote:

> diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
> index 01662727dca0..144d9e1c1c3d 100644
> +++ b/drivers/infiniband/sw/rxe/rxe_net.c
> @@ -208,6 +208,11 @@ static struct socket *rxe_setup_udp_tunnel(struct net *net, __be16 port,
>         /* Create UDP socket */
>         err = udp_sock_create(net, &udp_cfg, &sock);
>         if (err < 0) {
> +               if (ipv6 && (err == -EAFNOSUPPORT)) {
> +                       pr_warn("IPv6 is not supported can not create UDP socket\n");
> +                       return NULL;
> +               }
> +

I would put this test in rxe_net_ipv6_init. returning errptr, null or
a valid pointer is a bit too ugly

>                 pr_err("failed to create udp socket. err = %d\n",
>                 err);

And delete some of this needless debugging

Jason

      parent reply	other threads:[~2021-06-02 23:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  5:56 [PATCH for-rc] RDMA/rxe: Fix failure during driver load Kamal Heib
2021-06-01  7:45 ` Zhu Yanjun
2021-06-01  7:56   ` kamal heib
2021-06-01  8:11     ` Zhu Yanjun
2021-06-01  9:09       ` Kamal Heib
2021-06-01 15:59         ` Zhu Yanjun
2021-06-01 17:01           ` Jason Gunthorpe
2021-06-02  7:22             ` Zhu Yanjun
2021-06-02 13:10             ` Kamal Heib
2021-06-02 14:04               ` Yanjun Zhu
2021-06-02 23:31               ` 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=20210602233144.GO1096940@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=dledford@redhat.com \
    --cc=kamalheib1@gmail.com \
    --cc=linux-rdma@vger.kernel.org \
    --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.