Sean Hefty wrote:
If my understanding is correct, the current code of rdma_bind_addr
assumes you supply it one of three (all are **src** address)

+1 ANY (0.0.0.0) addr
+2 local loopback addr
+3 other local addr

Correct. - Note that currently a valid port number needs to be provided, but
this is a temporary restriction.

I am not sure to understand your comment on the port number, you mean to the ((struct sockaddr_in *)addr)->sin_port field of addr ?

So it is not possible to syncrously create and bind the cma id to
ib device based on the destination address (which is the typical info
the active side has).

It is not possible to synchronously bind based on the destination address.
Rdma_bind_addr() binds synchronously to a local device based on a local address
only.  To bind based on a destination address, you use rdma_resolve_addr().
However, the lookup may involve issuing an ARP request in order to determine the
remote hardware address, which is needed in resolving the route.

rdma_resolve_addr resolves two things based on the dest address

+1 the local IB device to use (plus its port number, pkey etc)
+2 the remote (dest) IB GID (or iWARP MAC)

Now, i was thinking that the first step of getting the local device based on the dest address is done by ip_route_output_key() and friends, so you synchronously get a network device (on which you later issues the ARP) whose private/rdma pointer is ipoib_device who has ib device.

I could not approve my assumptions from looking on the cma/addr code,
but if i am correct this opens the door for future enhancement of rdma_bind_addr() to work on non local addresses.


I'm not sure that binding to a local device synchronously based on a remote
address is exactly impossible.  But it doesn't remove the need to resolve the
remote address to a hardware address, which is asynchronous.

sure, i see that you kind of approve my assumptions that its possible.

thanks,

Or.


_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to