[openib-general] CMA IPv6 support

Sean Hefty sean.hefty at intel.com
Mon May 15 11:04:58 PDT 2006


>Looking at rdma_listen(), the code I see checks for bound state before
>proceeding to listen:
>
>int rdma_listen(struct rdma_cm_id *id, int backlog)
>{
>        struct rdma_id_private *id_priv;
>        int ret;
>
>        id_priv = container_of(id, struct rdma_id_private, id);
>        if (!cma_comp_exch(id_priv, CMA_ADDR_BOUND, CMA_LISTEN))
>                return -EINVAL;
>	...

This is a slightly older version of the code.  There's now a call to bind if the
user hadn't previously called it.

>This makes sense, because sockets work this way, and servers generally
>want to listen on a port of their own choosing.
>
>So, I think it's already there. Right?

Sockets allows calling listen without first calling bind.  If we want to support
this, then rdma_create_id() needs to know the address family.  If we're okay
forcing the user to call rdma_bind_addr() before calling rdma_listen(), then I
think that we can avoid adding it.

- Sean



More information about the general mailing list