All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core 00/10] Provide a compat infiniband/arch.h
@ 2017-02-09 21:53 Jason Gunthorpe
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Prior commits made arch.h into a private header, but there are several places
out there that include it to get htonll. Provide a dummy compat header that
will let such places continue to compile, but with warnings.

To do this we need to move the internal tree to use util/udma_barrier.h for
the barrier macros to free up the header file name and in the process replace
more of the crazy mix of byteswapping macros with endian.h equivalents.

To make sure that everything remains working travis also learns to
compile-test all the header files.

Jason Gunthorpe (10):
  Have check-build confirm that every public header is standalone
  Remove uses of htonll
  Remove uses of ntohll
  Do not use kernel byteswap macros
  Remove extraneous byteswap.h include
  mlx4: Remove include of asm/unistd.h
  rdmacm: Remove dangling cpu_to_be64 definitions
  umad: Replace htonll macros with proper inlines and mark deprecated
  Move the now private infiniband/arch.h to util/udma_barrier.h
  verbs: Add a compatibility arch.h

 CMakeLists.txt                    |   2 +-
 buildlib/check-build              |  55 ++++++++++++++++-
 buildlib/travis-build             |   2 +-
 ibacm/include/acm_mad.h           |  84 ++++++++++++-------------
 ibacm/linux/osd.h                 |   1 -
 ibacm/prov/acmp/src/acmp.c        |  12 ++--
 ibacm/src/acm.c                   |   6 +-
 iwpmd/iwarp_pm_common.c           |   5 +-
 libibcm/cm.h                      |   6 +-
 libibcm/examples/cmpost.c         |   7 +--
 libibumad/sysfs.c                 |   1 -
 libibumad/umad.h                  |  16 +++--
 libibverbs/CMakeLists.txt         |   2 +-
 libibverbs/arch.h                 | 101 +++---------------------------
 libibverbs/examples/asyncwatch.c  |   1 -
 libibverbs/examples/device_list.c |   1 -
 libibverbs/examples/devinfo.c     |   1 -
 librdmacm/cma.c                   |   1 -
 librdmacm/cma.h                   |   1 -
 librdmacm/examples/cmatose.c      |   1 -
 librdmacm/examples/common.c       |   1 -
 librdmacm/examples/common.h       |   3 -
 librdmacm/examples/mckey.c        |   1 -
 librdmacm/examples/rping.c        |   1 -
 librdmacm/examples/udaddy.c       |   1 -
 librdmacm/ib.h                    |   1 +
 librdmacm/rdma_cma_abi.h          |   1 +
 librdmacm/rsocket.c               |   1 +
 providers/cxgb3/cxio_wr.h         |   2 +-
 providers/cxgb3/iwch.h            |   2 +-
 providers/cxgb3/qp.c              |  12 ++--
 providers/cxgb4/dev.c             |   4 +-
 providers/cxgb4/libcxgb4.h        |   2 +-
 providers/cxgb4/t4.h              |   4 +-
 providers/hfi1verbs/hfiverbs.h    |   1 -
 providers/hns/hns_roce_u.h        |   2 +-
 providers/i40iw/i40iw_osdep.h     |   2 +-
 providers/i40iw/i40iw_uk.c        |   2 +
 providers/i40iw/i40iw_umain.h     |   2 +-
 providers/ipathverbs/ipathverbs.h |   1 -
 providers/mlx4/mlx4.h             |   2 +-
 providers/mlx4/mmio.h             |   1 -
 providers/mlx4/qp.c               |  12 ++--
 providers/mlx4/srq.c              |   2 +-
 providers/mlx5/cq.c               |   2 +-
 providers/mlx5/mlx5.h             |   2 +-
 providers/mlx5/qp.c               |  28 ++++-----
 providers/mlx5/srq.c              |   4 +-
 providers/mthca/mthca.h           |   2 +-
 providers/mthca/qp.c              |  34 +++++------
 providers/mthca/srq.c             |   4 +-
 providers/nes/nes_umain.h         |   2 +-
 providers/ocrdma/ocrdma_main.h    |   2 +-
 providers/qedr/qelr.h             |   2 +-
 providers/qedr/qelr_main.h        |   2 +-
 providers/qedr/qelr_verbs.c       |   2 +-
 providers/qedr/qelr_verbs.h       |   2 +-
 providers/rxe/rxe.c               |   1 -
 providers/vmw_pvrdma/cq.c         |   2 +-
 providers/vmw_pvrdma/qp.c         |   2 +-
 srp_daemon/srp_daemon.c           |  43 +++++++------
 srp_daemon/srp_daemon.h           |   1 -
 srp_daemon/srp_handle_traps.c     |   5 +-
 util/CMakeLists.txt               |   1 +
 util/udma_barrier.h               | 125 ++++++++++++++++++++++++++++++++++++++
 65 files changed, 356 insertions(+), 281 deletions(-)
 create mode 100644 util/udma_barrier.h

-- 
2.7.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] 24+ messages in thread

* [PATCH rdma-core 01/10] Have check-build confirm that every public header is standalone
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-02-09 21:53   ` Jason Gunthorpe
       [not found]     ` <1486677212-3188-2-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-02-09 21:53   ` [PATCH rdma-core 02/10] Remove uses of htonll Jason Gunthorpe
                     ` (9 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Public library headers should be includable without requiring other
headers to be included first. We confirm this by compiling each header
in a stand alone compilation unit.

Add a few minor missing headers to make the check pass.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 buildlib/check-build     | 55 +++++++++++++++++++++++++++++++++++++++++++++++-
 librdmacm/ib.h           |  1 +
 librdmacm/rdma_cma_abi.h |  1 +
 3 files changed, 56 insertions(+), 1 deletion(-)

diff --git a/buildlib/check-build b/buildlib/check-build
index 45e7cb41c83f39..ddb3383e6a5514 100755
--- a/buildlib/check-build
+++ b/buildlib/check-build
@@ -5,7 +5,9 @@ import argparse
 import inspect
 import os
 import re
+import shutil
 import subprocess
+import tempfile
 from contextlib import contextmanager;
 
 def get_src_dir():
@@ -34,6 +36,15 @@ def inDirectory(dir):
     finally:
         os.chdir(cdir);
 
+@contextmanager
+def private_tmp():
+    """Simple version of Python 3's tempfile.TemporaryDirectory"""
+    dfn = tempfile.mkdtemp();
+    try:
+        yield dfn;
+    finally:
+        shutil.rmtree(dfn);
+
 # -------------------------------------------------------------------------
 
 def get_symbol_vers(fn):
@@ -80,7 +91,6 @@ def check_lib_symver(args,fn):
         raise ValueError("Too many private symbol versions in ELF %r (%r)"%(fn,private));
     if private:
         private_rel = list(private)[0].split('_')[-1];
-        print repr(private_rel)
         if private_rel > args.PACKAGE_VERSION:
             raise ValueError("Private Symbol Version %r is newer than the package version %r"%(
                 private,args.PACKAGE_VERSION));
@@ -106,6 +116,49 @@ def test_lib_names(args):
 
 # -------------------------------------------------------------------------
 
+def is_obsolete(fn):
+    """True if the header is obsolete and should not be compiled anyhow."""
+    with open(fn) as F:
+        for ln in F.readlines():
+            if re.search(r"#warning.*This header is obsolete",ln):
+                return True;
+    return False;
+
+def is_fixup(fn):
+    """True if this is a fixup header, fixup headers are exempted because they
+    required includes are not the same for kernel headers (eg netinet/in.h)"""
+    if os.path.islink(fn):
+        return "buildlib/fixup-include/" in os.readlink(fn);
+    return False;
+
+def test_public_headers(args):
+    """Test that every header file can be included on its own, and has no obvious
+    implicit dependencies. This is mainly intended to check the public
+    headers, but this sweeps in published internal headers too."""
+    incdir = os.path.abspath(os.path.join(args.BUILD,"include"));
+    includes = set();
+    for root,dirs,files in os.walk(incdir):
+        for I in files:
+            if I.endswith(".h"):
+                includes.add(os.path.join(root,I));
+
+    # Make a little ninja file to compile each header
+    with private_tmp() as tmpd:
+        with open(os.path.join(tmpd,"build.ninja"),"wt") as F:
+            print >> F,"rule comp";
+            print >> F," command = cc -c -I %s $in -o $out"%(incdir);
+            print >> F," description=Header check for $in";
+            count = 0;
+            for I in sorted(includes):
+                if is_obsolete(I) or is_fixup(I):
+                    continue;
+                print >> F,"build %s : comp %s"%("out%d.o"%(count),I);
+                print >> F,"default %s"%("out%d.o"%(count));
+                count = count + 1;
+        subprocess.check_call(["ninja"],cwd=tmpd);
+
+# -------------------------------------------------------------------------
+
 parser = argparse.ArgumentParser(description='Run build time tests')
 parser.add_argument("--build",default=os.getcwd(),dest="BUILD",
                     help="Build directory to inpsect");
diff --git a/librdmacm/ib.h b/librdmacm/ib.h
index 2e5029ac29b2dc..eb6cd871dbc7a7 100644
--- a/librdmacm/ib.h
+++ b/librdmacm/ib.h
@@ -34,6 +34,7 @@
 #define _RDMA_IB_H
 
 #include <linux/types.h>
+#include <arpa/inet.h>
 #include <string.h>
 
 #ifndef AF_IB
diff --git a/librdmacm/rdma_cma_abi.h b/librdmacm/rdma_cma_abi.h
index 71b93f888cc861..92fb63d9b6f0eb 100644
--- a/librdmacm/rdma_cma_abi.h
+++ b/librdmacm/rdma_cma_abi.h
@@ -36,6 +36,7 @@
 #include <infiniband/kern-abi.h>
 #include <rdma/ib_user_sa.h>
 #include <infiniband/sa.h>
+#include <netinet/in.h>
 
 /*
  * This file must be kept in sync with the kernel's version of rdma_user_cm.h
-- 
2.7.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] 24+ messages in thread

* [PATCH rdma-core 02/10] Remove uses of htonll
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-02-09 21:53   ` [PATCH rdma-core 01/10] Have check-build confirm that every public header is standalone Jason Gunthorpe
@ 2017-02-09 21:53   ` Jason Gunthorpe
       [not found]     ` <1486677212-3188-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-02-09 21:53   ` [PATCH rdma-core 03/10] Remove uses of ntohll Jason Gunthorpe
                     ` (8 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Done via

$ git ls-files | xargs sed -i -e 's/htonll/htobe64/g'

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 ibacm/include/acm_mad.h       | 84 +++++++++++++++++++++----------------------
 ibacm/prov/acmp/src/acmp.c    | 10 +++---
 ibacm/src/acm.c               |  6 ++--
 providers/cxgb3/cxio_wr.h     |  2 +-
 providers/cxgb3/qp.c          | 12 +++----
 providers/cxgb4/t4.h          |  2 +-
 providers/mlx4/qp.c           | 12 +++----
 providers/mlx4/srq.c          |  2 +-
 providers/mlx5/qp.c           | 24 ++++++-------
 providers/mlx5/srq.c          |  2 +-
 providers/mthca/qp.c          | 34 +++++++++---------
 providers/mthca/srq.c         |  4 +--
 providers/qedr/qelr_verbs.c   |  2 +-
 srp_daemon/srp_daemon.c       | 16 ++++-----
 srp_daemon/srp_handle_traps.c |  4 +--
 15 files changed, 108 insertions(+), 108 deletions(-)

diff --git a/ibacm/include/acm_mad.h b/ibacm/include/acm_mad.h
index 68e231bc6680ca..f237ef6fde563c 100644
--- a/ibacm/include/acm_mad.h
+++ b/ibacm/include/acm_mad.h
@@ -121,52 +121,52 @@ struct ib_sa_mad {
 
 #define IB_SA_ATTR_PATH_REC htons(0x0035)
 
-#define IB_COMP_MASK_PR_SERVICE_ID         (htonll(1 << 0) | \
-                                            htonll(1 << 1))
-#define IB_COMP_MASK_PR_DGID                htonll(1 << 2)
-#define IB_COMP_MASK_PR_SGID                htonll(1 << 3)
-#define IB_COMP_MASK_PR_DLID                htonll(1 << 4)
-#define IB_COMP_MASK_PR_SLID                htonll(1 << 5)
-#define IB_COMP_MASK_PR_RAW_TRAFFIC         htonll(1 << 6)
-/* RESERVED                                 htonll(1 << 7) */
-#define IB_COMP_MASK_PR_FLOW_LABEL          htonll(1 << 8)
-#define IB_COMP_MASK_PR_HOP_LIMIT           htonll(1 << 9)
-#define IB_COMP_MASK_PR_TCLASS              htonll(1 << 10)
-#define IB_COMP_MASK_PR_REVERSIBLE          htonll(1 << 11)
-#define IB_COMP_MASK_PR_NUM_PATH            htonll(1 << 12)
-#define IB_COMP_MASK_PR_PKEY                htonll(1 << 13)
-#define IB_COMP_MASK_PR_QOS_CLASS           htonll(1 << 14)
-#define IB_COMP_MASK_PR_SL                  htonll(1 << 15)
-#define IB_COMP_MASK_PR_MTU_SELECTOR        htonll(1 << 16)
-#define IB_COMP_MASK_PR_MTU                 htonll(1 << 17)
-#define IB_COMP_MASK_PR_RATE_SELECTOR       htonll(1 << 18)
-#define IB_COMP_MASK_PR_RATE                htonll(1 << 19)
-#define IB_COMP_MASK_PR_PACKET_LIFETIME_SELECTOR htonll(1 << 20)
-#define IB_COMP_MASK_PR_PACKET_LIFETIME     htonll(1 << 21)
-#define IB_COMP_MASK_PR_PREFERENCE          htonll(1 << 22)
-/* RESERVED                                 htonll(1 << 23) */
+#define IB_COMP_MASK_PR_SERVICE_ID         (htobe64(1 << 0) | \
+                                            htobe64(1 << 1))
+#define IB_COMP_MASK_PR_DGID                htobe64(1 << 2)
+#define IB_COMP_MASK_PR_SGID                htobe64(1 << 3)
+#define IB_COMP_MASK_PR_DLID                htobe64(1 << 4)
+#define IB_COMP_MASK_PR_SLID                htobe64(1 << 5)
+#define IB_COMP_MASK_PR_RAW_TRAFFIC         htobe64(1 << 6)
+/* RESERVED                                 htobe64(1 << 7) */
+#define IB_COMP_MASK_PR_FLOW_LABEL          htobe64(1 << 8)
+#define IB_COMP_MASK_PR_HOP_LIMIT           htobe64(1 << 9)
+#define IB_COMP_MASK_PR_TCLASS              htobe64(1 << 10)
+#define IB_COMP_MASK_PR_REVERSIBLE          htobe64(1 << 11)
+#define IB_COMP_MASK_PR_NUM_PATH            htobe64(1 << 12)
+#define IB_COMP_MASK_PR_PKEY                htobe64(1 << 13)
+#define IB_COMP_MASK_PR_QOS_CLASS           htobe64(1 << 14)
+#define IB_COMP_MASK_PR_SL                  htobe64(1 << 15)
+#define IB_COMP_MASK_PR_MTU_SELECTOR        htobe64(1 << 16)
+#define IB_COMP_MASK_PR_MTU                 htobe64(1 << 17)
+#define IB_COMP_MASK_PR_RATE_SELECTOR       htobe64(1 << 18)
+#define IB_COMP_MASK_PR_RATE                htobe64(1 << 19)
+#define IB_COMP_MASK_PR_PACKET_LIFETIME_SELECTOR htobe64(1 << 20)
+#define IB_COMP_MASK_PR_PACKET_LIFETIME     htobe64(1 << 21)
+#define IB_COMP_MASK_PR_PREFERENCE          htobe64(1 << 22)
+/* RESERVED                                 htobe64(1 << 23) */
 
 #define IB_MC_QPN 0xffffff
 #define IB_SA_ATTR_MC_MEMBER_REC htons(0x0038)
 
-#define IB_COMP_MASK_MC_MGID                htonll(1 << 0)
-#define IB_COMP_MASK_MC_PORT_GID            htonll(1 << 1)
-#define IB_COMP_MASK_MC_QKEY                htonll(1 << 2)
-#define IB_COMP_MASK_MC_MLID                htonll(1 << 3)
-#define IB_COMP_MASK_MC_MTU_SEL             htonll(1 << 4)
-#define IB_COMP_MASK_MC_MTU                 htonll(1 << 5)
-#define IB_COMP_MASK_MC_TCLASS              htonll(1 << 6)
-#define IB_COMP_MASK_MC_PKEY                htonll(1 << 7)
-#define IB_COMP_MASK_MC_RATE_SEL            htonll(1 << 8)
-#define IB_COMP_MASK_MC_RATE                htonll(1 << 9)
-#define IB_COMP_MASK_MC_PACKET_LIFETIME_SEL htonll(1 << 10)
-#define IB_COMP_MASK_MC_PACKET_LIFETIME     htonll(1 << 11)
-#define IB_COMP_MASK_MC_SL                  htonll(1 << 12)
-#define IB_COMP_MASK_MC_FLOW                htonll(1 << 13)
-#define IB_COMP_MASK_MC_HOP                 htonll(1 << 14)
-#define IB_COMP_MASK_MC_SCOPE               htonll(1 << 15)
-#define IB_COMP_MASK_MC_JOIN_STATE          htonll(1 << 16)
-#define IB_COMP_MASK_MC_PROXY_JOIN          htonll(1 << 17)
+#define IB_COMP_MASK_MC_MGID                htobe64(1 << 0)
+#define IB_COMP_MASK_MC_PORT_GID            htobe64(1 << 1)
+#define IB_COMP_MASK_MC_QKEY                htobe64(1 << 2)
+#define IB_COMP_MASK_MC_MLID                htobe64(1 << 3)
+#define IB_COMP_MASK_MC_MTU_SEL             htobe64(1 << 4)
+#define IB_COMP_MASK_MC_MTU                 htobe64(1 << 5)
+#define IB_COMP_MASK_MC_TCLASS              htobe64(1 << 6)
+#define IB_COMP_MASK_MC_PKEY                htobe64(1 << 7)
+#define IB_COMP_MASK_MC_RATE_SEL            htobe64(1 << 8)
+#define IB_COMP_MASK_MC_RATE                htobe64(1 << 9)
+#define IB_COMP_MASK_MC_PACKET_LIFETIME_SEL htobe64(1 << 10)
+#define IB_COMP_MASK_MC_PACKET_LIFETIME     htobe64(1 << 11)
+#define IB_COMP_MASK_MC_SL                  htobe64(1 << 12)
+#define IB_COMP_MASK_MC_FLOW                htobe64(1 << 13)
+#define IB_COMP_MASK_MC_HOP                 htobe64(1 << 14)
+#define IB_COMP_MASK_MC_SCOPE               htobe64(1 << 15)
+#define IB_COMP_MASK_MC_JOIN_STATE          htobe64(1 << 16)
+#define IB_COMP_MASK_MC_PROXY_JOIN          htobe64(1 << 17)
 
 struct ib_mc_member_rec {
 	union ibv_gid mgid;
diff --git a/ibacm/prov/acmp/src/acmp.c b/ibacm/prov/acmp/src/acmp.c
index fb6684f2eac1f5..6b7cbb8c203478 100644
--- a/ibacm/prov/acmp/src/acmp.c
+++ b/ibacm/prov/acmp/src/acmp.c
@@ -780,7 +780,7 @@ static void acmp_init_path_query(struct ib_sa_mad *mad)
 	mad->mgmt_class = IB_MGMT_CLASS_SA;
 	mad->class_version = 2;
 	mad->method = IB_METHOD_GET;
-	mad->tid = htonll((uint64_t) atomic_inc(&g_tid));
+	mad->tid = htobe64((uint64_t) atomic_inc(&g_tid));
 	mad->attr_id = IB_SA_ATTR_PATH_REC;
 }
 
@@ -1367,7 +1367,7 @@ static void acmp_init_join(struct ib_sa_mad *mad, union ibv_gid *port_gid,
 	mad->mgmt_class = IB_MGMT_CLASS_SA;
 	mad->class_version = 2;
 	mad->method = IB_METHOD_SET;
-	mad->tid = htonll((uint64_t) atomic_inc(&g_tid));
+	mad->tid = htobe64((uint64_t) atomic_inc(&g_tid));
 	mad->attr_id = IB_SA_ATTR_MC_MEMBER_REC;
 	mad->comp_mask =
 		IB_COMP_MASK_MC_MGID | IB_COMP_MASK_MC_PORT_GID |
@@ -1673,7 +1673,7 @@ acmp_send_resolve(struct acmp_ep *ep, struct acmp_dest *dest,
 	mad->class_version = 1;
 	mad->method = IB_METHOD_GET;
 	mad->control = ACM_CTRL_RESOLVE;
-	mad->tid = htonll((uint64_t) atomic_inc(&g_tid));
+	mad->tid = htobe64((uint64_t) atomic_inc(&g_tid));
 
 	rec = (struct acm_resolve_rec *) mad->data;
 	rec->src_type = (uint8_t) saddr->type;
@@ -1957,7 +1957,7 @@ static void acmp_query_perf(void *ep_context, uint64_t *values, uint8_t *cnt)
 	int i;
 
 	for (i = 0; i < ACM_MAX_COUNTER; i++)
-		values[i] = htonll((uint64_t) atomic_get(&ep->counters[i]));
+		values[i] = htobe64((uint64_t) atomic_get(&ep->counters[i]));
 	*cnt = ACM_MAX_COUNTER;
 }
 
@@ -2082,7 +2082,7 @@ static void acmp_parse_osm_fullv1_lid2guid(FILE *f, uint64_t *lid2guid)
 		if (lid2guid[lid])
 			acm_log(0, "ERROR - duplicate lid %u\n", lid);
 		else
-			lid2guid[lid] = htonll(guid);
+			lid2guid[lid] = htobe64(guid);
 	}
 }
 
diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c
index fd06a2e81fbe76..2cf1ea8b2148c0 100644
--- a/ibacm/src/acm.c
+++ b/ibacm/src/acm.c
@@ -1000,7 +1000,7 @@ static int acm_svr_perf_query(struct acmc_client *client, struct acm_msg *msg)
 	    ((ntohs(msg->hdr.length) >= (ACM_MSG_HDR_LENGTH + ACM_MSG_EP_LENGTH)
 	    && !(msg->resolve_data[0].flags & ACM_EP_FLAG_SOURCE)))) {
 		for (i = 0; i < ACM_MAX_COUNTER; i++)
-			msg->perf_data[i] = htonll((uint64_t) atomic_get(&counter[i]));
+			msg->perf_data[i] = htobe64((uint64_t) atomic_get(&counter[i]));
 
 		msg->hdr.data[0] = ACM_MAX_COUNTER;
 		len = ACM_MSG_HDR_LENGTH + (ACM_MAX_COUNTER * sizeof(uint64_t));
@@ -1426,7 +1426,7 @@ static int acm_nl_parse_path_attr(struct nlattr *attr,
 		sid = (uint64_t *) NLA_DATA(attr);
 		if (NLA_LEN(attr) == sizeof(*sid)) {
 			acm_log(2, "service_id 0x%" PRIx64 "\n", *sid);
-			path->service_id = htonll(*sid);
+			path->service_id = htobe64(*sid);
 		} else {
 			ret = -1;
 		}
@@ -2499,7 +2499,7 @@ static void acm_load_prov_config(void)
 		acm_log(2, "provider %s subnet_prefix 0x%" PRIx64 "\n",
 			prov_name, prefix);
 		/* Convert it into network byte order */
-		prefix = htonll(prefix);
+		prefix = htobe64(prefix);
 
 		list_for_each(&provider_list, prov, entry) {
 			if (!strcasecmp(prov->prov->name, prov_name)) {
diff --git a/providers/cxgb3/cxio_wr.h b/providers/cxgb3/cxio_wr.h
index d56c5298ebaad5..735b64918a15c8 100644
--- a/providers/cxgb3/cxio_wr.h
+++ b/providers/cxgb3/cxio_wr.h
@@ -351,7 +351,7 @@ static inline void build_fw_riwrh(struct fw_riwrh *wqe, enum t3_wr_opcode op,
 	wqe->gen_tid_len = htonl(V_FW_RIWR_GEN(genbit) | V_FW_RIWR_TID(tid) |
 				 V_FW_RIWR_LEN(len));
 	/* 2nd gen bit... */
-        ((union t3_wr *)wqe)->flit[15] = htonll(genbit);
+        ((union t3_wr *)wqe)->flit[15] = htobe64(genbit);
 }
 
 /*
diff --git a/providers/cxgb3/qp.c b/providers/cxgb3/qp.c
index 30dd898f6e874b..b0cf10364e9a6c 100644
--- a/providers/cxgb3/qp.c
+++ b/providers/cxgb3/qp.c
@@ -84,7 +84,7 @@ static inline int iwch_build_rdma_send(union t3_wr *wqe, struct ibv_send_wr *wr,
 			    htonl(wr->sg_list[i].lkey);
 			wqe->send.sgl[i].len =
 			    htonl(wr->sg_list[i].length);
-			wqe->send.sgl[i].to = htonll(wr->sg_list[i].addr);
+			wqe->send.sgl[i].to = htobe64(wr->sg_list[i].addr);
 		}
 		wqe->send.plen = htonl(wqe->send.plen);
 		wqe->send.num_sgle = htonl(wr->num_sge);
@@ -104,7 +104,7 @@ static inline int iwch_build_rdma_write(union t3_wr *wqe,
 	wqe->write.rdmaop = T3_RDMA_WRITE;
 	wqe->write.reserved = 0;
 	wqe->write.stag_sink = htonl(wr->wr.rdma.rkey);
-	wqe->write.to_sink = htonll(wr->wr.rdma.remote_addr);
+	wqe->write.to_sink = htobe64(wr->wr.rdma.remote_addr);
 
 	wqe->write.num_sgle = wr->num_sge;
 
@@ -139,7 +139,7 @@ static inline int iwch_build_rdma_write(union t3_wr *wqe,
 			wqe->write.sgl[i].len =
 			    htonl(wr->sg_list[i].length);
 			wqe->write.sgl[i].to =
-			    htonll(wr->sg_list[i].addr);
+			    htobe64(wr->sg_list[i].addr);
 		}
 		wqe->write.plen = htonl(wqe->write.plen);
 		wqe->write.num_sgle = htonl(wr->num_sge);
@@ -157,10 +157,10 @@ static inline int iwch_build_rdma_read(union t3_wr *wqe, struct ibv_send_wr *wr,
 	wqe->read.reserved = 0;
 	if (wr->num_sge == 1 && wr->sg_list[0].length > 0) {
 		wqe->read.rem_stag = htonl(wr->wr.rdma.rkey);
-		wqe->read.rem_to = htonll(wr->wr.rdma.remote_addr);
+		wqe->read.rem_to = htobe64(wr->wr.rdma.remote_addr);
 		wqe->read.local_stag = htonl(wr->sg_list[0].lkey);
 		wqe->read.local_len = htonl(wr->sg_list[0].length);
-		wqe->read.local_to = htonll(wr->sg_list[0].addr);
+		wqe->read.local_to = htobe64(wr->sg_list[0].addr);
 	} else {
 
 		/* build passable 0B read request */
@@ -295,7 +295,7 @@ static inline int iwch_build_rdma_recv(struct iwch_device *rhp,
 	for (i = 0; i < wr->num_sge; i++) {
 		wqe->recv.sgl[i].stag = htonl(wr->sg_list[i].lkey);
 		wqe->recv.sgl[i].len = htonl(wr->sg_list[i].length);
-		wqe->recv.sgl[i].to = htonll(wr->sg_list[i].addr);
+		wqe->recv.sgl[i].to = htobe64(wr->sg_list[i].addr);
 	}
 	for (; i < T3_MAX_SGE; i++) {
 		wqe->recv.sgl[i].stag = 0;
diff --git a/providers/cxgb4/t4.h b/providers/cxgb4/t4.h
index cad675c3fdb193..59dbc65d4e164b 100644
--- a/providers/cxgb4/t4.h
+++ b/providers/cxgb4/t4.h
@@ -55,7 +55,7 @@
 #define __iomem
 #define cpu_to_be16 htons
 #define cpu_to_be32 htonl
-#define cpu_to_be64 htonll
+#define cpu_to_be64 htobe64
 #define be16_to_cpu ntohs
 #define be32_to_cpu ntohl
 #define be64_to_cpu ntohll
diff --git a/providers/mlx4/qp.c b/providers/mlx4/qp.c
index 268fb7dc83dd11..a607326c7c452c 100644
--- a/providers/mlx4/qp.c
+++ b/providers/mlx4/qp.c
@@ -157,7 +157,7 @@ static inline void set_local_inv_seg(struct mlx4_wqe_local_inval_seg *iseg,
 static inline void set_raddr_seg(struct mlx4_wqe_raddr_seg *rseg,
 				 uint64_t remote_addr, uint32_t rkey)
 {
-	rseg->raddr    = htonll(remote_addr);
+	rseg->raddr    = htobe64(remote_addr);
 	rseg->rkey     = htonl(rkey);
 	rseg->reserved = 0;
 }
@@ -165,10 +165,10 @@ static inline void set_raddr_seg(struct mlx4_wqe_raddr_seg *rseg,
 static void set_atomic_seg(struct mlx4_wqe_atomic_seg *aseg, struct ibv_send_wr *wr)
 {
 	if (wr->opcode == IBV_WR_ATOMIC_CMP_AND_SWP) {
-		aseg->swap_add = htonll(wr->wr.atomic.swap);
-		aseg->compare  = htonll(wr->wr.atomic.compare_add);
+		aseg->swap_add = htobe64(wr->wr.atomic.swap);
+		aseg->compare  = htobe64(wr->wr.atomic.compare_add);
 	} else {
-		aseg->swap_add = htonll(wr->wr.atomic.compare_add);
+		aseg->swap_add = htobe64(wr->wr.atomic.compare_add);
 		aseg->compare  = 0;
 	}
 
@@ -188,13 +188,13 @@ static void __set_data_seg(struct mlx4_wqe_data_seg *dseg, struct ibv_sge *sg)
 {
 	dseg->byte_count = htonl(sg->length);
 	dseg->lkey       = htonl(sg->lkey);
-	dseg->addr       = htonll(sg->addr);
+	dseg->addr       = htobe64(sg->addr);
 }
 
 static void set_data_seg(struct mlx4_wqe_data_seg *dseg, struct ibv_sge *sg)
 {
 	dseg->lkey       = htonl(sg->lkey);
-	dseg->addr       = htonll(sg->addr);
+	dseg->addr       = htobe64(sg->addr);
 
 	/*
 	 * Need a barrier here before writing the byte_count field to
diff --git a/providers/mlx4/srq.c b/providers/mlx4/srq.c
index c0e028671828d8..4f90efdf927209 100644
--- a/providers/mlx4/srq.c
+++ b/providers/mlx4/srq.c
@@ -96,7 +96,7 @@ int mlx4_post_srq_recv(struct ibv_srq *ibsrq,
 		for (i = 0; i < wr->num_sge; ++i) {
 			scat[i].byte_count = htonl(wr->sg_list[i].length);
 			scat[i].lkey       = htonl(wr->sg_list[i].lkey);
-			scat[i].addr       = htonll(wr->sg_list[i].addr);
+			scat[i].addr       = htobe64(wr->sg_list[i].addr);
 		}
 
 		if (i < srq->max_gs) {
diff --git a/providers/mlx5/qp.c b/providers/mlx5/qp.c
index e82b1a0bebc3f9..7d034880f4caf6 100644
--- a/providers/mlx5/qp.c
+++ b/providers/mlx5/qp.c
@@ -190,7 +190,7 @@ static int mlx5_wq_overflow(struct mlx5_wq *wq, int nreq, struct mlx5_cq *cq)
 static inline void set_raddr_seg(struct mlx5_wqe_raddr_seg *rseg,
 				 uint64_t remote_addr, uint32_t rkey)
 {
-	rseg->raddr    = htonll(remote_addr);
+	rseg->raddr    = htobe64(remote_addr);
 	rseg->rkey     = htonl(rkey);
 	rseg->reserved = 0;
 }
@@ -201,10 +201,10 @@ static void set_atomic_seg(struct mlx5_wqe_atomic_seg *aseg,
 			   uint64_t compare_add)
 {
 	if (opcode == IBV_WR_ATOMIC_CMP_AND_SWP) {
-		aseg->swap_add = htonll(swap);
-		aseg->compare  = htonll(compare_add);
+		aseg->swap_add = htobe64(swap);
+		aseg->compare  = htobe64(compare_add);
 	} else {
-		aseg->swap_add = htonll(compare_add);
+		aseg->swap_add = htobe64(compare_add);
 	}
 }
 
@@ -221,7 +221,7 @@ static void set_data_ptr_seg(struct mlx5_wqe_data_seg *dseg, struct ibv_sge *sg,
 {
 	dseg->byte_count = htonl(sg->length - offset);
 	dseg->lkey       = htonl(sg->lkey);
-	dseg->addr       = htonll(sg->addr + offset);
+	dseg->addr       = htobe64(sg->addr + offset);
 }
 
 static void set_data_ptr_seg_atomic(struct mlx5_wqe_data_seg *dseg,
@@ -229,7 +229,7 @@ static void set_data_ptr_seg_atomic(struct mlx5_wqe_data_seg *dseg,
 {
 	dseg->byte_count = htonl(MLX5_ATOMIC_SIZE);
 	dseg->lkey       = htonl(sg->lkey);
-	dseg->addr       = htonll(sg->addr);
+	dseg->addr       = htobe64(sg->addr);
 }
 
 /*
@@ -430,7 +430,7 @@ static void set_umr_data_seg(struct mlx5_qp *qp, enum ibv_mw_type type,
 
 	data->klm.byte_count = htonl(bind_info->length);
 	data->klm.mkey = htonl(bind_info->mr->lkey);
-	data->klm.address = htonll(bind_info->addr);
+	data->klm.address = htobe64(bind_info->addr);
 
 	memset(&data->klm + 1, 0, sizeof(data->reserved) -
 	       sizeof(data->klm));
@@ -467,8 +467,8 @@ static void set_umr_mkey_seg(struct mlx5_qp *qp, enum ibv_mw_type type,
 		if (bind_info->mw_access_flags & IBV_ACCESS_ZERO_BASED)
 			mkey->start_addr = 0;
 		else
-			mkey->start_addr = htonll(bind_info->addr);
-		mkey->len = htonll(bind_info->length);
+			mkey->start_addr = htobe64(bind_info->addr);
+		mkey->len = htobe64(bind_info->length);
 	} else {
 		mkey->free = MLX5_WQE_MKEY_CONTEXT_FREE;
 	}
@@ -485,20 +485,20 @@ static inline void set_umr_control_seg(struct mlx5_qp *qp, enum ibv_mw_type type
 
 	ctrl->flags = MLX5_WQE_UMR_CTRL_FLAG_TRNSLATION_OFFSET |
 		MLX5_WQE_UMR_CTRL_FLAG_INLINE;
-	ctrl->mkey_mask = htonll(MLX5_WQE_UMR_CTRL_MKEY_MASK_FREE |
+	ctrl->mkey_mask = htobe64(MLX5_WQE_UMR_CTRL_MKEY_MASK_FREE |
 				     MLX5_WQE_UMR_CTRL_MKEY_MASK_MKEY);
 	ctrl->translation_offset = 0;
 	memset(ctrl->rsvd0, 0, sizeof(ctrl->rsvd0));
 	memset(ctrl->rsvd1, 0, sizeof(ctrl->rsvd1));
 
 	if (type == IBV_MW_TYPE_2)
-		ctrl->mkey_mask |= htonll(MLX5_WQE_UMR_CTRL_MKEY_MASK_QPN);
+		ctrl->mkey_mask |= htobe64(MLX5_WQE_UMR_CTRL_MKEY_MASK_QPN);
 
 	if (bind_info->length) {
 		ctrl->klm_octowords = get_klm_octo(1);
 		if (type == IBV_MW_TYPE_2)
 			ctrl->flags |=  MLX5_WQE_UMR_CTRL_FLAG_CHECK_FREE;
-		ctrl->mkey_mask |= htonll(MLX5_WQE_UMR_CTRL_MKEY_MASK_LEN	|
+		ctrl->mkey_mask |= htobe64(MLX5_WQE_UMR_CTRL_MKEY_MASK_LEN	|
 					      MLX5_WQE_UMR_CTRL_MKEY_MASK_START_ADDR |
 					      MLX5_WQE_UMR_CTRL_MKEY_MASK_ACCESS_LOCAL_WRITE |
 					      MLX5_WQE_UMR_CTRL_MKEY_MASK_ACCESS_REMOTE_READ |
diff --git a/providers/mlx5/srq.c b/providers/mlx5/srq.c
index a06afa3a5931b6..b362ec85724961 100644
--- a/providers/mlx5/srq.c
+++ b/providers/mlx5/srq.c
@@ -120,7 +120,7 @@ int mlx5_post_srq_recv(struct ibv_srq *ibsrq,
 		for (i = 0; i < wr->num_sge; ++i) {
 			scat[i].byte_count = htonl(wr->sg_list[i].length);
 			scat[i].lkey       = htonl(wr->sg_list[i].lkey);
-			scat[i].addr       = htonll(wr->sg_list[i].addr);
+			scat[i].addr       = htobe64(wr->sg_list[i].addr);
 		}
 
 		if (i < srq->max_gs) {
diff --git a/providers/mthca/qp.c b/providers/mthca/qp.c
index 129e6c74ef5382..d221bb19bfa67c 100644
--- a/providers/mthca/qp.c
+++ b/providers/mthca/qp.c
@@ -147,7 +147,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 			case IBV_WR_ATOMIC_CMP_AND_SWP:
 			case IBV_WR_ATOMIC_FETCH_AND_ADD:
 				((struct mthca_raddr_seg *) wqe)->raddr =
-					htonll(wr->wr.atomic.remote_addr);
+					htobe64(wr->wr.atomic.remote_addr);
 				((struct mthca_raddr_seg *) wqe)->rkey =
 					htonl(wr->wr.atomic.rkey);
 				((struct mthca_raddr_seg *) wqe)->reserved = 0;
@@ -156,12 +156,12 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 
 				if (wr->opcode == IBV_WR_ATOMIC_CMP_AND_SWP) {
 					((struct mthca_atomic_seg *) wqe)->swap_add =
-						htonll(wr->wr.atomic.swap);
+						htobe64(wr->wr.atomic.swap);
 					((struct mthca_atomic_seg *) wqe)->compare =
-						htonll(wr->wr.atomic.compare_add);
+						htobe64(wr->wr.atomic.compare_add);
 				} else {
 					((struct mthca_atomic_seg *) wqe)->swap_add =
-						htonll(wr->wr.atomic.compare_add);
+						htobe64(wr->wr.atomic.compare_add);
 					((struct mthca_atomic_seg *) wqe)->compare = 0;
 				}
 
@@ -174,7 +174,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 			case IBV_WR_RDMA_WRITE_WITH_IMM:
 			case IBV_WR_RDMA_READ:
 				((struct mthca_raddr_seg *) wqe)->raddr =
-					htonll(wr->wr.rdma.remote_addr);
+					htobe64(wr->wr.rdma.remote_addr);
 				((struct mthca_raddr_seg *) wqe)->rkey =
 					htonl(wr->wr.rdma.rkey);
 				((struct mthca_raddr_seg *) wqe)->reserved = 0;
@@ -194,7 +194,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 			case IBV_WR_RDMA_WRITE:
 			case IBV_WR_RDMA_WRITE_WITH_IMM:
 				((struct mthca_raddr_seg *) wqe)->raddr =
-					htonll(wr->wr.rdma.remote_addr);
+					htobe64(wr->wr.rdma.remote_addr);
 				((struct mthca_raddr_seg *) wqe)->rkey =
 					htonl(wr->wr.rdma.rkey);
 				((struct mthca_raddr_seg *) wqe)->reserved = 0;
@@ -213,7 +213,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 			((struct mthca_tavor_ud_seg *) wqe)->lkey =
 				htonl(to_mah(wr->wr.ud.ah)->key);
 			((struct mthca_tavor_ud_seg *) wqe)->av_addr =
-				htonll((uintptr_t) to_mah(wr->wr.ud.ah)->av);
+				htobe64((uintptr_t) to_mah(wr->wr.ud.ah)->av);
 			((struct mthca_tavor_ud_seg *) wqe)->dqpn =
 				htonl(wr->wr.ud.remote_qpn);
 			((struct mthca_tavor_ud_seg *) wqe)->qkey =
@@ -265,7 +265,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 				seg = wqe;
 				seg->byte_count = htonl(wr->sg_list[i].length);
 				seg->lkey = htonl(wr->sg_list[i].lkey);
-				seg->addr = htonll(wr->sg_list[i].addr);
+				seg->addr = htobe64(wr->sg_list[i].addr);
 				wqe += sizeof *seg;
 			}
 
@@ -372,7 +372,7 @@ int mthca_tavor_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
 			((struct mthca_data_seg *) wqe)->lkey =
 				htonl(wr->sg_list[i].lkey);
 			((struct mthca_data_seg *) wqe)->addr =
-				htonll(wr->sg_list[i].addr);
+				htobe64(wr->sg_list[i].addr);
 			wqe += sizeof (struct mthca_data_seg);
 			size += sizeof (struct mthca_data_seg) / 16;
 		}
@@ -508,7 +508,7 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 			case IBV_WR_ATOMIC_CMP_AND_SWP:
 			case IBV_WR_ATOMIC_FETCH_AND_ADD:
 				((struct mthca_raddr_seg *) wqe)->raddr =
-					htonll(wr->wr.atomic.remote_addr);
+					htobe64(wr->wr.atomic.remote_addr);
 				((struct mthca_raddr_seg *) wqe)->rkey =
 					htonl(wr->wr.atomic.rkey);
 				((struct mthca_raddr_seg *) wqe)->reserved = 0;
@@ -517,12 +517,12 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 
 				if (wr->opcode == IBV_WR_ATOMIC_CMP_AND_SWP) {
 					((struct mthca_atomic_seg *) wqe)->swap_add =
-						htonll(wr->wr.atomic.swap);
+						htobe64(wr->wr.atomic.swap);
 					((struct mthca_atomic_seg *) wqe)->compare =
-						htonll(wr->wr.atomic.compare_add);
+						htobe64(wr->wr.atomic.compare_add);
 				} else {
 					((struct mthca_atomic_seg *) wqe)->swap_add =
-						htonll(wr->wr.atomic.compare_add);
+						htobe64(wr->wr.atomic.compare_add);
 					((struct mthca_atomic_seg *) wqe)->compare = 0;
 				}
 
@@ -535,7 +535,7 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 			case IBV_WR_RDMA_WRITE_WITH_IMM:
 			case IBV_WR_RDMA_READ:
 				((struct mthca_raddr_seg *) wqe)->raddr =
-					htonll(wr->wr.rdma.remote_addr);
+					htobe64(wr->wr.rdma.remote_addr);
 				((struct mthca_raddr_seg *) wqe)->rkey =
 					htonl(wr->wr.rdma.rkey);
 				((struct mthca_raddr_seg *) wqe)->reserved = 0;
@@ -555,7 +555,7 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 			case IBV_WR_RDMA_WRITE:
 			case IBV_WR_RDMA_WRITE_WITH_IMM:
 				((struct mthca_raddr_seg *) wqe)->raddr =
-					htonll(wr->wr.rdma.remote_addr);
+					htobe64(wr->wr.rdma.remote_addr);
 				((struct mthca_raddr_seg *) wqe)->rkey =
 					htonl(wr->wr.rdma.rkey);
 				((struct mthca_raddr_seg *) wqe)->reserved = 0;
@@ -624,7 +624,7 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
 				seg = wqe;
 				seg->byte_count = htonl(wr->sg_list[i].length);
 				seg->lkey = htonl(wr->sg_list[i].lkey);
-				seg->addr = htonll(wr->sg_list[i].addr);
+				seg->addr = htobe64(wr->sg_list[i].addr);
 				wqe += sizeof *seg;
 			}
 
@@ -730,7 +730,7 @@ int mthca_arbel_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
 			((struct mthca_data_seg *) wqe)->lkey =
 				htonl(wr->sg_list[i].lkey);
 			((struct mthca_data_seg *) wqe)->addr =
-				htonll(wr->sg_list[i].addr);
+				htobe64(wr->sg_list[i].addr);
 			wqe += sizeof (struct mthca_data_seg);
 		}
 
diff --git a/providers/mthca/srq.c b/providers/mthca/srq.c
index ff6f532733f4ae..66ac924a720c84 100644
--- a/providers/mthca/srq.c
+++ b/providers/mthca/srq.c
@@ -126,7 +126,7 @@ int mthca_tavor_post_srq_recv(struct ibv_srq *ibsrq,
 			((struct mthca_data_seg *) wqe)->lkey =
 				htonl(wr->sg_list[i].lkey);
 			((struct mthca_data_seg *) wqe)->addr =
-				htonll(wr->sg_list[i].addr);
+				htobe64(wr->sg_list[i].addr);
 			wqe += sizeof (struct mthca_data_seg);
 		}
 
@@ -219,7 +219,7 @@ int mthca_arbel_post_srq_recv(struct ibv_srq *ibsrq,
 			((struct mthca_data_seg *) wqe)->lkey =
 				htonl(wr->sg_list[i].lkey);
 			((struct mthca_data_seg *) wqe)->addr =
-				htonll(wr->sg_list[i].addr);
+				htobe64(wr->sg_list[i].addr);
 			wqe += sizeof (struct mthca_data_seg);
 		}
 
diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c
index 823ed8754c09d7..932115c8ab7f39 100644
--- a/providers/qedr/qelr_verbs.c
+++ b/providers/qedr/qelr_verbs.c
@@ -900,7 +900,7 @@ static inline void qelr_edpm_set_rdma_ext(struct qelr_qp *qp,
 	if (!qp->edpm.is_edpm)
 		return;
 
-	qp->edpm.rdma_ext->remote_va = htonll(remote_addr);
+	qp->edpm.rdma_ext->remote_va = htobe64(remote_addr);
 	qp->edpm.rdma_ext->remote_key = htonl(rkey);
 	qp->edpm.dpm_payload_offset += sizeof(*qp->edpm.rdma_ext);
 	qp->edpm.dpm_payload_size += sizeof(*qp->edpm.rdma_ext);
diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c
index e0e550d81ab3c2..ff6118acf611ca 100644
--- a/srp_daemon/srp_daemon.c
+++ b/srp_daemon/srp_daemon.c
@@ -462,9 +462,9 @@ static int add_non_exist_target(struct target_details *target)
 			if (srpd_sys_read_gid(scsi_host_dir, "dgid", dgid_val))
 				continue;
 		}
-		if (htonll(target->subnet_prefix) != *((uint64_t *) dgid_val))
+		if (htobe64(target->subnet_prefix) != *((uint64_t *) dgid_val))
 			continue;
-		if (htonll(target->h_guid) != *((uint64_t *) (dgid_val+8)))
+		if (htobe64(target->h_guid) != *((uint64_t *) (dgid_val+8)))
 			continue;
 
 		/* If there is no local_ib_device in the scsi host dir (old kernel module), assumes it is equal */
@@ -603,7 +603,7 @@ static int send_and_get(int portid, int agent, srp_ib_user_mad_t *out_mad,
 		/* Skip tid 0 because OpenSM ignores it. */
 		if (++tid == 0)
 			++tid;
-		out_dm_mad->tid = htonll(tid);
+		out_dm_mad->tid = htobe64(tid);
 
 		ret = umad_send(portid, agent, out_mad, MAD_BLOCK_SIZE,
 				config->timeout, 0);
@@ -1033,7 +1033,7 @@ int get_node(struct umad_resources *umad_res, uint16_t dlid, uint64_t *guid)
 	init_srp_sa_mad(&out_mad, umad_res->agent, umad_res->sm_lid,
 		        SRP_SA_ATTR_NODE, 0);
 
-	out_sa_mad->comp_mask     = htonll(1); /* LID */
+	out_sa_mad->comp_mask     = htobe64(1); /* LID */
 	node			  = (void *) out_sa_mad->data;
 	node->lid		  = htons(dlid);
 
@@ -1059,7 +1059,7 @@ static int get_port_info(struct umad_resources *umad_res, uint16_t dlid,
 	init_srp_sa_mad(&out_mad, umad_res->agent, umad_res->sm_lid,
 		        SRP_SA_ATTR_PORT_INFO, 0);
 
-	out_sa_mad->comp_mask     = htonll(1); /* LID */
+	out_sa_mad->comp_mask     = htobe64(1); /* LID */
 	port_info                 = (void *) out_sa_mad->data;
 	port_info->endport_lid	  = htons(dlid);
 
@@ -1134,7 +1134,7 @@ static int get_shared_pkeys(struct resources *res,
 			continue;
 
 		/* Mark components: DLID, SLID, PKEY */
-		out_sa_mad->comp_mask = htonll(1 << 4 | 1 << 5 | 1 << 13);
+		out_sa_mad->comp_mask = htobe64(1 << 4 | 1 << 5 | 1 << 13);
 		out_sa_mad->rmpp_version = 1;
 		out_sa_mad->rmpp_type = 1;
 		path_rec = (ib_path_rec_t *)out_sa_mad->data;
@@ -1194,7 +1194,7 @@ static int do_dm_port_list(struct resources *res)
 		        SRP_SA_ATTR_PORT_INFO, SRP_SM_CAP_MASK_MATCH_ATTR_MOD);
 
 	out_sa_mad->method     	   = SRP_SA_METHOD_GET_TABLE;
-	out_sa_mad->comp_mask      = htonll(1 << 7); /* Capability mask */
+	out_sa_mad->comp_mask      = htobe64(1 << 7); /* Capability mask */
 	out_sa_mad->rmpp_version   = 1;
 	out_sa_mad->rmpp_type      = 1;
 	port_info		   = (void *) out_sa_mad->data;
@@ -2330,7 +2330,7 @@ static int get_lid(struct umad_resources *umad_res, ib_gid_t *gid, uint16_t *lid
 	init_srp_sa_mad(&out_mad, umad_res->agent, umad_res->sm_lid,
 		        SRP_SA_ATTR_PATH_REC, 0);
 
-	out_sa_mad->comp_mask = htonll( 4 | 8 | 64 | 512 | 4096 );
+	out_sa_mad->comp_mask = htobe64( 4 | 8 | 64 | 512 | 4096 );
 
 	path_rec->sgid = *gid;
 	path_rec->dgid = *gid;
diff --git a/srp_daemon/srp_handle_traps.c b/srp_daemon/srp_handle_traps.c
index 01cc5445e8352b..6a7a2d1ab479a1 100644
--- a/srp_daemon/srp_handle_traps.c
+++ b/srp_daemon/srp_handle_traps.c
@@ -606,14 +606,14 @@ static int register_to_trap(struct sync_resources *sync_res,
 	    comp_mask |= SRP_INFORMINFO_QPN_COMP;
 	}
 
-	p_sa_mad->comp_mask = htonll(comp_mask);
+	p_sa_mad->comp_mask = htobe64(comp_mask);
 	pr_debug("comp_mask: %llx\n", comp_mask);
 
 	do {
 		pthread_mutex_lock(res->mad_buffer_mutex);
 		res->mad_buffer->base_ver = 0; // flag that the buffer is empty
 		pthread_mutex_unlock(res->mad_buffer_mutex);
-		mad_hdr->trans_id = htonll(trans_id);
+		mad_hdr->trans_id = htobe64(trans_id);
 		trans_id++;
 
 		ret = ibv_post_send(res->qp, &sr, bad_wr);
-- 
2.7.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] 24+ messages in thread

* [PATCH rdma-core 03/10] Remove uses of ntohll
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-02-09 21:53   ` [PATCH rdma-core 01/10] Have check-build confirm that every public header is standalone Jason Gunthorpe
  2017-02-09 21:53   ` [PATCH rdma-core 02/10] Remove uses of htonll Jason Gunthorpe
@ 2017-02-09 21:53   ` Jason Gunthorpe
       [not found]     ` <1486677212-3188-4-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-02-09 21:53   ` [PATCH rdma-core 04/10] Do not use kernel byteswap macros Jason Gunthorpe
                     ` (7 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Done via

$ git ls-files | xargs sed -i -e 's/ntohll/be64toh/g'

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 ibacm/prov/acmp/src/acmp.c |  2 +-
 providers/cxgb4/dev.c      |  4 ++--
 providers/cxgb4/t4.h       |  2 +-
 providers/mlx5/cq.c        |  2 +-
 providers/mlx5/qp.c        |  4 ++--
 providers/mlx5/srq.c       |  2 +-
 srp_daemon/srp_daemon.c    | 26 +++++++++++++-------------
 7 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/ibacm/prov/acmp/src/acmp.c b/ibacm/prov/acmp/src/acmp.c
index 6b7cbb8c203478..926ee367996127 100644
--- a/ibacm/prov/acmp/src/acmp.c
+++ b/ibacm/prov/acmp/src/acmp.c
@@ -2126,7 +2126,7 @@ static int acmp_parse_osm_fullv1_paths(FILE *f, uint64_t *lid2guid, struct acmp_
 			continue;
 
 		guid = (uint64_t) strtoull(p_guid, NULL, 16);
-		if (guid != ntohll(sgid.global.interface_id))
+		if (guid != be64toh(sgid.global.interface_id))
 			continue;
 
 		ptr = strstr(ptr, "base LID");
diff --git a/providers/cxgb4/dev.c b/providers/cxgb4/dev.c
index 3d903e85261652..b0233de0dd40c4 100644
--- a/providers/cxgb4/dev.c
+++ b/providers/cxgb4/dev.c
@@ -323,7 +323,7 @@ static void dump_qp(struct c4iw_qp *qhp)
 	for (i=0; i < qhp->wq.sq.size * T4_SQ_NUM_SLOTS; i++) {
 		for (j=0; j < T4_EQ_ENTRY_SIZE / 16; j++) {
 			fprintf(stderr, "%04u %016" PRIx64 " %016" PRIx64 " ",
-				i, ntohll(p[0]), ntohll(p[1]));
+				i, be64toh(p[0]), be64toh(p[1]));
 			if (j == 0 && i == qhp->wq.sq.wq_pidx)
 				fprintf(stderr, " <-- pidx");
 			fprintf(stderr, "\n");
@@ -348,7 +348,7 @@ static void dump_qp(struct c4iw_qp *qhp)
 	for (i=0; i < qhp->wq.rq.size * T4_RQ_NUM_SLOTS; i++) {
 		for (j=0; j < T4_EQ_ENTRY_SIZE / 16; j++) {
 			fprintf(stderr, "%04u %016" PRIx64 " %016" PRIx64 " ",
-				i, ntohll(p[0]), ntohll(p[1]));
+				i, be64toh(p[0]), be64toh(p[1]));
 			if (j == 0 && i == qhp->wq.rq.pidx)
 				fprintf(stderr, " <-- pidx");
 			if (j == 0 && i == qhp->wq.rq.cidx)
diff --git a/providers/cxgb4/t4.h b/providers/cxgb4/t4.h
index 59dbc65d4e164b..a457e2f2921727 100644
--- a/providers/cxgb4/t4.h
+++ b/providers/cxgb4/t4.h
@@ -58,7 +58,7 @@
 #define cpu_to_be64 htobe64
 #define be16_to_cpu ntohs
 #define be32_to_cpu ntohl
-#define be64_to_cpu ntohll
+#define be64_to_cpu be64toh
 #define BUG_ON(c) assert(!(c))
 #define ROUND_UP(x, n) (((x) + (n) - 1u) & ~((n) - 1u))
 #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
diff --git a/providers/mlx5/cq.c b/providers/mlx5/cq.c
index b53fa663b01727..eab8abfdecaefe 100644
--- a/providers/mlx5/cq.c
+++ b/providers/mlx5/cq.c
@@ -1267,7 +1267,7 @@ static inline uint64_t mlx5_cq_read_wc_completion_ts(struct ibv_cq_ex *ibcq)
 {
 	struct mlx5_cq *cq = to_mcq(ibv_cq_ex_to_cq(ibcq));
 
-	return ntohll(cq->cqe64->timestamp);
+	return be64toh(cq->cqe64->timestamp);
 }
 
 #define BIT(i) (1UL << (i))
diff --git a/providers/mlx5/qp.c b/providers/mlx5/qp.c
index 7d034880f4caf6..bd3f8a83e508ee 100644
--- a/providers/mlx5/qp.c
+++ b/providers/mlx5/qp.c
@@ -81,7 +81,7 @@ static int copy_to_scat(struct mlx5_wqe_data_seg *scat, void *buf, int *size,
 
 	for (i = 0; i < max; ++i) {
 		copy = min_t(long, *size, ntohl(scat->byte_count));
-		memcpy((void *)(unsigned long)ntohll(scat->addr), buf, copy);
+		memcpy((void *)(unsigned long)be64toh(scat->addr), buf, copy);
 		*size -= copy;
 		if (*size == 0)
 			return IBV_WC_SUCCESS;
@@ -347,7 +347,7 @@ void *mlx5_get_atomic_laddr(struct mlx5_qp *qp, uint16_t idx, int *byte_count)
 	dpseg = mlx5_get_send_wqe(qp, idx) + sizeof(struct mlx5_wqe_ctrl_seg) +
 		sizeof(struct mlx5_wqe_raddr_seg) +
 		sizeof(struct mlx5_wqe_atomic_seg);
-	addr = (void *)(unsigned long)ntohll(dpseg->addr);
+	addr = (void *)(unsigned long)be64toh(dpseg->addr);
 
 	/*
 	 * Currently byte count is always 8 bytes. Fix this when
diff --git a/providers/mlx5/srq.c b/providers/mlx5/srq.c
index b362ec85724961..b6e1eaf26bbd0c 100644
--- a/providers/mlx5/srq.c
+++ b/providers/mlx5/srq.c
@@ -60,7 +60,7 @@ int mlx5_copy_to_recv_srq(struct mlx5_srq *srq, int idx, void *buf, int size)
 
 	for (i = 0; i < max; ++i) {
 		copy = min_t(long, size, ntohl(scat->byte_count));
-		memcpy((void *)(unsigned long)ntohll(scat->addr), buf, copy);
+		memcpy((void *)(unsigned long)be64toh(scat->addr), buf, copy);
 		size -= copy;
 		if (size <= 0)
 			return IBV_WC_SUCCESS;
diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c
index ff6118acf611ca..19a1bfaeb22c88 100644
--- a/srp_daemon/srp_daemon.c
+++ b/srp_daemon/srp_daemon.c
@@ -365,7 +365,7 @@ static int is_enabled_by_rules_file(struct target_details *target)
 			continue;
 
 		if (conf->rules[rule].ioc_guid[0] != '\0' &&
-		    ntohll(target->ioc_prof.guid) !=
+		    be64toh(target->ioc_prof.guid) !=
 		    strtoull(conf->rules[rule].ioc_guid, NULL, 16))
 			continue;
 
@@ -450,7 +450,7 @@ static int add_non_exist_target(struct target_details *target)
 					target->h_service_id))
 			continue;
 		if (!check_equal_uint64(scsi_host_dir, "ioc_guid",
-					ntohll(target->ioc_prof.guid)))
+					be64toh(target->ioc_prof.guid)))
 			continue;
 		if (srpd_sys_read_gid(scsi_host_dir, "orig_dgid", dgid_val)) {
 			/*
@@ -518,7 +518,7 @@ static int add_non_exist_target(struct target_details *target)
 		"pkey=%04x,"
 		"service_id=%016llx",
 		target->id_ext,
-		(unsigned long long) ntohll(target->ioc_prof.guid),
+		(unsigned long long) be64toh(target->ioc_prof.guid),
 		(unsigned long long) target->subnet_prefix,
 		(unsigned long long) target->h_guid,
 		target->pkey,
@@ -545,7 +545,7 @@ static int add_non_exist_target(struct target_details *target)
 		len += snprintf(target_config_str+len,
 				MAX_TARGET_CONFIG_STR_STRING - len,
 				",initiator_ext=%016llx",
-				(unsigned long long) ntohll(target->h_guid));
+				(unsigned long long) be64toh(target->h_guid));
 
 		if (len >= MAX_TARGET_CONFIG_STR_STRING) {
 			pr_err("Target config string is too long, ignoring target\n");
@@ -637,7 +637,7 @@ recv:
 				return -ret;
 			}
 
-			received_tid = ntohll(in_dm_mad->tid);
+			received_tid = be64toh(in_dm_mad->tid);
 			if (tid != received_tid)
 				pr_debug("umad_recv returned different transaction id sent %d got %d\n",
 					 tid, received_tid);
@@ -970,7 +970,7 @@ static int do_port(struct resources *res, uint16_t pkey, uint16_t dlid,
 			pr_human("    controller[%3d]\n", i + 1);
 
 			pr_human("        GUID:      %016llx\n",
-				 (unsigned long long) ntohll(target->ioc_prof.guid));
+				 (unsigned long long) be64toh(target->ioc_prof.guid));
 			pr_human("        vendor ID: %06x\n", ntohl(target->ioc_prof.vendor_id) >> 8);
 			pr_human("        device ID: %06x\n", ntohl(target->ioc_prof.device_id));
 			pr_human("        IO class : %04hx\n", ntohs(target->ioc_prof.io_class));
@@ -997,10 +997,10 @@ static int do_port(struct resources *res, uint16_t pkey, uint16_t dlid,
 
 					pr_human("            service[%3d]: %016llx / %s\n",
 						 j + k,
-						 (unsigned long long) ntohll(svc_entries.service[k].id),
+						 (unsigned long long) be64toh(svc_entries.service[k].id),
 						 svc_entries.service[k].name);
 
-					target->h_service_id = ntohll(svc_entries.service[k].id);
+					target->h_service_id = be64toh(svc_entries.service[k].id);
 					target->pkey = pkey;
 					if (is_enabled_by_rules_file(target)) {
 						if (!add_non_exist_target(target) && !config->once) {
@@ -1041,7 +1041,7 @@ int get_node(struct umad_resources *umad_res, uint16_t dlid, uint64_t *guid)
 		return -1;
 
 	node  = (void *) in_sa_mad->data;
-	*guid = ntohll(node->port_guid);
+	*guid = be64toh(node->port_guid);
 
 	return 0;
 }
@@ -1067,7 +1067,7 @@ static int get_port_info(struct umad_resources *umad_res, uint16_t dlid,
 		return -1;
 
 	port_info = (void *) in_sa_mad->data;
-	*subnet_prefix = ntohll(port_info->subnet_prefix);
+	*subnet_prefix = be64toh(port_info->subnet_prefix);
 	*isdm          = !!(ntohl(port_info->capability_mask) & SRP_IS_DM);
 
 	return 0;
@@ -1233,7 +1233,7 @@ static int do_dm_port_list(struct resources *res)
 
 		for (j = 0; j < num_pkeys; ++j)
 			do_port(res, pkeys[j], ntohs(port_info->endport_lid),
-				ntohll(port_info->subnet_prefix), guid);
+				be64toh(port_info->subnet_prefix), guid);
 	}
 
 	free(in_mad_buf);
@@ -1311,7 +1311,7 @@ static int do_full_port_list(struct resources *res)
 
 		for (j = 0; j < num_pkeys; ++j)
 			(void) handle_port(res, pkeys[j], ntohs(node->lid),
-					   ntohll(node->port_guid));
+					   be64toh(node->port_guid));
 	}
 
 	free(in_mad_buf);
@@ -2195,7 +2195,7 @@ catas_start:
 
 					srp_sleep(0, 100);
 					handle_port(res, pkey, lid,
-						    ntohll(ib_gid_get_guid(&gid)));
+						    be64toh(ib_gid_get_guid(&gid)));
 				}
 			}
 		} else {
-- 
2.7.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] 24+ messages in thread

* [PATCH rdma-core 04/10] Do not use kernel byteswap macros
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-02-09 21:53   ` [PATCH rdma-core 03/10] Remove uses of ntohll Jason Gunthorpe
@ 2017-02-09 21:53   ` Jason Gunthorpe
       [not found]     ` <1486677212-3188-5-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-02-09 21:53   ` [PATCH rdma-core 05/10] Remove extraneous byteswap.h include Jason Gunthorpe
                     ` (6 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

These days the version in glibc's endian.h is just as good, since
gcc 4.3 (we support no earlier compiler) this just boils down to
__builtin_bswap which is a constant expression if the input is constant.

Done via

$ git ls-files | xargs sed -i -e 's/__constant_cpu_to_be64/htobe64/g'
$ git ls-files | xargs sed -i -e 's/__cpu_to_be64/htobe64/g'
$ git ls-files | xargs sed -i -e 's/__be64_to_cpu/be64toh/g'

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 iwpmd/iwarp_pm_common.c   | 5 +++--
 libibcm/cm.h              | 6 +++---
 libibcm/examples/cmpost.c | 7 +++----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/iwpmd/iwarp_pm_common.c b/iwpmd/iwarp_pm_common.c
index 941e0406ade787..569d53531652aa 100644
--- a/iwpmd/iwarp_pm_common.c
+++ b/iwpmd/iwarp_pm_common.c
@@ -32,6 +32,7 @@
  */
 
 #include "iwarp_pm.h"
+#include <endian.h>
 
 /* iwpm config params */
 static const char * iwpm_param_names[IWPM_PARAM_NUM] =
@@ -380,7 +381,7 @@ int parse_iwpm_msg(iwpm_wire_msg *pm_msg, iwpm_msg_parms *msg_parms)
 	int ret_value = 0;
 
 	msg_parms->pmtime = pm_msg->pmtime;
-	msg_parms->assochandle = __be64_to_cpu(pm_msg->assochandle);
+	msg_parms->assochandle = be64toh(pm_msg->assochandle);
 	msg_parms->ip_ver = (pm_msg->magic & IWARP_PM_IPVER_MASK) >> IWARP_PM_IPVER_SHIFT;
 	switch (msg_parms->ip_ver) {
 	case 4:
@@ -420,7 +421,7 @@ static void form_iwpm_msg(iwpm_wire_msg *pm_msg, iwpm_msg_parms *msg_parms)
 {
 	memset(pm_msg, 0, sizeof(struct iwpm_wire_msg));
 	pm_msg->pmtime = msg_parms->pmtime;
-	pm_msg->assochandle = __cpu_to_be64(msg_parms->assochandle);
+	pm_msg->assochandle = htobe64(msg_parms->assochandle);
 	/* record IP version, port mapper version, message type */
 	pm_msg->magic = (msg_parms->ip_ver << IWARP_PM_IPVER_SHIFT) & IWARP_PM_IPVER_MASK;
 	pm_msg->magic |= (msg_parms->ver << IWARP_PM_VER_SHIFT) & IWARP_PM_VER_MASK;
diff --git a/libibcm/cm.h b/libibcm/cm.h
index e5e2b5e78c5032..6305e8236a3903 100644
--- a/libibcm/cm.h
+++ b/libibcm/cm.h
@@ -38,7 +38,7 @@
 
 #include <infiniband/verbs.h>
 #include <infiniband/sa.h>
-#include <asm/byteorder.h>
+#include <endian.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -325,8 +325,8 @@ struct ib_cm_attr_param {
 int ib_cm_attr_id(struct ib_cm_id *cm_id,
 		  struct ib_cm_attr_param *param);
 
-#define IB_CM_ASSIGN_SERVICE_ID_MASK __constant_cpu_to_be64(0xFF00000000000000ULL)
-#define IB_CM_ASSIGN_SERVICE_ID      __constant_cpu_to_be64(0x0200000000000000ULL)
+#define IB_CM_ASSIGN_SERVICE_ID_MASK htobe64(0xFF00000000000000ULL)
+#define IB_CM_ASSIGN_SERVICE_ID      htobe64(0x0200000000000000ULL)
 
 /**
  * ib_cm_listen - Initiates listening on the specified service ID for
diff --git a/libibcm/examples/cmpost.c b/libibcm/examples/cmpost.c
index f7833f5223185b..d27bdc9c1bf9f3 100644
--- a/libibcm/examples/cmpost.c
+++ b/libibcm/examples/cmpost.c
@@ -37,9 +37,8 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
-#include <byteswap.h>
+#include <endian.h>
 
-#include <asm/byteorder.h>
 #include <netinet/in.h>
 
 #include <infiniband/cm.h>
@@ -585,7 +584,7 @@ static void run_server(void)
 		printf("listen request failed\n");
 		return;
 	}
-	ret = ib_cm_listen(listen_id, __cpu_to_be64(0x1000), 0);
+	ret = ib_cm_listen(listen_id, htobe64(0x1000), 0);
 	if (ret) {
 		printf("failure trying to listen: %d\n", ret);
 		goto out;
@@ -702,7 +701,7 @@ static void run_client(char *dst)
 
 	memset(&req, 0, sizeof req);
 	req.primary_path = &test.path_rec;
-	req.service_id = __cpu_to_be64(0x1000);
+	req.service_id = htobe64(0x1000);
 
 	/*
 	 * When choosing the responder resources for a ULP, it is usually
-- 
2.7.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] 24+ messages in thread

* [PATCH rdma-core 05/10] Remove extraneous byteswap.h include
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (3 preceding siblings ...)
  2017-02-09 21:53   ` [PATCH rdma-core 04/10] Do not use kernel byteswap macros Jason Gunthorpe
@ 2017-02-09 21:53   ` Jason Gunthorpe
  2017-02-09 21:53   ` [PATCH rdma-core 06/10] mlx4: Remove include of asm/unistd.h Jason Gunthorpe
                     ` (5 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Only one place actually needs this now.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 ibacm/linux/osd.h                 | 1 -
 libibumad/sysfs.c                 | 1 -
 libibumad/umad.h                  | 1 -
 libibverbs/arch.h                 | 1 -
 libibverbs/examples/asyncwatch.c  | 1 -
 libibverbs/examples/device_list.c | 1 -
 libibverbs/examples/devinfo.c     | 1 -
 librdmacm/cma.c                   | 1 -
 librdmacm/cma.h                   | 1 -
 librdmacm/examples/cmatose.c      | 1 -
 librdmacm/examples/common.c       | 1 -
 librdmacm/examples/mckey.c        | 1 -
 librdmacm/examples/rping.c        | 1 -
 librdmacm/examples/udaddy.c       | 1 -
 librdmacm/rsocket.c               | 1 +
 providers/hfi1verbs/hfiverbs.h    | 1 -
 providers/ipathverbs/ipathverbs.h | 1 -
 providers/rxe/rxe.c               | 1 -
 srp_daemon/srp_daemon.c           | 1 -
 srp_daemon/srp_daemon.h           | 1 -
 srp_daemon/srp_handle_traps.c     | 1 -
 21 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/ibacm/linux/osd.h b/ibacm/linux/osd.h
index 4169ec54f0f38e..75eb2a327db1f0 100644
--- a/ibacm/linux/osd.h
+++ b/ibacm/linux/osd.h
@@ -37,7 +37,6 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
-#include <byteswap.h>
 #include <pthread.h>
 #include <sys/socket.h>
 #include <sys/types.h>
diff --git a/libibumad/sysfs.c b/libibumad/sysfs.c
index 9ef16fd9fa09f7..cacf69a07b1bf8 100644
--- a/libibumad/sysfs.c
+++ b/libibumad/sysfs.c
@@ -41,7 +41,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <byteswap.h>
 #include <netinet/in.h>
 #include "sysfs.h"
 
diff --git a/libibumad/umad.h b/libibumad/umad.h
index 1db450591401b2..d574d5d32e0d20 100644
--- a/libibumad/umad.h
+++ b/libibumad/umad.h
@@ -36,7 +36,6 @@
 
 #include <stdint.h>
 #include <stdlib.h>
-#include <byteswap.h>
 #include <arpa/inet.h>
 
 #ifdef __cplusplus
diff --git a/libibverbs/arch.h b/libibverbs/arch.h
index bf0feec08d7357..1c90c26d6f721d 100644
--- a/libibverbs/arch.h
+++ b/libibverbs/arch.h
@@ -35,7 +35,6 @@
 
 #include <stdint.h>
 #include <endian.h>
-#include <byteswap.h>
 
 #undef htonll
 #undef ntohll
diff --git a/libibverbs/examples/asyncwatch.c b/libibverbs/examples/asyncwatch.c
index f2234e3e540159..724796e58a7cad 100644
--- a/libibverbs/examples/asyncwatch.c
+++ b/libibverbs/examples/asyncwatch.c
@@ -34,7 +34,6 @@
 
 #include <stdio.h>
 #include <endian.h>
-#include <byteswap.h>
 #include <getopt.h>
 #include <string.h>
 
diff --git a/libibverbs/examples/device_list.c b/libibverbs/examples/device_list.c
index 084ede597af026..f5602ca1906842 100644
--- a/libibverbs/examples/device_list.c
+++ b/libibverbs/examples/device_list.c
@@ -35,7 +35,6 @@
 #include <stdio.h>
 
 #include <endian.h>
-#include <byteswap.h>
 
 #include <infiniband/verbs.h>
 
diff --git a/libibverbs/examples/devinfo.c b/libibverbs/examples/devinfo.c
index cf34803d44b374..2eeaec85962b5a 100644
--- a/libibverbs/examples/devinfo.c
+++ b/libibverbs/examples/devinfo.c
@@ -40,7 +40,6 @@
 #include <getopt.h>
 #include <netinet/in.h>
 #include <endian.h>
-#include <byteswap.h>
 #include <inttypes.h>
 
 #include <infiniband/verbs.h>
diff --git a/librdmacm/cma.c b/librdmacm/cma.c
index 0c742845dde8d6..218c1347f79e2e 100644
--- a/librdmacm/cma.c
+++ b/librdmacm/cma.c
@@ -43,7 +43,6 @@
 #include <unistd.h>
 #include <pthread.h>
 #include <endian.h>
-#include <byteswap.h>
 #include <stddef.h>
 #include <netdb.h>
 #include <syslog.h>
diff --git a/librdmacm/cma.h b/librdmacm/cma.h
index 2e7c4182e7d98e..8795d2894d262f 100644
--- a/librdmacm/cma.h
+++ b/librdmacm/cma.h
@@ -39,7 +39,6 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <endian.h>
-#include <byteswap.h>
 #include <semaphore.h>
 
 #include <rdma/rdma_cma.h>
diff --git a/librdmacm/examples/cmatose.c b/librdmacm/examples/cmatose.c
index d9b6ca62239350..68bd015edf6cde 100644
--- a/librdmacm/examples/cmatose.c
+++ b/librdmacm/examples/cmatose.c
@@ -40,7 +40,6 @@
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <netdb.h>
-#include <byteswap.h>
 #include <getopt.h>
 
 #include <rdma/rdma_cma.h>
diff --git a/librdmacm/examples/common.c b/librdmacm/examples/common.c
index 8037dd830fa805..4f92e764743108 100644
--- a/librdmacm/examples/common.c
+++ b/librdmacm/examples/common.c
@@ -40,7 +40,6 @@
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <netdb.h>
-#include <byteswap.h>
 
 #include <rdma/rdma_cma.h>
 #include "common.h"
diff --git a/librdmacm/examples/mckey.c b/librdmacm/examples/mckey.c
index 2032aa99424234..306dde9e46aaa2 100644
--- a/librdmacm/examples/mckey.c
+++ b/librdmacm/examples/mckey.c
@@ -41,7 +41,6 @@
 #include <arpa/inet.h>
 #include <sys/socket.h>
 #include <netdb.h>
-#include <byteswap.h>
 #include <unistd.h>
 #include <getopt.h>
 
diff --git a/librdmacm/examples/rping.c b/librdmacm/examples/rping.c
index c56b6ef3010f53..6bcc92ad10619c 100644
--- a/librdmacm/examples/rping.c
+++ b/librdmacm/examples/rping.c
@@ -40,7 +40,6 @@
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <netdb.h>
-#include <byteswap.h>
 #include <semaphore.h>
 #include <arpa/inet.h>
 #include <pthread.h>
diff --git a/librdmacm/examples/udaddy.c b/librdmacm/examples/udaddy.c
index af0d6f713ed183..5fae212c2d4636 100644
--- a/librdmacm/examples/udaddy.c
+++ b/librdmacm/examples/udaddy.c
@@ -40,7 +40,6 @@
 #include <netinet/in.h>
 #include <sys/socket.h>
 #include <netdb.h>
-#include <byteswap.h>
 #include <getopt.h>
 
 #include <rdma/rdma_cma.h>
diff --git a/librdmacm/rsocket.c b/librdmacm/rsocket.c
index e2e29a30eb59ed..9838384dd78bc0 100644
--- a/librdmacm/rsocket.c
+++ b/librdmacm/rsocket.c
@@ -47,6 +47,7 @@
 #include <netinet/tcp.h>
 #include <sys/epoll.h>
 #include <search.h>
+#include <byteswap.h>
 
 #include <rdma/rdma_cma.h>
 #include <rdma/rdma_verbs.h>
diff --git a/providers/hfi1verbs/hfiverbs.h b/providers/hfi1verbs/hfiverbs.h
index af93dc43e059d9..194db8350dac6f 100644
--- a/providers/hfi1verbs/hfiverbs.h
+++ b/providers/hfi1verbs/hfiverbs.h
@@ -59,7 +59,6 @@
 #define HFI1_H
 
 #include <endian.h>
-#include <byteswap.h>
 #include <pthread.h>
 #include <stddef.h>
 #include <stdatomic.h>
diff --git a/providers/ipathverbs/ipathverbs.h b/providers/ipathverbs/ipathverbs.h
index ebd2dcfbc413a9..b036c69a4158b3 100644
--- a/providers/ipathverbs/ipathverbs.h
+++ b/providers/ipathverbs/ipathverbs.h
@@ -39,7 +39,6 @@
 #define IPATH_H
 
 #include <endian.h>
-#include <byteswap.h>
 #include <pthread.h>
 #include <stddef.h>
 #include <stdatomic.h>
diff --git a/providers/rxe/rxe.c b/providers/rxe/rxe.c
index f2bf2cd37ed699..7fcd754b8058c1 100644
--- a/providers/rxe/rxe.c
+++ b/providers/rxe/rxe.c
@@ -45,7 +45,6 @@
 #include <errno.h>
 
 #include <endian.h>
-#include <byteswap.h>
 #include <pthread.h>
 #include <stddef.h>
 
diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c
index 19a1bfaeb22c88..8a3650f38c8af8 100644
--- a/srp_daemon/srp_daemon.c
+++ b/srp_daemon/srp_daemon.c
@@ -54,7 +54,6 @@
 #include <netinet/in.h>
 #include <linux/types.h>
 #include <endian.h>
-#include <byteswap.h>
 #include <errno.h>
 #include <getopt.h>
 #include <dirent.h>
diff --git a/srp_daemon/srp_daemon.h b/srp_daemon/srp_daemon.h
index 3de8ee0e9827cb..214b77a2a26b0a 100644
--- a/srp_daemon/srp_daemon.h
+++ b/srp_daemon/srp_daemon.h
@@ -39,7 +39,6 @@
 #include <stdint.h>
 #include <signal.h>
 #include <endian.h>
-#include <byteswap.h>
 #include <infiniband/verbs.h>
 #include <infiniband/umad.h>
 
diff --git a/srp_daemon/srp_handle_traps.c b/srp_daemon/srp_handle_traps.c
index 6a7a2d1ab479a1..c9f3d8a4ecff41 100644
--- a/srp_daemon/srp_handle_traps.c
+++ b/srp_daemon/srp_handle_traps.c
@@ -39,7 +39,6 @@
 #include <sys/time.h>
 #include <netinet/in.h>
 #include <endian.h>
-#include <byteswap.h>
 #include <time.h>
 #include <errno.h>
 #include <string.h>
-- 
2.7.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] 24+ messages in thread

* [PATCH rdma-core 06/10] mlx4: Remove include of asm/unistd.h
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (4 preceding siblings ...)
  2017-02-09 21:53   ` [PATCH rdma-core 05/10] Remove extraneous byteswap.h include Jason Gunthorpe
@ 2017-02-09 21:53   ` Jason Gunthorpe
  2017-02-09 21:53   ` [PATCH rdma-core 07/10] rdmacm: Remove dangling cpu_to_be64 definitions Jason Gunthorpe
                     ` (4 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

This header should never be included from userspace.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 providers/mlx4/mmio.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/providers/mlx4/mmio.h b/providers/mlx4/mmio.h
index f907661ddcf950..a1a296658fdbb0 100644
--- a/providers/mlx4/mmio.h
+++ b/providers/mlx4/mmio.h
@@ -4,7 +4,6 @@
 #define MMIO_H
 
 #include <unistd.h>
-#include <asm/unistd.h>
 #include <sys/syscall.h>
 #ifdef __s390x__
 
-- 
2.7.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] 24+ messages in thread

* [PATCH rdma-core 07/10] rdmacm: Remove dangling cpu_to_be64 definitions
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (5 preceding siblings ...)
  2017-02-09 21:53   ` [PATCH rdma-core 06/10] mlx4: Remove include of asm/unistd.h Jason Gunthorpe
@ 2017-02-09 21:53   ` Jason Gunthorpe
  2017-02-09 21:53   ` [PATCH rdma-core 08/10] umad: Replace htonll macros with proper inlines and mark deprecated Jason Gunthorpe
                     ` (3 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

No users.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 librdmacm/examples/common.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/librdmacm/examples/common.h b/librdmacm/examples/common.h
index 28b977a075e6f1..1e69f5091ad078 100644
--- a/librdmacm/examples/common.h
+++ b/librdmacm/examples/common.h
@@ -41,9 +41,6 @@
 #include <rdma/rsocket.h>
 #include <infiniband/ib.h>
 
-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;
 
 #define rs_socket(f,t,p)  use_rs ? rsocket(f,t,p)  : socket(f,t,p)
-- 
2.7.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] 24+ messages in thread

* [PATCH rdma-core 08/10] umad: Replace htonll macros with proper inlines and mark deprecated
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (6 preceding siblings ...)
  2017-02-09 21:53   ` [PATCH rdma-core 07/10] rdmacm: Remove dangling cpu_to_be64 definitions Jason Gunthorpe
@ 2017-02-09 21:53   ` Jason Gunthorpe
  2017-02-09 21:53   ` [PATCH rdma-core 09/10] Move the now private infiniband/arch.h to util/udma_barrier.h Jason Gunthorpe
                     ` (2 subsequent siblings)
  10 siblings, 0 replies; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

This allowed code using these public definitions to continue to compile
but will get warnings from gcc. Users should move to glibc's endian.h

We want to avoid new users of these macros in our tree.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libibumad/umad.h | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/libibumad/umad.h b/libibumad/umad.h
index d574d5d32e0d20..ee8605d3418fcd 100644
--- a/libibumad/umad.h
+++ b/libibumad/umad.h
@@ -229,14 +229,13 @@ static inline void umad_free(void *umad)
 }
 
 #ifndef ntohll
-  #if __BYTE_ORDER == __LITTLE_ENDIAN
-    #define ntohll(x) bswap_64(x)
-  #elif __BYTE_ORDER == __BIG_ENDIAN
-    #define ntohll(x) x
-  #endif
-#endif
-#ifndef htonll
-  #define htonll ntohll
+#undef htonll
+#undef ntohll
+/* Users should use the glibc functions directly, not these wrappers */
+static inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); }
+static inline __attribute__((deprecated)) uint64_t ntohll(uint64_t x) { return be64toh(x); }
+#define htonll htonll
+#define ntohll ntohll
 #endif
 
 END_C_DECLS
-- 
2.7.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] 24+ messages in thread

* [PATCH rdma-core 09/10] Move the now private infiniband/arch.h to util/udma_barrier.h
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (7 preceding siblings ...)
  2017-02-09 21:53   ` [PATCH rdma-core 08/10] umad: Replace htonll macros with proper inlines and mark deprecated Jason Gunthorpe
@ 2017-02-09 21:53   ` Jason Gunthorpe
       [not found]     ` <1486677212-3188-10-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-02-09 21:53   ` [PATCH rdma-core 10/10] verbs: Add a compatibility arch.h Jason Gunthorpe
  2017-02-15  5:15   ` [PATCH rdma-core 00/10] Provide a compat infiniband/arch.h Leon Romanovsky
  10 siblings, 1 reply; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

This header now only contains the DMA barrier macros.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 CMakeLists.txt                 |   2 +-
 buildlib/travis-build          |   2 +-
 libibverbs/CMakeLists.txt      |   1 -
 libibverbs/arch.h              | 135 -----------------------------------------
 providers/cxgb3/iwch.h         |   2 +-
 providers/cxgb4/libcxgb4.h     |   2 +-
 providers/hns/hns_roce_u.h     |   2 +-
 providers/i40iw/i40iw_osdep.h  |   2 +-
 providers/i40iw/i40iw_uk.c     |   2 +
 providers/i40iw/i40iw_umain.h  |   2 +-
 providers/mlx4/mlx4.h          |   2 +-
 providers/mlx5/mlx5.h          |   2 +-
 providers/mthca/mthca.h        |   2 +-
 providers/nes/nes_umain.h      |   2 +-
 providers/ocrdma/ocrdma_main.h |   2 +-
 providers/qedr/qelr.h          |   2 +-
 providers/qedr/qelr_main.h     |   2 +-
 providers/qedr/qelr_verbs.h    |   2 +-
 providers/vmw_pvrdma/cq.c      |   2 +-
 providers/vmw_pvrdma/qp.c      |   2 +-
 util/CMakeLists.txt            |   1 +
 util/udma_barrier.h            | 125 ++++++++++++++++++++++++++++++++++++++
 22 files changed, 145 insertions(+), 153 deletions(-)
 delete mode 100644 libibverbs/arch.h
 create mode 100644 util/udma_barrier.h

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 45cbc4e018b296..009d133cf661a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -286,7 +286,7 @@ include(RDMA_LinuxHeaders)
 # arch specific property, but for our purposes arches that do not support it
 # also do not define wmb/etc which breaks our compile.
 CHECK_C_SOURCE_COMPILES("
-#include \"${CMAKE_CURRENT_SOURCE_DIR}/libibverbs/arch.h\"
+#include \"${CMAKE_CURRENT_SOURCE_DIR}/util/udma_barrier.h\"
  int main(int argc,const char *argv[]) {return 0;}"
   HAVE_COHERENT_DMA)
 
diff --git a/buildlib/travis-build b/buildlib/travis-build
index 4fb84e4e70690d..3fe5ff5876df46 100755
--- a/buildlib/travis-build
+++ b/buildlib/travis-build
@@ -26,7 +26,7 @@ ninja
 
 # Test with coherent DMA mode disabled (ie as would be on ARM32, etc)
 cd ../build-clang
-echo "#error Fail" >> ../libibverbs/arch.h
+echo "#error Fail" >> ../util/udma_barrier.h
 rm CMakeCache.txt
 CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
 ninja
diff --git a/libibverbs/CMakeLists.txt b/libibverbs/CMakeLists.txt
index 0c2eb87e2adbe1..7e18a1e3e71d5e 100644
--- a/libibverbs/CMakeLists.txt
+++ b/libibverbs/CMakeLists.txt
@@ -7,7 +7,6 @@ publish_headers(infiniband
   )
 
 publish_internal_headers(infiniband
-  arch.h
   driver.h
   marshall.h
   )
diff --git a/libibverbs/arch.h b/libibverbs/arch.h
deleted file mode 100644
index 1c90c26d6f721d..00000000000000
--- a/libibverbs/arch.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2005 Topspin Communications.  All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-#ifndef INFINIBAND_ARCH_H
-#define INFINIBAND_ARCH_H
-
-#include <stdint.h>
-#include <endian.h>
-
-#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
- * required to implement the following operations:
- *
- * mb() - memory barrier.  No loads or stores may be reordered across
- *     this macro by either the compiler or the CPU.
- * rmb() - read memory barrier.  No loads may be reordered across this
- *     macro by either the compiler or the CPU.
- * wmb() - write memory barrier.  No stores may be reordered across
- *     this macro by either the compiler or the CPU.
- * wc_wmb() - flush write combine buffers.  No write-combined writes
- *     will be reordered across this macro by either the compiler or
- *     the CPU.
- */
-
-#if defined(__i386__)
-
-#define mb()	 asm volatile("lock; addl $0,0(%%esp) " ::: "memory")
-#define rmb()	 mb()
-#define wmb()	 asm volatile("" ::: "memory")
-#define wc_wmb() mb()
-
-#elif defined(__x86_64__)
-
-/*
- * Only use lfence for mb() and rmb() because we don't care about
- * ordering against non-temporal stores (for now at least).
- */
-#define mb()	 asm volatile("lfence" ::: "memory")
-#define rmb()	 mb()
-#define wmb()	 asm volatile("" ::: "memory")
-#define wc_wmb() asm volatile("sfence" ::: "memory")
-
-#elif defined(__PPC64__)
-
-#define mb()	 asm volatile("sync" ::: "memory")
-#define rmb()	 asm volatile("lwsync" ::: "memory")
-#define wmb()	 mb()
-#define wc_wmb() wmb()
-
-#elif defined(__ia64__)
-
-#define mb()	 asm volatile("mf" ::: "memory")
-#define rmb()	 mb()
-#define wmb()	 mb()
-#define wc_wmb() asm volatile("fwb" ::: "memory")
-
-#elif defined(__PPC__)
-
-#define mb()	 asm volatile("sync" ::: "memory")
-#define rmb()	 mb()
-#define wmb()	 mb()
-#define wc_wmb() wmb()
-
-#elif defined(__sparc_v9__)
-
-#define mb()	 asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory")
-#define rmb()	 asm volatile("membar #LoadLoad" ::: "memory")
-#define wmb()	 asm volatile("membar #StoreStore" ::: "memory")
-#define wc_wmb() wmb()
-
-#elif defined(__sparc__)
-
-#define mb()	 asm volatile("" ::: "memory")
-#define rmb()	 mb()
-#define wmb()	 mb()
-#define wc_wmb() wmb()
-
-#elif defined(__s390x__)
-
-#define mb()	{ asm volatile("" : : : "memory"); }	/* for s390x */
-#define rmb()	mb()					/* for s390x */
-#define wmb()	mb()					/* for s390x */
-#define wc_wmb() wmb()					/* for s390x */
-
-#elif defined(__aarch64__)
-
-/* Perhaps dmb would be sufficient? Let us be conservative for now. */
-#define mb()	{ asm volatile("dsb sy" ::: "memory"); }
-#define rmb()	{ asm volatile("dsb ld" ::: "memory"); }
-#define wmb()	{ asm volatile("dsb st" ::: "memory"); }
-#define wc_wmb() wmb()
-
-#else
-
-#error No architecture specific memory barrier defines found!
-
-#endif
-
-#endif /* INFINIBAND_ARCH_H */
diff --git a/providers/cxgb3/iwch.h b/providers/cxgb3/iwch.h
index a27c5f884a1a92..9ea58b73036f43 100644
--- a/providers/cxgb3/iwch.h
+++ b/providers/cxgb3/iwch.h
@@ -37,7 +37,7 @@
 #include <stddef.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 
 #include "cxio_wr.h"
 
diff --git a/providers/cxgb4/libcxgb4.h b/providers/cxgb4/libcxgb4.h
index 3b756616f9b903..b64b33564c76e5 100644
--- a/providers/cxgb4/libcxgb4.h
+++ b/providers/cxgb4/libcxgb4.h
@@ -40,7 +40,7 @@
 #include <sys/errno.h>
 #include <sys/time.h>
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 #include <ccan/list.h>
 #include "t4.h"
 
diff --git a/providers/hns/hns_roce_u.h b/providers/hns/hns_roce_u.h
index 8483d349e4281b..cb2f26060711dd 100644
--- a/providers/hns/hns_roce_u.h
+++ b/providers/hns/hns_roce_u.h
@@ -37,7 +37,7 @@
 #include <util/compiler.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 #include <infiniband/verbs.h>
 #include <ccan/container_of.h>
 
diff --git a/providers/i40iw/i40iw_osdep.h b/providers/i40iw/i40iw_osdep.h
index e4e84e950c14bc..fddedf40dd8ae2 100644
--- a/providers/i40iw/i40iw_osdep.h
+++ b/providers/i40iw/i40iw_osdep.h
@@ -38,7 +38,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 #include <linux/types.h>
 typedef unsigned char u8;
 typedef unsigned long long u64;
diff --git a/providers/i40iw/i40iw_uk.c b/providers/i40iw/i40iw_uk.c
index ea3255f753e59d..d3e4fec7d8515b 100644
--- a/providers/i40iw/i40iw_uk.c
+++ b/providers/i40iw/i40iw_uk.c
@@ -32,6 +32,8 @@
 *
 *******************************************************************************/
 
+#include <stdint.h>
+
 #include "i40iw_osdep.h"
 #include "i40iw_status.h"
 #include "i40iw_d.h"
diff --git a/providers/i40iw/i40iw_umain.h b/providers/i40iw/i40iw_umain.h
index 4ca605797a9c04..1f86c8f90b10d9 100644
--- a/providers/i40iw/i40iw_umain.h
+++ b/providers/i40iw/i40iw_umain.h
@@ -41,7 +41,7 @@
 #include <util/compiler.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 
 #include "i40iw_osdep.h"
 #include "i40iw_d.h"
diff --git a/providers/mlx4/mlx4.h b/providers/mlx4/mlx4.h
index bde1b33db176bb..aae50a80926f95 100644
--- a/providers/mlx4/mlx4.h
+++ b/providers/mlx4/mlx4.h
@@ -39,7 +39,7 @@
 #include <util/compiler.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 #include <infiniband/verbs.h>
 
 #define MLX4_PORTS_NUM 2
diff --git a/providers/mlx5/mlx5.h b/providers/mlx5/mlx5.h
index 3f89f4be91c5f5..58d622620a1f7b 100644
--- a/providers/mlx5/mlx5.h
+++ b/providers/mlx5/mlx5.h
@@ -38,7 +38,7 @@
 #include <util/compiler.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 #include "mlx5-abi.h"
 #include <ccan/list.h>
 #include "bitmap.h"
diff --git a/providers/mthca/mthca.h b/providers/mthca/mthca.h
index b4b0b6a8a9d4ee..61ee92807fcb86 100644
--- a/providers/mthca/mthca.h
+++ b/providers/mthca/mthca.h
@@ -37,7 +37,7 @@
 #include <stddef.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 
 #include <valgrind/memcheck.h>
 
diff --git a/providers/nes/nes_umain.h b/providers/nes/nes_umain.h
index c10c4fe0b3eb3d..6a4366802db209 100644
--- a/providers/nes/nes_umain.h
+++ b/providers/nes/nes_umain.h
@@ -40,7 +40,7 @@
 #include <util/compiler.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 
 #define PFX	"libnes: "
 
diff --git a/providers/ocrdma/ocrdma_main.h b/providers/ocrdma/ocrdma_main.h
index b8be6e514c72c7..6c74545d08df2d 100644
--- a/providers/ocrdma/ocrdma_main.h
+++ b/providers/ocrdma/ocrdma_main.h
@@ -40,7 +40,7 @@
 #include <endian.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 
 #include <ccan/list.h>
 
diff --git a/providers/qedr/qelr.h b/providers/qedr/qelr.h
index e2a92489d2c147..e887d9f8e4713a 100644
--- a/providers/qedr/qelr.h
+++ b/providers/qedr/qelr.h
@@ -39,7 +39,7 @@
 #include <ccan/minmax.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 
 #define writel(b, p) (*(uint32_t *)(p) = (b))
 #define writeq(b, p) (*(uint64_t *)(p) = (b))
diff --git a/providers/qedr/qelr_main.h b/providers/qedr/qelr_main.h
index 1f65be6156db7c..88d52b7aed2b66 100644
--- a/providers/qedr/qelr_main.h
+++ b/providers/qedr/qelr_main.h
@@ -38,7 +38,7 @@
 #include <endian.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 
 struct ibv_device *qelr_driver_init(const char *, int);
 
diff --git a/providers/qedr/qelr_verbs.h b/providers/qedr/qelr_verbs.h
index b73ae9e0adac34..28ad18c8885e46 100644
--- a/providers/qedr/qelr_verbs.h
+++ b/providers/qedr/qelr_verbs.h
@@ -38,7 +38,7 @@
 #include <endian.h>
 
 #include <infiniband/driver.h>
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 
 int qelr_query_device(struct ibv_context *context,
 		      struct ibv_device_attr *attr);
diff --git a/providers/vmw_pvrdma/cq.c b/providers/vmw_pvrdma/cq.c
index 0c7dcf67b54d30..f24d80742678bd 100644
--- a/providers/vmw_pvrdma/cq.c
+++ b/providers/vmw_pvrdma/cq.c
@@ -43,7 +43,7 @@
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 
 #include "pvrdma.h"
 
diff --git a/providers/vmw_pvrdma/qp.c b/providers/vmw_pvrdma/qp.c
index 1b013592304d01..d2e2189fda6de4 100644
--- a/providers/vmw_pvrdma/qp.c
+++ b/providers/vmw_pvrdma/qp.c
@@ -43,7 +43,7 @@
  * OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <infiniband/arch.h>
+#include <util/udma_barrier.h>
 
 #include "pvrdma.h"
 
diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt
index c0ad5861d189ee..71e33ac3baaa9b 100644
--- a/util/CMakeLists.txt
+++ b/util/CMakeLists.txt
@@ -1,4 +1,5 @@
 publish_internal_headers(util
   compiler.h
+  udma_barrier.h
   util.h
   )
diff --git a/util/udma_barrier.h b/util/udma_barrier.h
new file mode 100644
index 00000000000000..57ab0f76cbe33e
--- /dev/null
+++ b/util/udma_barrier.h
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2005 Topspin Communications.  All rights reserved.
+ *
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef __UTIL_UDMA_BARRIER_H
+#define __UTIL_UDMA_BARRIER_H
+
+/*
+ * Architecture-specific defines.  Currently, an architecture is
+ * required to implement the following operations:
+ *
+ * mb() - memory barrier.  No loads or stores may be reordered across
+ *     this macro by either the compiler or the CPU.
+ * rmb() - read memory barrier.  No loads may be reordered across this
+ *     macro by either the compiler or the CPU.
+ * wmb() - write memory barrier.  No stores may be reordered across
+ *     this macro by either the compiler or the CPU.
+ * wc_wmb() - flush write combine buffers.  No write-combined writes
+ *     will be reordered across this macro by either the compiler or
+ *     the CPU.
+ */
+
+#if defined(__i386__)
+
+#define mb()	 asm volatile("lock; addl $0,0(%%esp) " ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 asm volatile("" ::: "memory")
+#define wc_wmb() mb()
+
+#elif defined(__x86_64__)
+
+/*
+ * Only use lfence for mb() and rmb() because we don't care about
+ * ordering against non-temporal stores (for now at least).
+ */
+#define mb()	 asm volatile("lfence" ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 asm volatile("" ::: "memory")
+#define wc_wmb() asm volatile("sfence" ::: "memory")
+
+#elif defined(__PPC64__)
+
+#define mb()	 asm volatile("sync" ::: "memory")
+#define rmb()	 asm volatile("lwsync" ::: "memory")
+#define wmb()	 mb()
+#define wc_wmb() wmb()
+
+#elif defined(__ia64__)
+
+#define mb()	 asm volatile("mf" ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 mb()
+#define wc_wmb() asm volatile("fwb" ::: "memory")
+
+#elif defined(__PPC__)
+
+#define mb()	 asm volatile("sync" ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 mb()
+#define wc_wmb() wmb()
+
+#elif defined(__sparc_v9__)
+
+#define mb()	 asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory")
+#define rmb()	 asm volatile("membar #LoadLoad" ::: "memory")
+#define wmb()	 asm volatile("membar #StoreStore" ::: "memory")
+#define wc_wmb() wmb()
+
+#elif defined(__sparc__)
+
+#define mb()	 asm volatile("" ::: "memory")
+#define rmb()	 mb()
+#define wmb()	 mb()
+#define wc_wmb() wmb()
+
+#elif defined(__s390x__)
+
+#define mb()	{ asm volatile("" : : : "memory"); }	/* for s390x */
+#define rmb()	mb()					/* for s390x */
+#define wmb()	mb()					/* for s390x */
+#define wc_wmb() wmb()					/* for s390x */
+
+#elif defined(__aarch64__)
+
+/* Perhaps dmb would be sufficient? Let us be conservative for now. */
+#define mb()	{ asm volatile("dsb sy" ::: "memory"); }
+#define rmb()	{ asm volatile("dsb ld" ::: "memory"); }
+#define wmb()	{ asm volatile("dsb st" ::: "memory"); }
+#define wc_wmb() wmb()
+
+#else
+
+#error No architecture specific memory barrier defines found!
+
+#endif
+
+#endif
-- 
2.7.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] 24+ messages in thread

* [PATCH rdma-core 10/10] verbs: Add a compatibility arch.h
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (8 preceding siblings ...)
  2017-02-09 21:53   ` [PATCH rdma-core 09/10] Move the now private infiniband/arch.h to util/udma_barrier.h Jason Gunthorpe
@ 2017-02-09 21:53   ` Jason Gunthorpe
       [not found]     ` <1486677212-3188-11-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-02-15  5:15   ` [PATCH rdma-core 00/10] Provide a compat infiniband/arch.h Leon Romanovsky
  10 siblings, 1 reply; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-09 21:53 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

There is a bit of software out there that includes arch.h to get the
swap macros. Continue to provider a header that serves that purpose
but emit warnings when it is used.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
 libibverbs/CMakeLists.txt |  1 +
 libibverbs/arch.h         | 51 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100644 libibverbs/arch.h

diff --git a/libibverbs/CMakeLists.txt b/libibverbs/CMakeLists.txt
index 7e18a1e3e71d5e..7a52eddc810911 100644
--- a/libibverbs/CMakeLists.txt
+++ b/libibverbs/CMakeLists.txt
@@ -1,4 +1,5 @@
 publish_headers(infiniband
+  arch.h
   kern-abi.h
   opcode.h
   sa-kern-abi.h
diff --git a/libibverbs/arch.h b/libibverbs/arch.h
new file mode 100644
index 00000000000000..bcbece8f2c521c
--- /dev/null
+++ b/libibverbs/arch.h
@@ -0,0 +1,51 @@
+/*
+ * This software is available to you under a choice of one of two
+ * licenses.  You may choose to be licensed under the terms of the GNU
+ * General Public License (GPL) Version 2, available from the file
+ * COPYING in the main directory of this source tree, or the
+ * OpenIB.org BSD license below:
+ *
+ *     Redistribution and use in source and binary forms, with or
+ *     without modification, are permitted provided that the following
+ *     conditions are met:
+ *
+ *      - Redistributions of source code must retain the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer.
+ *
+ *      - Redistributions in binary form must reproduce the above
+ *        copyright notice, this list of conditions and the following
+ *        disclaimer in the documentation and/or other materials
+ *        provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+#ifndef INFINIBAND_ARCH_H
+#define INFINIBAND_ARCH_H
+
+#include <stdint.h>
+#include <endian.h>
+
+#warning "This header is obsolete."
+
+#ifndef ntohll
+#undef htonll
+#undef ntohll
+/* Users should use the glibc functions directly, not these wrappers */
+static inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); }
+static inline __attribute__((deprecated)) uint64_t ntohll(uint64_t x) { return be64toh(x); }
+#define htonll htonll
+#define ntohll ntohll
+#endif
+
+/* Barrier macros are no longer provided by libibverbs */
+
+#endif /* INFINIBAND_ARCH_H */
-- 
2.7.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] 24+ messages in thread

* RE: [PATCH rdma-core 04/10] Do not use kernel byteswap macros
       [not found]     ` <1486677212-3188-5-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-02-09 22:23       ` Steve Wise
  0 siblings, 0 replies; 24+ messages in thread
From: Steve Wise @ 2017-02-09 22:23 UTC (permalink / raw)
  To: 'Jason Gunthorpe', linux-rdma-u79uwXL29TY76Z2rM5mHXA

> 
> These days the version in glibc's endian.h is just as good, since
> gcc 4.3 (we support no earlier compiler) this just boils down to
> __builtin_bswap which is a constant expression if the input is constant.
> 
> Done via
> 
> $ git ls-files | xargs sed -i -e 's/__constant_cpu_to_be64/htobe64/g'
> $ git ls-files | xargs sed -i -e 's/__cpu_to_be64/htobe64/g'
> $ git ls-files | xargs sed -i -e 's/__be64_to_cpu/be64toh/g'
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  iwpmd/iwarp_pm_common.c   | 5 +++--
>  libibcm/cm.h              | 6 +++---
>  libibcm/examples/cmpost.c | 7 +++----
>  3 files changed, 9 insertions(+), 9 deletions(-)

iwpmd parts look fine.

Reviewed-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] 24+ messages in thread

* RE: [PATCH rdma-core 02/10] Remove uses of htonll
       [not found]     ` <1486677212-3188-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-02-09 22:23       ` Steve Wise
  2017-02-12  8:26       ` Amrani, Ram
  1 sibling, 0 replies; 24+ messages in thread
From: Steve Wise @ 2017-02-09 22:23 UTC (permalink / raw)
  To: 'Jason Gunthorpe', linux-rdma-u79uwXL29TY76Z2rM5mHXA

> Subject: [PATCH rdma-core 02/10] Remove uses of htonll
> 
> Done via
> 
> $ git ls-files | xargs sed -i -e 's/htonll/htobe64/g'
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  ibacm/include/acm_mad.h       | 84
+++++++++++++++++++++----------------------
>  ibacm/prov/acmp/src/acmp.c    | 10 +++---
>  ibacm/src/acm.c               |  6 ++--
>  providers/cxgb3/cxio_wr.h     |  2 +-
>  providers/cxgb3/qp.c          | 12 +++----
>  providers/cxgb4/t4.h          |  2 +-
>  providers/mlx4/qp.c           | 12 +++----
>  providers/mlx4/srq.c          |  2 +-
>  providers/mlx5/qp.c           | 24 ++++++-------
>  providers/mlx5/srq.c          |  2 +-
>  providers/mthca/qp.c          | 34 +++++++++---------
>  providers/mthca/srq.c         |  4 +--
>  providers/qedr/qelr_verbs.c   |  2 +-
>  srp_daemon/srp_daemon.c       | 16 ++++-----
>  srp_daemon/srp_handle_traps.c |  4 +--
>  15 files changed, 108 insertions(+), 108 deletions(-)

cxgb* parts look fine.

Reviewed-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] 24+ messages in thread

* RE: [PATCH rdma-core 03/10] Remove uses of ntohll
       [not found]     ` <1486677212-3188-4-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-02-09 22:24       ` Steve Wise
  0 siblings, 0 replies; 24+ messages in thread
From: Steve Wise @ 2017-02-09 22:24 UTC (permalink / raw)
  To: 'Jason Gunthorpe', linux-rdma-u79uwXL29TY76Z2rM5mHXA

> Subject: [PATCH rdma-core 03/10] Remove uses of ntohll
> 
> Done via
> 
> $ git ls-files | xargs sed -i -e 's/ntohll/be64toh/g'
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  ibacm/prov/acmp/src/acmp.c |  2 +-
>  providers/cxgb4/dev.c      |  4 ++--
>  providers/cxgb4/t4.h       |  2 +-
>  providers/mlx5/cq.c        |  2 +-
>  providers/mlx5/qp.c        |  4 ++--
>  providers/mlx5/srq.c       |  2 +-
>  srp_daemon/srp_daemon.c    | 26 +++++++++++++-------------
>  7 files changed, 21 insertions(+), 21 deletions(-)
> 

cxgb* parts look fine.

Reviewed-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] 24+ messages in thread

* RE: [PATCH rdma-core 09/10] Move the now private infiniband/arch.h to util/udma_barrier.h
       [not found]     ` <1486677212-3188-10-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-02-09 22:25       ` Steve Wise
  2017-02-12  8:28       ` Amrani, Ram
  1 sibling, 0 replies; 24+ messages in thread
From: Steve Wise @ 2017-02-09 22:25 UTC (permalink / raw)
  To: 'Jason Gunthorpe', linux-rdma-u79uwXL29TY76Z2rM5mHXA

> To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: [PATCH rdma-core 09/10] Move the now private infiniband/arch.h to
> util/udma_barrier.h
> 
> This header now only contains the DMA barrier macros.
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  CMakeLists.txt                 |   2 +-
>  buildlib/travis-build          |   2 +-
>  libibverbs/CMakeLists.txt      |   1 -
>  libibverbs/arch.h              | 135
-----------------------------------------
>  providers/cxgb3/iwch.h         |   2 +-
>  providers/cxgb4/libcxgb4.h     |   2 +-
>  providers/hns/hns_roce_u.h     |   2 +-
>  providers/i40iw/i40iw_osdep.h  |   2 +-
>  providers/i40iw/i40iw_uk.c     |   2 +
>  providers/i40iw/i40iw_umain.h  |   2 +-
>  providers/mlx4/mlx4.h          |   2 +-
>  providers/mlx5/mlx5.h          |   2 +-
>  providers/mthca/mthca.h        |   2 +-
>  providers/nes/nes_umain.h      |   2 +-
>  providers/ocrdma/ocrdma_main.h |   2 +-
>  providers/qedr/qelr.h          |   2 +-
>  providers/qedr/qelr_main.h     |   2 +-
>  providers/qedr/qelr_verbs.h    |   2 +-
>  providers/vmw_pvrdma/cq.c      |   2 +-
>  providers/vmw_pvrdma/qp.c      |   2 +-
>  util/CMakeLists.txt            |   1 +
>  util/udma_barrier.h            | 125 ++++++++++++++++++++++++++++++++++++++
>  22 files changed, 145 insertions(+), 153 deletions(-)
>  delete mode 100644 libibverbs/arch.h
>  create mode 100644 util/udma_barrier.h
> 

cxgb* parts look fine.

Reviewed-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] 24+ messages in thread

* RE: [PATCH rdma-core 02/10] Remove uses of htonll
       [not found]     ` <1486677212-3188-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-02-09 22:23       ` Steve Wise
@ 2017-02-12  8:26       ` Amrani, Ram
  1 sibling, 0 replies; 24+ messages in thread
From: Amrani, Ram @ 2017-02-12  8:26 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA

> 
> Done via
> 
> $ git ls-files | xargs sed -i -e 's/htonll/htobe64/g'
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  ibacm/include/acm_mad.h       | 84 +++++++++++++++++++++----------------------
>  ibacm/prov/acmp/src/acmp.c    | 10 +++---
>  ibacm/src/acm.c               |  6 ++--
>  providers/cxgb3/cxio_wr.h     |  2 +-
>  providers/cxgb3/qp.c          | 12 +++----
>  providers/cxgb4/t4.h          |  2 +-
>  providers/mlx4/qp.c           | 12 +++----
>  providers/mlx4/srq.c          |  2 +-
>  providers/mlx5/qp.c           | 24 ++++++-------
>  providers/mlx5/srq.c          |  2 +-
>  providers/mthca/qp.c          | 34 +++++++++---------
>  providers/mthca/srq.c         |  4 +--
>  providers/qedr/qelr_verbs.c   |  2 +-
>  srp_daemon/srp_daemon.c       | 16 ++++-----
>  srp_daemon/srp_handle_traps.c |  4 +--
>  15 files changed, 108 insertions(+), 108 deletions(-)
> 
> diff --git a/ibacm/include/acm_mad.h b/ibacm/include/acm_mad.h
> index 68e231bc6680ca..f237ef6fde563c 100644
> --- a/ibacm/include/acm_mad.h
> +++ b/ibacm/include/acm_mad.h
> @@ -121,52 +121,52 @@ struct ib_sa_mad {
> 
>  #define IB_SA_ATTR_PATH_REC htons(0x0035)
> 
> -#define IB_COMP_MASK_PR_SERVICE_ID         (htonll(1 << 0) | \
> -                                            htonll(1 << 1))
> -#define IB_COMP_MASK_PR_DGID                htonll(1 << 2)
> -#define IB_COMP_MASK_PR_SGID                htonll(1 << 3)
> -#define IB_COMP_MASK_PR_DLID                htonll(1 << 4)
> -#define IB_COMP_MASK_PR_SLID                htonll(1 << 5)
> -#define IB_COMP_MASK_PR_RAW_TRAFFIC         htonll(1 << 6)
> -/* RESERVED                                 htonll(1 << 7) */
> -#define IB_COMP_MASK_PR_FLOW_LABEL          htonll(1 << 8)
> -#define IB_COMP_MASK_PR_HOP_LIMIT           htonll(1 << 9)
> -#define IB_COMP_MASK_PR_TCLASS              htonll(1 << 10)
> -#define IB_COMP_MASK_PR_REVERSIBLE          htonll(1 << 11)
> -#define IB_COMP_MASK_PR_NUM_PATH            htonll(1 << 12)
> -#define IB_COMP_MASK_PR_PKEY                htonll(1 << 13)
> -#define IB_COMP_MASK_PR_QOS_CLASS           htonll(1 << 14)
> -#define IB_COMP_MASK_PR_SL                  htonll(1 << 15)
> -#define IB_COMP_MASK_PR_MTU_SELECTOR        htonll(1 << 16)
> -#define IB_COMP_MASK_PR_MTU                 htonll(1 << 17)
> -#define IB_COMP_MASK_PR_RATE_SELECTOR       htonll(1 << 18)
> -#define IB_COMP_MASK_PR_RATE                htonll(1 << 19)
> -#define IB_COMP_MASK_PR_PACKET_LIFETIME_SELECTOR htonll(1 << 20)
> -#define IB_COMP_MASK_PR_PACKET_LIFETIME     htonll(1 << 21)
> -#define IB_COMP_MASK_PR_PREFERENCE          htonll(1 << 22)
> -/* RESERVED                                 htonll(1 << 23) */
> +#define IB_COMP_MASK_PR_SERVICE_ID         (htobe64(1 << 0) | \
> +                                            htobe64(1 << 1))
> +#define IB_COMP_MASK_PR_DGID                htobe64(1 << 2)
> +#define IB_COMP_MASK_PR_SGID                htobe64(1 << 3)
> +#define IB_COMP_MASK_PR_DLID                htobe64(1 << 4)
> +#define IB_COMP_MASK_PR_SLID                htobe64(1 << 5)
> +#define IB_COMP_MASK_PR_RAW_TRAFFIC         htobe64(1 << 6)
> +/* RESERVED                                 htobe64(1 << 7) */
> +#define IB_COMP_MASK_PR_FLOW_LABEL          htobe64(1 << 8)
> +#define IB_COMP_MASK_PR_HOP_LIMIT           htobe64(1 << 9)
> +#define IB_COMP_MASK_PR_TCLASS              htobe64(1 << 10)
> +#define IB_COMP_MASK_PR_REVERSIBLE          htobe64(1 << 11)
> +#define IB_COMP_MASK_PR_NUM_PATH            htobe64(1 << 12)
> +#define IB_COMP_MASK_PR_PKEY                htobe64(1 << 13)
> +#define IB_COMP_MASK_PR_QOS_CLASS           htobe64(1 << 14)
> +#define IB_COMP_MASK_PR_SL                  htobe64(1 << 15)
> +#define IB_COMP_MASK_PR_MTU_SELECTOR        htobe64(1 << 16)
> +#define IB_COMP_MASK_PR_MTU                 htobe64(1 << 17)
> +#define IB_COMP_MASK_PR_RATE_SELECTOR       htobe64(1 << 18)
> +#define IB_COMP_MASK_PR_RATE                htobe64(1 << 19)
> +#define IB_COMP_MASK_PR_PACKET_LIFETIME_SELECTOR htobe64(1 << 20)
> +#define IB_COMP_MASK_PR_PACKET_LIFETIME     htobe64(1 << 21)
> +#define IB_COMP_MASK_PR_PREFERENCE          htobe64(1 << 22)
> +/* RESERVED                                 htobe64(1 << 23) */
> 
>  #define IB_MC_QPN 0xffffff
>  #define IB_SA_ATTR_MC_MEMBER_REC htons(0x0038)
> 
> -#define IB_COMP_MASK_MC_MGID                htonll(1 << 0)
> -#define IB_COMP_MASK_MC_PORT_GID            htonll(1 << 1)
> -#define IB_COMP_MASK_MC_QKEY                htonll(1 << 2)
> -#define IB_COMP_MASK_MC_MLID                htonll(1 << 3)
> -#define IB_COMP_MASK_MC_MTU_SEL             htonll(1 << 4)
> -#define IB_COMP_MASK_MC_MTU                 htonll(1 << 5)
> -#define IB_COMP_MASK_MC_TCLASS              htonll(1 << 6)
> -#define IB_COMP_MASK_MC_PKEY                htonll(1 << 7)
> -#define IB_COMP_MASK_MC_RATE_SEL            htonll(1 << 8)
> -#define IB_COMP_MASK_MC_RATE                htonll(1 << 9)
> -#define IB_COMP_MASK_MC_PACKET_LIFETIME_SEL htonll(1 << 10)
> -#define IB_COMP_MASK_MC_PACKET_LIFETIME     htonll(1 << 11)
> -#define IB_COMP_MASK_MC_SL                  htonll(1 << 12)
> -#define IB_COMP_MASK_MC_FLOW                htonll(1 << 13)
> -#define IB_COMP_MASK_MC_HOP                 htonll(1 << 14)
> -#define IB_COMP_MASK_MC_SCOPE               htonll(1 << 15)
> -#define IB_COMP_MASK_MC_JOIN_STATE          htonll(1 << 16)
> -#define IB_COMP_MASK_MC_PROXY_JOIN          htonll(1 << 17)
> +#define IB_COMP_MASK_MC_MGID                htobe64(1 << 0)
> +#define IB_COMP_MASK_MC_PORT_GID            htobe64(1 << 1)
> +#define IB_COMP_MASK_MC_QKEY                htobe64(1 << 2)
> +#define IB_COMP_MASK_MC_MLID                htobe64(1 << 3)
> +#define IB_COMP_MASK_MC_MTU_SEL             htobe64(1 << 4)
> +#define IB_COMP_MASK_MC_MTU                 htobe64(1 << 5)
> +#define IB_COMP_MASK_MC_TCLASS              htobe64(1 << 6)
> +#define IB_COMP_MASK_MC_PKEY                htobe64(1 << 7)
> +#define IB_COMP_MASK_MC_RATE_SEL            htobe64(1 << 8)
> +#define IB_COMP_MASK_MC_RATE                htobe64(1 << 9)
> +#define IB_COMP_MASK_MC_PACKET_LIFETIME_SEL htobe64(1 << 10)
> +#define IB_COMP_MASK_MC_PACKET_LIFETIME     htobe64(1 << 11)
> +#define IB_COMP_MASK_MC_SL                  htobe64(1 << 12)
> +#define IB_COMP_MASK_MC_FLOW                htobe64(1 << 13)
> +#define IB_COMP_MASK_MC_HOP                 htobe64(1 << 14)
> +#define IB_COMP_MASK_MC_SCOPE               htobe64(1 << 15)
> +#define IB_COMP_MASK_MC_JOIN_STATE          htobe64(1 << 16)
> +#define IB_COMP_MASK_MC_PROXY_JOIN          htobe64(1 << 17)
> 
>  struct ib_mc_member_rec {
>  	union ibv_gid mgid;
> diff --git a/ibacm/prov/acmp/src/acmp.c b/ibacm/prov/acmp/src/acmp.c
> index fb6684f2eac1f5..6b7cbb8c203478 100644
> --- a/ibacm/prov/acmp/src/acmp.c
> +++ b/ibacm/prov/acmp/src/acmp.c
> @@ -780,7 +780,7 @@ static void acmp_init_path_query(struct ib_sa_mad *mad)
>  	mad->mgmt_class = IB_MGMT_CLASS_SA;
>  	mad->class_version = 2;
>  	mad->method = IB_METHOD_GET;
> -	mad->tid = htonll((uint64_t) atomic_inc(&g_tid));
> +	mad->tid = htobe64((uint64_t) atomic_inc(&g_tid));
>  	mad->attr_id = IB_SA_ATTR_PATH_REC;
>  }
> 
> @@ -1367,7 +1367,7 @@ static void acmp_init_join(struct ib_sa_mad *mad, union ibv_gid *port_gid,
>  	mad->mgmt_class = IB_MGMT_CLASS_SA;
>  	mad->class_version = 2;
>  	mad->method = IB_METHOD_SET;
> -	mad->tid = htonll((uint64_t) atomic_inc(&g_tid));
> +	mad->tid = htobe64((uint64_t) atomic_inc(&g_tid));
>  	mad->attr_id = IB_SA_ATTR_MC_MEMBER_REC;
>  	mad->comp_mask =
>  		IB_COMP_MASK_MC_MGID | IB_COMP_MASK_MC_PORT_GID |
> @@ -1673,7 +1673,7 @@ acmp_send_resolve(struct acmp_ep *ep, struct acmp_dest *dest,
>  	mad->class_version = 1;
>  	mad->method = IB_METHOD_GET;
>  	mad->control = ACM_CTRL_RESOLVE;
> -	mad->tid = htonll((uint64_t) atomic_inc(&g_tid));
> +	mad->tid = htobe64((uint64_t) atomic_inc(&g_tid));
> 
>  	rec = (struct acm_resolve_rec *) mad->data;
>  	rec->src_type = (uint8_t) saddr->type;
> @@ -1957,7 +1957,7 @@ static void acmp_query_perf(void *ep_context, uint64_t *values, uint8_t *cnt)
>  	int i;
> 
>  	for (i = 0; i < ACM_MAX_COUNTER; i++)
> -		values[i] = htonll((uint64_t) atomic_get(&ep->counters[i]));
> +		values[i] = htobe64((uint64_t) atomic_get(&ep->counters[i]));
>  	*cnt = ACM_MAX_COUNTER;
>  }
> 
> @@ -2082,7 +2082,7 @@ static void acmp_parse_osm_fullv1_lid2guid(FILE *f, uint64_t *lid2guid)
>  		if (lid2guid[lid])
>  			acm_log(0, "ERROR - duplicate lid %u\n", lid);
>  		else
> -			lid2guid[lid] = htonll(guid);
> +			lid2guid[lid] = htobe64(guid);
>  	}
>  }
> 
> diff --git a/ibacm/src/acm.c b/ibacm/src/acm.c
> index fd06a2e81fbe76..2cf1ea8b2148c0 100644
> --- a/ibacm/src/acm.c
> +++ b/ibacm/src/acm.c
> @@ -1000,7 +1000,7 @@ static int acm_svr_perf_query(struct acmc_client *client, struct acm_msg *msg)
>  	    ((ntohs(msg->hdr.length) >= (ACM_MSG_HDR_LENGTH + ACM_MSG_EP_LENGTH)
>  	    && !(msg->resolve_data[0].flags & ACM_EP_FLAG_SOURCE)))) {
>  		for (i = 0; i < ACM_MAX_COUNTER; i++)
> -			msg->perf_data[i] = htonll((uint64_t) atomic_get(&counter[i]));
> +			msg->perf_data[i] = htobe64((uint64_t) atomic_get(&counter[i]));
> 
>  		msg->hdr.data[0] = ACM_MAX_COUNTER;
>  		len = ACM_MSG_HDR_LENGTH + (ACM_MAX_COUNTER * sizeof(uint64_t));
> @@ -1426,7 +1426,7 @@ static int acm_nl_parse_path_attr(struct nlattr *attr,
>  		sid = (uint64_t *) NLA_DATA(attr);
>  		if (NLA_LEN(attr) == sizeof(*sid)) {
>  			acm_log(2, "service_id 0x%" PRIx64 "\n", *sid);
> -			path->service_id = htonll(*sid);
> +			path->service_id = htobe64(*sid);
>  		} else {
>  			ret = -1;
>  		}
> @@ -2499,7 +2499,7 @@ static void acm_load_prov_config(void)
>  		acm_log(2, "provider %s subnet_prefix 0x%" PRIx64 "\n",
>  			prov_name, prefix);
>  		/* Convert it into network byte order */
> -		prefix = htonll(prefix);
> +		prefix = htobe64(prefix);
> 
>  		list_for_each(&provider_list, prov, entry) {
>  			if (!strcasecmp(prov->prov->name, prov_name)) {
> diff --git a/providers/cxgb3/cxio_wr.h b/providers/cxgb3/cxio_wr.h
> index d56c5298ebaad5..735b64918a15c8 100644
> --- a/providers/cxgb3/cxio_wr.h
> +++ b/providers/cxgb3/cxio_wr.h
> @@ -351,7 +351,7 @@ static inline void build_fw_riwrh(struct fw_riwrh *wqe, enum t3_wr_opcode op,
>  	wqe->gen_tid_len = htonl(V_FW_RIWR_GEN(genbit) | V_FW_RIWR_TID(tid) |
>  				 V_FW_RIWR_LEN(len));
>  	/* 2nd gen bit... */
> -        ((union t3_wr *)wqe)->flit[15] = htonll(genbit);
> +        ((union t3_wr *)wqe)->flit[15] = htobe64(genbit);
>  }
> 
>  /*
> diff --git a/providers/cxgb3/qp.c b/providers/cxgb3/qp.c
> index 30dd898f6e874b..b0cf10364e9a6c 100644
> --- a/providers/cxgb3/qp.c
> +++ b/providers/cxgb3/qp.c
> @@ -84,7 +84,7 @@ static inline int iwch_build_rdma_send(union t3_wr *wqe, struct ibv_send_wr *wr,
>  			    htonl(wr->sg_list[i].lkey);
>  			wqe->send.sgl[i].len =
>  			    htonl(wr->sg_list[i].length);
> -			wqe->send.sgl[i].to = htonll(wr->sg_list[i].addr);
> +			wqe->send.sgl[i].to = htobe64(wr->sg_list[i].addr);
>  		}
>  		wqe->send.plen = htonl(wqe->send.plen);
>  		wqe->send.num_sgle = htonl(wr->num_sge);
> @@ -104,7 +104,7 @@ static inline int iwch_build_rdma_write(union t3_wr *wqe,
>  	wqe->write.rdmaop = T3_RDMA_WRITE;
>  	wqe->write.reserved = 0;
>  	wqe->write.stag_sink = htonl(wr->wr.rdma.rkey);
> -	wqe->write.to_sink = htonll(wr->wr.rdma.remote_addr);
> +	wqe->write.to_sink = htobe64(wr->wr.rdma.remote_addr);
> 
>  	wqe->write.num_sgle = wr->num_sge;
> 
> @@ -139,7 +139,7 @@ static inline int iwch_build_rdma_write(union t3_wr *wqe,
>  			wqe->write.sgl[i].len =
>  			    htonl(wr->sg_list[i].length);
>  			wqe->write.sgl[i].to =
> -			    htonll(wr->sg_list[i].addr);
> +			    htobe64(wr->sg_list[i].addr);
>  		}
>  		wqe->write.plen = htonl(wqe->write.plen);
>  		wqe->write.num_sgle = htonl(wr->num_sge);
> @@ -157,10 +157,10 @@ static inline int iwch_build_rdma_read(union t3_wr *wqe, struct ibv_send_wr *wr,
>  	wqe->read.reserved = 0;
>  	if (wr->num_sge == 1 && wr->sg_list[0].length > 0) {
>  		wqe->read.rem_stag = htonl(wr->wr.rdma.rkey);
> -		wqe->read.rem_to = htonll(wr->wr.rdma.remote_addr);
> +		wqe->read.rem_to = htobe64(wr->wr.rdma.remote_addr);
>  		wqe->read.local_stag = htonl(wr->sg_list[0].lkey);
>  		wqe->read.local_len = htonl(wr->sg_list[0].length);
> -		wqe->read.local_to = htonll(wr->sg_list[0].addr);
> +		wqe->read.local_to = htobe64(wr->sg_list[0].addr);
>  	} else {
> 
>  		/* build passable 0B read request */
> @@ -295,7 +295,7 @@ static inline int iwch_build_rdma_recv(struct iwch_device *rhp,
>  	for (i = 0; i < wr->num_sge; i++) {
>  		wqe->recv.sgl[i].stag = htonl(wr->sg_list[i].lkey);
>  		wqe->recv.sgl[i].len = htonl(wr->sg_list[i].length);
> -		wqe->recv.sgl[i].to = htonll(wr->sg_list[i].addr);
> +		wqe->recv.sgl[i].to = htobe64(wr->sg_list[i].addr);
>  	}
>  	for (; i < T3_MAX_SGE; i++) {
>  		wqe->recv.sgl[i].stag = 0;
> diff --git a/providers/cxgb4/t4.h b/providers/cxgb4/t4.h
> index cad675c3fdb193..59dbc65d4e164b 100644
> --- a/providers/cxgb4/t4.h
> +++ b/providers/cxgb4/t4.h
> @@ -55,7 +55,7 @@
>  #define __iomem
>  #define cpu_to_be16 htons
>  #define cpu_to_be32 htonl
> -#define cpu_to_be64 htonll
> +#define cpu_to_be64 htobe64
>  #define be16_to_cpu ntohs
>  #define be32_to_cpu ntohl
>  #define be64_to_cpu ntohll
> diff --git a/providers/mlx4/qp.c b/providers/mlx4/qp.c
> index 268fb7dc83dd11..a607326c7c452c 100644
> --- a/providers/mlx4/qp.c
> +++ b/providers/mlx4/qp.c
> @@ -157,7 +157,7 @@ static inline void set_local_inv_seg(struct mlx4_wqe_local_inval_seg *iseg,
>  static inline void set_raddr_seg(struct mlx4_wqe_raddr_seg *rseg,
>  				 uint64_t remote_addr, uint32_t rkey)
>  {
> -	rseg->raddr    = htonll(remote_addr);
> +	rseg->raddr    = htobe64(remote_addr);
>  	rseg->rkey     = htonl(rkey);
>  	rseg->reserved = 0;
>  }
> @@ -165,10 +165,10 @@ static inline void set_raddr_seg(struct mlx4_wqe_raddr_seg *rseg,
>  static void set_atomic_seg(struct mlx4_wqe_atomic_seg *aseg, struct ibv_send_wr *wr)
>  {
>  	if (wr->opcode == IBV_WR_ATOMIC_CMP_AND_SWP) {
> -		aseg->swap_add = htonll(wr->wr.atomic.swap);
> -		aseg->compare  = htonll(wr->wr.atomic.compare_add);
> +		aseg->swap_add = htobe64(wr->wr.atomic.swap);
> +		aseg->compare  = htobe64(wr->wr.atomic.compare_add);
>  	} else {
> -		aseg->swap_add = htonll(wr->wr.atomic.compare_add);
> +		aseg->swap_add = htobe64(wr->wr.atomic.compare_add);
>  		aseg->compare  = 0;
>  	}
> 
> @@ -188,13 +188,13 @@ static void __set_data_seg(struct mlx4_wqe_data_seg *dseg, struct ibv_sge *sg)
>  {
>  	dseg->byte_count = htonl(sg->length);
>  	dseg->lkey       = htonl(sg->lkey);
> -	dseg->addr       = htonll(sg->addr);
> +	dseg->addr       = htobe64(sg->addr);
>  }
> 
>  static void set_data_seg(struct mlx4_wqe_data_seg *dseg, struct ibv_sge *sg)
>  {
>  	dseg->lkey       = htonl(sg->lkey);
> -	dseg->addr       = htonll(sg->addr);
> +	dseg->addr       = htobe64(sg->addr);
> 
>  	/*
>  	 * Need a barrier here before writing the byte_count field to
> diff --git a/providers/mlx4/srq.c b/providers/mlx4/srq.c
> index c0e028671828d8..4f90efdf927209 100644
> --- a/providers/mlx4/srq.c
> +++ b/providers/mlx4/srq.c
> @@ -96,7 +96,7 @@ int mlx4_post_srq_recv(struct ibv_srq *ibsrq,
>  		for (i = 0; i < wr->num_sge; ++i) {
>  			scat[i].byte_count = htonl(wr->sg_list[i].length);
>  			scat[i].lkey       = htonl(wr->sg_list[i].lkey);
> -			scat[i].addr       = htonll(wr->sg_list[i].addr);
> +			scat[i].addr       = htobe64(wr->sg_list[i].addr);
>  		}
> 
>  		if (i < srq->max_gs) {
> diff --git a/providers/mlx5/qp.c b/providers/mlx5/qp.c
> index e82b1a0bebc3f9..7d034880f4caf6 100644
> --- a/providers/mlx5/qp.c
> +++ b/providers/mlx5/qp.c
> @@ -190,7 +190,7 @@ static int mlx5_wq_overflow(struct mlx5_wq *wq, int nreq, struct mlx5_cq *cq)
>  static inline void set_raddr_seg(struct mlx5_wqe_raddr_seg *rseg,
>  				 uint64_t remote_addr, uint32_t rkey)
>  {
> -	rseg->raddr    = htonll(remote_addr);
> +	rseg->raddr    = htobe64(remote_addr);
>  	rseg->rkey     = htonl(rkey);
>  	rseg->reserved = 0;
>  }
> @@ -201,10 +201,10 @@ static void set_atomic_seg(struct mlx5_wqe_atomic_seg *aseg,
>  			   uint64_t compare_add)
>  {
>  	if (opcode == IBV_WR_ATOMIC_CMP_AND_SWP) {
> -		aseg->swap_add = htonll(swap);
> -		aseg->compare  = htonll(compare_add);
> +		aseg->swap_add = htobe64(swap);
> +		aseg->compare  = htobe64(compare_add);
>  	} else {
> -		aseg->swap_add = htonll(compare_add);
> +		aseg->swap_add = htobe64(compare_add);
>  	}
>  }
> 
> @@ -221,7 +221,7 @@ static void set_data_ptr_seg(struct mlx5_wqe_data_seg *dseg, struct ibv_sge *sg,
>  {
>  	dseg->byte_count = htonl(sg->length - offset);
>  	dseg->lkey       = htonl(sg->lkey);
> -	dseg->addr       = htonll(sg->addr + offset);
> +	dseg->addr       = htobe64(sg->addr + offset);
>  }
> 
>  static void set_data_ptr_seg_atomic(struct mlx5_wqe_data_seg *dseg,
> @@ -229,7 +229,7 @@ static void set_data_ptr_seg_atomic(struct mlx5_wqe_data_seg *dseg,
>  {
>  	dseg->byte_count = htonl(MLX5_ATOMIC_SIZE);
>  	dseg->lkey       = htonl(sg->lkey);
> -	dseg->addr       = htonll(sg->addr);
> +	dseg->addr       = htobe64(sg->addr);
>  }
> 
>  /*
> @@ -430,7 +430,7 @@ static void set_umr_data_seg(struct mlx5_qp *qp, enum ibv_mw_type type,
> 
>  	data->klm.byte_count = htonl(bind_info->length);
>  	data->klm.mkey = htonl(bind_info->mr->lkey);
> -	data->klm.address = htonll(bind_info->addr);
> +	data->klm.address = htobe64(bind_info->addr);
> 
>  	memset(&data->klm + 1, 0, sizeof(data->reserved) -
>  	       sizeof(data->klm));
> @@ -467,8 +467,8 @@ static void set_umr_mkey_seg(struct mlx5_qp *qp, enum ibv_mw_type type,
>  		if (bind_info->mw_access_flags & IBV_ACCESS_ZERO_BASED)
>  			mkey->start_addr = 0;
>  		else
> -			mkey->start_addr = htonll(bind_info->addr);
> -		mkey->len = htonll(bind_info->length);
> +			mkey->start_addr = htobe64(bind_info->addr);
> +		mkey->len = htobe64(bind_info->length);
>  	} else {
>  		mkey->free = MLX5_WQE_MKEY_CONTEXT_FREE;
>  	}
> @@ -485,20 +485,20 @@ static inline void set_umr_control_seg(struct mlx5_qp *qp, enum ibv_mw_type type
> 
>  	ctrl->flags = MLX5_WQE_UMR_CTRL_FLAG_TRNSLATION_OFFSET |
>  		MLX5_WQE_UMR_CTRL_FLAG_INLINE;
> -	ctrl->mkey_mask = htonll(MLX5_WQE_UMR_CTRL_MKEY_MASK_FREE |
> +	ctrl->mkey_mask = htobe64(MLX5_WQE_UMR_CTRL_MKEY_MASK_FREE |
>  				     MLX5_WQE_UMR_CTRL_MKEY_MASK_MKEY);
>  	ctrl->translation_offset = 0;
>  	memset(ctrl->rsvd0, 0, sizeof(ctrl->rsvd0));
>  	memset(ctrl->rsvd1, 0, sizeof(ctrl->rsvd1));
> 
>  	if (type == IBV_MW_TYPE_2)
> -		ctrl->mkey_mask |= htonll(MLX5_WQE_UMR_CTRL_MKEY_MASK_QPN);
> +		ctrl->mkey_mask |= htobe64(MLX5_WQE_UMR_CTRL_MKEY_MASK_QPN);
> 
>  	if (bind_info->length) {
>  		ctrl->klm_octowords = get_klm_octo(1);
>  		if (type == IBV_MW_TYPE_2)
>  			ctrl->flags |=  MLX5_WQE_UMR_CTRL_FLAG_CHECK_FREE;
> -		ctrl->mkey_mask |= htonll(MLX5_WQE_UMR_CTRL_MKEY_MASK_LEN	|
> +		ctrl->mkey_mask |= htobe64(MLX5_WQE_UMR_CTRL_MKEY_MASK_LEN	|
>  					      MLX5_WQE_UMR_CTRL_MKEY_MASK_START_ADDR |
>  					      MLX5_WQE_UMR_CTRL_MKEY_MASK_ACCESS_LOCAL_WRITE |
>  					      MLX5_WQE_UMR_CTRL_MKEY_MASK_ACCESS_REMOTE_READ |
> diff --git a/providers/mlx5/srq.c b/providers/mlx5/srq.c
> index a06afa3a5931b6..b362ec85724961 100644
> --- a/providers/mlx5/srq.c
> +++ b/providers/mlx5/srq.c
> @@ -120,7 +120,7 @@ int mlx5_post_srq_recv(struct ibv_srq *ibsrq,
>  		for (i = 0; i < wr->num_sge; ++i) {
>  			scat[i].byte_count = htonl(wr->sg_list[i].length);
>  			scat[i].lkey       = htonl(wr->sg_list[i].lkey);
> -			scat[i].addr       = htonll(wr->sg_list[i].addr);
> +			scat[i].addr       = htobe64(wr->sg_list[i].addr);
>  		}
> 
>  		if (i < srq->max_gs) {
> diff --git a/providers/mthca/qp.c b/providers/mthca/qp.c
> index 129e6c74ef5382..d221bb19bfa67c 100644
> --- a/providers/mthca/qp.c
> +++ b/providers/mthca/qp.c
> @@ -147,7 +147,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  			case IBV_WR_ATOMIC_CMP_AND_SWP:
>  			case IBV_WR_ATOMIC_FETCH_AND_ADD:
>  				((struct mthca_raddr_seg *) wqe)->raddr =
> -					htonll(wr->wr.atomic.remote_addr);
> +					htobe64(wr->wr.atomic.remote_addr);
>  				((struct mthca_raddr_seg *) wqe)->rkey =
>  					htonl(wr->wr.atomic.rkey);
>  				((struct mthca_raddr_seg *) wqe)->reserved = 0;
> @@ -156,12 +156,12 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
> 
>  				if (wr->opcode == IBV_WR_ATOMIC_CMP_AND_SWP) {
>  					((struct mthca_atomic_seg *) wqe)->swap_add =
> -						htonll(wr->wr.atomic.swap);
> +						htobe64(wr->wr.atomic.swap);
>  					((struct mthca_atomic_seg *) wqe)->compare =
> -						htonll(wr->wr.atomic.compare_add);
> +						htobe64(wr->wr.atomic.compare_add);
>  				} else {
>  					((struct mthca_atomic_seg *) wqe)->swap_add =
> -						htonll(wr->wr.atomic.compare_add);
> +						htobe64(wr->wr.atomic.compare_add);
>  					((struct mthca_atomic_seg *) wqe)->compare = 0;
>  				}
> 
> @@ -174,7 +174,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  			case IBV_WR_RDMA_WRITE_WITH_IMM:
>  			case IBV_WR_RDMA_READ:
>  				((struct mthca_raddr_seg *) wqe)->raddr =
> -					htonll(wr->wr.rdma.remote_addr);
> +					htobe64(wr->wr.rdma.remote_addr);
>  				((struct mthca_raddr_seg *) wqe)->rkey =
>  					htonl(wr->wr.rdma.rkey);
>  				((struct mthca_raddr_seg *) wqe)->reserved = 0;
> @@ -194,7 +194,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  			case IBV_WR_RDMA_WRITE:
>  			case IBV_WR_RDMA_WRITE_WITH_IMM:
>  				((struct mthca_raddr_seg *) wqe)->raddr =
> -					htonll(wr->wr.rdma.remote_addr);
> +					htobe64(wr->wr.rdma.remote_addr);
>  				((struct mthca_raddr_seg *) wqe)->rkey =
>  					htonl(wr->wr.rdma.rkey);
>  				((struct mthca_raddr_seg *) wqe)->reserved = 0;
> @@ -213,7 +213,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  			((struct mthca_tavor_ud_seg *) wqe)->lkey =
>  				htonl(to_mah(wr->wr.ud.ah)->key);
>  			((struct mthca_tavor_ud_seg *) wqe)->av_addr =
> -				htonll((uintptr_t) to_mah(wr->wr.ud.ah)->av);
> +				htobe64((uintptr_t) to_mah(wr->wr.ud.ah)->av);
>  			((struct mthca_tavor_ud_seg *) wqe)->dqpn =
>  				htonl(wr->wr.ud.remote_qpn);
>  			((struct mthca_tavor_ud_seg *) wqe)->qkey =
> @@ -265,7 +265,7 @@ int mthca_tavor_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  				seg = wqe;
>  				seg->byte_count = htonl(wr->sg_list[i].length);
>  				seg->lkey = htonl(wr->sg_list[i].lkey);
> -				seg->addr = htonll(wr->sg_list[i].addr);
> +				seg->addr = htobe64(wr->sg_list[i].addr);
>  				wqe += sizeof *seg;
>  			}
> 
> @@ -372,7 +372,7 @@ int mthca_tavor_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
>  			((struct mthca_data_seg *) wqe)->lkey =
>  				htonl(wr->sg_list[i].lkey);
>  			((struct mthca_data_seg *) wqe)->addr =
> -				htonll(wr->sg_list[i].addr);
> +				htobe64(wr->sg_list[i].addr);
>  			wqe += sizeof (struct mthca_data_seg);
>  			size += sizeof (struct mthca_data_seg) / 16;
>  		}
> @@ -508,7 +508,7 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  			case IBV_WR_ATOMIC_CMP_AND_SWP:
>  			case IBV_WR_ATOMIC_FETCH_AND_ADD:
>  				((struct mthca_raddr_seg *) wqe)->raddr =
> -					htonll(wr->wr.atomic.remote_addr);
> +					htobe64(wr->wr.atomic.remote_addr);
>  				((struct mthca_raddr_seg *) wqe)->rkey =
>  					htonl(wr->wr.atomic.rkey);
>  				((struct mthca_raddr_seg *) wqe)->reserved = 0;
> @@ -517,12 +517,12 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
> 
>  				if (wr->opcode == IBV_WR_ATOMIC_CMP_AND_SWP) {
>  					((struct mthca_atomic_seg *) wqe)->swap_add =
> -						htonll(wr->wr.atomic.swap);
> +						htobe64(wr->wr.atomic.swap);
>  					((struct mthca_atomic_seg *) wqe)->compare =
> -						htonll(wr->wr.atomic.compare_add);
> +						htobe64(wr->wr.atomic.compare_add);
>  				} else {
>  					((struct mthca_atomic_seg *) wqe)->swap_add =
> -						htonll(wr->wr.atomic.compare_add);
> +						htobe64(wr->wr.atomic.compare_add);
>  					((struct mthca_atomic_seg *) wqe)->compare = 0;
>  				}
> 
> @@ -535,7 +535,7 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  			case IBV_WR_RDMA_WRITE_WITH_IMM:
>  			case IBV_WR_RDMA_READ:
>  				((struct mthca_raddr_seg *) wqe)->raddr =
> -					htonll(wr->wr.rdma.remote_addr);
> +					htobe64(wr->wr.rdma.remote_addr);
>  				((struct mthca_raddr_seg *) wqe)->rkey =
>  					htonl(wr->wr.rdma.rkey);
>  				((struct mthca_raddr_seg *) wqe)->reserved = 0;
> @@ -555,7 +555,7 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  			case IBV_WR_RDMA_WRITE:
>  			case IBV_WR_RDMA_WRITE_WITH_IMM:
>  				((struct mthca_raddr_seg *) wqe)->raddr =
> -					htonll(wr->wr.rdma.remote_addr);
> +					htobe64(wr->wr.rdma.remote_addr);
>  				((struct mthca_raddr_seg *) wqe)->rkey =
>  					htonl(wr->wr.rdma.rkey);
>  				((struct mthca_raddr_seg *) wqe)->reserved = 0;
> @@ -624,7 +624,7 @@ int mthca_arbel_post_send(struct ibv_qp *ibqp, struct ibv_send_wr *wr,
>  				seg = wqe;
>  				seg->byte_count = htonl(wr->sg_list[i].length);
>  				seg->lkey = htonl(wr->sg_list[i].lkey);
> -				seg->addr = htonll(wr->sg_list[i].addr);
> +				seg->addr = htobe64(wr->sg_list[i].addr);
>  				wqe += sizeof *seg;
>  			}
> 
> @@ -730,7 +730,7 @@ int mthca_arbel_post_recv(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
>  			((struct mthca_data_seg *) wqe)->lkey =
>  				htonl(wr->sg_list[i].lkey);
>  			((struct mthca_data_seg *) wqe)->addr =
> -				htonll(wr->sg_list[i].addr);
> +				htobe64(wr->sg_list[i].addr);
>  			wqe += sizeof (struct mthca_data_seg);
>  		}
> 
> diff --git a/providers/mthca/srq.c b/providers/mthca/srq.c
> index ff6f532733f4ae..66ac924a720c84 100644
> --- a/providers/mthca/srq.c
> +++ b/providers/mthca/srq.c
> @@ -126,7 +126,7 @@ int mthca_tavor_post_srq_recv(struct ibv_srq *ibsrq,
>  			((struct mthca_data_seg *) wqe)->lkey =
>  				htonl(wr->sg_list[i].lkey);
>  			((struct mthca_data_seg *) wqe)->addr =
> -				htonll(wr->sg_list[i].addr);
> +				htobe64(wr->sg_list[i].addr);
>  			wqe += sizeof (struct mthca_data_seg);
>  		}
> 
> @@ -219,7 +219,7 @@ int mthca_arbel_post_srq_recv(struct ibv_srq *ibsrq,
>  			((struct mthca_data_seg *) wqe)->lkey =
>  				htonl(wr->sg_list[i].lkey);
>  			((struct mthca_data_seg *) wqe)->addr =
> -				htonll(wr->sg_list[i].addr);
> +				htobe64(wr->sg_list[i].addr);
>  			wqe += sizeof (struct mthca_data_seg);
>  		}
> 
> diff --git a/providers/qedr/qelr_verbs.c b/providers/qedr/qelr_verbs.c
> index 823ed8754c09d7..932115c8ab7f39 100644
> --- a/providers/qedr/qelr_verbs.c
> +++ b/providers/qedr/qelr_verbs.c
> @@ -900,7 +900,7 @@ static inline void qelr_edpm_set_rdma_ext(struct qelr_qp *qp,
>  	if (!qp->edpm.is_edpm)
>  		return;
> 
> -	qp->edpm.rdma_ext->remote_va = htonll(remote_addr);
> +	qp->edpm.rdma_ext->remote_va = htobe64(remote_addr);
>  	qp->edpm.rdma_ext->remote_key = htonl(rkey);
>  	qp->edpm.dpm_payload_offset += sizeof(*qp->edpm.rdma_ext);
>  	qp->edpm.dpm_payload_size += sizeof(*qp->edpm.rdma_ext);
> diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c
> index e0e550d81ab3c2..ff6118acf611ca 100644
> --- a/srp_daemon/srp_daemon.c
> +++ b/srp_daemon/srp_daemon.c
> @@ -462,9 +462,9 @@ static int add_non_exist_target(struct target_details *target)
>  			if (srpd_sys_read_gid(scsi_host_dir, "dgid", dgid_val))
>  				continue;
>  		}
> -		if (htonll(target->subnet_prefix) != *((uint64_t *) dgid_val))
> +		if (htobe64(target->subnet_prefix) != *((uint64_t *) dgid_val))
>  			continue;
> -		if (htonll(target->h_guid) != *((uint64_t *) (dgid_val+8)))
> +		if (htobe64(target->h_guid) != *((uint64_t *) (dgid_val+8)))
>  			continue;
> 
>  		/* If there is no local_ib_device in the scsi host dir (old kernel module), assumes it is equal */
> @@ -603,7 +603,7 @@ static int send_and_get(int portid, int agent, srp_ib_user_mad_t *out_mad,
>  		/* Skip tid 0 because OpenSM ignores it. */
>  		if (++tid == 0)
>  			++tid;
> -		out_dm_mad->tid = htonll(tid);
> +		out_dm_mad->tid = htobe64(tid);
> 
>  		ret = umad_send(portid, agent, out_mad, MAD_BLOCK_SIZE,
>  				config->timeout, 0);
> @@ -1033,7 +1033,7 @@ int get_node(struct umad_resources *umad_res, uint16_t dlid, uint64_t *guid)
>  	init_srp_sa_mad(&out_mad, umad_res->agent, umad_res->sm_lid,
>  		        SRP_SA_ATTR_NODE, 0);
> 
> -	out_sa_mad->comp_mask     = htonll(1); /* LID */
> +	out_sa_mad->comp_mask     = htobe64(1); /* LID */
>  	node			  = (void *) out_sa_mad->data;
>  	node->lid		  = htons(dlid);
> 
> @@ -1059,7 +1059,7 @@ static int get_port_info(struct umad_resources *umad_res, uint16_t dlid,
>  	init_srp_sa_mad(&out_mad, umad_res->agent, umad_res->sm_lid,
>  		        SRP_SA_ATTR_PORT_INFO, 0);
> 
> -	out_sa_mad->comp_mask     = htonll(1); /* LID */
> +	out_sa_mad->comp_mask     = htobe64(1); /* LID */
>  	port_info                 = (void *) out_sa_mad->data;
>  	port_info->endport_lid	  = htons(dlid);
> 
> @@ -1134,7 +1134,7 @@ static int get_shared_pkeys(struct resources *res,
>  			continue;
> 
>  		/* Mark components: DLID, SLID, PKEY */
> -		out_sa_mad->comp_mask = htonll(1 << 4 | 1 << 5 | 1 << 13);
> +		out_sa_mad->comp_mask = htobe64(1 << 4 | 1 << 5 | 1 << 13);
>  		out_sa_mad->rmpp_version = 1;
>  		out_sa_mad->rmpp_type = 1;
>  		path_rec = (ib_path_rec_t *)out_sa_mad->data;
> @@ -1194,7 +1194,7 @@ static int do_dm_port_list(struct resources *res)
>  		        SRP_SA_ATTR_PORT_INFO, SRP_SM_CAP_MASK_MATCH_ATTR_MOD);
> 
>  	out_sa_mad->method     	   = SRP_SA_METHOD_GET_TABLE;
> -	out_sa_mad->comp_mask      = htonll(1 << 7); /* Capability mask */
> +	out_sa_mad->comp_mask      = htobe64(1 << 7); /* Capability mask */
>  	out_sa_mad->rmpp_version   = 1;
>  	out_sa_mad->rmpp_type      = 1;
>  	port_info		   = (void *) out_sa_mad->data;
> @@ -2330,7 +2330,7 @@ static int get_lid(struct umad_resources *umad_res, ib_gid_t *gid, uint16_t *lid
>  	init_srp_sa_mad(&out_mad, umad_res->agent, umad_res->sm_lid,
>  		        SRP_SA_ATTR_PATH_REC, 0);
> 
> -	out_sa_mad->comp_mask = htonll( 4 | 8 | 64 | 512 | 4096 );
> +	out_sa_mad->comp_mask = htobe64( 4 | 8 | 64 | 512 | 4096 );
> 
>  	path_rec->sgid = *gid;
>  	path_rec->dgid = *gid;
> diff --git a/srp_daemon/srp_handle_traps.c b/srp_daemon/srp_handle_traps.c
> index 01cc5445e8352b..6a7a2d1ab479a1 100644
> --- a/srp_daemon/srp_handle_traps.c
> +++ b/srp_daemon/srp_handle_traps.c
> @@ -606,14 +606,14 @@ static int register_to_trap(struct sync_resources *sync_res,
>  	    comp_mask |= SRP_INFORMINFO_QPN_COMP;
>  	}
> 
> -	p_sa_mad->comp_mask = htonll(comp_mask);
> +	p_sa_mad->comp_mask = htobe64(comp_mask);
>  	pr_debug("comp_mask: %llx\n", comp_mask);
> 
>  	do {
>  		pthread_mutex_lock(res->mad_buffer_mutex);
>  		res->mad_buffer->base_ver = 0; // flag that the buffer is empty
>  		pthread_mutex_unlock(res->mad_buffer_mutex);
> -		mad_hdr->trans_id = htonll(trans_id);
> +		mad_hdr->trans_id = htobe64(trans_id);
>  		trans_id++;
> 
>  		ret = ibv_post_send(res->qp, &sr, bad_wr);
> --
> 2.7.4
> 

Looks good.

Reviewed-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@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] 24+ messages in thread

* RE: [PATCH rdma-core 09/10] Move the now private infiniband/arch.h to util/udma_barrier.h
       [not found]     ` <1486677212-3188-10-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  2017-02-09 22:25       ` Steve Wise
@ 2017-02-12  8:28       ` Amrani, Ram
  1 sibling, 0 replies; 24+ messages in thread
From: Amrani, Ram @ 2017-02-12  8:28 UTC (permalink / raw)
  To: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA

> This header now only contains the DMA barrier macros.
> 
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  CMakeLists.txt                 |   2 +-
>  buildlib/travis-build          |   2 +-
>  libibverbs/CMakeLists.txt      |   1 -
>  libibverbs/arch.h              | 135 -----------------------------------------
>  providers/cxgb3/iwch.h         |   2 +-
>  providers/cxgb4/libcxgb4.h     |   2 +-
>  providers/hns/hns_roce_u.h     |   2 +-
>  providers/i40iw/i40iw_osdep.h  |   2 +-
>  providers/i40iw/i40iw_uk.c     |   2 +
>  providers/i40iw/i40iw_umain.h  |   2 +-
>  providers/mlx4/mlx4.h          |   2 +-
>  providers/mlx5/mlx5.h          |   2 +-
>  providers/mthca/mthca.h        |   2 +-
>  providers/nes/nes_umain.h      |   2 +-
>  providers/ocrdma/ocrdma_main.h |   2 +-
>  providers/qedr/qelr.h          |   2 +-
>  providers/qedr/qelr_main.h     |   2 +-
>  providers/qedr/qelr_verbs.h    |   2 +-
>  providers/vmw_pvrdma/cq.c      |   2 +-
>  providers/vmw_pvrdma/qp.c      |   2 +-
>  util/CMakeLists.txt            |   1 +
>  util/udma_barrier.h            | 125 ++++++++++++++++++++++++++++++++++++++
>  22 files changed, 145 insertions(+), 153 deletions(-)
>  delete mode 100644 libibverbs/arch.h
>  create mode 100644 util/udma_barrier.h
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 45cbc4e018b296..009d133cf661a9 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -286,7 +286,7 @@ include(RDMA_LinuxHeaders)
>  # arch specific property, but for our purposes arches that do not support it
>  # also do not define wmb/etc which breaks our compile.
>  CHECK_C_SOURCE_COMPILES("
> -#include \"${CMAKE_CURRENT_SOURCE_DIR}/libibverbs/arch.h\"
> +#include \"${CMAKE_CURRENT_SOURCE_DIR}/util/udma_barrier.h\"
>   int main(int argc,const char *argv[]) {return 0;}"
>    HAVE_COHERENT_DMA)
> 
> diff --git a/buildlib/travis-build b/buildlib/travis-build
> index 4fb84e4e70690d..3fe5ff5876df46 100755
> --- a/buildlib/travis-build
> +++ b/buildlib/travis-build
> @@ -26,7 +26,7 @@ ninja
> 
>  # Test with coherent DMA mode disabled (ie as would be on ARM32, etc)
>  cd ../build-clang
> -echo "#error Fail" >> ../libibverbs/arch.h
> +echo "#error Fail" >> ../util/udma_barrier.h
>  rm CMakeCache.txt
>  CC=clang-3.9 CFLAGS=-Werror cmake -GNinja ..
>  ninja
> diff --git a/libibverbs/CMakeLists.txt b/libibverbs/CMakeLists.txt
> index 0c2eb87e2adbe1..7e18a1e3e71d5e 100644
> --- a/libibverbs/CMakeLists.txt
> +++ b/libibverbs/CMakeLists.txt
> @@ -7,7 +7,6 @@ publish_headers(infiniband
>    )
> 
>  publish_internal_headers(infiniband
> -  arch.h
>    driver.h
>    marshall.h
>    )
> diff --git a/libibverbs/arch.h b/libibverbs/arch.h
> deleted file mode 100644
> index 1c90c26d6f721d..00000000000000
> --- a/libibverbs/arch.h
> +++ /dev/null
> @@ -1,135 +0,0 @@
> -/*
> - * Copyright (c) 2005 Topspin Communications.  All rights reserved.
> - *
> - * This software is available to you under a choice of one of two
> - * licenses.  You may choose to be licensed under the terms of the GNU
> - * General Public License (GPL) Version 2, available from the file
> - * COPYING in the main directory of this source tree, or the
> - * OpenIB.org BSD license below:
> - *
> - *     Redistribution and use in source and binary forms, with or
> - *     without modification, are permitted provided that the following
> - *     conditions are met:
> - *
> - *      - Redistributions of source code must retain the above
> - *        copyright notice, this list of conditions and the following
> - *        disclaimer.
> - *
> - *      - Redistributions in binary form must reproduce the above
> - *        copyright notice, this list of conditions and the following
> - *        disclaimer in the documentation and/or other materials
> - *        provided with the distribution.
> - *
> - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
> - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
> - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
> - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> - * SOFTWARE.
> - */
> -
> -#ifndef INFINIBAND_ARCH_H
> -#define INFINIBAND_ARCH_H
> -
> -#include <stdint.h>
> -#include <endian.h>
> -
> -#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
> - * required to implement the following operations:
> - *
> - * mb() - memory barrier.  No loads or stores may be reordered across
> - *     this macro by either the compiler or the CPU.
> - * rmb() - read memory barrier.  No loads may be reordered across this
> - *     macro by either the compiler or the CPU.
> - * wmb() - write memory barrier.  No stores may be reordered across
> - *     this macro by either the compiler or the CPU.
> - * wc_wmb() - flush write combine buffers.  No write-combined writes
> - *     will be reordered across this macro by either the compiler or
> - *     the CPU.
> - */
> -
> -#if defined(__i386__)
> -
> -#define mb()	 asm volatile("lock; addl $0,0(%%esp) " ::: "memory")
> -#define rmb()	 mb()
> -#define wmb()	 asm volatile("" ::: "memory")
> -#define wc_wmb() mb()
> -
> -#elif defined(__x86_64__)
> -
> -/*
> - * Only use lfence for mb() and rmb() because we don't care about
> - * ordering against non-temporal stores (for now at least).
> - */
> -#define mb()	 asm volatile("lfence" ::: "memory")
> -#define rmb()	 mb()
> -#define wmb()	 asm volatile("" ::: "memory")
> -#define wc_wmb() asm volatile("sfence" ::: "memory")
> -
> -#elif defined(__PPC64__)
> -
> -#define mb()	 asm volatile("sync" ::: "memory")
> -#define rmb()	 asm volatile("lwsync" ::: "memory")
> -#define wmb()	 mb()
> -#define wc_wmb() wmb()
> -
> -#elif defined(__ia64__)
> -
> -#define mb()	 asm volatile("mf" ::: "memory")
> -#define rmb()	 mb()
> -#define wmb()	 mb()
> -#define wc_wmb() asm volatile("fwb" ::: "memory")
> -
> -#elif defined(__PPC__)
> -
> -#define mb()	 asm volatile("sync" ::: "memory")
> -#define rmb()	 mb()
> -#define wmb()	 mb()
> -#define wc_wmb() wmb()
> -
> -#elif defined(__sparc_v9__)
> -
> -#define mb()	 asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory")
> -#define rmb()	 asm volatile("membar #LoadLoad" ::: "memory")
> -#define wmb()	 asm volatile("membar #StoreStore" ::: "memory")
> -#define wc_wmb() wmb()
> -
> -#elif defined(__sparc__)
> -
> -#define mb()	 asm volatile("" ::: "memory")
> -#define rmb()	 mb()
> -#define wmb()	 mb()
> -#define wc_wmb() wmb()
> -
> -#elif defined(__s390x__)
> -
> -#define mb()	{ asm volatile("" : : : "memory"); }	/* for s390x */
> -#define rmb()	mb()					/* for s390x */
> -#define wmb()	mb()					/* for s390x */
> -#define wc_wmb() wmb()					/* for s390x */
> -
> -#elif defined(__aarch64__)
> -
> -/* Perhaps dmb would be sufficient? Let us be conservative for now. */
> -#define mb()	{ asm volatile("dsb sy" ::: "memory"); }
> -#define rmb()	{ asm volatile("dsb ld" ::: "memory"); }
> -#define wmb()	{ asm volatile("dsb st" ::: "memory"); }
> -#define wc_wmb() wmb()
> -
> -#else
> -
> -#error No architecture specific memory barrier defines found!
> -
> -#endif
> -
> -#endif /* INFINIBAND_ARCH_H */
> diff --git a/providers/cxgb3/iwch.h b/providers/cxgb3/iwch.h
> index a27c5f884a1a92..9ea58b73036f43 100644
> --- a/providers/cxgb3/iwch.h
> +++ b/providers/cxgb3/iwch.h
> @@ -37,7 +37,7 @@
>  #include <stddef.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
> 
>  #include "cxio_wr.h"
> 
> diff --git a/providers/cxgb4/libcxgb4.h b/providers/cxgb4/libcxgb4.h
> index 3b756616f9b903..b64b33564c76e5 100644
> --- a/providers/cxgb4/libcxgb4.h
> +++ b/providers/cxgb4/libcxgb4.h
> @@ -40,7 +40,7 @@
>  #include <sys/errno.h>
>  #include <sys/time.h>
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
>  #include <ccan/list.h>
>  #include "t4.h"
> 
> diff --git a/providers/hns/hns_roce_u.h b/providers/hns/hns_roce_u.h
> index 8483d349e4281b..cb2f26060711dd 100644
> --- a/providers/hns/hns_roce_u.h
> +++ b/providers/hns/hns_roce_u.h
> @@ -37,7 +37,7 @@
>  #include <util/compiler.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
>  #include <infiniband/verbs.h>
>  #include <ccan/container_of.h>
> 
> diff --git a/providers/i40iw/i40iw_osdep.h b/providers/i40iw/i40iw_osdep.h
> index e4e84e950c14bc..fddedf40dd8ae2 100644
> --- a/providers/i40iw/i40iw_osdep.h
> +++ b/providers/i40iw/i40iw_osdep.h
> @@ -38,7 +38,7 @@
>  #include <stdbool.h>
>  #include <stdio.h>
>  #include <string.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
>  #include <linux/types.h>
>  typedef unsigned char u8;
>  typedef unsigned long long u64;
> diff --git a/providers/i40iw/i40iw_uk.c b/providers/i40iw/i40iw_uk.c
> index ea3255f753e59d..d3e4fec7d8515b 100644
> --- a/providers/i40iw/i40iw_uk.c
> +++ b/providers/i40iw/i40iw_uk.c
> @@ -32,6 +32,8 @@
>  *
>  *******************************************************************************/
> 
> +#include <stdint.h>
> +
>  #include "i40iw_osdep.h"
>  #include "i40iw_status.h"
>  #include "i40iw_d.h"
> diff --git a/providers/i40iw/i40iw_umain.h b/providers/i40iw/i40iw_umain.h
> index 4ca605797a9c04..1f86c8f90b10d9 100644
> --- a/providers/i40iw/i40iw_umain.h
> +++ b/providers/i40iw/i40iw_umain.h
> @@ -41,7 +41,7 @@
>  #include <util/compiler.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
> 
>  #include "i40iw_osdep.h"
>  #include "i40iw_d.h"
> diff --git a/providers/mlx4/mlx4.h b/providers/mlx4/mlx4.h
> index bde1b33db176bb..aae50a80926f95 100644
> --- a/providers/mlx4/mlx4.h
> +++ b/providers/mlx4/mlx4.h
> @@ -39,7 +39,7 @@
>  #include <util/compiler.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
>  #include <infiniband/verbs.h>
> 
>  #define MLX4_PORTS_NUM 2
> diff --git a/providers/mlx5/mlx5.h b/providers/mlx5/mlx5.h
> index 3f89f4be91c5f5..58d622620a1f7b 100644
> --- a/providers/mlx5/mlx5.h
> +++ b/providers/mlx5/mlx5.h
> @@ -38,7 +38,7 @@
>  #include <util/compiler.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
>  #include "mlx5-abi.h"
>  #include <ccan/list.h>
>  #include "bitmap.h"
> diff --git a/providers/mthca/mthca.h b/providers/mthca/mthca.h
> index b4b0b6a8a9d4ee..61ee92807fcb86 100644
> --- a/providers/mthca/mthca.h
> +++ b/providers/mthca/mthca.h
> @@ -37,7 +37,7 @@
>  #include <stddef.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
> 
>  #include <valgrind/memcheck.h>
> 
> diff --git a/providers/nes/nes_umain.h b/providers/nes/nes_umain.h
> index c10c4fe0b3eb3d..6a4366802db209 100644
> --- a/providers/nes/nes_umain.h
> +++ b/providers/nes/nes_umain.h
> @@ -40,7 +40,7 @@
>  #include <util/compiler.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
> 
>  #define PFX	"libnes: "
> 
> diff --git a/providers/ocrdma/ocrdma_main.h b/providers/ocrdma/ocrdma_main.h
> index b8be6e514c72c7..6c74545d08df2d 100644
> --- a/providers/ocrdma/ocrdma_main.h
> +++ b/providers/ocrdma/ocrdma_main.h
> @@ -40,7 +40,7 @@
>  #include <endian.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
> 
>  #include <ccan/list.h>
> 
> diff --git a/providers/qedr/qelr.h b/providers/qedr/qelr.h
> index e2a92489d2c147..e887d9f8e4713a 100644
> --- a/providers/qedr/qelr.h
> +++ b/providers/qedr/qelr.h
> @@ -39,7 +39,7 @@
>  #include <ccan/minmax.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
> 
>  #define writel(b, p) (*(uint32_t *)(p) = (b))
>  #define writeq(b, p) (*(uint64_t *)(p) = (b))
> diff --git a/providers/qedr/qelr_main.h b/providers/qedr/qelr_main.h
> index 1f65be6156db7c..88d52b7aed2b66 100644
> --- a/providers/qedr/qelr_main.h
> +++ b/providers/qedr/qelr_main.h
> @@ -38,7 +38,7 @@
>  #include <endian.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
> 
>  struct ibv_device *qelr_driver_init(const char *, int);
> 
> diff --git a/providers/qedr/qelr_verbs.h b/providers/qedr/qelr_verbs.h
> index b73ae9e0adac34..28ad18c8885e46 100644
> --- a/providers/qedr/qelr_verbs.h
> +++ b/providers/qedr/qelr_verbs.h
> @@ -38,7 +38,7 @@
>  #include <endian.h>
> 
>  #include <infiniband/driver.h>
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
> 
>  int qelr_query_device(struct ibv_context *context,
>  		      struct ibv_device_attr *attr);
> diff --git a/providers/vmw_pvrdma/cq.c b/providers/vmw_pvrdma/cq.c
> index 0c7dcf67b54d30..f24d80742678bd 100644
> --- a/providers/vmw_pvrdma/cq.c
> +++ b/providers/vmw_pvrdma/cq.c
> @@ -43,7 +43,7 @@
>   * OF THE POSSIBILITY OF SUCH DAMAGE.
>   */
> 
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
> 
>  #include "pvrdma.h"
> 
> diff --git a/providers/vmw_pvrdma/qp.c b/providers/vmw_pvrdma/qp.c
> index 1b013592304d01..d2e2189fda6de4 100644
> --- a/providers/vmw_pvrdma/qp.c
> +++ b/providers/vmw_pvrdma/qp.c
> @@ -43,7 +43,7 @@
>   * OF THE POSSIBILITY OF SUCH DAMAGE.
>   */
> 
> -#include <infiniband/arch.h>
> +#include <util/udma_barrier.h>
> 
>  #include "pvrdma.h"
> 
> diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt
> index c0ad5861d189ee..71e33ac3baaa9b 100644
> --- a/util/CMakeLists.txt
> +++ b/util/CMakeLists.txt
> @@ -1,4 +1,5 @@
>  publish_internal_headers(util
>    compiler.h
> +  udma_barrier.h
>    util.h
>    )
> diff --git a/util/udma_barrier.h b/util/udma_barrier.h
> new file mode 100644
> index 00000000000000..57ab0f76cbe33e
> --- /dev/null
> +++ b/util/udma_barrier.h
> @@ -0,0 +1,125 @@
> +/*
> + * Copyright (c) 2005 Topspin Communications.  All rights reserved.
> + *
> + * This software is available to you under a choice of one of two
> + * licenses.  You may choose to be licensed under the terms of the GNU
> + * General Public License (GPL) Version 2, available from the file
> + * COPYING in the main directory of this source tree, or the
> + * OpenIB.org BSD license below:
> + *
> + *     Redistribution and use in source and binary forms, with or
> + *     without modification, are permitted provided that the following
> + *     conditions are met:
> + *
> + *      - Redistributions of source code must retain the above
> + *        copyright notice, this list of conditions and the following
> + *        disclaimer.
> + *
> + *      - Redistributions in binary form must reproduce the above
> + *        copyright notice, this list of conditions and the following
> + *        disclaimer in the documentation and/or other materials
> + *        provided with the distribution.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
> + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
> + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
> + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> + * SOFTWARE.
> + */
> +
> +#ifndef __UTIL_UDMA_BARRIER_H
> +#define __UTIL_UDMA_BARRIER_H
> +
> +/*
> + * Architecture-specific defines.  Currently, an architecture is
> + * required to implement the following operations:
> + *
> + * mb() - memory barrier.  No loads or stores may be reordered across
> + *     this macro by either the compiler or the CPU.
> + * rmb() - read memory barrier.  No loads may be reordered across this
> + *     macro by either the compiler or the CPU.
> + * wmb() - write memory barrier.  No stores may be reordered across
> + *     this macro by either the compiler or the CPU.
> + * wc_wmb() - flush write combine buffers.  No write-combined writes
> + *     will be reordered across this macro by either the compiler or
> + *     the CPU.
> + */
> +
> +#if defined(__i386__)
> +
> +#define mb()	 asm volatile("lock; addl $0,0(%%esp) " ::: "memory")
> +#define rmb()	 mb()
> +#define wmb()	 asm volatile("" ::: "memory")
> +#define wc_wmb() mb()
> +
> +#elif defined(__x86_64__)
> +
> +/*
> + * Only use lfence for mb() and rmb() because we don't care about
> + * ordering against non-temporal stores (for now at least).
> + */
> +#define mb()	 asm volatile("lfence" ::: "memory")
> +#define rmb()	 mb()
> +#define wmb()	 asm volatile("" ::: "memory")
> +#define wc_wmb() asm volatile("sfence" ::: "memory")
> +
> +#elif defined(__PPC64__)
> +
> +#define mb()	 asm volatile("sync" ::: "memory")
> +#define rmb()	 asm volatile("lwsync" ::: "memory")
> +#define wmb()	 mb()
> +#define wc_wmb() wmb()
> +
> +#elif defined(__ia64__)
> +
> +#define mb()	 asm volatile("mf" ::: "memory")
> +#define rmb()	 mb()
> +#define wmb()	 mb()
> +#define wc_wmb() asm volatile("fwb" ::: "memory")
> +
> +#elif defined(__PPC__)
> +
> +#define mb()	 asm volatile("sync" ::: "memory")
> +#define rmb()	 mb()
> +#define wmb()	 mb()
> +#define wc_wmb() wmb()
> +
> +#elif defined(__sparc_v9__)
> +
> +#define mb()	 asm volatile("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" ::: "memory")
> +#define rmb()	 asm volatile("membar #LoadLoad" ::: "memory")
> +#define wmb()	 asm volatile("membar #StoreStore" ::: "memory")
> +#define wc_wmb() wmb()
> +
> +#elif defined(__sparc__)
> +
> +#define mb()	 asm volatile("" ::: "memory")
> +#define rmb()	 mb()
> +#define wmb()	 mb()
> +#define wc_wmb() wmb()
> +
> +#elif defined(__s390x__)
> +
> +#define mb()	{ asm volatile("" : : : "memory"); }	/* for s390x */
> +#define rmb()	mb()					/* for s390x */
> +#define wmb()	mb()					/* for s390x */
> +#define wc_wmb() wmb()					/* for s390x */
> +
> +#elif defined(__aarch64__)
> +
> +/* Perhaps dmb would be sufficient? Let us be conservative for now. */
> +#define mb()	{ asm volatile("dsb sy" ::: "memory"); }
> +#define rmb()	{ asm volatile("dsb ld" ::: "memory"); }
> +#define wmb()	{ asm volatile("dsb st" ::: "memory"); }
> +#define wc_wmb() wmb()
> +
> +#else
> +
> +#error No architecture specific memory barrier defines found!
> +
> +#endif
> +
> +#endif
> --
> 2.7.4
> 

Looks good.

Reviewed-by: Ram Amrani <Ram.Amrani-YGCgFSpz5w/QT0dZR+AlfA@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] 24+ messages in thread

* Re: [PATCH rdma-core 01/10] Have check-build confirm that every public header is standalone
       [not found]     ` <1486677212-3188-2-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-02-12  8:48       ` Leon Romanovsky
  0 siblings, 0 replies; 24+ messages in thread
From: Leon Romanovsky @ 2017-02-12  8:48 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 893 bytes --]

On Thu, Feb 09, 2017 at 02:53:23PM -0700, Jason Gunthorpe wrote:
> Public library headers should be includable without requiring other
> headers to be included first. We confirm this by compiling each header
> in a stand alone compilation unit.
>
> Add a few minor missing headers to make the check pass.
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  buildlib/check-build     | 55 +++++++++++++++++++++++++++++++++++++++++++++++-
>  librdmacm/ib.h           |  1 +
>  librdmacm/rdma_cma_abi.h |  1 +
>  3 files changed, 56 insertions(+), 1 deletion(-)
>
> diff --git a/buildlib/check-build b/buildlib/check-build
> index 45e7cb41c83f39..ddb3383e6a5514 100755
> --- a/buildlib/check-build
> +++ b/buildlib/check-build

It is going to be beast :)

Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH rdma-core 10/10] verbs: Add a compatibility arch.h
       [not found]     ` <1486677212-3188-11-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-02-12  9:05       ` Leon Romanovsky
       [not found]         ` <20170212090531.GC14015-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Leon Romanovsky @ 2017-02-12  9:05 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 3388 bytes --]

On Thu, Feb 09, 2017 at 02:53:32PM -0700, Jason Gunthorpe wrote:
> There is a bit of software out there that includes arch.h to get the
> swap macros. Continue to provider a header that serves that purpose
> but emit warnings when it is used.
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> ---
>  libibverbs/CMakeLists.txt |  1 +
>  libibverbs/arch.h         | 51 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 52 insertions(+)
>  create mode 100644 libibverbs/arch.h
>
> diff --git a/libibverbs/CMakeLists.txt b/libibverbs/CMakeLists.txt
> index 7e18a1e3e71d5e..7a52eddc810911 100644
> --- a/libibverbs/CMakeLists.txt
> +++ b/libibverbs/CMakeLists.txt
> @@ -1,4 +1,5 @@
>  publish_headers(infiniband
> +  arch.h
>    kern-abi.h
>    opcode.h
>    sa-kern-abi.h
> diff --git a/libibverbs/arch.h b/libibverbs/arch.h
> new file mode 100644
> index 00000000000000..bcbece8f2c521c
> --- /dev/null
> +++ b/libibverbs/arch.h
> @@ -0,0 +1,51 @@
> +/*
> + * This software is available to you under a choice of one of two
> + * licenses.  You may choose to be licensed under the terms of the GNU
> + * General Public License (GPL) Version 2, available from the file
> + * COPYING in the main directory of this source tree, or the
> + * OpenIB.org BSD license below:
> + *
> + *     Redistribution and use in source and binary forms, with or
> + *     without modification, are permitted provided that the following
> + *     conditions are met:
> + *
> + *      - Redistributions of source code must retain the above
> + *        copyright notice, this list of conditions and the following
> + *        disclaimer.
> + *
> + *      - Redistributions in binary form must reproduce the above
> + *        copyright notice, this list of conditions and the following
> + *        disclaimer in the documentation and/or other materials
> + *        provided with the distribution.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
> + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
> + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
> + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> + * SOFTWARE.
> + */
> +
> +#ifndef INFINIBAND_ARCH_H
> +#define INFINIBAND_ARCH_H
> +
> +#include <stdint.h>
> +#include <endian.h>
> +
> +#warning "This header is obsolete."
> +
> +#ifndef ntohll
> +#undef htonll
> +#undef ntohll
> +/* Users should use the glibc functions directly, not these wrappers */
> +static inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); }
> +static inline __attribute__((deprecated)) uint64_t ntohll(uint64_t x) { return be64toh(x); }
> +#define htonll htonll
> +#define ntohll ntohll
> +#endif
> +
> +/* Barrier macros are no longer provided by libibverbs */
> +
> +#endif /* INFINIBAND_ARCH_H */

Is it possible to drop this file anyway?

> --
> 2.7.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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH rdma-core 10/10] verbs: Add a compatibility arch.h
       [not found]         ` <20170212090531.GC14015-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-02-13 16:39           ` Jason Gunthorpe
       [not found]             ` <20170213163910.GA25430-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-13 16:39 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Sun, Feb 12, 2017 at 11:05:31AM +0200, Leon Romanovsky wrote:

> > +/* Barrier macros are no longer provided by libibverbs */
> > +
> > +#endif /* INFINIBAND_ARCH_H */
> 
> Is it possible to drop this file anyway?

It looks like there is enough stuff out there that uses it to get
htonll that it isn't a good idea at this time. This provides build
warning motivation for those people to move away and we can check
progress again in a year.. No harm to us in carrying an obsolete
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] 24+ messages in thread

* Re: [PATCH rdma-core 10/10] verbs: Add a compatibility arch.h
       [not found]             ` <20170213163910.GA25430-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
@ 2017-02-13 18:17               ` Leon Romanovsky
  0 siblings, 0 replies; 24+ messages in thread
From: Leon Romanovsky @ 2017-02-13 18:17 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

On Mon, Feb 13, 2017 at 09:39:10AM -0700, Jason Gunthorpe wrote:
> On Sun, Feb 12, 2017 at 11:05:31AM +0200, Leon Romanovsky wrote:
>
> > > +/* Barrier macros are no longer provided by libibverbs */
> > > +
> > > +#endif /* INFINIBAND_ARCH_H */
> >
> > Is it possible to drop this file anyway?
>
> It looks like there is enough stuff out there that uses it to get
> htonll that it isn't a good idea at this time. This provides build
> warning motivation for those people to move away and we can check
> progress again in a year.. No harm to us in carrying an obsolete
> header.

I can bet that they will still use it.

>
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH rdma-core 00/10] Provide a compat infiniband/arch.h
       [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
                     ` (9 preceding siblings ...)
  2017-02-09 21:53   ` [PATCH rdma-core 10/10] verbs: Add a compatibility arch.h Jason Gunthorpe
@ 2017-02-15  5:15   ` Leon Romanovsky
       [not found]     ` <20170215051511.GK6989-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  10 siblings, 1 reply; 24+ messages in thread
From: Leon Romanovsky @ 2017-02-15  5:15 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]

On Thu, Feb 09, 2017 at 02:53:22PM -0700, Jason Gunthorpe wrote:
> Prior commits made arch.h into a private header, but there are several places
> out there that include it to get htonll. Provide a dummy compat header that
> will let such places continue to compile, but with warnings.
>
> To do this we need to move the internal tree to use util/udma_barrier.h for
> the barrier macros to free up the header file name and in the process replace
> more of the crazy mix of byteswapping macros with endian.h equivalents.
>
> To make sure that everything remains working travis also learns to
> compile-test all the header files.
>
> Jason Gunthorpe (10):
>   Have check-build confirm that every public header is standalone
>   Remove uses of htonll
>   Remove uses of ntohll
>   Do not use kernel byteswap macros
>   Remove extraneous byteswap.h include
>   mlx4: Remove include of asm/unistd.h
>   rdmacm: Remove dangling cpu_to_be64 definitions
>   umad: Replace htonll macros with proper inlines and mark deprecated
>   Move the now private infiniband/arch.h to util/udma_barrier.h
>   verbs: Add a compatibility arch.h
>

Thanks, applied.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH rdma-core 00/10] Provide a compat infiniband/arch.h
       [not found]     ` <20170215051511.GK6989-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-02-15 13:51       ` Talat mellanox
       [not found]         ` <CAB1oGZeJNvwwcii+z7VYQzZK3LJcToZ4uRF=_waA6WAboJueCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Talat mellanox @ 2017-02-15 13:51 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Talat mellanox

Hi Jason,

Building a debian package failed with [1].

We should add arch.h to debian/libibverbs-dev.install .
i'll generate a patch and send it.

[1]
dh_install: usr/include/infiniband/arch.h exists in debian/tmp but is
not installed to anywhere.

Thanks,
Talat

On Wed, Feb 15, 2017 at 7:15 AM, Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> On Thu, Feb 09, 2017 at 02:53:22PM -0700, Jason Gunthorpe wrote:
>> Prior commits made arch.h into a private header, but there are several places
>> out there that include it to get htonll. Provide a dummy compat header that
>> will let such places continue to compile, but with warnings.
>>
>> To do this we need to move the internal tree to use util/udma_barrier.h for
>> the barrier macros to free up the header file name and in the process replace
>> more of the crazy mix of byteswapping macros with endian.h equivalents.
>>
>> To make sure that everything remains working travis also learns to
>> compile-test all the header files.
>>
>> Jason Gunthorpe (10):
>>   Have check-build confirm that every public header is standalone
>>   Remove uses of htonll
>>   Remove uses of ntohll
>>   Do not use kernel byteswap macros
>>   Remove extraneous byteswap.h include
>>   mlx4: Remove include of asm/unistd.h
>>   rdmacm: Remove dangling cpu_to_be64 definitions
>>   umad: Replace htonll macros with proper inlines and mark deprecated
>>   Move the now private infiniband/arch.h to util/udma_barrier.h
>>   verbs: Add a compatibility arch.h
>>
>
> Thanks, applied.
--
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] 24+ messages in thread

* Re: [PATCH rdma-core 00/10] Provide a compat infiniband/arch.h
       [not found]         ` <CAB1oGZeJNvwwcii+z7VYQzZK3LJcToZ4uRF=_waA6WAboJueCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-02-15 18:55           ` Jason Gunthorpe
  0 siblings, 0 replies; 24+ messages in thread
From: Jason Gunthorpe @ 2017-02-15 18:55 UTC (permalink / raw)
  To: Talat mellanox
  Cc: Leon Romanovsky, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Talat mellanox

On Wed, Feb 15, 2017 at 03:51:05PM +0200, Talat mellanox wrote:
> Hi Jason,
> 
> Building a debian package failed with [1].
> 
> We should add arch.h to debian/libibverbs-dev.install .
> i'll generate a patch and send it.
> 
> [1]
> dh_install: usr/include/infiniband/arch.h exists in debian/tmp but is
> not installed to anywhere.

Yes, my mistake, sorry.

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] 24+ messages in thread

end of thread, other threads:[~2017-02-15 18:55 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-09 21:53 [PATCH rdma-core 00/10] Provide a compat infiniband/arch.h Jason Gunthorpe
     [not found] ` <1486677212-3188-1-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-09 21:53   ` [PATCH rdma-core 01/10] Have check-build confirm that every public header is standalone Jason Gunthorpe
     [not found]     ` <1486677212-3188-2-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-12  8:48       ` Leon Romanovsky
2017-02-09 21:53   ` [PATCH rdma-core 02/10] Remove uses of htonll Jason Gunthorpe
     [not found]     ` <1486677212-3188-3-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-09 22:23       ` Steve Wise
2017-02-12  8:26       ` Amrani, Ram
2017-02-09 21:53   ` [PATCH rdma-core 03/10] Remove uses of ntohll Jason Gunthorpe
     [not found]     ` <1486677212-3188-4-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-09 22:24       ` Steve Wise
2017-02-09 21:53   ` [PATCH rdma-core 04/10] Do not use kernel byteswap macros Jason Gunthorpe
     [not found]     ` <1486677212-3188-5-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-09 22:23       ` Steve Wise
2017-02-09 21:53   ` [PATCH rdma-core 05/10] Remove extraneous byteswap.h include Jason Gunthorpe
2017-02-09 21:53   ` [PATCH rdma-core 06/10] mlx4: Remove include of asm/unistd.h Jason Gunthorpe
2017-02-09 21:53   ` [PATCH rdma-core 07/10] rdmacm: Remove dangling cpu_to_be64 definitions Jason Gunthorpe
2017-02-09 21:53   ` [PATCH rdma-core 08/10] umad: Replace htonll macros with proper inlines and mark deprecated Jason Gunthorpe
2017-02-09 21:53   ` [PATCH rdma-core 09/10] Move the now private infiniband/arch.h to util/udma_barrier.h Jason Gunthorpe
     [not found]     ` <1486677212-3188-10-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-09 22:25       ` Steve Wise
2017-02-12  8:28       ` Amrani, Ram
2017-02-09 21:53   ` [PATCH rdma-core 10/10] verbs: Add a compatibility arch.h Jason Gunthorpe
     [not found]     ` <1486677212-3188-11-git-send-email-jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-12  9:05       ` Leon Romanovsky
     [not found]         ` <20170212090531.GC14015-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-02-13 16:39           ` Jason Gunthorpe
     [not found]             ` <20170213163910.GA25430-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-02-13 18:17               ` Leon Romanovsky
2017-02-15  5:15   ` [PATCH rdma-core 00/10] Provide a compat infiniband/arch.h Leon Romanovsky
     [not found]     ` <20170215051511.GK6989-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-02-15 13:51       ` Talat mellanox
     [not found]         ` <CAB1oGZeJNvwwcii+z7VYQzZK3LJcToZ4uRF=_waA6WAboJueCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-15 18:55           ` Jason Gunthorpe

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.