aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-09-07 20:01:31 +0000
committerRoland Dreier <rolandd@cisco.com>2006-11-09 19:57:02 -0800
commit90f6e9e1ad8026bf4f3c2d6337b0928c7825597a (patch)
tree8ca5a418c75b0f77d30a5f8f860aca419efc2d38
parent56df03dbcc544cb9e80c5ec9fd346fbc611b7cac (diff)
downloadlibmthca-90f6e9e1ad8026bf4f3c2d6337b0928c7825597a.tar.gz
Remove htonll and ntohll from libmthca
Move htonll() and ntohll() from libmthca into libibverb's <infiniband/arch.h>, and use them in ibv_get_device_guid() to avoid pointer aliasing (which some versions of gcc miscompile). Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r--ChangeLog5
-rw-r--r--configure.in4
-rw-r--r--debian/changelog2
-rw-r--r--src/mthca.h11
4 files changed, 8 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 6547f7c..d4cdc23 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-07 Roland Dreier <roland@cisco.com>
+
+ * src/mthca.h: Get rid of ntohll() and htonll() now that
+ libibverbs defines them in <infiniband/arch.h>.
+
2005-08-31 Roland Dreier <roland@cisco.com>
* src/memfree.c (mthca_free_db): When we free a doorbell record,
diff --git a/configure.in b/configure.in
index 568d98b..ce67f84 100644
--- a/configure.in
+++ b/configure.in
@@ -1,11 +1,11 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
-AC_INIT(libmthca, 1.0-rc1, openib-general@openib.org)
+AC_INIT(libmthca, 1.0-rc2, openib-general@openib.org)
AC_CONFIG_SRCDIR([src/mthca.h])
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libmthca, 1.0-rc1)
+AM_INIT_AUTOMAKE(libmthca, 1.0-rc2)
AM_PROG_LIBTOOL
dnl Checks for programs
diff --git a/debian/changelog b/debian/changelog
index 11997fc..6e4f8a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-libmthca (1.0-rc1-1) unstable; urgency=low
+libmthca (1.0-rc2-1) unstable; urgency=low
* Initial Release.
(Closes: #325753)
diff --git a/src/mthca.h b/src/mthca.h
index be6faf4..1d85d36 100644
--- a/src/mthca.h
+++ b/src/mthca.h
@@ -36,9 +36,6 @@
#ifndef MTHCA_H
#define MTHCA_H
-#include <endian.h>
-#include <byteswap.h>
-
#include <infiniband/driver.h>
#include <infiniband/arch.h>
@@ -212,14 +209,6 @@ struct mthca_ah {
uint32_t key;
};
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-static inline uint64_t htonll(uint64_t x) { return bswap_64(x); }
-static inline uint64_t ntohll(uint64_t x) { return bswap_64(x); }
-#elif __BYTE_ORDER == __BIG_ENDIAN
-static inline uint64_t htonll(uint64_t x) { return x; }
-static inline uint64_t ntohll(uint64_t x) { return x; }
-#endif
-
static inline unsigned long align(unsigned long val, unsigned long align)
{
return (val + align - 1) & ~(align - 1);