Lines Matching refs:rib_stat
224 * rib_stat: private data pointer used when registering
228 static rpcib_state_t *rib_stat = NULL;
507 rw_enter(&rib_stat->hcas_list_lock, RW_WRITER);
508 hca = rib_stat->hcas_list;
509 rib_stat->hcas_list = NULL;
510 rw_exit(&rib_stat->hcas_list_lock);
515 rib_stat->nhca_inited--;
531 rw_enter(&rib_stat->service_list_lock, RW_WRITER);
532 while (rib_stat->service_list != NULL) {
533 service = rib_stat->service_list;
536 rw_exit(&rib_stat->service_list_lock);
543 ret = ibt_deregister_service(rib_stat->ibt_clnt_hdl,
546 rw_exit(&rib_stat->service_list_lock);
553 rib_stat->service_list = service->next;
556 rw_exit(&rib_stat->service_list_lock);
594 if (rib_stat == NULL) {
595 rib_stat = kmem_zalloc(sizeof (*rib_stat), KM_SLEEP);
596 mutex_init(&rib_stat->open_hca_lock, NULL, MUTEX_DRIVER, NULL);
597 rw_init(&rib_stat->hcas_list_lock, NULL, RW_DRIVER, NULL);
598 mutex_init(&rib_stat->listen_lock, NULL, MUTEX_DRIVER, NULL);
601 rib_stat->hca_count = ibt_get_hca_list(NULL);
602 if (rib_stat->hca_count < 1) {
603 mutex_destroy(&rib_stat->listen_lock);
604 rw_destroy(&rib_stat->hcas_list_lock);
605 mutex_destroy(&rib_stat->open_hca_lock);
606 kmem_free(rib_stat, sizeof (*rib_stat));
607 rib_stat = NULL;
612 (void *)rib_stat, &rib_stat->ibt_clnt_hdl);
615 mutex_destroy(&rib_stat->listen_lock);
616 rw_destroy(&rib_stat->hcas_list_lock);
617 mutex_destroy(&rib_stat->open_hca_lock);
618 kmem_free(rib_stat, sizeof (*rib_stat));
619 rib_stat = NULL;
623 rib_stat->service_list = NULL;
624 rw_init(&rib_stat->service_list_lock, NULL, RW_DRIVER, NULL);
625 mutex_enter(&rib_stat->open_hca_lock);
626 if (rpcib_open_hcas(rib_stat) != RDMA_SUCCESS) {
627 mutex_exit(&rib_stat->open_hca_lock);
630 mutex_exit(&rib_stat->open_hca_lock);
654 (void) ibt_detach(rib_stat->ibt_clnt_hdl);
657 mutex_destroy(&rib_stat->listen_lock);
658 rw_destroy(&rib_stat->hcas_list_lock);
659 mutex_destroy(&rib_stat->open_hca_lock);
660 rw_destroy(&rib_stat->service_list_lock);
661 kmem_free(rib_stat, sizeof (*rib_stat));
662 rib_stat = NULL;
691 (void) ibt_detach(rib_stat->ibt_clnt_hdl);
692 mutex_destroy(&rib_stat->listen_lock);
693 rw_destroy(&rib_stat->hcas_list_lock);
694 mutex_destroy(&rib_stat->open_hca_lock);
695 rw_destroy(&rib_stat->service_list_lock);
697 kmem_free(rib_stat, sizeof (*rib_stat));
698 rib_stat = NULL;
984 rib_mod.rdma_count = rib_stat->nhca_inited;
1424 (void) svc_queuereq((queue_t *)rib_stat->q, mp,
1451 mutex_enter(&rib_stat->open_hca_lock);
1452 (void) rpcib_open_hcas(rib_stat);
1454 mutex_exit(&rib_stat->open_hca_lock);
1958 rw_enter(&rib_stat->hcas_list_lock, RW_READER);
1959 for (hca = rib_stat->hcas_list; hca; hca = hca->next) {
1982 ibt_status = ibt_get_ip_paths(rib_stat->ibt_clnt_hdl,
2007 rw_exit(&rib_stat->hcas_list_lock);
2976 mutex_enter(&rib_stat->open_hca_lock);
2977 q = rib_stat->q;
2978 mutex_exit(&rib_stat->open_hca_lock);
3278 rw_enter(&rib_stat->service_list_lock, RW_WRITER);
3284 for (service = rib_stat->service_list;
3306 rw_exit(&rib_stat->service_list_lock);
3322 service->next = rib_stat->service_list;
3323 rib_stat->service_list = service;
3394 rw_exit(&rib_stat->service_list_lock);
3419 mutex_enter(&rib_stat->listen_lock);
3421 * if rd parameter is NULL then it means that rib_stat->q is
3427 if (rib_stat->q == NULL) {
3428 mutex_exit(&rib_stat->listen_lock);
3432 rib_stat->q = &rd->q;
3434 rw_enter(&rib_stat->hcas_list_lock, RW_READER);
3435 for (hca = rib_stat->hcas_list; hca; hca = hca->next) {
3457 rw_exit(&rib_stat->hcas_list_lock);
3472 mutex_exit(&rib_stat->listen_lock);
3482 mutex_enter(&rib_stat->listen_lock);
3495 rw_enter(&rib_stat->hcas_list_lock, RW_READER);
3496 for (hca = rib_stat->hcas_list; hca; hca = hca->next) {
3509 rw_exit(&rib_stat->hcas_list_lock);
3516 rib_stat->q = NULL;
3517 mutex_exit(&rib_stat->listen_lock);
3546 rw_enter(&rib_stat->service_list_lock, RW_READER);
3547 for (sc = rib_stat->service_list;
3553 * probably just removed completely through rib_stat.
3558 rw_exit(&rib_stat->service_list_lock);
4344 rw_enter(&rib_stat->hcas_list_lock, RW_READER);
4345 for (hca = rib_stat->hcas_list; hca; hca = hca->next) {
4352 rw_exit(&rib_stat->hcas_list_lock);
4358 rw_exit(&rib_stat->hcas_list_lock);
4832 if ((rib_stat->hcas_list == NULL) && stats_enabled) {
4876 rw_enter(&rib_stat->hcas_list_lock, RW_WRITER);
4877 for (hcap = &rib_stat->hcas_list; *hcap; hcap = &(*hcap)->next) {
4887 rib_stat->nhca_inited--;
4894 rw_exit(&rib_stat->hcas_list_lock);
5388 rw_enter(&rib_stat->hcas_list_lock, RW_READER);
5389 for (hca = rib_stat->hcas_list; hca; hca = hca->next) {
5399 rw_exit(&rib_stat->hcas_list_lock);