[ofa-general] implicit address binding by rdma_resolve_addr
Alexander Mikheev
alexm at voltaire.com
Tue Aug 7 00:27:02 PDT 2007
It is a problem when you want implement something like the UDP server
that
handles all request on the single socket:
bind(fd, ...);
listen(fd);
while(1) {
read_request(fd, ...);
do_work();
write_responce(fd, ...);
}
Correct me if I am wrong, but implementing this scenario for UD will
look like this:
/* accept handling not shown... */
rdma_bind_addr(id, ...);
rdma_listen(id)
while(1) {
read_request();
do_work();
if(new_client) { /* check if we already connected to client */
/* following is not going to work because local address
is already bound */
rdma_resolve_addr(my_local_already_bound_addr,
client_addr);
do_connect();
}
write_responce();
}
If rdma_bind is done for the specific local ip and port, then I would
like to be able to resolve address from the specific ip/port to the
client.
-----Original Message-----
From: Sean Hefty [mailto:mshefty at ichips.intel.com]
Sent: Monday, August 06, 2007 8:15 PM
To: Or Gerlitz
Cc: Sean Hefty; Alexander Mikheev; Alex Rosenbaum;
general at lists.openfabrics.org
Subject: Re: [ofa-general] implicit address binding by rdma_resolve_addr
> We have noticed that when rdma_resolve_addr is provided with src
> address, the rdma cm does an implicit --address-- (=ip/port) binding,
> which for example has the side effect of disallowing two processes to
> call rdma_resolve_addr() with the same src port.
>
> Does this implicit binding mimics the network stack behavior
> under similar flow when socket are used?
Specifying a source address with rdma_resolve_addr is similar to calling
socket bind. I can't think of a reason why an app would want to specify
a source port when calling rdma_resolve_addr. Specifying a source
address (wild card port) allows binding to a specific RDMA device.
- Sean
More information about the general
mailing list