]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
init: Remove USE_IB_ACM configuration option
authorSean Hefty <sean.hefty@intel.com>
Mon, 10 Jun 2013 17:52:29 +0000 (10:52 -0700)
committerSean Hefty <sean.hefty@intel.com>
Mon, 10 Jun 2013 17:52:29 +0000 (10:52 -0700)
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.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
configure.ac
examples/cmatose.c

index 35d79dd46897d54ec28457cc8bde37636741fdc7..3ce7a6ead68b2d382b62b15c63a7f28438b02031 100644 (file)
@@ -70,9 +70,6 @@ AC_CHECK_HEADER(valgrind/memcheck.h, [],
 fi
 fi
 
-AC_CHECK_HEADER(infiniband/acm.h, 
-       AC_DEFINE([USE_IB_ACM], 1, [setting IBACM support]), [])
-
 AC_CHECK_HEADER(infiniband/acm.h,
        AC_CHECK_MEMBER(struct acm_msg.resolve_data, [],
                AC_DEFINE(DEFINE_ACM_MSG, 1, [adding ACM message definition]),
index ca92f11a953ca66ce41ab43206ae49feb485b081..2971ed1a070d058f54230fc82a9f3f4c50a39f33 100644 (file)
@@ -44,6 +44,7 @@
 #include <getopt.h>
 
 #include <rdma/rdma_cma.h>
+#include <infiniband/ib.h>
 #include "common.h"
 
 struct cmatest_node {
@@ -510,7 +511,7 @@ static int run_server(void)
 
        memset(&hints, 0, sizeof hints);
        if (addr_type == 'g') {
-               hints.ai_flags = RAI_FAMILY;
+               hints.ai_flags = RAI_FAMILY | RAI_NUMERICHOST;
                hints.ai_family = AF_IB;
        }
        hints.ai_flags |= RAI_PASSIVE;
@@ -591,7 +592,7 @@ static int run_client(void)
 
        memset(&hints, 0, sizeof hints);
        if (addr_type == 'g') {
-               hints.ai_flags = RAI_FAMILY;
+               hints.ai_flags = RAI_FAMILY | RAI_NUMERICHOST;
                hints.ai_family = AF_IB;
        }
        hints.ai_port_space = RDMA_PS_TCP;
@@ -651,7 +652,7 @@ int main(int argc, char **argv)
 {
        int op, ret;
 
-       while ((op = getopt(argc, argv, "s:b:c:C:S:t:p:m")) != -1) {
+       while ((op = getopt(argc, argv, "s:b:c:C:S:t:p:mf:")) != -1) {
                switch (op) {
                case 's':
                        dst_addr = optarg;
@@ -678,6 +679,9 @@ int main(int argc, char **argv)
                case 'm':
                        migrate = 1;
                        break;
+               case 'f':
+                       addr_type = optarg[0];
+                       break;
                default:
                        printf("usage: %s\n", argv[0]);
                        printf("\t[-s server_address]\n");