]> git.openfabrics.org - ~shefty/libibcm.git/commitdiff
r3373: Make libibat the definitive source of <infiniband/sa.h>. Remove the include
authorRoland Dreier <rolandd@cisco.com>
Mon, 12 Sep 2005 16:34:20 +0000 (16:34 +0000)
committerRoland Dreier <roland@topspin.com>
Mon, 12 Sep 2005 16:34:20 +0000 (16:34 +0000)
from libibcm, and make libibcm explicitly depend on libibat to build.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Makefile.am
configure.in
include/infiniband/sa.h [deleted file]

index 9691c5493281cfb6f014e9842800625714d0a2fe..e07ee21ae1acf7e2b9c506875f012dc14a700200 100644 (file)
@@ -20,19 +20,15 @@ src_libibcm_la_LDFLAGS = -avoid-version $(ucm_version_script)
 
 bin_PROGRAMS = examples/ucmpost
 examples_ucmpost_SOURCES = examples/cmpost.c
-examples_ucmpost_LDADD = $(top_builddir)/src/libibcm.la \
-                        $(libdir)/libibverbs.la \
-                        $(libdir)/libibat.la
+examples_ucmpost_LDADD = $(top_builddir)/src/libibcm.la
 
 libibcmincludedir = $(includedir)/infiniband
 
 libibcminclude_HEADERS = include/infiniband/cm_abi.h \
-                        include/infiniband/cm.h \
-                        include/infiniband/sa.h
+                        include/infiniband/cm.h
 
 EXTRA_DIST = include/infiniband/cm_abi.h \
             include/infiniband/cm.h \
-            include/infiniband/sa.h \
             src/libibcm.map \
             libibcm.spec.in
 
index 2eb4bee5f7a9b9dd8fa23b8c8be63e99769e4116..76082c6a0ba28eda4f0b19f571bce69415e84c33 100644 (file)
@@ -13,10 +13,16 @@ dnl Checks for programs
 AC_PROG_CC
 
 dnl Checks for libraries
+AC_CHECK_LIB(ibverbs, ibv_get_devices, [],
+    AC_MSG_ERROR([ibv_get_devices() not found.  libibcm requires libibcm.]))
+AC_CHECK_LIB(ibat, ib_at_route_by_ip, [],
+    AC_MSG_ERROR([ib_at_route_by_ip() not found.  libibcm requires libat.]))
 
 dnl Checks for header files.
 AC_CHECK_HEADER(infiniband/verbs.h, [],
     AC_MSG_ERROR([<infiniband/verbs.h> not found.  Is libibverbs installed?]))
+AC_CHECK_HEADER(infiniband/at.h, [],
+    AC_MSG_ERROR([<infiniband/at.h> not found.  Is libibat installed?]))
 AC_HEADER_STDC
 
 dnl Checks for typedefs, structures, and compiler characteristics.
diff --git a/include/infiniband/sa.h b/include/infiniband/sa.h
deleted file mode 100644 (file)
index a5f960e..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2004 Topspin Communications.  All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * $Id$
- */
-
-#ifndef IB_SA_H
-#define IB_SA_H
-
-#include <infiniband/verbs.h>
-
-enum ib_sa_rate {
-       IB_SA_RATE_2_5_GBPS = 2,
-       IB_SA_RATE_5_GBPS   = 5,
-       IB_SA_RATE_10_GBPS  = 3,
-       IB_SA_RATE_20_GBPS  = 6,
-       IB_SA_RATE_30_GBPS  = 4,
-       IB_SA_RATE_40_GBPS  = 7,
-       IB_SA_RATE_60_GBPS  = 8,
-       IB_SA_RATE_80_GBPS  = 9,
-       IB_SA_RATE_120_GBPS = 10
-};
-
-static inline int ib_sa_rate_enum_to_int(enum ib_sa_rate rate)
-{
-       switch (rate) {
-       case IB_SA_RATE_2_5_GBPS: return  1;
-       case IB_SA_RATE_5_GBPS:   return  2;
-       case IB_SA_RATE_10_GBPS:  return  4;
-       case IB_SA_RATE_20_GBPS:  return  8;
-       case IB_SA_RATE_30_GBPS:  return 12;
-       case IB_SA_RATE_40_GBPS:  return 16;
-       case IB_SA_RATE_60_GBPS:  return 24;
-       case IB_SA_RATE_80_GBPS:  return 32;
-       case IB_SA_RATE_120_GBPS: return 48;
-       default:                  return -1;
-       }
-}
-
-struct ib_sa_path_rec {
-       /* reserved */
-       /* reserved */
-       union ibv_gid dgid;
-       union ibv_gid sgid;
-       uint16_t      dlid;
-       uint16_t      slid;
-       int           raw_traffic;
-       /* reserved */
-       uint32_t      flow_label;
-       uint8_t       hop_limit;
-       uint8_t       traffic_class;
-       int           reversible;
-       uint8_t       numb_path;
-       uint16_t      pkey;
-       /* reserved */
-       uint8_t       sl;
-       uint8_t       mtu_selector;
-       enum ibv_mtu  mtu;
-       uint8_t       rate_selector;
-       uint8_t       rate;
-       uint8_t       packet_life_time_selector;
-       uint8_t       packet_life_time;
-       uint8_t       preference;
-};
-
-#endif /* IB_SA_H */