All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core 0/9] Dead Code Removal
@ 2016-09-29 20:47 Jason Gunthorpe
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 20:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

This removes various #ifdef type stuff that no longer makes any sense.
cmake is arranged in a way that avoids alot of the ifdefs around header files.

The BYTE_ORDER patch is more substantial and consolidates everything around
glibc's endian.h

See

https://github.com/linux-rdma/rdma-core/pull/10

Jason Gunthorpe (9):
  Remove HAVE_CONFIG_H
  Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND
  Remove HAVE_IBV_*
  Do not use IBV_CMD_(REG_MR|RESIZE_CQ)_HAS_RESP_PARAMS
  Remove HAVE_SYMVER_SUPPORT
  Remove old compat definitions of wmb/rmb/etc
  Remove old MADV_DONTFORK/DOFORK compat
  Remove most checks of __BYTE_ORDER
  nes: Remove code guarded by HAVE_DECL_IBV_QPT_RAW_ETH

 CMakeLists.txt                       |   2 -
 buildlib/config.h.in                 |  13 --
 ibacm/linux/osd.h                    |   8 +-
 ibacm/prov/acmp/src/acmp.c           |   4 +-
 ibacm/src/acm.c                      |   4 +-
 ibacm/src/acme.c                     |   4 +-
 ibacm/src/libacm.c                   |   4 +-
 libcxgb3/src/cq.c                    |   4 +-
 libcxgb3/src/cxio_wr.h               |  10 +-
 libcxgb3/src/iwch.c                  |   4 +-
 libcxgb3/src/qp.c                    |   4 +-
 libcxgb3/src/verbs.c                 |   4 +-
 libcxgb4/src/cq.c                    |   4 +-
 libcxgb4/src/dev.c                   |   4 +-
 libcxgb4/src/qp.c                    |   4 +-
 libcxgb4/src/t4.h                    |  11 +-
 libcxgb4/src/verbs.c                 |   4 +-
 libhfi1verbs/src/hfiverbs.c          |  22 +--
 libhfi1verbs/src/verbs.c             |  19 +-
 libi40iw/src/i40iw_umain.c           |   2 -
 libi40iw/src/i40iw_umain.h           |  18 +-
 libi40iw/src/i40iw_uverbs.c          |  28 ---
 libibcm/src/cm.c                     |  15 +-
 libibumad/src/sysfs.c                |  12 +-
 libibumad/src/umad.c                 |  18 +-
 libibumad/tests/umad_reg2_compat.c   |   4 +-
 libibumad/tests/umad_register2.c     |   4 +-
 libibverbs/examples/asyncwatch.c     |   4 +-
 libibverbs/examples/device_list.c    |   4 +-
 libibverbs/examples/devinfo.c        |   4 +-
 libibverbs/examples/rc_pingpong.c    |   4 +-
 libibverbs/examples/srq_pingpong.c   |   4 +-
 libibverbs/examples/uc_pingpong.c    |   4 +-
 libibverbs/examples/ud_pingpong.c    |   4 +-
 libibverbs/examples/xsrq_pingpong.c  |   4 +-
 libibverbs/include/infiniband/arch.h |  15 +-
 libibverbs/src/cmd.c                 |   4 +-
 libibverbs/src/compat-1_0.c          |   4 +-
 libibverbs/src/device.c              |   4 +-
 libibverbs/src/ibverbs.h             |  25 +--
 libibverbs/src/init.c                |   4 +-
 libibverbs/src/marshall.c            |   4 +-
 libibverbs/src/memory.c              |  15 +-
 libibverbs/src/sysfs.c               |   4 +-
 libibverbs/src/verbs.c               |   4 +-
 libipathverbs/src/ipathverbs.c       |  22 +--
 libipathverbs/src/verbs.c            |  20 +-
 libmlx4/src/buf.c                    |   4 +-
 libmlx4/src/cq.c                     |   4 +-
 libmlx4/src/dbrec.c                  |   4 +-
 libmlx4/src/mlx4.c                   |   4 +-
 libmlx4/src/mlx4.h                   |  42 +---
 libmlx4/src/qp.c                     |   4 +-
 libmlx4/src/srq.c                    |   4 +-
 libmlx4/src/verbs.c                  |   4 +-
 libmlx5/src/buf.c                    |  23 +--
 libmlx5/src/cq.c                     |   5 +-
 libmlx5/src/dbrec.c                  |   4 +-
 libmlx5/src/mlx5.c                   |   8 +-
 libmlx5/src/mlx5.h                   |  40 +---
 libmlx5/src/qp.c                     |   5 +-
 libmlx5/src/srq.c                    |   4 +-
 libmlx5/src/verbs.c                  |  24 +--
 libmthca/src/ah.c                    |   4 +-
 libmthca/src/buf.c                   |  23 +--
 libmthca/src/cq.c                    |   4 +-
 libmthca/src/memfree.c               |   4 +-
 libmthca/src/mthca.c                 |  62 +-----
 libmthca/src/mthca.h                 |  26 +--
 libmthca/src/qp.c                    |   4 +-
 libmthca/src/srq.c                   |   4 +-
 libmthca/src/verbs.c                 |  30 +--
 libnes/src/nes_umain.c               |   2 -
 libnes/src/nes_umain.h               |  17 +-
 libnes/src/nes_uverbs.c              | 359 -----------------------------------
 libocrdma/src/ocrdma_main.c          |   2 -
 libocrdma/src/ocrdma_verbs.c         |  34 +---
 librdmacm/examples/common.h          |  11 +-
 librdmacm/src/acm.c                  |   4 +-
 librdmacm/src/addrinfo.c             |   4 +-
 librdmacm/src/cma.c                  |   4 +-
 librdmacm/src/cma.h                  |  24 +--
 librdmacm/src/indexer.c              |   4 +-
 librdmacm/src/indexer.h              |   4 +-
 librdmacm/src/preload.c              |   4 +-
 librdmacm/src/rsocket.c              |   4 +-
 librxe/src/rxe.c                     |  34 +---
 srp_daemon/srp_daemon/srp_daemon.h   |  22 +--
 88 files changed, 124 insertions(+), 1144 deletions(-)

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 1/9] Remove HAVE_CONFIG_H
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-29 20:47   ` Jason Gunthorpe
       [not found]     ` <1475182076-5411-2-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 20:47   ` [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND Jason Gunthorpe
                     ` (8 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 20:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Steve Wise, Mike Marciniszyn, Dennis Dalessandro,
	Tatyana Nikolova, Sean Hefty, Hal Rosenstock, Doug Ledford,
	Yishai Hadas, Vladimir Sokolovsky, Devesh Sharma, Moni Shoua,
	open list:HF1 USERSPACE PROVIDER for hf1.ko

The cmake build system guarantees this header exists, we do not need
the define or the test.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 CMakeLists.txt                      | 2 --
 ibacm/prov/acmp/src/acmp.c          | 4 +---
 ibacm/src/acm.c                     | 4 +---
 ibacm/src/acme.c                    | 4 +---
 ibacm/src/libacm.c                  | 4 +---
 libcxgb3/src/cq.c                   | 4 +---
 libcxgb3/src/iwch.c                 | 4 +---
 libcxgb3/src/qp.c                   | 4 +---
 libcxgb3/src/verbs.c                | 4 +---
 libcxgb4/src/cq.c                   | 4 +---
 libcxgb4/src/dev.c                  | 4 +---
 libcxgb4/src/qp.c                   | 4 +---
 libcxgb4/src/verbs.c                | 4 +---
 libhfi1verbs/src/hfiverbs.c         | 4 +---
 libhfi1verbs/src/verbs.c            | 4 +---
 libi40iw/src/i40iw_umain.c          | 2 --
 libi40iw/src/i40iw_uverbs.c         | 2 --
 libibcm/src/cm.c                    | 4 +---
 libibumad/src/sysfs.c               | 4 +---
 libibumad/src/umad.c                | 4 +---
 libibumad/tests/umad_reg2_compat.c  | 4 +---
 libibumad/tests/umad_register2.c    | 4 +---
 libibverbs/examples/asyncwatch.c    | 4 +---
 libibverbs/examples/device_list.c   | 4 +---
 libibverbs/examples/devinfo.c       | 4 +---
 libibverbs/examples/rc_pingpong.c   | 4 +---
 libibverbs/examples/srq_pingpong.c  | 4 +---
 libibverbs/examples/uc_pingpong.c   | 4 +---
 libibverbs/examples/ud_pingpong.c   | 4 +---
 libibverbs/examples/xsrq_pingpong.c | 4 +---
 libibverbs/src/cmd.c                | 4 +---
 libibverbs/src/compat-1_0.c         | 4 +---
 libibverbs/src/device.c             | 4 +---
 libibverbs/src/init.c               | 4 +---
 libibverbs/src/marshall.c           | 4 +---
 libibverbs/src/memory.c             | 4 +---
 libibverbs/src/sysfs.c              | 4 +---
 libibverbs/src/verbs.c              | 4 +---
 libipathverbs/src/ipathverbs.c      | 4 +---
 libipathverbs/src/verbs.c           | 4 +---
 libmlx4/src/buf.c                   | 4 +---
 libmlx4/src/cq.c                    | 4 +---
 libmlx4/src/dbrec.c                 | 4 +---
 libmlx4/src/mlx4.c                  | 4 +---
 libmlx4/src/qp.c                    | 4 +---
 libmlx4/src/srq.c                   | 4 +---
 libmlx4/src/verbs.c                 | 4 +---
 libmlx5/src/buf.c                   | 4 +---
 libmlx5/src/cq.c                    | 5 +----
 libmlx5/src/dbrec.c                 | 4 +---
 libmlx5/src/mlx5.c                  | 4 +---
 libmlx5/src/qp.c                    | 5 +----
 libmlx5/src/srq.c                   | 4 +---
 libmlx5/src/verbs.c                 | 4 +---
 libmthca/src/ah.c                   | 4 +---
 libmthca/src/buf.c                  | 4 +---
 libmthca/src/cq.c                   | 4 +---
 libmthca/src/memfree.c              | 4 +---
 libmthca/src/mthca.c                | 4 +---
 libmthca/src/qp.c                   | 4 +---
 libmthca/src/srq.c                  | 4 +---
 libmthca/src/verbs.c                | 4 +---
 libnes/src/nes_umain.c              | 2 --
 libnes/src/nes_uverbs.c             | 2 --
 libocrdma/src/ocrdma_main.c         | 2 --
 libocrdma/src/ocrdma_verbs.c        | 2 --
 librdmacm/src/acm.c                 | 4 +---
 librdmacm/src/addrinfo.c            | 4 +---
 librdmacm/src/cma.c                 | 4 +---
 librdmacm/src/cma.h                 | 4 +---
 librdmacm/src/indexer.c             | 4 +---
 librdmacm/src/indexer.h             | 4 +---
 librdmacm/src/preload.c             | 4 +---
 librdmacm/src/rsocket.c             | 4 +---
 librxe/src/rxe.c                    | 4 +---
 75 files changed, 68 insertions(+), 220 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7e9e13262899..a6fc092d7994 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,8 +93,6 @@ endif()
 # Setup the basic C compiler
 RDMA_BuildType()
 include_directories(${BUILD_INCLUDE})
-# FIXME: Eliminate HAVE_CONFIG_H, we always have it.
-add_definitions(-DHAVE_CONFIG_H)
 
 # Require GNU99 mode
 RDMA_EnableCStd()
diff --git a/ibacm/prov/acmp/src/acmp.c b/ibacm/prov/acmp/src/acmp.c
index 75231bfef04f..ed68bd706f76 100644
--- a/ibacm/prov/acmp/src/acmp.c
+++ b/ibacm/prov/acmp/src/acmp.c
@@ -28,9 +28,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdarg.h>
diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c
index 41429e1db4d7..146fbff61857 100644
--- a/ibacm/src/acm.c
+++ b/ibacm/src/acm.c
@@ -28,9 +28,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdarg.h>
diff --git a/ibacm/src/acme.c b/ibacm/src/acme.c
index 4b5fe684c8e2..e96d36ff9fc0 100644
--- a/ibacm/src/acme.c
+++ b/ibacm/src/acme.c
@@ -28,9 +28,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/ibacm/src/libacm.c b/ibacm/src/libacm.c
index 3ad1db1d307b..def5b2cf5892 100644
--- a/ibacm/src/libacm.c
+++ b/ibacm/src/libacm.c
@@ -28,9 +28,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <osd.h>
 #include "libacm.h"
diff --git a/libcxgb3/src/cq.c b/libcxgb3/src/cq.c
index a6393d7b4fe3..1510d1e78631 100644
--- a/libcxgb3/src/cq.c
+++ b/libcxgb3/src/cq.c
@@ -29,9 +29,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <netinet/in.h>
diff --git a/libcxgb3/src/iwch.c b/libcxgb3/src/iwch.c
index dd0d3711f2e2..aa9b10879d7a 100644
--- a/libcxgb3/src/iwch.c
+++ b/libcxgb3/src/iwch.c
@@ -29,9 +29,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libcxgb3/src/qp.c b/libcxgb3/src/qp.c
index 7dd3c7e342a7..30dd898f6e87 100644
--- a/libcxgb3/src/qp.c
+++ b/libcxgb3/src/qp.c
@@ -29,9 +29,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libcxgb3/src/verbs.c b/libcxgb3/src/verbs.c
index a2b737f2a192..0cb78d753d41 100644
--- a/libcxgb3/src/verbs.c
+++ b/libcxgb3/src/verbs.c
@@ -29,9 +29,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/libcxgb4/src/cq.c b/libcxgb4/src/cq.c
index a33d48488967..1ed7dfdb88d4 100644
--- a/libcxgb4/src/cq.c
+++ b/libcxgb4/src/cq.c
@@ -29,9 +29,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <syslog.h>
diff --git a/libcxgb4/src/dev.c b/libcxgb4/src/dev.c
index 8c3ecddc6a14..316fc0569f48 100644
--- a/libcxgb4/src/dev.c
+++ b/libcxgb4/src/dev.c
@@ -29,9 +29,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libcxgb4/src/qp.c b/libcxgb4/src/qp.c
index 5444137c44bd..3c6d021095fc 100644
--- a/libcxgb4/src/qp.c
+++ b/libcxgb4/src/qp.c
@@ -29,9 +29,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <assert.h>
 #include <stdlib.h>
diff --git a/libcxgb4/src/verbs.c b/libcxgb4/src/verbs.c
index aed547dc8ab1..70d250f30701 100644
--- a/libcxgb4/src/verbs.c
+++ b/libcxgb4/src/verbs.c
@@ -29,9 +29,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/libhfi1verbs/src/hfiverbs.c b/libhfi1verbs/src/hfiverbs.c
index ced438d1a70b..d2b7dd450992 100644
--- a/libhfi1verbs/src/hfiverbs.c
+++ b/libhfi1verbs/src/hfiverbs.c
@@ -55,9 +55,7 @@
 
 */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libhfi1verbs/src/verbs.c b/libhfi1verbs/src/verbs.c
index e245ad9e5b4f..20d4352094af 100644
--- a/libhfi1verbs/src/verbs.c
+++ b/libhfi1verbs/src/verbs.c
@@ -55,9 +55,7 @@
 
 */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libi40iw/src/i40iw_umain.c b/libi40iw/src/i40iw_umain.c
index ef694a025075..1756e65ee6be 100644
--- a/libi40iw/src/i40iw_umain.c
+++ b/libi40iw/src/i40iw_umain.c
@@ -32,9 +32,7 @@
 *
 *******************************************************************************/
 
-#if HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libi40iw/src/i40iw_uverbs.c b/libi40iw/src/i40iw_uverbs.c
index 8369e10f61ee..3a6799a9b50f 100644
--- a/libi40iw/src/i40iw_uverbs.c
+++ b/libi40iw/src/i40iw_uverbs.c
@@ -32,9 +32,7 @@
 *
 *******************************************************************************/
 
-#if HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/libibcm/src/cm.c b/libibcm/src/cm.c
index f5318f01fb61..ebe36bef89e6 100644
--- a/libibcm/src/cm.c
+++ b/libibcm/src/cm.c
@@ -33,9 +33,7 @@
  * $Id$
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/libibumad/src/sysfs.c b/libibumad/src/sysfs.c
index 5d9460851897..d10f312285ea 100644
--- a/libibumad/src/sysfs.c
+++ b/libibumad/src/sysfs.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  *
  */
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <inttypes.h>
 #include <string.h>
diff --git a/libibumad/src/umad.c b/libibumad/src/umad.c
index a7879d385466..176d112e125b 100644
--- a/libibumad/src/umad.c
+++ b/libibumad/src/umad.c
@@ -32,9 +32,7 @@
  *
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <sys/poll.h>
 #include <unistd.h>
diff --git a/libibumad/tests/umad_reg2_compat.c b/libibumad/tests/umad_reg2_compat.c
index 9c239ee4bfae..264882ccc0c1 100644
--- a/libibumad/tests/umad_reg2_compat.c
+++ b/libibumad/tests/umad_reg2_compat.c
@@ -31,9 +31,7 @@
  *
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <string.h>
 #include <stdio.h>
diff --git a/libibumad/tests/umad_register2.c b/libibumad/tests/umad_register2.c
index ed7e816bb63c..7a9b655ae794 100644
--- a/libibumad/tests/umad_register2.c
+++ b/libibumad/tests/umad_register2.c
@@ -31,9 +31,7 @@
  *
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif				/* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <string.h>
 #include <stdio.h>
diff --git a/libibverbs/examples/asyncwatch.c b/libibverbs/examples/asyncwatch.c
index c78994d24bed..7af13bf936ec 100644
--- a/libibverbs/examples/asyncwatch.c
+++ b/libibverbs/examples/asyncwatch.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <endian.h>
diff --git a/libibverbs/examples/device_list.c b/libibverbs/examples/device_list.c
index 70c3af51b6c3..13f40ad63007 100644
--- a/libibverbs/examples/device_list.c
+++ b/libibverbs/examples/device_list.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 
diff --git a/libibverbs/examples/devinfo.c b/libibverbs/examples/devinfo.c
index e814bacdf7aa..5fd1affa455d 100644
--- a/libibverbs/examples/devinfo.c
+++ b/libibverbs/examples/devinfo.c
@@ -31,9 +31,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libibverbs/examples/rc_pingpong.c b/libibverbs/examples/rc_pingpong.c
index 5aa3417c6e23..c92e551c00e6 100644
--- a/libibverbs/examples/rc_pingpong.c
+++ b/libibverbs/examples/rc_pingpong.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libibverbs/examples/srq_pingpong.c b/libibverbs/examples/srq_pingpong.c
index f17972580b57..863ff10dd0f4 100644
--- a/libibverbs/examples/srq_pingpong.c
+++ b/libibverbs/examples/srq_pingpong.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libibverbs/examples/uc_pingpong.c b/libibverbs/examples/uc_pingpong.c
index 7d982d36a5ef..2b105b947cf3 100644
--- a/libibverbs/examples/uc_pingpong.c
+++ b/libibverbs/examples/uc_pingpong.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libibverbs/examples/ud_pingpong.c b/libibverbs/examples/ud_pingpong.c
index deefb9b81013..d0cd73cc0fae 100644
--- a/libibverbs/examples/ud_pingpong.c
+++ b/libibverbs/examples/ud_pingpong.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libibverbs/examples/xsrq_pingpong.c b/libibverbs/examples/xsrq_pingpong.c
index 903548ed6824..c22893e0e721 100644
--- a/libibverbs/examples/xsrq_pingpong.c
+++ b/libibverbs/examples/xsrq_pingpong.c
@@ -31,9 +31,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <fcntl.h>
diff --git a/libibverbs/src/cmd.c b/libibverbs/src/cmd.c
index 11f65095b784..06a017b0c9b8 100644
--- a/libibverbs/src/cmd.c
+++ b/libibverbs/src/cmd.c
@@ -32,9 +32,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <unistd.h>
diff --git a/libibverbs/src/compat-1_0.c b/libibverbs/src/compat-1_0.c
index 6b1961d19ede..b286fd73eb01 100644
--- a/libibverbs/src/compat-1_0.c
+++ b/libibverbs/src/compat-1_0.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <string.h>
 #include <stddef.h>
diff --git a/libibverbs/src/device.c b/libibverbs/src/device.c
index cfdf7cfd337c..b4864e3e384b 100644
--- a/libibverbs/src/device.c
+++ b/libibverbs/src/device.c
@@ -31,9 +31,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <netinet/in.h>
diff --git a/libibverbs/src/init.c b/libibverbs/src/init.c
index 7ae0fc87d332..779756938a32 100644
--- a/libibverbs/src/init.c
+++ b/libibverbs/src/init.c
@@ -31,9 +31,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/libibverbs/src/marshall.c b/libibverbs/src/marshall.c
index 577b4b1ec2f9..a33048404d35 100644
--- a/libibverbs/src/marshall.c
+++ b/libibverbs/src/marshall.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <string.h>
 
diff --git a/libibverbs/src/memory.c b/libibverbs/src/memory.c
index 89509c6e356f..8e728c4f61fc 100644
--- a/libibverbs/src/memory.c
+++ b/libibverbs/src/memory.c
@@ -31,9 +31,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <errno.h>
 #include <sys/mman.h>
diff --git a/libibverbs/src/sysfs.c b/libibverbs/src/sysfs.c
index 2e68da4bc97f..d463241ade08 100644
--- a/libibverbs/src/sysfs.c
+++ b/libibverbs/src/sysfs.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libibverbs/src/verbs.c b/libibverbs/src/verbs.c
index debb6f687111..b470ba043658 100644
--- a/libibverbs/src/verbs.c
+++ b/libibverbs/src/verbs.c
@@ -32,9 +32,7 @@
  */
 
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <netinet/in.h>
diff --git a/libipathverbs/src/ipathverbs.c b/libipathverbs/src/ipathverbs.c
index 2ae1689a1131..9a19d0ab98ae 100644
--- a/libipathverbs/src/ipathverbs.c
+++ b/libipathverbs/src/ipathverbs.c
@@ -35,9 +35,7 @@
  * product whatsoever.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libipathverbs/src/verbs.c b/libipathverbs/src/verbs.c
index 578a38af3428..12ca35f32189 100644
--- a/libipathverbs/src/verbs.c
+++ b/libipathverbs/src/verbs.c
@@ -35,9 +35,7 @@
  * product whatsoever.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libmlx4/src/buf.c b/libmlx4/src/buf.c
index c06b3fded82c..9b41e7f62525 100644
--- a/libmlx4/src/buf.c
+++ b/libmlx4/src/buf.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <errno.h>
diff --git a/libmlx4/src/cq.c b/libmlx4/src/cq.c
index 2edbec8e327d..23cc3ed69dc8 100644
--- a/libmlx4/src/cq.c
+++ b/libmlx4/src/cq.c
@@ -32,9 +32,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libmlx4/src/dbrec.c b/libmlx4/src/dbrec.c
index 21ff93664df4..26d696fb94ae 100644
--- a/libmlx4/src/dbrec.c
+++ b/libmlx4/src/dbrec.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libmlx4/src/mlx4.c b/libmlx4/src/mlx4.c
index 1757ca325447..326ead4136f8 100644
--- a/libmlx4/src/mlx4.c
+++ b/libmlx4/src/mlx4.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libmlx4/src/qp.c b/libmlx4/src/qp.c
index 1b730bfea4b8..4b5acd71108e 100644
--- a/libmlx4/src/qp.c
+++ b/libmlx4/src/qp.c
@@ -32,9 +32,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libmlx4/src/srq.c b/libmlx4/src/srq.c
index 28bc2d41cdce..c0e028671828 100644
--- a/libmlx4/src/srq.c
+++ b/libmlx4/src/srq.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libmlx4/src/verbs.c b/libmlx4/src/verbs.c
index 5cc82cf38763..50a44340639b 100644
--- a/libmlx4/src/verbs.c
+++ b/libmlx4/src/verbs.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/libmlx5/src/buf.c b/libmlx5/src/buf.c
index 1a681c6a3eaf..7e06095d0352 100644
--- a/libmlx5/src/buf.c
+++ b/libmlx5/src/buf.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <signal.h>
 #include <sys/ipc.h>
diff --git a/libmlx5/src/cq.c b/libmlx5/src/cq.c
index 5ad076c40d91..2a53c897706f 100644
--- a/libmlx5/src/cq.c
+++ b/libmlx5/src/cq.c
@@ -30,10 +30,7 @@
  * SOFTWARE.
  */
 
-
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libmlx5/src/dbrec.c b/libmlx5/src/dbrec.c
index dbc0e650b6f4..3af81124ed95 100644
--- a/libmlx5/src/dbrec.c
+++ b/libmlx5/src/dbrec.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libmlx5/src/mlx5.c b/libmlx5/src/mlx5.c
index 058b52fcd5f6..121a833062f1 100644
--- a/libmlx5/src/mlx5.c
+++ b/libmlx5/src/mlx5.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libmlx5/src/qp.c b/libmlx5/src/qp.c
index 9363fddc3f3c..04abe1588d6e 100644
--- a/libmlx5/src/qp.c
+++ b/libmlx5/src/qp.c
@@ -30,10 +30,7 @@
  * SOFTWARE.
  */
 
-
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libmlx5/src/srq.c b/libmlx5/src/srq.c
index 24979bfb69ab..a06afa3a5931 100644
--- a/libmlx5/src/srq.c
+++ b/libmlx5/src/srq.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libmlx5/src/verbs.c b/libmlx5/src/verbs.c
index 4be602be8025..58673f4433fd 100644
--- a/libmlx5/src/verbs.c
+++ b/libmlx5/src/verbs.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/libmthca/src/ah.c b/libmthca/src/ah.c
index d7494d57f960..e83d66527839 100644
--- a/libmthca/src/ah.c
+++ b/libmthca/src/ah.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libmthca/src/buf.c b/libmthca/src/buf.c
index 074a5f8dc710..78e7b89c4db5 100644
--- a/libmthca/src/buf.c
+++ b/libmthca/src/buf.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <sys/mman.h>
diff --git a/libmthca/src/cq.c b/libmthca/src/cq.c
index 8b4a6a862d1a..d71d430c6e28 100644
--- a/libmthca/src/cq.c
+++ b/libmthca/src/cq.c
@@ -32,9 +32,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libmthca/src/memfree.c b/libmthca/src/memfree.c
index 87de4c0f5899..77a80e24b95f 100644
--- a/libmthca/src/memfree.c
+++ b/libmthca/src/memfree.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libmthca/src/mthca.c b/libmthca/src/mthca.c
index e33bf7ff8559..d6bda2d29d66 100644
--- a/libmthca/src/mthca.c
+++ b/libmthca/src/mthca.c
@@ -31,9 +31,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libmthca/src/qp.c b/libmthca/src/qp.c
index 84dd206d9125..715ca65e9bd6 100644
--- a/libmthca/src/qp.c
+++ b/libmthca/src/qp.c
@@ -31,9 +31,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libmthca/src/srq.c b/libmthca/src/srq.c
index 97a0c743f5f7..ff6f532733f4 100644
--- a/libmthca/src/srq.c
+++ b/libmthca/src/srq.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <netinet/in.h>
diff --git a/libmthca/src/verbs.c b/libmthca/src/verbs.c
index b6782c9865eb..b3bce82affae 100644
--- a/libmthca/src/verbs.c
+++ b/libmthca/src/verbs.c
@@ -31,9 +31,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/libnes/src/nes_umain.c b/libnes/src/nes_umain.c
index 16ce3f13c702..b4e0bc136160 100644
--- a/libnes/src/nes_umain.c
+++ b/libnes/src/nes_umain.c
@@ -31,9 +31,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
 #include <config.h>
-#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libnes/src/nes_uverbs.c b/libnes/src/nes_uverbs.c
index 983d87a80b8b..7c2454e7f55a 100644
--- a/libnes/src/nes_uverbs.c
+++ b/libnes/src/nes_uverbs.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
 #include <config.h>
-#endif				/* HAVE_CONFIG_H */
 
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/libocrdma/src/ocrdma_main.c b/libocrdma/src/ocrdma_main.c
index 064ecb318c4c..f3830d9fc5d3 100644
--- a/libocrdma/src/ocrdma_main.c
+++ b/libocrdma/src/ocrdma_main.c
@@ -32,9 +32,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if HAVE_CONFIG_H
 #include <config.h>
-#endif				/* HAVE_CONFIG_H */
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/libocrdma/src/ocrdma_verbs.c b/libocrdma/src/ocrdma_verbs.c
index 628e4bf18b43..6d58cb219fe1 100644
--- a/libocrdma/src/ocrdma_verbs.c
+++ b/libocrdma/src/ocrdma_verbs.c
@@ -32,9 +32,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if HAVE_CONFIG_H
 #include <config.h>
-#endif				/* HAVE_CONFIG_H */
 
 #include <assert.h>
 #include <stdlib.h>
diff --git a/librdmacm/src/acm.c b/librdmacm/src/acm.c
index 823381aac367..ad6706b2592e 100644
--- a/librdmacm/src/acm.c
+++ b/librdmacm/src/acm.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <inttypes.h>
diff --git a/librdmacm/src/addrinfo.c b/librdmacm/src/addrinfo.c
index 046b8be11be1..2f4e674e1ebb 100644
--- a/librdmacm/src/addrinfo.c
+++ b/librdmacm/src/addrinfo.c
@@ -32,9 +32,7 @@
  * $Id: cm.c 3453 2005-09-15 21:43:21Z sean.hefty $
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <sys/types.h>
 #include <sys/socket.h>
diff --git a/librdmacm/src/cma.c b/librdmacm/src/cma.c
index a89e663bcaab..77f6fea38c6b 100644
--- a/librdmacm/src/cma.c
+++ b/librdmacm/src/cma.c
@@ -30,9 +30,7 @@
  * SOFTWARE.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <string.h>
diff --git a/librdmacm/src/cma.h b/librdmacm/src/cma.h
index ce428deba849..d6005538227f 100644
--- a/librdmacm/src/cma.h
+++ b/librdmacm/src/cma.h
@@ -34,9 +34,7 @@
 #if !defined(CMA_H)
 #define CMA_H
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdlib.h>
 #include <errno.h>
diff --git a/librdmacm/src/indexer.c b/librdmacm/src/indexer.c
index be2e69c895c2..00be7d04cc93 100644
--- a/librdmacm/src/indexer.c
+++ b/librdmacm/src/indexer.c
@@ -31,9 +31,7 @@
  *
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <errno.h>
 #include <sys/types.h>
diff --git a/librdmacm/src/indexer.h b/librdmacm/src/indexer.h
index 0c5f3882673f..2d1e46ecabd4 100644
--- a/librdmacm/src/indexer.h
+++ b/librdmacm/src/indexer.h
@@ -34,9 +34,7 @@
 #if !defined(INDEXER_H)
 #define INDEXER_H
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <sys/types.h>
 
diff --git a/librdmacm/src/preload.c b/librdmacm/src/preload.c
index 2a90f79b226c..cf258bf8eb3a 100644
--- a/librdmacm/src/preload.c
+++ b/librdmacm/src/preload.c
@@ -31,9 +31,7 @@
  *
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <sys/types.h>
 #include <sys/socket.h>
diff --git a/librdmacm/src/rsocket.c b/librdmacm/src/rsocket.c
index 488d44fb3654..7e7a38ee82b6 100644
--- a/librdmacm/src/rsocket.c
+++ b/librdmacm/src/rsocket.c
@@ -31,9 +31,7 @@
  *
  */
 #define _GNU_SOURCE
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <sys/types.h>
 #include <sys/socket.h>
diff --git a/librxe/src/rxe.c b/librxe/src/rxe.c
index 7164f6627171..6bd04d696c41 100644
--- a/librxe/src/rxe.c
+++ b/librxe/src/rxe.c
@@ -37,9 +37,7 @@
  * product whatsoever.
  */
 
-#if HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include <config.h>
 
 #include <stdio.h>
 #include <stdlib.h>
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 20:47   ` [PATCH 1/9] Remove HAVE_CONFIG_H Jason Gunthorpe
@ 2016-09-29 20:47   ` Jason Gunthorpe
       [not found]     ` <1475182076-5411-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 20:47   ` [PATCH 3/9] Remove HAVE_IBV_* Jason Gunthorpe
                     ` (7 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 20:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Sean Hefty, Hal Rosenstock, Doug Ledford, Yishai Hadas,
	Vladimir Sokolovsky, Bart Van Assche

The cmake build system guarantees that valgrind/memcheck.h is present.
If the system does not have it, or valgrind is disabled, then it is
replaced with a dummy header full of empty stubs.

Thus all the copy&paste boiler plate is consolidated into buildlib.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 buildlib/config.h.in               |  4 ----
 libibcm/src/cm.c                   | 11 +----------
 libibumad/src/umad.c               | 14 +-------------
 libibverbs/src/ibverbs.h           | 14 +-------------
 libmlx4/src/mlx4.h                 | 18 +-----------------
 libmlx5/src/mlx5.h                 | 18 +-----------------
 libmthca/src/mthca.h               | 18 +-----------------
 librdmacm/src/cma.h                | 11 +----------
 srp_daemon/srp_daemon/srp_daemon.h |  5 -----
 9 files changed, 7 insertions(+), 106 deletions(-)

diff --git a/buildlib/config.h.in b/buildlib/config.h.in
index 0a87457e6d7a..a02be9cfb0f7 100644
--- a/buildlib/config.h.in
+++ b/buildlib/config.h.in
@@ -21,10 +21,6 @@
 // FIXME: Remove this, The cmake version hard-requires new style CLOEXEC support
 #define STREAM_CLOEXEC "e"
 
-// FIXME: Remove this, cmake always provides a valgrind/memcheck.h
-#define HAVE_VALGRIND_MEMCHECK_H 1
-#define INCLUDE_VALGRIND 1
-
 #define IBV_CONFIG_DIR "@CONFIG_DIR@"
 #define RS_CONF_DIR "@CMAKE_INSTALL_FULL_SYSCONFDIR@/rdma/rsocket"
 #define IWPM_CONFIG_FILE "@CMAKE_INSTALL_FULL_SYSCONFDIR@/iwpmd.conf"
diff --git a/libibcm/src/cm.c b/libibcm/src/cm.c
index ebe36bef89e6..f775923aa73c 100644
--- a/libibcm/src/cm.c
+++ b/libibcm/src/cm.c
@@ -49,16 +49,7 @@
 #include <infiniband/driver.h>
 #include <infiniband/marshall.h>
 
-#ifdef INCLUDE_VALGRIND
-#   include <valgrind/memcheck.h>
-#   ifndef VALGRIND_MAKE_MEM_DEFINED
-#       warning "Valgrind requested, but VALGRIND_MAKE_MEM_DEFINED undefined"
-#   endif
-#endif
-
-#ifndef VALGRIND_MAKE_MEM_DEFINED
-#   define VALGRIND_MAKE_MEM_DEFINED(addr,len)
-#endif
+#include <valgrind/memcheck.h>
 
 #define PFX "libibcm: "
 
diff --git a/libibumad/src/umad.c b/libibumad/src/umad.c
index 176d112e125b..0c969f1eb8ad 100644
--- a/libibumad/src/umad.c
+++ b/libibumad/src/umad.c
@@ -52,19 +52,7 @@
 
 #define IB_OPENIB_OUI                 (0x001405)
 
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-
-#  include <valgrind/memcheck.h>
-
-#  ifndef VALGRIND_MAKE_MEM_DEFINED
-#    warning "Valgrind support requested, but VALGRIND_MAKE_MEM_DEFINED not available"
-#  endif
-
-#endif				/* HAVE_VALGRIND_MEMCHECK_H */
-
-#ifndef VALGRIND_MAKE_MEM_DEFINED
-#  define VALGRIND_MAKE_MEM_DEFINED(addr,len)
-#endif
+#include <valgrind/memcheck.h>
 
 typedef struct ib_user_mad_reg_req {
 	uint32_t id;
diff --git a/libibverbs/src/ibverbs.h b/libibverbs/src/ibverbs.h
index 062a490915b0..7892af4ad247 100644
--- a/libibverbs/src/ibverbs.h
+++ b/libibverbs/src/ibverbs.h
@@ -38,19 +38,7 @@
 
 #include <infiniband/driver.h>
 
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-
-#  include <valgrind/memcheck.h>
-
-#  ifndef VALGRIND_MAKE_MEM_DEFINED
-#    warning "Valgrind support requested, but VALGRIND_MAKE_MEM_DEFINED not available"
-#  endif
-
-#endif /* HAVE_VALGRIND_MEMCHECK_H */
-
-#ifndef VALGRIND_MAKE_MEM_DEFINED
-#  define VALGRIND_MAKE_MEM_DEFINED(addr, len) 0
-#endif
+#include <valgrind/memcheck.h>
 
 #define HIDDEN		__attribute__((visibility ("hidden")))
 
diff --git a/libmlx4/src/mlx4.h b/libmlx4/src/mlx4.h
index feea3386f9a7..4551141d2007 100644
--- a/libmlx4/src/mlx4.h
+++ b/libmlx4/src/mlx4.h
@@ -47,23 +47,7 @@
 #define uninitialized_var(x) x = x
 #endif
 
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-
-#  include <valgrind/memcheck.h>
-
-#  if !defined(VALGRIND_MAKE_MEM_DEFINED) || !defined(VALGRIND_MAKE_MEM_UNDEFINED)
-#    warning "Valgrind support requested, but VALGRIND_MAKE_MEM_(UN)DEFINED not available"
-#  endif
-
-#endif /* HAVE_VALGRIND_MEMCHECK_H */
-
-#ifndef VALGRIND_MAKE_MEM_DEFINED
-#  define VALGRIND_MAKE_MEM_DEFINED(addr,len)
-#endif
-
-#ifndef VALGRIND_MAKE_MEM_UNDEFINED
-#  define VALGRIND_MAKE_MEM_UNDEFINED(addr,len)
-#endif
+#include <valgrind/memcheck.h>
 
 #ifndef rmb
 #  define rmb() mb()
diff --git a/libmlx5/src/mlx5.h b/libmlx5/src/mlx5.h
index 6c4e83002028..aa8b6feceb4e 100644
--- a/libmlx5/src/mlx5.h
+++ b/libmlx5/src/mlx5.h
@@ -52,23 +52,7 @@
 #define uninitialized_var(x) x = x
 #endif
 
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-
-#  include <valgrind/memcheck.h>
-
-#  if !defined(VALGRIND_MAKE_MEM_DEFINED) || !defined(VALGRIND_MAKE_MEM_UNDEFINED)
-#    warning "Valgrind support requested, but VALGRIND_MAKE_MEM_(UN)DEFINED not available"
-#  endif
-
-#endif /* HAVE_VALGRIND_MEMCHECK_H */
-
-#ifndef VALGRIND_MAKE_MEM_DEFINED
-#  define VALGRIND_MAKE_MEM_DEFINED(addr, len)
-#endif
-
-#ifndef VALGRIND_MAKE_MEM_UNDEFINED
-#  define VALGRIND_MAKE_MEM_UNDEFINED(addr, len)
-#endif
+#include <valgrind/memcheck.h>
 
 #ifndef rmb
 #  define rmb() mb()
diff --git a/libmthca/src/mthca.h b/libmthca/src/mthca.h
index bd1e7a2b1dc0..18d52291343f 100644
--- a/libmthca/src/mthca.h
+++ b/libmthca/src/mthca.h
@@ -39,23 +39,7 @@
 #include <infiniband/driver.h>
 #include <infiniband/arch.h>
 
-#ifdef HAVE_VALGRIND_MEMCHECK_H
-
-#  include <valgrind/memcheck.h>
-
-#  if !defined(VALGRIND_MAKE_MEM_DEFINED) || !defined(VALGRIND_MAKE_MEM_UNDEFINED)
-#    warning "Valgrind support requested, but VALGRIND_MAKE_MEM_(UN)DEFINED not available"
-#  endif
-
-#endif /* HAVE_VALGRIND_MEMCHECK_H */
-
-#ifndef VALGRIND_MAKE_MEM_DEFINED
-#  define VALGRIND_MAKE_MEM_DEFINED(addr,len)
-#endif
-
-#ifndef VALGRIND_MAKE_MEM_UNDEFINED
-#  define VALGRIND_MAKE_MEM_UNDEFINED(addr,len)
-#endif
+#include <valgrind/memcheck.h>
 
 #ifndef rmb
 #  define rmb() mb()
diff --git a/librdmacm/src/cma.h b/librdmacm/src/cma.h
index d6005538227f..16a55a67af9e 100644
--- a/librdmacm/src/cma.h
+++ b/librdmacm/src/cma.h
@@ -47,16 +47,7 @@
 
 #include <ccan/minmax.h>
 
-#ifdef INCLUDE_VALGRIND
-#   include <valgrind/memcheck.h>
-#   ifndef VALGRIND_MAKE_MEM_DEFINED
-#       warning "Valgrind requested, but VALGRIND_MAKE_MEM_DEFINED undefined"
-#   endif
-#endif
-
-#ifndef VALGRIND_MAKE_MEM_DEFINED
-#   define VALGRIND_MAKE_MEM_DEFINED(addr,len)
-#endif
+#include <valgrind/memcheck.h>
 
 #define PFX "librdmacm: "
 
diff --git a/srp_daemon/srp_daemon/srp_daemon.h b/srp_daemon/srp_daemon/srp_daemon.h
index 6d1575519bc3..d6a2d8a84728 100644
--- a/srp_daemon/srp_daemon/srp_daemon.h
+++ b/srp_daemon/srp_daemon/srp_daemon.h
@@ -408,12 +408,7 @@ typedef struct {
 	char filler[MAD_BLOCK_SIZE];
 } srp_ib_user_mad_t;
 
-#if defined(HAVE_VALGRIND_DRD_H) && defined(ENABLE_VALGRIND)
 #include <valgrind/drd.h>
-#endif
-#ifndef ANNOTATE_BENIGN_RACE_SIZED
-#define ANNOTATE_BENIGN_RACE_SIZED(a, b, c) do { } while(0)
-#endif
 
 #define pr_human(arg...)				\
 	do {						\
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 3/9] Remove HAVE_IBV_*
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 20:47   ` [PATCH 1/9] Remove HAVE_CONFIG_H Jason Gunthorpe
  2016-09-29 20:47   ` [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND Jason Gunthorpe
@ 2016-09-29 20:47   ` Jason Gunthorpe
  2016-09-29 20:47   ` [PATCH 4/9] Do not use IBV_CMD_(REG_MR|RESIZE_CQ)_HAS_RESP_PARAMS Jason Gunthorpe
                     ` (6 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 20:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Mike Marciniszyn, Dennis Dalessandro, Yishai Hadas,
	Vladimir Sokolovsky, Moni Shoua,
	open list:HF1 USERSPACE PROVIDER for hf1.ko

These were used to support building provider plugins against old
versions of libibverbs. Since libibverbs is now included together
with the provider that is no longer possible or supported.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 buildlib/config.h.in           |  6 -----
 libhfi1verbs/src/hfiverbs.c    | 18 -------------
 libipathverbs/src/ipathverbs.c | 18 -------------
 libmlx5/src/buf.c              | 19 --------------
 libmlx5/src/mlx5.c             |  4 ---
 libmlx5/src/verbs.c            |  2 --
 libmthca/src/buf.c             | 19 --------------
 libmthca/src/mthca.c           | 58 ------------------------------------------
 librxe/src/rxe.c               | 14 ----------
 9 files changed, 158 deletions(-)

diff --git a/buildlib/config.h.in b/buildlib/config.h.in
index a02be9cfb0f7..3b94ea3e4f51 100644
--- a/buildlib/config.h.in
+++ b/buildlib/config.h.in
@@ -1,12 +1,6 @@
 #ifndef CONFIG_H_IN
 #define CONFIG_H_IN
 
-// FIXME: Remove this, ibverbs is included so we don't need to detect
-#define HAVE_IBV_DOFORK_RANGE 1
-#define HAVE_IBV_DONTFORK_RANGE 1
-#define HAVE_IBV_REGISTER_DRIVER 1
-#define HAVE_IBV_READ_SYSFS_FILE 1
-
 #define HAVE_STATEMENT_EXPR 1
 #define HAVE_BUILTIN_TYPES_COMPATIBLE_P 1
 #define HAVE_TYPEOF 1
diff --git a/libhfi1verbs/src/hfiverbs.c b/libhfi1verbs/src/hfiverbs.c
index d2b7dd450992..e28afc7fcc89 100644
--- a/libhfi1verbs/src/hfiverbs.c
+++ b/libhfi1verbs/src/hfiverbs.c
@@ -217,25 +217,7 @@ found:
 	return &dev->ibv_dev;
 }
 
-#ifdef HAVE_IBV_REGISTER_DRIVER
 static __attribute__((constructor)) void hfi1_register_driver(void)
 {
 	ibv_register_driver("hfi1verbs", hfi1_driver_init);
 }
-#else
-/*
- * Export the old libsysfs sysfs_class_device-based driver entry point
- * if libibverbs does not export an ibv_register_driver() function.
- */
-struct ibv_device *openib_driver_init(struct sysfs_class_device *sysdev)
-{
-        int abi_ver = 0;
-        char value[8];
-
-        if (ibv_read_sysfs_file(sysdev->path, "abi_version",
-                                value, sizeof value) > 0)
-                abi_ver = strtol(value, NULL, 10);
-
-        return hfi1_driver_init(sysdev->path, abi_ver);
-}
-#endif /* HAVE_IBV_REGISTER_DRIVER */
diff --git a/libipathverbs/src/ipathverbs.c b/libipathverbs/src/ipathverbs.c
index 9a19d0ab98ae..4b945f6c58ec 100644
--- a/libipathverbs/src/ipathverbs.c
+++ b/libipathverbs/src/ipathverbs.c
@@ -216,25 +216,7 @@ found:
 	return &dev->ibv_dev;
 }
 
-#ifdef HAVE_IBV_REGISTER_DRIVER
 static __attribute__((constructor)) void ipath_register_driver(void)
 {
 	ibv_register_driver("ipathverbs", ipath_driver_init);
 }
-#else
-/*
- * Export the old libsysfs sysfs_class_device-based driver entry point
- * if libibverbs does not export an ibv_register_driver() function.
- */
-struct ibv_device *openib_driver_init(struct sysfs_class_device *sysdev)
-{
-        int abi_ver = 0;
-        char value[8];
-
-        if (ibv_read_sysfs_file(sysdev->path, "abi_version",
-                                value, sizeof value) > 0)
-                abi_ver = strtol(value, NULL, 10);
-
-        return ipath_driver_init(sysdev->path, abi_ver);
-}
-#endif /* HAVE_IBV_REGISTER_DRIVER */
diff --git a/libmlx5/src/buf.c b/libmlx5/src/buf.c
index 7e06095d0352..853450ae93b3 100644
--- a/libmlx5/src/buf.c
+++ b/libmlx5/src/buf.c
@@ -42,25 +42,6 @@
 #include "mlx5.h"
 #include "bitmap.h"
 
-#if !(defined(HAVE_IBV_DONTFORK_RANGE) && defined(HAVE_IBV_DOFORK_RANGE))
-
-/*
- * If libibverbs isn't exporting these functions, then there's no
- * point in doing it here, because the rest of libibverbs isn't going
- * to be fork-safe anyway.
- */
-static int ibv_dontfork_range(void *base, size_t size)
-{
-	return 0;
-}
-
-static int ibv_dofork_range(void *base, size_t size)
-{
-	return 0;
-}
-
-#endif /* HAVE_IBV_DONTFORK_RANGE && HAVE_IBV_DOFORK_RANGE */
-
 static int mlx5_bitmap_init(struct mlx5_bitmap *bitmap, uint32_t num,
 			    uint32_t mask)
 {
diff --git a/libmlx5/src/mlx5.c b/libmlx5/src/mlx5.c
index 121a833062f1..f24e5043dfe6 100644
--- a/libmlx5/src/mlx5.c
+++ b/libmlx5/src/mlx5.c
@@ -42,10 +42,6 @@
 #include <sched.h>
 #include <sys/param.h>
 
-#ifndef HAVE_IBV_REGISTER_DRIVER
-#include <sysfs/libsysfs.h>
-#endif
-
 #include "mlx5.h"
 #include "mlx5-abi.h"
 
diff --git a/libmlx5/src/verbs.c b/libmlx5/src/verbs.c
index 58673f4433fd..acbabc814621 100644
--- a/libmlx5/src/verbs.c
+++ b/libmlx5/src/verbs.c
@@ -993,9 +993,7 @@ static const char *qptype2key(enum ibv_qp_type type)
 	case IBV_QPT_RC: return "HUGE_RC";
 	case IBV_QPT_UC: return "HUGE_UC";
 	case IBV_QPT_UD: return "HUGE_UD";
-#ifdef _NOT_EXISTS_IN_OFED_2_0
 	case IBV_QPT_RAW_PACKET: return "HUGE_RAW_ETH";
-#endif
 	default: return "HUGE_NA";
 	}
 }
diff --git a/libmthca/src/buf.c b/libmthca/src/buf.c
index 78e7b89c4db5..c03ee1f9a3e4 100644
--- a/libmthca/src/buf.c
+++ b/libmthca/src/buf.c
@@ -38,25 +38,6 @@
 
 #include "mthca.h"
 
-#if !(defined(HAVE_IBV_DONTFORK_RANGE) && defined(HAVE_IBV_DOFORK_RANGE))
-
-/*
- * If libibverbs isn't exporting these functions, then there's no
- * point in doing it here, because the rest of libibverbs isn't going
- * to be fork-safe anyway.
- */
-static int ibv_dontfork_range(void *base, size_t size)
-{
-	return 0;
-}
-
-static int ibv_dofork_range(void *base, size_t size)
-{
-	return 0;
-}
-
-#endif /* HAVE_IBV_DONTFORK_RANGE && HAVE_IBV_DOFORK_RANGE */
-
 int mthca_alloc_buf(struct mthca_buf *buf, size_t size, int page_size)
 {
 	int ret;
diff --git a/libmthca/src/mthca.c b/libmthca/src/mthca.c
index d6bda2d29d66..d5660ceef7e0 100644
--- a/libmthca/src/mthca.c
+++ b/libmthca/src/mthca.c
@@ -41,16 +41,6 @@
 #include <pthread.h>
 #include <string.h>
 
-#ifndef HAVE_IBV_REGISTER_DRIVER
-#include <sysfs/libsysfs.h>
-#endif
-
-#ifndef HAVE_IBV_READ_SYSFS_FILE
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#endif
-
 #include "mthca.h"
 #include "mthca-abi.h"
 
@@ -224,36 +214,6 @@ static struct ibv_device_ops mthca_dev_ops = {
 	.free_context  = mthca_free_context
 };
 
-/*
- * Keep a private implementation of HAVE_IBV_READ_SYSFS_FILE to handle
- * old versions of libibverbs that didn't implement it.  This can be
- * removed when libibverbs 1.0.3 or newer is available "everywhere."
- */
-#ifndef HAVE_IBV_READ_SYSFS_FILE
-static int ibv_read_sysfs_file(const char *dir, const char *file,
-			       char *buf, size_t size)
-{
-	char path[256];
-	int fd;
-	int len;
-
-	snprintf(path, sizeof path, "%s/%s", dir, file);
-
-	fd = open(path, O_RDONLY);
-	if (fd < 0)
-		return -1;
-
-	len = read(fd, buf, size);
-
-	close(fd);
-
-	if (len > 0 && buf[len - 1] == '\n')
-		buf[--len] = '\0';
-
-	return len;
-}
-#endif /* HAVE_IBV_READ_SYSFS_FILE */
-
 static struct ibv_device *mthca_driver_init(const char *uverbs_sys_path,
 					    int abi_version)
 {
@@ -300,25 +260,7 @@ found:
 	return &dev->ibv_dev;
 }
 
-#ifdef HAVE_IBV_REGISTER_DRIVER
 static __attribute__((constructor)) void mthca_register_driver(void)
 {
 	ibv_register_driver("mthca", mthca_driver_init);
 }
-#else
-/*
- * Export the old libsysfs sysfs_class_device-based driver entry point
- * if libibverbs does not export an ibv_register_driver() function.
- */
-struct ibv_device *openib_driver_init(struct sysfs_class_device *sysdev)
-{
-	int abi_ver = 0;
-	char value[8];
-
-	if (ibv_read_sysfs_file(sysdev->path, "abi_version",
-				value, sizeof value) > 0)
-		abi_ver = strtol(value, NULL, 10);
-
-	return mthca_driver_init(sysdev->path, abi_ver);
-}
-#endif /* HAVE_IBV_REGISTER_DRIVER */
diff --git a/librxe/src/rxe.c b/librxe/src/rxe.c
index 6bd04d696c41..ef7434e1d506 100644
--- a/librxe/src/rxe.c
+++ b/librxe/src/rxe.c
@@ -935,22 +935,8 @@ static struct ibv_device *rxe_driver_init(const char *uverbs_sys_path,
 	return &dev->ibv_dev;
 }
 
-#ifdef HAVE_IBV_REGISTER_DRIVER
 static __attribute__ ((constructor))
 void rxe_register_driver(void)
 {
 	ibv_register_driver("rxe", rxe_driver_init);
 }
-#else
-struct ibv_device *openib_driver_init(struct sysfs_class_device *sysdev)
-{
-	int abi_ver = 0;
-	char value[8];
-
-	if (ibv_read_sysfs_file(sysdev->path, "abi_version",
-				value, sizeof value) > 0)
-		abi_ver = strtol(value, NULL, 10);
-
-	return rxe_driver_init(sysdev->path, abi_ver);
-}
-#endif /* HAVE_IBV_REGISTER_DRIVER */
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 4/9] Do not use IBV_CMD_(REG_MR|RESIZE_CQ)_HAS_RESP_PARAMS
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (2 preceding siblings ...)
  2016-09-29 20:47   ` [PATCH 3/9] Remove HAVE_IBV_* Jason Gunthorpe
@ 2016-09-29 20:47   ` Jason Gunthorpe
       [not found]     ` <1475182076-5411-5-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 20:47   ` [PATCH 5/9] Remove HAVE_SYMVER_SUPPORT Jason Gunthorpe
                     ` (5 subsequent siblings)
  9 siblings, 1 reply; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 20:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Mike Marciniszyn, Dennis Dalessandro, Tatyana Nikolova,
	Yishai Hadas, Vladimir Sokolovsky, Moni Shoua,
	open list:HF1 USERSPACE PROVIDER for hf1.ko

These were used to support building provider plugins against old
versions of libibverbs. Since libibverbs is now included together
with the provider that is no longer possible or supported.

The define is kept as it is in a public header.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libhfi1verbs/src/verbs.c    | 15 +++------------
 libi40iw/src/i40iw_uverbs.c | 26 --------------------------
 libipathverbs/src/verbs.c   | 16 +++-------------
 libmlx5/src/verbs.c         | 18 ++++--------------
 libmthca/src/verbs.c        | 26 ++++++--------------------
 libnes/src/nes_uverbs.c     | 35 -----------------------------------
 librxe/src/rxe.c            | 16 +++-------------
 7 files changed, 19 insertions(+), 133 deletions(-)

diff --git a/libhfi1verbs/src/verbs.c b/libhfi1verbs/src/verbs.c
index 20d4352094af..06ddbb712857 100644
--- a/libhfi1verbs/src/verbs.c
+++ b/libhfi1verbs/src/verbs.c
@@ -135,24 +135,15 @@ struct ibv_mr *hfi1_reg_mr(struct ibv_pd *pd, void *addr,
 {
 	struct ibv_mr *mr;
 	struct ibv_reg_mr cmd;
+	struct ibv_reg_mr_resp resp;
 	int ret;
 
 	mr = malloc(sizeof *mr);
 	if (!mr)
 		return NULL;
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
-	{
-		struct ibv_reg_mr_resp resp;
-
-		ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr,
-				     access, mr, &cmd, sizeof cmd,
-                                     &resp, sizeof resp);
-	}
-#else
-	ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr,
-			     access, mr, &cmd, sizeof cmd);
-#endif
+	ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, access, mr,
+			     &cmd, sizeof cmd, &resp, sizeof resp);
 
 	if (ret) {
 		free(mr);
diff --git a/libi40iw/src/i40iw_uverbs.c b/libi40iw/src/i40iw_uverbs.c
index 3a6799a9b50f..a117b534f533 100644
--- a/libi40iw/src/i40iw_uverbs.c
+++ b/libi40iw/src/i40iw_uverbs.c
@@ -154,9 +154,7 @@ struct ibv_mr *i40iw_ureg_mr(struct ibv_pd *pd, void *addr, size_t length, int a
 {
 	struct ibv_mr *mr;
 	struct i40iw_ureg_mr cmd;
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	struct ibv_reg_mr_resp resp;
-#endif
 
 	mr = malloc(sizeof(*mr));
 	if (!mr)
@@ -164,14 +162,9 @@ struct ibv_mr *i40iw_ureg_mr(struct ibv_pd *pd, void *addr, size_t length, int a
 
 	cmd.reg_type = I40IW_UMEMREG_TYPE_MEM;
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	if (ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr,
 			   access, mr, &cmd.ibv_cmd, sizeof(cmd),
 			   &resp, sizeof(resp))) {
-#else
-	if (ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr,
-			   access, mr, &cmd.ibv_cmd, sizeof(cmd))) {
-#endif
 		fprintf(stderr, PFX "%s: Failed to register memory\n", __func__);
 		free(mr);
 		return NULL;
@@ -226,9 +219,7 @@ struct ibv_cq *i40iw_ucreate_cq(struct ibv_context *context, int cqe,
 
 	struct i40iw_ureg_mr reg_mr_cmd;
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	struct ibv_reg_mr_resp reg_mr_resp;
-#endif
 
 	if (cqe > I40IW_MAX_CQ_SIZE)
 		return NULL;
@@ -268,18 +259,10 @@ struct ibv_cq *i40iw_ucreate_cq(struct ibv_context *context, int cqe,
 
 	reg_mr_cmd.cq_pages = cq_pages;
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	ret = ibv_cmd_reg_mr(&iwvctx->iwupd->ibv_pd, (void *)info.cq_base, totalsize,
 			     (uintptr_t)info.cq_base, IBV_ACCESS_LOCAL_WRITE,
 			     &iwucq->mr, &reg_mr_cmd.ibv_cmd, sizeof(reg_mr_cmd), &reg_mr_resp,
 			     sizeof(reg_mr_resp));
-#else
-	ret = ibv_cmd_reg_mr(&iwvctx->iwupd->ibv_pd, (void *)info.sq, totalsize,
-			     (uintptr_t)info.cq_base, IBV_ACCESS_LOCAL_WRITE,
-			     &iwucq->mr, &reg_mr_cmd.ibv_cmd,
-			     sizeof(reg_mr_cmd));
-#endif
-
 	if (ret) {
 		fprintf(stderr, PFX "%s: failed to pin memory for CQ\n", __func__);
 		goto err;
@@ -509,10 +492,7 @@ static int i40iw_vmapped_qp(struct i40iw_uqp *iwuqp, struct ibv_pd *pd,
 	int ret;
 	struct i40iw_ureg_mr reg_mr_cmd;
 	u32 sq_pages, rq_pages;
-
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	struct ibv_reg_mr_resp reg_mr_resp;
-#endif
 
 	memset(&reg_mr_cmd, 0, sizeof(reg_mr_cmd));
 	if ((sqdepth % I40IWQP_SW_WQSIZE_1024))
@@ -540,15 +520,9 @@ static int i40iw_vmapped_qp(struct i40iw_uqp *iwuqp, struct ibv_pd *pd,
 	reg_mr_cmd.sq_pages = sq_pages;
 	reg_mr_cmd.rq_pages = rq_pages;
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	ret = ibv_cmd_reg_mr(pd, (void *)info->sq, totalqpsize, (uintptr_t)info->sq,
 			     IBV_ACCESS_LOCAL_WRITE, &iwuqp->mr, &reg_mr_cmd.ibv_cmd,
 			     sizeof(reg_mr_cmd), &reg_mr_resp, sizeof(reg_mr_resp));
-#else
-	ret = ibv_cmd_reg_mr(pd, (void *)info->sq, totalqpsize, (uintptr_t)info->sq,
-			     IBV_ACCESS_LOCAL_WRITE, &iwuqp->mr, &reg_mr_cmd.ibv_cmd,
-			     sizeof(reg_mr_cmd));
-#endif
 	if (ret) {
 		fprintf(stderr, PFX "%s: failed to pin memory for SQ\n", __func__);
 		free(info->sq);
diff --git a/libipathverbs/src/verbs.c b/libipathverbs/src/verbs.c
index 12ca35f32189..35b2162a84f0 100644
--- a/libipathverbs/src/verbs.c
+++ b/libipathverbs/src/verbs.c
@@ -115,25 +115,15 @@ struct ibv_mr *ipath_reg_mr(struct ibv_pd *pd, void *addr,
 {
 	struct ibv_mr *mr;
 	struct ibv_reg_mr cmd;
+	struct ibv_reg_mr_resp resp;
 	int ret;
 
 	mr = malloc(sizeof *mr);
 	if (!mr)
 		return NULL;
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
-	{
-		struct ibv_reg_mr_resp resp;
-
-		ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr,
-				     access, mr, &cmd, sizeof cmd,
-                                     &resp, sizeof resp);
-	}
-#else
-	ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr,
-			     access, mr, &cmd, sizeof cmd);
-#endif
-
+	ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, access, mr,
+			     &cmd, sizeof cmd, &resp, sizeof resp);
 	if (ret) {
 		free(mr);
 		return NULL;
diff --git a/libmlx5/src/verbs.c b/libmlx5/src/verbs.c
index acbabc814621..ef85a63637c9 100644
--- a/libmlx5/src/verbs.c
+++ b/libmlx5/src/verbs.c
@@ -171,25 +171,15 @@ struct ibv_mr *mlx5_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 	struct ibv_reg_mr cmd;
 	int ret;
 	enum ibv_access_flags access = (enum ibv_access_flags)acc;
+	struct ibv_reg_mr_resp resp;
 
 	mr = calloc(1, sizeof(*mr));
 	if (!mr)
 		return NULL;
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
-	{
-		struct ibv_reg_mr_resp resp;
-
-		ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr,
-				     access, &(mr->ibv_mr),
-				     &cmd, sizeof(cmd),
-				     &resp, sizeof resp);
-	}
-#else
-	ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr, access,
-			      &(mr->ibv_mr),
-			     &cmd, sizeof cmd);
-#endif
+	ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, access,
+			     &(mr->ibv_mr), &cmd, sizeof(cmd), &resp,
+			     sizeof resp);
 	if (ret) {
 		mlx5_free_buf(&(mr->buf));
 		free(mr);
diff --git a/libmthca/src/verbs.c b/libmthca/src/verbs.c
index b3bce82affae..60dd44002ea3 100644
--- a/libmthca/src/verbs.c
+++ b/libmthca/src/verbs.c
@@ -120,6 +120,7 @@ static struct ibv_mr *__mthca_reg_mr(struct ibv_pd *pd, void *addr,
 {
 	struct ibv_mr *mr;
 	struct mthca_reg_mr cmd;
+	struct ibv_reg_mr_resp resp;
 	int ret;
 
 	/*
@@ -135,17 +136,8 @@ static struct ibv_mr *__mthca_reg_mr(struct ibv_pd *pd, void *addr,
 	if (!mr)
 		return NULL;
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
-	{
-		struct ibv_reg_mr_resp resp;
-
-		ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, mr,
-				     &cmd.ibv_cmd, sizeof cmd, &resp, sizeof resp);
-	}
-#else
-	ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, mr,
-			     &cmd.ibv_cmd, sizeof cmd);
-#endif
+	ret = ibv_cmd_reg_mr(pd, addr, length, hca_va, access, mr, &cmd.ibv_cmd,
+			     sizeof cmd, &resp, sizeof resp);
 	if (ret) {
 		free(mr);
 		return NULL;
@@ -284,6 +276,7 @@ int mthca_resize_cq(struct ibv_cq *ibcq, int cqe)
 	struct mthca_resize_cq cmd;
 	struct ibv_mr *mr;
 	struct mthca_buf buf;
+	struct ibv_resize_cq_resp resp;
 	int old_cqe;
 	int ret;
 
@@ -317,15 +310,8 @@ int mthca_resize_cq(struct ibv_cq *ibcq, int cqe)
 	old_cqe = ibcq->cqe;
 
 	cmd.lkey = mr->lkey;
-#ifdef IBV_CMD_RESIZE_CQ_HAS_RESP_PARAMS
-	{
-		struct ibv_resize_cq_resp resp;
-		ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd,
-					&resp, sizeof resp);
-	}
-#else
-	ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd);
-#endif
+	ret = ibv_cmd_resize_cq(ibcq, cqe - 1, &cmd.ibv_cmd, sizeof cmd, &resp,
+				sizeof resp);
 	if (ret) {
 		mthca_dereg_mr(mr);
 		mthca_free_buf(&buf);
diff --git a/libnes/src/nes_uverbs.c b/libnes/src/nes_uverbs.c
index 7c2454e7f55a..141f769bf14b 100644
--- a/libnes/src/nes_uverbs.c
+++ b/libnes/src/nes_uverbs.c
@@ -172,23 +172,16 @@ struct ibv_mr *nes_ureg_mr(struct ibv_pd *pd, void *addr,
 {
 	struct ibv_mr *mr;
 	struct nes_ureg_mr cmd;
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	struct ibv_reg_mr_resp resp;
-#endif
 
 	mr = malloc(sizeof *mr);
 	if (!mr)
 		return NULL;
 
 	cmd.reg_type = NES_UMEMREG_TYPE_MEM;
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	if (ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr,
 			access, mr, &cmd.ibv_cmd, sizeof cmd,
 			&resp, sizeof resp)) {
-#else
-	if (ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr,
-			access, mr, &cmd.ibv_cmd, sizeof cmd)) {
-#endif
 		free(mr);
 
 		return NULL;
@@ -225,9 +218,7 @@ int nes_ima_ureplace_cq(struct ibv_cq *cq,
 	struct nes_ucreate_cq_resp resp;
 	int comp_vector = nesucq->comp_vector;
 	struct nes_ureg_mr reg_mr_cmd;
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	struct ibv_reg_mr_resp reg_mr_resp;
-#endif
 	struct nes_uvcontext *nesvctx = to_nes_uctx(cq->context);
 
 	ret = ibv_cmd_destroy_cq(cq);
@@ -248,20 +239,12 @@ int nes_ima_ureplace_cq(struct ibv_cq *cq,
 
 	reg_mr_cmd.reg_type = NES_UMEMREG_TYPE_CQ;
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes,
 			(nesucq->size*sizeof(struct nes_hw_cqe)),
 			(uintptr_t)nesucq->cqes,
 			IBV_ACCESS_LOCAL_WRITE, &nesucq->mr,
 			&reg_mr_cmd.ibv_cmd, sizeof reg_mr_cmd,
 			&reg_mr_resp, sizeof reg_mr_resp);
-#else
-	ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes,
-			(nesucq->size*sizeof(struct nes_hw_cqe)),
-			(uintptr_t)nesucq->cqes,
-			IBV_ACCESS_LOCAL_WRITE, &nesucq->mr,
-			&reg_mr_cmd.ibv_cmd, sizeof reg_mr_cmd);
-#endif
 	if (ret) {
 		free((struct nes_hw_cqe *)nesucq->cqes);
 		goto err;
@@ -305,9 +288,7 @@ struct ibv_cq *nes_ucreate_cq(struct ibv_context *context, int cqe,
 {
 	struct nes_ucq *nesucq;
 	struct nes_ureg_mr reg_mr_cmd;
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	struct ibv_reg_mr_resp reg_mr_resp;
-#endif
 	struct nes_ucreate_cq cmd;
 	struct nes_ucreate_cq_resp resp;
 	int ret;
@@ -336,18 +317,11 @@ struct ibv_cq *nes_ucreate_cq(struct ibv_context *context, int cqe,
 	/* Register the memory for the CQ */
 	reg_mr_cmd.reg_type = NES_UMEMREG_TYPE_CQ;
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
 	ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes,
 			(nesucq->size*sizeof(struct nes_hw_cqe)),
 			(uintptr_t)nesucq->cqes, IBV_ACCESS_LOCAL_WRITE, &nesucq->mr,
 			&reg_mr_cmd.ibv_cmd, sizeof reg_mr_cmd,
 			&reg_mr_resp, sizeof reg_mr_resp);
-#else
-	ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes,
-			(nesucq->size*sizeof(struct nes_hw_cqe)),
-			(uintptr_t)nesucq->cqes, IBV_ACCESS_LOCAL_WRITE, &nesucq->mr,
-			&reg_mr_cmd.ibv_cmd, sizeof reg_mr_cmd);
-#endif
 	if (ret) {
 		/* fprintf(stderr, "ibv_cmd_reg_mr failed (ret = %d).\n", ret); */
 		free((struct nes_hw_cqe *)nesucq->cqes);
@@ -1039,9 +1013,7 @@ static int nes_vmapped_qp(struct nes_uqp *nesuqp, struct ibv_pd *pd, struct ibv_
 {
 	struct nes_ucreate_qp cmd;
 	struct nes_ureg_mr reg_mr_cmd;
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
         struct ibv_reg_mr_resp reg_mr_resp;
-#endif
 	int totalqpsize;
 	int ret;
 
@@ -1060,17 +1032,10 @@ static int nes_vmapped_qp(struct nes_uqp *nesuqp, struct ibv_pd *pd, struct ibv_
 	//fprintf(stderr, PFX "qp_rq_vbase = %p qp_sq_vbase=%p reg_mr = %p\n",
 	//		nesuqp->rq_vbase, nesuqp->sq_vbase, &nesuqp->mr);
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
         ret = ibv_cmd_reg_mr(pd, (void *)nesuqp->sq_vbase,totalqpsize,
 			     (uintptr_t) nesuqp->sq_vbase, IBV_ACCESS_LOCAL_WRITE,
 			     &nesuqp->mr, &reg_mr_cmd.ibv_cmd, sizeof reg_mr_cmd,
 			     &reg_mr_resp, sizeof reg_mr_resp);
-#else
-        ret = ibv_cmd_reg_mr(pd, (void *)nesuqp->sq_vbase,totalqpsize,
-			     (uintptr_t) nesuqp->sq_vbase, IBV_ACCESS_LOCAL_WRITE,
-			     &nesuqp->mr, &reg_mr_cmd.ibv_cmd, sizeof reg_mr_cmd);
-#endif
-
         if (ret) {
                 // fprintf(stderr, PFX "%s ibv_cmd_reg_mr failed (ret = %d).\n", __FUNCTION__, ret);
 		free((void *) nesuqp->sq_vbase);
diff --git a/librxe/src/rxe.c b/librxe/src/rxe.c
index ef7434e1d506..8f8cc91052e5 100644
--- a/librxe/src/rxe.c
+++ b/librxe/src/rxe.c
@@ -127,6 +127,7 @@ static struct ibv_mr *rxe_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 {
 	struct ibv_mr *mr;
 	struct ibv_reg_mr cmd;
+	struct ibv_reg_mr_resp resp;
 	int ret;
 
 	mr = malloc(sizeof *mr);
@@ -134,19 +135,8 @@ static struct ibv_mr *rxe_reg_mr(struct ibv_pd *pd, void *addr, size_t length,
 		return NULL;
 	}
 
-#ifdef IBV_CMD_REG_MR_HAS_RESP_PARAMS
-	{
-		struct ibv_reg_mr_resp resp;
-
-		ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr,
-				     access, mr, &cmd, sizeof cmd,
-				     &resp, sizeof resp);
-	}
-#else
-	ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t) addr,
-			     access, mr, &cmd, sizeof cmd);
-#endif
-
+	ret = ibv_cmd_reg_mr(pd, addr, length, (uintptr_t)addr, access, mr,
+			     &cmd, sizeof cmd, &resp, sizeof resp);
 	if (ret) {
 		free(mr);
 		return NULL;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 5/9] Remove HAVE_SYMVER_SUPPORT
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (3 preceding siblings ...)
  2016-09-29 20:47   ` [PATCH 4/9] Do not use IBV_CMD_(REG_MR|RESIZE_CQ)_HAS_RESP_PARAMS Jason Gunthorpe
@ 2016-09-29 20:47   ` Jason Gunthorpe
  2016-09-29 20:47   ` [PATCH 6/9] Remove old compat definitions of wmb/rmb/etc Jason Gunthorpe
                     ` (4 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 20:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Doug Ledford, Yishai Hadas

cmake now hard requires GNU style symbol version support in the
assembler and linker.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 buildlib/config.h.in     |  3 ---
 libibverbs/src/ibverbs.h | 11 ++---------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/buildlib/config.h.in b/buildlib/config.h.in
index 3b94ea3e4f51..99103b779baf 100644
--- a/buildlib/config.h.in
+++ b/buildlib/config.h.in
@@ -9,9 +9,6 @@
 // FIXME: Remove this, we provide the netlink kernel headers ibacm needs
 #define HAVE_NETLINK 1
 
-// FIXME: Remove this, The cmake version hard-requires symbol version support
-#define HAVE_SYMVER_SUPPORT 1
-
 // FIXME: Remove this, The cmake version hard-requires new style CLOEXEC support
 #define STREAM_CLOEXEC "e"
 
diff --git a/libibverbs/src/ibverbs.h b/libibverbs/src/ibverbs.h
index 7892af4ad247..a01dff2b4638 100644
--- a/libibverbs/src/ibverbs.h
+++ b/libibverbs/src/ibverbs.h
@@ -47,16 +47,9 @@
 
 #define DEFAULT_ABI	"IBVERBS_1.1"
 
-#ifdef HAVE_SYMVER_SUPPORT
-#  define symver(name, api, ver) \
-	asm(".symver " #name "," #api "@" #ver)
-#  define default_symver(name, api) \
+#define symver(name, api, ver) asm(".symver " #name "," #api "@" #ver)
+#define default_symver(name, api)                                              \
 	asm(".symver " #name "," #api "@@" DEFAULT_ABI)
-#else
-#  define symver(name, api, ver)
-#  define default_symver(name, api) \
-	extern __typeof(name) api __attribute__((alias(#name)))
-#endif /* HAVE_SYMVER_SUPPORT */
 
 #define PFX		"libibverbs: "
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 6/9] Remove old compat definitions of wmb/rmb/etc
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (4 preceding siblings ...)
  2016-09-29 20:47   ` [PATCH 5/9] Remove HAVE_SYMVER_SUPPORT Jason Gunthorpe
@ 2016-09-29 20:47   ` Jason Gunthorpe
  2016-09-29 20:47   ` [PATCH 7/9] Remove old MADV_DONTFORK/DOFORK compat Jason Gunthorpe
                     ` (3 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 20:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Yishai Hadas, Vladimir Sokolovsky

The canonical place for these is infiniband/arch.h, nothing else
should declare them.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libmlx4/src/mlx4.h   | 24 ------------------------
 libmlx5/src/mlx5.h   | 22 ----------------------
 libmthca/src/mthca.h |  8 --------
 3 files changed, 54 deletions(-)

diff --git a/libmlx4/src/mlx4.h b/libmlx4/src/mlx4.h
index 4551141d2007..1855cfbcbe48 100644
--- a/libmlx4/src/mlx4.h
+++ b/libmlx4/src/mlx4.h
@@ -49,30 +49,6 @@
 
 #include <valgrind/memcheck.h>
 
-#ifndef rmb
-#  define rmb() mb()
-#endif
-
-#ifndef wmb
-#  define wmb() mb()
-#endif
-
-#ifndef wc_wmb
-
-#if defined(__i386__)
-#define wc_wmb() asm volatile("lock; addl $0,0(%%esp) " ::: "memory")
-#elif defined(__x86_64__)
-#define wc_wmb() asm volatile("sfence" ::: "memory")
-#elif defined(__ia64__)
-#define wc_wmb() asm volatile("fwb" ::: "memory")
-#elif defined(__s390x__)
-#define wc_wmb { asm volatile("" : : : "memory") }
-#else
-#define wc_wmb() wmb()
-#endif
-
-#endif
-
 #define HIDDEN		__attribute__((visibility ("hidden")))
 
 #define PFX		"mlx4: "
diff --git a/libmlx5/src/mlx5.h b/libmlx5/src/mlx5.h
index aa8b6feceb4e..c209a7964768 100644
--- a/libmlx5/src/mlx5.h
+++ b/libmlx5/src/mlx5.h
@@ -54,28 +54,6 @@
 
 #include <valgrind/memcheck.h>
 
-#ifndef rmb
-#  define rmb() mb()
-#endif
-
-#ifndef wmb
-#  define wmb() mb()
-#endif
-
-#ifndef wc_wmb
-
-#if defined(__i386__)
-#define wc_wmb() asm volatile("lock; addl $0, 0(%%esp) " ::: "memory")
-#elif defined(__x86_64__)
-#define wc_wmb() asm volatile("sfence" ::: "memory")
-#elif defined(__ia64__)
-#define wc_wmb() asm volatile("fwb" ::: "memory")
-#else
-#define wc_wmb() wmb()
-#endif
-
-#endif
-
 #define HIDDEN		__attribute__((visibility("hidden")))
 
 #ifdef HAVE_FUNC_ATTRIBUTE_ALWAYS_INLINE
diff --git a/libmthca/src/mthca.h b/libmthca/src/mthca.h
index 18d52291343f..da53010cec69 100644
--- a/libmthca/src/mthca.h
+++ b/libmthca/src/mthca.h
@@ -41,14 +41,6 @@
 
 #include <valgrind/memcheck.h>
 
-#ifndef rmb
-#  define rmb() mb()
-#endif
-
-#ifndef wmb
-#  define wmb() mb()
-#endif
-
 #define HIDDEN		__attribute__((visibility ("hidden")))
 
 #define PFX		"mthca: "
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 7/9] Remove old MADV_DONTFORK/DOFORK compat
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (5 preceding siblings ...)
  2016-09-29 20:47   ` [PATCH 6/9] Remove old compat definitions of wmb/rmb/etc Jason Gunthorpe
@ 2016-09-29 20:47   ` Jason Gunthorpe
  2016-09-29 20:47   ` [PATCH 8/9] Remove most checks of __BYTE_ORDER Jason Gunthorpe
                     ` (2 subsequent siblings)
  9 siblings, 0 replies; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 20:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Doug Ledford, Yishai Hadas

All supported distros have this now.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libibverbs/src/memory.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/libibverbs/src/memory.c b/libibverbs/src/memory.c
index 8e728c4f61fc..5c8255d47c15 100644
--- a/libibverbs/src/memory.c
+++ b/libibverbs/src/memory.c
@@ -46,17 +46,6 @@
 
 #include "ibverbs.h"
 
-/*
- * Most distro's headers don't have these yet.
- */
-#ifndef MADV_DONTFORK
-#define MADV_DONTFORK	10
-#endif
-
-#ifndef MADV_DOFORK
-#define MADV_DOFORK	11
-#endif
-
 struct ibv_mem_node {
 	enum {
 		IBV_RED,
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (6 preceding siblings ...)
  2016-09-29 20:47   ` [PATCH 7/9] Remove old MADV_DONTFORK/DOFORK compat Jason Gunthorpe
@ 2016-09-29 20:47   ` Jason Gunthorpe
       [not found]     ` <1475182076-5411-9-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 20:47   ` [PATCH 9/9] nes: Remove code guarded by HAVE_DECL_IBV_QPT_RAW_ETH Jason Gunthorpe
  2016-10-02 12:58   ` [PATCH rdma-core 0/9] Dead Code Removal Doug Ledford
  9 siblings, 1 reply; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 20:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Steve Wise, Tatyana Nikolova, Hal Rosenstock, Doug Ledford,
	Yishai Hadas, Devesh Sharma, Sean Hefty, Bart Van Assche

For a long time now endian.h has defined sane fixed with conversion
macros, so lets just use them instead of rolling our own.

Also, htonll is defined in this source tree under infiniband/arch.h,
so all users of that macro can just use the header.

Someday we should also get rid of all the endless wrappers..

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 ibacm/linux/osd.h                    |  8 +-------
 libcxgb3/src/cxio_wr.h               | 10 +++-------
 libcxgb4/src/t4.h                    | 11 ++++-------
 libi40iw/src/i40iw_umain.h           | 18 ++----------------
 libibumad/src/sysfs.c                |  8 +-------
 libibverbs/include/infiniband/arch.h | 15 ++++++---------
 libnes/src/nes_umain.h               | 17 ++---------------
 libocrdma/src/ocrdma_verbs.c         | 32 ++++----------------------------
 librdmacm/examples/common.h          | 11 +++--------
 librdmacm/src/cma.h                  |  9 +--------
 srp_daemon/srp_daemon/srp_daemon.h   | 17 +----------------
 11 files changed, 28 insertions(+), 128 deletions(-)

diff --git a/ibacm/linux/osd.h b/ibacm/linux/osd.h
index 2c4db81b9e8e..c1e7d996c371 100644
--- a/ibacm/linux/osd.h
+++ b/ibacm/linux/osd.h
@@ -46,6 +46,7 @@
 #include <arpa/inet.h>
 #include <sys/time.h>
 #include <netinet/in.h>
+#include <infiniband/arch.h>
 
 #include <ccan/minmax.h>
 
@@ -55,13 +56,6 @@
 #define LIB_DESTRUCTOR __attribute__((destructor))
 #define CDECL_FUNC
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define htonll(x) bswap_64(x)
-#else
-#define htonll(x) (x)
-#endif
-#define ntohll(x) htonll(x)
-
 #if DEFINE_ATOMICS
 typedef struct { pthread_mutex_t mut; int val; } atomic_t;
 static inline int atomic_inc(atomic_t *atomic)
diff --git a/libcxgb3/src/cxio_wr.h b/libcxgb3/src/cxio_wr.h
index ece06bd0568c..e24c7fed7d76 100644
--- a/libcxgb3/src/cxio_wr.h
+++ b/libcxgb3/src/cxio_wr.h
@@ -50,13 +50,9 @@
 #define Q_COUNT(rptr,wptr) ((wptr)-(rptr))
 #define Q_PTR2IDX(ptr,size_log2) (ptr & ((1UL<<size_log2)-1))
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#  define cpu_to_pci32(val) ((val))
-#elif __BYTE_ORDER == __BIG_ENDIAN
-#  define cpu_to_pci32(val) (__bswap_32((val)))
-#else
-#  error __BYTE_ORDER not defined
-#endif
+/* Generally speaking, PCI systems auto-byteswap on PCI accesses, so this is
+   probably wrong */
+#define cpu_to_pci32(val) htole32(val)
 
 #define RING_DOORBELL(doorbell, QPID) { \
 	*doorbell = cpu_to_pci32(QPID); \
diff --git a/libcxgb4/src/t4.h b/libcxgb4/src/t4.h
index e8c5cf66cb14..e519cc4087e6 100644
--- a/libcxgb4/src/t4.h
+++ b/libcxgb4/src/t4.h
@@ -62,13 +62,10 @@
 #define unlikely
 #define ROUND_UP(x, n) (((x) + (n) - 1u) & ~((n) - 1u))
 #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#  define cpu_to_pci32(val) ((val))
-#elif __BYTE_ORDER == __BIG_ENDIAN
-#  define cpu_to_pci32(val) (__bswap_32((val)))
-#else
-#  error __BYTE_ORDER not defined
-#endif
+
+/* Generally speaking, PCI systems auto-byteswap on PCI accesses, so this is
+   probably wrong */
+#define cpu_to_pci32(val) htole32(val)
 
 #define writel(v, a) do { *((volatile u32 *)(a)) = cpu_to_pci32(v); } while (0)
 
diff --git a/libi40iw/src/i40iw_umain.h b/libi40iw/src/i40iw_umain.h
index 39b54ba29dcb..13d3da89eba9 100644
--- a/libi40iw/src/i40iw_umain.h
+++ b/libi40iw/src/i40iw_umain.h
@@ -195,28 +195,14 @@ int i40iw_uattach_mcast(struct ibv_qp *, const union ibv_gid *, uint16_t);
 int i40iw_udetach_mcast(struct ibv_qp *, const union ibv_gid *, uint16_t);
 void i40iw_async_event(struct ibv_async_event *event);
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
 static inline uint32_t cpu_to_le32(uint32_t x)
 {
-	return x;
+	return htole32(x);
 }
 
 static inline uint32_t le32_to_cpu(uint32_t x)
 {
-	return x;
+	return le32toh(x);
 }
-#else
-static inline uint32_t cpu_to_le32(uint32_t x)
-{
-	return ((x & 0xFF000000) >> 24) | ((x & 0x00FF0000) >> 8) |
-	    ((x & 0x0000FF00) << 8) | ((x & 0x000000FF) << 24);
-}
-
-static inline uint32_t le32_to_cpu(uint32_t x)
-{
-	return ((x & 0xFF000000) >> 24) | ((x & 0x00FF0000) >> 8) |
-	    ((x & 0x0000FF00) << 8) | ((x & 0x000000FF) << 24);
-}
-#endif
 
 #endif /* i40iw_umain_H */
diff --git a/libibumad/src/sysfs.c b/libibumad/src/sysfs.c
index d10f312285ea..011e411f0951 100644
--- a/libibumad/src/sysfs.c
+++ b/libibumad/src/sysfs.c
@@ -41,15 +41,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <endian.h>
 #include <byteswap.h>
 #include <netinet/in.h>
-
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define htonll(x) bswap_64(x)
-#else
-#define htonll(x) (x)
-#endif
+#include <infiniband/arch.h>
 
 static int ret_code(void)
 {
diff --git a/libibverbs/include/infiniband/arch.h b/libibverbs/include/infiniband/arch.h
index e35ecf05bceb..bf0feec08d73 100644
--- a/libibverbs/include/infiniband/arch.h
+++ b/libibverbs/include/infiniband/arch.h
@@ -37,15 +37,12 @@
 #include <endian.h>
 #include <byteswap.h>
 
-#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; }
-#else
-#error __BYTE_ORDER is neither __LITTLE_ENDIAN nor __BIG_ENDIAN
-#endif
+#undef htonll
+#undef ntohll
+static inline uint64_t htonll(uint64_t x) { return htobe64(x); }
+static inline uint64_t ntohll(uint64_t x) { return be64toh(x); }
+#define htonll htonll
+#define ntohll ntohll
 
 /*
  * Architecture-specific defines.  Currently, an architecture is
diff --git a/libnes/src/nes_umain.h b/libnes/src/nes_umain.h
index c53acd7e90fe..91299823e675 100644
--- a/libnes/src/nes_umain.h
+++ b/libnes/src/nes_umain.h
@@ -393,26 +393,13 @@ int nes_uattach_mcast(struct ibv_qp *, const union ibv_gid *, uint16_t);
 int nes_udetach_mcast(struct ibv_qp *, const union ibv_gid *, uint16_t);
 void nes_async_event(struct ibv_async_event *event);
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
 static inline uint32_t cpu_to_le32(uint32_t x)
 {
-	return x;
+	return htole32(x);
 }
 static inline uint32_t le32_to_cpu(uint32_t x)
 {
-	return x;
+	return le32toh(x);
 }
-#else
-static inline uint32_t cpu_to_le32(uint32_t x)
-{
-	return (((x&0xFF000000)>>24) | ((x&0x00FF0000)>>8) |
-			((x&0x0000FF00)<<8) | ((x&0x000000FF)<<24));
-}
-static inline uint32_t le32_to_cpu(uint32_t x)
-{
-	return (((x&0xFF000000)>>24) | ((x&0x00FF0000)>>8) |
-			((x&0x0000FF00)<<8) | ((x&0x000000FF)<<24));
-}
-#endif
 
 #endif				/* nes_umain_H */
diff --git a/libocrdma/src/ocrdma_verbs.c b/libocrdma/src/ocrdma_verbs.c
index 6d58cb219fe1..163bf23f8914 100644
--- a/libocrdma/src/ocrdma_verbs.c
+++ b/libocrdma/src/ocrdma_verbs.c
@@ -46,6 +46,7 @@
 #include <sys/mman.h>
 #include <netinet/in.h>
 #include <unistd.h>
+#include <endian.h>
 
 #include "ocrdma_main.h"
 #include "ocrdma_abi.h"
@@ -54,48 +55,23 @@
 static void ocrdma_ring_cq_db(struct ocrdma_cq *cq, uint32_t armed,
 			      int solicited, uint32_t num_cqe);
 
-static inline uint32_t ocrdma_swap_endianness(uint32_t val)
-{
-	return ((val & 0xFF000000) >> 24) | ((val & 0xFF) << 24) |
-	    ((val & 0xFF00) << 8) | ((val & 0xFF0000) >> 8);
-}
-
 static inline uint32_t ocrdma_cpu_to_le(uint32_t val)
 {
-#if __BYTE_ORDER == __BIG_ENDIAN
-	return ocrdma_swap_endianness(val);
-#else
-	return val;
-#endif
+	return htole32(val);
 }
 
 static inline uint32_t ocrdma_le_to_cpu(uint32_t val)
 {
-#if __BYTE_ORDER == __BIG_ENDIAN
-	return ocrdma_swap_endianness(val);
-#else
-	return val;
-#endif
-}
-
-static inline uint32_t ocrdma_cpu_to_be(uint32_t val)
-{
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-	return ocrdma_swap_endianness(val);
-#else
-	return val;
-#endif
+	return le32toh(val);
 }
 
 static inline void ocrdma_swap_cpu_to_le(void *dst, uint32_t len)
 {
-#if __BYTE_ORDER == __BIG_ENDIAN
 	int i = 0;
 	uint32_t *src_ptr = dst;
 	uint32_t *dst_ptr = dst;
 	for (; i < (len / 4); i++)
-		*dst_ptr++ = ocrdma_swap_endianness(*src_ptr++);
-#endif
+		*dst_ptr++ = le32toh(*src_ptr++);
 }
 
 /*
diff --git a/librdmacm/examples/common.h b/librdmacm/examples/common.h
index f7511f039697..ac2d160b0044 100644
--- a/librdmacm/examples/common.h
+++ b/librdmacm/examples/common.h
@@ -34,20 +34,15 @@
 
 #include <stdlib.h>
 #include <sys/types.h>
-#include <byteswap.h>
+#include <endian.h>
 #include <poll.h>
 
 #include <rdma/rdma_cma.h>
 #include <rdma/rsocket.h>
 #include <infiniband/ib.h>
 
-#if __BYTE_ORDER == __BIG_ENDIAN
-static inline uint64_t cpu_to_be64(uint64_t x) { return x; }
-static inline uint32_t cpu_to_be32(uint32_t x) { return x; }
-#else
-static inline uint64_t cpu_to_be64(uint64_t x) { return bswap_64(x); }
-static inline uint32_t cpu_to_be32(uint32_t x) { return bswap_32(x); }
-#endif
+static inline uint64_t cpu_to_be64(uint64_t x) { return htobe64(x); }
+static inline uint32_t cpu_to_be32(uint32_t x) { return htobe32(x); }
 
 extern int use_rs;
 
diff --git a/librdmacm/src/cma.h b/librdmacm/src/cma.h
index 16a55a67af9e..c2f603d6f439 100644
--- a/librdmacm/src/cma.h
+++ b/librdmacm/src/cma.h
@@ -44,6 +44,7 @@
 
 #include <rdma/rdma_cma.h>
 #include <infiniband/ib.h>
+#include <infiniband/arch.h>
 
 #include <ccan/minmax.h>
 
@@ -51,14 +52,6 @@
 
 #define PFX "librdmacm: "
 
-#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); }
-#else
-static inline uint64_t htonll(uint64_t x) { return x; }
-static inline uint64_t ntohll(uint64_t x) { return x; }
-#endif
-
 /*
  * Fast synchronization for low contention locking.
  */
diff --git a/srp_daemon/srp_daemon/srp_daemon.h b/srp_daemon/srp_daemon/srp_daemon.h
index d6a2d8a84728..5d42d51e6d1c 100644
--- a/srp_daemon/srp_daemon/srp_daemon.h
+++ b/srp_daemon/srp_daemon/srp_daemon.h
@@ -42,26 +42,11 @@
 #include <byteswap.h>
 #include <infiniband/verbs.h>
 #include <infiniband/umad.h>
+#include <infiniband/arch.h>
 
 #include "config.h"
 #include "srp_ib_types.h"
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#ifndef htonll
-#define htonll(x) bswap_64(x)
-#endif
-#ifndef ntohll
-#define ntohll(x) bswap_64(x)
-#endif
-#elif __BYTE_ORDER == __BIG_ENDIAN
-#ifndef htonll
-#define htonll(x) (x)
-#endif
-#ifndef ntohll
-#define ntohll(x) (x)
-#endif
-#endif
-
 #ifdef __cplusplus
 template <bool b> struct vki_static_assert { int m_bitfield:(2*b-1); };
 #define STATIC_ASSERT(expr) \
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 9/9] nes: Remove code guarded by HAVE_DECL_IBV_QPT_RAW_ETH
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (7 preceding siblings ...)
  2016-09-29 20:47   ` [PATCH 8/9] Remove most checks of __BYTE_ORDER Jason Gunthorpe
@ 2016-09-29 20:47   ` Jason Gunthorpe
  2016-10-02 12:58   ` [PATCH rdma-core 0/9] Dead Code Removal Doug Ledford
  9 siblings, 0 replies; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 20:47 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Tatyana Nikolova

Unclear what this was ever for, but we don't support it.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libnes/src/nes_uverbs.c | 322 ------------------------------------------------
 1 file changed, 322 deletions(-)

diff --git a/libnes/src/nes_uverbs.c b/libnes/src/nes_uverbs.c
index 141f769bf14b..aa9c2b9e2b8c 100644
--- a/libnes/src/nes_uverbs.c
+++ b/libnes/src/nes_uverbs.c
@@ -206,80 +206,6 @@ int nes_udereg_mr(struct ibv_mr *mr)
 	return 0;
 }
 
-#if HAVE_DECL_IBV_QPT_RAW_ETH
-static
-int nes_ima_ureplace_cq(struct ibv_cq *cq,
-			int mcrqf,
-			struct nes_uqp *nesuqp)
-{
-	struct nes_ucq *nesucq = to_nes_ucq(cq);
-	int ret;
-	struct nes_ucreate_cq cmd;
-	struct nes_ucreate_cq_resp resp;
-	int comp_vector = nesucq->comp_vector;
-	struct nes_ureg_mr reg_mr_cmd;
-	struct ibv_reg_mr_resp reg_mr_resp;
-	struct nes_uvcontext *nesvctx = to_nes_uctx(cq->context);
-
-	ret = ibv_cmd_destroy_cq(cq);
-	nes_debug(NES_DBG_UD, "%s(%d) mcrqf=%d ret=%d\n",
-			__func__,
-			__LINE__,
-			mcrqf,
-			ret);
-	if (ret)
-		return ret;
-
-	ret = ibv_cmd_dereg_mr(&nesucq->mr);
-	if (ret) {
-		fprintf(stderr, PFX "%s: Failed to deregister"
-			" CQ Memory Region.\n", __func__);
-		return ret;
-	}
-
-	reg_mr_cmd.reg_type = NES_UMEMREG_TYPE_CQ;
-
-	ret = ibv_cmd_reg_mr(&nesvctx->nesupd->ibv_pd, (void *)nesucq->cqes,
-			(nesucq->size*sizeof(struct nes_hw_cqe)),
-			(uintptr_t)nesucq->cqes,
-			IBV_ACCESS_LOCAL_WRITE, &nesucq->mr,
-			&reg_mr_cmd.ibv_cmd, sizeof reg_mr_cmd,
-			&reg_mr_resp, sizeof reg_mr_resp);
-	if (ret) {
-		free((struct nes_hw_cqe *)nesucq->cqes);
-		goto err;
-	}
-
-
-	/* Create the CQ */
-	memset(&cmd, 0, sizeof(cmd));
-	cmd.user_cq_buffer = (__u64)((uintptr_t)nesucq->cqes);
-	cmd.mcrqf = mcrqf | 0x20000000;    /* IMA specific sq number */
-
-	nes_debug(NES_DBG_UD, "%s(%d) mcrqf=%d\n",
-			__func__, __LINE__,
-			mcrqf);
-	ret = ibv_cmd_create_cq(cq->context,
-			nesucq->size-1,
-			cq->channel,
-			comp_vector,
-			&nesucq->ibv_cq, &cmd.ibv_cmd, sizeof cmd,
-			&resp.ibv_resp, sizeof resp);
-	if (ret)
-		goto err;
-
-	nesucq->cq_id = (uint16_t)resp.cq_id;
-	nesucq->udqp = nesuqp;
-	nes_debug(NES_DBG_UD, "%s(%d) cqid=%d mcrqf=%d\n",
-			__func__, __LINE__,
-			nesucq->cq_id, mcrqf);
-
-	return 0;
- err:
-	return ret;
-}
-#endif
-
 /**
  * nes_ucreate_cq
  */
@@ -1103,15 +1029,6 @@ struct ibv_qp *nes_ucreate_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr)
 
 	/* fprintf(stderr, PFX "%s\n", __FUNCTION__); */
 
-#if HAVE_DECL_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) {
@@ -1168,58 +1085,6 @@ struct ibv_qp *nes_ucreate_qp(struct ibv_pd *pd, struct ibv_qp_init_attr *attr)
 	nesuqp->ibv_qp.qp_num = resp.qp_id;
 	nesuqp->rdma0_msg = 1;
 
-#if HAVE_DECL_IBV_QPT_RAW_ETH
-	if (attr->qp_type == IBV_QPT_RAW_ETH) {
-		int i = 0;
-
-		nesuqp->nes_ud_sksq_fd = open("/dev/infiniband/nes_ud_sksq",
-						O_RDWR);
-		if (nesuqp->nes_ud_sksq_fd <= 0)
-			return 0;
-		nesuqp->sksq_shared_ctxt = mmap(NULL, 4096,
-					PROT_WRITE | PROT_READ,
-					MAP_SHARED,
-					nesuqp->nes_ud_sksq_fd, 0);
-		if (nesuqp->sksq_shared_ctxt == 0)
-			return 0;
-
-		/* no LSMM for UD */
-		nesuqp->sq_head = 0;
-		nesuqp->sq_tail = 0;
-		nes_debug(NES_DBG_UD, "%s(%d) qpid=0x%x\n",
-			__func__, __LINE__, nesuqp->qp_id);
-
-		/* reallocate CQs after QP is created */
-		if (nes_ima_ureplace_cq(attr->recv_cq,
-					resp.qp_id & 0xffff,
-					nesuqp) != 0)
-			return NULL;
-
-		if (nes_ima_ureplace_cq(attr->send_cq,
-					resp.qp_id >> 16,
-					nesuqp) != 0)
-			return NULL;
-
-		/* allocate N+1, last one would be used for NULL */
-		nesuqp->pend_rx_wr = malloc(NES_UD_RX_BATCH_SZ *
-						sizeof *nesuqp->pend_rx_wr);
-		if (!nesuqp)
-			exit(0);
-
-		for (i = 0; i < NES_UD_RX_BATCH_SZ; i++) {
-			nesuqp->pend_rx_wr[i].sg_list =
-				malloc(NES_UD_MAX_SG_LIST_SZ *
-					sizeof *nesuqp->pend_rx_wr[i].sg_list);
-			nesuqp->pend_rx_wr[i].next =
-					(i < NES_UD_RX_BATCH_SZ-1) ?
-						&nesuqp->pend_rx_wr[i+1] : 0;
-		}
-		/* prepare the wr_id tables */
-		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;
 }
 
@@ -1311,27 +1176,6 @@ int nes_udestroy_qp(struct ibv_qp *qp)
 
 	pthread_spin_destroy(&nesuqp->lock);
 
-#if HAVE_DECL_IBV_QPT_RAW_ETH
-	if (qp->qp_type == IBV_QPT_RAW_ETH) {
-		int i = 0;
-
-		if (nesuqp->pend_rx_wr) {
-			for (i = 0; i < NES_UD_RX_BATCH_SZ; i++)
-				if (nesuqp->pend_rx_wr[i].sg_list) {
-					free(nesuqp->pend_rx_wr[i].sg_list);
-					nesuqp->pend_rx_wr[i].sg_list  = 0;
-				}
-		}
-		free(nesuqp->pend_rx_wr);
-		nesuqp->pend_rx_wr = 0;
-		if (nesuqp->sksq_shared_ctxt)
-			munmap(nesuqp->sksq_shared_ctxt, 4096);
-
-		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);
@@ -1343,85 +1187,6 @@ int nes_udestroy_qp(struct ibv_qp *qp)
 	return 0;
 }
 
-#if HAVE_DECL_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)
-{
-	struct nes_uqp *nesuqp = to_nes_uqp(ib_qp);
-	int new_req_cnt = 0;
-	uint32_t outstanding_wqes;
-	uint32_t qsize = nesuqp->sq_size;
-	int ret = 0;
-	struct ibv_send_wr *tmp_wr = ib_wr;
-	struct nes_ud_send_wr *nes_ud_wr = 0;
-	int bc = 0;
-	int sq_head;
-	int wr_id_head;
-
-	while (tmp_wr) {
-		new_req_cnt++;
-		tmp_wr = tmp_wr->next;
-	}
-	if (nesuqp->sq_head >= nesuqp->sq_tail)
-		outstanding_wqes = nesuqp->sq_head - nesuqp->sq_tail;
-	else
-		outstanding_wqes = nesuqp->sq_head + qsize - nesuqp->sq_tail;
-
-	if (unlikely(outstanding_wqes >= (qsize - new_req_cnt)))
-		return -EINVAL;
-
-	/* we know that there is sufficient space in the send queue */
-	/* so we can store wr_id in the wr_id queue */
-	sq_head = nesuqp->sq_head;
-
-	if (sq_head + new_req_cnt >= qsize)
-		nesuqp->sq_head = sq_head + new_req_cnt - qsize;
-	else
-		nesuqp->sq_head = sq_head + new_req_cnt;
-
-	nes_ud_wr = (struct nes_ud_send_wr *)nesuqp->sksq_shared_ctxt;
-	bc = 0;
-
-	/* set up the qp id in the shared page message */
-	nes_ud_wr->qpn = nesuqp->qp_id;
-
-	while (ib_wr) {
-		nes_ud_wr->sg_list[bc].addr = ib_wr->sg_list[0].addr;
-		nes_ud_wr->sg_list[bc].length = ib_wr->sg_list[0].length;
-		nes_ud_wr->sg_list[bc].lkey = ib_wr->sg_list[0].lkey;
-		nes_ud_wr->flags = ib_wr->send_flags;
-		nes_ud_wr->flags = nes_ud_wr->flags | (ib_wr->imm_data << 16);
-		/* store the wr_id in the internal queue */
-		/* the queue is in sync with the queue in kernel */
-		/* the wr_id will be read in poll_cq */
-		wr_id_head = bc + sq_head;
-		if (wr_id_head > (qsize - 1))
-			wr_id_head = wr_id_head - qsize;
-
-		nesuqp->send_wr_id[wr_id_head] = ib_wr->wr_id;
-		if (++bc >= 64) {
-			nes_ud_wr->wr_cnt = bc;
-			ret = write(nesuqp->nes_ud_sksq_fd, 0, 0);
-			if (ret != 0)
-				goto out;
-			nes_ud_wr =
-			(struct nes_ud_send_wr *)nesuqp->sksq_shared_ctxt;
-			bc = 0;
-		}
-		ib_wr = ib_wr->next;
-	}
-	if (bc > 0) {
-		nes_ud_wr->wr_cnt = bc;
-		ret = write(nesuqp->nes_ud_sksq_fd, 0, 0);
-		if (ret != 0)
-			goto out;
-	}
-out:
-	return ret;
-}
-#endif
-
 /**
  * nes_upost_send
  */
@@ -1441,11 +1206,6 @@ int nes_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr,
 	uint32_t total_payload_length = 0;
 	int sge_index;
 
-#if HAVE_DECL_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);
 
 	head = nesuqp->sq_head;
@@ -1617,83 +1377,6 @@ int nes_upost_send(struct ibv_qp *ib_qp, struct ibv_send_wr *ib_wr,
 	return err;
 }
 
-#if HAVE_DECL_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)
-{
-	struct nes_uqp *nesuqp = to_nes_uqp(ib_qp);
-	int new_req_cnt = 0;
-	uint32_t outstanding_wqes;
-	uint32_t qsize = nesuqp->rq_size;
-	struct ibv_send_wr *tmp_wr = (struct ibv_send_wr *)ib_wr;
-	int ret = 0;
-	struct nes_ud_recv_wr *nes_ud_wr;
-	int rq_head;
-	int bc;
-	int wr_id_head;
-
-	nes_ud_wr = (struct nes_ud_recv_wr *)
-				(((char *)nesuqp->sksq_shared_ctxt) + 2048);
-	while (tmp_wr) {
-		new_req_cnt++;
-		tmp_wr = tmp_wr->next;
-	}
-
-	if (nesuqp->rq_head >= nesuqp->rq_tail)
-		outstanding_wqes = nesuqp->rq_head - nesuqp->rq_tail;
-	else
-		outstanding_wqes = nesuqp->rq_head + qsize - nesuqp->rq_tail;
-
-	if (unlikely(outstanding_wqes >= (qsize - new_req_cnt)))
-		return -EINVAL;
-
-	/* now we know thay the rq has sufficient
-	   place so we can start wr_id storing */
-	rq_head = nesuqp->rq_head;
-
-	if (rq_head + new_req_cnt >= qsize)
-		nesuqp->rq_head = rq_head + new_req_cnt - qsize;
-	else
-		nesuqp->rq_head = rq_head + new_req_cnt;
-
-	/* set the queue number in the shared page */
-	nes_ud_wr->qpn = nesuqp->qp_id;
-	bc = 0;
-	while (ib_wr) {
-		if (ib_wr->num_sge > NES_UD_MAX_SG_LIST_SZ)
-			return -EINVAL;
-
-		nes_ud_wr->sg_list[nesuqp->pending_rcvs].addr =
-						ib_wr->sg_list[0].addr;
-		nes_ud_wr->sg_list[nesuqp->pending_rcvs].length =
-						ib_wr->sg_list[0].length;
-		nes_ud_wr->sg_list[nesuqp->pending_rcvs].lkey =
-						ib_wr->sg_list[0].lkey;
-
-		/* store the wr_id */
-		wr_id_head = bc + rq_head;
-		if (wr_id_head > (qsize - 1))
-			wr_id_head = wr_id_head - qsize;
-
-		nesuqp->recv_wr_id[wr_id_head] = ib_wr->wr_id;
-		bc++;
-
-		++nesuqp->pending_rcvs;
-		if (nesuqp->pending_rcvs >= NES_UD_RX_BATCH_SZ) {
-			nes_ud_wr->wr_cnt = nesuqp->pending_rcvs;
-			ret = read(nesuqp->nes_ud_sksq_fd, 0, 0);
-			if (ret != 0)
-				goto out;
-			nesuqp->pending_rcvs = 0;
-		}
-		ib_wr = ib_wr->next;
-	}
-out:
-	return ret;
-}
-#endif
-
 /**
  * nes_upost_recv
  */
@@ -1713,11 +1396,6 @@ int nes_upost_recv(struct ibv_qp *ib_qp, struct ibv_recv_wr *ib_wr,
 	uint32_t total_payload_length;
 	int sge_index;
 
-#if HAVE_DECL_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;
 		return -EINVAL;
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND
       [not found]     ` <1475182076-5411-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-29 21:01       ` Bart Van Assche
       [not found]         ` <aef5ce41-14bf-9869-88c8-ab5796634a8c-HInyCGIudOg@public.gmane.org>
  2016-09-30 16:49       ` Bart Van Assche
  2016-09-30 17:02       ` Hal Rosenstock
  2 siblings, 1 reply; 33+ messages in thread
From: Bart Van Assche @ 2016-09-29 21:01 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Sean Hefty, Hal Rosenstock, Doug Ledford, Yishai Hadas,
	Vladimir Sokolovsky

On 09/29/2016 01:47 PM, Jason Gunthorpe wrote:
> The cmake build system guarantees that valgrind/memcheck.h is present.
> If the system does not have it, or valgrind is disabled, then it is
> replaced with a dummy header full of empty stubs.

Independent of this patch: Valgrind has a stable ABI so I propose to add 
a copy of the memcheck.h header file to the rdma-core source tree. Many 
other open source projects already do this.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RE: [PATCH 1/9] Remove HAVE_CONFIG_H
       [not found]     ` <1475182076-5411-2-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-29 21:22       ` Steve Wise
  2016-09-30 17:02       ` Hal Rosenstock
  1 sibling, 0 replies; 33+ messages in thread
From: Steve Wise @ 2016-09-29 21:22 UTC (permalink / raw)
  To: 'Jason Gunthorpe', linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: 'Mike Marciniszyn', 'Dennis Dalessandro',
	'Tatyana Nikolova', 'Sean Hefty',
	'Hal Rosenstock', 'Doug Ledford',
	'Yishai Hadas', 'Vladimir Sokolovsky',
	'Devesh Sharma', 'Moni Shoua',
	'open list:HF1 USERSPACE PROVIDER (for hf1.ko)'

> Subject: [PATCH 1/9] Remove HAVE_CONFIG_H
> 
> The cmake build system guarantees this header exists, we do not need
> the define or the test.
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---

<snip>

>  libcxgb3/src/cq.c                   | 4 +---
>  libcxgb3/src/iwch.c                 | 4 +---
>  libcxgb3/src/qp.c                   | 4 +---
>  libcxgb3/src/verbs.c                | 4 +---
>  libcxgb4/src/cq.c                   | 4 +---
>  libcxgb4/src/dev.c                  | 4 +---
>  libcxgb4/src/qp.c                   | 4 +---
>  libcxgb4/src/verbs.c                | 4 +---

For the above changes:

Acked-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RE: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]     ` <1475182076-5411-9-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-29 21:26       ` Steve Wise
  2016-09-29 22:28         ` Jason Gunthorpe
  2016-09-30 16:51       ` Bart Van Assche
  2016-09-30 17:02       ` Hal Rosenstock
  2 siblings, 1 reply; 33+ messages in thread
From: Steve Wise @ 2016-09-29 21:26 UTC (permalink / raw)
  To: 'Jason Gunthorpe', linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: 'Tatyana Nikolova', 'Hal Rosenstock',
	'Doug Ledford', 'Yishai Hadas',
	'Devesh Sharma', 'Sean Hefty',
	'Bart Van Assche'

> For a long time now endian.h has defined sane fixed with conversion
> macros, so lets just use them instead of rolling our own.
> 
> Also, htonll is defined in this source tree under infiniband/arch.h,
> so all users of that macro can just use the header.
> 
> Someday we should also get rid of all the endless wrappers..
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  ibacm/linux/osd.h                    |  8 +-------
>  libcxgb3/src/cxio_wr.h               | 10 +++-------
>  libcxgb4/src/t4.h                    | 11 ++++-------
>  libi40iw/src/i40iw_umain.h           | 18 ++----------------
>  libibumad/src/sysfs.c                |  8 +-------
>  libibverbs/include/infiniband/arch.h | 15 ++++++---------
>  libnes/src/nes_umain.h               | 17 ++---------------
>  libocrdma/src/ocrdma_verbs.c         | 32 ++++----------------------------
>  librdmacm/examples/common.h          | 11 +++--------
>  librdmacm/src/cma.h                  |  9 +--------
>  srp_daemon/srp_daemon/srp_daemon.h   | 17 +----------------
>  11 files changed, 28 insertions(+), 128 deletions(-)
> 

<snip>

> diff --git a/libcxgb3/src/cxio_wr.h b/libcxgb3/src/cxio_wr.h
> index ece06bd0568c..e24c7fed7d76 100644
> --- a/libcxgb3/src/cxio_wr.h
> +++ b/libcxgb3/src/cxio_wr.h
> @@ -50,13 +50,9 @@
>  #define Q_COUNT(rptr,wptr) ((wptr)-(rptr))
>  #define Q_PTR2IDX(ptr,size_log2) (ptr & ((1UL<<size_log2)-1))
> 
> -#if __BYTE_ORDER == __LITTLE_ENDIAN
> -#  define cpu_to_pci32(val) ((val))
> -#elif __BYTE_ORDER == __BIG_ENDIAN
> -#  define cpu_to_pci32(val) (__bswap_32((val)))
> -#else
> -#  error __BYTE_ORDER not defined
> -#endif
> +/* Generally speaking, PCI systems auto-byteswap on PCI accesses, so this is
> +   probably wrong */
> +#define cpu_to_pci32(val) htole32(val)
> 

If this was wrong, then nothing would work.  So I think you should remove the
comment.

>  #define RING_DOORBELL(doorbell, QPID) { \
>  	*doorbell = cpu_to_pci32(QPID); \

See RING_DOORBELL() is used in the .c files

> diff --git a/libcxgb4/src/t4.h b/libcxgb4/src/t4.h
> index e8c5cf66cb14..e519cc4087e6 100644
> --- a/libcxgb4/src/t4.h
> +++ b/libcxgb4/src/t4.h
> @@ -62,13 +62,10 @@
>  #define unlikely
>  #define ROUND_UP(x, n) (((x) + (n) - 1u) & ~((n) - 1u))
>  #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
> -#if __BYTE_ORDER == __LITTLE_ENDIAN
> -#  define cpu_to_pci32(val) ((val))
> -#elif __BYTE_ORDER == __BIG_ENDIAN
> -#  define cpu_to_pci32(val) (__bswap_32((val)))
> -#else
> -#  error __BYTE_ORDER not defined
> -#endif
> +
> +/* Generally speaking, PCI systems auto-byteswap on PCI accesses, so this is
> +   probably wrong */
> +#define cpu_to_pci32(val) htole32(val)
> 

Ditto.

>  #define writel(v, a) do { *((volatile u32 *)(a)) = cpu_to_pci32(v); } while
(0)
>

Ditto.


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
  2016-09-29 21:26       ` Steve Wise
@ 2016-09-29 22:28         ` Jason Gunthorpe
       [not found]           ` <20160929222802.GC27229-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 22:28 UTC (permalink / raw)
  To: Steve Wise
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, 'Tatyana Nikolova',
	'Hal Rosenstock', 'Doug Ledford',
	'Yishai Hadas', 'Devesh Sharma',
	'Sean Hefty', 'Bart Van Assche'

On Thu, Sep 29, 2016 at 04:26:52PM -0500, Steve Wise wrote:

> > +/* Generally speaking, PCI systems auto-byteswap on PCI accesses, so this is
> > +   probably wrong */
> > +#define cpu_to_pci32(val) htole32(val)
> 
> If this was wrong, then nothing would work.  So I think you should
> remove the comment.

I added the comment because cxgb* was the only provider that seemed to
be obviously byte swapping MMIO.

Since htole32 is a NOP on x86 and ARM64 the driver would work fine
with or without it. Do you know this driver works on big endian
powerpc? That would help answer the question for sure.

I looked at this some more, and I still don't really know what is the
right answer.

In the kernel the swapping behavior of 'writel' is architecture (and
sometimes even platform) specific. Looking at the kernel headers
suggests that BE PPC needs an explicit swap and BE ARM does not (eg
the hardware swaps). Maybe. There are a lot of layers of macros in
this area..

However, I can't find an obvious swap in mlx4, which I think is the
most widely tested provider. Does it work on BE PPC?

One of the things I'd like to see done is to consolidate the mmio
accessors.. The note was a reminder to try and figure out what is
actually right here.. Appreciate any help!

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND
       [not found]         ` <aef5ce41-14bf-9869-88c8-ab5796634a8c-HInyCGIudOg@public.gmane.org>
@ 2016-09-29 22:34           ` Jason Gunthorpe
       [not found]             ` <20160929223415.GD27229-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-29 22:34 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Sean Hefty, Hal Rosenstock,
	Doug Ledford, Yishai Hadas, Vladimir Sokolovsky

On Thu, Sep 29, 2016 at 02:01:26PM -0700, Bart Van Assche wrote:

> Independent of this patch: Valgrind has a stable ABI so I propose to add a
> copy of the memcheck.h header file to the rdma-core source tree. Many other
> open source projects already do this.

Interesting idea, what do you see as the benefit?

FWIW, I haven't had any problems getting the valgrind headers on any
supported distro.

I think I'd rather make the absence of valgrind a hard error (right
now cmake makes a warning in the summary) than worry about another
copied header...

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]           ` <20160929222802.GC27229-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-29 23:46             ` Steve Wise
       [not found]               ` <F2C34CC4-5C7D-4382-873D-9E14B81A44B3-/Yg/VP3ZvrM@public.gmane.org>
  2016-10-05 15:37             ` Christoph Hellwig
  1 sibling, 1 reply; 33+ messages in thread
From: Steve Wise @ 2016-09-29 23:46 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Tatyana Nikolova,
	Hal Rosenstock, Doug Ledford, Yishai Hadas, Devesh Sharma,
	Sean Hefty, Bart Van Assche



> On Sep 29, 2016, at 5:28 PM, Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
> 
> On Thu, Sep 29, 2016 at 04:26:52PM -0500, Steve Wise wrote:
> 
>>> +/* Generally speaking, PCI systems auto-byteswap on PCI accesses, so this is
>>> +   probably wrong */
>>> +#define cpu_to_pci32(val) htole32(val)
>> 
>> If this was wrong, then nothing would work.  So I think you should
>> remove the comment.
> 
> I added the comment because cxgb* was the only provider that seemed to
> be obviously byte swapping MMIO.
> 
> Since htole32 is a NOP on x86 and ARM64 the driver would work fine
> with or without it. Do you know this driver works on big endian
> powerpc? That would help answer the question for sure.
> 

Yes, PowerPC and arm. 

> I looked at this some more, and I still don't really know what is the
> right answer.
> 
> In the kernel the swapping behavior of 'writel' is architecture (and
> sometimes even platform) specific. Looking at the kernel headers
> suggests that BE PPC needs an explicit swap and BE ARM does not (eg
> the hardware swaps). Maybe. There are a lot of layers of macros in
> this area..
> 
> However, I can't find an obvious swap in mlx4, which I think is the
> most widely tested provider. Does it work on BE PPC?
> 
> One of the things I'd like to see done is to consolidate the mmio
> accessors.. The note was a reminder to try and figure out what is
> actually right here.. Appreciate any help!
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND
       [not found]             ` <20160929223415.GD27229-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-29 23:48               ` Bart Van Assche
       [not found]                 ` <610a3086-07bd-baa7-11e2-88642c0e2297-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Bart Van Assche @ 2016-09-29 23:48 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Sean Hefty, Hal Rosenstock,
	Doug Ledford, Yishai Hadas, Vladimir Sokolovsky

On 09/29/2016 03:34 PM, Jason Gunthorpe wrote:
> On Thu, Sep 29, 2016 at 02:01:26PM -0700, Bart Van Assche wrote:
>> Independent of this patch: Valgrind has a stable ABI so I propose to add a
>> copy of the memcheck.h header file to the rdma-core source tree. Many other
>> open source projects already do this.
>
> Interesting idea, what do you see as the benefit?

Hello Jason,

That would allow to annotate rdma-core code correctly for Valgrind 
without introducing a dependency on the valgrind-devel package. As you 
know most Linux distro's by default do not install the valgrind-devel 
package.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]               ` <F2C34CC4-5C7D-4382-873D-9E14B81A44B3-/Yg/VP3ZvrM@public.gmane.org>
@ 2016-09-30  0:08                 ` Jason Gunthorpe
       [not found]                   ` <20160930000800.GA7570-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-30  0:08 UTC (permalink / raw)
  To: Steve Wise
  Cc: Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Tatyana Nikolova,
	Hal Rosenstock, Doug Ledford, Yishai Hadas, Devesh Sharma,
	Sean Hefty, Bart Van Assche

On Thu, Sep 29, 2016 at 06:46:02PM -0500, Steve Wise wrote:
> > I added the comment because cxgb* was the only provider that seemed to
> > be obviously byte swapping MMIO.
> > 
> > Since htole32 is a NOP on x86 and ARM64 the driver would work fine
> > with or without it. Do you know this driver works on big endian
> > powerpc? That would help answer the question for sure.
> 
> Yes, PowerPC and arm. 

Okay great. Maybe Yishai can explain what mlx drivers are doing..

Is this better:

/* NOTE: The endianess of PCI MMIO accesses is architecture specific,
   this is known correct for BE PPC and LE x86/ARM */

Thanks again Steve,
Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND
       [not found]                 ` <610a3086-07bd-baa7-11e2-88642c0e2297-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
@ 2016-09-30  0:15                   ` Jason Gunthorpe
  0 siblings, 0 replies; 33+ messages in thread
From: Jason Gunthorpe @ 2016-09-30  0:15 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Sean Hefty, Hal Rosenstock,
	Doug Ledford, Yishai Hadas, Vladimir Sokolovsky

On Thu, Sep 29, 2016 at 04:48:25PM -0700, Bart Van Assche wrote:

> That would allow to annotate rdma-core code correctly for Valgrind without
> introducing a dependency on the valgrind-devel package.

Sure, but we are recommending distros build their official packages
with valgrind, the sample packaging I built includes valgrind as a
dependency, the README.md instructs to install valgrind, and cmake
warns if valgrind is not present.

I would never encourage a distro to build official packages using a
built-in valgrind header, that is a great way to accidently break a
new or obscure architecture.

> As you know most Linux distro's by default do not install the
> valgrind-devel package.

Are you worried about users? Like I said, we could make valgrind hard
required. It is not hard to install valgrind, and everyone already
needs to install other non-default things like libnl3-devel and cmake.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 4/9] Do not use IBV_CMD_(REG_MR|RESIZE_CQ)_HAS_RESP_PARAMS
       [not found]     ` <1475182076-5411-5-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-30 13:07       ` Dalessandro, Dennis
  0 siblings, 0 replies; 33+ messages in thread
From: Dalessandro, Dennis @ 2016-09-30 13:07 UTC (permalink / raw)
  To: jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Nikolova, Tatyana E, monis-VPRAkNaXOzVWk0Htik3J/w,
	yishaih-VPRAkNaXOzVWk0Htik3J/w, Marciniszyn, Mike,
	vlad-VPRAkNaXOzVWk0Htik3J/w, intel-opa-y27Ovi1pjclAfugRpC6u6w

On Thu, 2016-09-29 at 14:47 -0600, Jason Gunthorpe wrote:
> These were used to support building provider plugins against old
> versions of libibverbs. Since libibverbs is now included together
> with the provider that is no longer possible or supported.
> 
> The define is kept as it is in a public header.
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> ---
>  libhfi1verbs/src/verbs.c    | 15 +++------------
>  libi40iw/src/i40iw_uverbs.c | 26 --------------------------
>  libipathverbs/src/verbs.c   | 16 +++-------------
>  libmlx5/src/verbs.c         | 18 ++++--------------
>  libmthca/src/verbs.c        | 26 ++++++--------------------
>  libnes/src/nes_uverbs.c     | 35 -----------------------------------
>  librxe/src/rxe.c            | 16 +++-------------
>  7 files changed, 19 insertions(+), 133 deletions(-)

For libhfi1verbs and libipathverbs:

Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* RE: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]                   ` <20160930000800.GA7570-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-09-30 13:32                     ` Steve Wise
  2016-10-05 15:16                     ` Yishai Hadas
  1 sibling, 0 replies; 33+ messages in thread
From: Steve Wise @ 2016-09-30 13:32 UTC (permalink / raw)
  To: 'Jason Gunthorpe', 'Steve Wise'
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, 'Tatyana Nikolova',
	'Hal Rosenstock', 'Doug Ledford',
	'Yishai Hadas', 'Devesh Sharma',
	'Sean Hefty', 'Bart Van Assche'

> On Thu, Sep 29, 2016 at 06:46:02PM -0500, Steve Wise wrote:
> > > I added the comment because cxgb* was the only provider that seemed
> to
> > > be obviously byte swapping MMIO.
> > >
> > > Since htole32 is a NOP on x86 and ARM64 the driver would work fine
> > > with or without it. Do you know this driver works on big endian
> > > powerpc? That would help answer the question for sure.
> >
> > Yes, PowerPC and arm.
> 
> Okay great. Maybe Yishai can explain what mlx drivers are doing..
> 
> Is this better:
> 
> /* NOTE: The endianess of PCI MMIO accesses is architecture specific,
>    this is known correct for BE PPC and LE x86/ARM */
>

Sure.
 


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND
       [not found]     ` <1475182076-5411-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 21:01       ` Bart Van Assche
@ 2016-09-30 16:49       ` Bart Van Assche
  2016-09-30 17:02       ` Hal Rosenstock
  2 siblings, 0 replies; 33+ messages in thread
From: Bart Van Assche @ 2016-09-30 16:49 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Sean Hefty, Hal Rosenstock, Doug Ledford, Yishai Hadas,
	Vladimir Sokolovsky

On 09/29/2016 01:47 PM, Jason Gunthorpe wrote:
> The cmake build system guarantees that valgrind/memcheck.h is present.
> If the system does not have it, or valgrind is disabled, then it is
> replaced with a dummy header full of empty stubs.
>
> Thus all the copy&paste boiler plate is consolidated into buildlib.
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  buildlib/config.h.in               |  4 ----
>  libibcm/src/cm.c                   | 11 +----------
>  libibumad/src/umad.c               | 14 +-------------
>  libibverbs/src/ibverbs.h           | 14 +-------------
>  libmlx4/src/mlx4.h                 | 18 +-----------------
>  libmlx5/src/mlx5.h                 | 18 +-----------------
>  libmthca/src/mthca.h               | 18 +-----------------
>  librdmacm/src/cma.h                | 11 +----------
>  srp_daemon/srp_daemon/srp_daemon.h |  5 -----
>  9 files changed, 7 insertions(+), 106 deletions(-)

For the srp_daemon changes:

Reviewed-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]     ` <1475182076-5411-9-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 21:26       ` Steve Wise
@ 2016-09-30 16:51       ` Bart Van Assche
  2016-09-30 17:02       ` Hal Rosenstock
  2 siblings, 0 replies; 33+ messages in thread
From: Bart Van Assche @ 2016-09-30 16:51 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Steve Wise, Tatyana Nikolova, Hal Rosenstock, Doug Ledford,
	Yishai Hadas, Devesh Sharma, Sean Hefty

On 09/29/2016 01:47 PM, Jason Gunthorpe wrote:
> For a long time now endian.h has defined sane fixed with conversion
> macros, so lets just use them instead of rolling our own.
>
> Also, htonll is defined in this source tree under infiniband/arch.h,
> so all users of that macro can just use the header.
>
> Someday we should also get rid of all the endless wrappers..
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  ibacm/linux/osd.h                    |  8 +-------
>  libcxgb3/src/cxio_wr.h               | 10 +++-------
>  libcxgb4/src/t4.h                    | 11 ++++-------
>  libi40iw/src/i40iw_umain.h           | 18 ++----------------
>  libibumad/src/sysfs.c                |  8 +-------
>  libibverbs/include/infiniband/arch.h | 15 ++++++---------
>  libnes/src/nes_umain.h               | 17 ++---------------
>  libocrdma/src/ocrdma_verbs.c         | 32 ++++----------------------------
>  librdmacm/examples/common.h          | 11 +++--------
>  librdmacm/src/cma.h                  |  9 +--------
>  srp_daemon/srp_daemon/srp_daemon.h   | 17 +----------------
>  11 files changed, 28 insertions(+), 128 deletions(-)

For the srp_daemon changes:

Reviewed-by: Bart Van Assche <bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 1/9] Remove HAVE_CONFIG_H
       [not found]     ` <1475182076-5411-2-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 21:22       ` Steve Wise
@ 2016-09-30 17:02       ` Hal Rosenstock
  1 sibling, 0 replies; 33+ messages in thread
From: Hal Rosenstock @ 2016-09-30 17:02 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Steve Wise, Mike Marciniszyn, Dennis Dalessandro,
	Tatyana Nikolova, Sean Hefty, Doug Ledford, Yishai Hadas,
	Vladimir Sokolovsky, Devesh Sharma, Moni Shoua,
	open list:HF1 USERSPACE PROVIDER (for hf1.ko)

On 9/29/2016 4:47 PM, Jason Gunthorpe wrote:
>  libibumad/src/sysfs.c               | 4 +---
>  libibumad/src/umad.c                | 4 +---
>  libibumad/tests/umad_reg2_compat.c  | 4 +---
>  libibumad/tests/umad_register2.c    | 4 +---

For libibumad bits,

Acked-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND
       [not found]     ` <1475182076-5411-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 21:01       ` Bart Van Assche
  2016-09-30 16:49       ` Bart Van Assche
@ 2016-09-30 17:02       ` Hal Rosenstock
  2 siblings, 0 replies; 33+ messages in thread
From: Hal Rosenstock @ 2016-09-30 17:02 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Sean Hefty, Doug Ledford, Yishai Hadas, Vladimir Sokolovsky,
	Bart Van Assche

On 9/29/2016 4:47 PM, Jason Gunthorpe wrote:
>  libibumad/src/umad.c               | 14 +-------------

For libibumad bit,

Acked-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]     ` <1475182076-5411-9-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 21:26       ` Steve Wise
  2016-09-30 16:51       ` Bart Van Assche
@ 2016-09-30 17:02       ` Hal Rosenstock
  2 siblings, 0 replies; 33+ messages in thread
From: Hal Rosenstock @ 2016-09-30 17:02 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Steve Wise, Tatyana Nikolova, Doug Ledford, Yishai Hadas,
	Devesh Sharma, Sean Hefty, Bart Van Assche

On 9/29/2016 4:47 PM, Jason Gunthorpe wrote:
>  libibumad/src/sysfs.c                |  8 +-------

For libibumad bit,

Acked-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH rdma-core 0/9] Dead Code Removal
       [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (8 preceding siblings ...)
  2016-09-29 20:47   ` [PATCH 9/9] nes: Remove code guarded by HAVE_DECL_IBV_QPT_RAW_ETH Jason Gunthorpe
@ 2016-10-02 12:58   ` Doug Ledford
  9 siblings, 0 replies; 33+ messages in thread
From: Doug Ledford @ 2016-10-02 12:58 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA


[-- Attachment #1.1: Type: text/plain, Size: 1121 bytes --]

On 9/29/2016 4:47 PM, Jason Gunthorpe wrote:
> This removes various #ifdef type stuff that no longer makes any sense.
> cmake is arranged in a way that avoids alot of the ifdefs around header files.
> 
> The BYTE_ORDER patch is more substantial and consolidates everything around
> glibc's endian.h
> 
> See
> 
> https://github.com/linux-rdma/rdma-core/pull/10
> 
> Jason Gunthorpe (9):
>   Remove HAVE_CONFIG_H
>   Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND
>   Remove HAVE_IBV_*
>   Do not use IBV_CMD_(REG_MR|RESIZE_CQ)_HAS_RESP_PARAMS
>   Remove HAVE_SYMVER_SUPPORT
>   Remove old compat definitions of wmb/rmb/etc
>   Remove old MADV_DONTFORK/DOFORK compat
>   Remove most checks of __BYTE_ORDER
>   nes: Remove code guarded by HAVE_DECL_IBV_QPT_RAW_ETH

Thanks, series applied.  Jason, you hadn't pushed your updated comments
regarding the t4.h file and PCI byte swapping, so that will need to be
updated when you get comments back about what the mlx drivers do in
regard to this.


-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG Key ID: 0E572FDD


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]                   ` <20160930000800.GA7570-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-30 13:32                     ` Steve Wise
@ 2016-10-05 15:16                     ` Yishai Hadas
       [not found]                       ` <fd7d47c8-6a06-6169-b840-abfbc239ad75-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  1 sibling, 1 reply; 33+ messages in thread
From: Yishai Hadas @ 2016-10-05 15:16 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Steve Wise, Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	Tatyana Nikolova, Hal Rosenstock, Doug Ledford, Devesh Sharma,
	Sean Hefty, Bart Van Assche, yishaih-VPRAkNaXOzVWk0Htik3J/w

On 9/30/2016 3:08 AM, Jason Gunthorpe wrote:
> On Thu, Sep 29, 2016 at 06:46:02PM -0500, Steve Wise wrote:
>>> I added the comment because cxgb* was the only provider that seemed to
>>> be obviously byte swapping MMIO.
>>>
>>> Since htole32 is a NOP on x86 and ARM64 the driver would work fine
>>> with or without it. Do you know this driver works on big endian
>>> powerpc? That would help answer the question for sure.
>>
>> Yes, PowerPC and arm.
>
> Okay great. Maybe Yishai can explain what mlx drivers are doing..

MLX drivers use BE format for QPN as part of writing a door bell in both 
X86 and PPC BE as their NICs expect to get, code is certified to work 
fine on both.

Specifically,
Upon QP creation the code uses htonl for setting qp->doorbell_qpn (see 
mlx4_create_qp_ex), later on this value is used without any change upon 
writing a door bell. (see mmio_writel). No PCI swap is expected.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]           ` <20160929222802.GC27229-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2016-09-29 23:46             ` Steve Wise
@ 2016-10-05 15:37             ` Christoph Hellwig
       [not found]               ` <20161005153701.GA12295-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
  1 sibling, 1 reply; 33+ messages in thread
From: Christoph Hellwig @ 2016-10-05 15:37 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	'Tatyana Nikolova', 'Hal Rosenstock',
	'Doug Ledford', 'Yishai Hadas',
	'Devesh Sharma', 'Sean Hefty',
	'Bart Van Assche'

On Thu, Sep 29, 2016 at 04:28:02PM -0600, Jason Gunthorpe wrote:
> In the kernel the swapping behavior of 'writel' is architecture (and
> sometimes even platform) specific. Looking at the kernel headers
> suggests that BE PPC needs an explicit swap and BE ARM does not (eg
> the hardware swaps). Maybe. There are a lot of layers of macros in
> this area..

read{s,l,q} and write{s,l,q} in the kernel always perform an implicit
bytestap, that is the device is expected to use a LE layout.  This
is not architecture specific, otherwise hell would break lose.

If the device has a BE layout you'll need to use ioread*be/iowrite*be
instead.

But none of this has an affect on userspace mappings of registers, as
those don't go through the kernel read{s,l,q} and write{s,l,q} helpers,
so if you mmap the resource directly your need to manually byte swap
to whatever the hardware expects - which seems to be LE for Chelsio
and BE for Mellanox.

Btw, one thing that would be useful is to introduce endiane annoatations
for sparse in rdma-core.   I've added these to a few userspace projects
already, here is the most recent example:

https://github.com/linux-nvme/nvme-cli/commit/126b8beb35b76fe9f61b137e34aea66b64c07b25


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]               ` <20161005153701.GA12295-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
@ 2016-10-05 17:33                 ` Jason Gunthorpe
       [not found]                   ` <20161005173359.GF18636-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Jason Gunthorpe @ 2016-10-05 17:33 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	'Tatyana Nikolova', 'Hal Rosenstock',
	'Doug Ledford', 'Yishai Hadas',
	'Devesh Sharma', 'Sean Hefty',
	'Bart Van Assche'

On Wed, Oct 05, 2016 at 08:37:01AM -0700, Christoph Hellwig wrote:
> On Thu, Sep 29, 2016 at 04:28:02PM -0600, Jason Gunthorpe wrote:
> > In the kernel the swapping behavior of 'writel' is architecture (and
> > sometimes even platform) specific. Looking at the kernel headers
> > suggests that BE PPC needs an explicit swap and BE ARM does not (eg
> > the hardware swaps). Maybe. There are a lot of layers of macros in
> > this area..
> 
> read{s,l,q} and write{s,l,q} in the kernel always perform an implicit
> bytestap, that is the device is expected to use a LE layout.  This
> is not architecture specific, otherwise hell would break lose.

Right, stated differently, the kernel requires that writel()/etc
always produce the same PCI-E packet on the wire. (eg writel(1)
produces a TLP with bit 0 of the data payload set)

But each arch implements its own set of instructions to get there,
that is what I mean by architecture specific.

> But none of this has an affect on userspace mappings of registers, as
> those don't go through the kernel read{s,l,q} and write{s,l,q}
> helpers,

Not going through the kernel's writel is the whole problem. The writel
helper generates the arch-specific instruction sequence required to
issue generate the required PCI-E packet.

Today (at best, some drivers do not even do this) our userspace
assumes all archs implement writel as:

   *(u32 *)reg = cpu_to_le32(val);

Which is a good start, but not portable to every arch the kernel
supports.

> Btw, one thing that would be useful is to introduce endiane annoatations
> for sparse in rdma-core.   I've added these to a few userspace projects
> already, here is the most recent example:
> 
> https://github.com/linux-nvme/nvme-cli/commit/126b8beb35b76fe9f61b137e34aea66b64c07b25

Yeah, it would be nice to get that working too. I guess we need to
standardize on the cpu_to_xx macro style as a first step?

The __iomem annotation would be nice as well.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]                       ` <fd7d47c8-6a06-6169-b840-abfbc239ad75-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2016-10-05 17:44                         ` Jason Gunthorpe
       [not found]                           ` <20161005174449.GG18636-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Jason Gunthorpe @ 2016-10-05 17:44 UTC (permalink / raw)
  To: Yishai Hadas
  Cc: Steve Wise, Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	Tatyana Nikolova, Hal Rosenstock, Doug Ledford, Devesh Sharma,
	Sean Hefty, Bart Van Assche, yishaih-VPRAkNaXOzVWk0Htik3J/w

On Wed, Oct 05, 2016 at 06:16:45PM +0300, Yishai Hadas wrote:

> Upon QP creation the code uses htonl for setting qp->doorbell_qpn (see
> mlx4_create_qp_ex), later on this value is used without any change upon
> writing a door bell. (see mmio_writel). No PCI swap is expected.

Thanks, so the mlx drivers are doing what the kernel calls writel_be()?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]                   ` <20161005173359.GF18636-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-10-06 11:40                     ` Christoph Hellwig
  0 siblings, 0 replies; 33+ messages in thread
From: Christoph Hellwig @ 2016-10-06 11:40 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Christoph Hellwig, Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	'Tatyana Nikolova', 'Hal Rosenstock',
	'Doug Ledford', 'Yishai Hadas',
	'Devesh Sharma', 'Sean Hefty',
	'Bart Van Assche'

On Wed, Oct 05, 2016 at 11:33:59AM -0600, Jason Gunthorpe wrote:
> Right, stated differently, the kernel requires that writel()/etc
> always produce the same PCI-E packet on the wire. (eg writel(1)
> produces a TLP with bit 0 of the data payload set)

Exactly.

> Not going through the kernel's writel is the whole problem. The writel
> helper generates the arch-specific instruction sequence required to
> issue generate the required PCI-E packet.

All the architectures (including your quoted above ARM example) seem
to do the byte swap in software.  That seems to be important for
accesses like memcpy_{to,from}_io, which would be painful to handle.

But yes, in theory an architecture could do it any way it wants.

> Today (at best, some drivers do not even do this) our userspace
> assumes all archs implement writel as:
> 
>    *(u32 *)reg = cpu_to_le32(val);
> 
> Which is a good start, but not portable to every arch the kernel
> supports.

It should do the right thing for every architecture that matters.
Thay beeing said having an iomem abstraction certainly makes sense
for various reasons, and handling any oddball architecture (or rather
PCI hostbridge implemtation, I would not expect something this
broken to be universal) would come as a bonus.

> Yeah, it would be nice to get that working too. I guess we need to
> standardize on the cpu_to_xx macro style as a first step?

Any style will work as long as it separate the swap directions,
but for a low-level Linux projects using the kernel style certainly
makes sene.

> The __iomem annotation would be nice as well.

I can look into that as well.  Usuaully the first step before adding
sparse annotations is fixing all the misc sparse warnings, as typical
userspace projects have a not too stellar code quality.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 8/9] Remove most checks of __BYTE_ORDER
       [not found]                           ` <20161005174449.GG18636-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2016-10-06 12:09                             ` Yishai Hadas
  0 siblings, 0 replies; 33+ messages in thread
From: Yishai Hadas @ 2016-10-06 12:09 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Steve Wise, Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	Tatyana Nikolova, Hal Rosenstock, Doug Ledford, Devesh Sharma,
	Sean Hefty, Bart Van Assche, yishaih-VPRAkNaXOzVWk0Htik3J/w

On 10/5/2016 8:44 PM, Jason Gunthorpe wrote:
> On Wed, Oct 05, 2016 at 06:16:45PM +0300, Yishai Hadas wrote:
>
>> Upon QP creation the code uses htonl for setting qp->doorbell_qpn (see
>> mlx4_create_qp_ex), later on this value is used without any change upon
>> writing a door bell. (see mmio_writel). No PCI swap is expected.
>
> Thanks, so the mlx drivers are doing what the kernel calls writel_be()?

It's logically the same. You can look also in mlx4 driver code in the 
kernel [1], writel() is used on qp->doorbell_qpn which was previously 
set to be BE as the hardware expects.

[1] 
http://lxr.free-electrons.com/source/drivers/infiniband/hw/mlx4/qp.c#L3223


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2016-10-06 12:09 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29 20:47 [PATCH rdma-core 0/9] Dead Code Removal Jason Gunthorpe
     [not found] ` <1475182076-5411-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 20:47   ` [PATCH 1/9] Remove HAVE_CONFIG_H Jason Gunthorpe
     [not found]     ` <1475182076-5411-2-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 21:22       ` Steve Wise
2016-09-30 17:02       ` Hal Rosenstock
2016-09-29 20:47   ` [PATCH 2/9] Remove HAVE_VALGRIND_MEMCHECK_H/INCLUDE_VALGRIND Jason Gunthorpe
     [not found]     ` <1475182076-5411-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 21:01       ` Bart Van Assche
     [not found]         ` <aef5ce41-14bf-9869-88c8-ab5796634a8c-HInyCGIudOg@public.gmane.org>
2016-09-29 22:34           ` Jason Gunthorpe
     [not found]             ` <20160929223415.GD27229-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 23:48               ` Bart Van Assche
     [not found]                 ` <610a3086-07bd-baa7-11e2-88642c0e2297-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org>
2016-09-30  0:15                   ` Jason Gunthorpe
2016-09-30 16:49       ` Bart Van Assche
2016-09-30 17:02       ` Hal Rosenstock
2016-09-29 20:47   ` [PATCH 3/9] Remove HAVE_IBV_* Jason Gunthorpe
2016-09-29 20:47   ` [PATCH 4/9] Do not use IBV_CMD_(REG_MR|RESIZE_CQ)_HAS_RESP_PARAMS Jason Gunthorpe
     [not found]     ` <1475182076-5411-5-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-30 13:07       ` Dalessandro, Dennis
2016-09-29 20:47   ` [PATCH 5/9] Remove HAVE_SYMVER_SUPPORT Jason Gunthorpe
2016-09-29 20:47   ` [PATCH 6/9] Remove old compat definitions of wmb/rmb/etc Jason Gunthorpe
2016-09-29 20:47   ` [PATCH 7/9] Remove old MADV_DONTFORK/DOFORK compat Jason Gunthorpe
2016-09-29 20:47   ` [PATCH 8/9] Remove most checks of __BYTE_ORDER Jason Gunthorpe
     [not found]     ` <1475182076-5411-9-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 21:26       ` Steve Wise
2016-09-29 22:28         ` Jason Gunthorpe
     [not found]           ` <20160929222802.GC27229-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-29 23:46             ` Steve Wise
     [not found]               ` <F2C34CC4-5C7D-4382-873D-9E14B81A44B3-/Yg/VP3ZvrM@public.gmane.org>
2016-09-30  0:08                 ` Jason Gunthorpe
     [not found]                   ` <20160930000800.GA7570-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-09-30 13:32                     ` Steve Wise
2016-10-05 15:16                     ` Yishai Hadas
     [not found]                       ` <fd7d47c8-6a06-6169-b840-abfbc239ad75-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-10-05 17:44                         ` Jason Gunthorpe
     [not found]                           ` <20161005174449.GG18636-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-06 12:09                             ` Yishai Hadas
2016-10-05 15:37             ` Christoph Hellwig
     [not found]               ` <20161005153701.GA12295-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-10-05 17:33                 ` Jason Gunthorpe
     [not found]                   ` <20161005173359.GF18636-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-06 11:40                     ` Christoph Hellwig
2016-09-30 16:51       ` Bart Van Assche
2016-09-30 17:02       ` Hal Rosenstock
2016-09-29 20:47   ` [PATCH 9/9] nes: Remove code guarded by HAVE_DECL_IBV_QPT_RAW_ETH Jason Gunthorpe
2016-10-02 12:58   ` [PATCH rdma-core 0/9] Dead Code Removal Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.