[libnes] Initial import into Fedora

Doug Ledford dledford at fedoraproject.org
Wed Jul 20 17:46:21 UTC 2011


commit 39bf43d4689b610d7556109bc488e74d94ae3afe
Author: Doug Ledford <dledford at redhat.com>
Date:   Wed Jul 20 13:46:04 2011 -0400

    Initial import into Fedora
    
    Signed-off-by: Doug Ledford <dledford at redhat.com>

 .gitignore                        |    1 +
 libnes-1.1.1-remove-RAW_ETH.patch |  119 +++++++++++++++++++++++++++++++++++++
 libnes.spec                       |  101 +++++++++++++++++++++++++++++++
 sources                           |    1 +
 4 files changed, 222 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..09b025e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+libnes-1.1.1.tar.gz
diff --git a/libnes-1.1.1-remove-RAW_ETH.patch b/libnes-1.1.1-remove-RAW_ETH.patch
new file mode 100644
index 0000000..9685963
--- /dev/null
+++ b/libnes-1.1.1-remove-RAW_ETH.patch
@@ -0,0 +1,119 @@
+--- libnes-1.1.1/src/nes_uverbs.c.save	2011-01-17 11:24:09.224796949 -0500
++++ libnes-1.1.1/src/nes_uverbs.c	2011-01-17 11:39:05.981547206 -0500
+@@ -215,6 +215,7 @@ int nes_udereg_mr(struct ibv_mr *mr)
+ 	return 0;
+ }
+ 
++#ifdef IBV_QPT_RAW_ETH
+ static
+ int nes_ima_ureplace_cq(struct ibv_cq *cq,
+ 			int mcrqf,
+@@ -296,6 +297,7 @@ int nes_ima_ureplace_cq(struct ibv_cq *c
+  err:
+ 	return ret;
+ }
++#endif
+ 
+ /**
+  * nes_ucreate_cq
+@@ -1125,12 +1127,14 @@ struct ibv_qp *nes_ucreate_qp(struct ibv
+ 	int i = 0;
+ 
+ 	/* fprintf(stderr, PFX "%s\n", __FUNCTION__); */
++#ifdef IBV_QPT_RAW_ETH
+ 	if (attr->qp_type == IBV_QPT_RAW_ETH) {
+ 		attr->cap.max_send_sge = NES_UD_MAX_SG_LIST_SZ;
+ 		attr->cap.max_recv_sge = NES_UD_MAX_SG_LIST_SZ;
+ 		nes_debug(NES_DBG_UD, "%s(%d) patching max_sge for UD\n",
+ 				__func__, __LINE__);
+ 	}
++#endif
+ 	/* Sanity check QP size before proceeding */
+ 	sqdepth = nes_qp_get_qdepth(attr->cap.max_send_wr, attr->cap.max_send_sge);
+ 	if (!sqdepth) {
+@@ -1186,6 +1190,7 @@ struct ibv_qp *nes_ucreate_qp(struct ibv
+ 	nesuqp->nes_drv_opt = resp.nes_drv_opt;
+ 	nesuqp->ibv_qp.qp_num = resp.qp_id;
+ 
++#ifdef IBV_QPT_RAW_ETH
+ 	if (attr->qp_type == IBV_QPT_RAW_ETH) {
+ 		nesuqp->nes_ud_sksq_fd = open("/dev/infiniband/nes_ud_sksq",
+ 						O_RDWR);
+@@ -1233,6 +1238,7 @@ struct ibv_qp *nes_ucreate_qp(struct ibv
+ 		memset(&nesuqp->send_wr_id[0], 0, sizeof(uint64_t) * 512);
+ 		memset(&nesuqp->recv_wr_id[0], 0, sizeof(uint64_t) * 512);
+ 	}
++#endif
+ 	return &nesuqp->ibv_qp;
+ }
+ 
+@@ -1324,6 +1330,7 @@ int nes_udestroy_qp(struct ibv_qp *qp)
+ 	}
+ 
+ 	pthread_spin_destroy(&nesuqp->lock);
++#ifdef IBV_QPT_RAW_ETH
+ 	if (qp->qp_type == IBV_QPT_RAW_ETH) {
+ 		if (nesuqp->pend_rx_wr) {
+ 			for (i = 0; i < NES_UD_RX_BATCH_SZ; i++)
+@@ -1340,6 +1347,7 @@ int nes_udestroy_qp(struct ibv_qp *qp)
+ 		nesuqp->sksq_shared_ctxt = 0;
+ 		close(nesuqp->nes_ud_sksq_fd);
+ 	}
++#endif
+ 	/* Clean any pending completions from the cq(s) */
+ 	if (nesuqp->send_cq)
+ 		nes_clean_cq(nesuqp, nesuqp->send_cq);
+@@ -1351,6 +1359,7 @@ int nes_udestroy_qp(struct ibv_qp *qp)
+ 	return 0;
+ }
+ 
++#ifdef IBV_QPT_RAW_ETH
+ static inline
+ int nes_ima_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr,
+ 		struct ibv_send_wr **bad_wr)
+@@ -1427,6 +1436,7 @@ int nes_ima_upost_send(struct ibv_qp *ib
+ out:
+ 	return ret;
+ }
++#endif
+ 
+ /**
+  * nes_upost_send
+@@ -1447,8 +1457,10 @@ int nes_upost_send(struct ibv_qp *ib_qp,
+ 	uint32_t total_payload_length = 0;
+ 	int sge_index;
+ 
++#ifdef IBV_QPT_RAW_ETH
+ 	if (ib_qp->qp_type == IBV_QPT_RAW_ETH)
+ 		return nes_ima_upost_send(ib_qp, ib_wr, bad_wr);
++#endif
+ 
+ 	pthread_spin_lock(&nesuqp->lock);
+ 
+@@ -1621,6 +1633,7 @@ int nes_upost_send(struct ibv_qp *ib_qp,
+ 	return err;
+ }
+ 
++#ifdef IBV_QPT_RAW_ETH
+ static inline
+ int nes_ima_upost_recv(struct ibv_qp *ib_qp, struct ibv_recv_wr *ib_wr,
+ 		struct ibv_recv_wr **bad_wr)
+@@ -1695,6 +1708,7 @@ int nes_ima_upost_recv(struct ibv_qp *ib
+ out:
+ 	return ret;
+ }
++#endif
+ 
+ /**
+  * nes_upost_recv
+@@ -1716,8 +1730,10 @@ int nes_upost_recv(struct ibv_qp *ib_qp,
+ 	int sge_index;
+ 
+ 
++#ifdef IBV_QPT_RAW_ETH
+ 	if (ib_qp->qp_type == IBV_QPT_RAW_ETH)
+ 		return nes_ima_upost_recv(ib_qp, ib_wr, bad_wr);
++#endif
+ 
+ 	if (unlikely(ib_wr->num_sge > 4)) {
+ 		*bad_wr = ib_wr;
diff --git a/libnes.spec b/libnes.spec
new file mode 100644
index 0000000..f53d71e
--- /dev/null
+++ b/libnes.spec
@@ -0,0 +1,101 @@
+Name: libnes
+Version: 1.1.1
+Release: 2%{?dist}
+Summary: NetEffect RNIC Userspace Driver
+Group: System Environment/Libraries
+License: GPLv2 or BSD
+Url: http://www.openfabrics.org/
+Source: http://www.openfabrics.org/downloads/nes/%{name}-%{version}.tar.gz
+Patch0: libnes-1.1.1-remove-RAW_ETH.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: libibverbs-devel > 1.1.4, valgrind-devel
+Provides: libibverbs-driver.%{_arch}
+ExcludeArch: s390 s390x
+Obsoletes: %{name}-devel
+%description
+Userspace hardware driver for use with the libibverbs InfiniBand/iWARP verbs
+library.  This driver enables NetEffect iWARP capable ethernet devices.
+
+%package static
+Summary: Static version of the libnes driver
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+%description static
+Static version of libnes that may be linked directly to an application.
+
+%prep
+%setup -q
+%patch0 -p1 -b .raw_eth
+
+%build
+export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
+%configure --with-valgrind
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%makeinstall
+# remove unpackaged files from the buildroot
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/*.so*
+%{_sysconfdir}/libibverbs.d/*.driver
+%doc AUTHORS COPYING
+
+%files static
+%defattr(-,root,root,-)
+%{_libdir}/*.a
+
+%changelog
+* Wed Jul 20 2011 Doug Ledford <dledford at redhat.com> - 1.1.1-2
+- Initial import into Fedora
+- Add valgrind support
+
+* Mon Jan 17 2011 Doug Ledford <dledford at redhat.com> - 1.1.1-1.el6
+- Update to latest upstream release
+- Related: bz664801
+
+* Mon Jan 25 2010 Doug Ledford <dledford at redhat.com> - 0.9.0-2.el6
+- Correct license tag
+- Related: bz543948
+
+* Mon Dec 21 2009 Doug Ledford <dledford at redhat.com> - 0.9.0-1.el5
+- Update to latest upstream source
+- Build against new libibverbs API
+- Related: bz518218
+
+* Mon Jun 22 2009 Doug Ledford <dledford at redhat.com> - 0.6-2.el5
+- Rebuild against libibverbs that isn't missing the proper ppc wmb() macro
+- Related: bz506258
+
+* Sun Jun 21 2009 Doug Ledford <dledford at redhat.com> - 0.6-1.el5
+- Build against non-XRC libibverbs
+- Update to ofed 1.4.1 final bits
+- Remove no longer needed memleak patch
+- Related: bz506258, bz506097
+
+* Fri Apr 17 2009 Doug Ledford <dledford at redhat.com> - 0.5-5.el5
+- Fix a minor memleak (from upstream)
+- Rebuild against libibverbs that has xrc support
+- Related: bz459652
+
+* Thu Sep 18 2008 Doug Ledford <dledford at redhat.com> - 0.5-4
+- Add a build flag to silence some compile warnings
+
+* Tue Sep 16 2008 Doug Ledford <dledford at redhat.com> - 0.5-3
+- Upstream has updated the libnes tarball without changing the version.  Pick
+  up the libnes-0.5.tar.gz tarball that's dated 13-Jun-2008
+- Resolves: bz451470
+
+* Thu Feb 14 2008 Doug Ledford <dledford at redhat.com> - 0.5-2
+- Obsolete the old -devel package
+- Related: bz432765
+
+* Tue Jan 15 2008 Doug Ledford <dledford at redhat.com> - 0.5-1
+- Initial driver import
+- Related: bz428197
diff --git a/sources b/sources
index e69de29..4b13080 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+32a904a4fd7589223906a078ae84e419  libnes-1.1.1.tar.gz


More information about the scm-commits mailing list