diff options
| author | Chuck Lever <chuck.lever@oracle.com> | 2015-01-21 11:02:13 -0500 |
|---|---|---|
| committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2015-01-30 10:47:48 -0500 |
| commit | 284f4902a632584e8d73cf7d9363f819adf7240c (patch) | |
| tree | d9e0b2061ddb268c6297bd25e5342dad7a4eebe1 /include/linux/sunrpc | |
| parent | 8502427ccd9500cefc1ad47655371f9121934845 (diff) | |
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')
| -rw-r--r-- | include/linux/sunrpc/rpc_rdma.h | 9 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 2 |
2 files changed, 9 insertions, 2 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 @@ | |||
| 42 | 42 | ||
| 43 | #include <linux/types.h> | 43 | #include <linux/types.h> |
| 44 | 44 | ||
| 45 | #define RPCRDMA_VERSION 1 | ||
| 46 | #define rpcrdma_version cpu_to_be32(RPCRDMA_VERSION) | ||
| 47 | |||
| 45 | struct rpcrdma_segment { | 48 | struct rpcrdma_segment { |
| 46 | __be32 rs_handle; /* Registered memory handle */ | 49 | __be32 rs_handle; /* Registered memory handle */ |
| 47 | __be32 rs_length; /* Length of the chunk in bytes */ | 50 | __be32 rs_length; /* Length of the chunk in bytes */ |
| @@ -115,4 +118,10 @@ enum rpcrdma_proc { | |||
| 115 | RDMA_ERROR = 4 /* An RPC RDMA encoding error */ | 118 | RDMA_ERROR = 4 /* An RPC RDMA encoding error */ |
| 116 | }; | 119 | }; |
| 117 | 120 | ||
| 121 | #define rdma_msg cpu_to_be32(RDMA_MSG) | ||
| 122 | #define rdma_nomsg cpu_to_be32(RDMA_NOMSG) | ||
| 123 | #define rdma_msgp cpu_to_be32(RDMA_MSGP) | ||
| 124 | #define rdma_done cpu_to_be32(RDMA_DONE) | ||
| 125 | #define rdma_error cpu_to_be32(RDMA_ERROR) | ||
| 126 | |||
| 118 | #endif /* _LINUX_SUNRPC_RPC_RDMA_H */ | 127 | #endif /* _LINUX_SUNRPC_RPC_RDMA_H */ |
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index 975da754c778..ddfe88f52219 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h | |||
| @@ -63,8 +63,6 @@ extern atomic_t rdma_stat_rq_prod; | |||
| 63 | extern atomic_t rdma_stat_sq_poll; | 63 | extern atomic_t rdma_stat_sq_poll; |
| 64 | extern atomic_t rdma_stat_sq_prod; | 64 | extern atomic_t rdma_stat_sq_prod; |
| 65 | 65 | ||
| 66 | #define RPCRDMA_VERSION 1 | ||
| 67 | |||
| 68 | /* | 66 | /* |
| 69 | * Contexts are built when an RDMA request is created and are a | 67 | * Contexts are built when an RDMA request is created and are a |
| 70 | * record of the resources that can be recovered when the request | 68 | * record of the resources that can be recovered when the request |
