[ewg] rdma/cm: disallow loopback address for iwarp devices

Jeff Squyres jsquyres at cisco.com
Mon Feb 8 16:28:18 PST 2010


On Feb 8, 2010, at 6:48 PM, Sean Hefty wrote:

>   rc = rdma_bind_addr(cm_id, ipaddr);
>   if (rc || !cm_id->verbs) {
>       rc = OMPI_SUCCESS;
>       goto out3;
>   }

Ah, yes!  Per the OMPI code you cited, I amended my printf's and see:

   [svbu-mpi.cisco.com:19315] FAILED to bind to 127.0.0.1: rc=0, verbs=(nil)

So the rc from from rdma_bind_addr was 0, but you're right that the verbs pointer was NULL, and we therefore rule that it was no good.

> The other is btl_openib_connect_rdmacm.c, but that deals with listening.  I
> can't quickly determine if btl_openib_iwarp.c is usually used for IB or not.

It is.

> So, to fully keep the behavior of 2.6.32, rdma_bind_addr for 127.0.0.1 should
> succeed, but not assign a device.  I think this was the change from commit
> ..c55e657 that changed the behavior:
> 
> @@ -2089,7 +2096,9 @@ int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr
> *addr)
>         if (!cma_comp_exch(id_priv, CMA_IDLE, CMA_ADDR_BOUND))
>                 return -EINVAL;
> 
> -       if (!cma_any_addr(addr)) {
> +       if (cma_loopback_addr(addr)) {
> +               ret = cma_bind_loopback(id_priv);
> +       } else if (!cma_zero_addr(addr)) {
>                 ret = rdma_translate_ip(addr, &id->route.addr.dev_addr);
>                 if (ret)
>                         goto err1;
> 
> I'll see if reverting this gives the desired(?) behavior.

Thanks!

-- 
Jeff Squyres
jsquyres at cisco.com

For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/




More information about the ewg mailing list