[openib-general] return error when rdma_listen fails
Pete Wyckoff
pw at osc.edu
Wed Aug 16 13:51:04 PDT 2006
mshefty at ichips.intel.com wrote on Wed, 09 Aug 2006 14:07 -0700:
> Pete Wyckoff wrote:
> >Calling rdma_listen() on a cm_id bound to INADDR_ANY can fail, e.g.
> >with EADDRINUSE, but report no error back to the user. This patch
> >fixes that by propagating the error. Success occurs only if at
> >least one of the possibly multiple devices in the system was able to
> >listen. In the case of multiple devices reporting errors on listen,
> >only the first error value is returned. iwarp branch.
>
> There's a problem if the listen is done before any devices have been added
> to the system. In this case, the listen should succeed.
That would be easy enough to fix for that one special case. But
tell me:
1) When a device gets added to the system, is there code that applies
existing INADDR_ANY listens to the new device? Where?
2) If so, then I would expect you to extend your logic to argue
against my patch in its entirety. There's always the chance that
even if no device could satisfy the listen immediately, one might be
added in the future.
This all strikes me as rather unexpected from an application-writer
point of view. Tom raised some good points. What I want in my
application is that rdma_listen should cause at least one device to
listen. I do not want the program to wait for a device to appear.
Should I grab the device list and bind to a particular source IP
rather than trying to use INADDR_ANY?
By the way, shouldn't the rdma_bind_addr call that preceeded
rdma_listen have failed when I tried to bind to INADDR_ANY with a
specified port, but that port was already in use by a device? This
could be just another failure to keep the amso NIC state consistent
with the host state.
-- Pete
More information about the general
mailing list