Lines Matching refs:serv
318 int svc_sock_names(struct svc_serv *serv, char *buf, const size_t buflen, in svc_sock_names() argument
324 if (!serv) in svc_sock_names()
327 spin_lock_bh(&serv->sv_lock); in svc_sock_names()
328 list_for_each_entry(svsk, &serv->sv_permsocks, sk_xprt.xpt_list) { in svc_sock_names()
340 spin_unlock_bh(&serv->sv_lock); in svc_sock_names()
519 struct svc_serv *serv = svsk->sk_xprt.xpt_server; in svc_udp_recvfrom() local
545 (serv->sv_nrthreads+3) * serv->sv_max_mesg, in svc_udp_recvfrom()
546 (serv->sv_nrthreads+3) * serv->sv_max_mesg); in svc_udp_recvfrom()
624 if (serv->sv_stats) in svc_udp_recvfrom()
625 serv->sv_stats->netudpcnt++; in svc_udp_recvfrom()
650 struct svc_serv *serv = xprt->xpt_server; in svc_udp_has_wspace() local
658 required = atomic_read(&svsk->sk_xprt.xpt_reserved) + serv->sv_max_mesg; in svc_udp_has_wspace()
671 static struct svc_xprt *svc_udp_create(struct svc_serv *serv, in svc_udp_create() argument
676 return svc_create_socket(serv, IPPROTO_UDP, net, sa, salen, flags); in svc_udp_create()
698 static void svc_udp_init(struct svc_sock *svsk, struct svc_serv *serv) in svc_udp_init() argument
702 svc_xprt_init(&svc_udp_class, &svsk->sk_xprt, serv); in svc_udp_init()
816 struct svc_serv *serv = svsk->sk_xprt.xpt_server; in svc_tcp_accept() local
832 serv->sv_name); in svc_tcp_accept()
835 serv->sv_name, -err); in svc_tcp_accept()
844 serv->sv_name, -err); in svc_tcp_accept()
855 serv->sv_name, in svc_tcp_accept()
858 dprintk("%s: connect from %s\n", serv->sv_name, in svc_tcp_accept()
866 if (!(newsvsk = svc_setup_socket(serv, newsock, &err, in svc_tcp_accept()
877 if (serv->sv_stats) in svc_tcp_accept()
878 serv->sv_stats->nettcpconn++; in svc_tcp_accept()
895 struct svc_serv *serv = svsk->sk_xprt.xpt_server; in svc_tcp_recv_record() local
912 (serv->sv_nrthreads+3) * serv->sv_max_mesg, in svc_tcp_recv_record()
913 3 * serv->sv_max_mesg); in svc_tcp_recv_record()
948 if (svsk->sk_reclen > serv->sv_max_mesg) { in svc_tcp_recv_record()
1041 struct svc_serv *serv = svsk->sk_xprt.xpt_server; in svc_tcp_recvfrom() local
1120 if (serv->sv_stats) in svc_tcp_recvfrom()
1121 serv->sv_stats->nettcpcnt++; in svc_tcp_recvfrom()
1184 struct svc_serv *serv = svsk->sk_xprt.xpt_server; in svc_tcp_has_wspace() local
1189 required = atomic_read(&xprt->xpt_reserved) + serv->sv_max_mesg; in svc_tcp_has_wspace()
1196 static struct svc_xprt *svc_tcp_create(struct svc_serv *serv, in svc_tcp_create() argument
1201 return svc_create_socket(serv, IPPROTO_TCP, net, sa, salen, flags); in svc_tcp_create()
1210 static struct svc_xprt *svc_bc_tcp_create(struct svc_serv *serv, in svc_bc_tcp_create() argument
1215 return svc_bc_create_socket(serv, IPPROTO_TCP, net, sa, salen, flags); in svc_bc_tcp_create()
1288 static void svc_tcp_init(struct svc_sock *svsk, struct svc_serv *serv) in svc_tcp_init() argument
1292 svc_xprt_init(&svc_tcp_class, &svsk->sk_xprt, serv); in svc_tcp_init()
1325 void svc_sock_update_bufs(struct svc_serv *serv) in svc_sock_update_bufs() argument
1333 spin_lock_bh(&serv->sv_lock); in svc_sock_update_bufs()
1334 list_for_each_entry(svsk, &serv->sv_permsocks, sk_xprt.xpt_list) in svc_sock_update_bufs()
1336 list_for_each_entry(svsk, &serv->sv_tempsocks, sk_xprt.xpt_list) in svc_sock_update_bufs()
1338 spin_unlock_bh(&serv->sv_lock); in svc_sock_update_bufs()
1346 static struct svc_sock *svc_setup_socket(struct svc_serv *serv, in svc_setup_socket() argument
1364 *errp = svc_register(serv, inet->sk_family, inet->sk_protocol, in svc_setup_socket()
1381 svc_udp_init(svsk, serv); in svc_setup_socket()
1383 svc_tcp_init(svsk, serv); in svc_setup_socket()
1402 int svc_addsock(struct svc_serv *serv, const int fd, char *name_return, in svc_addsock() argument
1422 svsk = svc_setup_socket(serv, so, &err, in svc_addsock()
1431 spin_lock_bh(&serv->sv_lock); in svc_addsock()
1432 list_add(&svsk->sk_xprt.xpt_list, &serv->sv_permsocks); in svc_addsock()
1433 spin_unlock_bh(&serv->sv_lock); in svc_addsock()
1450 static struct svc_xprt *svc_create_socket(struct svc_serv *serv, in svc_create_socket() argument
1468 serv->sv_program->pg_name, protocol, in svc_create_socket()
1521 if ((svsk = svc_setup_socket(serv, sock, &error, flags)) != NULL) { in svc_create_socket()
1588 static struct svc_xprt *svc_bc_create_socket(struct svc_serv *serv, in svc_bc_create_socket() argument
1608 svc_xprt_init(&svc_tcp_bc_class, xprt, serv); in svc_bc_create_socket()
1610 serv->sv_bc_xprt = xprt; in svc_bc_create_socket()