[Pkg-ofed-commits] [libibverbs] 09/24: Imported Upstream version 1.1.1

Ana Beatriz Guerrero López ana at moszumanska.debian.org
Wed Jul 2 13:16:47 UTC 2014


This is an automated email from the git hooks/post-receive script.

ana pushed a commit to branch master
in repository libibverbs.

commit 7b17690cbe3622595144c9b204f38c2097cbc1e4
Author: Ana Guerrero López <ana at ekaia.org>
Date:   Wed Jul 2 15:15:07 2014 +0200

    Imported Upstream version 1.1.1
---
 configure                 | 20 ++++++++--------
 configure.in              |  4 ++--
 examples/devinfo.c        | 17 ++++++++++++--
 examples/rc_pingpong.c    | 32 +++++++++++++------------
 examples/srq_pingpong.c   | 32 +++++++++++++------------
 examples/uc_pingpong.c    | 26 +++++++++++----------
 examples/ud_pingpong.c    | 26 +++++++++++----------
 include/infiniband/arch.h | 59 ++++++++++++++++++++++++++++-------------------
 libibverbs.spec           |  9 +++++---
 libibverbs.spec.in        |  7 ++++--
 src/init.c                |  3 +++
 src/verbs.c               |  1 +
 12 files changed, 139 insertions(+), 97 deletions(-)

diff --git a/configure b/configure
index eba17cd..2672f3b 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for libibverbs 1.1.
+# Generated by GNU Autoconf 2.59 for libibverbs 1.1.1.
 #
 # Report bugs to <general at lists.openfabrics.org>.
 #
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='libibverbs'
 PACKAGE_TARNAME='libibverbs'
-PACKAGE_VERSION='1.1'
-PACKAGE_STRING='libibverbs 1.1'
+PACKAGE_VERSION='1.1.1'
+PACKAGE_STRING='libibverbs 1.1.1'
 PACKAGE_BUGREPORT='general at lists.openfabrics.org'
 
 ac_unique_file="src/ibverbs.h"
@@ -954,7 +954,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libibverbs 1.1 to adapt to many kinds of systems.
+\`configure' configures libibverbs 1.1.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1020,7 +1020,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libibverbs 1.1:";;
+     short | recursive ) echo "Configuration of libibverbs 1.1.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1161,7 +1161,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-libibverbs configure 1.1
+libibverbs configure 1.1.1
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1175,7 +1175,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libibverbs $as_me 1.1, which was
+It was created by libibverbs $as_me 1.1.1, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1821,7 +1821,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=libibverbs
- VERSION=1.1
+ VERSION=1.1.1
 
 
 cat >>confdefs.h <<_ACEOF
@@ -20543,7 +20543,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by libibverbs $as_me 1.1, which was
+This file was extended by libibverbs $as_me 1.1.1, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20606,7 +20606,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-libibverbs config.status 1.1
+libibverbs config.status 1.1.1
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
diff --git a/configure.in b/configure.in
index f2f889a..c6eeb93 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(libibverbs, 1.1, general at lists.openfabrics.org)
+AC_INIT(libibverbs, 1.1.1, general at lists.openfabrics.org)
 AC_CONFIG_SRCDIR([src/ibverbs.h])
 AC_CONFIG_AUX_DIR(config)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(libibverbs, 1.1)
+AM_INIT_AUTOMAKE(libibverbs, 1.1.1)
 
 AM_PROG_LIBTOOL
 
diff --git a/examples/devinfo.c b/examples/devinfo.c
index 28cf8d1..d054999 100644
--- a/examples/devinfo.c
+++ b/examples/devinfo.c
@@ -135,6 +135,18 @@ static const char *speed_str(uint8_t speed)
 	}
 }
 
+static const char *vl_str(uint8_t vl_num)
+{
+	switch (vl_num) {
+	case 1:  return "1";
+	case 2:  return "2";
+	case 3:  return "4";
+	case 4:  return "8";
+	case 5:  return "15";
+	default: return "invalid value";
+	}
+}
+
 static int print_all_port_gids(struct ibv_context *ctx, uint8_t port_num, int tbl_len)
 {
 	union ibv_gid gid;
@@ -266,7 +278,8 @@ static int print_hca_cap(struct ibv_device *ib_dev, uint8_t ib_port)
 		if (verbose) {
 			printf("\t\t\tmax_msg_sz:\t\t0x%x\n", port_attr.max_msg_sz);
 			printf("\t\t\tport_cap_flags:\t\t0x%08x\n", port_attr.port_cap_flags);
-			printf("\t\t\tmax_vl_num:\t\t%d\n", port_attr.max_vl_num);
+			printf("\t\t\tmax_vl_num:\t\t%s (%d)\n",
+			       vl_str(port_attr.max_vl_num), port_attr.max_vl_num);
 			printf("\t\t\tbad_pkey_cntr:\t\t0x%x\n", port_attr.bad_pkey_cntr);
 			printf("\t\t\tqkey_viol_cntr:\t\t0x%x\n", port_attr.qkey_viol_cntr);
 			printf("\t\t\tsm_sl:\t\t\t%d\n", port_attr.sm_sl);
@@ -316,7 +329,7 @@ int main(int argc, char *argv[])
 
 	/* parse command line options */
 	while (1) {
-	        int c;
+		int c;
 		static struct option long_options[] = {
 			{ .name = "ib-dev",   .has_arg = 1, .val = 'd' },
 			{ .name = "ib-port",  .has_arg = 1, .val = 'i' },
diff --git a/examples/rc_pingpong.c b/examples/rc_pingpong.c
index 82623db..258eb8f 100644
--- a/examples/rc_pingpong.c
+++ b/examples/rc_pingpong.c
@@ -82,7 +82,7 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
 		.qp_state		= IBV_QPS_RTR,
 		.path_mtu		= mtu,
 		.dest_qp_num		= dest->qpn,
-		.rq_psn 		= dest->psn,
+		.rq_psn			= dest->psn,
 		.max_dest_rd_atomic	= 1,
 		.min_rnr_timer		= 12,
 		.ah_attr		= {
@@ -105,11 +105,11 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
 		return 1;
 	}
 
-	attr.qp_state 	    = IBV_QPS_RTS;
-	attr.timeout 	    = 14;
-	attr.retry_cnt 	    = 7;
-	attr.rnr_retry 	    = 7;
-	attr.sq_psn 	    = my_psn;
+	attr.qp_state	    = IBV_QPS_RTS;
+	attr.timeout	    = 14;
+	attr.retry_cnt	    = 7;
+	attr.rnr_retry	    = 7;
+	attr.sq_psn	    = my_psn;
 	attr.max_rd_atomic  = 1;
 	if (ibv_modify_qp(ctx->qp, &attr,
 			  IBV_QP_STATE              |
@@ -421,12 +421,12 @@ int pp_close_ctx(struct pingpong_context *ctx)
 static int pp_post_recv(struct pingpong_context *ctx, int n)
 {
 	struct ibv_sge list = {
-		.addr 	= (uintptr_t) ctx->buf,
+		.addr	= (uintptr_t) ctx->buf,
 		.length = ctx->size,
-		.lkey 	= ctx->mr->lkey
+		.lkey	= ctx->mr->lkey
 	};
 	struct ibv_recv_wr wr = {
-		.wr_id 	    = PINGPONG_RECV_WRID,
+		.wr_id	    = PINGPONG_RECV_WRID,
 		.sg_list    = &list,
 		.num_sge    = 1,
 	};
@@ -443,12 +443,12 @@ static int pp_post_recv(struct pingpong_context *ctx, int n)
 static int pp_post_send(struct pingpong_context *ctx)
 {
 	struct ibv_sge list = {
-		.addr 	= (uintptr_t) ctx->buf,
+		.addr	= (uintptr_t) ctx->buf,
 		.length = ctx->size,
-		.lkey 	= ctx->mr->lkey
+		.lkey	= ctx->mr->lkey
 	};
 	struct ibv_send_wr wr = {
-		.wr_id 	    = PINGPONG_SEND_WRID,
+		.wr_id	    = PINGPONG_SEND_WRID,
 		.sg_list    = &list,
 		.num_sge    = 1,
 		.opcode     = IBV_WR_SEND,
@@ -479,7 +479,7 @@ static void usage(const char *argv0)
 int main(int argc, char *argv[])
 {
 	struct ibv_device      **dev_list;
-	struct ibv_device 	*ib_dev;
+	struct ibv_device	*ib_dev;
 	struct pingpong_context *ctx;
 	struct pingpong_dest     my_dest;
 	struct pingpong_dest    *rem_dest;
@@ -590,9 +590,11 @@ int main(int argc, char *argv[])
 			return 1;
 		}
 	} else {
-		for (; (ib_dev = *dev_list); ++dev_list)
-			if (!strcmp(ibv_get_device_name(ib_dev), ib_devname))
+		int i;
+		for (i = 0; dev_list[i]; ++i)
+			if (!strcmp(ibv_get_device_name(dev_list[i]), ib_devname))
 				break;
+		ib_dev = dev_list[i];
 		if (!ib_dev) {
 			fprintf(stderr, "IB device %s not found\n", ib_devname);
 			return 1;
diff --git a/examples/srq_pingpong.c b/examples/srq_pingpong.c
index 6de3e95..490ad0a 100644
--- a/examples/srq_pingpong.c
+++ b/examples/srq_pingpong.c
@@ -90,7 +90,7 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, enum ibv_mtu m
 			.qp_state		= IBV_QPS_RTR,
 			.path_mtu		= mtu,
 			.dest_qp_num		= dest[i].qpn,
-			.rq_psn 		= dest[i].psn,
+			.rq_psn			= dest[i].psn,
 			.max_dest_rd_atomic	= 1,
 			.min_rnr_timer		= 12,
 			.ah_attr		= {
@@ -113,11 +113,11 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, enum ibv_mtu m
 			return 1;
 		}
 
-		attr.qp_state 	    = IBV_QPS_RTS;
-		attr.timeout 	    = 14;
-		attr.retry_cnt 	    = 7;
-		attr.rnr_retry 	    = 7;
-		attr.sq_psn 	    = my_dest[i].psn;
+		attr.qp_state	    = IBV_QPS_RTS;
+		attr.timeout	    = 14;
+		attr.retry_cnt	    = 7;
+		attr.rnr_retry	    = 7;
+		attr.sq_psn	    = my_dest[i].psn;
 		attr.max_rd_atomic  = 1;
 		if (ibv_modify_qp(ctx->qp[i], &attr,
 				  IBV_QP_STATE              |
@@ -480,12 +480,12 @@ int pp_close_ctx(struct pingpong_context *ctx, int num_qp)
 static int pp_post_recv(struct pingpong_context *ctx, int n)
 {
 	struct ibv_sge list = {
-		.addr 	= (uintptr_t) ctx->buf,
+		.addr	= (uintptr_t) ctx->buf,
 		.length = ctx->size,
-		.lkey 	= ctx->mr->lkey
+		.lkey	= ctx->mr->lkey
 	};
 	struct ibv_recv_wr wr = {
-		.wr_id 	    = PINGPONG_RECV_WRID,
+		.wr_id	    = PINGPONG_RECV_WRID,
 		.sg_list    = &list,
 		.num_sge    = 1,
 	};
@@ -502,12 +502,12 @@ static int pp_post_recv(struct pingpong_context *ctx, int n)
 static int pp_post_send(struct pingpong_context *ctx, int qp_index)
 {
 	struct ibv_sge list = {
-		.addr 	= (uintptr_t) ctx->buf,
+		.addr	= (uintptr_t) ctx->buf,
 		.length = ctx->size,
-		.lkey 	= ctx->mr->lkey
+		.lkey	= ctx->mr->lkey
 	};
 	struct ibv_send_wr wr = {
-		.wr_id 	    = PINGPONG_SEND_WRID,
+		.wr_id	    = PINGPONG_SEND_WRID,
 		.sg_list    = &list,
 		.num_sge    = 1,
 		.opcode     = IBV_WR_SEND,
@@ -550,7 +550,7 @@ static void usage(const char *argv0)
 int main(int argc, char *argv[])
 {
 	struct ibv_device      **dev_list;
-	struct ibv_device 	*ib_dev;
+	struct ibv_device	*ib_dev;
 	struct ibv_wc		*wc;
 	struct pingpong_context *ctx;
 	struct pingpong_dest     my_dest[MAX_QP];
@@ -681,9 +681,11 @@ int main(int argc, char *argv[])
 			return 1;
 		}
 	} else {
-		for (; (ib_dev = *dev_list); ++dev_list)
-			if (!strcmp(ibv_get_device_name(ib_dev), ib_devname))
+		int i;
+		for (i = 0; dev_list[i]; ++i)
+			if (!strcmp(ibv_get_device_name(dev_list[i]), ib_devname))
 				break;
+		ib_dev = dev_list[i];
 		if (!ib_dev) {
 			fprintf(stderr, "IB device %s not found\n", ib_devname);
 			return 1;
diff --git a/examples/uc_pingpong.c b/examples/uc_pingpong.c
index 1b2b1b4..b6051c8 100644
--- a/examples/uc_pingpong.c
+++ b/examples/uc_pingpong.c
@@ -82,7 +82,7 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
 		.qp_state		= IBV_QPS_RTR,
 		.path_mtu		= mtu,
 		.dest_qp_num		= dest->qpn,
-		.rq_psn 		= dest->psn,
+		.rq_psn		= dest->psn,
 		.ah_attr		= {
 			.is_global	= 0,
 			.dlid		= dest->lid,
@@ -101,8 +101,8 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
 		return 1;
 	}
 
-	attr.qp_state 	    = IBV_QPS_RTS;
-	attr.sq_psn 	    = my_psn;
+	attr.qp_state	    = IBV_QPS_RTS;
+	attr.sq_psn	    = my_psn;
 	if (ibv_modify_qp(ctx->qp, &attr,
 			  IBV_QP_STATE              |
 			  IBV_QP_SQ_PSN)) {
@@ -409,12 +409,12 @@ int pp_close_ctx(struct pingpong_context *ctx)
 static int pp_post_recv(struct pingpong_context *ctx, int n)
 {
 	struct ibv_sge list = {
-		.addr 	= (uintptr_t) ctx->buf,
+		.addr	= (uintptr_t) ctx->buf,
 		.length = ctx->size,
-		.lkey 	= ctx->mr->lkey
+		.lkey	= ctx->mr->lkey
 	};
 	struct ibv_recv_wr wr = {
-		.wr_id 	    = PINGPONG_RECV_WRID,
+		.wr_id	    = PINGPONG_RECV_WRID,
 		.sg_list    = &list,
 		.num_sge    = 1,
 	};
@@ -431,12 +431,12 @@ static int pp_post_recv(struct pingpong_context *ctx, int n)
 static int pp_post_send(struct pingpong_context *ctx)
 {
 	struct ibv_sge list = {
-		.addr 	= (uintptr_t) ctx->buf,
+		.addr	= (uintptr_t) ctx->buf,
 		.length = ctx->size,
-		.lkey 	= ctx->mr->lkey
+		.lkey	= ctx->mr->lkey
 	};
 	struct ibv_send_wr wr = {
-		.wr_id 	    = PINGPONG_SEND_WRID,
+		.wr_id	    = PINGPONG_SEND_WRID,
 		.sg_list    = &list,
 		.num_sge    = 1,
 		.opcode     = IBV_WR_SEND,
@@ -467,7 +467,7 @@ static void usage(const char *argv0)
 int main(int argc, char *argv[])
 {
 	struct ibv_device      **dev_list;
-	struct ibv_device 	*ib_dev;
+	struct ibv_device	*ib_dev;
 	struct pingpong_context *ctx;
 	struct pingpong_dest     my_dest;
 	struct pingpong_dest    *rem_dest;
@@ -578,9 +578,11 @@ int main(int argc, char *argv[])
 			return 1;
 		}
 	} else {
-		for (; (ib_dev = *dev_list); ++dev_list)
-			if (!strcmp(ibv_get_device_name(ib_dev), ib_devname))
+		int i;
+		for (i = 0; dev_list[i]; ++i)
+			if (!strcmp(ibv_get_device_name(dev_list[i]), ib_devname))
 				break;
+		ib_dev = dev_list[i];
 		if (!ib_dev) {
 			fprintf(stderr, "IB device %s not found\n", ib_devname);
 			return 1;
diff --git a/examples/ud_pingpong.c b/examples/ud_pingpong.c
index d22ce8b..c631e25 100644
--- a/examples/ud_pingpong.c
+++ b/examples/ud_pingpong.c
@@ -88,15 +88,15 @@ static int pp_connect_ctx(struct pingpong_context *ctx, int port, int my_psn,
 		.port_num      = port
 	};
 
-	attr.qp_state 		= IBV_QPS_RTR;
+	attr.qp_state		= IBV_QPS_RTR;
 
 	if (ibv_modify_qp(ctx->qp, &attr, IBV_QP_STATE)) {
 		fprintf(stderr, "Failed to modify QP to RTR\n");
 		return 1;
 	}
 
-	attr.qp_state 	    = IBV_QPS_RTS;
-	attr.sq_psn 	    = my_psn;
+	attr.qp_state	    = IBV_QPS_RTS;
+	attr.sq_psn	    = my_psn;
 
 	if (ibv_modify_qp(ctx->qp, &attr,
 			  IBV_QP_STATE              |
@@ -415,12 +415,12 @@ int pp_close_ctx(struct pingpong_context *ctx)
 static int pp_post_recv(struct pingpong_context *ctx, int n)
 {
 	struct ibv_sge list = {
-		.addr 	= (uintptr_t) ctx->buf,
+		.addr	= (uintptr_t) ctx->buf,
 		.length = ctx->size + 40,
-		.lkey 	= ctx->mr->lkey
+		.lkey	= ctx->mr->lkey
 	};
 	struct ibv_recv_wr wr = {
-		.wr_id 	    = PINGPONG_RECV_WRID,
+		.wr_id	    = PINGPONG_RECV_WRID,
 		.sg_list    = &list,
 		.num_sge    = 1,
 	};
@@ -437,12 +437,12 @@ static int pp_post_recv(struct pingpong_context *ctx, int n)
 static int pp_post_send(struct pingpong_context *ctx, uint32_t qpn)
 {
 	struct ibv_sge list = {
-		.addr 	= (uintptr_t) ctx->buf + 40,
+		.addr	= (uintptr_t) ctx->buf + 40,
 		.length = ctx->size,
-		.lkey 	= ctx->mr->lkey
+		.lkey	= ctx->mr->lkey
 	};
 	struct ibv_send_wr wr = {
-		.wr_id 	    = PINGPONG_SEND_WRID,
+		.wr_id	    = PINGPONG_SEND_WRID,
 		.sg_list    = &list,
 		.num_sge    = 1,
 		.opcode     = IBV_WR_SEND,
@@ -479,7 +479,7 @@ static void usage(const char *argv0)
 int main(int argc, char *argv[])
 {
 	struct ibv_device      **dev_list;
-	struct ibv_device 	*ib_dev;
+	struct ibv_device	*ib_dev;
 	struct pingpong_context *ctx;
 	struct pingpong_dest     my_dest;
 	struct pingpong_dest    *rem_dest;
@@ -581,9 +581,11 @@ int main(int argc, char *argv[])
 			return 1;
 		}
 	} else {
-		for (; (ib_dev = *dev_list); ++dev_list)
-			if (!strcmp(ibv_get_device_name(ib_dev), ib_devname))
+		int i;
+		for (i = 0; dev_list[i]; ++i)
+			if (!strcmp(ibv_get_device_name(dev_list[i]), ib_devname))
 				break;
+		ib_dev = dev_list[i];
 		if (!ib_dev) {
 			fprintf(stderr, "IB device %s not found\n", ib_devname);
 			return 1;
diff --git a/include/infiniband/arch.h b/include/infiniband/arch.h
index 6a04287..df4c949 100644
--- a/include/infiniband/arch.h
+++ b/include/infiniband/arch.h
@@ -56,13 +56,17 @@ static inline uint64_t ntohll(uint64_t x) { return x; }
  *     macro by either the compiler or the CPU.
  * wmb() - write memory barrier.  No stores may be reordered across
  *     this macro by either the compiler or the CPU.
+ * wc_wmb() - flush write combine buffers.  No write-combined writes
+ *     will be reordered across this macro by either the compiler or
+ *     the CPU.
  */
 
 #if defined(__i386__)
 
-#define mb()	asm volatile("lock; addl $0,0(%%esp) " ::: "memory")
-#define rmb()	mb()
-#define wmb()	asm volatile("" ::: "memory")
+#define mb()	 asm volatile("lock; addl $0,0(%%esp) " ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 asm volatile("" ::: "memory")
+#define wc_wmb() mb()
 
 #elif defined(__x86_64__)
 
@@ -70,47 +74,54 @@ static inline uint64_t ntohll(uint64_t x) { return x; }
  * Only use lfence for mb() and rmb() because we don't care about
  * ordering against non-temporal stores (for now at least).
  */
-#define mb()	asm volatile("lfence" ::: "memory")
-#define rmb()	mb()
-#define wmb()	asm volatile("" ::: "memory")
+#define mb()	 asm volatile("lfence" ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 asm volatile("" ::: "memory")
+#define wc_wmb() asm volatile("sfence" ::: "memory")
 
 #elif defined(__PPC64__)
 
-#define mb()	asm volatile("sync" ::: "memory")
-#define rmb()	asm volatile("lwsync" ::: "memory")
-#define wmb()	mb()
+#define mb()	 asm volatile("sync" ::: "memory")
+#define rmb()	 asm volatile("lwsync" ::: "memory")
+#define wmb()	 mb()
+#define wc_wmb() wmb()
 
 #elif defined(__ia64__)
 
-#define mb()	asm volatile("mf" ::: "memory")
-#define rmb()	mb()
-#define wmb()	mb()
+#define mb()	 asm volatile("mf" ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 mb()
+#define wc_wmb() asm volatile("fwb" ::: "memory")
 
 #elif defined(__PPC__)
 
-#define mb()	asm volatile("sync" ::: "memory")
-#define rmb()	mb()
-#define wmb()	asm volatile("eieio" ::: "memory")
+#define mb()	 asm volatile("sync" ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 asm volatile("eieio" ::: "memory")
+#define wc_wmb() wmb()
 
 #elif defined(__sparc_v9__)
 
-#define mb()	asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory")
-#define rmb()	asm volatile("membar #LoadLoad" ::: "memory")
-#define wmb()	asm volatile("membar #StoreStore" ::: "memory")
+#define mb()	 asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory")
+#define rmb()	 asm volatile("membar #LoadLoad" ::: "memory")
+#define wmb()	 asm volatile("membar #StoreStore" ::: "memory")
+#define wc_wmb() wmb()
 
 #elif defined(__sparc__)
 
-#define mb()	asm volatile("" ::: "memory")
-#define rmb()	mb()
-#define wmb()	mb()
+#define mb()	 asm volatile("" ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 mb()
+#define wc_wmb() wmb()
 
 #else
 
 #warning No architecture specific defines found.  Using generic implementation.
 
-#define mb()	asm volatile("" ::: "memory")
-#define rmb()	mb()
-#define wmb()	mb()
+#define mb()	 asm volatile("" ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 mb()
+#define wc_wmb() wmb()
 
 #endif
 
diff --git a/libibverbs.spec b/libibverbs.spec
index e00c81d..5a29eb0 100644
--- a/libibverbs.spec
+++ b/libibverbs.spec
@@ -1,12 +1,12 @@
 Name: libibverbs
-Version: 1.1
+Version: 1.1.1
 Release: 1%{?dist}
 Summary: A library for direct userspace use of InfiniBand hardware
 
 Group: System Environment/Libraries
 License: GPL/BSD
 Url: http://openfabrics.org/
-Source: http://openfabrics.org/downloads/libibverbs-1.1.tar.gz
+Source: http://openfabrics.org/downloads/libibverbs-1.1.1.tar.gz
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
@@ -44,7 +44,7 @@ Useful libibverbs1 example programs such as ibv_devinfo, which
 displays information about InfiniBand devices.
 
 %prep
-%setup -q -n %{name}-1.1
+%setup -q -n %{name}-1.1.1
 
 %build
 %configure
@@ -83,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/*
 
 %changelog
+* Fri Jun 15 2007 Roland Dreier <rdreier at cisco.com> - 1.1.1-1
+- New upstream release
+
 * Wed Apr 11 2007 Roland Dreier <rdreier at cisco.com> - 1.1-1
 - New upstream release
 
diff --git a/libibverbs.spec.in b/libibverbs.spec.in
index 40310e2..459e6f2 100644
--- a/libibverbs.spec.in
+++ b/libibverbs.spec.in
@@ -1,12 +1,12 @@
 Name: libibverbs
-Version: 1.1
+Version: 1.1.1
 Release: 1%{?dist}
 Summary: A library for direct userspace use of InfiniBand hardware
 
 Group: System Environment/Libraries
 License: GPL/BSD
 Url: http://openfabrics.org/
-Source: http://openfabrics.org/downloads/libibverbs-1.1.tar.gz
+Source: http://openfabrics.org/downloads/libibverbs-1.1.1.tar.gz
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
@@ -83,6 +83,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/*
 
 %changelog
+* Fri Jun 15 2007 Roland Dreier <rdreier at cisco.com> - 1.1.1-1
+- New upstream release
+
 * Wed Apr 11 2007 Roland Dreier <rdreier at cisco.com> - 1.1-1
 - New upstream release
 
diff --git a/src/init.c b/src/init.c
index a17ae16..a8bebd2 100644
--- a/src/init.c
+++ b/src/init.c
@@ -412,6 +412,9 @@ static void check_memlock_limit(void)
 {
 	struct rlimit rlim;
 
+	if (!geteuid())
+		return;
+
 	if (getrlimit(RLIMIT_MEMLOCK, &rlim)) {
 		fprintf(stderr, PFX "Warning: getrlimit(RLIMIT_MEMLOCK) failed.");
 		return;
diff --git a/src/verbs.c b/src/verbs.c
index febf32a..f5cf4d3 100644
--- a/src/verbs.c
+++ b/src/verbs.c
@@ -406,6 +406,7 @@ struct ibv_qp *__ibv_create_qp(struct ibv_pd *pd,
 		qp->recv_cq    	     = qp_init_attr->recv_cq;
 		qp->srq        	     = qp_init_attr->srq;
 		qp->qp_type          = qp_init_attr->qp_type;
+		qp->state	     = IBV_QPS_RESET;
 		qp->events_completed = 0;
 		pthread_mutex_init(&qp->mutex, NULL);
 		pthread_cond_init(&qp->cond, NULL);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ofed/libibverbs.git



More information about the Pkg-ofed-commits mailing list