Lines Matching refs:iface

28 		     struct cifs_server_iface *iface);
32 struct cifs_server_iface *iface) in is_server_using_iface() argument
34 struct sockaddr_in *i4 = (struct sockaddr_in *)&iface->sockaddr; in is_server_using_iface()
35 struct sockaddr_in6 *i6 = (struct sockaddr_in6 *)&iface->sockaddr; in is_server_using_iface()
39 if (server->dstaddr.ss_family != iface->sockaddr.ss_family) in is_server_using_iface()
55 bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface) in is_ses_using_iface() argument
61 if (ses->chans[i].iface == iface) { in is_ses_using_iface()
167 return ses->chans[chan_index].iface && in cifs_chan_is_iface_active()
168 ses->chans[chan_index].iface->is_active; in cifs_chan_is_iface_active()
180 struct cifs_server_iface *iface = NULL, *niface = NULL; in cifs_try_adding_channels() local
226 if (!iface) in cifs_try_adding_channels()
227 iface = list_first_entry(&ses->iface_list, struct cifs_server_iface, in cifs_try_adding_channels()
233 list_for_each_entry_safe_from(iface, niface, &ses->iface_list, in cifs_try_adding_channels()
236 if (iface->rdma_capable != ses->server->rdma) in cifs_try_adding_channels()
240 if (!iface->is_active || in cifs_try_adding_channels()
241 (is_ses_using_iface(ses, iface) && in cifs_try_adding_channels()
242 !iface->rss_capable)) in cifs_try_adding_channels()
246 iface_weight = iface->speed / iface_min_speed; in cifs_try_adding_channels()
248 if (iface->weight_fulfilled >= iface_weight) in cifs_try_adding_channels()
252 kref_get(&iface->refcount); in cifs_try_adding_channels()
255 rc = cifs_ses_add_channel(ses, iface); in cifs_try_adding_channels()
260 &iface->sockaddr, in cifs_try_adding_channels()
262 kref_put(&iface->refcount, release_iface); in cifs_try_adding_channels()
264 iface->weight_fulfilled++; in cifs_try_adding_channels()
268 iface->num_channels++; in cifs_try_adding_channels()
269 iface->weight_fulfilled++; in cifs_try_adding_channels()
271 &iface->sockaddr); in cifs_try_adding_channels()
276 if (list_entry_is_head(iface, &ses->iface_list, iface_head)) { in cifs_try_adding_channels()
277 list_for_each_entry(iface, &ses->iface_list, iface_head) in cifs_try_adding_channels()
278 iface->weight_fulfilled = 0; in cifs_try_adding_channels()
280 iface = NULL; in cifs_try_adding_channels()
302 struct cifs_server_iface *iface; in cifs_disable_secondary_channels() local
315 iface = ses->chans[i].iface; in cifs_disable_secondary_channels()
322 ses->chans[i].iface = NULL; in cifs_disable_secondary_channels()
326 if (iface) { in cifs_disable_secondary_channels()
328 iface->num_channels--; in cifs_disable_secondary_channels()
329 if (iface->weight_fulfilled) in cifs_disable_secondary_channels()
330 iface->weight_fulfilled--; in cifs_disable_secondary_channels()
331 kref_put(&iface->refcount, release_iface); in cifs_disable_secondary_channels()
359 struct cifs_server_iface *iface = NULL; in cifs_chan_update_iface() local
371 if (ses->chans[chan_index].iface) { in cifs_chan_update_iface()
372 old_iface = ses->chans[chan_index].iface; in cifs_chan_update_iface()
396 list_for_each_entry(iface, &ses->iface_list, iface_head) { in cifs_chan_update_iface()
400 (struct sockaddr *) &iface->sockaddr)) in cifs_chan_update_iface()
403 kref_get(&iface->refcount); in cifs_chan_update_iface()
408 if (iface->rdma_capable != server->rdma) in cifs_chan_update_iface()
411 if (!iface->is_active || in cifs_chan_update_iface()
412 (is_ses_using_iface(ses, iface) && in cifs_chan_update_iface()
413 !iface->rss_capable)) { in cifs_chan_update_iface()
418 iface_weight = iface->speed / iface_min_speed; in cifs_chan_update_iface()
420 if (iface->weight_fulfilled >= iface_weight) in cifs_chan_update_iface()
423 kref_get(&iface->refcount); in cifs_chan_update_iface()
427 if (list_entry_is_head(iface, &ses->iface_list, iface_head)) { in cifs_chan_update_iface()
428 iface = NULL; in cifs_chan_update_iface()
432 if (!iface) { in cifs_chan_update_iface()
449 &iface->sockaddr); in cifs_chan_update_iface()
454 iface->num_channels++; in cifs_chan_update_iface()
455 iface->weight_fulfilled++; in cifs_chan_update_iface()
461 &iface->sockaddr); in cifs_chan_update_iface()
462 iface->num_channels++; in cifs_chan_update_iface()
463 iface->weight_fulfilled++; in cifs_chan_update_iface()
474 ses->chans[chan_index].iface = iface; in cifs_chan_update_iface()
480 struct cifs_server_iface *iface) in cifs_ses_add_channel() argument
486 struct sockaddr_in *ipv4 = (struct sockaddr_in *)&iface->sockaddr; in cifs_ses_add_channel()
487 struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)&iface->sockaddr; in cifs_ses_add_channel()
492 if (iface->sockaddr.ss_family == AF_INET) in cifs_ses_add_channel()
494 ses, iface->speed, iface->rdma_capable ? "yes" : "no", in cifs_ses_add_channel()
498 ses, iface->speed, iface->rdma_capable ? "yes" : "no", in cifs_ses_add_channel()
561 ctx->rdma = iface->rdma_capable; in cifs_ses_add_channel()
562 memcpy(&ctx->dstaddr, &iface->sockaddr, sizeof(ctx->dstaddr)); in cifs_ses_add_channel()
580 chan->iface = iface; in cifs_ses_add_channel()