Lines Matching refs:rpcp
73 nlm_rpc_t *rpcp;
80 TAILQ_FOREACH(rpcp, &hostp->nh_rpchc, nr_link) {
81 if (rpcp->nr_vers == vers) {
90 TAILQ_REMOVE(&hostp->nh_rpchc, rpcp, nr_link);
91 return (rpcp);
131 refresh_nlm_rpc(struct nlm_host *hostp, nlm_rpc_t *rpcp)
135 if (rpcp->nr_handle == NULL) {
139 NLM_PROG, rpcp->nr_vers, 0, NLM_RPC_RETRIES,
140 CRED(), &rpcp->nr_handle);
152 if (clnt_control(rpcp->nr_handle, CLSET_NODELAYONERR,
157 ret = clnt_tli_kinit(rpcp->nr_handle, &hostp->nh_knc,
174 stat = nlm_null_rpc(rpcp->nr_handle, rpcp->nr_vers);
194 nlm_rpc_t *rpcp = NULL;
236 rpcp = get_nlm_rpc_fromcache(hostp, vers);
238 if (rpcp == NULL) {
243 rpcp = kmem_cache_alloc(nlm_rpch_cache, KM_SLEEP);
244 rpcp->nr_vers = vers;
250 rc = refresh_nlm_rpc(hostp, rpcp);
261 nlm_host_rele_rpc_locked(hostp, rpcp);
265 destroy_rpch(rpcp);
270 nlm_rpc_t *, rpcp);
272 *rpcpp = rpcp;
277 nlm_host_rele_rpc(struct nlm_host *hostp, nlm_rpc_t *rpcp)
280 nlm_host_rele_rpc_locked(hostp, rpcp);
285 nlm_host_rele_rpc_locked(struct nlm_host *hostp, nlm_rpc_t *rpcp)
288 TAILQ_INSERT_HEAD(&hostp->nh_rpchc, rpcp, nr_link);
319 nlm_rpc_t *rpcp;
328 while ((rpcp = TAILQ_FIRST(&hostp->nh_rpchc)) != NULL) {
329 TAILQ_REMOVE(&hostp->nh_rpchc, rpcp, nr_link);
330 destroy_rpch(rpcp);
338 nlm_rpc_t *rpcp = (nlm_rpc_t *)datap;
340 bzero(rpcp, sizeof (*rpcp));
348 nlm_rpc_t *rpcp = (nlm_rpc_t *)datap;
349 ASSERT(rpcp->nr_handle == NULL);
353 destroy_rpch(nlm_rpc_t *rpcp)
355 if (rpcp->nr_handle != NULL) {
356 AUTH_DESTROY(rpcp->nr_handle->cl_auth);
357 CLNT_DESTROY(rpcp->nr_handle);
358 rpcp->nr_handle = NULL;
361 kmem_cache_free(nlm_rpch_cache, rpcp);