[openib-general] CMA issue: bind selects the same port after close

Michael S. Tsirkin mst at mellanox.co.il
Mon Sep 11 12:29:09 PDT 2006


We have encountered an issue in CMA: if
I bind to port 0, destroy the id, then bind to port 0 again
I often get back the same port from both binds.

TCP behaves differently - it seems to assign  new port numbers
each time.
This is an issue for some socket programs that assume that
the same port number won't be reused to a remote side that
connects to the same port after I have  closed by socket will get
connection refused message.
I also see applications looking for a port number that matches
some rule by repeating the create/bind/close cycle.
With CMA they always get back the same port number it seems.

Is this something that can be fixed in CMA?

Thanks,

-- 
MST




More information about the general mailing list