Print this page
8368 remove warlock leftovers from usr/src/uts


 744                 return (-ENOTCONN);
 745 
 746         sin->sin_port = rs->rs_conn_port;
 747         sin->sin_addr.s_addr = rs->rs_conn_addr;
 748 
 749         sin->sin_family = AF_INET_OFFLOAD;
 750 
 751         *addr_len = sizeof (*sin);
 752         return (0);
 753 }
 754 
 755 void
 756 rdsv3_clrflowctrl(sock_lower_handle_t proto_handle)
 757 {
 758         struct rsock *sk = (struct rsock *)proto_handle;
 759         struct rdsv3_sock *rs = rdsv3_sk_to_rs(sk);
 760 
 761         RDSV3_DPRINTF2("rdsv3_clrflowctrl", "enter(rs: %p)", rs);
 762 }
 763 
 764 #ifndef __lock_lint
 765 static struct sock_downcalls_s rdsv3_sock_downcalls = {
 766         .sd_close =             rdsv3_release,
 767         .sd_bind =              rdsv3_bind,
 768         .sd_connect =           rdsv3_connect,
 769         .sd_accept =            NULL,
 770         .sd_getsockname =       rdsv3_getname,
 771         .sd_poll =              rdsv3_poll,
 772         .sd_ioctl =             rdsv3_ioctl,
 773         .sd_listen =            NULL,
 774         .sd_shutdown =          rdsv3_shutdown,
 775         .sd_setsockopt =        rdsv3_setsockopt,
 776         .sd_getsockopt =        rdsv3_getsockopt,
 777         .sd_send_uio =          rdsv3_send_uio,
 778         .sd_recv_uio =          rdsv3_recv_uio,
 779         .sd_activate =          rdsv3_activate,
 780         .sd_getpeername =       rdsv3_getpeername,
 781         .sd_send =              NULL,
 782         .sd_clr_flowctrl =      NULL
 783 };
 784 #else
 785 static struct sock_downcalls_s rdsv3_sock_downcalls = {
 786         rdsv3_activate,
 787         NULL,
 788         rdsv3_bind,
 789         NULL,
 790         rdsv3_connect,
 791         rdsv3_getpeername,
 792         rdsv3_getname,
 793         rdsv3_getsockopt,
 794         rdsv3_setsockopt,
 795         NULL,
 796         rdsv3_send_uio,
 797         rdsv3_recv_uio,
 798         rdsv3_poll,
 799         rdsv3_shutdown,
 800         NULL,
 801         rdsv3_ioctl,
 802         rdsv3_release
 803 };
 804 #endif
 805 
 806 sock_lower_handle_t
 807 rdsv3_create(int family, int type, int proto, sock_downcalls_t **sock_downcalls,
 808     uint_t *smodep, int *errorp, int flags, cred_t *credp)
 809 {
 810         struct rdsv3_sock       *rs;
 811         struct rsock            *sk;
 812 
 813         RDSV3_DPRINTF4("rdsv3_create", "Enter (family: %d type: %d, proto: %d "
 814             "flags: %d", family, type, proto, flags);
 815 
 816         sk = rdsv3_sk_alloc();
 817         if (sk == NULL)
 818                 return (NULL);
 819         rdsv3_sock_init_data(sk);
 820 
 821         rs = rdsv3_sk_to_rs(sk);
 822         rs->rs_sk = sk;
 823         mutex_init(&rs->rs_lock, NULL, MUTEX_DRIVER, NULL);
 824         rw_init(&rs->rs_recv_lock, NULL, RW_DRIVER, NULL);


 947 
 948         mutex_exit(&rdsv3_sock_lock);
 949 }
 950 
 951 rdsv3_delayed_work_t    *rdsv3_rdma_dwp = NULL;
 952 uint_t                  rdsv3_rdma_init_delay = 5; /* secs */
 953 extern void rdsv3_rdma_init_worker(struct rdsv3_work_s *work);
 954 
 955 void
 956 rdsv3_exit(void)
 957 {
 958         RDSV3_DPRINTF4("rdsv3_exit", "Enter");
 959 
 960         if (rdsv3_rdma_dwp) {
 961                 rdsv3_cancel_delayed_work(rdsv3_rdma_dwp);
 962         }
 963 
 964         (void) ddi_taskq_dispatch(rdsv3_taskq, rdsv3_rdma_exit,
 965             NULL, DDI_SLEEP);
 966         while (rdsv3_rdma_listen_id != NULL) {
 967 #ifndef __lock_lint
 968                 RDSV3_DPRINTF5("rdsv3", "%s-%d Waiting for rdsv3_rdma_exit",
 969                     __func__, __LINE__);
 970 #endif
 971                 delay(drv_usectohz(1000));
 972         }
 973 
 974         rdsv3_conn_exit();
 975         rdsv3_cong_exit();
 976         rdsv3_sysctl_exit();
 977         rdsv3_threads_exit();
 978         rdsv3_stats_exit();
 979         rdsv3_info_deregister_func(RDS_INFO_SOCKETS, rdsv3_sock_info);
 980         rdsv3_info_deregister_func(RDS_INFO_RECV_MESSAGES,
 981             rdsv3_sock_inc_info);
 982 
 983         if (rdsv3_rdma_dwp) {
 984                 kmem_free(rdsv3_rdma_dwp, sizeof (rdsv3_delayed_work_t));
 985                 rdsv3_rdma_dwp = NULL;
 986         }
 987 
 988         RDSV3_DPRINTF4("rdsv3_exit", "Return");
 989 }
 990 




 744                 return (-ENOTCONN);
 745 
 746         sin->sin_port = rs->rs_conn_port;
 747         sin->sin_addr.s_addr = rs->rs_conn_addr;
 748 
 749         sin->sin_family = AF_INET_OFFLOAD;
 750 
 751         *addr_len = sizeof (*sin);
 752         return (0);
 753 }
 754 
 755 void
 756 rdsv3_clrflowctrl(sock_lower_handle_t proto_handle)
 757 {
 758         struct rsock *sk = (struct rsock *)proto_handle;
 759         struct rdsv3_sock *rs = rdsv3_sk_to_rs(sk);
 760 
 761         RDSV3_DPRINTF2("rdsv3_clrflowctrl", "enter(rs: %p)", rs);
 762 }
 763 

 764 static struct sock_downcalls_s rdsv3_sock_downcalls = {
 765         .sd_close =             rdsv3_release,
 766         .sd_bind =              rdsv3_bind,
 767         .sd_connect =           rdsv3_connect,
 768         .sd_accept =            NULL,
 769         .sd_getsockname =       rdsv3_getname,
 770         .sd_poll =              rdsv3_poll,
 771         .sd_ioctl =             rdsv3_ioctl,
 772         .sd_listen =            NULL,
 773         .sd_shutdown =          rdsv3_shutdown,
 774         .sd_setsockopt =        rdsv3_setsockopt,
 775         .sd_getsockopt =        rdsv3_getsockopt,
 776         .sd_send_uio =          rdsv3_send_uio,
 777         .sd_recv_uio =          rdsv3_recv_uio,
 778         .sd_activate =          rdsv3_activate,
 779         .sd_getpeername =       rdsv3_getpeername,
 780         .sd_send =              NULL,
 781         .sd_clr_flowctrl =      NULL
 782 };





















 783 
 784 sock_lower_handle_t
 785 rdsv3_create(int family, int type, int proto, sock_downcalls_t **sock_downcalls,
 786     uint_t *smodep, int *errorp, int flags, cred_t *credp)
 787 {
 788         struct rdsv3_sock       *rs;
 789         struct rsock            *sk;
 790 
 791         RDSV3_DPRINTF4("rdsv3_create", "Enter (family: %d type: %d, proto: %d "
 792             "flags: %d", family, type, proto, flags);
 793 
 794         sk = rdsv3_sk_alloc();
 795         if (sk == NULL)
 796                 return (NULL);
 797         rdsv3_sock_init_data(sk);
 798 
 799         rs = rdsv3_sk_to_rs(sk);
 800         rs->rs_sk = sk;
 801         mutex_init(&rs->rs_lock, NULL, MUTEX_DRIVER, NULL);
 802         rw_init(&rs->rs_recv_lock, NULL, RW_DRIVER, NULL);


 925 
 926         mutex_exit(&rdsv3_sock_lock);
 927 }
 928 
 929 rdsv3_delayed_work_t    *rdsv3_rdma_dwp = NULL;
 930 uint_t                  rdsv3_rdma_init_delay = 5; /* secs */
 931 extern void rdsv3_rdma_init_worker(struct rdsv3_work_s *work);
 932 
 933 void
 934 rdsv3_exit(void)
 935 {
 936         RDSV3_DPRINTF4("rdsv3_exit", "Enter");
 937 
 938         if (rdsv3_rdma_dwp) {
 939                 rdsv3_cancel_delayed_work(rdsv3_rdma_dwp);
 940         }
 941 
 942         (void) ddi_taskq_dispatch(rdsv3_taskq, rdsv3_rdma_exit,
 943             NULL, DDI_SLEEP);
 944         while (rdsv3_rdma_listen_id != NULL) {

 945                 RDSV3_DPRINTF5("rdsv3", "%s-%d Waiting for rdsv3_rdma_exit",
 946                     __func__, __LINE__);

 947                 delay(drv_usectohz(1000));
 948         }
 949 
 950         rdsv3_conn_exit();
 951         rdsv3_cong_exit();
 952         rdsv3_sysctl_exit();
 953         rdsv3_threads_exit();
 954         rdsv3_stats_exit();
 955         rdsv3_info_deregister_func(RDS_INFO_SOCKETS, rdsv3_sock_info);
 956         rdsv3_info_deregister_func(RDS_INFO_RECV_MESSAGES,
 957             rdsv3_sock_inc_info);
 958 
 959         if (rdsv3_rdma_dwp) {
 960                 kmem_free(rdsv3_rdma_dwp, sizeof (rdsv3_delayed_work_t));
 961                 rdsv3_rdma_dwp = NULL;
 962         }
 963 
 964         RDSV3_DPRINTF4("rdsv3_exit", "Return");
 965 }
 966