Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 2014 13:38:11 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273774 - in head/contrib/ofed: librdmacm/examples librdmacm/examples/build librdmacm/examples/build/cmatose librdmacm/examples/build/mckey librdmacm/examples/build/rping librdmacm/exam...
Message-ID:  <201410281338.s9SDcBXk058646@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Oct 28 13:38:10 2014
New Revision: 273774
URL: https://svnweb.freebsd.org/changeset/base/273774

Log:
  Make some infiniband example utilities easily buildable:
  - Add new Makefiles.
  - Add more include directories when building.
  - Fixed a printf() formatting string.
  
  MFC after:	3 days
  Sponsored by:	Mellanox Technologies

Added:
  head/contrib/ofed/librdmacm/examples/build/
  head/contrib/ofed/librdmacm/examples/build/Makefile   (contents, props changed)
  head/contrib/ofed/librdmacm/examples/build/Makefile.inc   (contents, props changed)
  head/contrib/ofed/librdmacm/examples/build/cmatose/
  head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile   (contents, props changed)
  head/contrib/ofed/librdmacm/examples/build/mckey/
  head/contrib/ofed/librdmacm/examples/build/mckey/Makefile   (contents, props changed)
  head/contrib/ofed/librdmacm/examples/build/rping/
  head/contrib/ofed/librdmacm/examples/build/rping/Makefile   (contents, props changed)
  head/contrib/ofed/librdmacm/examples/build/udaddy/
  head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile   (contents, props changed)
Modified:
  head/contrib/ofed/librdmacm/examples/rping.c
  head/contrib/ofed/usr.lib/Makefile.inc

Added: head/contrib/ofed/librdmacm/examples/build/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/contrib/ofed/librdmacm/examples/build/Makefile	Tue Oct 28 13:38:10 2014	(r273774)
@@ -0,0 +1,3 @@
+SUBDIR= cmatose mckey rping udaddy
+
+.include <bsd.subdir.mk>

Added: head/contrib/ofed/librdmacm/examples/build/Makefile.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/contrib/ofed/librdmacm/examples/build/Makefile.inc	Tue Oct 28 13:38:10 2014	(r273774)
@@ -0,0 +1,9 @@
+IBDIR=../../../..
+
+CFLAGS+= \
+	-I${IBDIR}/include/infiniband \
+	-I${IBDIR}/include \
+	-I${IBDIR}/librdmacm/include \
+	-I${IBDIR}/libibv/include \
+	-I${IBDIR}/libibverbs/include
+

Added: head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/contrib/ofed/librdmacm/examples/build/cmatose/Makefile	Tue Oct 28 13:38:10 2014	(r273774)
@@ -0,0 +1,10 @@
+#
+# $FreeBSD$
+#
+.PATH: ${.CURDIR}/../..
+PROG=	cmatose
+MAN=
+SRCS=	cmatose.c
+LDADD+= -libverbs -lrdmacm -lpthread
+
+.include <bsd.prog.mk>

Added: head/contrib/ofed/librdmacm/examples/build/mckey/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/contrib/ofed/librdmacm/examples/build/mckey/Makefile	Tue Oct 28 13:38:10 2014	(r273774)
@@ -0,0 +1,10 @@
+#
+# $FreeBSD$
+#
+.PATH: ${.CURDIR}/../..
+PROG=	mckey
+MAN=
+SRCS=	mckey.c
+LDADD+= -libverbs -lrdmacm -lpthread
+
+.include <bsd.prog.mk>

Added: head/contrib/ofed/librdmacm/examples/build/rping/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/contrib/ofed/librdmacm/examples/build/rping/Makefile	Tue Oct 28 13:38:10 2014	(r273774)
@@ -0,0 +1,10 @@
+#
+# $FreeBSD$
+#
+.PATH: ${.CURDIR}/../..
+PROG=	rping
+MAN=
+SRCS=	rping.c
+LDADD+= -libverbs -lrdmacm -lpthread
+
+.include <bsd.prog.mk>

Added: head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/contrib/ofed/librdmacm/examples/build/udaddy/Makefile	Tue Oct 28 13:38:10 2014	(r273774)
@@ -0,0 +1,10 @@
+#
+# $FreeBSD$
+#
+.PATH: ${.CURDIR}/../..
+PROG=	udaddy
+MAN=
+SRCS=	udaddy.c
+LDADD+= -libverbs -lrdmacm -lpthread
+
+.include <bsd.prog.mk>

Modified: head/contrib/ofed/librdmacm/examples/rping.c
==============================================================================
--- head/contrib/ofed/librdmacm/examples/rping.c	Tue Oct 28 12:00:39 2014	(r273773)
+++ head/contrib/ofed/librdmacm/examples/rping.c	Tue Oct 28 13:38:10 2014	(r273774)
@@ -1148,8 +1148,9 @@ int main(int argc, char *argv[])
 			if ((cb->size < RPING_MIN_BUFSIZE) ||
 			    (cb->size > (RPING_BUFSIZE - 1))) {
 				fprintf(stderr, "Invalid size %d "
-				       "(valid range is %Zd to %d)\n",
-				       cb->size, RPING_MIN_BUFSIZE, RPING_BUFSIZE);
+				       "(valid range is %d to %d)\n",
+				       (int)cb->size, (int)(RPING_MIN_BUFSIZE),
+				       (int)(RPING_BUFSIZE));
 				ret = EINVAL;
 			} else
 				DEBUG_LOG("size %d\n", (int) atoi(optarg));

Modified: head/contrib/ofed/usr.lib/Makefile.inc
==============================================================================
--- head/contrib/ofed/usr.lib/Makefile.inc	Tue Oct 28 12:00:39 2014	(r273773)
+++ head/contrib/ofed/usr.lib/Makefile.inc	Tue Oct 28 13:38:10 2014	(r273774)
@@ -7,11 +7,18 @@ COMPLIBDIR=	${OPENSMDIR}/complib
 VENDORLIBDIR=	${OPENSMDIR}/libvendor
 IBVERBSDIR=	${.CURDIR}/../../libibverbs
 IBINC=		${.CURDIR}/../../include
+RDMACMDIR=	${.CURDIR}/../../librdmacm
+
+CFLAGS+=	-I${.CURDIR} \
+		-I${IBINC}/infiniband \
+		-I${IBINC} \
+		-I${IBCOMMONDIR}/include/infiniband \
+		-I${IBCOMMONDIR}/include \
+		-I${IBMADDIR}/include/infiniband \
+		-I${IBMADDIR}/include \
+		-I${UMADDIR}/include/infiniband \
+		-I${UMADDIR}/include \
+		-I${OPENSMDIR}/include \
+		-I${RDMACMDIR}/include \
+		-I${IBVERBSDIR}/include
 
-CFLAGS+=	-I${.CURDIR} -I${IBINC}/infiniband
-CFLAGS+=	-I${IBCOMMONDIR}/include/infiniband
-CFLAGS+=	-I${IBMADDIR}/include/infiniband
-CFLAGS+=	-I${UMADDIR}/include/infiniband
-CFLAGS+=	-I${OPENSMDIR}/include
-# CFLAGS+=	-I${UMADDIR}/include
-# CFLAGS+=	-I${IBVERBSDIR}/include



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410281338.s9SDcBXk058646>