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