Mercurial > illumos > illumos-gate
changeset 13003:b4084e8201cf
6973698 The workaround is needed against 6973697
6973605 RDSv3 does not work with RDS_CMSG_RDMA_DEST flag
author | Eiji Ota <Eiji.Ota@Sun.COM> |
---|---|
date | Mon, 02 Aug 2010 13:32:36 -0700 |
parents | f246a5b54a71 |
children | 92dfdb3a48cc |
files | usr/src/uts/common/io/ib/clients/rdsv3/rdma.c |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/ib/clients/rdsv3/rdma.c Mon Aug 02 13:17:35 2010 -0700 +++ b/usr/src/uts/common/io/ib/clients/rdsv3/rdma.c Mon Aug 02 13:32:36 2010 -0700 @@ -47,7 +47,6 @@ #include <sys/ib/clients/rdsv3/ib.h> #include <sys/ib/clients/rdsv3/rdma.h> -#include <sys/ib/clients/rdsv3/rdsv3.h> #include <sys/ib/clients/rdsv3/rdsv3_debug.h> #define DMA_TO_DEVICE 0 @@ -399,6 +398,8 @@ avl_remove(&rs->rs_rdma_keys, &mr->r_rb_node); RB_CLEAR_NODE(&mr->r_rb_node); zot_me = 1; + } else { + atomic_add_32(&mr->r_refcount, 1); } mutex_exit(&rs->rs_rdma_lock); @@ -574,6 +575,8 @@ return (op); } +#define CEIL(x, y) (((x) + (y) - 1) / (y)) + /* * The application asks for a RDMA transfer. * Extract all arguments and set up the rdma_op @@ -584,7 +587,7 @@ { struct rdsv3_rdma_op *op; /* uint64_t alignment on the buffer */ - uint64_t buf[ceil(CMSG_LEN(sizeof (struct rds_rdma_args)), + uint64_t buf[CEIL(CMSG_LEN(sizeof (struct rds_rdma_args)), sizeof (uint64_t))]; if (cmsg->cmsg_len != CMSG_LEN(sizeof (struct rds_rdma_args)) || @@ -656,7 +659,7 @@ struct cmsghdr *cmsg) { /* uint64_t alignment on the buffer */ - uint64_t buf[ceil(CMSG_LEN(sizeof (struct rds_get_mr_args)), + uint64_t buf[CEIL(CMSG_LEN(sizeof (struct rds_get_mr_args)), sizeof (uint64_t))]; int status;