Whamcloud - gitweb
LU-5140 build: Make ko2iblnd buildable with Mellanox and newer kernels 71/10571/3
authorJames Simmons <uja.ornl@gmail.com>
Thu, 5 Jun 2014 00:36:17 +0000 (20:36 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 16 Jun 2014 14:07:23 +0000 (14:07 +0000)
The libcfs layer handles different level of support for process
namespace support. It does this by examining the uidgid.h
header. Both newer kernels and the Mellanox external OFED stack
supply their own uidgid.h header. In the current ko2iblnd
driver it completely ignores the Mellanox uidgid.h version
which ends up conflicting with the native uidgid.h header. The
reason libcfs misses the Mellanox handling is because the libcfs
and lnet headers are placed before the Mellanox headers so the
definations are missed. This patch moves all the libcfs and lnet
headers after the Mellanox header section.

Change-Id: Ibd7425b4a4d5b0f59c48e2007d870c67adb5f63d
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/10571
Tested-by: Jenkins
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/curproc.h
lnet/klnds/o2iblnd/o2iblnd.h

index e5e3d57..aa144e7 100644 (file)
@@ -45,6 +45,9 @@
 
 #if !defined(HAVE_UIDGID_HEADER) || !defined(__KERNEL__)
 
+#ifndef _LINUX_UIDGID_H
+#define _LINUX_UIDGID_H
+
 typedef uid_t kuid_t;
 typedef gid_t kgid_t;
 
@@ -106,6 +109,8 @@ static inline bool gid_valid(kgid_t gid)
 {
        return (gid != INVALID_GID);
 }
+#endif /* _LINUX_UIDGID_H */
+
 #endif
 
 int cfs_get_environ(const char *key, char *value, int *val_len);
index f5edc51..26524f5 100644 (file)
 #include <net/sock.h>
 #include <linux/in.h>
 
-#define DEBUG_SUBSYSTEM S_LND
-
-#include <libcfs/libcfs.h>
-#include <lnet/lnet.h>
-#include <lnet/lib-lnet.h>
-
 #ifdef HAVE_COMPAT_RDMA
 #include <linux/compat-2.6.h>
 #endif
 #include <rdma/ib_verbs.h>
 #include <rdma/ib_fmr_pool.h>
 
+#define DEBUG_SUBSYSTEM S_LND
+
+#include <libcfs/libcfs.h>
+#include <lnet/lnet.h>
+#include <lnet/lib-lnet.h>
+
 #define IBLND_PEER_HASH_SIZE           101     /* # peer lists */
 /* # scheduler loops before reschedule */
 #define IBLND_RESCHED                  100