>I understand that now the value of the port allocated by the network
>stack is being kept by the rdma-cm, can you clarify what was
>the outcome
>of not keeping it?
The code flow for the failed case is:
1) For active open, sin_port 0 get pass in to cma_get_tcp_port().
2) The port number for the allocated socket is not filled in, the port
number stays 0 for id_priv->id.route.addr.src's sin_port.
2) cma_any_port(sin_port) evaluates to true
3) and calls cma_alloc_any_port() to allocate a port number which may
not correspond to the port number for the bound socket.
With the addition of getnam(), sin_port is filled in with the reserved
port number and cma_any_port will evaluate to false and the reserved
port will get used instead.
I hope that was clearer.
Chien_______________________________________________
ewg mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg