diff options
Diffstat (limited to 'include/linux/sunrpc/rpc_rdma.h')
-rw-r--r-- | include/linux/sunrpc/rpc_rdma.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/sunrpc/rpc_rdma.h b/include/linux/sunrpc/rpc_rdma.h index b78f16b1dea3..f33c5a4d6fe4 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 */ |
@@ -95,7 +98,10 @@ struct rpcrdma_msg { | |||
95 | } rm_body; | 98 | } rm_body; |
96 | }; | 99 | }; |
97 | 100 | ||
98 | #define RPCRDMA_HDRLEN_MIN 28 | 101 | /* |
102 | * Smallest RPC/RDMA header: rm_xid through rm_type, then rm_nochunks | ||
103 | */ | ||
104 | #define RPCRDMA_HDRLEN_MIN (sizeof(__be32) * 7) | ||
99 | 105 | ||
100 | enum rpcrdma_errcode { | 106 | enum rpcrdma_errcode { |
101 | ERR_VERS = 1, | 107 | ERR_VERS = 1, |
@@ -115,4 +121,10 @@ enum rpcrdma_proc { | |||
115 | RDMA_ERROR = 4 /* An RPC RDMA encoding error */ | 121 | RDMA_ERROR = 4 /* An RPC RDMA encoding error */ |
116 | }; | 122 | }; |
117 | 123 | ||
124 | #define rdma_msg cpu_to_be32(RDMA_MSG) | ||
125 | #define rdma_nomsg cpu_to_be32(RDMA_NOMSG) | ||
126 | #define rdma_msgp cpu_to_be32(RDMA_MSGP) | ||
127 | #define rdma_done cpu_to_be32(RDMA_DONE) | ||
128 | #define rdma_error cpu_to_be32(RDMA_ERROR) | ||
129 | |||
118 | #endif /* _LINUX_SUNRPC_RPC_RDMA_H */ | 130 | #endif /* _LINUX_SUNRPC_RPC_RDMA_H */ |