Sean Hefty [Mon, 10 Jun 2013 17:57:56 +0000 (10:57 -0700)]
init: Remove USE_IB_ACM configuration option
When the librdmacm is configured, it sets the USE_IB_ACM option
if infininband/acm.h is found. We can remove this option with
very little overhead, which would allow a user to install
ACM after installing the librdmacm, and the librdmacm would be
able to make use of ACM.
Sean Hefty [Mon, 10 Jun 2013 17:57:56 +0000 (10:57 -0700)]
init: Remove USE_IB_ACM configuration option
When the librdmacm is configured, it sets the USE_IB_ACM option
if infininband/acm.h is found. We can remove this option with
very little overhead, which would allow a user to install
ACM after installing the librdmacm, and the librdmacm would be
able to make use of ACM.
Sean Hefty [Mon, 10 Jun 2013 17:57:56 +0000 (10:57 -0700)]
init: Remove USE_IB_ACM configuration option
When the librdmacm is configured, it sets the USE_IB_ACM option
if infininband/acm.h is found. We can remove this option with
very little overhead, which would allow a user to install
ACM after installing the librdmacm, and the librdmacm would be
able to make use of ACM.
Sean Hefty [Mon, 10 Jun 2013 17:57:56 +0000 (10:57 -0700)]
init: Remove USE_IB_ACM configuration option
When the librdmacm is configured, it sets the USE_IB_ACM option
if infininband/acm.h is found. We can remove this option with
very little overhead, which would allow a user to install
ACM after installing the librdmacm, and the librdmacm would be
able to make use of ACM.
Sean Hefty [Mon, 10 Jun 2013 18:07:12 +0000 (11:07 -0700)]
acm: Define needed ACM protocol messages
The librdmacm needs message definitions used to communicate
with the ibacm. It currently pulls these from infiniband/acm.h,
which is installed by ibacm. This creates an install order
dependency on ibacm. However, work on the scalable SA has
the ibacm using the librdmacm (via rsockets) for communication
between the different SSA components.
To resolve this issue, have the librdmacm define the message
structures that it needs to communicate with ibacm. The
librdmacm already defines some ACM messages through configuration
checks. We just expand that capability, which isolates the librdmacm
package from the ibacm package.
Sean Hefty [Mon, 10 Jun 2013 18:07:12 +0000 (11:07 -0700)]
acm: Define needed ACM protocol messages
The librdmacm needs message definitions used to communicate
with the ibacm. It currently pulls these from infiniband/acm.h,
which is installed by ibacm. This creates an install order
dependency on ibacm. However, work on the scalable SA has
the ibacm using the librdmacm (via rsockets) for communication
between the different SSA components.
To resolve this issue, have the librdmacm define the message
structures that it needs to communicate with ibacm. The
librdmacm already defines some ACM messages through configuration
checks. We just expand that capability, which isolates the librdmacm
package from the ibacm package.
Sean Hefty [Mon, 10 Jun 2013 18:07:12 +0000 (11:07 -0700)]
acm: Define needed ACM protocol messages
The librdmacm needs message definitions used to communicate
with the ibacm. It currently pulls these from infiniband/acm.h,
which is installed by ibacm. This creates an install order
dependency on ibacm. However, work on the scalable SA has
the ibacm using the librdmacm (via rsockets) for communication
between the different SSA components.
To resolve this issue, have the librdmacm define the message
structures that it needs to communicate with ibacm. The
librdmacm already has this through configuration checks. We
just expand that capability, which isolates the librdmacm
package from the ibacm package.
Sean Hefty [Mon, 10 Jun 2013 18:07:12 +0000 (11:07 -0700)]
acm: Define needed ACM protocol messages
The librdmacm needs message definitions used to communicate
with the ibacm. It currently pulls these from infiniband/acm.h,
which is installed by ibacm. This creates an install order
dependency on ibacm. However, work on the scalable SA has
the ibacm using the librdmacm (via rsockets) for communication
between the different SSA components.
To resolve this issue, have the librdmacm define the message
structures that it needs to communicate with ibacm. The
librdmacm already has this through configuration checks. We
just expand that capability, which isolates the librdmacm
package from the ibacm package.
Sean Hefty [Mon, 10 Jun 2013 17:57:56 +0000 (10:57 -0700)]
init: Remove USE_IB_ACM configuration option
When the librdmacm is configured, it sets the USE_IB_ACM option
if infininband/acm.h is found. We can remove this option with
very little overhead, which would allow a user to install
ACM after installing the librdmacm, and the librdmacm would be
able to make use of ACM.
File opened by librdmacm are not supposed to be inherited across
exec*(), most of the files are of no use for another program, and
others cannot be used without the associated memory mapping.
This patch changes fopen() open() and socket() to always set
close on exec flag.
This patch also add checks to configure to guess if fopen() supports
"e" flag. If O_CLOEXEC and SOCK_CLOEXEC are supported, fopen() should
support "e". If not supported, its discarded according to POSIX. Many
operating systems have support for fopen("e").
You might find more information about close on exec in the following articles:
- "Excuse me son, but your code is leaking !!!" by Dan Walsh
http://danwalsh.livejournal.com/53603.html
- "Secure File Descriptor Handling" by Ulrich Drepper
http://udrepper.livejournal.com/20407.html
Note: this patch won't set close on exec flag on file descriptors
created by the kernel for completion channel and such.
This is addressed by another kernel patch.
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Following advice in "Autotool Mythbuster" [1], option subdir-objects
can be used to have Makefiles create object files in the same
directory than theirs source files.
It reduces clobbering in the build directory.
[1] "Autotool Mythbuster", by Diego Elio "Flameeyes" Petten`o
http://www.flameeyes.eu/autotools-mythbuster/automake/nonrecursive.html
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Sean Hefty <sean.hefty@intel.com>