summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc/rpc_rdma.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2015-01-21 19:02:13 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2015-01-30 18:47:48 +0300
commit284f4902a632584e8d73cf7d9363f819adf7240c (patch)
treed9e0b2061ddb268c6297bd25e5342dad7a4eebe1 /include/linux/sunrpc/rpc_rdma.h
parent8502427ccd9500cefc1ad47655371f9121934845 (diff)
downloadlinux-284f4902a632584e8d73cf7d9363f819adf7240c.tar.xz
xprtrdma: Modernize htonl and ntohl
Clean up: Replace htonl and ntohl with the be32 equivalents. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'include/linux/sunrpc/rpc_rdma.h')
-rw-r--r--include/linux/sunrpc/rpc_rdma.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sunrpc/rpc_rdma.h b/include/linux/sunrpc/rpc_rdma.h
index b78f16b1dea3..1578ed241c19 100644
--- a/include/linux/sunrpc/rpc_rdma.h
+++ b/include/linux/sunrpc/rpc_rdma.h
@@ -42,6 +42,9 @@
#include <linux/types.h>
+#define RPCRDMA_VERSION 1
+#define rpcrdma_version cpu_to_be32(RPCRDMA_VERSION)
+
struct rpcrdma_segment {
__be32 rs_handle; /* Registered memory handle */
__be32 rs_length; /* Length of the chunk in bytes */
@@ -115,4 +118,10 @@ enum rpcrdma_proc {
RDMA_ERROR = 4 /* An RPC RDMA encoding error */
};
+#define rdma_msg cpu_to_be32(RDMA_MSG)
+#define rdma_nomsg cpu_to_be32(RDMA_NOMSG)
+#define rdma_msgp cpu_to_be32(RDMA_MSGP)
+#define rdma_done cpu_to_be32(RDMA_DONE)
+#define rdma_error cpu_to_be32(RDMA_ERROR)
+
#endif /* _LINUX_SUNRPC_RPC_RDMA_H */