diff options
author | Raghavendra G <raghavendra@gluster.com> | 2010-11-04 02:33:19 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-11-07 20:15:08 -0800 |
commit | d19a72024c8cd5e40dc48df27c21fda701e76c54 (patch) | |
tree | b6e8d167865295a98fe4bdba5aeb52964486983a /rpc/rpc-transport/rdma/src/rdma.h | |
parent | 56450b818756a762c925c76f8c6218ea1c5f7efe (diff) |
rpc-transport/rdma: Fix 2KB as threshold size for msgs that can be transferred inline.
- Any fop/mop that can result a reply whose size is greater than this threshold
allocates and submits a buffer along with the request to receive reply.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 513 (Introduce 0 copy rdma)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=513
Diffstat (limited to 'rpc/rpc-transport/rdma/src/rdma.h')
-rw-r--r-- | rpc/rpc-transport/rdma/src/rdma.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.h b/rpc/rpc-transport/rdma/src/rdma.h index 4bb5a3759e1..e24ce76ccf1 100644 --- a/rpc/rpc-transport/rdma/src/rdma.h +++ b/rpc/rpc-transport/rdma/src/rdma.h @@ -41,11 +41,12 @@ /* FIXME: give appropriate values to these macros */ #define GF_DEFAULT_RDMA_LISTEN_PORT (GF_DEFAULT_BASE_PORT + 1) + +/* If you are changing RDMA_MAX_SEGMENTS, please make sure to update + * GLUSTERFS_RDMA_MAX_HEADER_SIZE defined in glusterfs.h . + */ #define RDMA_MAX_SEGMENTS 8 -#define RDMA_MAX_HEADER_SIZE (sizeof (rdma_header_t) \ - + RDMA_MAX_SEGMENTS \ - * sizeof (rdma_read_chunk_t)) -#define RDMA_INLINE_THRESHOLD (1024 * 128) + #define RDMA_VERSION 1 #define RDMA_POOL_SIZE 512 @@ -76,6 +77,9 @@ typedef enum rdma_chunktype { rdma_replych /* entire reply through rdma write */ }rdma_chunktype_t; +/* If you are modifying __rdma_header, please make sure to change + * GLUSTERFS_RDMA_MAX_HEADER_SIZE defined in glusterfs.h to reflect your changes + */ struct __rdma_header { uint32_t rm_xid; /* Mirrors the RPC header xid */ uint32_t rm_vers; /* Version of this protocol */ @@ -102,6 +106,10 @@ struct __rdma_header { } __attribute__((packed)); typedef struct __rdma_header rdma_header_t; +/* If you are modifying __rdma_segment or __rdma_read_chunk, please make sure + * to change GLUSTERFS_RDMA_MAX_HEADER_SIZE defined in glusterfs.h to reflect + * your changes. + */ struct __rdma_segment { uint32_t rs_handle; /* Registered memory handle */ uint32_t rs_length; /* Length of the chunk in bytes */ |