Print this page
XXXX introduce drv_sectohz


 620         cl_rdma_reply = NULL;
 621         call_xdrp = NULL;
 622         reply_xdrp = NULL;
 623         wlist_exists_reply  = FALSE;
 624         cl_rpcreply_wlist = NULL;
 625         cl_long_reply = NULL;
 626         rcil.rcil_len = 0;
 627         rcil.rcil_len_alt = 0;
 628         long_reply_len = 0;
 629 
 630         rw_enter(&rdma_lock, RW_READER);
 631         m = (rdma_registry_t *)p->cku_rd_handle;
 632         if (m->r_mod_state == RDMA_MOD_INACTIVE) {
 633                 /*
 634                  * If we didn't find a matching RDMA module in the registry
 635                  * then there is no transport.
 636                  */
 637                 rw_exit(&rdma_lock);
 638                 p->cku_err.re_status = RPC_CANTSEND;
 639                 p->cku_err.re_errno = EIO;
 640                 ticks = clnt_rdma_min_delay * drv_usectohz(1000000);
 641                 if (h->cl_nosignal == TRUE) {
 642                         delay(ticks);
 643                 } else {
 644                         if (delay_sig(ticks) == EINTR) {
 645                                 p->cku_err.re_status = RPC_INTR;
 646                                 p->cku_err.re_errno = EINTR;
 647                         }
 648                 }
 649                 return (RPC_CANTSEND);
 650         }
 651         /*
 652          * Get unique xid
 653          */
 654         if (p->cku_xid == 0)
 655                 p->cku_xid = alloc_xid();
 656 
 657         status = RDMA_GET_CONN(p->cku_rd_mod->rdma_ops, &p->cku_srcaddr,
 658             &p->cku_addr, p->cku_addrfmly, p->cku_rd_handle, &conn);
 659         rw_exit(&rdma_lock);
 660 


 676                          * Already timed out. No need to delay
 677                          * some more.
 678                          */
 679                         p->cku_err.re_status = RPC_TIMEDOUT;
 680                         p->cku_err.re_errno = ETIMEDOUT;
 681                         break;
 682                 case RDMA_INTR:
 683                         /*
 684                          * Failed because of an signal. Very likely
 685                          * the caller will not retry.
 686                          */
 687                         p->cku_err.re_status = RPC_INTR;
 688                         p->cku_err.re_errno = EINTR;
 689                         break;
 690                 default:
 691                         /*
 692                          * All other failures - server down or service
 693                          * down or temporary resource failure. Delay before
 694                          * returning to caller.
 695                          */
 696                         ticks = clnt_rdma_min_delay * drv_usectohz(1000000);
 697                         p->cku_err.re_status = RPC_CANTCONNECT;
 698                         p->cku_err.re_errno = EIO;
 699 
 700                         if (h->cl_nosignal == TRUE) {
 701                                 delay(ticks);
 702                         } else {
 703                                 if (delay_sig(ticks) == EINTR) {
 704                                         p->cku_err.re_status = RPC_INTR;
 705                                         p->cku_err.re_errno = EINTR;
 706                                 }
 707                         }
 708                         break;
 709                 }
 710 
 711                 return (p->cku_err.re_status);
 712         }
 713 
 714         if (p->cku_srcaddr.maxlen < conn->c_laddr.len) {
 715                 if ((p->cku_srcaddr.maxlen != 0) &&
 716                     (p->cku_srcaddr.buf != NULL))




 620         cl_rdma_reply = NULL;
 621         call_xdrp = NULL;
 622         reply_xdrp = NULL;
 623         wlist_exists_reply  = FALSE;
 624         cl_rpcreply_wlist = NULL;
 625         cl_long_reply = NULL;
 626         rcil.rcil_len = 0;
 627         rcil.rcil_len_alt = 0;
 628         long_reply_len = 0;
 629 
 630         rw_enter(&rdma_lock, RW_READER);
 631         m = (rdma_registry_t *)p->cku_rd_handle;
 632         if (m->r_mod_state == RDMA_MOD_INACTIVE) {
 633                 /*
 634                  * If we didn't find a matching RDMA module in the registry
 635                  * then there is no transport.
 636                  */
 637                 rw_exit(&rdma_lock);
 638                 p->cku_err.re_status = RPC_CANTSEND;
 639                 p->cku_err.re_errno = EIO;
 640                 ticks = drv_sectohz(clnt_rdma_min_delay);
 641                 if (h->cl_nosignal == TRUE) {
 642                         delay(ticks);
 643                 } else {
 644                         if (delay_sig(ticks) == EINTR) {
 645                                 p->cku_err.re_status = RPC_INTR;
 646                                 p->cku_err.re_errno = EINTR;
 647                         }
 648                 }
 649                 return (RPC_CANTSEND);
 650         }
 651         /*
 652          * Get unique xid
 653          */
 654         if (p->cku_xid == 0)
 655                 p->cku_xid = alloc_xid();
 656 
 657         status = RDMA_GET_CONN(p->cku_rd_mod->rdma_ops, &p->cku_srcaddr,
 658             &p->cku_addr, p->cku_addrfmly, p->cku_rd_handle, &conn);
 659         rw_exit(&rdma_lock);
 660 


 676                          * Already timed out. No need to delay
 677                          * some more.
 678                          */
 679                         p->cku_err.re_status = RPC_TIMEDOUT;
 680                         p->cku_err.re_errno = ETIMEDOUT;
 681                         break;
 682                 case RDMA_INTR:
 683                         /*
 684                          * Failed because of an signal. Very likely
 685                          * the caller will not retry.
 686                          */
 687                         p->cku_err.re_status = RPC_INTR;
 688                         p->cku_err.re_errno = EINTR;
 689                         break;
 690                 default:
 691                         /*
 692                          * All other failures - server down or service
 693                          * down or temporary resource failure. Delay before
 694                          * returning to caller.
 695                          */
 696                         ticks = drv_sectohz(clnt_rdma_min_delay);
 697                         p->cku_err.re_status = RPC_CANTCONNECT;
 698                         p->cku_err.re_errno = EIO;
 699 
 700                         if (h->cl_nosignal == TRUE) {
 701                                 delay(ticks);
 702                         } else {
 703                                 if (delay_sig(ticks) == EINTR) {
 704                                         p->cku_err.re_status = RPC_INTR;
 705                                         p->cku_err.re_errno = EINTR;
 706                                 }
 707                         }
 708                         break;
 709                 }
 710 
 711                 return (p->cku_err.re_status);
 712         }
 713 
 714         if (p->cku_srcaddr.maxlen < conn->c_laddr.len) {
 715                 if ((p->cku_srcaddr.maxlen != 0) &&
 716                     (p->cku_srcaddr.buf != NULL))